]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:38:50 +0000 (13:38 +0100)
commit2d09b8116ebd656b0a685ad4d21c1d199193fe64
treec6199a556ddc8a8e2027ad03f2b1794c3d232eae
parentf0fe498b86acb41f686294958b38dc26122d6d0f
net/mlx5e: Fix check if netdev is bond slave

[ Upstream commit 219b3267ca102a35092f5998921a9e6f99074af2 ]

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: 7e51891a237f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c