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.zh...@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 via email to