Skip to contentSkip to conversation

app/testpmd: fix tunnel offload flows

PATCH Applied Gregory Etelson 2 participants 2 messages May 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: fix tunnel offload flows

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")
---
 app/test-pmd/config.c | 3 +++
 1 file changed, 3 insertions(+)
app/test-pmd/config.c +3 -0
index 01a541cdd6..43c79b5021 100644
@@ -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);
 	}
Signature · 1 line
2.31.1
Applied
#1 lore raw
Quoted 7 lines · Gregory Etelson

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.

Quoted 6 lines
Fixes 1b9f274623b8 ("app/testpmd: add commands for tunnel offload")

Applied to dpdk-next-net/main, thanks.