net/mlx4: fix empty Ethernet spec with VLAN
authorXiaoyu Min <jackmin@nvidia.com>
Mon, 22 Nov 2021 13:53:29 +0000 (21:53 +0800)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 23 Nov 2021 13:24:16 +0000 (14:24 +0100)
commitd564eea7ce7fe66f6b4210956b8907f663d30734
treeedc889e894a1f8e2bac80c3575446b46198c22f0
parent16508bfd0816a944c459c8c7c8300c7aabea54a0
net/mlx4: fix empty Ethernet spec with VLAN

When the ETH spec is empty MLX4 PMD doesn't allow match other criteria,
which means the flow should be promisc one.

Currently, PMD validates this by setting flow->promisc bit when ETH spec
is empty and checking whether there is other rte_flow_item followed
when flow->promisc is on.

However, commit [1] adds support to match traffic only on VLAN id, the
above validation logic should be changed accordingly.

This patch changes the above validate logic by skipping flow->promisc
check if this item is VLAN.

[1]:
Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx4/mlx4_flow.c