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 D9F67A04BA; Thu, 1 Oct 2020 21:33:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32F7D1D627; Thu, 1 Oct 2020 21:33:12 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id D90FF1D5CC for ; Thu, 1 Oct 2020 21:33:09 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@nvidia.com) with SMTP; 1 Oct 2020 22:33:04 +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 091JX2in015337; Thu, 1 Oct 2020 22:33:04 +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: Thu, 1 Oct 2020 22:32:47 +0300 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: <5a46a1ed26cd7e89483d06eaf676d44a088738f2.1601456245.git.dekelp@nvidia.com> Subject: [dpdk-dev] [PATCH v2 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 [1], this patch adds CLI support to query information related to AGE action. [1] https://mails.dpdk.org/archives/dev/2020-September/183699.html 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..cb268d0 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" + " last_hit_time_valid: %u\n" + " last_hit_time: %" PRIu32 "\n", + name, + query.age.aged, + query.age.last_hit_time_valid, + query.age.last_hit_time); + break; default: printf("Cannot display result for action type %d (%s)\n", action->type, name); -- 1.8.3.1