Skip to contentSkip to conversation

fstests: add an option for testing nfs over rdma

PATCH New Jeff Layton 1 participant 1 message Mar 1, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fstests: add an option for testing nfs over rdma

This adds a new Kconfig option for testing NFS over RDMA.

---
 playbooks/roles/fstests/defaults/main.yml        | 1 +
 playbooks/roles/fstests/templates/nfs/nfs.config | 7 +++++++
 playbooks/roles/nfsd/templates/nfs.conf.j2       | 1 +
 workflows/fstests/nfs/Kconfig                    | 8 ++++++++
 workflows/fstests/nfs/Makefile                   | 3 +++
 5 files changed, 20 insertions(+)
playbooks/roles/fstests/defaults/main.yml +1 -0
index b0d9e0da1732..170819d9b2f7 100644
@@ -156,6 +156,7 @@ fstests_btrfs_section_simple_zns: False
 
 fstests_nfs_enable: False
 fstests_nfs_use_kdevops_nfsd: False
+fstests_nfs_section_rdma: False
 fstests_nfs_section_tls: False
 fstests_nfs_section_default: False
 fstests_nfs_section_v42: False
playbooks/roles/fstests/templates/nfs/nfs.config +7 -0
index f301075a8928..b5c90534f4df 100644
@@ -10,6 +10,13 @@ SCRATCH_DEV="{{ fstests_nfs_scratch_devpool }}"
 RESULT_BASE=$PWD/results/$HOST/$(uname -r)
 TEST_DEV={{ fstests_nfs_test_dev }}
 CANON_DEVS=yes
+{% if fstests_nfs_section_rdma -%}
+
+# Test over RDMA
+[nfs_rdma]
+TEST_FS_MOUNT_OPTS="-o rdma"
+MOUNT_OPTIONS="-o rdma"
+{% endif %}
 {% if fstests_nfs_section_tls -%}
 
 # Test NFS with RPC over TLS
playbooks/roles/nfsd/templates/nfs.conf.j2 +1 -0
index 2396f4297014..464c3704438d 100644
@@ -1,5 +1,6 @@
 [nfsd]
 udp=y
+rdma=y
 threads={{ nfsd_threads }}
 grace-time={{ nfsd_lease_time }}
 lease-time={{ nfsd_lease_time }}
workflows/fstests/nfs/Kconfig +8 -0
index f9526b375cf7..09637138d8ca 100644
@@ -46,6 +46,14 @@ config FSTESTS_NFS_MANUAL_COVERAGE
 
 if FSTESTS_NFS_MANUAL_COVERAGE
 
+config FSTESTS_NFS_SECTION_RDMA
+	bool "Enable testing section: nfs_rdma"
+	default n
+	help
+	  Enabling this will test with the "rdma" mount option. Unless the
+	  hosts have RDMA hardware already, you probably also want to enable
+	  CONFIG_KDEVOPS_SETUP_SIW as well.
+
 config FSTESTS_NFS_SECTION_TLS
 	bool "Enable testing section: nfs_tls"
 	default n
workflows/fstests/nfs/Makefile +3 -0
index 686e27ae68a4..a12570f700b8 100644
@@ -9,6 +9,9 @@ FSTESTS_ARGS += fstests_nfs_server_host='$(FSTESTS_NFS_SERVER_HOST)'
 ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_DEFAULT))
 FSTESTS_ARGS += fstests_nfs_section_default=True
 endif
+ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_RDMA))
+FSTESTS_ARGS += fstests_nfs_section_rdma=True
+endif
 ifeq (y,$(CONFIG_FSTESTS_NFS_SECTION_TLS))
 FSTESTS_ARGS += fstests_nfs_section_tls=True
 endif
Signature · 1 line
2.43.2