[PATCH dpdk v2 0/3] net/tap: add network namespace support

Stephen Hemminger stephen at networkplumber.org
Mon Oct 27 22:55:55 CET 2025


On Mon, 27 Oct 2025 19:19:27 +0100
Robin Jarry <rjarry at redhat.com> 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.
> 
> The implementation falls back to ioctl when netlink is unavailable,
> preserving compatibility with older kernels.
> 
> Tested by moving TAP interfaces between namespaces while running
> testpmd. All link operations continue to work transparently after
> namespace changes.
> 
> v2: completely removed ioctl-based implementation
> 
> Robin Jarry (3):
>   net/tap: add netlink helpers
>   net/tap: replace ioctl with netlink
>   net/tap: detect namespace change
> 
>  drivers/net/tap/rte_eth_tap.c | 412 +++++++++++++++++++---------------
>  drivers/net/tap/rte_eth_tap.h |   5 +-
>  drivers/net/tap/tap_netlink.c | 291 ++++++++++++++++++++++++
>  drivers/net/tap/tap_netlink.h |  10 +-
>  4 files changed, 534 insertions(+), 184 deletions(-)
> 

Any documentation or release notes?


More information about the dev mailing list