代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 423959cfe25c9dc231b80f3df59318585df3a023 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 19 Jan 2023 12:30:56 +0000
Subject: net/vhost: support private dump
[ upstream commit 47b9fb64c15d60e1c8c2c8f6e63824fd2cada428 ]
This patch implements eth_dev_priv_dump callback which could use for
debugging.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/vhost/rte_eth_vhost.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 070f0e6dfd..b120341d0c 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1429,6 +1429,23 @@ vhost_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc)
return 0;
}
+static int
+vhost_dev_priv_dump(struct rte_eth_dev *dev, FILE *f)
+{
+ struct pmd_internal *internal = dev->data->dev_private;
+
+ fprintf(f, "iface_name: %s\n", internal->iface_name);
+ fprintf(f, "flags: 0x%" PRIx64 "\n", internal->flags);
+ fprintf(f, "disable_flags: 0x%" PRIx64 "\n", internal->disable_flags);
+ fprintf(f, "max_queues: %u\n", internal->max_queues);
+ fprintf(f, "vid: %d\n", internal->vid);
+ fprintf(f, "started: %d\n", rte_atomic32_read(&internal->started));
+ fprintf(f, "dev_attached: %d\n", rte_atomic32_read(&internal->dev_attached));
+ fprintf(f, "vlan_strip: %d\n", internal->vlan_strip);
+
+ return 0;
+}
+
static const struct eth_dev_ops ops = {
.dev_start = eth_dev_start,
.dev_stop = eth_dev_stop,
@@ -1449,6 +1466,7 @@ static const struct eth_dev_ops ops = {
.rx_queue_intr_enable = eth_rxq_intr_enable,
.rx_queue_intr_disable = eth_rxq_intr_disable,
.get_monitor_addr = vhost_get_monitor_addr,
+ .eth_dev_priv_dump = vhost_dev_priv_dump,
};
static int
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。