ice: fix build error on 32bit configure
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]
--- 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
@@ -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
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")Signed-off-by Yiding Zhou <[email protected]>--- 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
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; }
Zhang, Qi Z
AppliedQuoted 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 configuredrivers/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")Signed-off-by Yiding Zhou <[email protected]>--- 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@@ -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
Tested-by Luca Boccassi <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi