[RFC 1/2] ethdev: add group description

Rongwei Liu rongweil at nvidia.com
Thu Dec 1 09:20:04 CET 2022


Add more sentences to describe group concepts and define
group 0 as root group for traffic to search a hit rule.

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

diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index b60987db4b..2443c92c6c 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -86,6 +86,20 @@ extern "C" {
  * but may be valid in a few cases.
  */
 struct rte_flow_attr {
+	/**
+	 * Group is a superset of several rules and the user should always
+	 * set the flow rules starting from group 0. Jump action is used
+	 * to find the next rule set by specifying the group ID if matching
+	 * criteria are met.
+	 * The group ID which is to be jumped may be not contiguous with the
+	 * current flow rules' group ID, then the group IDs between them will
+	 * be skipped.
+	 *
+	 * The user should always organize flow rules from lower group to
+	 * higher group number otherwise, the dead loop is expected.
+	 *
+	 * Note: group 0 is shared between kernel and DPDK for bifurcated drivers.
+	 */
 	uint32_t group; /**< Priority group. */
 	uint32_t priority; /**< Rule priority level within group. */
 	/**
-- 
2.27.0



More information about the dev mailing list