From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=144.76.82.148 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796142459; b=vgC+8hP/CBOY9s9UDIGvSWPIzFkXT/kmo73WpQDjq35ELthtwFaes0K5QiQVzHnsKl4z 1nCv/7lu+2aieTkbMd0XPXcHKhvUfy169BxzLYcZQjaYhpEc67rywvp2vGDa4gBQEs4bn 8zR5g6mh3E/NkMheXPkIJqtYguSkXb62QvHDoZlZUKVFSTcFUqijQ8ApckuvoHGvrLf+h bK4uVutX5BEibMI+3s174LUQhF+WLwb3Yqx7RpUKEWbgSWjC4iWxfXHuzjZmG8kpPJGHq KOAiFi7OiI1+9aUhJmXDQyiHWOpbUZwrXPaR36yj2/B7rEbLwbNpeODJmAooQcok4FQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796142459; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=tuR2p5QjKfRO4WQ18YmUjwnQhXWzxLk/D2xcUc+lpoM=; b=2Gt2I3GfUqdtKqiICklZ8K82u4ZyQiJ1YryPDdpTRwh1DCVfZGH5l7zlqjP2/pgtQ25j OydFeLH/orGx3zpy21y1uclCiXkl3YrfVdAVwxHWQpB9kQVcZ//yW/kV1VnrqWu4ANeDy OsopPPXVc/TPo2c6/Z21+o65KsujtxGCITjGE9I3ILLpIplW5NXXvaLh+V2xoFhmKfORe DJuptPFbrAWcly7+bwmpRucJWMbOUmWzis0WynogrIYKqu0XIHIDmul5ka+zYcxVz6B9S 7J7YEgeWcaww5JcpBcYwfxMvWXrBsPADAP+MMScrWXp/WX+UTOxiHVX4eiU8SLaT8rA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=samba.org; spf=pass smtp.mailfrom=samba.org; dkim=pass header.d=samba.org header.i=@samba.org header.a=rsa-sha256 header.s=42 header.b=dRpfpgQ3; arc=none smtp.remote-ip=144.76.82.148 Received: from hr2.samba.org (hr2.samba.org [144.76.82.148]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E312606A33E; Tue, 1 Dec 2026 16:27:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1E312606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=samba.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samba.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=samba.org header.i=@samba.org header.a=rsa-sha256 header.s=42 header.b=dRpfpgQ3 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Message-ID:Date:Cc:To:From; bh=tuR2p5QjKfRO4WQ18YmUjwnQhXWzxLk/D2xcUc+lpoM=; b=dRpfpgQ3pcbX+UFwLKaW2gezKq lL7aSoHrLWmboCzwgQ1+FBVpVTvu5lxcnhNDD8fyh6EgIu6NTQu6DZA90x92HJXISDoZiALcwlVjY QrXfWGTo0KMLHFMwPgfpR131/2IIhKPLY7B6yocrh5bEGse4wZ6D14AqBVRqveItThG7RzpsZJmkQ 6xvMWOHtm3T/8w2hA/nqM505feoFym6Qsle/F4VMsoL7z4VEDHXpHCyTtHn+dwD8OHFlQsXr4CPj/ OCcONXJqbgMfix0me86q2zEwQsMFMaC70VzwIg/VpsFSKguidZkc0FC88njMpDqK/mAOF7m+ci68I mm+COKJVo6TeijhAxmH6MdA1i2zIrG6QOwKkaSMUqDDN2eLCgt+FSTgOwmnuiJrXbNeXpVVAAxOy8 sUr9zTmwnupR5I3Dt/+nOQluovJgvL8+fWLPdUxk6xbE6DXkrQfOODFzL2fMX00q3WIYoalPAV9uF aYdRvHPiTAIzRq4yTc3Ardwg; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__ECDSA_SECP256R1_SHA256__CHACHA20_POLY1305:256) (Exim) id 1xYQhK-00000000Lqz-1Pie; Tue, 01 Dec 2026 16:27:18 +0000 From: Stefan Metzmacher To: Paulo Alcantara , Namjae Jeon Cc: metze@samba.org, Jason Gunthorpe , Leon Romanovsky , Tom Talpey , 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 Message-ID: X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-cifs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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