From patchwork Thu May 10 02:22:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 39661 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 969C61B1C8; Thu, 10 May 2018 04:21:49 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 408CC1B1C7 for ; Thu, 10 May 2018 04:21:48 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 19:21:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,383,1520924400"; d="scan'208";a="223043637" Received: from unknown (HELO dpdk51.sh.intel.com) ([10.67.110.184]) by orsmga005.jf.intel.com with ESMTP; 09 May 2018 19:21:45 -0700 From: Qi Zhang To: remy.horton@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, Qi Zhang , Qi Zhang Date: Thu, 10 May 2018 10:22:02 +0800 Message-Id: <20180510022202.40229-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix device configure with zero queue 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" Setup number of Rx & Tx queues to 0 at rte_eth_dev_configure means take driver's default queue number, so if during a re-configureation previous queue number will be overwrite, this is not expected when we configure dcb. The patch fix it by re-confgure device with the original queue number. Fixes: 3be82f5cc5e ("ethdev: support PMD-tuned Tx/Rx parameters") Signed-off-by: Qi Zhang Acked-by: Remy Horton Signed-off-by: Qi Zhang --- v2: - directly copy to dev->data->dev_conf is not recommented, now we reconfigure every queues with same number app/test-pmd/testpmd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index db23f23e5..cbf6d14a6 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2467,12 +2467,8 @@ init_port_dcb_config(portid_t pid, return retval; port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_VLAN_FILTER; - /** - * Write the configuration into the device. - * Set the numbers of RX & TX queues to 0, so - * the RX & TX queues will not be setup. - */ - rte_eth_dev_configure(pid, 0, 0, &port_conf); + /* re-configure the device . */ + rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf); rte_eth_dev_info_get(pid, &rte_port->dev_info);