[dpdk-dev] app/testpmd: fix descriptor number for Rx queue setup

Message ID 20180522163720.58482-1-ferruh.yigit@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

Ferruh Yigit May 22, 2018, 4:37 p.m. UTC
  Wrong index used to select descriptor number, causing setting up queue
with wrong number of descriptors.

Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Qi Zhang <qi.z.zhang@intel.com>
Cc: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/testpmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Iremonger, Bernard May 22, 2018, 5:20 p.m. UTC | #1
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, May 22, 2018 5:37 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Subject: [PATCH] app/testpmd: fix descriptor number for Rx queue setup
> 
> Wrong index used to select descriptor number, causing setting up queue
> with wrong number of descriptors.
> 
> Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Bernard Iremonger <Bernard.iremonger@intel.com>
  
Ferruh Yigit May 22, 2018, 6:53 p.m. UTC | #2
On 5/22/2018 6:20 PM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Yigit, Ferruh
>> Sent: Tuesday, May 22, 2018 5:37 PM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
>> <jingjing.wu@intel.com>
>> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Zhang, Qi Z
>> <qi.z.zhang@intel.com>; Iremonger, Bernard
>> <bernard.iremonger@intel.com>
>> Subject: [PATCH] app/testpmd: fix descriptor number for Rx queue setup
>>
>> Wrong index used to select descriptor number, causing setting up queue
>> with wrong number of descriptors.
>>
>> Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Bernard Iremonger <Bernard.iremonger@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 cfa6da60c..5f8f88449 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1689,7 +1689,7 @@  start_port(portid_t pid)
 					}
 
 					diag = rte_eth_rx_queue_setup(pi, qi,
-					     port->nb_rx_desc[pi],
+					     port->nb_rx_desc[qi],
 					     rxring_numa[pi],
 					     &(port->rx_conf[qi]),
 					     mp);
@@ -1704,7 +1704,7 @@  start_port(portid_t pid)
 						return -1;
 					}
 					diag = rte_eth_rx_queue_setup(pi, qi,
-					     port->nb_rx_desc[pi],
+					     port->nb_rx_desc[qi],
 					     port->socket_id,
 					     &(port->rx_conf[qi]),
 					     mp);