Scroll to navigation

NFSTEST_RDMA(1) nfstest_rdma 1.1 NFSTEST_RDMA(1)

NAME

nfstest_rdma - NFS-over-RDMA functional tests

SYNOPSIS

nfstest_rdma --server <server> [options]

DESCRIPTION

Verify correct functionality of NFS-over-RDMA

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

show program's version number and exit
show this help message and exit
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:

Server name or IP address
Exported file system to mount [default: '/']
NFS version, e.g., 3, 4, 4.1, etc. [default: 4.1]
Mount point [default: '/mnt/t']
NFS server port [default: 20049]
NFS protocol name [default: 'rdma']
Security flavor [default: 'sys']
Multiple TCP connections option [default: '1']
Mount options [default: 'hard']
Data directory where files are created, directory is created on the mount point [default: '']

Logging options:

Verbose level for debug messages [default: 'opts|info|dbg1|dbg2|dbg3']
Verbose level for test messages [default: '1']
Create log file
Create rexec log files
Display warnings
Informational tag, it is displayed as an INFO message [default: '']
Do not use terminal colors on output
Use terminal colors on output -- useful when running with nohup

Packet trace options:

Create a packet trace for each test
Capture buffer size for tcpdump [default: 192k]
Seconds to delay before stopping packet trace [default: 2.0]
Do not remove any trace files [default: remove trace files if no errors]
Remove trace files [default: remove trace files if no errors]
Device interface [default: automatically selected]

File options:

Number of files to create [default: 0]
File size to use for test files [default: 64k]
Read size to use when reading files [default: 4k]
Write size to use when writing files [default: 4k]
Seconds to delay I/O operations [default: 0.1]
Read/Write offset delta [default: 4k]

Path options:

Full path of binary for sudo [default: '/usr/bin/sudo']
Full path of binary for kill [default: '/usr/bin/kill']
Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
Full path of binary for iptables [default: '/usr/sbin/iptables']
Full path of log messages file [default: '/var/log/messages']
Full path of tracing events directory [default: '/sys/kernel/debug/tracing/events']
Full path of trace pipe file [default: '/sys/kernel/debug/tracing/trace_pipe']
Temporary directory [default: '/tmp']

Debug options:

Do not cleanup created files
Do not display timestamps in debug messages
File containing test messages to mark as bugs if they failed
Do not mount server and run the tests on local disk space
Base name for all files and logs [default: automatically generated]
Set NFS kernel debug flags and save log messages [default: '']
Set RPC kernel debug flags and save log messages [default: '']
List of trace points modules to enable [default: '']
Get NFS stats [default: 'False']
Display main packets related to the given test
Fail every NFS error found in the packet trace
IP address of localhost

Reporting options:

Generate xUnit compatible test report
Path to xout report file

Test options:

Comma separated list of tests to run, if list starts with a '^' then all tests are run except the ones listed [default: 'all']
File size to use for small files [default: 4k]
File size to use for large files [default: 1m]
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.

SEE ALSO

formatstr(3), nfstest.test_util(3), nfstest_alloc(1), nfstest_cache(1), nfstest_delegation(1), nfstest_dio(1), nfstest_fcmp(1), nfstest_file(1), nfstest_interop(1), nfstest_io(1), nfstest_lock(1), nfstest_pkt(1), nfstest_pnfs(1), nfstest_posix(1), nfstest_sparse(1), nfstest_ssc(1), nfstest_xattr(1), nfstest_xid(1), packet.application.rpc_const(3), packet.application.rpcordma_const(3), packet.nfs.nfs3_const(3), packet.nfs.nfs4_const(3), packet.transport.ib(3), packet.transport.rdmap(3)

BUGS

No known bugs.

AUTHOR

Jorge Mora (mora@netapp.com)

21 March 2023 NFStest 3.2