[EXT] Re: [PATCH v3] vhost: fix build issues with GCC 12

Amit Prakash Shukla amitprakashs at marvell.com
Thu Oct 6 10:22:16 CEST 2022


Hi Maxime,

Compiled this patch with aarch64-linux-gnu-gcc (GCC) 12.2.0 and it compiles fine.

Thanks,
Amit Shukla

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Thursday, October 6, 2022 1:21 PM
> To: Stephen Hemminger <stephen at networkplumber.org>
> Cc: dev at dpdk.org; cheng1.jiang at intel.com; chenbo.xia at intel.com;
> zhoumin at loongson.cn; david.marchand at redhat.com;
> thomas at monjalon.net; stable at dpdk.org
> Subject: [EXT] Re: [PATCH v3] vhost: fix build issues with GCC 12
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Stephen,
> 
> On 10/6/22 02:01, Stephen Hemminger wrote:
> > On Wed,  5 Oct 2022 22:35:24 +0200
> > Maxime Coquelin <maxime.coquelin at redhat.com> wrote:
> >
> >> In practice, it would never happen since 'pkt->pkt_len' is unlikely
> >> to be close to UINT32_MAX, but let's just change 'size' to uint64_t
> >> to make the compiler happy without having to add runtime checks.
> >
> >
> > Would the standard typedef size_t work since that is what sizeof() returns.
> >
> 
> I'm not sure it would not create issues on 32 bits architectures build given
> size_t is 32bits in this case if I'm not mistaken, as it adds something to a u32,
> so it could wrap to 0.



More information about the stable mailing list