net/mlx5: fix validation of push VLAN without full mask
Due the limitation of HW, when PMD create push VLAN action it needs to
know what exactly the value of VID/PCP.
PMD try to figure out them via:
- of_set_vlan_vid/pcp actions
- VLAN item in pattern
If none of above is provided, default value - zero is used.
However user will write rule like [1] which match on a range of VID and
without of_set_vlan_vid action and expect the VID will inherit from
original packet. This is not supported by HW currently. PMD will set VID
to default value - zero because it cannot figure out the exact value of
VID from VLAN item.
This is sort of misleading for some users.
In order to avoid this, PMD will spit out error for rule like [1] to
force user to provide explicit VID/PCP for new pushed VLAN headers.
[1]: testpmd> flow create 2 ingress transfer group 0 priority 3 pattern
eth / vlan vid spec 2859 vid prefix 4 / ipv4 / end
actcions of_push_vlan ethertype 0x88A8 /
of_set_vlan_pcp vlan_pcp 6 / port_id id 0 / end
Fixes:
9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>