diff mbox

[dpdk-dev] app/test-pmd: fix testpmd log of start command

Message ID 1526401464-4786-1-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show

Checks

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

Commit Message

Iremonger, Bernard May 15, 2018, 4:24 p.m. UTC
In the testpmd log of the start command, show the RX and TX
descriptor values from dev_info instead of the default
values.

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

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

Comments

Ferruh Yigit May 18, 2018, 11:52 a.m. UTC | #1
On 5/15/2018 5:24 PM, Bernard Iremonger wrote:
> In the testpmd log of the start command, show the RX and TX
> descriptor values from dev_info instead of the default
> values.
> 
> Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
>  app/test-pmd/testpmd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 1344016..5b00f7f 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2308,7 +2308,7 @@ struct pmd_test_command {
>  		if (rx_drop_en != RTE_PMD_PARAM_UNSET)
>  			port->rx_conf[qid].rx_drop_en = rx_drop_en;
>  
> -		port->nb_rx_desc[qid] = nb_rxd;
> +		port->nb_rx_desc[qid] = port->dev_info.rx_desc_lim.nb_max;

Hi Bernard,

"rx_desc_lim.nb_max" is not the value we want here.

Also we shouldn't concern what dev_info returns but what is the number device is
configured.

>  	}
>  
>  	for (qid = 0; qid < nb_txq; qid++) {
> @@ -2330,7 +2330,7 @@ struct pmd_test_command {
>  		if (tx_free_thresh != RTE_PMD_PARAM_UNSET)
>  			port->tx_conf[qid].tx_free_thresh = tx_free_thresh;
>  
> -		port->nb_tx_desc[qid] = nb_txd;
> +		port->nb_tx_desc[qid] = port->dev_info.tx_desc_lim.nb_max;
>  	}
>  }
>  
>
diff mbox

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 1344016..5b00f7f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2308,7 +2308,7 @@  struct pmd_test_command {
 		if (rx_drop_en != RTE_PMD_PARAM_UNSET)
 			port->rx_conf[qid].rx_drop_en = rx_drop_en;
 
-		port->nb_rx_desc[qid] = nb_rxd;
+		port->nb_rx_desc[qid] = port->dev_info.rx_desc_lim.nb_max;
 	}
 
 	for (qid = 0; qid < nb_txq; qid++) {
@@ -2330,7 +2330,7 @@  struct pmd_test_command {
 		if (tx_free_thresh != RTE_PMD_PARAM_UNSET)
 			port->tx_conf[qid].tx_free_thresh = tx_free_thresh;
 
-		port->nb_tx_desc[qid] = nb_txd;
+		port->nb_tx_desc[qid] = port->dev_info.tx_desc_lim.nb_max;
 	}
 }