[dpdk-dev] [PATCH v5 17/17] node: choose vector path at runtime
Jerin Jacob
jerinjacobk at gmail.com
Wed Oct 14 12:05:56 CEST 2020
On Tue, Oct 13, 2020 at 7:12 PM Ananyev, Konstantin
<konstantin.ananyev at intel.com> wrote:
>
> > When choosing the vector path, max SIMD bitwidth is now checked to
> > ensure the vector path is suitable. To do this, rather than the
> > scalar/vector lookup functions being called directly from the apps, a
> > generic function is called which will then call the scalar or vector
> > lookup function.
> >
> > Cc: Nithin Dabilpuram <ndabilpuram at marvell.com>
> > Cc: Pavan Nikhilesh <pbhagavatula at marvell.com>
> > Cc: Jerin Jacob <jerinj at marvell.com>
> > Cc: Kiran Kumar K <kirankumark at marvell.com>
> >
> > Signed-off-by: Ciara Power <ciara.power at intel.com>
> > ---
> > lib/librte_node/ip4_lookup.c | 13 +++++++++++--
> > lib/librte_node/ip4_lookup_neon.h | 2 +-
> > lib/librte_node/ip4_lookup_sse.h | 2 +-
> > 3 files changed, 13 insertions(+), 4 deletions(-)
> >
> > +static uint16_t
> > +ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node,
> > + void **objs, uint16_t nb_objs)
> > +{
> > +#if defined(RTE_MACHINE_CPUFLAG_NEON) || defined(RTE_ARCH_X86)
> > + if (rte_get_max_simd_bitwidth() >= RTE_SIMD_128)
> > + return ip4_lookup_node_process_vec(graph, node, objs, nb_objs);
> > #endif
> > + return ip4_lookup_node_process_scalar(graph, node, objs, nb_objs);
> > +}
>
> Just wonder can't this selection be done once at ip4_lookup_node_init()?
Yes. It is better to move ..process() selection in ip4_lookup_node_init()
More information about the dev
mailing list