Re: [PATCHv6 net-next 3/4] team: use common function to compute the features

Sabrina Dubroca <[email protected]>
Newsgroups gmane.linux.network.bridge,gmane.linux.network
Message-ID <aPX8xEOcG_b0JQ2P@krikkit>
2025-10-17, 03:41:54 +0000, Hangbin Liu wrote:
> Use the new helper netdev_compute_master_upper_features() to compute the
> team device features. This helper performs both the feature computation
> and the netdev_change_features() call.
> 
> Note that such change replace the lower layer traversing currently done
> using team->port_list with netdev_for_each_lower_dev(). Such change is
> safe as `port_list` contains exactly the same elements as
> `team->dev->adj_list.lower` and the helper is always invoked under the
> RTNL lock.
> 
> With this change, the explicit netdev_change_features() in team_add_slave()
> can be safely removed, as team_port_add() already takes care of the
> notification via netdev_compute_master_upper_features(), and same thing for
> team_del_slave()
> 
> This also fixes missing computations for MPLS, XFRM, and TSO/GSO partial
> features.
> 
> Signed-off-by: Hangbin Liu <[email protected]>
> ---
>  drivers/net/team/team_core.c | 83 +++---------------------------------
>  1 file changed, 6 insertions(+), 77 deletions(-)

Reviewed-by: Sabrina Dubroca <[email protected]>

-- 
Sabrina
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.