From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id EF1FB5B1E for ; Mon, 30 Jul 2018 18:16:23 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkApn-00009D-Lj; Mon, 30 Jul 2018 16:15:47 +0000 From: Christian Ehrhardt To: Nelio Laranjeiro Cc: dpdk stable Date: Mon, 30 Jul 2018 18:11:40 +0200 Message-Id: <20180730161342.16566-55-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'app/testpmd: fix missing count action fields' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:16:24 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From 7649bff53cad9adcacf7b7ab101794d85a2194c7 Mon Sep 17 00:00:00 2001 From: Nelio Laranjeiro Date: Thu, 31 May 2018 16:33:34 +0200 Subject: [PATCH] app/testpmd: fix missing count action fields [ upstream commit 28f40fd91e7ea5a24715eef6ff470f8586feedfc ] 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") Signed-off-by: Nelio Laranjeiro --- 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