From patchwork Thu Nov 3 17:35:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iremonger, Bernard" X-Patchwork-Id: 16919 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id EEA7D2A58; Thu, 3 Nov 2016 18:35:46 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7999B1E34 for ; Thu, 3 Nov 2016 18:35:44 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP; 03 Nov 2016 10:35:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,587,1473145200"; d="scan'208";a="27129539" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga005.fm.intel.com with ESMTP; 03 Nov 2016 10:35:41 -0700 From: Bernard Iremonger To: dev@dpdk.org, rahul.r.shah@intel.com, jingjing.wu@intel.com, wenzhuo.lu@intel.com Date: Thu, 3 Nov 2016 17:35:38 +0000 Message-Id: <1478194538-19337-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1477996609-19629-1-git-send-email-bernard.iremonger@intel.com> References: <1477996609-19629-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v9] app/testpmd: fix DCB configuration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Data Centre Bridge (DCB) configuration fails when SRIOV is enabled if nb_rxq or nb_txq are greater than nb_q_per_pool. The failure occurs during configuration of the ixgbe PMD when it is started, in the ixgbe_check_mq_mode function. Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration") Signed-off-by: Bernard Iremonger Acked-by: Jingjing Wu --- Changes in v9: when max_vfs is greater then 0, set nb_rxq and nb_txq to dev_info.nb_rx_queues and dev_info.nb_tx_queues. Changes in v8: revise commit message. Changes in v7: restore nb_rxq and nb_txq setting when max_vfs is 0 app/test-pmd/testpmd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 6185be6..a0332c2 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2002,8 +2002,13 @@ init_port_dcb_config(portid_t pid, * and has the same number of rxq and txq in dcb mode */ if (dcb_mode == DCB_VT_ENABLED) { - nb_rxq = rte_port->dev_info.max_rx_queues; - nb_txq = rte_port->dev_info.max_tx_queues; + if (rte_port->dev_info.max_vfs > 0) { + nb_rxq = rte_port->dev_info.nb_rx_queues; + nb_txq = rte_port->dev_info.nb_tx_queues; + } else { + nb_rxq = rte_port->dev_info.max_rx_queues; + nb_txq = rte_port->dev_info.max_tx_queues; + } } else { /*if vt is disabled, use all pf queues */ if (rte_port->dev_info.vmdq_pool_base == 0) {