net/mlx5: improve flow item IP validation
authorXiaoyu Min <jackmin@mellanox.com>
Tue, 5 Nov 2019 07:51:27 +0000 (09:51 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Nov 2019 22:15:05 +0000 (23:15 +0100)
commitfba3213015891c7ec9634e66bec5eb8eaed0d70a
treedfb22e7c963b2f32c38581be5e765a66c16565f6
parent5fc66630bed5db8b0e2507e7324f1c8f98e0dd9a
net/mlx5: improve flow item IP validation

Currently PMD doesn't check whether the user specified ethernet type is
conflicting with the followed IPv4/IPv6 items, which leads to HW refuse
to create rule, for example:

  ... pattern eth type is 0x86dd / ipv4 / end ...

ethernet type is IPv6 but IPv4 is following, this should be validated
as failure and report corresponding error in detail.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_flow_verbs.c