[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250324190411.52096-1-kuniyu@amazon.com>
Date: Mon, 24 Mar 2025 12:03:49 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <idosch@...sch.org>
CC: <davem@...emloft.net>, <dsahern@...nel.org>, <edumazet@...gle.com>,
<horms@...nel.org>, <kuba@...nel.org>, <kuni1840@...il.com>,
<kuniyu@...zon.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>,
<petrm@...dia.com>
Subject: Re: [PATCH v2 net-next 0/7] nexthop: Convert RTM_{NEW,DEL}NEXTHOP to per-netns RTNL.
From: Ido Schimmel <idosch@...sch.org>
Date: Mon, 24 Mar 2025 11:35:04 +0200
> On Wed, Mar 19, 2025 at 04:06:45PM -0700, Kuniyuki Iwashima wrote:
> > Patch 1 - 5 move some validation for RTM_NEWNEXTHOP so that it can be
> > called without RTNL.
> >
> > Patch 6 & 7 converts RTM_NEWNEXTHOP and RTM_DELNEXTHOP to per-netns RTNL.
> >
> > Note that RTM_GETNEXTHOP and RTM_GETNEXTHOPBUCKET are not touched in
> > this series.
> >
> > rtm_get_nexthop() can be easily converted to RCU, but rtm_dump_nexthop()
> > needs more work due to the left-to-right rbtree walk, which looks prone
> > to node deletion and tree rotation without a retry mechanism.
>
> Thanks for the series, looks good, but note that dump/get can block when
> fetching hardware statistics:
Oh thanks!
I was puzzled by the left-right rbtree iteration under RCU and wondering
if I should try harder, but converting the notifier to non-blocking one
is not worth that, and I can simply use per-netns RTNL :)
>
> rtm_get_nexthop
> nh_fill_node
> nla_put_nh_group
> nla_put_nh_group_stats
> nh_grp_hw_stats_update
> blocking_notifier_call_chain
Powered by blists - more mailing lists