net/mlx5: fix GRE flow item matching
authorAlexander Kozyrev <akozyrev@nvidia.com>
Wed, 24 Nov 2021 04:32:34 +0000 (06:32 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 24 Nov 2021 16:25:36 +0000 (17:25 +0100)
commit9e61533df27fc4d76080da20a7e8f9c9e7e1b90f
tree05347cd4303726e531a4d7a415a7ddfa4bb426b1
parentec9b812b6cdd4bd82325849cc4ff508e2f66ed21
net/mlx5: fix GRE flow item matching

GRE protocol type is implicitly set in the matching translation in case
an application doesn't specify any type explicitly in a flow rule.
It is extracted from the inner header type, but this type may be absent.
In this case, GRE item matching is broken. Check if we have the inner
header type before setting it to allow matching on all GRE packets.

Fixes: be26e81bfc1c ("net/mlx5: fix GRE protocol type translation")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c