From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5C5322BE1; Fri, 24 Mar 2017 03:50:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490323855; x=1521859855; h=from:to:cc:subject:date:message-id; bh=baK0GBQXz18WvTOrBK9FuQloNdVVzMc1miIYrXL4cyU=; b=wlKMTF6UP/cvmfjbOnTaxxEfnZlpXSOhfusoDSGJEnYNQA+r2U1GCQhM m4A+tIYMVx4oJyZ6mN2+UDnp5s+91w==; Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2017 19:50:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,213,1486454400"; d="scan'208";a="239778288" Received: from dpdk26.sh.intel.com ([10.239.128.228]) by fmsmga004.fm.intel.com with ESMTP; 23 Mar 2017 19:50:52 -0700 From: Wenzhuo Lu To: dev@dpdk.org Cc: Wenzhuo Lu , stable@dpdk.org Date: Fri, 24 Mar 2017 10:51:03 +0800 Message-Id: <1490323863-47399-1-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dpdk-stable] [PATCH] net/ixgbe: fix TC bandwidth setting 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, 24 Mar 2017 02:50:56 -0000 4 and 8 TCs are supported on ixgbe. By default there're 8 TCs. So when initializing the device, the bandwidth for 8 TCs is set. When changing the TC number, it's only considered setting the bandwidth for 4 TCs. If the user change the number from 4 to 8, the TCs' bandwidth is not right. Fixes: 0807f80d35d0 (ixgbe: DCB / flow control) CC: stable@dpdk.org Signed-off-by: Wenzhuo Lu --- drivers/net/ixgbe/ixgbe_rxtx.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 9502432..9294a0d 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -3758,6 +3758,15 @@ void __attribute__((cold)) tc->path[IXGBE_DCB_TX_CONFIG].bwg_percent = 0; tc->path[IXGBE_DCB_RX_CONFIG].bwg_percent = 0; } + } else { + /* Re-configure 8 TCs BW */ + for (i = 0; i < nb_tcs; i++) { + tc = &dcb_config->tc_config[i]; + tc->path[IXGBE_DCB_TX_CONFIG].bwg_percent = + (uint8_t)(100 / nb_tcs + (i & 1)); + tc->path[IXGBE_DCB_RX_CONFIG].bwg_percent = + (uint8_t)(100 / nb_tcs + (i & 1)); + } } switch (hw->mac.type) { -- 1.9.3