[PATCH] ethdev: introduce generic flow item and action
Dumitrescu, Cristian
cristian.dumitrescu at intel.com
Wed Aug 16 15:12:10 CEST 2023
Hi Ori,
<snip>
> > > Can you show me what items/actions are missing in rte_flow?
> >
> > The number of flow items (protocol headers, but also metadata) and flow
> > actions
> > that users can define in their P4 programs is infinite, so unfortunately Ori, as
> > much
> > as I want to grant you this wish, I am not going to be able to 😊. Also, it is
> > important to note that the users write their P4 program (defining their data
> > path
> > pipeline) without any involvement from their device vendor, so the vendor
> is
> > simply
> > not aware of meaning of the user's flow items and actions either.
> >
>
> Maybe we should add an API to register actions/items, but at the end we
> don't want to write code
> Twice, meaning if action is already supported by the current API there is no
> reason to use different
> API.
> maybe we can add a small translation function the a PMD can convert actions
> and output the right
> rte_flow actions/items, and if it can't, it can create a user action
>
This is a very interesting idea, do you mean that we can allow the user to
register their own flow items and actions on top on the existing ones that
are already provided by RTE_FLOW?
Something similar to these ones below?
int
rte_flow_item_register(uint16_t port_id,
int flow_item_id,
size_t flow_item_length,
const char *flow_item_description,
struct rte_flow_error *error);
struct rte_flow_action_argument {
size_t argument_length;
const char *argument_description;
};
int
rte_flow_action_register(uint16_t port_id,
int action_id,
uint32_t action_args_num,
const struct rte_flow_action_argument *action_args,
struct rte_flow_error *error);
<snip>
Regards,
Cristian
More information about the dev
mailing list