Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH 0/2] smb: smbdirect: don't use the iWarp port mapper
@ 2026-12-01 16:27 Stefan Metzmacher
  2026-12-01 16:27 ` [PATCH 1/2] RDMA/cma: introduce rdma_set_iwpm() Stefan Metzmacher
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stefan Metzmacher @ 2026-12-01 16:27 UTC (permalink / raw)
  To: Paulo Alcantara, Namjae Jeon
  Cc: metze, Jason Gunthorpe, Leon Romanovsky, Tom Talpey, linux-cifs,
	samba-technical, linux-rdma, linux-kernel, stable

Hi Paulo, hi Namjae, hi Jason, hi Leon,

  - "RDMA/cma: introduce rdma_set_iwpm()" lets the upper layer decide
    whether the iWarp port mapper is used for an rdma_cm_id. If iwpmd
    is running, every listening and connecting iWarp cm_id gets its
    port mapped, and a connect asks the remote iwpmd for the mapped
    port of the remote listener. For kernel users with a well known
    port, like smbdirect with port 5445, that's more harmful than
    helpful: if the iwpmd state on both sides doesn't match the actual
    listeners, e.g. a listener created before iwpmd was started, the
    connection goes to a mapped port nobody listens on, while it works
    fine without iwpmd.

  - smbdirect uses rdma_set_iwpm(false), so iWarp devices always listen
    on and connect to the requested port 5445.

Jason, Leon: the first patch is needed by the smbdirect change, so I'd
like to take it through the smb tree with your Ack, if that's fine
with you, like "RDMA/core: introduce rdma_restrict_node_type()" for
v7.0.

These patches were developed with the help of Claude (Anthropic),
which was used for code analysis, writing parts of the code and the
commit messages. I reviewed all changes and take full responsibility
for them.

Testing: two hosts with Intel E810 (irdma) in iWARP mode and iwpmd
running on both. Without the patches iwpmd mapped the port of ksmbd's
listener on 5445 and the connect of the client. With the patches
neither side gets an iwpmd mapping and the mount connects to 5445,
also with an unpatched client against a patched server. smbdirect
over iWARP (cxgb4, irdma, siw) has also been running with these
patches in our test setup since October, there without iwpmd.

Base: paulo-linux/cifs-next (f5ed6b20ad03), the patches also apply
cleanly to linux-rdma/for-next (a8671ee9bde1).

Stefan Metzmacher (2):
  RDMA/cma: introduce rdma_set_iwpm()
  smb: smbdirect: don't use the iWarp port mapper

 drivers/infiniband/core/cma.c      | 22 ++++++++++++++++++++++
 drivers/infiniband/core/cma_priv.h |  1 +
 drivers/infiniband/core/iwcm.c     |  7 +++++++
 fs/smb/smbdirect/socket.c          | 12 ++++++++++++
 include/rdma/iw_cm.h               |  1 +
 include/rdma/rdma_cm.h             | 17 +++++++++++++++++
 6 files changed, 60 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-01 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 16:27 [PATCH 0/2] smb: smbdirect: don't use the iWarp port mapper Stefan Metzmacher
2026-12-01 16:27 ` [PATCH 1/2] RDMA/cma: introduce rdma_set_iwpm() Stefan Metzmacher
2026-12-01 16:35   ` sashiko-bot
2026-12-01 16:27 ` [PATCH 2/2] smb: smbdirect: don't use the iWarp port mapper Stefan Metzmacher
2026-12-01 16:35 ` [PATCH 0/2] " sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox