Re: [PATCH net-next] ppp: enable TX scatter-gather

From: Jakub Kicinski

Date: Tue Sep 16 2025 - 10:57:35 EST


On Tue, 16 Sep 2025 10:57:49 +0800 Qingfang Deng wrote:
> Hi Jakub,
>
> On Tue, Sep 16, 2025 at 9:10 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
> > Seems a bit racy. We can't netdev_update_features() under the spin lock
> > so there's going to be a window of time where datapath will see new
> > state but netdev flags won't be cleared, yet?
> >
> > We either need to add a explicit linearization check in the xmit path,
> > or always reset the flags to disabled before we start tweaking the
> > config and re-enable after config (tho the latter feels like a bit of
> > a hack).
>
> Can I modify dev->features directly under the spin lock (without
> .ndo_fix_features) ?

Hm, I'm not aware of a reason not to. You definitely need to hold
rtnl_lock, and call netdev_update_features() after.