DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: remy.horton@intel.com, ferruh.yigit@intel.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
	Qi Zhang <qi.z.zhang@ntel.com>
Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix device configure with zero queue
Date: Thu, 10 May 2018 10:22:02 +0800	[thread overview]
Message-ID: <20180510022202.40229-1-qi.z.zhang@intel.com> (raw)

Setup number of Rx & Tx queues to 0 at rte_eth_dev_configure means
take driver's default queue number, so if during a re-configureation
previous queue number will be overwrite, this is not expected when
we configure dcb. The patch fix it by re-confgure device with the
original queue number.

Fixes: 3be82f5cc5e ("ethdev: support PMD-tuned Tx/Rx parameters")
Signed-off-by: Qi Zhang <qi.z.zhang@ntel.com>
---

v2:
- directly copy to dev->data->dev_conf is not recommented, now we
  reconfigure every queues with same number

 app/test-pmd/testpmd.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index db23f23e5..cbf6d14a6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2467,12 +2467,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);
+	/* re-configure the device . */
+	rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);
 
 	rte_eth_dev_info_get(pid, &rte_port->dev_info);
 
-- 
2.13.6

             reply	other threads:[~2018-05-10  2:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  2:22 Qi Zhang [this message]
2018-05-10  8:37 ` Remy Horton
2018-05-10 22:28   ` Ferruh Yigit

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=20180510022202.40229-1-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=qi.z.zhang@ntel.com \
    --cc=remy.horton@intel.com \
    /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).