DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/sxe2: fix 32-bit SSE build
@ 2026-05-28  8:47 Thomas Monjalon
  2026-05-28  9:47 ` David Marchand
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2026-05-28  8:47 UTC (permalink / raw)
  To: dev; +Cc: Jie Liu

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-29 10:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28  8:47 [PATCH] net/sxe2: fix 32-bit SSE build Thomas Monjalon
2026-05-28  9:47 ` David Marchand
2026-05-28 10:58   ` Thomas Monjalon
2026-05-28 11:00     ` Thomas Monjalon
2026-05-29 10:24   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox