!799 [sync] PR-793: sync dfx: fix gazellectl -x for bond
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
8b057bcdba
59
0179-dfx-fix-gazellectl-x-for-bond.patch
Normal file
59
0179-dfx-fix-gazellectl-x-for-bond.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From 3c3f69c0ca77b3d05df27aeda2fb7daa9757f50c Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangmengxuan <zhangmengxuan@kylinos.cn>
|
||||||
|
Date: Mon, 13 May 2024 14:51:18 +0800
|
||||||
|
Subject: [PATCH] dfx: fix gazellectl -x for bond
|
||||||
|
|
||||||
|
---
|
||||||
|
src/common/gazelle_dfx_msg.h | 1 +
|
||||||
|
src/lstack/core/lstack_dpdk.c | 2 ++
|
||||||
|
src/ltran/ltran_dfx.c | 7 ++++---
|
||||||
|
3 files changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
|
||||||
|
index 17e1662..9f88203 100644
|
||||||
|
--- a/src/common/gazelle_dfx_msg.h
|
||||||
|
+++ b/src/common/gazelle_dfx_msg.h
|
||||||
|
@@ -296,6 +296,7 @@ struct bonding {
|
||||||
|
int32_t miimon;
|
||||||
|
uint16_t primary_port_id;
|
||||||
|
uint16_t slaves[RTE_MAX_ETHPORTS];
|
||||||
|
+ uint16_t slave_count;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct nic_eth_xstats {
|
||||||
|
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
|
||||||
|
index ec35f9c..f1a22ea 100644
|
||||||
|
--- a/src/lstack/core/lstack_dpdk.c
|
||||||
|
+++ b/src/lstack/core/lstack_dpdk.c
|
||||||
|
@@ -905,6 +905,8 @@ void dpdk_nic_bond_xstats_get(struct gazelle_stack_dfx_data *dfx, uint16_t port_
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ dfx->data.nic_xstats.bonding.slave_count = count;
|
||||||
|
+
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
dfx->data.nic_xstats.bonding.slaves[i] = slaves[i];
|
||||||
|
}
|
||||||
|
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
|
||||||
|
index f4e55e3..aa08f25 100644
|
||||||
|
--- a/src/ltran/ltran_dfx.c
|
||||||
|
+++ b/src/ltran/ltran_dfx.c
|
||||||
|
@@ -207,11 +207,12 @@ static void gazelle_print_lstack_xstats(void *buf, const struct gazelle_stat_msg
|
||||||
|
printf("%s############################\n", nic_stats_border);
|
||||||
|
printf("Bonding mode: [%d]\n", xstats->bonding.mode);
|
||||||
|
printf("Bonding miimon: [%d]\n", xstats->bonding.miimon);
|
||||||
|
- printf("Slaves(%d): [", xstats->port_id);
|
||||||
|
- for (int i = 0; i < xstats->port_id - 1; i++) {
|
||||||
|
+ 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->port_id - 1]);
|
||||||
|
+ 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);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: gazelle
|
Name: gazelle
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 36
|
Release: 37
|
||||||
Summary: gazelle is a high performance user-mode stack
|
Summary: gazelle is a high performance user-mode stack
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
URL: https://gitee.com/openeuler/gazelle
|
URL: https://gitee.com/openeuler/gazelle
|
||||||
@ -195,6 +195,7 @@ Patch9175: 0175-cfg-devices-must-be-in-bond_slave_mac-for-BONDING_MO.patch
|
|||||||
Patch9176: 0176-CFG-fix-multicast-IP-assert-error.patch
|
Patch9176: 0176-CFG-fix-multicast-IP-assert-error.patch
|
||||||
Patch9177: 0177-fix-mbuf-leak-in-dpdk-23.11-due-to-kni-removed.patch
|
Patch9177: 0177-fix-mbuf-leak-in-dpdk-23.11-due-to-kni-removed.patch
|
||||||
Patch9178: 0178-add-riscv64-support.patch
|
Patch9178: 0178-add-riscv64-support.patch
|
||||||
|
Patch9179: 0179-dfx-fix-gazellectl-x-for-bond.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{name} is a high performance user-mode stack.
|
%{name} is a high performance user-mode stack.
|
||||||
@ -236,7 +237,10 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
|||||||
%config(noreplace) %{conf_path}/ltran.conf
|
%config(noreplace) %{conf_path}/ltran.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri May 10 CST yangchen555 <yangchen145@huawei.com> - 1.0.2-36
|
* Thu May 16 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-37
|
||||||
|
- dfx: fix gazellectl -x for bond
|
||||||
|
|
||||||
|
* Fri May 10 2024 yangchen555 <yangchen145@huawei.com> - 1.0.2-36
|
||||||
- add riscv64 support
|
- add riscv64 support
|
||||||
- fix mbuf leak in dpdk-23.11 due to kni removed
|
- fix mbuf leak in dpdk-23.11 due to kni removed
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user