[v3,5/7] app/procinfo: add dump of Rx/Tx burst mode

Message ID 20220921142655.16427-6-liudongdong3@huawei.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series app/procinfo: add some extended features |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dongdong Liu Sept. 21, 2022, 2:26 p.m. UTC
  From: Jie Hai <haijie1@huawei.com>

Add dump of Rx/Tx burst mode in --show-port.

Sample output changes:
   - rx queue
-         -- 0 descriptors 0/1024 drop_en rx buffer size 2048 \
		mempool mb_pool_0 socket 0
+         -- 0 descriptors 0/1024 drop_en rx buffer size 2048 \
		mempool mb_pool_0 socket 0 burst mode : Vector Neon
   - tx queue
-         -- 0 descriptors 1024 thresh 32/928 \
		offloads : MBUF_FAST_FREE
+         -- 0 descriptors 1024 thresh 32/928 \
		offloads : MBUF_FAST_FREE burst mode : Scalar

Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 app/proc-info/main.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
  

Comments

Pattan, Reshma Sept. 23, 2022, 10:02 a.m. UTC | #1
> -----Original Message-----
> From: Dongdong Liu <liudongdong3@huawei.com>
> Subject: [PATCH v3 5/7] app/procinfo: add dump of Rx/Tx burst mode
> 
> Signed-off-by: Jie Hai <haijie1@huawei.com>
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>


> ---
> +			if (rte_eth_rx_burst_mode_get(i, j, &mode) == 0)
> +				printf(" burst mode : %s%s",
> +				       mode.info,
> +				       mode.flags &
> RTE_ETH_BURST_FLAG_PER_QUEUE ?
> +						" (per queue)" : "");

Small question: What if mode is not per queue that does that mean  is it per port?

Acked-by: Reshma Pattan <reshma.pattan@intel.com>
  
Dongdong Liu Sept. 24, 2022, 8:06 a.m. UTC | #2
On 2022/9/23 18:02, Pattan, Reshma wrote:
>
>
>> -----Original Message-----
>> From: Dongdong Liu <liudongdong3@huawei.com>
>> Subject: [PATCH v3 5/7] app/procinfo: add dump of Rx/Tx burst mode
>>
>> Signed-off-by: Jie Hai <haijie1@huawei.com>
>> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
>
>
>> ---
>> +			if (rte_eth_rx_burst_mode_get(i, j, &mode) == 0)
>> +				printf(" burst mode : %s%s",
>> +				       mode.info,
>> +				       mode.flags &
>> RTE_ETH_BURST_FLAG_PER_QUEUE ?
>> +						" (per queue)" : "");
>
> Small question: What if mode is not per queue that does that mean  is it per port?
Yes, I think it is.

>
> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
> .
>
  

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 0e78f8b75f..e1a153c934 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -845,6 +845,7 @@  show_port(void)
 
 		for (j = 0; j < dev_info.nb_rx_queues; j++) {
 			struct rte_eth_rxq_info queue_info;
+			struct rte_eth_burst_mode mode;
 			int count;
 
 			ret = rte_eth_rx_queue_info_get(i, j, &queue_info);
@@ -880,11 +881,18 @@  show_port(void)
 			if (queue_info.conf.offloads != 0)
 				show_offloads(queue_info.conf.offloads, rte_eth_dev_rx_offload_name);
 
+			if (rte_eth_rx_burst_mode_get(i, j, &mode) == 0)
+				printf(" burst mode : %s%s",
+				       mode.info,
+				       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+						" (per queue)" : "");
+
 			printf("\n");
 		}
 
 		for (j = 0; j < dev_info.nb_tx_queues; j++) {
 			struct rte_eth_txq_info queue_info;
+			struct rte_eth_burst_mode mode;
 
 			ret = rte_eth_tx_queue_info_get(i, j, &queue_info);
 			if (ret != 0)
@@ -905,6 +913,13 @@  show_port(void)
 
 			if (queue_info.conf.offloads != 0)
 				show_offloads(queue_info.conf.offloads, rte_eth_dev_tx_offload_name);
+
+			if (rte_eth_tx_burst_mode_get(i, j, &mode) == 0)
+				printf(" burst mode : %s%s",
+				       mode.info,
+				       mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ?
+						" (per queue)" : "");
+
 			printf("\n");
 		}