VPP-1284: Fix for TLS corruption on ARM platforms 62/12762/2
authorSachin Saxena <sachin.saxena@nxp.com>
Mon, 28 May 2018 04:15:12 +0000 (09:45 +0530)
committerDamjan Marion <dmarion.lists@gmail.com>
Mon, 28 May 2018 12:03:02 +0000 (12:03 +0000)
 - The issue is appearing on ARM platofrms where DPDK drivers are also using
   __thread TLS vairables.
 - The issue was only appearing with dpdk as plgin to VPP and not if used
   as statically link with VPP.
 - Using traditional TLS scheme resolved the issue.

Change-Id: Ifb4c667fdd217c2b1d79be8a541a2c983222d95a
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
build-data/platforms/dpaa.mk

index e0a37fa..fadc592 100644 (file)
@@ -72,7 +72,7 @@ vpp_configure_args_dpaa += $(VPP_CFG_ARGS)
 endif
 
 
-dpaa_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -fstack-protector-all -DFORTIFY_SOURCE=2 \
+dpaa_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -fstack-protector-all -DFORTIFY_SOURCE=2 -mtls-dialect=trad \
                        -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
 dpaa_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fstack-protector-all -DFORTIFY_SOURCE=2 \
                        -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -L$(OPENSSL_PATH)/lib
@@ -80,7 +80,7 @@ dpaa_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fstack-protector-all -DFORTIFY_SOU
 
 # Use -rdynamic is for stack tracing, O0 for debugging....default is O2
 # Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
-dpaa_TAG_CFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) \
+dpaa_TAG_CFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) -mtls-dialect=trad \
                -mtune=$(dpaa_mtune) -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
 dpaa_TAG_LDFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) \
                -mtune=$(dpaa_mtune) -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -L$(OPENSSL_PATH)/lib