patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: dev@dpdk.org
Cc: David Christensen <drc@linux.vnet.ibm.com>,
	stable@dpdk.org, Thinh Tran <thinhtr@linux.vnet.ibm.com>
Subject: [PATCH] acl: fix autotest failures on ppc64le with gcc 11
Date: Wed, 22 Mar 2023 13:29:33 -0400	[thread overview]
Message-ID: <20230322172933.461482-1-drc@linux.vnet.ibm.com> (raw)

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: stable@dpdk.org

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
---
 lib/acl/acl_run_altivec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/acl/acl_run_altivec.h b/lib/acl/acl_run_altivec.h
index 4dfe7a14b4..4556e1503b 100644
--- a/lib/acl/acl_run_altivec.h
+++ b/lib/acl/acl_run_altivec.h
@@ -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)
 {
-- 
2.31.1


             reply	other threads:[~2023-03-22 17:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 17:29 David Christensen [this message]
2023-03-28 16:29 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230322172933.461482-1-drc@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thinhtr@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).