gazelle/0230-dfx-optimize-gazellectl-x-for-bond.patch
yinbin6 0ebb373888 sync virtio_user: modify mbuf index for bond4
(cherry picked from commit 30bca66e1a35ac0a0726b864e3a6665f1f3d122a)
2024-08-20 11:09:22 +08:00

42 lines
1.9 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 99b72b69ea7ce93077d890829e3db812fa34e2cb Mon Sep 17 00:00:00 2001
From: zhangmengxuan <zhangmengxuan@kylinos.cn>
Date: Wed, 10 Jul 2024 17:23:21 +0800
Subject: [PATCH] dfx: optimize gazellectl -x for bond
---
src/ltran/ltran_dfx.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 005b09c..5bda330 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -204,22 +204,19 @@ static void gazelle_print_lstack_xstats(void *buf, const struct gazelle_stat_msg
struct nic_eth_xstats *xstats = &stat->data.nic_xstats;
static const char *nic_stats_border = "########################";
+ printf("###### NIC extended statistics for port %-2d #########\n", xstats->port_id);
if (xstats->bonding.mode >= 0) {
printf("############# NIC bonding mode display #############\n");
printf("%s############################\n", nic_stats_border);
- printf("Bonding mode [%d]\n", xstats->bonding.mode);
+ printf("Bonding mode: [%d]\n", xstats->bonding.mode);
printf("Bonding miimon: [%d]\n", xstats->bonding.miimon);
- printf("Port range: 0->%d; Bonding port is %d\n", xstats->port_id, xstats->port_id);
printf("Slaves(%d): [", xstats->bonding.slave_count);
for (int i = 0; i < xstats->bonding.slave_count - 1; i++) {
printf("%d ", xstats->bonding.slaves[i]);
}
printf("%d]\n", xstats->bonding.slaves[xstats->bonding.slave_count - 1]);
printf("Primary: [%d]\n", xstats->bonding.primary_port_id);
- printf("%s############################\n", nic_stats_border);
}
-
- printf("###### NIC extended statistics for port %-2d #########\n", xstats->port_id);
printf("%s############################\n", nic_stats_border);
if (xstats->len <= 0 || xstats->len > RTE_ETH_XSTATS_MAX_LEN) {
printf("xstats item(%d) num error!\n", xstats->len);
--
2.33.0