};
#define TEST_CNT (sizeof test_size / sizeof test_size[0])
+enum rs_optimization {
+ opt_mixed,
+ opt_latency,
+ opt_bandwidth
+};
+
static int use_rs = 1;
static int use_async;
static int verify;
static int flags = MSG_DONTWAIT;
static int poll_timeout = 0;
static int custom;
+static enum rs_optimization optimization;
static int size_option;
static int iterations = 1;
static int transfer_size = 1000;
static void init_latency_test(int size)
{
+ optimization = opt_latency;
size_str(test_name, size);
sprintf(test_name, "%s_lat", test_name);
transfer_count = 1;
static void init_bandwidth_test(int size)
{
+ optimization = opt_bandwidth;
size_str(test_name, size);
sprintf(test_name, "%s_bw", test_name);
iterations = 1;
val = 1;
rs_setsockopt(rs, IPPROTO_TCP, TCP_NODELAY, (void *) &val, sizeof(val));
- if (flags & MSG_DONTWAIT) {
+ if (flags & MSG_DONTWAIT)
rs_fcntl(rs, F_SETFL, O_NONBLOCK);
+
+ if (use_rs) {
+ /* Inline size based on experimental data */
+ if (optimization == opt_latency)
+ val = 384;
+ else if (optimization == opt_bandwidth)
+ val = 0;
+ else
+ val = 64;
+
+ rs_setsockopt(rs, SOL_RDMA, RDMA_INLINE, &val, sizeof val);
}
}