1 Star 0 Fork 75

sky/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0212-app-procinfo-add-burst-mode-to-Rx-Tx-queue-info.patch 2.27 KB
一键复制 编辑 原始数据 按行查看 历史
From cf883e9e107e5f646ab8cb41c50e0cd0ab41b3ce Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 11 Oct 2022 19:18:40 +0800
Subject: app/procinfo: add burst mode to Rx/Tx queue info
[ upstream commit a6d81dc0326aae58ea377fc1dc3d62f6bad4ad94 ]
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 2d12644543..dc948c7cc5 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.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nlgwcy/dpdk.git
git@gitee.com:nlgwcy/dpdk.git
nlgwcy
dpdk
dpdk
master

搜索帮助