[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250521153107.150f01e1@kernel.org>
Date: Wed, 21 May 2025 15:31:07 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Stanislav Fomichev <stfomichev@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, skalluru@...vell.com, manishc@...vell.com,
andrew+netdev@...n.ch, michael.chan@...adcom.com,
pavan.chebbi@...adcom.com, ajit.khaparde@...adcom.com,
sriharsha.basavapatna@...adcom.com, somnath.kotur@...adcom.com,
anthony.l.nguyen@...el.com, przemyslaw.kitszel@...el.com,
tariqt@...dia.com, saeedm@...dia.com, louis.peens@...igine.com,
shshaikh@...vell.com, GR-Linux-NIC-Dev@...vell.com, ecree.xilinx@...il.com,
horms@...nel.org, dsahern@...nel.org, ruanjinjie@...wei.com,
mheib@...hat.com, linux-kernel@...r.kernel.org,
intel-wired-lan@...ts.osuosl.org, linux-rdma@...r.kernel.org,
oss-drivers@...igine.com, linux-net-drivers@....com, leon@...nel.org
Subject: Re: [PATCH net-next 2/3] udp_tunnel: remove rtnl_lock dependency
On Wed, 21 May 2025 09:54:03 -0700 Stanislav Fomichev wrote:
> > > enum udp_tunnel_nic_info_flags {
> > > - /* Device callbacks may sleep */
> > > - UDP_TUNNEL_NIC_INFO_MAY_SLEEP = BIT(0),
> >
> > Could we use a different lock for sleeping and non-sleeping drivers?
>
> We can probably do it if we reorder the locks (as you ask/suggest
> below). Overall, I'm not sure I understand why we want to have two
> paths here. If we can do everything via work queue, why have a separate
> path for the non-sleepable callback? (more code -> more bugs)
I think when I was pulling this code out of the drivers I was trying
to preserve the fast path for drivers which don't have to sleep.
But if some drivers are okay with the wq then the mechanism must work,
so I guess you're right, it should be fine to make all go via wq.
Powered by blists - more mailing lists