net/mlx5: fix GRE protocol type translation for Verbs
authorGregory Etelson <getelson@nvidia.com>
Thu, 23 Dec 2021 13:16:38 +0000 (15:16 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 6 Jan 2022 09:07:49 +0000 (10:07 +0100)
commit985b479267aa90394f1c219de120d23e96761789
tree763a050b6edb73a2b9d36e8e1289cd25a71b3110
parentf3f1f576f43804b30f81deae967bc09aff7000df
net/mlx5: fix GRE protocol type translation for Verbs

When application creates several flows to match on GRE tunnel without
explicitly specifying GRE protocol type value in flow rules, PMD will
translate that to zero mask.
RDMA-CORE cannot distinguish between different inner flow types and
produces identical matchers for each zero mask.

The patch extracts inner header type from flow rule and forces it in
GRE protocol type, if application did not specify any.

Fixes: 84c406e74524 ("net/mlx5: add flow translate function")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_flow_verbs.c