public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Simon Horman <horms@kernel.org>
Cc: jv@jvosburgh.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, davem@davemloft.net, sd@queasysnail.net,
	andrew+netdev@lunn.ch, pabeni@redhat.com,
	sridhar.samudrala@intel.com, jiri@resnulli.us,
	bridge@lists.linux.dev, edumazet@google.com, kuba@kernel.org,
	razor@blackwall.org, idosch@nvidia.com
Subject: Re: [net-next,v2,1/4] net: use ndo_set_features to set offload features for bonding/bridge/team
Date: Mon, 16 Mar 2026 01:02:01 +0000	[thread overview]
Message-ID: <abdWiYhu4IOldqtE@fedora> (raw)
In-Reply-To: <20260315161943.1419237-1-horms@kernel.org>

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/20260226114208.27774-1-liuhangbin@gmail.com/

Thanks
Hangbin

  reply	other threads:[~2026-03-16  1:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13  3:03 [PATCH net-next v2 0/4] net: move netdev_compute_master_upper_features to ndo_set_features Hangbin Liu
2026-03-13  3:03 ` [PATCH net-next v2 1/4] net: use ndo_set_features to set offload features for bonding/bridge/team Hangbin Liu
2026-03-15 16:19   ` [net-next,v2,1/4] " Simon Horman
2026-03-16  1:02     ` Hangbin Liu [this message]
2026-03-13  3:03 ` [PATCH net-next v2 2/4] macsec: move netdev_upper_dev_link() after macsec_changelink_common() Hangbin Liu
2026-03-13  3:03 ` [PATCH net-next v2 3/4] failover: use ndo_set_features for failover offload compute Hangbin Liu
2026-03-13  3:03 ` [PATCH net-next v2 4/4] net: no need to disable LRO specifically Hangbin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abdWiYhu4IOldqtE@fedora \
    --to=liuhangbin@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=sd@queasysnail.net \
    --cc=sridhar.samudrala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox