From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Jie Liu <liujie5@linkdatatechnology.com>
Subject: [PATCH] net/sxe2: fix 32-bit SSE build
Date: Thu, 28 May 2026 10:47:16 +0200 [thread overview]
Message-ID: <20260528084717.1754057-1-thomas@monjalon.net> (raw)
Seen in OBS on i586 Debian:
from ../drivers/net/sxe2/sxe2_txrx_vec_sse.c:5:
In function ‘_mm_loadu_si128’,
inlined from ‘rte_memcpy’
inlined from ‘sxe2_rx_pkts_refactor’
at ../drivers/net/sxe2/sxe2_txrx_vec_common.h:233:2:
/usr/lib/gcc/i686-linux-gnu/12/include/emmintrin.h:703:10: error:
array subscript 8 is outside array bounds of ‘struct rte_mbuf *[32]’
The important options to reproduce are "-m32 -O2 -march=corei7".
In 32-bit build the pointer array done_pkts[32] is smaller:
32 * 4 = 128 bytes
so an SSE access would be outside the bound.
The libc memcpy does not trigger such warning
and is a good choice to copy an array of pointers.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/sxe2/sxe2_txrx_vec_common.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/sxe2/sxe2_txrx_vec_common.h b/drivers/net/sxe2/sxe2_txrx_vec_common.h
index 99e1663f03..6b1649c390 100644
--- a/drivers/net/sxe2/sxe2_txrx_vec_common.h
+++ b/drivers/net/sxe2/sxe2_txrx_vec_common.h
@@ -230,7 +230,8 @@ sxe2_rx_pkts_refactor(struct sxe2_rx_queue *rxq,
}
rxq->pkt_first_seg = first_seg;
rxq->pkt_last_seg = last_seg;
- rte_memcpy(mbuf_bufs, done_pkts, done_num * (sizeof(struct rte_mbuf *)));
+ memcpy(mbuf_bufs, done_pkts, done_num * sizeof(*done_pkts));
return done_num;
}
+
#endif /* SXE2_TXRX_VEC_COMMON_H */
--
2.54.0
next reply other threads:[~2026-05-28 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 8:47 Thomas Monjalon [this message]
2026-05-28 9:47 ` [PATCH] net/sxe2: fix 32-bit SSE build David Marchand
2026-05-28 10:58 ` Thomas Monjalon
2026-05-28 11:00 ` Thomas Monjalon
2026-05-29 10:24 ` 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=20260528084717.1754057-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=liujie5@linkdatatechnology.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