From: Gregory Etelson <getelson@nvidia.com>
To: "dev@dpdk.org" <dev@dpdk.org>,
"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>
Cc: Matan Azrad <matan@nvidia.com>,
Raslan Darawsheh <rasland@nvidia.com>,
NBU-Contact-Thomas Monjalon <thomas@monjalon.net>
Subject: RE: [PATCH] app/testpmd: fix tunnel offload validation
Date: Wed, 17 Nov 2021 08:57:54 +0000 [thread overview]
Message-ID: <BYAPR12MB2631EE235FD4970B64DBB69DA59A9@BYAPR12MB2631.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20211102122421.4190-1-getelson@nvidia.com>
Hello Ferruh,
Can you estimate when this patch will be merged into 21.11 ?
Thank you.
Regards,
Gregory
> -----Original Message-----
> From: Gregory Etelson <getelson@nvidia.com>
> Sent: Tuesday, November 2, 2021 14:24
> To: dev@dpdk.org; Gregory Etelson
> <getelson@nvidia.com>
> Cc: Matan Azrad <matan@nvidia.com>; Raslan
> Darawsheh <rasland@nvidia.com>;
> stable@dpdk.org; Xiaoyun Li
> <xiaoyun.li@intel.com>
> Subject: [PATCH] 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.
>
> Cc: stable@dpdk.org
>
> Fixes: 1b9f274623b8 ("app/testpmd: add
> commands for tunnel offload")
>
> Signed-off-by: Gregory Etelson
> <getelson@nvidia.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 a18871d461..4870aaeba6 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -2011,6 +2011,7 @@
> port_flow_validate(portid_t port_id,
> struct rte_flow_error error;
> struct port_flow_tunnel *pft = NULL;
> struct rte_port *port;
> + int ret;
>
> if (port_id_is_invalid(port_id,
> ENABLED_WARN) ||
> port_id == (portid_t)RTE_PORT_ALL)
> @@ -2037,10 +2038,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.33.1
next prev parent reply other threads:[~2021-11-17 8:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 12:24 [dpdk-dev] " Gregory Etelson
2021-11-17 8:57 ` Gregory Etelson [this message]
2021-11-17 10:09 ` Ferruh Yigit
2021-11-17 10:18 ` Singh, Aman Deep
2021-11-17 10:27 ` Slava Ovsiienko
2021-11-17 12:26 ` 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=BYAPR12MB2631EE235FD4970B64DBB69DA59A9@BYAPR12MB2631.namprd12.prod.outlook.com \
--to=getelson@nvidia.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=thomas@monjalon.net \
/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).