[dpdk-dev] [PATCH v5 16/17] net: add checks for max SIMD bitwidth
Olivier Matz
olivier.matz at 6wind.com
Tue Oct 13 13:32:09 CEST 2020
Hi Ciara,
On Tue, Oct 13, 2020 at 12:04:36PM +0100, Ciara Power wrote:
> When choosing a vector path to take, an extra condition must be
> satisfied to ensure the max SIMD bitwidth allows for the CPU enabled
> path.
>
> The vector path was initially chosen in RTE_INIT, however this is no
> longer suitable as we cannot check the max SIMD bitwidth at that time.
> Default handlers are now chosen in RTE_INIT, these default handlers
> are used the first time the crc calc is called, and they set the suitable
> handlers to be used going forward.
>
> Suggested-by: Jasvinder Singh <jasvinder.singh at intel.com>
> Suggested-by: Olivier Matz <olivier.matz at 6wind.com>
>
> Signed-off-by: Ciara Power <ciara.power at intel.com>
>
[...]
> --- a/lib/librte_net/rte_net_crc.h
> +++ b/lib/librte_net/rte_net_crc.h
> @@ -7,6 +7,8 @@
>
> #include <stdint.h>
>
> +#include <rte_log.h>
> +
> #ifdef __cplusplus
> extern "C" {
> #endif
> @@ -25,6 +27,12 @@ enum rte_net_crc_alg {
> RTE_NET_CRC_NEON,
> };
>
> +extern int libnet_logtype;
> +
> +#define NET_LOG(level, fmt, args...) \
> + rte_log(RTE_LOG_ ## level, libnet_logtype, "%s(): " fmt "\n", \
> + __func__, ## args)
> +
> /**
> * This API set the CRC computation algorithm (i.e. scalar version,
> * x86 64-bit sse4.2 intrinsic version, etc.) and internal data
We should expose this log macro and log type in a public header file. It
can stay in the .c file. In the future, we may want to expose it in a
private header, but not in a public API.
Regards,
Olivier
More information about the dev
mailing list