[dpdk-dev] [PATCH v2] eal: ignore alignment warnings for x86 vector

Wang, Haiyue haiyue.wang at intel.com
Wed Apr 29 18:17:21 CEST 2020


> -----Original Message-----
> From: Kevin Traynor <ktraynor at redhat.com>
> Sent: Wednesday, April 29, 2020 16:41
> To: Wang, Haiyue <haiyue.wang at intel.com>; dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>;
> Ananyev, Konstantin <konstantin.ananyev at intel.com>; Stokes, Ian <ian.stokes at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2] eal: ignore alignment warnings for x86 vector
> 
> On 29/04/2020 07:49, Haiyue Wang wrote:
> > There several alignment warnings when including rte_memcpy header file
> > externally like OVS for x86.
> >
> > Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
> > ---
> > v2: Use __GUNC__ macro to apply for suppressing  the warning.
> > ---
> >  lib/librte_eal/x86/include/rte_memcpy.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
> > index ba44c4a32..d4cfe8dd5 100644
> > --- a/lib/librte_eal/x86/include/rte_memcpy.h
> > +++ b/lib/librte_eal/x86/include/rte_memcpy.h
> > @@ -22,6 +22,10 @@
> >  extern "C" {
> >  #endif
> >
> > +#ifdef __GNUC__
> > +#pragma GCC diagnostic ignored "-Wcast-align"
> > +#endif
> > +
> 
> Hi - have a look at this thread and the comments about a similar topic,
> they are relevant here too.
> http://inbox.dpdk.org/dev/20200416184549.10747-1-ktraynor@redhat.com/
> 

This issue happened on GCC 9.3.0 and build DPDK successfully, but compiling
the OVS-DPDK has lot of warnings. Do we need to fix this ?

> >  /**
> >   * Copy bytes from one location to another. The locations must not overlap.
> >   *
> >



More information about the dev mailing list