Re: [dpdk-dev] [PATCH v7 2/8] fib: make lookup function type configurable
From: Thomas Monjalon <hidden>
Date: 2020-07-16 14:32:55
From: Thomas Monjalon <hidden>
Date: 2020-07-16 14:32:55
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 <redacted>
[...]
--- 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.