Skip to content

Commit 219b326

Browse files
dickmanmaorSaeed Mahameed
authored andcommitted
net/mlx5e: Fix check if netdev is bond slave
Bond events handler uses bond_slave_get_rtnl to check if net device is bond slave. bond_slave_get_rtnl return the rcu rx_handler pointer from the netdev which exists for bond slaves but also exists for devices that are attached to linux bridge so using it as indication for bond slave is wrong. Fix by using netif_is_lag_port instead. Fixes: 7e51891 ("net/mlx5e: Use netdev events to set/del egress acl forward-to-vport rule") Signed-off-by: Maor Dickman <maord@nvidia.com> Reviewed-by: Raed Salem <raeds@nvidia.com> Reviewed-by: Ariel Levkovich <lariel@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 6248ce9 commit 219b326

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core/en/rep

drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static bool mlx5e_rep_is_lag_netdev(struct net_device *netdev)
187187
struct mlx5e_priv *priv;
188188

189189
/* A given netdev is not a representor or not a slave of LAG configuration */
190-
if (!mlx5e_eswitch_rep(netdev) || !bond_slave_get_rtnl(netdev))
190+
if (!mlx5e_eswitch_rep(netdev) || !netif_is_lag_port(netdev))
191191
return false;
192192

193193
priv = netdev_priv(netdev);

0 commit comments

Comments
 (0)