From: Gregory Etelson <getelson@nvidia.com>
To: <dev@dpdk.org>
Cc: <getelson@nvidia.com>, <matan@nvidia.com>, <orika@nvidia.com>,
<rasland@nvidia.com>, <kishore.padmanabha@broadcom.com>,
<stable@dpdk.org>, Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Xiaoyun Li <xiaoyun.li@intel.com>
Subject: [dpdk-dev] [PATCH] app/testpmd: fix tunnel offload flows
Date: Tue, 11 May 2021 11:03:31 +0300 [thread overview]
Message-ID: <20210511080331.13971-1-getelson@nvidia.com> (raw)
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 <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
app/test-pmd/config.c | 3 +++
1 file changed, 3 insertions(+)
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);
}
--
2.31.1
next reply other threads:[~2021-05-11 8:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 8:03 Gregory Etelson [this message]
2021-05-11 19:11 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210511080331.13971-1-getelson@nvidia.com \
--to=getelson@nvidia.com \
--cc=dev@dpdk.org \
--cc=kishore.padmanabha@broadcom.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@nvidia.com \
--cc=xiaoyun.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).