diff options
author | Albert Huang <huangjie.albert@bytedance.com> | 2023-10-11 15:48:51 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-13 16:52:02 -0700 |
commit | c68681ae46eaaa1640b52fe366d21a93b2185df5 (patch) | |
tree | 9543a488783dfe6d8fcd717b69d5a01e95525a5f /net/smc/smc_ib.h | |
parent | tcp: allow again tcp_disconnect() when threads are waiting (diff) | |
download | linux-c68681ae46eaaa1640b52fe366d21a93b2185df5.tar.gz linux-c68681ae46eaaa1640b52fe366d21a93b2185df5.tar.bz2 linux-c68681ae46eaaa1640b52fe366d21a93b2185df5.zip |
net/smc: fix smc clc failed issue when netdevice not in init_net
If the netdevice is within a container and communicates externally
through network technologies such as VxLAN, we won't be able to find
routing information in the init_net namespace. To address this issue,
we need to add a struct net parameter to the smc_ib_find_route function.
This allow us to locate the routing information within the corresponding
net namespace, ensuring the correct completion of the SMC CLC interaction.
Fixes: e5c4744cfb59 ("net/smc: add SMC-Rv2 connection establishment")
Signed-off-by: Albert Huang <huangjie.albert@bytedance.com>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Link: https://lore.kernel.org/r/20231011074851.95280-1-huangjie.albert@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/smc/smc_ib.h')
-rw-r--r-- | net/smc/smc_ib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_ib.h b/net/smc/smc_ib.h index 4df5f8c8a0a1..ef8ac2b7546d 100644 --- a/net/smc/smc_ib.h +++ b/net/smc/smc_ib.h @@ -112,7 +112,7 @@ void smc_ib_sync_sg_for_device(struct smc_link *lnk, int smc_ib_determine_gid(struct smc_ib_device *smcibdev, u8 ibport, unsigned short vlan_id, u8 gid[], u8 *sgid_index, struct smc_init_info_smcrv2 *smcrv2); -int smc_ib_find_route(__be32 saddr, __be32 daddr, +int smc_ib_find_route(struct net *net, __be32 saddr, __be32 daddr, u8 nexthop_mac[], u8 *uses_gateway); bool smc_ib_is_valid_local_systemid(void); int smcr_nl_get_device(struct sk_buff *skb, struct netlink_callback *cb); |