]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Don't match on vlan non-existence if ethertype is wildcarded
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 25 Oct 2018 15:41:58 +0000 (15:41 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 19 Nov 2018 22:35:04 +0000 (14:35 -0800)
commit7609118d9889faa700b265f53bcf06b3512a2524
treec9ca8060b2801b655af6ab05fbcfc73d2cc58b55
parentb0e0ccd15ece19cb1ece7172b4918fc54c100b20
net/mlx5e: Don't match on vlan non-existence if ethertype is wildcarded

For the "all" ethertype we should not care whether the packet has
vlans. Besides being wrong, the way we did it caused FW error
for rules such as:

tc filter add dev eth0 protocol all parent ffff: \
prio 1 flower skip_sw action drop

b/c the matching meta-data (outer headers bit in struct mlx5_flow_spec)
wasn't set. Fix that by matching on vlan non-existence only if we were
also told to match on the ethertype.

Fixes: 9812df55ce0f ('net/mlx5e: Set vlan masks for all offloaded TC rules')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Slava Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c