]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix check if netdev is bond slave
authorMaor Dickman <maord@nvidia.com>
Wed, 4 Nov 2020 12:10:30 +0000 (14:10 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 17 Nov 2020 19:50:52 +0000 (11:50 -0800)
commit4e29b53adabc246ee2d3e1b6aa51dba898211a1e
tree5bceb77c038368393a4ac62ec70723f13532d98e
parentcc551a741c3732d9d47f72c0d188b271721e83fb
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: cd799ce99d84 ("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>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c