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.

Reply via email to