Skip to content

net/tap: add network namespace support

Robin Jarry dpdk-dev 4 versions – Applied

Status from this message: Queued to next-net

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyApplied
  2. v33 patches 0 repliesSuperseded
  3. v23 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches3 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4net/tap: add netlink helpersdrivers/net/tap/tap_netlink.c drivers/net/tap/tap_netlink.h+299 -20 replies
2/4net/tap: replace ioctl with netlinkdoc/guides/rel_notes/release_25_11.rst drivers/net/tap/rte_eth_tap.c drivers/net/tap/rte_eth_tap.h+129 -1790 replies
3/4net/tap: detect namespace changedoc/guides/rel_notes/release_25_11.rst drivers/net/tap/rte_eth_tap.c+114 -30 replies
4/4net/tap: configure link carrierdrivers/net/tap/rte_eth_tap.c+24 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH dpdk v4 0/4] net/tap: add network namespace support

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(-)
Signature · 1 line
2.51.1