* [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
* Re: [PATCH] net/sxe2: fix 32-bit SSE build
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-29 10:24 ` Thomas Monjalon
0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2026-05-28 9:47 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Jie Liu
On Thu, 28 May 2026 at 10:47, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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>
I reproduced and checked Debian 13 32 bits build with OBS.
Tested-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net/sxe2: fix 32-bit SSE build
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
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2026-05-28 10:58 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Jie Liu
28/05/2026 11:47, David Marchand:
> On Thu, 28 May 2026 at 10:47, Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 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>
>
> I reproduced and checked Debian 13 32 bits build with OBS.
> Tested-by: David Marchand <david.marchand@redhat.com>
Thanks for testing.
I forgot this:
Fixes: 885647d31504 ("net/sxe2: fix 32-bit SSE build")
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] net/sxe2: fix 32-bit SSE build
2026-05-28 10:58 ` Thomas Monjalon
@ 2026-05-28 11:00 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2026-05-28 11:00 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Jie Liu
28/05/2026 12:58, Thomas Monjalon:
> 28/05/2026 11:47, David Marchand:
> > On Thu, 28 May 2026 at 10:47, Thomas Monjalon <thomas@monjalon.net> wrote:
> > >
> > > 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>
> >
> > I reproduced and checked Debian 13 32 bits build with OBS.
> > Tested-by: David Marchand <david.marchand@redhat.com>
>
> Thanks for testing.
>
> I forgot this:
>
> Fixes: 885647d31504 ("net/sxe2: fix 32-bit SSE build")
Of course I meant
Fixes: ac60f302cbef ("net/sxe2: add vectorized Rx and Tx")
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net/sxe2: fix 32-bit SSE build
2026-05-28 9:47 ` David Marchand
2026-05-28 10:58 ` Thomas Monjalon
@ 2026-05-29 10:24 ` Thomas Monjalon
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2026-05-29 10:24 UTC (permalink / raw)
To: Jie Liu; +Cc: dev, David Marchand
28/05/2026 11:47, David Marchand:
> On Thu, 28 May 2026 at 10:47, Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 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>
>
> I reproduced and checked Debian 13 32 bits build with OBS.
> Tested-by: David Marchand <david.marchand@redhat.com>
Fixes: ac60f302cbef ("net/sxe2: add vectorized Rx and Tx")
Applied
^ permalink raw reply [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