]> git.droids-corp.org - dpdk.git/commit
net/mlx5: fix MPLS/GRE Verbs spec ordering
authorDariusz Sosnowski <dsosnowski@nvidia.com>
Wed, 2 Mar 2022 17:06:59 +0000 (17:06 +0000)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 7 Mar 2022 10:49:10 +0000 (11:49 +0100)
commit98008ce6ec2f31c2e94c0eb39740c8178aeb8392
treeda2f705d95f16e9bd1e12e92a4d249db7a55ebfb
parentdfd3e840ee7868b33fa7a799fb47e68dc653c5b1
net/mlx5: fix MPLS/GRE Verbs spec ordering

When using Verbs flow engine to create flows, GRE Verbs spec was put at
the end of specs list. This created problems for flows matching MPLSoGRE
packets. In generated specs list MPLS spec was put before GRE spec, but
Verbs API requires that MPLS spec must be put in its exact location in
protocol stack.

This patch fixes this behavior. Space for GRE Verbs spec is reserved at
its exact location. MPLS Verbs is inserted at its exact location as
well. GRE spec is filled after all flow items are parsed.

Fixes: 985b479267aa ("net/mlx5: fix GRE protocol type translation for Verbs")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_verbs.c