From patchwork Mon Oct 23 07:25:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Dai X-Patchwork-Id: 30690 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CBF871B3B0; Mon, 23 Oct 2017 09:25:43 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4C13A1B3A6; Mon, 23 Oct 2017 09:25:41 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2017 00:25:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.43,421,1503385200"; d="scan'208"; a="1208852604" Received: from dpdk10.bj.intel.com ([172.16.182.219]) by fmsmga001.fm.intel.com with ESMTP; 23 Oct 2017 00:25:11 -0700 From: Wei Dai To: jingjing.wu@intel.com Cc: dev@dpdk.org, Wei Dai , stable@dpdk.org Date: Mon, 23 Oct 2017 15:25:16 +0800 Message-Id: <1508743516-19376-1-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH] app/testpmd: fix mapping of user priority to DCB TC 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When number of DCB traffic class is 4, user priority should be mapped to traffic class 0/1/2/3. Fixes: cb60ede6e3b6 ("ethdev: rename DCB field in config structs") Cc: stable@dpdk.org Signed-off-by: Wei Dai Acked-by: Jingjing Wu --- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index a4d4a86..3a75d6f 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2193,8 +2193,8 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf, 1 << (i % vmdq_rx_conf->nb_queue_pools); } for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) { - vmdq_rx_conf->dcb_tc[i] = i; - vmdq_tx_conf->dcb_tc[i] = i; + vmdq_rx_conf->dcb_tc[i] = i % num_tcs; + vmdq_tx_conf->dcb_tc[i] = i % num_tcs; } /* set DCB mode of RX and TX of multiple queues */