From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A876DA09E4 for ; Thu, 4 Feb 2021 11:04:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D506240662; Thu, 4 Feb 2021 11:04:23 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 7591E24064D for ; Thu, 4 Feb 2021 11:04:21 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@nvidia.com) with SMTP; 4 Feb 2021 12:04:17 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.228.136.74]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 114A4HTh005692; Thu, 4 Feb 2021 12:04:17 +0200 From: Dekel Peled To: wenzhuo.lu@intel.com, xiaoyun.li@intel.com, bernard.iremonger@intel.com Cc: matan@nvidia.com, dev@dpdk.org, stable@dpdk.org Date: Thu, 4 Feb 2021 12:04:15 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] app/testpmd: fix support for shared age action query X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Shared age action query was implemented as part of flow query, but was not implemented as part of shared action query. This patch adds the required implementation. Fixes: 2f622174bf86 ("app/testpmd: support query of age action") Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- app/test-pmd/config.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 0e2b9f7d3c..dab8afe5dd 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1879,6 +1879,7 @@ port_shared_action_query(portid_t port_id, uint32_t id) return -EINVAL; switch (psa->type) { case RTE_FLOW_ACTION_TYPE_RSS: + case RTE_FLOW_ACTION_TYPE_AGE: data = &default_data; break; default: @@ -1895,6 +1896,20 @@ port_shared_action_query(portid_t port_id, uint32_t id) *((uint32_t *)data)); data = NULL; break; + case RTE_FLOW_ACTION_TYPE_AGE: + if (!ret) { + struct rte_flow_query_age *resp = data; + + printf("AGE:\n" + " aged: %u\n" + " sec_since_last_hit_valid: %u\n" + " sec_since_last_hit: %" PRIu32 "\n", + resp->aged, + resp->sec_since_last_hit_valid, + resp->sec_since_last_hit); + } + data = NULL; + break; default: printf("Shared action %u (type: %d) on port %u doesn't support" " query\n", id, psa->type, port_id); @@ -1902,6 +1917,7 @@ port_shared_action_query(portid_t port_id, uint32_t id) } return ret; } + static struct port_flow_tunnel * port_flow_tunnel_offload_cmd_prep(portid_t port_id, const struct rte_flow_item *pattern, -- 2.25.1