public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: Jay Vosburgh <jv@jvosburgh.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Ido Schimmel <idosch@nvidia.com>, Simon Horman <horms@kernel.org>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bridge@lists.linux.dev
Subject: Re: [PATCH net-next v3 1/5] net: add ndo_update_offloads for offload computation
Date: Thu, 19 Mar 2026 00:29:25 +0100	[thread overview]
Message-ID: <abs1VWLQVmXcWESQ@krikkit> (raw)
In-Reply-To: <abn8qFyE7pDuM4oN@fedora>

2026-03-18, 01:15:20 +0000, Hangbin Liu wrote:
> On Tue, Mar 17, 2026 at 04:14:35PM +0100, Sabrina Dubroca wrote:
> > 2026-03-16, 12:26:09 +0800, Hangbin Liu wrote:
> > > Add a new ndo_update_offloads callback to net_device_ops that allows
> > > devices to compute and update their offload features during feature
> > > updates.
> > > 
> > > This callback enables master devices to recompute their features
> > > based on current slave device configuration. This is particularly
> > > useful for bonding, bridging, team, and failover devices that need
> > > to aggregate features from their lower devices.
> > > 
> > > The callback is optional and only implemented by devices that need
> > > dynamic offload feature computation.
> > 
> > Maybe a dumb idea (and sorry to suggest this quite late in your
> > submissions): since all implementations of this callback are only
> > calling netdev_compute_master_upper_features(), does this need to be a
> > new ndo, or could this be some kind of flag within struct net_device
> 
> Ideally all dev with IFF_MASTER should re-compute the offload. But at present
> some master devices do have this flag, or have their own offload
> implementation.
> 
> Do you mean add a new private flag, like IFF_RECOMPUTE_OFFLOAD? For the second
> parameter, maybe we can pass false for bridge specifically.

I hadn't thought specifically about where to store that flag. As a
private flag, why not (this should be internal to the kernel, so not a
uapi flag like IFF_MASTER), but priv_flags is marked as "hotpath" now,
so maybe something similar to needs_free_netdev or
netns_immutable. Either way, then devices are free to do their own
magic, or request the core to call
netdev_compute_master_upper_features() for them in some common
locations. Does that makes sense?

-- 
Sabrina

  reply	other threads:[~2026-03-18 23:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16  4:26 [PATCH net-next v3 0/5] net: centralize master device offload feature computation Hangbin Liu
2026-03-16  4:26 ` [PATCH net-next v3 1/5] net: add ndo_update_offloads for offload computation Hangbin Liu
2026-03-17 15:14   ` Sabrina Dubroca
2026-03-18  1:15     ` Hangbin Liu
2026-03-18 23:29       ` Sabrina Dubroca [this message]
2026-03-19  2:02         ` Hangbin Liu
2026-03-16  4:26 ` [PATCH net-next v3 2/5] net: use ndo_update_offloads to set offload features for bonding/bridge/team Hangbin Liu
2026-03-19  9:16   ` [net-next,v3,2/5] " Paolo Abeni
2026-03-16  4:26 ` [PATCH net-next v3 3/5] macsec: move netdev_upper_dev_link() after macsec_changelink_common() Hangbin Liu
2026-03-17 11:58   ` Sabrina Dubroca
2026-03-16  4:26 ` [PATCH net-next v3 4/5] failover: use ndo_update_offloads for failover offload compute Hangbin Liu
2026-03-16  4:26 ` [PATCH net-next v3 5/5] net: no need to disable LRO specifically Hangbin Liu
2026-03-19  9:52 ` [PATCH net-next v3 0/5] net: centralize master device offload feature computation Paolo Abeni
2026-03-19 13:37   ` Hangbin Liu
2026-03-19 16:01   ` Jakub Kicinski

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=abs1VWLQVmXcWESQ@krikkit \
    --to=sd@queasysnail.net \
    --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=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --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