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 78C90A04BA; Thu, 1 Oct 2020 21:33:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A75BB1D5CC; Thu, 1 Oct 2020 21:33:10 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id CF95F1D5C8 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:03 +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 091JX2im015337; Thu, 1 Oct 2020 22:33:03 +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:46 +0300 Message-Id: <24deb8ad7d1b5a5d6e4d4a7da3ff85ba467b2774.1601580235.git.dekelp@nvidia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: <5a46a1ed26cd7e89483d06eaf676d44a088738f2.1601456245.git.dekelp@nvidia.com> Subject: [dpdk-dev] [PATCH v2 1/2] ethdev: 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" Existing API supports AGE action to monitor the aging of a flow. This patch implements RFC [1], introducing the response format for query of an AGE action. Application will be able to query the AGE action state. The response will be returned in the format implemented here. [1] https://mails.dpdk.org/archives/dev/2020-September/180061.html Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- doc/guides/prog_guide/rte_flow.rst | 17 +++++++++++++++++ doc/guides/rel_notes/release_20_11.rst | 3 +++ lib/librte_ethdev/rte_flow.h | 14 ++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 119b128..4b8d033 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -2666,6 +2666,23 @@ timeout passed without any matching on the flow. | ``context`` | user input flow context | +--------------+---------------------------------+ +Query structure to retrieve ageing status information of a +shared AGE action, or a flow rule using the AGE action: + +.. _table_rte_flow_query_age: + +.. table:: AGE query + + +-------------------------+-----+-----------------------------------+ + | Field | I/O | Value | + +=========================+=====+===================================+ + | ``aged`` | out | Aging timeout expired | + +-------------------------+-----+-----------------------------------+ + | ``last_hit_time_valid`` | out | ``last_hit_time`` field is valid | + +-------------------------+-----+-----------------------------------+ + | ``last_hit_time`` | out | Seconds since last traffic hit | + +-------------------------+-----+-----------------------------------+ + Negative types ~~~~~~~~~~~~~~ diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 7f9d0dd..dd77f04 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -168,6 +168,9 @@ API Changes * ethdev: ``rte_eth_rx_descriptor_done()`` API has been deprecated. +* ethdev: Added struct ``rte_flow_query_age`` for use in response to query + of AGE action. + * Renamed internal ethdev APIs: * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()`` diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index da8bfa5..1a13802 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -2130,6 +2130,7 @@ enum rte_flow_action_type { * See struct rte_flow_action_age. * See function rte_flow_get_aged_flows * see enum RTE_ETH_EVENT_FLOW_AGED + * See struct rte_flow_query_age */ RTE_FLOW_ACTION_TYPE_AGE, }; @@ -2194,6 +2195,19 @@ struct rte_flow_action_age { }; /** + * RTE_FLOW_ACTION_TYPE_AGE (query) + * + * Query structure to retrieve the aging status information of a + * shared AGE action, or a flow rule using the AGE action. + */ +struct rte_flow_query_age { + uint32_t aged:1; /**< 1 if aging timeout expired, 0 otherwise. */ + uint32_t last_hit_time_valid:1; /**< 1 if last_hit_time value valid. */ + uint32_t reserved:6; /**< Reserved, must be zero. */ + uint32_t last_hit_time:24; /**< Seconds since last traffic hit. */ +}; + +/** * @warning * @b EXPERIMENTAL: this structure may change without prior notice * -- 1.8.3.1