w180112 / RDMA-example

RDMA programming example
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link
rdma

RDMA programming example

BSD license

Send 2 numbers to server then send back the sum

System required:

RDMA capable NIC, OFED driver with libverbs and librdmacm.

How to use:

Git clone this repository at both client and server

# git clone https://github.com/w180112/RDMA-example.git

Set iptables to make UDP port 4791 open

On client side,

# gcc -o client rdma_write_client.c -lrdmacm -libverbs
# ./client <servername or ip> <val1> <val2>

e.g.

# ./client 192.168.0.168 123 456

On server side,

# gcc -o server rdma_write_server.c -lrdmacm -libverbs
# ./server

Test environment

  1. Mellanox Connectx-4 Lx with SRIOV enable
  2. Rocky Linux 9.2, with kernel 5.14.0-284.11.1.el9_2.x86_64