RFC RDMA/smbdirect: introduce and use rdma_restrict_node_type()
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | RDMA/core: introduce rdma_restrict_node_type()drivers/ drivers/ include/ | +48 | 1 reply | |
| 2/3 | smb: client: make use of rdma_restrict_node_type()fs/ | +26 | 0 replies | |
| 3/3 | smb: server: make use of rdma_restrict_node_type()fs/ | +80 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Leon Romanovsky | Namjae Jeon |
|---|---|---|
| Series | A-b | |
| 1/3 | A-b | |
| 2/3 | ||
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 0/3] RDMA/smbdirect: introduce and use rdma_restrict_node_type()
Hi,
for smbdirect it required to use different ports depending on the RDMA protocol. E.g. for iWarp 5445 is needed (as tcp port 445 already used by the raw tcp transport for SMB), while InfiniBand, RoCEv1 and RoCEv2 use port 445, as they use an independent port range (even for RoCEv2, which uses udp port 4791 itself).
Currently ksmbd is not able to function correctly at all if the system has iWarp (RDMA_NODE_RNIC) interface(s) and any InfiniBand, RoCEv1 and/or RoCEv2 interface(s) at the same time.
And cifs.ko uses 5445 with a fallback to 445, which means depending on the available interfaces, it tries 5445 in the RoCE range or may tries iWarp with 445 as a fallback. This leads to strange error messages and strange network captures.
To avoid these problems they will be able to
use rdma_restrict_node_type(RDMA_NODE_RNIC) before trying port 5445 and rdma_restrict_node_type(RDMA_NODE_IB_CA) before trying port 445. It means we'll get early -ENODEV early from rdma_resolve_addr() without any network traffic and timeouts.
This is marked as RFC as I want to get feedback if the rdma_restrict_node_type() function is acceptable for the RDMA layer. And because the current form of the smb patches are not tested, I only tested the rdma part with my branch the prepares IPPROTO_SMBDIRECT sockets.
I'm not sure if this would be acceptable for 6.19 in order to avoid the smb layer problems, if the RDMA layer change is only acceptable for 7.0 that's also fine.
This is based on the following fix applied:
smb: server: reset smb_direct_port = SMB_DIRECT_PORT_INFINIBAND on init
https://lore.kernel.org/linux-cifs/[email protected]/
It's not yet in Linus' tree, so if this gets ready
before it's merged we can squash it.
Stefan Metzmacher (3):
RDMA/core: introduce rdma_restrict_node_type()
smb: client: make use of rdma_restrict_node_type()
smb: server: make use of rdma_restrict_node_type()
drivers/infiniband/core/cma.c | 30 ++++++++ drivers/infiniband/core/cma_priv.h | 1 + fs/smb/client/smbdirect.c | 26 +++++++ fs/smb/server/transport_rdma.c | 108 +++++++++++++++++++++-------- include/rdma/rdma_cm.h | 17 +++++ 5 files changed, 154 insertions(+), 28 deletions(-)
Signature · 1 line
2.43.0