src/dpdk/lib/librte_acl/rte_acl.c
static int
acl_check_alg(enum rte_acl_classify_alg alg)
{
	switch (alg) {
	case RTE_ACL_CLASSIFY_NEON:
		return acl_check_alg_arm(alg);
	case RTE_ACL_CLASSIFY_ALTIVEC:
		return acl_check_alg_ppc(alg);
	case RTE_ACL_CLASSIFY_AVX512X32:
	case RTE_ACL_CLASSIFY_AVX512X16:
	case RTE_ACL_CLASSIFY_AVX2:
	case RTE_ACL_CLASSIFY_SSE:
		return acl_check_alg_x86(alg);
	/* scalar method is supported on all platforms */
	case RTE_ACL_CLASSIFY_SCALAR:
		return 0;
	default:
		return -EINVAL;
	}
}
/*
 * 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.
 */
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.
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 .
static int
acl_check_alg(enum rte_acl_classify_alg alg)
{
	switch (alg) {
	case RTE_ACL_CLASSIFY_NEON:
		return acl_check_alg_arm(alg);
	case RTE_ACL_CLASSIFY_ALTIVEC:
		return acl_check_alg_ppc(alg);
	case RTE_ACL_CLASSIFY_AVX512X32:
	case RTE_ACL_CLASSIFY_AVX512X16:
	case RTE_ACL_CLASSIFY_AVX2:
	case RTE_ACL_CLASSIFY_SSE:
		return acl_check_alg_x86(alg);
	case RTE_ACL_CLASSIFY_SCALAR:
		return 0;
	default:
		return -EINVAL;
	}
}
static int acl_check_alg ( enum rte_acl_classify_alg alg ) { switch ( alg ) { case RTE_ACL_CLASSIFY_NEON : return acl_check_alg_arm ( alg ) ; case RTE_ACL_CLASSIFY_ALTIVEC : return acl_check_alg_ppc ( alg ) ; case RTE_ACL_CLASSIFY_AVX512X32 : case RTE_ACL_CLASSIFY_AVX512X16 : case RTE_ACL_CLASSIFY_AVX2 : case RTE_ACL_CLASSIFY_SSE : return acl_check_alg_x86 ( alg ) ; case RTE_ACL_CLASSIFY_SCALAR : return 0 ; default : return - EINVAL ; } }
Check if input alg is supported by given platform/binary.
Check if input alg is supported by given platform / binary .
/* scalar method is supported on all platforms */