From: "Yang, Qiming" <qiming.yang@intel.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ethdev: fixed device info get issue
Date: Wed, 16 May 2018 06:55:42 +0000 [thread overview]
Message-ID: <F5DF4F0E3AFEF648ADC1C3C33AD4DBF16F8BDF60@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <c095f106-eac6-20a1-d3a8-386494fe2b9e@solarflare.com>
From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
Sent: Tuesday, May 15, 2018 4:42 PM
To: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org
Cc: stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] ethdev: fixed device info get issue
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 <qiming.yang@intel.com><mailto:qiming.yang@intel.com>
---
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.
Thanks for your reminder, I don’t know the background before. But Ferruh give a solution to resolve
The conflict. I’ll send a v2 patch later.
/*
* Check that the numbers of RX and TX queues are not greater
* than the maximum number of RX and TX queues supported by the
prev parent reply other threads:[~2018-05-16 6:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 16:10 Qiming Yang
2018-05-15 8:41 ` Andrew Rybchenko
2018-05-15 11:30 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-05-16 6:53 ` Yang, Qiming
2018-05-16 6:55 ` Yang, Qiming [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F5DF4F0E3AFEF648ADC1C3C33AD4DBF16F8BDF60@SHSMSX101.ccr.corp.intel.com \
--to=qiming.yang@intel.com \
--cc=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).