net/mlx5: fix check of eCPRI previous layer
authorBing Zhao <bingz@nvidia.com>
Wed, 11 Nov 2020 09:28:50 +0000 (17:28 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 22:36:14 +0000 (23:36 +0100)
commit1d1f909cf52d160227a0c87f9e95d2734cc4c58e
tree5f3221159eca8a12cb3eaa65661efa6f24fd03b8
parent70a3ee6bb74ea089751abbc4954ffc850a5ed46e
net/mlx5: fix check of eCPRI previous layer

Based on the specification, eCPRI can only follow ETH (VLAN) layer
or UDP layer. When creating a flow with eCPRI item, this should be
checked and invalid layout of the layers should be rejected.

Fixes: c7eca23657b7 ("net/mlx5: add flow validation of eCPRI header")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.c