From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 90349A0542;
	Sat,  8 Oct 2022 12:56:14 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 6C17042BB6;
	Sat,  8 Oct 2022 12:55:51 +0200 (CEST)
Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])
 by mails.dpdk.org (Postfix) with ESMTP id 5328B42BB0
 for <dev@dpdk.org>; Sat,  8 Oct 2022 12:55:50 +0200 (CEST)
Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.55])
 by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ml27t0XzXzpVp4;
 Sat,  8 Oct 2022 18:52:42 +0800 (CST)
Received: from localhost.localdomain (10.28.79.22) by
 kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2375.31; Sat, 8 Oct 2022 18:55:48 +0800
From: Dongdong Liu <liudongdong3@huawei.com>
To: <dev@dpdk.org>, <reshma.pattan@intel.com>, <thomas@monjalon.net>,
 <ferruh.yigit@xilinx.com>, <andrew.rybchenko@oktetlabs.ru>
CC: Jie Hai <haijie1@huawei.com>, Dongdong Liu <liudongdong3@huawei.com>,
 Maryam Tahhan <maryam.tahhan@intel.com>
Subject: [PATCH v9 5/8] app/procinfo: add dump of Rx/Tx burst mode
Date: Sat, 8 Oct 2022 18:53:50 +0800
Message-ID: <20221008105353.18195-6-liudongdong3@huawei.com>
X-Mailer: git-send-email 2.22.0
In-Reply-To: <20221008105353.18195-1-liudongdong3@huawei.com>
References: <20220722091236.15469-1-liudongdong3@huawei.com>
 <20221008105353.18195-1-liudongdong3@huawei.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-Originating-IP: [10.28.79.22]
X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To
 kwepemi500017.china.huawei.com (7.221.188.110)
X-CFilter-Loop: Reflected
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
 app/proc-info/main.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 90e7e41e38..67217ab68b 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");
 		}
 
-- 
2.22.0