[PATCH] net/sxe2: fix 32-bit SSE build

Thomas Monjalon thomas at monjalon.net
Thu May 28 10:47:16 CEST 2026


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 at 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



More information about the dev mailing list