[dpdk-dev] [PATCH v6 3/4] net: add arm64 neon version of CRC compute APIs

Thomas Monjalon thomas at monjalon.net
Tue Jul 4 15:53:48 CEST 2017


04/07/2017 11:24, Ashwin Sekhar T K:
>  rte_net_crc_set_alg(enum rte_net_crc_alg alg)
>  {
>         switch (alg) {
> -       case RTE_NET_CRC_SSE42:
>  #ifdef X86_64_SSE42_PCLMULQDQ
> +       case RTE_NET_CRC_SSE42:
>                 handlers = handlers_sse42;
> -#else
> -               alg = RTE_NET_CRC_SCALAR;
> -#endif
>                 break;
> +#elif defined(ARM64_NEON_PMULL)
> +       case RTE_NET_CRC_NEON:
> +               if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_PMULL)) {
> +                       handlers = handlers_neon;
> +                       break;
> +               }
> +               /* fall-through */
> +#endif
>         case RTE_NET_CRC_SCALAR:
> +               /* fall-through */
>         default:
>                 handlers = handlers_scalar;
>                 break;
> 

I'm moving the fall-through comment outside of #ifdef
to fix warning.



More information about the dev mailing list