From: Gregory Etelson Date: Tue, 11 May 2021 08:03:31 +0000 (+0300) Subject: app/testpmd: fix tunnel offload flows cleanup X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=99fc79b37af5652f30ab3c9725fd6a98494d14dc;p=dpdk.git app/testpmd: fix tunnel offload flows cleanup Tunnel offload model requires application to obtain PMD related flow items or actions to construct a flow rule. These elements acquire internal PMD flow resources that must be explicitly released. The patch destroys tunnel offload PMD resources after flow creation failure. Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload") Cc: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Viacheslav Ovsiienko --- diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 01a541cdd6..43c79b5021 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1940,6 +1940,9 @@ port_flow_create(portid_t port_id, memset(&error, 0x22, sizeof(error)); flow = rte_flow_create(port_id, attr, pattern, actions, &error); if (!flow) { + if (tunnel_ops->enabled) + port_flow_tunnel_offload_cmd_release(port_id, + tunnel_ops, pft); free(pf); return port_flow_complain(&error); }