Re: [RFC PATCH 1/2] RDMA/rxe: drive UDP tunnel socket lifetime from the GID table
From: Jason Gunthorpe
Date: Sat Jul 18 2026 - 11:41:34 EST
On Sat, Jul 18, 2026 at 05:26:41PM +0300, Serhat Kumral wrote:
> I first tried the literal reading, one bound socket per GID entry,
> but real addresses get in the way: default GIDs derived from the MAC
> are not bindable addresses, IPv6 GIDs are added while still tentative
> so bind() fails and nothing re-adds them after DAD, and multicast RX
> cannot match address-bound sockets. So this version keeps the
> wildcard sockets as they are today and only moves their lifetime to
> add_gid/del_gid, which is where the actual bugs were.
That is unfortunate, but this still a big step forward.
FWIW the tx side also looks really weird, it creates a sock per QP in
the init_net but that can't be right. It seems to me it should be
sending using the per-GID socket instead.. That's nothing to do with
this series though
> The pernet exit hook survives in a reduced form, as a backstop only:
> event-triggered GID removal is asynchronous, so a netns can be gone
> before the last del_gid runs (most easily by moving the netdev to
> another netns and deleting the old one), and something has to close
> the kernel sockets before the net they live in is freed.
Don't get this, GID removal is asynchronous, so it will eventually
complete, what is wrong with leaving the socks around but unsuable for
a little bit? Does something break?
Jason