Skip to content

Commit

Permalink
acl: fix crash on PPC64 with GCC 11
Browse files Browse the repository at this point in the history
[ upstream commit 3f62bba2e7aa15e5f1e418cdced0f4160de154b3 ]

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

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
  • Loading branch information
drchristensen authored and bluca committed Mar 29, 2023
1 parent b776878 commit 01561c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/librte_acl/acl_run_altivec.h
Expand Up @@ -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)
{
Expand Down

0 comments on commit 01561c4

Please sign in to comment.