Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librdmacm/cmtime: Add multi-thread support #1451

Merged
merged 17 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
librdmacm/cmtime: Add option to control number of threads
Add a command line argument to set the number of threads
assigned to a work queue.

Signed-off-by: Sean Hefty <[email protected]>
  • Loading branch information
Sean Hefty committed Apr 23, 2024
commit 79ab39af1b052863f09a735c57b836b3710661e6
6 changes: 5 additions & 1 deletion librdmacm/examples/cmtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ int main(int argc, char **argv)

hints.ai_port_space = RDMA_PS_TCP;
hints.ai_qp_type = IBV_QPT_RC;
while ((op = getopt(argc, argv, "s:b:c:m:p:q:r:t:")) != -1) {
while ((op = getopt(argc, argv, "s:b:c:m:n:p:q:r:t:")) != -1) {
switch (op) {
case 's':
dst_addr = optarg;
Expand All @@ -784,6 +784,9 @@ int main(int argc, char **argv)
mimic_qp_delay = (uint32_t) atoi(optarg);
mimic = true;
break;
case 'n':
num_threads = (uint32_t) atoi(optarg);
break;
case 'r':
retries = atoi(optarg);
break;
Expand All @@ -798,6 +801,7 @@ int main(int argc, char **argv)
printf("\t[-p port_number]\n");
printf("\t[-q base_qpn]\n");
printf("\t[-m mimic_qp_delay_us]\n");
printf("\t[-n num_threads]\n");
printf("\t[-r retries]\n");
printf("\t[-t timeout_ms]\n");
exit(EXIT_FAILURE);
Expand Down
5 changes: 5 additions & 0 deletions librdmacm/man/cmtime.1
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ The server's port number.
The first QP number to use when creating connections without allocating
hardware QPs. The test will use the values between base_qpn and base_qpn
plus connections when connecting. (default 1000)
.TP
\-n num_threads
Sets the number of threads to spawn used to process connection events
and hardware operations. (default 1)
.TP
\-m mimic_qp_delay_us
"Simulates" QP creation and modify calls by replacing them with a
simple sleep function instead. This allows testing the CM at larger
Expand Down