From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E0F1829CA for ; Thu, 29 Jun 2017 13:14:54 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2017 04:14:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,280,1496127600"; d="scan'208";a="102705984" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by orsmga004.jf.intel.com with ESMTP; 29 Jun 2017 04:14:53 -0700 To: "Wu, Jingjing" , Yong Wang Cc: "dev@dpdk.org" References: <1498215467-19681-1-git-send-email-wang.yong19@zte.com.cn> <9BB6961774997848B5B42BEC655768F810DB5C73@SHSMSX103.ccr.corp.intel.com> From: Ferruh Yigit Message-ID: <0c5aebf8-0fc0-122e-3977-cdfc39c825fc@intel.com> Date: Thu, 29 Jun 2017 12:14:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <9BB6961774997848B5B42BEC655768F810DB5C73@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix division by 0 error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 11:14:55 -0000 On 6/29/2017 6:18 AM, Wu, Jingjing wrote: > > >> -----Original Message----- >> From: Yong Wang [mailto:wang.yong19@zte.com.cn] >> Sent: Friday, June 23, 2017 6:58 PM >> To: Wu, Jingjing >> Cc: dev@dpdk.org; Yong Wang >> 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 > > > Acked-by: Jingjing Wu > 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)