From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A0BEA04BC; Wed, 7 Oct 2020 15:30:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33E741BC1A; Wed, 7 Oct 2020 15:29:25 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 48B751BBDB for ; Wed, 7 Oct 2020 15:29:23 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@nvidia.com) with SMTP; 7 Oct 2020 16:29:17 +0300 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.228.134.250]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 097DTD4a014566; Wed, 7 Oct 2020 16:29:17 +0300 From: Dekel Peled To: orika@nvidia.com, thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com Cc: dev@dpdk.org Date: Wed, 7 Oct 2020 16:28:43 +0300 Message-Id: <66ddfa4691ca4acb1298dc1c1f51a053223fe961.1602077120.git.dekelp@nvidia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v4 2/2] app/testpmd: support query of AGE action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Following ethdev update in the previous patch of this series, this patch adds CLI support to query information related to AGE action. Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- app/test-pmd/config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 418ea6d..7c50980 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1770,6 +1770,7 @@ void print_valid_ports(void) union { struct rte_flow_query_count count; struct rte_flow_action_rss rss_conf; + struct rte_flow_query_age age; } query; int ret; @@ -1792,6 +1793,7 @@ void print_valid_ports(void) switch (action->type) { case RTE_FLOW_ACTION_TYPE_COUNT: case RTE_FLOW_ACTION_TYPE_RSS: + case RTE_FLOW_ACTION_TYPE_AGE: break; default: printf("Cannot query action type %d (%s)\n", @@ -1819,6 +1821,16 @@ void print_valid_ports(void) case RTE_FLOW_ACTION_TYPE_RSS: rss_config_display(&query.rss_conf); break; + case RTE_FLOW_ACTION_TYPE_AGE: + printf("%s:\n" + " aged: %u\n" + " sec_since_last_hit_valid: %u\n" + " sec_since_last_hit: %" PRIu32 "\n", + name, + query.age.aged, + query.age.sec_since_last_hit_valid, + query.age.sec_since_last_hit); + break; default: printf("Cannot display result for action type %d (%s)\n", action->type, name); -- 1.8.3.1