Skip to contentSkip to conversation

ice: fix build error on 32bit configure

PATCH Applied Yiding Zhou 3 participants 3 messages Jul 5, 2023 – Jul 6, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: fix build error on 32bit configure

Replace 'rte_memcpy' with 'memcpy' like other PMD code to avoid errors when compiling with GCC-12 on 32-bit configure.

Compiler reports the follow error:

error: array subscript 8 is outside array bounds of "struct rte_mbuf *[32]" [-Werror=array-bounds]

Fixes c68a52b8b38c ("net/ice: support vector SSE in Rx")
---
 drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_rxtx_vec_common.h +1 -1
index eec6ea2134..55840cf170 100644
@@ -72,7 +72,7 @@ ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 	/* save the partial packet for next time */
 	rxq->pkt_first_seg = start;
 	rxq->pkt_last_seg = end;
-	rte_memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
+	memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
 	return pkt_idx;
 }
 
Signature · 1 line
2.34.1
Tested-by on v1 1/1
#1 lore raw
Quoted 22 lines · Yiding Zhou

Replace 'rte_memcpy' with 'memcpy' like other PMD code to avoid errors when compiling with GCC-12 on 32-bit configure.

Compiler reports the follow error:

error: array subscript 8 is outside array bounds of "struct rte_mbuf *[32]" [-Werror=array-bounds]

Fixes c68a52b8b38c ("net/ice: support vector SSE in Rx")
---
 drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_rxtx_vec_common.h +0 -0
index eec6ea2134..55840cf170 100644

drivers/net/ice/ice_rxtx_vec_common.h ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs, · line 77

Quoted 7 lines
drivers/net/ice/ice_rxtx_vec_common.h +1 -1
@@ -72,7 +72,7 @@ ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,
        /* save the partial packet for next time */
        rxq->pkt_first_seg = start;
        rxq->pkt_last_seg = end;
-       rte_memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
+       memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
        return pkt_idx;
 }
Applied
#2 lore raw
Quoted 41 lines

-----Original Message-----
From: Luca Boccassi <[email protected]>
Sent: Thursday, July 6, 2023 3:44 AM
To: Zhou, YidingX <[email protected]>; [email protected]
Subject: Re: [PATCH] ice: fix build error on 32bit configure

drivers/net/ice/ice_rxtx_vec_common.h ice_rx_reassemble_packets(struct ice_rx_queue *rxq,

Quoted 23 lines · Yiding Zhou

Replace 'rte_memcpy' with 'memcpy' like other PMD code to avoid errors when compiling with GCC-12 on 32-bit configure.

Compiler reports the follow error:

error: array subscript 8 is outside array bounds of "struct rte_mbuf *[32]" [-Werror=array-bounds]

Fixes c68a52b8b38c ("net/ice: support vector SSE in Rx")
---
 drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_rxtx_vec_common.h +0 -0
index eec6ea2134..55840cf170 100644
@@ -72,7 +72,7 @@ ice_rx_reassemble_packets(struct ice_rx_queue *rxq,

struct rte_mbuf **rx_bufs,

drivers/net/ice/ice_rxtx_vec_common.h ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs, · line 77

Quoted 7 lines
drivers/net/ice/ice_rxtx_vec_common.h +1 -1
        /* save the partial packet for next time */
        rxq->pkt_first_seg = start;
        rxq->pkt_last_seg = end;
-       rte_memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
+       memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
        return pkt_idx;
 }
Quoted 1 line

Applied to dpdk-next-net-intel.

Thanks
Qi