DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH dpdk 0/4] net/tap: add network namespace support
@ 2025-10-27 15:37 Robin Jarry
  2025-10-27 15:37 ` [PATCH dpdk 1/4] net/tap: add netlink helpers Robin Jarry
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Robin Jarry @ 2025-10-27 15:37 UTC (permalink / raw)
  To: dev

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.

Robin Jarry (4):
  net/tap: add netlink helpers
  net/tap: rename internal ioctl wrapper
  net/tap: use netlink if possible
  net/tap: detect namespace change

 drivers/net/tap/rte_eth_tap.c | 316 ++++++++++++++++++++++++++++------
 drivers/net/tap/rte_eth_tap.h |   2 +-
 drivers/net/tap/tap_netlink.c | 291 +++++++++++++++++++++++++++++++
 drivers/net/tap/tap_netlink.h |  10 +-
 4 files changed, 565 insertions(+), 54 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-10-27 22:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-27 15:37 [PATCH dpdk 0/4] net/tap: add network namespace support Robin Jarry
2025-10-27 15:37 ` [PATCH dpdk 1/4] net/tap: add netlink helpers Robin Jarry
2025-10-27 15:37 ` [PATCH dpdk 2/4] net/tap: rename internal ioctl wrapper Robin Jarry
2025-10-27 15:37 ` [PATCH dpdk 3/4] net/tap: use netlink if possible Robin Jarry
2025-10-27 16:06   ` Stephen Hemminger
2025-10-27 16:10     ` Robin Jarry
2025-10-27 16:58       ` Stephen Hemminger
2025-10-27 15:37 ` [PATCH dpdk 4/4] net/tap: detect namespace change Robin Jarry
2025-10-27 18:19 ` [PATCH dpdk v2 0/3] net/tap: add network namespace support Robin Jarry
2025-10-27 18:19   ` [PATCH dpdk v2 1/3] net/tap: add netlink helpers Robin Jarry
2025-10-27 18:19   ` [PATCH dpdk v2 2/3] net/tap: replace ioctl with netlink Robin Jarry
2025-10-27 18:19   ` [PATCH dpdk v2 3/3] net/tap: detect namespace change Robin Jarry
2025-10-27 21:55   ` [PATCH dpdk v2 0/3] net/tap: add network namespace support Stephen Hemminger
2025-10-27 22:16 ` [PATCH dpdk v3 " Robin Jarry
2025-10-27 22:16   ` [PATCH dpdk v3 1/3] net/tap: add netlink helpers Robin Jarry
2025-10-27 22:16   ` [PATCH dpdk v3 2/3] net/tap: replace ioctl with netlink Robin Jarry
2025-10-27 22:16   ` [PATCH dpdk v3 3/3] net/tap: detect namespace change Robin Jarry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).