[dpdk-dev] [PATCH v2] examples/l3fwd: fix aliasing in port grouping

Jianbo Liu Jianbo.Liu at arm.com
Mon Nov 6 09:18:06 CET 2017


The 11/06/2017 09:59, Jerin Jacob wrote:
> -----Original Message-----
> > Date: Fri,  3 Nov 2017 16:13:51 +0530
> > From: Guduri Prathyusha <gprathyusha at caviumnetworks.com>
> > To: tomasz.kantecki at intel.com
> > CC: Jianbo.Liu at arm.com, guduriprathyusha at gmail.com,
> >  konstantin.ananyev at intel.com, dev at dpdk.org, Guduri Prathyusha
> >  <gprathyusha at caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH v2] examples/l3fwd: fix aliasing in port grouping
> > X-Mailer: git-send-email 2.14.1
> >
> > With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives
> > undefined behavior in port_groupx4 in ARM. 'pn' and 'pnum' are
> > two different pointers pointing to same chunk of memory and
> > with -f-strict-aliasing the pointers are assumed to be pointing to
> > different memory and compiler reorders instructions that depend on
> > pnum and pn. This breaks port grouping algorithm.
> >
> > This patch eliminates the above problem by introducing a compiler
> > barrier between the instructions that depend on pnum, pn and lp.
> >
> > Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
> >
> > Signed-off-by: Guduri Prathyusha <gprathyusha at caviumnetworks.com>
>
> Acked-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
>

Acked-by: Jianbo Liu <jianbo.liu at arm.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the dev mailing list