> -----Original Message-----
> From: Eelco Chaudron <[email protected]>
> Sent: Thursday 2 June 2022 15:00
> To: Finn, Emma <[email protected]>
> Cc: Van Haaren, Harry <[email protected]>; Amber, Kumar
> <[email protected]>; Stokes, Ian <[email protected]>;
> [email protected]
> Subject: Re: [v6 02/11] odp-execute: Add function pointers to odp-execute
> for different action implementations.
>
> On 10 May 2022, at 16:21, Emma Finn wrote:
>
> > This commit introduces the initial infrastructure required to allow
> > different implementations for OvS actions. The patch introduces action
> > function pointers which allows user to switch between different action
> > implementations available. This will allow for more performance and
> > flexibility so the user can choose the action implementation to best suite
> their use case.
> >
> > Signed-off-by: Emma Finn <[email protected]>
> > Acked-by: Harry van Haaren <[email protected]>
> > ---
> > lib/automake.mk | 2 +
> > lib/dpif-netdev.c | 4 ++
> > lib/odp-execute-private.c | 94
> ++++++++++++++++++++++++++++++++++++++
> > lib/odp-execute-private.h | 96
> +++++++++++++++++++++++++++++++++++++++
> > lib/odp-execute.c | 39 ++++++++++++++--
> > lib/odp-execute.h | 4 ++
> > 6 files changed, 234 insertions(+), 5 deletions(-) create mode
> > 100644 lib/odp-execute-private.c create mode 100644
> > lib/odp-execute-private.h
> >
<snip unrelated diffs and discussion>
> > + actions_active_impl.funcs[attr_type](NULL, batch, a,
> > + should_steal);
>
> Why is the first parameter NULL? Could we pass in dp? However I do not
> see it used anywhere, so why not remove it completely?
>
> Same for should_steal, we do not need it as we handle only modification of
> packets, i.e. none data path actions.
>
> I have another general architecture question? What if for a specific packet
> (or batch of packets) the SIMD implementation is not able to process the
> packet/batch?
> How can we handle this in a uniform way? Can you give this some thought
> and add support?
We support 100% of the action (regardless of input packet, we perform same
action as scalar actions code). Autovalidation ensures the modifications are
identical.
As a result there is no value in a "fallback to scalar" backup, as this must
never occur.
> > + continue;
> > + }
> > +
> > + /* If the action was not handled by the active function pointers
> above,
> > + * process them by switching on the type below.
> > + */
> >
> > + switch (attr_type) {
> > case OVS_ACTION_ATTR_HASH: {
> > const struct ovs_action_hash *hash_act = nl_attr_get(a);
>
<snip unrelated diffs and discussion>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev