app/testpmd: fix tunnel offload validation
authorGregory Etelson <getelson@nvidia.com>
Tue, 2 Nov 2021 12:24:21 +0000 (14:24 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 17 Nov 2021 12:12:56 +0000 (13:12 +0100)
commit849e6ddc6a431a021d6ab2125f1ebbba545cf05a
treee85c7892b1cb36feb96a360b7b4ffd4d8eb425b0
parent47f5dee19e5f9a2cf1883a7119675d7a25470aca
app/testpmd: fix tunnel offload validation

Tunnel offload API allows application to restore packet to
its original form if chain of flows missed after DECAP action.
The main idea of the tunnel offload API was to query port PMD
to provide flow elements - actions or items.
Flow elements supplied by PMD are merged with original flow rule
elements provided by testpmd operator to create a new flow rule,
optimal for PMD, to implement the tunnel offload API.
That flow rule transformation is hidden form testpmd operator and uses
internal testpmd resources.

Current testpmd did not release tunnel offload resources if flow rule
validation failed.

The patch always releases tunnel offload resources after flow rule
validation returns.

Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
app/test-pmd/config.c