[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250215094259.12720-1-kuniyu@amazon.com>
Date: Sat, 15 Feb 2025 18:42:59 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuniyu@...zon.com>
CC: <andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
<horms@...nel.org>, <kuba@...nel.org>, <kuni1840@...il.com>,
<netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH v1 net-next 1/3] pfcp: Convert pfcp_net_exit() to ->exit_batch_rtnl().
From: Kuniyuki Iwashima <kuniyu@...zon.com>
Date: Fri, 14 Feb 2025 17:18:16 +0900
> pfcp_net_exit() holds RTNL and calls unregister_netdevice_queue() for
> dev in the netns.
>
> Let's convert pfcp_net_exit() to ->exit_batch_rtnl to save RTNL dances
> for each netns.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---
> drivers/net/pfcp.c | 27 ++++++++++++++++-----------
> 1 file changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/pfcp.c b/drivers/net/pfcp.c
> index 68d0d9e92a22..5cb8635ada20 100644
> --- a/drivers/net/pfcp.c
> +++ b/drivers/net/pfcp.c
> @@ -244,30 +244,35 @@ static int __net_init pfcp_net_init(struct net *net)
> return 0;
> }
>
> -static void __net_exit pfcp_net_exit(struct net *net)
> +static void __net_exit pfcp_destroy_links(struct net *net,
> + struct list_head *dev_kill_list)
> {
> struct pfcp_net *pn = net_generic(net, pfcp_net_id);
> struct pfcp_dev *pfcp, *pfcp_next;
> struct net_device *dev;
> - LIST_HEAD(list);
>
> - rtnl_lock();
> for_each_netdev(net, dev)
> if (dev->rtnl_link_ops == &pfcp_link_ops)
> - pfcp_dellink(dev, &list);
> + pfcp_dellink(dev, dev_kill_list);
I got a report regarding this part and will post a fix conflicting
with this hunk, so please ignore this series
pw-bot: cr
Powered by blists - more mailing lists