summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.h
diff options
context:
space:
mode:
authorTony Lu <tonylu@linux.alibaba.com>2021-12-28 21:06:09 +0800
committerDavid S. Miller <davem@davemloft.net>2022-01-02 12:07:39 +0000
commit0237a3a683e4844ddc52782d83d439d6192e11f9 (patch)
treef31c1820d9158bee3ff826d6b83350517fc672e8 /net/smc/smc_core.h
parente63a02348958cd7cc8c8401c94de57ad97b5d06c (diff)
downloadlinux-0237a3a683e4844ddc52782d83d439d6192e11f9.tar.bz2
net/smc: Introduce net namespace support for linkgroup
Currently, rdma device supports exclusive net namespace isolation, however linkgroup doesn't know and support ibdev net namespace. Applications in the containers don't want to share the nics if we enabled rdma exclusive mode. Every net namespaces should have their own linkgroups. This patch introduce a new field net for linkgroup, which is standing for the ibdev net namespace in the linkgroup. The net in linkgroup is initialized with the net namespace of link's ibdev. It compares the net of linkgroup and sock or ibdev before choose it, if no matched, create new one in current net namespace. If rdma net namespace exclusive mode is not enabled, it behaves as before. Signed-off-by: Tony Lu <tonylu@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r--net/smc/smc_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
index d63b08274197..1e4e90faf657 100644
--- a/net/smc/smc_core.h
+++ b/net/smc/smc_core.h
@@ -306,6 +306,8 @@ struct smc_link_group {
u8 nexthop_mac[ETH_ALEN];
u8 uses_gateway;
__be32 saddr;
+ /* net namespace */
+ struct net *net;
};
struct { /* SMC-D */
u64 peer_gid;