[dpdk-dev] [PATCH v7 2/8] fib: make lookup function type configurable

Vladimir Medvedkin medvedkinv at gmail.com
Wed Sep 30 13:06:20 CEST 2020


Hi Thomas,

чт, 16 июл. 2020 г. в 15:32, Thomas Monjalon <thomas at monjalon.net>:

> 13/07/2020 13:56, Vladimir Medvedkin:
> > Add type argument to dir24_8_get_lookup_fn()
> > Now it supports 3 different lookup implementations:
> >  RTE_FIB_DIR24_8_SCALAR_MACRO
> >  RTE_FIB_DIR24_8_SCALAR_INLINE
> >  RTE_FIB_DIR24_8_SCALAR_UNI
> >
> > Add new rte_fib_set_lookup_fn() - user can change lookup
> > function type runtime.
> >
> > Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
> [...]
> > --- a/lib/librte_fib/rte_fib.h
> > +++ b/lib/librte_fib/rte_fib.h
> > +enum rte_fib_dir24_8_lookup_type {
> > +     RTE_FIB_DIR24_8_SCALAR_MACRO,
> > +     RTE_FIB_DIR24_8_SCALAR_INLINE,
> > +     RTE_FIB_DIR24_8_SCALAR_UNI
> > +};
>
> Doxygen missing.
>
> [...]
> > +/**
> > + * Set lookup function based on type
> > + *
> > + * @param fib
> > + *   FIB object handle
> > + * @param type
> > + *   type of lookup function
> > + *
> > + * @return
> > + *    -EINVAL on failure
> > + *    0 on success
> > + */
> > +__rte_experimental
> > +int
> > +rte_fib_set_lookup_fn(struct rte_fib *fib,
> > +     enum rte_fib_dir24_8_lookup_type type);
>
> I think the types deserve to be documented,
> explaining why using one or the other.
>

I'm going to get rid of extra lookup types in next releases, so there will
be only well understandable SCALAR and VECTOR types

>
>


-- 
Regards,
Vladimir


More information about the dev mailing list