!561 [sync] PR-557: sync cfg: fix bond_mode null

From: @openeuler-sync-bot 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
This commit is contained in:
openeuler-ci-bot 2023-11-04 11:52:02 +00:00 committed by Gitee
commit ccf2da11c9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 845b5afa76205cf1eaffc966257eb62ea64af837 Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Sat, 4 Nov 2023 19:18:12 +0800
Subject: [PATCH] cfg: fix bond_mode null
---
src/lstack/core/lstack_cfg.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index c4278b5..8e83c0d 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -1119,6 +1119,11 @@ static int32_t parse_bond_mode(void)
{
const config_setting_t *bond_mode = NULL;
bond_mode = config_lookup(&g_config, "bond_mode");
+ if (bond_mode == NULL) {
+ g_config_params.bond_mode = -1;
+ return 0;
+ }
+
g_config_params.bond_mode = config_setting_get_int(bond_mode);
if (g_config_params.bond_mode == -1) {
return 0;
--
2.27.0

View File

@ -2,7 +2,7 @@
Name: gazelle
Version: 1.0.2
Release: 10
Release: 11
Summary: gazelle is a high performance user-mode stack
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/gazelle
@ -48,6 +48,7 @@ Patch9029: 0029-stack-add-semaphore-to-ensure-all-stack-threads-setu.patch
Patch9030: 0030-ethdev-register-offload-to-netif.patch
Patch9031: 0031-epoll-fix-epollet-mode-error.patch
Patch9032: 0032-bond6.patch
Patch9033: 0033-cfg-fix-bond_mode-null.patch
%description
%{name} is a high performance user-mode stack.
@ -89,6 +90,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
%config(noreplace) %{conf_path}/ltran.conf
%changelog
* Sat Nov 4 2023 yinbin6 <yinbin8@huawei.com> - 1.0.2-11
- cfg: fix bond_mode null
* Sat Nov 4 2023 yinbin6 <yinbin8@huawei.com> - 1.0.2-10
- bond6
- epoll: fix epollet mode error