Re: [PATCH] raw/ifpga: avoid potential integer overflow

2022-06-26 Thread Thomas Monjalon
> > Expression "tx_chunks * ctx->dma_buf_size" in dma_fpga_to_fpga() is > > evaluated > > using 32-bit arithmetic, which would overflow potentially. Change > > tx_chunks to > > type "uint64_t" to avoid such issue. > > > > Coverity issue: 379203 > > Fixes: 7d63899a5c19 ("raw/ifpga: add N3000 AFU

RE: [PATCH] raw/ifpga: avoid potential integer overflow

2022-06-22 Thread Xu, Rosen
Hi, > -Original Message- > From: Huang, Wei > Sent: Thursday, June 23, 2022 11:12 > To: dev@dpdk.org; tho...@monjalon.net; nipun.gu...@nxp.com; > hemant.agra...@nxp.com > Cc: sta...@dpdk.org; Xu, Rosen ; Zhang, Tianfei > ; Zhang, Qi Z ; Huang, Wei > > Subjec

RE: [PATCH] raw/ifpga: avoid potential integer overflow

2022-06-22 Thread Zhang, Tianfei
> -Original Message- > From: Huang, Wei > Sent: Thursday, June 23, 2022 11:12 AM > To: dev@dpdk.org; tho...@monjalon.net; nipun.gu...@nxp.com; > hemant.agra...@nxp.com > Cc: sta...@dpdk.org; Xu, Rosen ; Zhang, Tianfei > ; Zhang, Qi Z ; Huang, Wei > > Subjec

[PATCH] raw/ifpga: avoid potential integer overflow

2022-06-22 Thread Wei Huang
Expression "tx_chunks * ctx->dma_buf_size" in dma_fpga_to_fpga() is evaluated using 32-bit arithmetic, which would overflow potentially. Change tx_chunks to type "uint64_t" to avoid such issue. Coverity issue: 379203 Fixes: 7d63899a5c19 ("raw/ifpga: add N3000 AFU driver") Signed-off-by: Wei Huan