Skip to contentSkip to conversation

acl: fix autotest failures on ppc64le with gcc 11

PATCH Applied David Christensen 2 participants 2 messages Mar 22, 2023 – Mar 28, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acl: fix autotest failures on ppc64le with gcc 11

Original acl implementation of Altivec optimized code included an explicit -O2 optimization level for a particular inlined function. When DPDK is built with the default -O3 optimization level on gcc 11.x or later, the resulting code may generate a segmentation fault as observed in acl_autotest.

Since there is no explicit reason given for the local function optimization level in the original commit, and testing with gcc versions 8.x through 12.x results in working code at all -O optimization settings, the local optimization is removed.

Bugzilla ID: 1197
Cc: [email protected]

---
 lib/acl/acl_run_altivec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/acl/acl_run_altivec.h +1 -1
index 4dfe7a14b4..4556e1503b 100644
@@ -102,7 +102,7 @@ acl_match_check_x4(int slot, const struct rte_acl_ctx *ctx, struct parms *parms,
 /*
  * Process 4 transitions (in 2 XMM registers) in parallel
  */
-static inline __attribute__((optimize("O2"))) xmm_t
+static __rte_always_inline xmm_t
 transition4(xmm_t next_input, const uint64_t *trans,
 	xmm_t *indices1, xmm_t *indices2)
 {
Signature · 1 line
2.31.1
#1 lore raw

22/03/2023 18:29, David Christensen:

Quoted 11 lines

Original acl implementation of Altivec optimized code included an explicit -O2 optimization level for a particular inlined function. When DPDK is built with the default -O3 optimization level on gcc 11.x or later, the resulting code may generate a segmentation fault as observed in acl_autotest.

Since there is no explicit reason given for the local function optimization level in the original commit, and testing with gcc versions 8.x through 12.x results in working code at all -O optimization settings, the local optimization is removed.

Quoted 5 lines

Bugzilla ID: 1197
Cc: [email protected]

Applied, thanks.