DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix missing count action fields
@ 2018-05-31 14:33 Nelio Laranjeiro
  2018-06-27 14:18 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Nelio Laranjeiro @ 2018-05-31 14:33 UTC (permalink / raw)
  To: dev, Adrien Mazarguil; +Cc: declan.doherty, stable

COUNT action has been modified and has several fields not addressable
though testpmd.  In addition, as those fields are not definable testpmd
is providing an empty configuration which is undefined.

Fixes: fb8fd96d4251 ("ethdev: add shared counter to flow API")
Cc: declan.doherty@intel.com
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 app/test-pmd/cmdline_flow.c  | 29 +++++++++++++++++++++++++++--
 lib/librte_ethdev/rte_flow.c |  2 +-
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 9918d7fda..934cf7e90 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -194,6 +194,8 @@ enum index {
 	ACTION_QUEUE_INDEX,
 	ACTION_DROP,
 	ACTION_COUNT,
+	ACTION_COUNT_SHARED,
+	ACTION_COUNT_ID,
 	ACTION_RSS,
 	ACTION_RSS_FUNC,
 	ACTION_RSS_LEVEL,
@@ -788,6 +790,13 @@ static const enum index action_queue[] = {
 	ZERO,
 };
 
+static const enum index action_count[] = {
+	ACTION_COUNT_ID,
+	ACTION_COUNT_SHARED,
+	ACTION_NEXT,
+	ZERO,
+};
+
 static const enum index action_rss[] = {
 	ACTION_RSS_FUNC,
 	ACTION_RSS_LEVEL,
@@ -2022,10 +2031,26 @@ static const struct token token_list[] = {
 	[ACTION_COUNT] = {
 		.name = "count",
 		.help = "enable counters for this rule",
-		.priv = PRIV_ACTION(COUNT, 0),
-		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
+		.priv = PRIV_ACTION(COUNT,
+				    sizeof(struct rte_flow_action_count)),
+		.next = NEXT(action_count),
 		.call = parse_vc,
 	},
+	[ACTION_COUNT_ID] = {
+		.name = "identifier",
+		.help = "counter identifier to use",
+		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
+		.call = parse_vc_conf,
+	},
+	[ACTION_COUNT_SHARED] = {
+		.name = "shared",
+		.help = "shared counter",
+		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
+					   shared, 1)),
+		.call = parse_vc_conf,
+	},
 	[ACTION_RSS] = {
 		.name = "rss",
 		.help = "spread packets among several queues",
diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index b2afba089..2e87e59f3 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -84,7 +84,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 	MK_FLOW_ACTION(FLAG, 0),
 	MK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),
 	MK_FLOW_ACTION(DROP, 0),
-	MK_FLOW_ACTION(COUNT, 0),
+	MK_FLOW_ACTION(COUNT, sizeof(struct rte_flow_action_count)),
 	MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)),
 	MK_FLOW_ACTION(PF, 0),
 	MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),
-- 
2.17.1

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix missing count action fields
  2018-05-31 14:33 [dpdk-dev] [PATCH] app/testpmd: fix missing count action fields Nelio Laranjeiro
@ 2018-06-27 14:18 ` Ferruh Yigit
  2018-06-27 14:38   ` Iremonger, Bernard
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-06-27 14:18 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev, Adrien Mazarguil; +Cc: declan.doherty, stable

On 5/31/2018 3:33 PM, Nelio Laranjeiro wrote:
> COUNT action has been modified and has several fields not addressable
> though testpmd.  In addition, as those fields are not definable testpmd
> is providing an empty configuration which is undefined.
> 
> Fixes: fb8fd96d4251 ("ethdev: add shared counter to flow API")
> Cc: declan.doherty@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

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

(Timeout review time frame!)

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix missing count action fields
  2018-06-27 14:18 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2018-06-27 14:38   ` Iremonger, Bernard
  0 siblings, 0 replies; 3+ messages in thread
From: Iremonger, Bernard @ 2018-06-27 14:38 UTC (permalink / raw)
  To: Yigit, Ferruh, Nelio Laranjeiro, dev, Adrien Mazarguil
  Cc: Doherty, Declan, stable

Hi Ferruh,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
> Sent: Wednesday, June 27, 2018 3:19 PM
> To: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>; dev@dpdk.org; Adrien
> Mazarguil <adrien.mazarguil@6wind.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix missing count
> action fields
> 
> On 5/31/2018 3:33 PM, Nelio Laranjeiro wrote:
> > COUNT action has been modified and has several fields not addressable
> > though testpmd.  In addition, as those fields are not definable
> > testpmd is providing an empty configuration which is undefined.
> >
> > Fixes: fb8fd96d4251 ("ethdev: add shared counter to flow API")
> > Cc: declan.doherty@intel.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> Applied to dpdk-next-net/master, thanks.
> 
> (Timeout review time frame!)

It might be safer to ping the maintainer before exercising the timeout.

Regards,

Bernard.



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

end of thread, other threads:[~2018-06-27 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-31 14:33 [dpdk-dev] [PATCH] app/testpmd: fix missing count action fields Nelio Laranjeiro
2018-06-27 14:18 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-06-27 14:38   ` Iremonger, Bernard

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