[dpdk-dev,v2] app/testpmd: fix device configure with zero queue

Message ID 20180510022202.40229-1-qi.z.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Qi Zhang May 10, 2018, 2:22 a.m. UTC
  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(-)
  

Comments

Remy Horton May 10, 2018, 8:37 a.m. UTC | #1
On 10/05/2018 03:22, Qi Zhang wrote:
[..]
> Fixes: 3be82f5cc5e ("ethdev: support PMD-tuned Tx/Rx parameters")
> Signed-off-by: Qi Zhang <qi.z.zhang@ntel.com>

Acked-by: Remy Horton <remy.horton@intel.com>
  
Ferruh Yigit May 10, 2018, 10:28 p.m. UTC | #2
On 5/10/2018 9:37 AM, Remy Horton wrote:
> 
> On 10/05/2018 03:22, Qi Zhang wrote:
> [..]
>> Fixes: 3be82f5cc5e ("ethdev: support PMD-tuned Tx/Rx parameters")
>> Signed-off-by: Qi Zhang <qi.z.zhang@ntel.com>

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
s/ntel/intel

> 
> Acked-by: Remy Horton <remy.horton@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

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