[dpdk-dev] [PATCH] eal/ppc: fix redefine bool type

Ori Kam orika at mellanox.com
Thu Apr 30 10:53:49 CEST 2020


Hi  David,

> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Wednesday, April 29, 2020 11:17 AM
> To: Ori Kam <orika at mellanox.com>
> Cc: Thomas Monjalon <thomas at monjalon.net>; Matan Azrad
> <matan at mellanox.com>; Shahaf Shuler <shahafs at mellanox.com>; Slava
> Ovsiienko <viacheslavo at mellanox.com>; David Christensen
> <drc at linux.vnet.ibm.com>; dev <dev at dpdk.org>; Yigit, Ferruh
> <ferruh.yigit at intel.com>
> Subject: Re: [dpdk-dev] [PATCH] eal/ppc: fix redefine bool type
> 
> 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.
> 

I will add the missing code.

> $ 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?
> 
Just to make it in the same part as other rte includes.
> 
> >
> >  #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