From patchwork Thu Oct 1 06:53:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dekel Peled X-Patchwork-Id: 79409 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E2D34A04B5; Thu, 1 Oct 2020 08:53:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 817E71D6FE; Thu, 1 Oct 2020 08:53:30 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 7D1CF1D6E7 for ; Thu, 1 Oct 2020 08:53:27 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@nvidia.com) with SMTP; 1 Oct 2020 09:53:26 +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 0916rQIK014440; Thu, 1 Oct 2020 09:53:26 +0300 From: Dekel Peled To: wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com Cc: matan@nvidia.com, dev@dpdk.org Date: Thu, 1 Oct 2020 09:53:11 +0300 Message-Id: <7e60adb8f3857e7b2bc9bf8d588b280667acd7ca.1601534899.git.dekelp@nvidia.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] 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 17a6efe..d8e1ca3 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1767,6 +1767,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; @@ -1789,6 +1790,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", @@ -1816,6 +1818,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);