[dpdk-dev] [PATCH] eal/ppc: fix redefine bool type
David Marchand
david.marchand at redhat.com
Wed Apr 29 10:17:07 CEST 2020
On Tue, Apr 28, 2020 at 9:59 AM Ori Kam <orika at mellanox.com> wrote:
>
> The AltiVec header file breaks boolean type. [1] [2]
>
> Currently the workaround was located only in mlx5 device.
> Adding the trace module caused this issue to appear again, due to
> order of includes, it keeps overriding the local fix.
>
> This patch solves this issue by resetting the bool type, immediately
> after it is being changed.
With this patch applied, there are still a few remaining spots as
mentioned by David C.
I see rte_vect.h too.
$ git grep -w altivec.h
MAINTAINERS:F: examples/l3fwd/*altivec.h
drivers/net/i40e/i40e_rxtx_vec_altivec.c:#include <altivec.h>
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h:#include <altivec.h>
drivers/net/virtio/virtio_rxtx_simple_altivec.c:#include <altivec.h>
lib/librte_eal/ppc/include/rte_altivec.h:/* To include altivec.h, GCC
version must be >= 4.8 */
lib/librte_eal/ppc/include/rte_altivec.h:#include <altivec.h>
lib/librte_eal/ppc/include/rte_vect.h:#include <altivec.h>
> diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
> index 25311ba..d234e21 100644
> --- a/lib/librte_eal/ppc/include/rte_memcpy.h
> +++ b/lib/librte_eal/ppc/include/rte_memcpy.h
> @@ -8,13 +8,12 @@
>
> #include <stdint.h>
> #include <string.h>
> -/*To include altivec.h, GCC version must >= 4.8 */
> -#include <altivec.h>
Why move the inclusion under the __cplusplus check?
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> +#include "rte_altivec.h"
> #include "generic/rte_memcpy.h"
>
> static inline void
> --
> 1.8.3.1
>
Thanks.
--
David Marchand
More information about the dev
mailing list