NFS over soft iWARP setup

From Linux NFS

Revision as of 17:33, 7 June 2022 by Chucklever (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Soft iWARP is a software implementation of RFC 5040, RFC 5041, and RFC 5042 that allows RDMA to be used on any Ethernet adapter using TCP. It is available in Linux kernels after 5.4. The following instructions are suitable for most of the latest Linux distributions.


Client and Server Common Setup

  • Check for the siw kernel module. If you don't have it, then enable the following Kconfig options and rebuild your kernel
  • Install the iproute2 package and use the rdma link add command to load the module and start an RDMA interface. If "eth0" is your local Ethernet interface:
[foo@linux-bar ~]$ sudo rdma link add siw0 type siw netdev eth0
[foo@linux-bar ~]$ sudo rdma link
link siw0/1 state ACTIVE physical_state LINK_UP netdev eth0

The siw virtual device does not survive reboots. Add it to system startup scripts so that it is instantiated automatically after every system restart.

Ping Test

  • Start an rping server on one machine
[foo@linux-bar ~]$ sudo rping -s -v -C 3
server ping data: rdma-ping-0: ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr
server ping data: rdma-ping-1: BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs
server ping data: rdma-ping-2: CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst
wait for RDMA_READ_ADV state 10
  • Now check that the connection works from another machine
[foo@linux-bor ~]$ sudo rping -c -a -v -C 3
ping data: rdma-ping-0: ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr
ping data: rdma-ping-1: BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs
ping data: rdma-ping-2: CDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst

NFS Setup


  • Install the nfs-utils package and enable rdma from /etc/nfs.conf and restart service nfs-server
[foo@linux-bar]$ sudo sed -i '/rdma/{s/^#//; s/rdma=n/rdma=y/}' /etc/nfs.conf
[foo@linux-bar]$ grep -v ^# /etc/nfs.conf
[foo@linux-bar]$ sudo mkdir -p /expdir
[foo@linux-bar]$ sudo bash -c 'echo "/expdir *(rw,no_root_squash)" >/etc/exports'
[foo@linux-bar]$ sudo systemctl restart nfs-server


  • Install the nfs-utils package and do nfs mount
  • Mount the server to check that it worked
[foo@linux-bor]$ sudo mount -o rdma /mnt/nfsmp
[foo@linux-bor]$ mount | grep proto=rdma on /mnt/nfsmp type nfs4 (rw,relatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,hard,proto=rdma,port=20049,timeo=600,retrans=2,sec=sys,clientaddr=,local_lock=none,addr=

See Also

Personal tools