On Tue, Mar 10, 2026 at 03:05:17AM +0100, Zhu Yanjun wrote: > After introducing dellink handling and per-net namespace management > for IPv4 and IPv6 sockets, extend rxe to create and destroy RDMA links > within each network namespace. > > With this change, RDMA links can be instantiated both in init_net and > in other network namespaces. The lifecycle of the RDMA link is now tied > to the corresponding namespace and is properly cleaned up when the > namespace or link is removed. > > This ensures rxe behaves correctly in multi-namespace environments and > keeps socket and RDMA link resources consistent across namespace > creation and teardown. > > Signed-off-by: Zhu Yanjun <[email protected]> > --- > drivers/infiniband/sw/rxe/rxe.c | 38 +++++++- > drivers/infiniband/sw/rxe/rxe_net.c | 145 +++++++++++++++++++++------- > drivers/infiniband/sw/rxe/rxe_net.h | 9 +- > 3 files changed, 146 insertions(+), 46 deletions(-)
<...> > +#define SK_REF_FOR_TUNNEL 2 <...> > +#undef SK_REF_FOR_TUNNEL We typically place defines at the beginning of a file and avoid undefining them. The undef directive is mainly used when a macro is defined inside a function. Thanks
