[v4,1/2] ethdev: support query of AGE action
Checks
Commit Message
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 <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
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(+)
Comments
Hi
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Wednesday, October 7, 2020 4:29 PM
> Subject: [dpdk-dev] [PATCH v4 1/2] ethdev: support query of AGE action
>
> 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmails.dp
> dk.org%2Farchives%2Fdev%2F2020-
> September%2F180061.html&data=02%7C01%7Corika%40nvidia.com%7Cd
> 4a344535a0a4cce067708d86ac50c2d%7C43083d15727340c1b7db39efd9ccc17
> a%7C0%7C0%7C637376741824163645&sdata=i9ycF2KfCqDgcLXjzHTMxW
> TcCRS3pslGu1whISDlFbs%3D&reserved=0
>
> Signed-off-by: Dekel Peled <dekelp@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
> 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.
> +
> * 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
> *
> --
> 1.8.3.1
Acked-by: Ori Kam <orika@nvidia.com>
Thanks,
Ori
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 <dekelp@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
with a nit below:
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
> 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
> *
>
On 10/13/2020 9:53 AM, Andrew Rybchenko wrote:
> 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 <dekelp@nvidia.com>
>> Acked-by: Matan Azrad <matan@nvidia.com>
>
> with a nit below:
>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>
Series applied to dpdk-next-net/main, thanks.
Reworded release notes update as:
"ethdev: Added capability to query AGE flow action."
@@ -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
~~~~~~~~~~~~~~
@@ -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.
+
* Renamed internal ethdev APIs:
* ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()``
@@ -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
*