MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_vector_fn

Function get_vector_fn

dpdk/lib/fib/dir24_8.c:62–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62static inline rte_fib_lookup_fn_t
63get_vector_fn(enum rte_fib_dir24_8_nh_sz nh_sz)
64{
65#ifdef CC_DIR24_8_AVX512_SUPPORT
66 if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) <= 0) ||
67 (rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_512))
68 return NULL;
69
70 switch (nh_sz) {
71 case RTE_FIB_DIR24_8_1B:
72 return rte_dir24_8_vec_lookup_bulk_1b;
73 case RTE_FIB_DIR24_8_2B:
74 return rte_dir24_8_vec_lookup_bulk_2b;
75 case RTE_FIB_DIR24_8_4B:
76 return rte_dir24_8_vec_lookup_bulk_4b;
77 case RTE_FIB_DIR24_8_8B:
78 return rte_dir24_8_vec_lookup_bulk_8b;
79 default:
80 return NULL;
81 }
82#else
83 RTE_SET_USED(nh_sz);
84#endif
85 return NULL;
86}
87
88rte_fib_lookup_fn_t
89dir24_8_get_lookup_fn(void *p, enum rte_fib_lookup_type type)

Callers 1

dir24_8_get_lookup_fnFunction · 0.70

Calls 2

rte_cpu_get_flag_enabledFunction · 0.50

Tested by

no test coverage detected