NFSTEST_RDMA(1)

πŸ’– NFSTEST_RDMA πŸ’–

okay bestie, welcome to nfstest_rdma from the nfstest_rdma 1.1 era β€” the manual page that's about to make you obsessed with NFS-over-RDMA functional testing. grab a snack, we're doing this πŸ“


✨ NAME ✨

nfstest_rdma β€” NFS-over-RDMA functional tests. that's the whole vibe. it tests stuff over RDMA. slay.


🌸 SYNOPSIS 🌸

nfstest_rdma --server <server> [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

Verify correct functionality of NFS-over-RDMA. literally the whole point.

Remote Direct Memory Access (RDMA) provides fast data transfers between servers and storage. NFS over RDMA is best used when a large amount of data needs to be transferred with higher performance than regular NFS. NFS over RDMA is usually used over InfiniBand which provides higher performance and a lower latency.

Although NFS over RDMA is mostly used over InfiniBand, Ethernet could be used as the link protocol as well. RDMA over Converged Ethernet (RoCE) which allows RDMA over Ethernet by encapsulating the InfiniBand transport packet over Ethernet. RoCE provides a couple of variants: RoCEv1 and RoCEv2. One is RoCEv1 which is an Ethernet link layer protocol and provides RDMA functionality between two hosts in the same Ethernet broadcast domain. While the second is RoCEv2 or RRoCE (Remote RoCE) which is an internet layer protocol so these packets can be routed. RoCEv2 runs over UDP/IPv4 or UDP/IPv6. There is also another variant called iWARP which runs over the TCP protocol. Testing is currently supported for all of these variants except for iWARP.

NFS over RDMA has a couple of extra layers in the packet: InfiniBand layer and RPC-over-RDMA or RPCoRDMA layer. The InfiniBand layer contains the OpCode which specifies the type of RDMA operation to perform and the PSN which is the packet sequence number. The RPCoRDMA layer contains the XID and the RDMA chunk lists. The RDMA read chunk list is used to transfer DDP (Direct Data Placement) data from the NFS client to the server, e.g., NFS write call. On the other hand, the RDMA write chunk list is used to transfer DDP data from the NFS server back to the client, e.g., NFS read reply. Only certain NFS operations can be transferred using DDP and only the opaque part of the operation is transferred using either RDMA reads or writes while the rest of the NFS packet is transferred via the receive buffer using the RDMA SEND operation. Finally, the RDMA reply chunk is used to transfer replies having a variable length reply which could be larger than the receive buffer and could not be transferred using the write chunk list because it does not contain a single large opaque item.

Tests are divided into three groups: basic, read and write. The basic tests deal mostly with verifying NFS packets using the reply chunk and some other basic RDMA functionality. The read tests deal with verifying NFS read which in turn verify the RDMA write functionality. Finally, the write tests deal with verifying NFS write which in turn verify the RDMA read functionality. Also, if the NFS read or write is small enough the client could not use the RDMA write or read functionality, but instead could use the receive buffer and transfer the data using the RDMA SEND operations.

Tests verify the RPCoRDMA layer is sent when necessary and that the RDMA chunk lists are sent with the correct information which includes the number of chunks, number of segments in each chunk and the correct information for each segment. Tests verify each segment information is correct and their corresponding RDMA read or write information which includes correct handle, virtual offset, DMA length and the XDR position for the case of RDMA reads. In addition, the correct number of RDMA I/O fragments is also verified and their corresponding lengths and packet sequence numbers.


πŸ’… OPTIONS πŸ’…

  • --version β€” show program's version number and exit ✨
  • -h, --help β€” show this help message and exit 🫢
  • -f FILE, --file=FILE β€” File where options are specified besides the system wide file /etc/nfstest, user wide file $HOME/.nfstest or in the current directory .nfstest file

🌈 NFS specific options:

  • -s SERVER, --server=SERVER β€” Server name or IP address
  • -e EXPORT, --export=EXPORT β€” Exported file system to mount [default: '/']
  • --nfsversion=NFSVERSION β€” NFS version, e.g., 3, 4, 4.1, etc. [default: 4.1]
  • -m MTPOINT, --mtpoint=MTPOINT β€” Mount point [default: '/mnt/t']
  • -p PORT, --port=PORT β€” NFS server port [default: 20049]
  • --proto=PROTO β€” NFS protocol name [default: 'rdma']
  • --sec=SEC β€” Security flavor [default: 'sys']
  • --nconnect=NCONNECT β€” Multiple TCP connections option [default: '1']
  • -o MTOPTS, --mtopts=MTOPTS β€” Mount options [default: 'hard']
  • --datadir=DATADIR β€” Data directory where files are created, directory is created on the mount point [default: '']

πŸŽ€ Logging options:

  • -v VERBOSE, --verbose=VERBOSE β€” Verbose level for debug messages [default: 'opts|info|dbg1|dbg2|dbg3']
  • --tverbose=TVERBOSE β€” Verbose level for test messages [default: '1']
  • --createlog β€” Create log file
  • --rexeclog β€” Create rexec log files
  • --warnings β€” Display warnings
  • --tag=TAG β€” Informational tag, it is displayed as an INFO message [default: '']
  • --notty β€” Do not use terminal colors on output
  • --isatty β€” Use terminal colors on output β€” useful when running with nohup

πŸ”₯ Packet trace options:

  • --createtraces β€” Create a packet trace for each test
  • --tbsize=TBSIZE β€” Capture buffer size for tcpdump [default: 192k]
  • --trcdelay=TRCDELAY β€” Seconds to delay before stopping packet trace [default: 2.0]
  • --keeptraces β€” Do not remove any trace files [default: remove trace files if no errors]
  • --rmtraces β€” Remove trace files [default: remove trace files if no errors]
  • -i INTERFACE, --interface=INTERFACE β€” Device interface [default: automatically selected]

🧚 File options:

  • --nfiles=NFILES β€” Number of files to create [default: 0]
  • --filesize=FILESIZE β€” File size to use for test files [default: 64k]
  • --rsize=RSIZE β€” Read size to use when reading files [default: 4k]
  • --wsize=WSIZE β€” Write size to use when writing files [default: 4k]
  • --iodelay=IODELAY β€” Seconds to delay I/O operations [default: 0.1]
  • --offset-delta=OFFSET_DELTA β€” Read/Write offset delta [default: 4k]

⭐ Path options:

  • --sudo=SUDO β€” Full path of binary for sudo [default: '/usr/bin/sudo']
  • --kill=KILL β€” Full path of binary for kill [default: '/usr/bin/kill']
  • --nfsstat=NFSSTAT β€” Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
  • --tcpdump=TCPDUMP β€” Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
  • --iptables=IPTABLES β€” Full path of binary for iptables [default: '/usr/sbin/iptables']
  • --messages=MESSAGES β€” Full path of log messages file [default: '/var/log/messages']
  • --trcevents=TRCEVENTS β€” Full path of tracing events directory [default: '/sys/kernel/debug/tracing/events']
  • --trcpipe=TRCPIPE β€” Full path of trace pipe file [default: '/sys/kernel/debug/tracing/trace_pipe']
  • --tmpdir=TMPDIR β€” Temporary directory [default: '/tmp']

πŸ’œ Debug options:

  • --nocleanup β€” Do not cleanup created files
  • --notimestamps β€” Do not display timestamps in debug messages
  • --bugmsgs=BUGMSGS β€” File containing test messages to mark as bugs if they failed
  • --nomount β€” Do not mount server and run the tests on local disk space
  • --basename=BASENAME β€” Base name for all files and logs [default: automatically generated]
  • --nfsdebug=NFSDEBUG β€” Set NFS kernel debug flags and save log messages [default: '']
  • --rpcdebug=RPCDEBUG β€” Set RPC kernel debug flags and save log messages [default: '']
  • --tracepoints=TRACEPOINTS β€” List of trace points modules to enable [default: '']
  • --nfsstats β€” Get NFS stats [default: 'False']
  • --pktdisp β€” Display main packets related to the given test
  • --nfserrors β€” Fail every NFS error found in the packet trace
  • --client-ipaddr=CLIENT_IPADDR β€” IP address of localhost

πŸ’– Reporting options:

  • --xunit-report β€” Generate xUnit compatible test report
  • --xunit-report-file=XUNIT_REPORT_FILE β€” Path to xout report file

🌸 Test options:

  • --runtest=RUNTEST β€” Comma separated list of tests to run, if list starts with a '^' then all tests are run except the ones listed [default: 'all']
  • --small-filesize=SMALL_FILESIZE β€” File size to use for small files [default: 4k]
  • --large-filesize=LARGE_FILESIZE β€” File size to use for large files [default: 1m]
  • --strict β€” Mark warnings for missing fragments as failures [default: False]

πŸŽ€ TESTS πŸŽ€

🌟 basic

Run all NFS-over-RDMA basic functionality tests: basic01, basic02, basic03, basic04, basic05

🌟 basic01

Verify basic NFS-over-RDMA functionality

🌟 basic02

Verify NFS-over-RDMA reply chunk on EXCHANGE_ID/SETCLIENTID

🌟 basic03

Verify NFS-over-RDMA reply chunk on READDIR

🌟 basic04

Verify NFS-over-RDMA reply chunk on READLINK

🌟 basic05

Verify NFS-over-RDMA reply chunk on GETATTR(FATTR4_ACL)

πŸ¦‹ read

Run all NFS-over-RDMA functionality tests where file is opened for reading: read01, read02, read03, read04

πŸ¦‹ read01

Verify NFS-over-RDMA functionality on a file opened for reading (very small file)

πŸ¦‹ read02

Verify NFS-over-RDMA functionality on a file opened for reading (small file)

πŸ¦‹ read03

Verify NFS-over-RDMA functionality on a file opened for reading (medium file)

πŸ¦‹ read04

Verify NFS-over-RDMA functionality on a file opened for reading (large file)

πŸ’… write

Run all NFS-over-RDMA functionality tests where file is opened for writing: write01, write02, write03, write04

πŸ’… write01

Verify NFS-over-RDMA functionality on a file opened for writing (very small file)

πŸ’… write02

Verify NFS-over-RDMA functionality on a file opened for writing (small file)

πŸ’… write03

Verify NFS-over-RDMA functionality on a file opened for writing (medium file)

πŸ’… write04

Verify NFS-over-RDMA functionality on a file opened for writing (large file)

πŸ‘‘

πŸ‘‘ all

Run all tests: basic01, basic02, basic03, basic04, basic05, read01, read02, read03, read04, write01, write02, write03, write04


✨ EXAMPLES ✨

The only required option is --server

$ nfstest_rdma --server 192.168.0.11

🫢 NOTES 🫢

The user id in the local host must have access to run commands as root using the 'sudo' command without the need for a password.

bestie we are not done yet, there's more coming so stay tuned πŸ’–βœ¨

πŸ’– SEE ALSO πŸ’–

okay so if you wanna go deeper (and bestie, you know you do), here's the whole friend group 🫢 go say hi to:

like literally a whole little ecosystem of pages, iykyk ✨


πŸ’€ BUGS πŸ’€

no known bugs. not a single one. she's flawless, she's iconic, she ate and left zero crumbs πŸ‘‘

ngl that's the flex of the century, fr fr 😭✨

πŸ‘‘ AUTHOR πŸ‘‘

Jorge Mora (mora@netapp.com)


and that's a wrap on NFSTEST_RDMA(1) bestie!! πŸŽ€βœ¨ this masterpiece is from NFStest 3.2, dated 21 March 2023, and it lives in section 1 where all the good stuff hangs out. go forth, run your RDMA tests, and slay πŸ’…πŸŒˆπŸ¦‹