Thread (26 messages) 26 messages, 3 authors, 13d ago

Re: [PATCH v2 net-next 06/14] net: Add per-netns netdev unregistration infra.

From: Paolo Abeni <pabeni@redhat.com>
Date: 2026-07-10 11:11:22

On 7/3/26 2:09 AM, Kuniyuki Iwashima wrote:
When we need to unregister a netdev in a different netns, we will
delegate its unregistration to per-netns work.

There are three types of such cross-netns devices:

  1. Paired devices (e.g., netkit, veth, vxcan)
     -> Unregistering one device also deletes its peer, which
        may reside in another netns.

  2. Tunnel devices (e.g., bareudp, geneve, etc)
     -> Destroying a netns removes devices in another netns if
        their backend sockets reside in the dying netns

  3. Stacked devices (e.g., ipvlan, macvlan, etc)
     -> Removing the lower device also removes multiple upper
        devices, each of which may reside in different namespaces.

In these cases, we will use unregister_netdevice_queue_net() to
queue such potential cross-netns devices for destruction.

Each driver must not call both unregister_netdevice_queue_net()
and unregister_netdevice_queue() for the same device.  See the
subsequent veth/bareudp/ipvlan patches for how they avoid double
queueing.
Only if a repost is needed, possibly avoid the double negation above?

"""
Each driver must exactly call either unregister_netdevice_queue_net() or
unregister_netdevice_queue()...
"""

/P
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help