Skip to contentSkip to conversation

smb: server: reset smb_direct_port = SMB_DIRECT_PORT_INFINIBAND on init

PATCH In review Stefan Metzmacher 2 participants 3 messages Dec 8, 2025 – Jan 20

Subsystems (3)
lore
Share & tools
lore

Stefan Metzmacher

author reviewer
#0 lore raw

PATCH 1/1 smb: server: reset smb_direct_port = SMB_DIRECT_PORT_INFINIBAND on init

This allows testing with different devices (iwrap vs. non-iwarp) without 'rmmod ksmbd && modprobe ksmbd', but instead
'ksmbd.control -s && ksmbd.mountd' is enough.

In the long run we want to listen on iwarp and non-iwarp at the same time, but requires more changes, most likely also in the rdma layer.

---
 fs/smb/server/transport_rdma.c | 1 +
 1 file changed, 1 insertion(+)
fs/smb/server/transport_rdma.c +1 -0
index f585359684d4..05f008ea51cd 100644
@@ -2708,6 +2708,7 @@ int ksmbd_rdma_init(void)
 {
 	int ret;
 
+	smb_direct_port = SMB_DIRECT_PORT_INFINIBAND;
 	smb_direct_listener.cm_id = NULL;
 
 	ret = ib_register_client(&smb_direct_ib_client);
Signature · 1 line
2.43.0
author reviewer
#1 lore raw

Hi Namjae,

can this be merged? It makes testing between roce and iwarp much easier.

I have infrastructure to listen on both iwarp and roce at the same time, but I haven't written the patches for ksmbd.ko to use it. I'll hopefully find the time in the next days.

Thanks!
metze

Am 08.12.25 um 16:49 schrieb Stefan Metzmacher:

Quoted 29 lines

This allows testing with different devices (iwrap vs. non-iwarp) without 'rmmod ksmbd && modprobe ksmbd', but instead
'ksmbd.control -s && ksmbd.mountd' is enough.

In the long run we want to listen on iwarp and non-iwarp at the same time, but requires more changes, most likely also in the rdma layer.

---
  fs/smb/server/transport_rdma.c | 1 +
  1 file changed, 1 insertion(+)
fs/smb/server/transport_rdma.c +1 -0
index f585359684d4..05f008ea51cd 100644
@@ -2708,6 +2708,7 @@ int ksmbd_rdma_init(void)
  {
  	int ret;
 
+	smb_direct_port = SMB_DIRECT_PORT_INFINIBAND;
  	smb_direct_listener.cm_id = NULL;
 
  	ret = ib_register_client(&smb_direct_ib_client);
maintainer
#2 lore raw
Quoted 5 lines · Stefan Metzmacher

Hi Namjae,

can this be merged? It makes testing between roce and iwarp much easier.

Looks ok. Applied it to #ksmbd-for-nex-next.

Quoted 5 lines

I have infrastructure to listen on both iwarp and roce at the same time, but I haven't written the patches for ksmbd.ko to use it. I'll hopefully find the time in the next days.

I also hope it will be supported soon.
Thanks!

Quoted 36 lines

Thanks!
metze

Am 08.12.25 um 16:49 schrieb Stefan Metzmacher:

Quoted 29 lines

This allows testing with different devices (iwrap vs. non-iwarp) without 'rmmod ksmbd && modprobe ksmbd', but instead
'ksmbd.control -s && ksmbd.mountd' is enough.

In the long run we want to listen on iwarp and non-iwarp at the same time, but requires more changes, most likely also in the rdma layer.

---
  fs/smb/server/transport_rdma.c | 1 +
  1 file changed, 1 insertion(+)
fs/smb/server/transport_rdma.c +1 -0
index f585359684d4..05f008ea51cd 100644
@@ -2708,6 +2708,7 @@ int ksmbd_rdma_init(void)
  {
      int ret;
 
+     smb_direct_port = SMB_DIRECT_PORT_INFINIBAND;
      smb_direct_listener.cm_id = NULL;
 
      ret = ib_register_client(&smb_direct_ib_client);