]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix nest_level for vlan pop action
authorDmytro Linkin <dmitrolin@mellanox.com>
Wed, 1 Apr 2020 11:41:27 +0000 (14:41 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 8 Apr 2020 22:46:44 +0000 (15:46 -0700)
commit8940c80ee52004d84a803de0a92999052a5c98c8
tree08925ac711da07c73cb883788c21ab139c3badb0
parent8cc16272eb89de42a6cb26a5407e361c131e8f18
net/mlx5e: Fix nest_level for vlan pop action

Current value of nest_level, assigned from net_device lower_level value,
does not reflect the actual number of vlan headers, needed to pop.
For ex., if we have untagged ingress traffic sended over vlan devices,
instead of one pop action, driver will perform two pop actions.
To fix that, calculate nest_level as difference between vlan device and
parent device lower_levels.

Fixes: a7983db5f52c ("net: remove unnecessary variables and callback")
Signed-off-by: Dmytro Linkin <dmitrolin@mellanox.com>
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c