rdma-core icon indicating copy to clipboard operation
rdma-core copied to clipboard

verbs: Add RDMA write RC pingpong test

Open animesh-kishore opened this issue 1 year ago • 3 comments

  • The test pingpongs data between server and client instance using RC QPs with RDMA write BTH opcode.
  • For RDMA write, there's no completion at responder. Hence, we send a sideband ACK(using socket) from requester side on completion. This indicates to responder that it has received data.

Check available test arguments and help: ./build/bin/ibv_rc_wr_pingpong -h

e.g. Run server instance: ./build/bin/ibv_rc_wr_pingpong -g 0 -d <ib_dev> -c -s 8192

Run client instance: ./build/bin/ibv_rc_wr_pingpong -g 0 -d <ib_dev> -c -s 8192 <server_IP>

animesh-kishore avatar Apr 27 '23 06:04 animesh-kishore

Below checkpatch warning regarding line length can be ignored. It would not be a good idea to split printf string.

/usr/bin/python3 /__w/1/s/buildlib/azp-checkpatch
0001-verbs-Add-RDMA-write-RC-pingpong-test.patch:733: WARNING: line length of 108 exceeds 100 columns
#733: FILE: libibverbs/examples/rc_wr_pingpong.c:674:
+	printf("  local: RKEY 0x%08x, ADDR 0x%016" PRIxPTR ", LID 0x%04x, QPN 0x%06x, PSN 0x%06x, GID %s\n",

0001-verbs-Add-RDMA-write-RC-pingpong-test.patch:745: WARNING: line length of 109 exceeds 100 columns
#745: FILE: libibverbs/examples/rc_wr_pingpong.c:686:
+	printf("  remote: RKEY 0x%08x, ADDR 0x%016" PRIxPTR ", LID 0x%04x, QPN 0x%06x, PSN 0x%06x, GID %s\n",

##[warning]libibverbs/examples/rc_wr_pingpong.c(674,): warning : line length of 108 exceeds 100 columns
##[warning]libibverbs/examples/rc_wr_pingpong.c(686,): warning : line length of 109 exceeds 100 columns
Finishing: checkpatch

animesh-kishore avatar Apr 29 '23 15:04 animesh-kishore

We see various pingpong applications as legacy and usually don't merge such PRs like this one.

rleon avatar May 02 '23 09:05 rleon

Pingpong applications are actually quite helpful for new users. Helps demonstrate complete flow and API usages. Works as a reference to build IBverbs production applications which are typically in C/C++.

Also, RDMA write works quite differently from send/recv. Hence, extendng rc_pingpong.c to support RDMA write seems like overkill.

animesh-kishore avatar May 02 '23 13:05 animesh-kishore