On Thu, 30 Oct 2025 18:55:39 +0100 Robin Jarry <[email protected]> wrote:
> The TAP driver currently uses ioctl operations which are name-based and > namespace-unaware. When an interface is moved to another namespace, the > driver loses control and cannot track the device. > > This series migrates to netlink-based interface control using ifindex > instead of names, making operations namespace-safe. When an interface > moves to another namespace, the driver detects RTM_DELLINK, queries the > new namespace using TUNGETDEVNETNS, and recreates netlink sockets in > that namespace to maintain control. > > Tested by moving TAP interfaces between namespaces while running > testpmd. All link operations continue to work transparently after > namespace changes. > > v4: added TUNSETCARRIER support after moving to another netns > > v3: added release notes > > v2: completely removed ioctl-based implementation > > Robin Jarry (4): > net/tap: add netlink helpers > net/tap: replace ioctl with netlink > net/tap: detect namespace change > net/tap: configure link carrier > > doc/guides/rel_notes/release_25_11.rst | 7 + > drivers/net/tap/rte_eth_tap.c | 437 +++++++++++++++---------- > drivers/net/tap/rte_eth_tap.h | 5 +- > drivers/net/tap/tap_netlink.c | 291 ++++++++++++++++ > drivers/net/tap/tap_netlink.h | 10 +- > 5 files changed, 566 insertions(+), 184 deletions(-) > Queued to next-net

