[v6] ethdev: add flow rule group description

Message ID 20230209073237.3185852-1-rongweil@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v6] ethdev: add flow rule group description |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Rongwei Liu Feb. 9, 2023, 7:32 a.m. UTC
  Add more sentences to describe the group concepts
and define group 0 as root group for traffic to search a
hit rule.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
---
 lib/ethdev/rte_flow.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
  

Comments

Ori Kam Feb. 9, 2023, 8:01 a.m. UTC | #1
Hi Rongwei,

> -----Original Message-----
> From: Rongwei Liu <rongweil@nvidia.com>
> Sent: Thursday, 9 February 2023 9:33
> 
> Add more sentences to describe the group concepts
> and define group 0 as root group for traffic to search a
> hit rule.
> 
> Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
> ---
>  lib/ethdev/rte_flow.h | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
> index b60987db4b..321cf06fbc 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -86,7 +86,17 @@ extern "C" {
>   * but may be valid in a few cases.
>   */
>  struct rte_flow_attr {
> -	uint32_t group; /**< Priority group. */
> +	/**
> +	 * A group is a superset of multiple rules.
> +	 * The default group is 0 and is processed for all packets.
> +	 * Rules in other groups are processed only if the group is chained
> +	 * by a jump action from a previously matched rule.
> +	 * It means the group hierarchy is made by the flow rules,
> +	 * and the group 0 is the hierarchy root.
> +	 * Note there is no automatic dead loop protection.
> +	 * @see rte_flow_action_jump
> +	 */
> +	uint32_t group;
>  	uint32_t priority; /**< Rule priority level within group. */
>  	/**
>  	 * The rule in question applies to ingress traffic (non-"transfer").
> --
> 2.27.0

Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
  
Ferruh Yigit Feb. 9, 2023, 11:26 a.m. UTC | #2
On 2/9/2023 8:01 AM, Ori Kam wrote:
> Hi Rongwei,
> 
>> -----Original Message-----
>> From: Rongwei Liu <rongweil@nvidia.com>
>> Sent: Thursday, 9 February 2023 9:33
>>
>> Add more sentences to describe the group concepts
>> and define group 0 as root group for traffic to search a
>> hit rule.
>>
>> Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
> 
> Acked-by: Ori Kam <orika@nvidia.com>
> 

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index b60987db4b..321cf06fbc 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -86,7 +86,17 @@  extern "C" {
  * but may be valid in a few cases.
  */
 struct rte_flow_attr {
-	uint32_t group; /**< Priority group. */
+	/**
+	 * A group is a superset of multiple rules.
+	 * The default group is 0 and is processed for all packets.
+	 * Rules in other groups are processed only if the group is chained
+	 * by a jump action from a previously matched rule.
+	 * It means the group hierarchy is made by the flow rules,
+	 * and the group 0 is the hierarchy root.
+	 * Note there is no automatic dead loop protection.
+	 * @see rte_flow_action_jump
+	 */
+	uint32_t group;
 	uint32_t priority; /**< Rule priority level within group. */
 	/**
 	 * The rule in question applies to ingress traffic (non-"transfer").