+struct rdmaio_options {
+ struct thread_data *td;
+ unsigned int port;
+ enum rdma_io_mode verb;
+};
+
+static int str_hostname_cb(void *data, const char *input)
+{
+ struct rdmaio_options *o = data;
+
+ if (o->td->o.filename)
+ free(o->td->o.filename);
+ o->td->o.filename = strdup(input);
+ return 0;
+}
+
+static struct fio_option options[] = {
+ {
+ .name = "hostname",
+ .lname = "rdma engine hostname",
+ .type = FIO_OPT_STR_STORE,
+ .cb = str_hostname_cb,
+ .help = "Hostname for RDMA IO engine",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_RDMA,
+ },
+ {
+ .name = "port",
+ .lname = "rdma engine port",
+ .type = FIO_OPT_INT,
+ .off1 = offsetof(struct rdmaio_options, port),
+ .minval = 1,
+ .maxval = 65535,
+ .help = "Port to use for RDMA connections",
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_RDMA,
+ },
+ {
+ .name = "verb",
+ .lname = "RDMA engine verb",
+ .alias = "proto",
+ .type = FIO_OPT_STR,
+ .off1 = offsetof(struct rdmaio_options, verb),
+ .help = "RDMA engine verb",
+ .def = "write",
+ .posval = {
+ { .ival = "write",
+ .oval = FIO_RDMA_MEM_WRITE,
+ .help = "Memory Write",
+ },
+ { .ival = "read",
+ .oval = FIO_RDMA_MEM_READ,
+ .help = "Memory Read",
+ },
+ { .ival = "send",
+ .oval = FIO_RDMA_CHA_SEND,
+ .help = "Posted Send",
+ },
+ { .ival = "recv",
+ .oval = FIO_RDMA_CHA_RECV,
+ .help = "Posted Receive",
+ },
+ },
+ .category = FIO_OPT_C_ENGINE,
+ .group = FIO_OPT_G_RDMA,
+ },
+ {
+ .name = NULL,
+ },
+};
+