From patchwork Wed May 9 14:12:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 39601 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 6768F1B65B; Wed, 9 May 2018 16:12:33 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id C23E81B627 for ; Wed, 9 May 2018 16:12:31 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 07:12:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="38601314" Received: from unknown (HELO dpdk51.sh.intel.com) ([10.67.110.184]) by fmsmga008.fm.intel.com with ESMTP; 09 May 2018 07:12:30 -0700 From: Qi Zhang To: remy.horton@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, Qi Zhang Date: Wed, 9 May 2018 22:12:46 +0800 Message-Id: <20180509141246.123953-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] 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 queus to 0 at rte_eth_dev_configure means use driver's default queue number but not setup with no queues. Fixes: 3be82f5cc5e ("ethdev: support PMD-tuned Tx/Rx parameters") Signed-off-by: Qi Zhang --- app/test-pmd/testpmd.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index db23f23e5..1daaa2a28 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2449,10 +2449,12 @@ init_port_dcb_config(portid_t pid, { struct rte_eth_conf port_conf; struct rte_port *rte_port; + struct rte_eth_dev *dev; int retval; uint16_t i; rte_port = &ports[pid]; + dev = &rte_eth_devices[pid]; memset(&port_conf, 0, sizeof(struct rte_eth_conf)); /* Enter DCB configuration status */ @@ -2467,12 +2469,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); + /* Write the configuration into the device. */ + memcpy(&dev->data->dev_conf, &port_conf, sizeof(struct rte_eth_conf)); rte_eth_dev_info_get(pid, &rte_port->dev_info);