From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 96BB31BA4E; Tue, 15 May 2018 10:42:06 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 317216C0062; Tue, 15 May 2018 08:42:05 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Tue, 15 May 2018 09:42:00 +0100 To: Qiming Yang , CC: References: <20180515161057.89505-1-qiming.yang@intel.com> From: Andrew Rybchenko Message-ID: Date: Tue, 15 May 2018 11:41:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180515161057.89505-1-qiming.yang@intel.com> Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23844.003 X-TM-AS-Result: No--6.089000-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1526373725-hYy-934Vsr4q Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fixed device info get issue X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 08:42:06 -0000 On 05/15/2018 07:10 PM, Qiming Yang wrote: > 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)); > - As I understand the goal of this copy is to pickup offloads fill in done three lines above. The patch breaks it. > /* > * Check that the numbers of RX and TX queues are not greater > * than the maximum number of RX and TX queues supported by the