DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Dekel Peled <dekelp@nvidia.com>, <adrien.mazarguil@6wind.com>,
	<orika@mellanox.com>, <thomas@monjalon.net>,
	<ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>, <matan@nvidia.com>
Subject: Re: [dpdk-dev] ***Spam*** [RFC] ethdev: support query of AGE action
Date: Tue, 15 Sep 2020 12:13:09 +0300	[thread overview]
Message-ID: <eb681829-7d4f-7d49-2549-685000c4e5f2@solarflare.com> (raw)
In-Reply-To: <f18eaceccd44038d07269e72d010b9acaeabd8bc.1599642954.git.dekelp@nvidia.com>

On 9/9/20 12:25 PM, Dekel Peled wrote:
> Existing API supports AGE action to monitor the aging of a single flow.
> 
> Recent patch [1] introduced the shared action API.
> Using this API, an action can be created as shared, unattached to any
> flow rule.
> Multiple flows can then be created using the shared action.
> The new API also supports query operation of a shared action.

Full story is nice, but IMHO shared actions are out of scope of
the patch since AGE action query makes sense without shared
actions as well. There is no point to over-complicate the description.

> 
> This RFC proposes the response format for query of a shared AGE action.
> This response format can be also used for existing flow query operation.
> 
> Following this RFC, the MLX5 PMD will implement support of shared AGE
> action.
> This new feature will utilize the Flow Hit ASO Object mechanism.
> A Flow Hit ASO Object contains 512 flags, each flag can be assigned to a
> specific shared AGE action.
> Traffic hit on any flow which uses the shared AGE action will set the
> flag assigned to this action.
> MLX5 PMD will monitor the state of all allocated Flow Hit flags.
> The duration of time with no flow hit will be aggregated until aging
> timeout expires.
> Application will use the shared action query operation to find the
> AGE action state.
> The response will be returned in the format proposed here.

I think mlx5 details are OK for RFC, but should be in mlx5
patch finally (not ethdev patch).

> 
> [1] https://mails.dpdk.org/archives/dev/2020-July/174110.html
> 
> Signed-off-by: Dekel Peled <dekelp@nvidia.com>
> ---
>  lib/librte_ethdev/rte_flow.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> index 7b9f82b..5f7235c 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -2064,6 +2064,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,
>  
> @@ -2181,6 +2182,19 @@ struct rte_flow_query_count {
>  };
>  
>  /**
> + * 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. */

How is the field width chosen? 24 bits in seconds is 194 days
which is more than half of a year. Just to match action AGE
width? (if so, a bit late questions to AGE action API).

> +};
> +
> +/**
>   * Hash function types.
>   */
>  enum rte_eth_hash_function {
> 

May be struct rte_flow_action_age description should be updated
to mention that it is possible to query (similar to COUNT
action).

In general, LGTM.

      reply	other threads:[~2020-09-15  9:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  9:25 [dpdk-dev] " Dekel Peled
2020-09-15  9:13 ` Andrew Rybchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb681829-7d4f-7d49-2549-685000c4e5f2@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dekelp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=matan@nvidia.com \
    --cc=orika@mellanox.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).