Re: [PATCH net-next v3 1/5] net: add ndo_update_offloads for offload computation

From
Sabrina Dubroca <sd@queasysnail.net>
Date
2026-03-17 15:14:40
Also in
bridge, lkml
Reply to
Hangbin Liu, 2026-03-16
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
(2 flags since netdev_compute_master_upper_features takes a bool
argument) that changes __netdev_update_features()'s behavior? Since
the goal for the netdev_compute_master_upper_features() work was to
make this code more common, not introducing a new ndo where random
hacks can accumulate separately in each driver would maybe make more
sense?

-- 
Sabrina
Thread (15 messages) 15 messages, 4 authors, last reply 2026-03-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help