From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 92DD4237 for ; Tue, 21 Nov 2017 14:20:13 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 283C720937; Tue, 21 Nov 2017 08:20:13 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:20:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/sXRBgeO7kvIvT7fa pobxOKtrlHrndnzKz4nngyBgaM=; b=m1SVcXVPQPLQO2yiZGf9w413zL6iWvz1B xln99QR+HdTftiWCb+E+rXa3qPVB3x0pcwKYqIKs3mr+sr+arEI/vOqkioc8Uw50 Qfuk8DT8xkFOlpOBqBe9IW/+j1zMmqN9w180xMekXjsIY0Tb4hDaywbjCRbFAjez wdKZnZyIs8Om2lLhgK9gnAst40OBLSmiZEG86ekSYoCM9aCcs6H5BCyed3d18He2 pu1QZcSwZi3xiEpk4iKlusWSNjKhX2ldtc8w9I0NDuntfXapquEjUIJJw5tbptzL r8iKnxB+3ZmeIJQDCdcG6v29fh5DCCh8cT0SVWDqcB5j+GBPmbiww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=/sXRBgeO7kvIvT7fapobxOKtrlHrndnzKz4nngyBgaM=; b=PQFE0mpS Jigj2jQY/YD5aMB/t2F3mFvfKF9NvI+t7UbhP3GImTbWcX+pUWvFDgqAA0I0m3Eg JptXPEXFnifOcnVSlMMZcGgh60BM8x/mb4zaLyphI9FIT7V3DeQXV67na9GDsEbX AIGAmHieNNVSeORur0mmk9vrAzir9loyJafCtsyQuRWVOwpxYplChunmgtkuSt8t dzyikMs+wGCSAu2L+FTdcRx8lKyfA/oEhOk3vW0zO213DrxRWZV8LUD0O6vt+sAU Nwr++L8mGftKFBeWAAu71Cgh78dOJOkFhLTj/DJekamA1tkFz4uUfHGlDaxg4oQR U8aIUy6/4X/HOQ== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 79142243B9; Tue, 21 Nov 2017 08:20:09 -0500 (EST) From: Yuanhan Liu To: Wei Dai Cc: dpdk stable Date: Tue, 21 Nov 2017 21:15:56 +0800 Message-Id: <1511270333-31002-14-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/ixgbe: fix mapping of user priority to TC' has been queued to stable release 17.08.1 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: Tue, 21 Nov 2017 13:20:13 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 1191fc11ba5795c95f0ae4aaa1088fcaa7dcd77a Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Mon, 21 Aug 2017 15:50:05 +0800 Subject: [PATCH] net/ixgbe: fix mapping of user priority to TC [ upstream commit a8e54b44515ce741a0b73fe2e35e99f6f1dcef4b ] This patch fixes the mapping of user priority to traffic class in Rx/Tx path of DCB configuration. Each DCB traffic class should include all user priorities mapping to it in both Rx and Tx path. Fixes: 0807f80d35d0 ("ixgbe: DCB / flow control") Signed-off-by: Wei Dai --- drivers/net/ixgbe/ixgbe_rxtx.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 64bff25..98d0e1a 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -3517,12 +3517,19 @@ ixgbe_vmdq_dcb_rx_config(struct rte_eth_dev *dev, dcb_config->num_tcs.pg_tcs = ETH_4_TCS; dcb_config->num_tcs.pfc_tcs = ETH_4_TCS; } + + /* Initialize User Priority to Traffic Class mapping */ + for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) { + tc = &dcb_config->tc_config[j]; + tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap = 0; + } + /* User Priority to Traffic Class mapping */ for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) { j = vmdq_rx_conf->dcb_tc[i]; tc = &dcb_config->tc_config[j]; - tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap = - (uint8_t)(1 << j); + tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap |= + (uint8_t)(1 << i); } } @@ -3544,12 +3551,18 @@ ixgbe_dcb_vt_tx_config(struct rte_eth_dev *dev, dcb_config->num_tcs.pfc_tcs = ETH_4_TCS; } + /* Initialize User Priority to Traffic Class mapping */ + for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) { + tc = &dcb_config->tc_config[j]; + tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap = 0; + } + /* User Priority to Traffic Class mapping */ for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) { j = vmdq_tx_conf->dcb_tc[i]; tc = &dcb_config->tc_config[j]; - tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap = - (uint8_t)(1 << j); + tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap |= + (uint8_t)(1 << i); } } @@ -3565,12 +3578,18 @@ ixgbe_dcb_rx_config(struct rte_eth_dev *dev, dcb_config->num_tcs.pg_tcs = (uint8_t)rx_conf->nb_tcs; dcb_config->num_tcs.pfc_tcs = (uint8_t)rx_conf->nb_tcs; + /* Initialize User Priority to Traffic Class mapping */ + for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) { + tc = &dcb_config->tc_config[j]; + tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap = 0; + } + /* User Priority to Traffic Class mapping */ for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) { j = rx_conf->dcb_tc[i]; tc = &dcb_config->tc_config[j]; - tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap = - (uint8_t)(1 << j); + tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap |= + (uint8_t)(1 << i); } } @@ -3586,12 +3605,18 @@ ixgbe_dcb_tx_config(struct rte_eth_dev *dev, dcb_config->num_tcs.pg_tcs = (uint8_t)tx_conf->nb_tcs; dcb_config->num_tcs.pfc_tcs = (uint8_t)tx_conf->nb_tcs; + /* Initialize User Priority to Traffic Class mapping */ + for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) { + tc = &dcb_config->tc_config[j]; + tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap = 0; + } + /* User Priority to Traffic Class mapping */ for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) { j = tx_conf->dcb_tc[i]; tc = &dcb_config->tc_config[j]; - tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap = - (uint8_t)(1 << j); + tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap |= + (uint8_t)(1 << i); } } -- 2.7.4