[dpdk-dev] [PATCH v2] net/i40e: fix division by 0 error

Ferruh Yigit ferruh.yigit at intel.com
Thu Jun 29 13:14:52 CEST 2017


On 6/29/2017 6:18 AM, Wu, Jingjing wrote:
> 
> 
>> -----Original Message-----
>> From: Yong Wang [mailto:wang.yong19 at zte.com.cn]
>> Sent: Friday, June 23, 2017 6:58 PM
>> To: Wu, Jingjing <jingjing.wu at intel.com>
>> Cc: dev at dpdk.org; Yong Wang <wang.yong19 at zte.com.cn>
>> Subject: [PATCH v2] net/i40e: fix division by 0 error
>>
>> In function i40e_vsi_config_tc_queue_mapping(), if 'enabled_tcmap' is 0,
>> 'total_tc' might be 0. Then 'total_tc' might be used in a division by 0 in
>> "qpnum_per_tc = i40e_align_floor(vsi->nb_qps / total_tc)". Fix it by changing
>> 'total_tc' from 0 to 1 just as func
>> i40e_vsi_update_queue_mapping() does.
>>
>> Signed-off-by: Yong Wang <wang.yong19 at zte.com.cn>
> 
> 
> Acked-by: Jingjing Wu <jingjing.wu at intel.com>
> 

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Applied to dpdk-next-net/master, thanks.


(Adding braces to for loop not required and not related the patch,
removed from patch)


More information about the dev mailing list