DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix device configure with zero queue
@ 2018-05-09 14:12 Qi Zhang
  0 siblings, 0 replies; only message in thread
From: Qi Zhang @ 2018-05-09 14:12 UTC (permalink / raw)
  To: remy.horton, ferruh.yigit; +Cc: dev, Qi Zhang

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 <qi.z.zhang@intel.com>
---
 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);
 
-- 
2.13.6

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-09 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 14:12 [dpdk-dev] [PATCH] app/testpmd: fix device configure with zero queue Qi Zhang

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