summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorwenxu <wenxu@ucloud.cn>2019-05-15 17:25:45 +0800
committerSaeed Mahameed <saeedm@mellanox.com>2019-05-28 18:25:42 -0700
commit24bcd210e272c1e5fc712fbc5e5c21f59a21abf7 (patch)
tree1c68aed2c52a7eaa34353984f8f6a9993f5fefdb /drivers/net
parent25fa506b70cadb580c1e9cbd836d6417276d4bcd (diff)
downloadlinux-24bcd210e272c1e5fc712fbc5e5c21f59a21abf7.tar.bz2
net/mlx5e: restrict the real_dev of vlan device is the same as uplink device
When register indr block for vlan device, it should check the real_dev of vlan device is same as uplink device. Or it will set offload rule to mlx5e which will never hit. Fixes: 35a605db168c ("net/mlx5e: Offload TC e-switch rules with ingress VLAN device") Signed-off-by: wenxu <wenxu@ucloud.cn> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_rep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 5283e16c69e4..9aea9c5b2ce8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -813,7 +813,7 @@ static int mlx5e_nic_rep_netdevice_event(struct notifier_block *nb,
struct net_device *netdev = netdev_notifier_info_to_dev(ptr);
if (!mlx5e_tc_tun_device_to_offload(priv, netdev) &&
- !is_vlan_dev(netdev))
+ !(is_vlan_dev(netdev) && vlan_dev_real_dev(netdev) == rpriv->netdev))
return NOTIFY_OK;
switch (event) {