From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 9312529CB for ; Fri, 14 Jul 2017 12:36:27 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id d193so10228931pgc.2 for ; Fri, 14 Jul 2017 03:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0Fh7h5WPlwPhqvWxfDMUdr+Nuz3W0BP8TF9CMfZ+2Ro=; b=ofU8Icv4pK27yXpZTWR/sYwVUzeez/DhEt/eIQGFELowGOD8eEr6+qgnmNzJXWaK3g NmLX3PsdXThjwjBiGOwxvP0Wmokq/Teeur1rq5HYlEJ3e6c7XrtAxD3VDTDhPu3hFwvR mNj65YSspgfWx5q6TiIuz8bYE5VN+8ohK8caRCLAWy4g29DzaQD63y4ru0dL8VsJKUuL /YVp6EI8Ns0Afb23hsKzy+bqUMf5hkmGDcP9cyNR2PbW2FSBupgjCuxgU2dY/TZWakvu YQZlOAstB7MPoE3x0UXFOBJIodn5msC3o07Pty6PullxFmSWYd2z450j/vBO6ztW3kuH CDYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0Fh7h5WPlwPhqvWxfDMUdr+Nuz3W0BP8TF9CMfZ+2Ro=; b=EjAAAZtgENciFOr1vx1BG2oeKF4uOqoeEFMKnQ2rjurKg2ax8W38S1xe3Gkg/4bATg uYo1v1kQrNG5ZanzpwJHpbLE/kvm8AlaBwrCvjhU2mN6sTtIgc/Q1QDS3xhv5OILiPnZ ku6rDKkev9ErYrMEwR0+bs8bzFn1etAMg3uoCCP0WVkai1xHKwdEuDztOjZomu17Rxht a6DQqytGijHoAiA6ZMi1oo3WLQpqL69id/L36w6xkP4dTCfcKZvrS8ceyID65D90BEuB QL0XX+H50ukb5PStA0OYDzlVnCXx5/7NJIVqTXm8N5xafNw03j1tAmHQmO/mJr9jFn4Y rvug== X-Gm-Message-State: AIVw111UVMOxnnx+0czJhfXqBoWBikQWsJOhDVz74sk9WxCW8X6CGvZE WRrl+4DfJNFDUSRr X-Received: by 10.84.191.129 with SMTP id a1mr15383718pld.272.1500028586939; Fri, 14 Jul 2017 03:36:26 -0700 (PDT) Received: from localhost.localdomain ([180.158.48.171]) by smtp.gmail.com with ESMTPSA id y205sm15273553pfb.124.2017.07.14.03.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Jul 2017 03:36:25 -0700 (PDT) From: Yuanhan Liu To: Yong Wang Cc: Jingjing Wu , dpdk stable Date: Fri, 14 Jul 2017 18:33:56 +0800 Message-Id: <1500028450-25989-32-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> References: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: fix division by 0' has been queued to LTS release 16.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 10:36:28 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/19/17. So please shout if anyone has objections. Thanks. --yliu --- >>From e4cfe6205efdff66da14ab233ba2f1cd2b3eb9be Mon Sep 17 00:00:00 2001 From: Yong Wang Date: Fri, 23 Jun 2017 06:57:47 -0400 Subject: [PATCH] net/i40e: fix division by 0 [ upstream commit b734923ddc348886bea968ecd4cda5090f2c2934 ] 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. Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Yong Wang Acked-by: Jingjing Wu --- drivers/net/i40e/i40e_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index afa2098..4a1f4c8 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -4012,6 +4012,8 @@ i40e_vsi_config_tc_queue_mapping(struct i40e_vsi *vsi, for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) if (enabled_tcmap & (1 << i)) total_tc++; + if (total_tc == 0) + total_tc = 1; vsi->enabled_tc = enabled_tcmap; /* Number of queues per enabled TC */ -- 2.7.4