engines/net: add subjob number to given port
authorJens Axboe <axboe@fb.com>
Fri, 10 Oct 2014 01:55:21 +0000 (19:55 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 10 Oct 2014 01:55:21 +0000 (19:55 -0600)
If we use numjobs=x where x > 1, then we don't want to reuse the
same port. Bump it within a group, using the subjob number.

Signed-off-by: Jens Axboe <axboe@fb.com>
engines/net.c

index 7c0a4eb41c010f75f97a25023f1a5897160a10c3..aa7de9678ad02d1c30bcea5f4aa52ace0e6519c0 100644 (file)
@@ -1308,6 +1308,8 @@ static int fio_netio_init(struct thread_data *td)
                return 1;
        }
 
+       o->port += td->subjob_number;
+
        if (!is_tcp(o)) {
                if (o->listen) {
                        log_err("fio: listen only valid for TCP proto IO\n");