DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] ice: fix build error on 32bit configure
@ 2023-07-05  7:32 Yiding Zhou
  2023-07-05 19:44 ` Luca Boccassi
  0 siblings, 1 reply; 3+ messages in thread
From: Yiding Zhou @ 2023-07-05  7:32 UTC (permalink / raw)
  To: dev; +Cc: Yiding Zhou, stable, Qiming Yang, Qi Zhang, Wenzhuo Lu

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")
Cc: stable@dpdk.org

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index eec6ea2134..55840cf170 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -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;
 }
 
-- 
2.34.1


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

* Re: [PATCH] ice: fix build error on 32bit configure
  2023-07-05  7:32 [PATCH] ice: fix build error on 32bit configure Yiding Zhou
@ 2023-07-05 19:44 ` Luca Boccassi
  2023-07-06  6:02   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Boccassi @ 2023-07-05 19:44 UTC (permalink / raw)
  To: Yiding Zhou, dev

On Wed, 5 Jul 2023 at 08:21, Yiding Zhou <yidingx.zhou@intel.com> wrote:
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
> ---
>  drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
> index eec6ea2134..55840cf170 100644
> --- a/drivers/net/ice/ice_rxtx_vec_common.h
> +++ b/drivers/net/ice/ice_rxtx_vec_common.h
> @@ -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;
>  }

Tested-by: Luca Boccassi <bluca@debian.org>

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

* RE: [PATCH] ice: fix build error on 32bit configure
  2023-07-05 19:44 ` Luca Boccassi
@ 2023-07-06  6:02   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2023-07-06  6:02 UTC (permalink / raw)
  To: Luca Boccassi, Zhou, YidingX, dev



> -----Original Message-----
> From: Luca Boccassi <bluca@debian.org>
> Sent: Thursday, July 6, 2023 3:44 AM
> To: Zhou, YidingX <yidingx.zhou@intel.com>; dev@dpdk.org
> Subject: Re: [PATCH] ice: fix build error on 32bit configure
> 
> On Wed, 5 Jul 2023 at 08:21, Yiding Zhou <yidingx.zhou@intel.com> wrote:
> >
> > 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")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
> > ---
> >  drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ice/ice_rxtx_vec_common.h
> > b/drivers/net/ice/ice_rxtx_vec_common.h
> > index eec6ea2134..55840cf170 100644
> > --- a/drivers/net/ice/ice_rxtx_vec_common.h
> > +++ b/drivers/net/ice/ice_rxtx_vec_common.h
> > @@ -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;
> >  }
> 
> Tested-by: Luca Boccassi <bluca@debian.org>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2023-07-06  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05  7:32 [PATCH] ice: fix build error on 32bit configure Yiding Zhou
2023-07-05 19:44 ` Luca Boccassi
2023-07-06  6:02   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).