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

Function acl_check_alg

dpdk/lib/acl/rte_acl.c:207–226  ·  view source on GitHub ↗

* Check if input alg is supported by given platform/binary. * Note that both conditions should be met: * - at build time compiler supports ISA used by given methods * - at run time target cpu supports necessary ISA. */

Source from the content-addressed store, hash-verified

205 * - at run time target cpu supports necessary ISA.
206 */
207static int
208acl_check_alg(enum rte_acl_classify_alg alg)
209{
210 switch (alg) {
211 case RTE_ACL_CLASSIFY_NEON:
212 return acl_check_alg_arm(alg);
213 case RTE_ACL_CLASSIFY_ALTIVEC:
214 return acl_check_alg_ppc(alg);
215 case RTE_ACL_CLASSIFY_AVX512X32:
216 case RTE_ACL_CLASSIFY_AVX512X16:
217 case RTE_ACL_CLASSIFY_AVX2:
218 case RTE_ACL_CLASSIFY_SSE:
219 return acl_check_alg_x86(alg);
220 /* scalar method is supported on all platforms */
221 case RTE_ACL_CLASSIFY_SCALAR:
222 return 0;
223 default:
224 return -EINVAL;
225 }
226}
227
228/*
229 * Get preferred alg for given platform.

Callers 2

acl_get_best_algFunction · 0.85
rte_acl_set_ctx_classifyFunction · 0.85

Calls 3

acl_check_alg_armFunction · 0.85
acl_check_alg_ppcFunction · 0.85
acl_check_alg_x86Function · 0.85

Tested by

no test coverage detected