[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250108090244.28324-1-kuniyu@amazon.com>
Date: Wed, 8 Jan 2025 18:02:44 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <shaw.leon@...il.com>
CC: <andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
<horms@...nel.org>, <kuba@...nel.org>, <kuni1840@...il.com>,
<kuniyu@...zon.com>, <laforge@...monks.org>, <netdev@...r.kernel.org>,
<pabeni@...hat.com>, <pablo@...filter.org>
Subject: Re: [PATCH v1 net 2/3] gtp: Destroy device along with udp socket's netns dismantle.
From: Xiao Liang <shaw.leon@...il.com>
Date: Wed, 8 Jan 2025 16:55:16 +0800
> On Wed, Jan 8, 2025 at 2:29 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
> [...]
> > @@ -2480,6 +2480,11 @@ static void __net_exit gtp_net_exit_batch_rtnl(struct list_head *net_list,
> > list_for_each_entry(net, net_list, exit_list) {
> > struct gtp_net *gn = net_generic(net, gtp_net_id);
> > struct gtp_dev *gtp, *gtp_next;
> > + struct net_device *dev;
> > +
> > + for_each_netdev(net, dev)
> > + if (dev->rtnl_link_ops == >p_link_ops)
> > + gtp_dellink(dev, dev_to_kill);
>
> I'm not sure, but do we usually have to clean up devices
> in the netns being deleted? Seems default_device_ops
> can handle it.
default_device_ops handles netns dismantle, but we still
need this because the module is unloadable.
I have a patch that moves default_device_ops stuff after
some ->exit_batch_rtnl() to save one RTNL dance, which will
make it clear when default_device_ops is executed.
Powered by blists - more mailing lists