DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: fixed device info get issue
@ 2018-05-15 16:10 Qiming Yang
  2018-05-15  8:41 ` Andrew Rybchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Qiming Yang @ 2018-05-15 16:10 UTC (permalink / raw)
  To: dev; +Cc: stable, Qiming Yang

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>
---
 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-16  6:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 16:10 [dpdk-dev] [PATCH] ethdev: fixed device info get issue 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   ` [dpdk-dev] " Yang, Qiming

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).