From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id BC9871BA64; Tue, 15 May 2018 10:36:45 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2018 01:36:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,403,1520924400"; d="scan'208";a="41037655" Received: from dpdk-qiming2.sh.intel.com ([10.67.119.132]) by orsmga007.jf.intel.com with ESMTP; 15 May 2018 01:36:43 -0700 From: Qiming Yang To: dev@dpdk.org Cc: stable@dpdk.org, Qiming Yang Date: Wed, 16 May 2018 00:10:57 +0800 Message-Id: <20180515161057.89505-1-qiming.yang@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH] ethdev: fixed device info get issue 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: , X-List-Received-Date: Tue, 15 May 2018 08:36:46 -0000 This patch fixed error function call order in rte_eth_dev_configure. This wrong order makes user can't get correct device informations, and cause DCB configure issue. Fixes: 3be82f5cc5e3 ("ethdev: support PMD-tuned Tx/Rx parameters") Signed-off-by: Qiming Yang --- lib/librte_ethdev/rte_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index b3ed821..97316f3 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1053,6 +1053,9 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP); RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_configure, -ENOTSUP); + /* Copy the dev_conf parameter into the dev structure */ + memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data->dev_conf)); + rte_eth_dev_info_get(port_id, &dev_info); /* If number of queues specified by application for both Rx and Tx is @@ -1098,9 +1101,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, rte_eth_convert_rx_offload_bitfield( &dev_conf->rxmode, &local_conf.rxmode.offloads); - /* Copy the dev_conf parameter into the dev structure */ - memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data->dev_conf)); - /* * Check that the numbers of RX and TX queues are not greater * than the maximum number of RX and TX queues supported by the -- 2.9.5