On Sun, Mar 15, 2026 at 04:19:43PM +0000, Simon Horman wrote:
> > diff --git a/net/core/dev.c b/net/core/dev.c
> > index f48dc299e4b2..16b3fc620807 100644
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -8920,6 +8920,9 @@ static int __netdev_upper_dev_link(struct net_device
> > *dev,
> > __netdev_walk_all_upper_dev(upper_dev, __netdev_update_lower_level,
> > priv);
> >
> > + /* re-compute all features after adding link */
> > + netdev_change_features(upper_dev);
> > +
> > return 0;
> >
> > rollback:
>
> Can the feature computation skip updating ancillary fields when features
> don't change?
>
> The new architecture routes computation through netdev_change_features() ->
> __netdev_update_features() -> ndo_set_features(). However,
> __netdev_update_features() has this check:
>
> net/core/dev.c:__netdev_update_features() {
> ...
> if (dev->features == features)
> goto sync_lower;
>
Ah, yes. In the RFC patch set[1], I wanted to use a new ndo_update_offloads
callback to handle offload updates. But in the formal patch, I thought we
could avoid introducing a new callback and use ndo_set_features directly.
However, it looks like we need to fall back to ndo_update_offloads now.
[1] https://lore.kernel.org/netdev/[email protected]/
Thanks
Hangbin