[v4,2/5] app/testpmd: add Rx buffer size display in queue info query

Message ID 1599296854-56620-3-git-send-email-tangchengchang@huawei.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add Rx buffer size for rxq info structure |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chengchang Tang Sept. 5, 2020, 9:07 a.m. UTC
  Add Rx buffer size to queue info querry cmd so that the user can get the
buffer length used by HW queue for receiving packets.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)

--
2.7.4
  

Comments

Ferruh Yigit Sept. 18, 2020, 8:54 a.m. UTC | #1
On 9/5/2020 10:07 AM, Chengchang Tang wrote:
> Add Rx buffer size to queue info querry cmd so that the user can get the
> buffer length used by HW queue for receiving packets.
> 
> Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
> Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> ---
>   app/test-pmd/config.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 30bee33..b432ac6 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -452,6 +452,7 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
>   		(qinfo.conf.rx_deferred_start != 0) ? "on" : "off");
>   	printf("\nRX scattered packets: %s",
>   		(qinfo.scattered_rx != 0) ? "on" : "off");
> +	printf("\nRX buffer size: %hu", qinfo.rx_buf_size);

Since this field is optional for PMD to fill, it may be confusing to 
display buffer size as "0".
What do you think print this value when "qinfo.rx_buf_size != 0"?
  
Chengchang Tang Sept. 20, 2020, 8:47 a.m. UTC | #2
On 2020/9/18 16:54, Ferruh Yigit wrote:
> On 9/5/2020 10:07 AM, Chengchang Tang wrote:
>> Add Rx buffer size to queue info querry cmd so that the user can get the
>> buffer length used by HW queue for receiving packets.
>>
>> Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
>> Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>> ---
>>   app/test-pmd/config.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
>> index 30bee33..b432ac6 100644
>> --- a/app/test-pmd/config.c
>> +++ b/app/test-pmd/config.c
>> @@ -452,6 +452,7 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
>>           (qinfo.conf.rx_deferred_start != 0) ? "on" : "off");
>>       printf("\nRX scattered packets: %s",
>>           (qinfo.scattered_rx != 0) ? "on" : "off");
>> +    printf("\nRX buffer size: %hu", qinfo.rx_buf_size);
> 
> Since this field is optional for PMD to fill, it may be confusing to display buffer size as "0".
> What do you think print this value when "qinfo.rx_buf_size != 0"?

Agree, it will be modified in the next version.
> 
> .
>
  

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 30bee33..b432ac6 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -452,6 +452,7 @@  rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 		(qinfo.conf.rx_deferred_start != 0) ? "on" : "off");
 	printf("\nRX scattered packets: %s",
 		(qinfo.scattered_rx != 0) ? "on" : "off");
+	printf("\nRX buffer size: %hu", qinfo.rx_buf_size);
 	printf("\nNumber of RXDs: %hu", qinfo.nb_desc);

 	if (rte_eth_rx_burst_mode_get(port_id, queue_id, &mode) == 0)