Streamline thread_data data direction setting and checking
Currently it's a mess of ->ddir, ->iomix and ->sequential. Add
a TD_DDIR_* for each of these, so we can store them as one value.
A prerequisite for the next parsing cleanup.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/engines/net.c b/engines/net.c
index 55b2128..60a6877 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -223,7 +223,7 @@
return 1;
}
- if (td->iomix) {
+ if (td_rw(td)) {
log_err("fio: network connections must be read OR write\n");
return 1;
}
@@ -241,7 +241,7 @@
strcpy(host, buf);
port = atoi(sep);
- if (td->ddir == DDIR_READ) {
+ if (td_read(td)) {
send_to_net(td) = 0;
ret = fio_netio_setup_listen(td, port);
} else {