From: Qi Zhang Date: Thu, 10 May 2018 02:22:02 +0000 (+0800) Subject: app/testpmd: fix device configure with zero queue X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2f203d44bab2637123f47d851fef2494ca016c6a;p=dpdk.git app/testpmd: fix device configure with zero queue 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-configuration previous queue number will be overwrite, this is not expected when we configure dcb. The patch fix it by re-configure device with the original queue number. Fixes: 3be82f5cc5e ("ethdev: support PMD-tuned Tx/Rx parameters") Signed-off-by: Qi Zhang Acked-by: Remy Horton --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f79ed1efbd..d16a2bdc57 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2510,12 +2510,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);