patch 'app/testpmd: fix tunnel offload validation' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:57 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6d5aa03a7788612dfd64a827a5beb7d1f3d371c2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 6d5aa03a7788612dfd64a827a5beb7d1f3d371c2 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Tue, 2 Nov 2021 14:24:21 +0200
Subject: [PATCH] app/testpmd: fix tunnel offload validation
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 849e6ddc6a431a021d6ab2125f1ebbba545cf05a ]

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")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Aman Singh <aman.deep.singh at intel.com>
---
 app/test-pmd/config.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 22da15e51d..8e37602f6b 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2047,6 +2047,7 @@ port_flow_validate(portid_t port_id,
 {
 	struct rte_flow_error error;
 	struct port_flow_tunnel *pft = NULL;
+	int ret;
 
 	/* Poisoning to make sure PMDs update it in case of error. */
 	memset(&error, 0x11, sizeof(error));
@@ -2060,10 +2061,11 @@ port_flow_validate(portid_t port_id,
 		if (pft->actions)
 			actions = pft->actions;
 	}
-	if (rte_flow_validate(port_id, attr, pattern, actions, &error))
-		return port_flow_complain(&error);
+	ret = rte_flow_validate(port_id, attr, pattern, actions, &error);
 	if (tunnel_ops->enabled)
 		port_flow_tunnel_offload_cmd_release(port_id, tunnel_ops, pft);
+	if (ret)
+		return port_flow_complain(&error);
 	printf("Flow rule validated\n");
 	return 0;
 }
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:06.033761875 +0800
+++ 0053-app-testpmd-fix-tunnel-offload-validation.patch	2021-11-28 22:41:03.376873288 +0800
@@ -1 +1 @@
-From 849e6ddc6a431a021d6ab2125f1ebbba545cf05a Mon Sep 17 00:00:00 2001
+From 6d5aa03a7788612dfd64a827a5beb7d1f3d371c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 849e6ddc6a431a021d6ab2125f1ebbba545cf05a ]
@@ -23 +25,0 @@
-Cc: stable at dpdk.org
@@ -33 +35 @@
-index f87d9d5b82..1722d6c8f8 100644
+index 22da15e51d..8e37602f6b 100644
@@ -36 +38 @@
-@@ -1971,6 +1971,7 @@ port_flow_validate(portid_t port_id,
+@@ -2047,6 +2047,7 @@ port_flow_validate(portid_t port_id,
@@ -44 +46 @@
-@@ -1984,10 +1985,11 @@ port_flow_validate(portid_t port_id,
+@@ -2060,10 +2061,11 @@ port_flow_validate(portid_t port_id,


More information about the stable mailing list