Re: [PATCH net] net: flow_offload: protect driver_block_list in flow_block_cb_setup_simple()

From: Jakub Kicinski

Date: Fri Feb 13 2026 - 11:18:10 EST


On Fri, 13 Feb 2026 12:30:58 +0100 Florian Westphal wrote:
> > > Looking at the *upper layer*, I don't think it expected drivers to use
> > > a single global list for this bit something that is scoped to the
> > > net_device.
> >
> > Maybe subjective but the fix seems a little off to me.
> > Isn't flow_block_cb_setup_simple() just a "simple" implementation
> > for reuse in drivers locking in there doesn't really guarantee much?
>
> Not sure what you mean. I see the same pattern as netdevsim in all
> drivers using this API.

Grep for flow_block_cb_add(). Not all drivers use
the flow_block_cb_setup_simple() helper, it's just a convenience helper,
not a mandatory part of the flow. We should probably add a helper for
add like the one added for flow_block_cb_remove_driver() instead of
taking the lock directly in flow_block_cb_setup_simple()?