Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Stefan Metzmacher <metze@samba.org>
To: Paulo Alcantara <pc@manguebit.org>, Namjae Jeon <linkinjeon@kernel.org>
Cc: metze@samba.org, Jason Gunthorpe <jgg@ziepe.ca>,
	Leon Romanovsky <leon@kernel.org>, Tom Talpey <tom@talpey.com>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: [PATCH 0/2] smb: smbdirect: don't use the iWarp port mapper
Date: Tue,  1 Dec 2026 17:27:10 +0100	[thread overview]
Message-ID: <cover.1796142211.git.metze@samba.org> (raw)

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


             reply	other threads:[~2026-12-01 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 16:27 Stefan Metzmacher [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1796142211.git.metze@samba.org \
    --to=metze@samba.org \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=pc@manguebit.org \
    --cc=samba-technical@lists.samba.org \
    --cc=stable@vger.kernel.org \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox