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>
Subject: [dpdk-dev] [PATCH] app/testpmd: fix device configure with zero queue
Date: Wed, 9 May 2018 22:12:46 +0800 [thread overview]
Message-ID: <20180509141246.123953-1-qi.z.zhang@intel.com> (raw)
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
reply other threads:[~2018-05-09 14:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180509141246.123953-1-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.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).