[PATCH v5] ethdev: add flow rule group description
Rongwei Liu
rongweil at nvidia.com
Thu Feb 9 03:06:56 CET 2023
HI Ferruh:
BR
Rongwei
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at amd.com>
> Sent: Thursday, February 9, 2023 04:28
> To: Rongwei Liu <rongweil at nvidia.com>; dev at dpdk.org; Matan Azrad
> <matan at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>; Ori Kam
> <orika at nvidia.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> <thomas at monjalon.net>
> Cc: Raslan Darawsheh <rasland at nvidia.com>; Andrew Rybchenko
> <andrew.rybchenko at oktetlabs.ru>
> Subject: Re: [PATCH v5] ethdev: add flow rule group description
>
> External email: Use caution opening links or attachments
>
>
> On 2/7/2023 2:57 AM, Rongwei Liu wrote:
> > 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 at nvidia.com>
> > Acked-by: Ori Kam <orika at nvidia.com>
> > ---
> > lib/ethdev/rte_flow.h | 13 ++++++++++++-
> > 1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index
> > b60987db4b..e71ac0c199 100644
> > --- a/lib/ethdev/rte_flow.h
> > +++ b/lib/ethdev/rte_flow.h
> > @@ -86,7 +86,18 @@ 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.
> > + * The group 0 of bifurcated drivers is shared with the kernel.
> > + * 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;
>
> Hi Rongwei, Ori,
>
> The elaborated comment looks matching with flow API documentation [1],
> except there is additional information here about default group being shared
> with kernel for bifurcated drivers.
>
> Should this additional information added to the flow API documentation?
Agree with you, it' better to be present at NIC documents.
>
>
>
> [1]
> https://doc.dpdk.org/guides/prog_guide/rte_flow.html
>
More information about the dev
mailing list