[RFC 1/2] ethdev: port flags for pre-configuration flow hints
Ori Kam
orika at nvidia.com
Thu Apr 7 13:27:35 CEST 2022
Hi Jack,
> -----Original Message-----
> From: Jack Min <jackmin at nvidia.com>
> Sent: Thursday, April 7, 2022 8:31 AM
> Subject: [RFC 1/2] ethdev: port flags for pre-configuration flow hints
>
> The data-path focused flow rule management can manage flow rules in more
> optimized way then tranditional one by using hits provided by
> application in initialization phase.
>
> In addition to the current hints we have in port attr, more hints could
> be proivded by application about it's behaviour.
>
> One example is how the application do with the same flow:
> A. create/destroy flow on same queue but query flow on different queue
> or queue-less way (i.e, counter query)
> B. All flow operations will be exactly on the same queue, by which PMD
> could be in more optimized way then A because resource could be
> isolated and access based on queue, without lock for example.
>
> This patch add flag about above situation and could be extanded to cover
> more situations.
>
> Signed-off-by: Xiaoyu Min <jackmin at nvidia.com>
> ---
> lib/ethdev/rte_flow.h | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index d8827dd184..578dd837f5 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -4875,6 +4875,17 @@ rte_flow_flex_item_release(uint16_t port_id,
> const struct rte_flow_item_flex_handle *handle,
> struct rte_flow_error *error);
>
> +/**
> + * The flags of rte flow port
> + */
> +enum rte_flow_port_flag {
> + /**
> + * All flow operations for one specified flow will _strictlly_ happen
> + * on the same queue (create/destroy/query/update).
> + */
> + RTE_FLOW_PORT_FLAG_STRICT_QUEUE = RTE_BIT32(0),
> +};
> +
> /**
> * @warning
> * @b EXPERIMENTAL: this API may change without prior notice.
> @@ -4972,6 +4983,11 @@ struct rte_flow_port_attr {
> * @see RTE_FLOW_ACTION_TYPE_METER
> */
> uint32_t nb_meters;
> + /**
> + * Port flags.
> + * @see enum rte_flow_port_flag
> + */
> + enum rte_flow_port_flag flags;
Why the use of enum and not flags?
I guess there will be more flags in future, and those flags will not be related to the strict queue.
> };
>
> /**
> --
> 2.35.1
More information about the dev
mailing list