From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796142930; b=dJCfcE5fZnGqAfDkk6pVRVm5G5oWck1Z1gRb8fP3Pg84IaL3ZAN6D57JF9tCHhas4U2x 2PDFpY2Mo0w9vOWNIEF0uiW2+uZv+4baae2P4T0M+Jv8Yt4Lrce9U4+GeWooP7rkKWPga LnqmmZKbqbscRXy2kciiCJl7GVh/auDp774qtQ3GyZGvbPOVLoBSHrxjpEdCl3dK+98Th +e1pXDENUf2+xKDcSMBsafEsYbi6aCcwZSKUB438aKyHdpjO7VIhwHWknp7uHWHVUoOYD v+8n5/qc1/fhs3rTtsw+4icA7SMEpEnP++dbVMnxddri+moZtNiabFgLQd6jrnQitNA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796142930; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Y5Xc5d51YAV37SUQbaH4ARD33dFKnYHIp8HzUwOwq5A=; b=iJWNl09m0XIN+QKCjEAzmodFarSHzhPui3xqGT1DGxULXR5Kkk08HJ+dWMIX7sSxlF5T ddUsh3E2mp2s25gpsYSkUTbKFgUxlj5Yxqj92Wx931Rk01FX24WYs9nI/Pm7lYrY0XYx3 EVLczgyY8rfGtApFYfHol9lCXRaG2uM+MD82F9Dx9YE3THPFuGFR6XekVDH6HoDZQRRIV y3X9Ky49LY8U3xB9vRLb1ZUsyIRLdGtDK4AyxY0F5j2Q4n7EmGmLKcfNFwRCdZVzErb0m KuwMd89UKOSSqZTnznwLoM8o56pEOd/+eBj6GJ4g6pME9vuIUlXDcl5iZE0k72npnmg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aG5WNMY9; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9C3B606A31A for ; Tue, 1 Dec 2026 16:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aG5WNMY9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 224311F00897; Tue, 1 Dec 2026 16:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796142930; bh=Y5Xc5d51YAV37SUQbaH4ARD33dFKnYHIp8HzUwOwq5A=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=aG5WNMY9jC8Vw2sonA/avBw8jIGD67lXl1q/g173yNX4TDk2O2o/VZsUxDj9/oGap 0RKOnpzJBJgKlyWl+vOKH98a9BXjbvaqsnVw0LLzvVl+px2Rq1X8/ilhrMoX1A+rB7 Zl1LCh2Nvt6Zq1k55lCq5rR4pIbuedyQzT8CvXng7rwVWJeTZ+HCaDbUFW2uHSZifw Vf0hYvNdUxXzNS9ZbvwYshZ7xmWtqLn2rrz8RFZpDItebur/AFnxuOmQkhrQ0sl+ao l6SupAZOydR1rSUd7r9LDgXKcNJmZSHDEozUh3eT8MzFBUytc28+7zlK8x6yydGNWV /JzK6P2NHlsMg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/2] RDMA/cma: introduce rdma_set_iwpm() Reply-To: sashiko-reviews@lists.linux.dev To: "Stefan Metzmacher" Cc: linux-rdma@vger.kernel.org In-Reply-To: <9d31c3e2c2d367582b0b2af7a0988a77cb2a3962.1796142211.git.metze@samba.org> References: <9d31c3e2c2d367582b0b2af7a0988a77cb2a3962.1796142211.git.metze@samba.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 16:35:29 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] RDMA/cma: inaccurate Fixes trailer citing smbdirect refactoring commit -- commit e1aafeb6b3aaee7a856ca4ba5d8afc0232cee4b3 Author: Stefan Metzmacher > RDMA/cma: introduce rdma_set_iwpm() > > If iwpmd is running, iw_cm_map() maps the local port of every > listening and connecting iw_cm_id and, for a connect, asks the > remote iwpmd for the mapped port of the remote listener. > > For kernel users with a well known port, e.g. smbdirect using port > 5445, this can be more harmful than helpful: if the state of the > iwpmd on both sides doesn't match the actual listeners, e.g. because > the listener was created before iwpmd was started, the connection > goes to a mapped port nobody listens on, while it works fine without > iwpmd. > > Add iw_cm_id->skip_iwpm, which makes iw_cm_map() behave as if iwpmd > is not running for this iw_cm_id, and rdma_set_iwpm(), which lets > the upper layer decide whether iwpmd is used for an rdma_cm_id, by > setting iw_cm_id->skip_iwpm for the iw_cm_id used for rdma_listen() > and rdma_connect(). The setting is copied to the per device > listeners created by cma_listen_on_dev(). > > Like rdma_set_afonly() it needs to be called before rdma_listen() or > rdma_resolve_addr(). > > Without iwpmd the port of such an iw_cm_id is not reserved in the port > space of the host, so on iWarp devices sharing the IP addresses of the > host a TCP socket on the same port competes with it, like without > iwpmd running at all. For the well known port of a kernel service > that's what the administrator controls anyway. > > Fixes: dce268ffcddc ("smb: smbdirect: introduce smbdirect_socket_init_{ne= w,accepting}() and helpers") > Cc: stable@vger.kernel.org > Cc: Jason Gunthorpe > Cc: Leon Romanovsky > Cc: Namjae Jeon > Cc: linux-rdma@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Stefan Metzmacher [Severity: Low] Is this Fixes: trailer pointing to the right commit? Commit dce268ffcddc ("smb: smbdirect: introduce smbdirect_socket_init_{new,accepting}() and helpers") only added unused socket initialization helpers in fs/smb/common/smbdirect/smbdirect_socket.c during an smbdirect refactoring. It did not modify RDMA core or introduce the iwpmd port mapping behavior in iw_cm_map(), which dates back to commit b493d91d333e ("iwcm: common code for port mapper"). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/cover.1796142211.gi= t.metze@samba.org?part=3D1