numam-dpdk/examples/l3fwd
Guduri Prathyusha 01ac23460c examples/l3fwd: fix aliasing in port grouping
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: 569b290cdb ("examples/l3fwd: add NEON implementation")
Cc: stable@dpdk.org

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
2017-11-07 09:04:42 +00:00
..
l3fwd_altivec.h examples/l3fwd: optimize packet processing on powerpc 2017-10-14 00:51:19 +02:00
l3fwd_common.h ethdev: increase port id range 2017-10-06 18:23:25 +02:00
l3fwd_em_hlm_neon.h examples/l3fwd: add NEON implementation 2017-07-04 17:41:53 +02:00
l3fwd_em_hlm_sse.h examples/l3fwd: reorganise multi hash lookup 2017-07-04 17:25:01 +02:00
l3fwd_em_hlm.h ethdev: increase port id range 2017-10-06 18:23:25 +02:00
l3fwd_em_sequential.h examples: fix port id type 2017-10-13 21:57:49 +02:00
l3fwd_em.c examples: fix port id type 2017-10-13 21:57:49 +02:00
l3fwd_em.h ethdev: increase port id range 2017-10-06 18:23:25 +02:00
l3fwd_lpm_altivec.h examples/l3fwd: optimize packet processing on powerpc 2017-10-14 00:51:19 +02:00
l3fwd_lpm_neon.h ethdev: increase port id range 2017-10-06 18:23:25 +02:00
l3fwd_lpm_sse.h ethdev: increase port id range 2017-10-06 18:23:25 +02:00
l3fwd_lpm.c examples/l3fwd: optimize packet processing on powerpc 2017-10-14 00:51:19 +02:00
l3fwd_lpm.h ethdev: increase port id range 2017-10-06 18:23:25 +02:00
l3fwd_neon.h examples/l3fwd: fix aliasing in port grouping 2017-11-07 09:04:42 +00:00
l3fwd_sse.h examples/l3fwd: extract common code from multi packet send 2017-07-04 17:41:53 +02:00
l3fwd.h ethdev: increase port id range 2017-10-06 18:23:25 +02:00
main.c remove useless memzone includes 2017-11-06 22:12:08 +01:00
Makefile fix typos using codespell utility 2017-06-14 23:54:13 +02:00