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 1B367A04B6; Tue, 13 Oct 2020 10:53:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA1201DAB5; Tue, 13 Oct 2020 10:53:53 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by dpdk.org (Postfix) with ESMTP id BB1601D734 for ; Tue, 13 Oct 2020 10:53:52 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 7A06D7F4F1; Tue, 13 Oct 2020 11:53:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7A06D7F4F1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1602579231; bh=32guWwoRE2Mw3MkCzimNwjCo/Kms7RxoRh6kGeuUy+o=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=gwdKjdSmkr/F9BL/TrCM8yIl3MbK0XFUJnDaUPhwBB4xWUeoISL3d2OBTNWB4Ltep v2457TvcIf2YqkWDTife8GNG9rp/PF8HxUjD/EgXTWZ6snbEFD0qqNN/tby6TFtZEs +8q2Qn+xWzsB4PMMGa+kDdfGqKUsnxSllXD7qeBI= To: Dekel Peled , orika@nvidia.com, thomas@monjalon.net, ferruh.yigit@intel.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com Cc: dev@dpdk.org References: From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Tue, 13 Oct 2020 11:53:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 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" On 10/7/20 4:28 PM, Dekel Peled wrote: > 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 with a nit below: Acked-by: Andrew Rybchenko > --- > doc/guides/prog_guide/rte_flow.rst | 17 +++++++++++++++++ > doc/guides/rel_notes/release_20_11.rst | 3 +++ > lib/librte_ethdev/rte_flow.h | 15 +++++++++++++++ > 3 files changed, 35 insertions(+) > > diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst > index 119b128..a672fc5 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 | > + +------------------------------+-----+----------------------------------------+ > + | ``sec_since_last_hit_valid`` | out | ``sec_since_last_hit`` value is valid | > + +------------------------------+-----+----------------------------------------+ > + | ``sec_since_last_hit`` | 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 0b2a370..7e093f7 100644 > --- a/doc/guides/rel_notes/release_20_11.rst > +++ b/doc/guides/rel_notes/release_20_11.rst > @@ -191,6 +191,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. > + IMO it too deep technical details for release notes advertising new feature. What about: Added possibility to query AGE action state. > * 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..42a315a 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,20 @@ 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 reserved:6; /**< Reserved, must be zero. */ > + uint32_t aged:1; /**< 1 if aging timeout expired, 0 otherwise. */ > + uint32_t sec_since_last_hit_valid:1; > + /**< sec_since_last_hit value is valid. */ > + uint32_t sec_since_last_hit:24; /**< Seconds since last traffic hit. */ > +}; > + > +/** > * @warning > * @b EXPERIMENTAL: this structure may change without prior notice > * >