." Text automatically generated by txt2man
-.TH dapltest 1 "February 23, 2007" "uDAPL 1.2" "USER COMMANDS"
+.TH dapltest 1 "July 16, 2013" "uDAPL 2.0" "USER COMMANDS"
.SH NAME
\fB
.SH USAGE
dapltest [ -f script_file_name ]
-[ -T S|Q|T|P|L ] [ -D device_name ] [ -d ] [ -R HT|LL|EC|PM|BE ]
+[ -T S|Q|T|P|L ] [ -D device_name ] [-n port_number] [ -d ] [ -R HT|LL|EC|PM|BE ]
.PP
With no arguments, dapltest runs as a server using default values,
and loops accepting requests from clients.
Default: none
.TP
.B
+[ -n server_port_number]
+Specifies the starting server port for all tests.
+Default: 45278
+.TP
+.B
[ -d ]
Enables extra debug verbosity, primarily tracing
of the various DAPL operations as they progress.
.fi
.SH EXAMPLES
-dapltest -T S -d -D OpenIB-cma
+dapltest -T S -d -D OpenIB-cma -n 53000
.PP
.nf
.fam C
- Starts a server process with debug verbosity.
+ Starts a server process with debug verbosity, on server port 53000.
.fam T
.fi
-dapltest -T T -d -s host1-ib0 -D OpenIB-cma -i 100 client SR 4096 2 server SR 4096 2
+dapltest -T T -d -s host1-ib0 -D OpenIB-cma -n 53000 -i 100 client SR 4096 2 server SR 4096 2
.PP
.nf
.fam C
Runs a transaction test, with both sides
sending one buffer with two 4KB segments,
- one hundred times.
+ one hundred times. To server host1-ib0 on port 53000
.fam T
.fi
cmd->num_iter = 1000;
cmd->num_threads = 10;
cmd->num_vis = 500;
+ cmd->port = SERVER_PORT_NUMBER;
cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
}
unsigned int len;
for (;;) {
- c = DT_mygetopt_r(my_argc, my_argv, "D:f:s:i:t:v:R:", opts);
+ c = DT_mygetopt_r(my_argc, my_argv, "D:f:s:i:t:v:R:n:", opts);
if (c == EOF) {
break;
}
}
break;
}
-
+ case 'n':
+ {
+ cmd->port = atoi(opts->optarg);
+ break;
+ }
case '?':
default:
{
"dapltest -T F [-D <dev_name>] -f <funcfeature> [-i <iter_num>] \n"
"[-t <num_threads>] [-v <num_vis>] [-s <server_name>] [case0] [case1] [...]\n"
"USAGE: [-D <device Name>]\n"
+ "USAGE: [-n <server port number>]\n"
"USAGE: -f <func_feature>\n"
"USAGE: hwconn\n"
"USAGE: endpoint\n"
cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
cmd->width = 1;
cmd->maximum = ~0U;
+ cmd->port = SERVER_PORT_NUMBER;
}
/* --------------------------------------------------- */
int i;
for (;;) {
- c = DT_mygetopt_r(my_argc, my_argv, "dm:w:D:R:", opts);
+ c = DT_mygetopt_r(my_argc, my_argv, "dm:w:D:R:n:", opts);
if (c == EOF) {
break;
}
cmd->width = atol(opts->optarg);
break;
}
+ case 'n':
+ {
+ cmd->port = atoi(opts->optarg);
+ break;
+ }
case '?':
default:
{
DT_Mdep_printf("USAGE: ---- LIMIT TEST ----\n");
DT_Mdep_printf("USAGE: dapltest -T L\n");
DT_Mdep_printf("USAGE: [-D <device Name>]\n");
+ DT_Mdep_printf("USAGE: [-n <server port number>]\n");
DT_Mdep_printf("USAGE: [-d] : debug (zero)\n");
DT_Mdep_printf("USAGE: [-w <width_of_resource_sets>]\n");
- DT_Mdep_printf
- ("USAGE: [-m <maximum_for_exhaustion_tests>]\n");
+ DT_Mdep_printf("USAGE: [-m <maximum_for_exhaustion_tests>]\n");
DT_Mdep_printf("USAGE: [-R <service reliability>]\n");
- DT_Mdep_printf
- ("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
+ DT_Mdep_printf("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
DT_Mdep_printf("USAGE: (HT == QOS_HIGH_THROUGHPUT)\n");
DT_Mdep_printf("USAGE: (LL == QOS_LOW_LATENCY)\n");
DT_Mdep_printf("USAGE: (EC == QOS_ECONOMY)\n");
DT_Mdep_printf("USAGE: (PM == QOS_PREMIUM)\n");
- DT_Mdep_printf
- ("USAGE: [limit_ia [limit_pz] [limit_evd] ... ]\n");
- DT_Mdep_printf
- ("NOTE: If test is not specified, do all the limit tests\n");
+ DT_Mdep_printf("USAGE: [limit_ia [limit_pz] [limit_evd] ... ]\n");
+ DT_Mdep_printf("NOTE: If test is not specified, do all the limit tests\n");
DT_Mdep_printf("NOTE: Else, just do the specified tests\n");
- DT_Mdep_printf
- ("NOTE: Each test is separated by space, the test can be:\n");
-
+ DT_Mdep_printf("NOTE: Each test is separated by space, the test can be:\n");
DT_Mdep_printf("NOTE: [limit_ia] test max num of open IAs\n");
DT_Mdep_printf("NOTE: [limit_pz] test max num of PZs\n");
#ifndef __KDAPLTEST__
DT_Mdep_printf("NOTE: [limit_psp] test max num of PSPs\n");
DT_Mdep_printf("NOTE: [limit_ep] test max num of EPs\n");
DT_Mdep_printf("NOTE: [limit_lmr] test max num of LMRs\n");
- DT_Mdep_printf
- ("NOTE: [limit_rpost] test max num of recvs posted\n");
+ DT_Mdep_printf("NOTE: [limit_rpost] test max num of recvs posted\n");
DT_Mdep_printf("NOTE: [limit_size_lmr] test max size of LMR\n");
}
void Dapltest_Main_Usage(void)
{
DT_Mdep_printf("USAGE:\n");
- DT_Mdep_printf
- ("USAGE: dapltest -T <Test_Type> [-D IA_name] [test-specific args]\n");
+ DT_Mdep_printf("USAGE: dapltest -T <Test_Type> [-D IA_name] [-n port_number] [test-specific args]\n");
DT_Mdep_printf("USAGE: where <Test_Type>\n");
DT_Mdep_printf("USAGE: S = Run as a server\n");
DT_Mdep_printf("USAGE: T = Transaction Test\n");
DT_Mdep_printf("USAGE: L = Limit Test\n");
DT_Mdep_printf("USAGE: F = FFT Test\n");
DT_Mdep_printf("USAGE:\n");
- DT_Mdep_printf
- ("USAGE: -D Interface_Adapter {default ibnic0v2}\n");
+ DT_Mdep_printf("USAGE: -D Interface_Adapter {default ibnic0v2}\n");
+ DT_Mdep_printf("USAGE:\n");
+ DT_Mdep_printf("USAGE: -n server_port_number {default 42768}\n");
DT_Mdep_printf("USAGE:\n");
DT_Mdep_printf
- ("NOTE:\tRun as server taking defaults (dapltest -T S [-D ibnic0v2])\n");
+ ("NOTE:\tRun as server taking defaults (dapltest -T S [-D ibnic0v2] [-p 42768])\n");
DT_Mdep_printf("NOTE: dapltest\n");
DT_Mdep_printf("NOTE:\n");
DT_Mdep_printf
params_ptr->ReliabilityLevel =
Server_Cmd->ReliabilityLevel;
params_ptr->debug = Server_Cmd->debug;
+ params_ptr->server_port = Server_Cmd->port;
break;
}
case 'T': /* Transaction Test */
params_ptr->ReliabilityLevel =
Transaction_Cmd->ReliabilityLevel;
params_ptr->debug = Transaction_Cmd->debug;
+ params_ptr->server_port = Transaction_Cmd->port;
DT_NetAddrLookupHostAddress(¶ms_ptr->server_netaddr,
Transaction_Cmd->
server_name);
params_ptr->ReliabilityLevel =
Limit_Cmd->ReliabilityLevel;
params_ptr->debug = Limit_Cmd->debug;
+ params_ptr->server_port = Limit_Cmd->port;
break;
}
case 'P': /* Performance Test */
params_ptr->ReliabilityLevel = Performance_Cmd->qos;
params_ptr->debug = Performance_Cmd->debug;
+ params_ptr->server_port = Performance_Cmd->port;
DT_NetAddrLookupHostAddress(¶ms_ptr->server_netaddr,
Performance_Cmd->
server_name);
DT_NetAddrLookupHostAddress(¶ms_ptr->server_netaddr,
FFT_Cmd->server_name);
params_ptr->debug = false;
+ params_ptr->server_port = FFT_Cmd->port;
break;
}
DT_Mdep_printf("USAGE: ---- PERFORMANCE TEST ----\n");
DT_Mdep_printf("USAGE: dapltest -T P\n");
DT_Mdep_printf("USAGE: -s <server Name>\n");
+ DT_Mdep_printf("USAGE: -n <server port number>\n");
DT_Mdep_printf("USAGE: [-m b|p]\n");
DT_Mdep_printf("USAGE: [-D <device Name>]\n");
DT_Mdep_printf("USAGE: [-d] : debug (zero)\n");
- DT_Mdep_printf
- ("USAGE: [-i <num iterations>] : (1, 000)\n");
+ DT_Mdep_printf("USAGE: [-i <num iterations>] : (1, 000)\n");
DT_Mdep_printf("USAGE: [-p <pipline>]\n");
DT_Mdep_printf("USAGE: [-R <service reliability>]\n");
- DT_Mdep_printf
- ("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
+ DT_Mdep_printf("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
DT_Mdep_printf("USAGE: (HT == QOS_HIGH_THROUGHPUT)\n");
DT_Mdep_printf("USAGE: (LL == QOS_LOW_LATENCY)\n");
DT_Mdep_printf("USAGE: (EC == QOS_ECONOMY)\n");
unsigned int len;
for (;;) {
- c = DT_mygetopt_r(my_argc, my_argv, "D:dm:i:p:R:s:", opts);
+ c = DT_mygetopt_r(my_argc, my_argv, "D:dm:i:p:R:s:n:", opts);
if (EOF == c) {
break;
NAME_SZ);
break;
}
+ case 'n':
+ {
+ cmd->port = atoi(opts->optarg);
+ break;
+ }
default:
{
DT_Mdep_printf
cmd->debug = false;
cmd->num_iterations = 1000;
cmd->pipeline_len = ~0;
-
+ cmd->port = SERVER_PORT_NUMBER;
cmd->op.transfer_type = RDMA_WRITE;
cmd->op.seg_size = 4096;
cmd->op.num_segs = 1;
DT_Mdep_printf("-------------------------------------\n");
DT_Mdep_printf("PerfCmd.server_name : %s\n",
cmd->server_name);
+ DT_Mdep_printf("PerfCmd.server_port_number : %d\n",
+ cmd->port);
DT_Mdep_printf("PerfCmd.dapl_name : %s\n",
cmd->dapl_name);
DT_Mdep_printf("PerfCmd.mode : %s\n",
{
DT_dapltest_debug = 0;
Server_Cmd->debug = false;
+ Server_Cmd->port = SERVER_PORT_NUMBER;
Server_Cmd->dapl_name[0] = '\0';
Server_Cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
}
{
int c;
for (;;) {
- c = DT_mygetopt_r(my_argc, my_argv, "dD:R:", opts);
+ c = DT_mygetopt_r(my_argc, my_argv, "dD:R:n:", opts);
if (c == EOF) {
break;
}
}
break;
}
+ case 'n':
+ {
+ Server_Cmd->port = atoi(opts->optarg);
+ break;
+ }
case '?':
default:
{
DT_Mdep_printf("USAGE: [-D <device Name>]\n");
DT_Mdep_printf("USAGE: [-d] : debug (zero)\n");
DT_Mdep_printf("USAGE: [-R <service reliability>]\n");
- DT_Mdep_printf
- ("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
+ DT_Mdep_printf("USAGE: [-n <server port number>]\n");
+ DT_Mdep_printf("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
DT_Mdep_printf("USAGE: (HT == QOS_HIGH_THROUGHPUT)\n");
DT_Mdep_printf("USAGE: (LL == QOS_LOW_LATENCY)\n");
DT_Mdep_printf("USAGE: (EC == QOS_ECONOMY)\n");
{
DT_Mdep_printf("Server_Cmd.debug: %d\n", Server_Cmd->debug);
DT_Mdep_printf("Server_Cmd.dapl_name: %s\n", Server_Cmd->dapl_name);
+ DT_Mdep_printf("Server_Cmd.port: %d\n", Server_Cmd->port);
}
DT_Mdep_printf("USAGE: dapltest -T T\n");
DT_Mdep_printf("USAGE: -s <server Name>\n");
DT_Mdep_printf("USAGE: [-D <device Name>]\n");
+ DT_Mdep_printf("USAGE: [-n <server port number>]\n");
DT_Mdep_printf("USAGE: [-d] : debug (zero)\n");
- DT_Mdep_printf
- ("USAGE: [-i <num iterations>] : (1, 000)\n");
+ DT_Mdep_printf("USAGE: [-i <num iterations>] : (1, 000)\n");
DT_Mdep_printf("USAGE: [-t <num threads>] : (1)\n");
DT_Mdep_printf("USAGE: [-w <num EPs per thread>] : (1)\n");
DT_Mdep_printf("USAGE: [-V ] : Validate data: (false)\n");
- DT_Mdep_printf
- ("USAGE: [-P ] : DTO Completion Polling: (false)\n");
+ DT_Mdep_printf("USAGE: [-P ] : DTO Completion Polling: (false)\n");
DT_Mdep_printf("USAGE: [-r ] : Use RSPs: (false)\n");
DT_Mdep_printf("USAGE: [-R <service reliability>]\n");
- DT_Mdep_printf
- ("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
+ DT_Mdep_printf("USAGE: (BE == QOS_BEST_EFFORT - Default)\n");
DT_Mdep_printf("USAGE: (HT == QOS_HIGH_THROUGHPUT)\n");
DT_Mdep_printf("USAGE: (LL == QOS_LOW_LATENCY)\n");
DT_Mdep_printf("USAGE: (EC == QOS_ECONOMY)\n");
DT_Mdep_printf("USAGE: : \"RR\" (RDMA READ)\n");
DT_Mdep_printf("USAGE: : \"RW\" (RDMA WRITE)\n");
DT_Mdep_printf("USAGE: [seg_size [num_segs] ] : (4096, 1)\n");
- DT_Mdep_printf
- ("USAGE: [-f] : Reap sends on recv\n");
+ DT_Mdep_printf("USAGE: [-f] : Reap sends on recv\n");
DT_Mdep_printf("USAGE:\n");
DT_Mdep_printf("NOTE: -f is only allowed on \"SR\" OPs\n");
- DT_Mdep_printf
- ("NOTE: -f must appear in pairs (one client, one server)\n");
- DT_Mdep_printf
- ("NOTE: At least one server SR and one client SR OP are required\n");
- DT_Mdep_printf
- ("NOTE: and use of -V results in the use of three extra OPs\n");
+ DT_Mdep_printf("NOTE: -f must appear in pairs (one client, one server)\n");
+ DT_Mdep_printf("NOTE: At least one server SR and one client SR OP are required\n");
+ DT_Mdep_printf("NOTE: and use of -V results in the use of three extra OPs\n");
}
void DT_Transaction_Cmd_Init(Transaction_Cmd_t * cmd)
cmd->eps_per_thread = 1;
cmd->debug = false;
cmd->validate = false;
+ cmd->port = SERVER_PORT_NUMBER;
cmd->ReliabilityLevel = DAT_QOS_BEST_EFFORT;
}
int i;
char op[100];
for (;;) {
- c = DT_mygetopt_r(my_argc, my_argv, "rQVPdw:s:D:i:t:v:R:",
+ c = DT_mygetopt_r(my_argc, my_argv, "rQVPdw:s:D:i:t:v:R:n:",
opts);
if (c == EOF) {
break;
DT_ParseQoS(opts->optarg);
break;
}
+ case 'n':
+ {
+ cmd->port = atoi(opts->optarg);
+ break;
+ }
case '?':
default:
{
DT_Mdep_printf("-------------------------------------\n");
DT_Mdep_printf("TransCmd.server_name : %s\n",
cmd->server_name);
+ DT_Mdep_printf("TransCmd.server_port_number : %d\n",
+ cmd->port);
DT_Mdep_printf("TransCmd.num_iterations : %d\n",
cmd->num_iterations);
DT_Mdep_printf("TransCmd.num_threads : %d\n",
#include "dapl_proto.h"
+#define SERVER_PORT_NUMBER ((DAT_CONN_QUAL)0xB0de)
+
typedef enum
{
RDMA_READ,
int num_threads; //-t
int num_vis; //-v
DAT_QOS ReliabilityLevel; //-R
+ DAT_CONN_QUAL port; /* -n */
} FFT_Cmd_t;
#endif
DAT_UINT32 debug; /* -d */
DAT_UINT32 maximum; /* -m */
DAT_UINT32 Test_List[ LIM_NUM_TESTS ];
+ DAT_CONN_QUAL port; /* -n */
} Limit_Cmd_t;
#pragma pack ()
bool local_is_little_endian;
bool debug;
double cpu_mhz;
+ int server_port;
} Params_t;
#endif
DAT_UINT32 pipeline_len; /* -p */
Performance_Cmd_Op_t op;
DAT_UINT32 use_rsp; /* -r */
+ DAT_CONN_QUAL port; /* -n */
} Performance_Cmd_t;
#pragma pack ()
bool debug; /* -d */
char dapl_name[256]; /* -D device name */
DAT_QOS ReliabilityLevel; /* -R */
+ DAT_CONN_QUAL port; /* -n */
} Server_Cmd_t;
#pragma pack ()
extern Started_server_t *DT_started_server_list;
-#define SERVER_PORT_NUMBER ((DAT_CONN_QUAL)0xB0de)
-
typedef struct
{
DAT_UINT32 dapltest_version;
DAT_UINT32 debug; /* -d */
DAT_UINT32 validate; /* -V */
DAT_UINT32 poll; /* -P */
+ DAT_CONN_QUAL port; /* -n */
char dapl_name[NAME_SZ]; /* -D */
DAT_QOS ReliabilityLevel;
DAT_UINT32 num_ops;
Transaction_Cmd_Op_t op[MAX_OPS];
-} Transaction_Cmd_t;
+ } Transaction_Cmd_t;
#pragma pack ()
#endif
DT_Tdep_PT_Debug(1, (phead, "%s: Connect Endpoint\n", module));
retry:
- ret = dat_ep_connect(ep_handle, server_netaddr, SERVER_PORT_NUMBER, DAT_TIMEOUT_INFINITE, 0, (DAT_PVOID) 0, /* no private data */
+ ret = dat_ep_connect(ep_handle, server_netaddr, params_ptr->server_port, DAT_TIMEOUT_INFINITE, 0, (DAT_PVOID) 0, /* no private data */
params_ptr->ReliabilityLevel,
DAT_CONNECT_DEFAULT_FLAG);
if (ret != DAT_SUCCESS) {
/* Test dat_psp_query function */
else if (object_to_query == QUERY_PSP) {
rc = dat_psp_create(ia_handle,
- SERVER_PORT_NUMBER,
+ params_ptr->server_port,
cr_evd_handle,
DAT_PSP_PROVIDER_FLAG, &psp_handle);
DT_assert_dat(phead, rc == DAT_SUCCESS);
/* Test dat_rsp_query function */
else if (object_to_query == QUERY_RSP) {
rc = dat_rsp_create(ia_handle,
- SERVER_PORT_NUMBER,
+ params_ptr->server_port,
ep_handle, cr_evd_handle, &rsp_handle);
DT_assert_dat(phead, rc == DAT_SUCCESS);
rc = dat_rsp_query(rsp_handle, DAT_RSP_FIELD_ALL, &rsp_param);
DT_assert_dat(phead, rc == DAT_SUCCESS);
/* create a PSP */
- rc = dat_psp_create(conn->ia_handle, SERVER_PORT_NUMBER, conn->cr_evd,
+ rc = dat_psp_create(conn->ia_handle, params_ptr->server_port, conn->cr_evd,
DAT_PSP_CONSUMER_FLAG, &conn->psp_handle);
DT_assert_dat(phead, rc == DAT_SUCCESS);
DT_assert_dat(phead,
DT_cr_event_wait(phead, conn->cr_evd, &conn->cr_stat)
&& DT_cr_check(phead, &conn->cr_stat, conn->psp_handle,
- SERVER_PORT_NUMBER, &conn->cr_handle,
+ params_ptr->server_port, &conn->cr_handle,
"DT_fft_listen"));
/* accept the connection */
/* attempt to connect, timeout = 10 secs */
rc = dat_ep_connect(conn->ep_handle, conn->remote_netaddr,
- SERVER_PORT_NUMBER, 10 * 1000000, 0,
+ params_ptr->server_port, 10 * 1000000, 0,
(DAT_PVOID) 0, DAT_QOS_BEST_EFFORT,
DAT_CONNECT_DEFAULT_FLAG);
DT_assert_dat(phead, rc == DAT_SUCCESS);
goto server_exit;
}
DT_Mdep_LockInit(&ps_ptr->num_clients_lock);
- ps_ptr->NextPortNumber = SERVER_PORT_NUMBER + 1;
+ ps_ptr->NextPortNumber = params_ptr->server_port + 1;
ps_ptr->num_clients = 0;
/* Open the IA */
/* Create PSP */
ret = dat_psp_create(ps_ptr->ia_handle,
- SERVER_PORT_NUMBER,
+ params_ptr->server_port,
ps_ptr->creq_evd_hdl,
DAT_PSP_CONSUMER_FLAG, &ps_ptr->psp_handle);
if (ret != DAT_SUCCESS) {
module));
if (!DT_cr_event_wait(phead, ps_ptr->creq_evd_hdl, &cr_stat)
|| !DT_cr_check(phead, &cr_stat, ps_ptr->psp_handle,
- SERVER_PORT_NUMBER, &cr_handle, module)) {
+ params_ptr->server_port, &cr_handle, module)) {
DT_Tdep_PT_Printf(phead,
"CR Check failed, file %s line %d\n",
pt_ptr->Server_Info.is_little_endian =
DT_local_is_little_endian;
/* reset port, don't eat up port space on long runs */
- if (ps_ptr->NextPortNumber >= SERVER_PORT_NUMBER + 1000)
- ps_ptr->NextPortNumber = SERVER_PORT_NUMBER + 1;
+ if (ps_ptr->NextPortNumber >= params_ptr->server_port + 1000)
+ ps_ptr->NextPortNumber = params_ptr->server_port + 1;
pt_ptr->Server_Info.first_port_number = ps_ptr->NextPortNumber;
ps_ptr->NextPortNumber += pt_ptr->Client_Info.total_threads;