DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: fix flex item input link parsing
@ 2022-03-10  5:59 Gregory Etelson
  2022-03-14  8:48 ` Slava Ovsiienko
  0 siblings, 1 reply; 3+ messages in thread
From: Gregory Etelson @ 2022-03-10  5:59 UTC (permalink / raw)
  To: dev
  Cc: getelson, matan, rasland, stable, Xiaoyun Li, Aman Singh,
	Yuying Zhang, Viacheslav Ovsiienko

Testpmd reads flex item configuration from a JSON file.
Flex item input link description is stored in testpmd
flow item format. For example, `eth type is 0x0800`.
The item description is placed into a general testpmd CLI
flow rule command template and parsed to convert string into
flow item object.

The patch adds the `actions` section to the flow rule template.

Cc: stable@dpdk.org

Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
---
 app/test-pmd/cmd_flex_item.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c
index 9050825a81..78a89c0f8a 100644
--- a/app/test-pmd/cmd_flex_item.c
+++ b/app/test-pmd/cmd_flex_item.c
@@ -133,7 +133,8 @@ flex_link_item_parse(const char *src, struct rte_flow_item *item)
 	struct rte_flow_item *pattern;
 	struct rte_flow_action *actions;
 
-	sprintf(flow_rule, "flow create 0 pattern %s / end", src);
+	sprintf(flow_rule,
+		"flow create 0 pattern %s / end actions drop / end", src);
 	src = flow_rule;
 	ret = flow_parse(src, (void *)data, sizeof(data),
 			 &attr, &pattern, &actions);
-- 
2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] app/testpmd: fix flex item input link parsing
  2022-03-10  5:59 [PATCH] app/testpmd: fix flex item input link parsing Gregory Etelson
@ 2022-03-14  8:48 ` Slava Ovsiienko
  2022-03-14 21:33   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Slava Ovsiienko @ 2022-03-14  8:48 UTC (permalink / raw)
  To: Gregory Etelson, dev
  Cc: Matan Azrad, Raslan Darawsheh, stable, Xiaoyun Li, Aman Singh,
	Yuying Zhang

Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

> -----Original Message-----
> From: Gregory Etelson <getelson@nvidia.com>
> Sent: Thursday, March 10, 2022 8:00
> To: dev@dpdk.org
> Cc: Gregory Etelson <getelson@nvidia.com>; Matan Azrad
> <matan@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>;
> stable@dpdk.org; Xiaoyun Li <xiaoyun.li@intel.com>; Aman Singh
> <aman.deep.singh@intel.com>; Yuying Zhang <yuying.zhang@intel.com>;
> Slava Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH] app/testpmd: fix flex item input link parsing
> 
> Testpmd reads flex item configuration from a JSON file.
> Flex item input link description is stored in testpmd flow item format. For
> example, `eth type is 0x0800`.
> The item description is placed into a general testpmd CLI flow rule command
> template and parsed to convert string into flow item object.
> 
> The patch adds the `actions` section to the flow rule template.
> 
> Cc: stable@dpdk.org
> 
> Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> ---
>  app/test-pmd/cmd_flex_item.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c
> index 9050825a81..78a89c0f8a 100644
> --- a/app/test-pmd/cmd_flex_item.c
> +++ b/app/test-pmd/cmd_flex_item.c
> @@ -133,7 +133,8 @@ flex_link_item_parse(const char *src, struct
> rte_flow_item *item)
>  	struct rte_flow_item *pattern;
>  	struct rte_flow_action *actions;
> 
> -	sprintf(flow_rule, "flow create 0 pattern %s / end", src);
> +	sprintf(flow_rule,
> +		"flow create 0 pattern %s / end actions drop / end", src);
>  	src = flow_rule;
>  	ret = flow_parse(src, (void *)data, sizeof(data),
>  			 &attr, &pattern, &actions);
> --
> 2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] app/testpmd: fix flex item input link parsing
  2022-03-14  8:48 ` Slava Ovsiienko
@ 2022-03-14 21:33   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2022-03-14 21:33 UTC (permalink / raw)
  To: Gregory Etelson
  Cc: dev, Matan Azrad, Raslan Darawsheh, stable, Xiaoyun Li,
	Aman Singh, Yuying Zhang, Slava Ovsiienko

> > Testpmd reads flex item configuration from a JSON file.
> > Flex item input link description is stored in testpmd flow item format. For
> > example, `eth type is 0x0800`.
> > The item description is placed into a general testpmd CLI flow rule command
> > template and parsed to convert string into flow item object.
> > 
> > The patch adds the `actions` section to the flow rule template.
> > 
> > Cc: stable@dpdk.org
> > 
> > Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
> > Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Applied, thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-14 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  5:59 [PATCH] app/testpmd: fix flex item input link parsing Gregory Etelson
2022-03-14  8:48 ` Slava Ovsiienko
2022-03-14 21:33   ` Thomas Monjalon

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