[dpdk-dev] [PATCH] net/iavf: fix overflow in maximum packet length config

Zhang, Qi Z qi.z.zhang at intel.com
Mon Aug 30 03:04:37 CEST 2021



> -----Original Message-----
> From: Tudor Cornea <tudor.cornea at gmail.com>
> Sent: Thursday, August 5, 2021 7:35 PM
> To: Wu, Jingjing <jingjing.wu at intel.com>; Xing, Beilei <beilei.xing at intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; dev at dpdk.org; Tudor Cornea
> <tudor.cornea at gmail.com>
> Subject: [PATCH] net/iavf: fix overflow in maximum packet length config
> 
> The len variable, used in the computation of max_pkt_len could overflow, if
> used to store the result of the following computation:
> 
> rxq->rx_buf_len * IAVF_MAX_CHAINED_RX_BUFFERS
> 
> Since, we could define the mbuf size to have a large value (i.e 13312), and
> IAVF_MAX_CHAINED_RX_BUFFERS is defined as 5, the computation mentioned
> above could potentially result in a value which might be bigger than
> MAX_USHORT.
> 
> The result will be that Jumbo Frames will not work properly
> 
> A similar fix was submitted for the ice driver

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable at dpdk.org

> 
> Signed-off-by: Tudor Cornea <tudor.cornea at gmail.com>

Acked-by: Qi Zhang <qi.z.zhang at intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi



More information about the dev mailing list