Skip to content

RDMA device net namespace support for SMC

Tony Lu linux-api linux-rdma linux-s390 netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net/smc: Introduce net namespace support for linkgroupnet/smc/smc_core.c net/smc/smc_core.h net/smc/smc_ib.h +1 more+42 -120 repliesApplied
2/4net/smc: Add netlink net namespace supportinclude/uapi/linux/smc.h include/uapi/linux/smc_diag.h net/smc/smc_core.c +1 more+20 -125 repliesApplied
3/4net/smc: Print net namespace in lognet/smc/smc_core.c net/smc/smc_llc.c+14 -90 repliesApplied
4/4net/smc: Add net namespace for tracepointsnet/smc/smc_tracepoint.h+16 -70 repliesApplied

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchKarsten Graul
1/4
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] RDMA device net namespace support for SMC

This patch set introduces net namespace support for linkgroups.

Path 1 is the main approach to implement net ns support.

Path 2 - 4 are the additional modifications to let us know the netns. Also, I will submit changes of smc-tools to github later.

Currently, smc doesn't support net namespace isolation. The ibdevs registered to smc are shared for all linkgroups and connections. When running applications in different net namespaces, such as container environment, applications should only use the ibdevs that belongs to the same net namespace.

This adds a new field, net, in smc linkgroup struct. During first contact, it checks and find the linkgroup has same net namespace, if not, it is going to create and initialized the net field with first link's ibdev net namespace. When finding the rdma devices, it also checks the sk net device's and ibdev's net namespaces. After net namespace destroyed, the net device and ibdev move to root net namespace, linkgroups won't be matched, and wait for lgr free.

If rdma net namespace exclusive mode is not enabled, it behaves as before.

Steps to enable and test net namespaces:

1. enable RDMA device net namespace exclusive support rdma system set netns exclusive # default is shared

2. create new net namespace, move and initialize them ip netns add test1
rdma dev set mlx5_1 netns test1
ip link set dev eth2 netns test1
ip netns exec test1 ip link set eth2 up
ip netns exec test1 ip addr add ${HOST_IP}/26 dev eth2

3. setup server and client, connect N <-> M

	ip netns exec test1 smc_run sockperf server --tcp # server
	ip netns exec test1 smc_run sockperf pp --tcp -i ${SERVER_IP} # client

4. netns isolated linkgroups (2 * 2 mesh) with their own linkgroups
- server

LG-ID    LG-Role  LG-Type  VLAN  #Conns  PNET-ID
00000100 SERV     SINGLE      0       0
00000200 SERV     SINGLE      0       0
00000300 SERV     SINGLE      0       0
00000400 SERV     SINGLE      0       0

- client

LG-ID    LG-Role  LG-Type  VLAN  #Conns  PNET-ID
00000100 CLNT     SINGLE      0       0
00000200 CLNT     SINGLE      0       0
00000300 CLNT     SINGLE      0       0
00000400 CLNT     SINGLE      0       0

Tony Lu (4):
net/smc: Introduce net namespace support for linkgroup net/smc: Add netlink net namespace support net/smc: Print net namespace in log
net/smc: Add net namespace for tracepoints

 include/uapi/linux/smc.h      |  2 ++
 include/uapi/linux/smc_diag.h | 11 ++++++-----
 net/smc/smc_core.c            | 31 ++++++++++++++++++++++---------
 net/smc/smc_core.h            |  2 ++
 net/smc/smc_diag.c            | 16 +++++++++-------
 net/smc/smc_ib.h              |  7 +++++++
 net/smc/smc_llc.c             | 19 ++++++++++++-------
 net/smc/smc_pnet.c            | 21 ++++++++++++++++-----
 net/smc/smc_tracepoint.h      | 23 ++++++++++++++++-------
 9 files changed, 92 insertions(+), 40 deletions(-)
Signature · 1 line
2.32.0.3.g01195cf9f