!123 [sync] PR-122: sync fix pdump and mutil NIC init fail

From: @openeuler-sync-bot 
Reviewed-by: @wu-changsheng 
Signed-off-by: @wu-changsheng
This commit is contained in:
openeuler-ci-bot 2022-11-15 09:01:50 +00:00 committed by Gitee
commit 929a2427d2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,57 @@
From b2b659c8d2567b9553344ef7c4fe3489c2c7906b Mon Sep 17 00:00:00 2001
From: kircher <majun65@huawei.com>
Date: Mon, 14 Nov 2022 19:17:00 +0800
Subject: [PATCH] fix pdump and mutil NIC init fail
---
src/lstack/Makefile | 3 ++-
src/ltran/ltran_monitor.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
index cb7be16..b6cbd32 100644
--- a/src/lstack/Makefile
+++ b/src/lstack/Makefile
@@ -83,7 +83,8 @@ LIBRTE_LIB = $(LIB_PATH)/librte_bus_pci.so \
$(LIB_PATH)/librte_bpf.so \
$(LIB_PATH)/librte_pcapng.so \
$(LIB_PATH)/librte_security.so \
- $(LIB_PATH)/librte_cryptodev.so
+ $(LIB_PATH)/librte_cryptodev.so \
+ $(LIB_PATH)/librte_net_pcap.so
DEP_LIBS = $(LWIP_LIB) $(LIBRTE_LIB)
diff --git a/src/ltran/ltran_monitor.c b/src/ltran/ltran_monitor.c
index d535726..bd047fc 100644
--- a/src/ltran/ltran_monitor.c
+++ b/src/ltran/ltran_monitor.c
@@ -32,6 +32,7 @@
#include "gazelle_dfx_msg.h"
#include "gazelle_base_func.h"
#include "ltran_monitor.h"
+#include "ltran_param.h"
#define GAZELLE_LISTEN_BACKLOG 5
@@ -180,7 +181,7 @@ static int32_t gazelle_ctl_init(void)
LTRAN_ERR("dir not exist and create fail. ret=%d.\n", ret);
return GAZELLE_ERR;
}
- ret = unix_server_create(GAZELLE_DFX_SOCK_PATHNAME, &listenfd);
+ ret = unix_server_create(get_ltran_config()->dfx_socket_filename, &listenfd);
if (ret != GAZELLE_OK) {
LTRAN_ERR("unix_server_create failed. ret=%d.\n", ret);
return GAZELLE_ERR;
@@ -199,7 +200,7 @@ static int32_t gazelle_ctl_init(void)
return GAZELLE_ERR;
}
- ret = unix_server_create(GAZELLE_REG_SOCK_PATHNAME, &listenfd);
+ ret = unix_server_create(get_ltran_config()->unix_socket_filename, &listenfd);
if (ret != GAZELLE_OK) {
LTRAN_ERR("unix_server_create failed. ret=%d.\n", ret);
sockfd_data_free(event_dfx.data.ptr);
--
2.33.0

View File

@ -2,7 +2,7 @@
Name: gazelle
Version: 1.0.1
Release: 21
Release: 22
Summary: gazelle is a high performance user-mode stack
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/gazelle
@ -149,6 +149,7 @@ Patch9131: 0131-add-mutil-NIC-support-in-gazelle.patch
Patch9132: 0132-remove-filename_check-in-gazellectl-to-fix-build-err.patch
Patch9133: 0133-cancel-kernel-sock-epoll-ctl-when-lwip-sock-connect.patch
Patch9134: 0134-modify-readv-and-writev-first-buf-is-null.patch
Patch9135: 0135-fix-pdump-and-mutil-NIC-init-fail.patch
%description
%{name} is a high performance user-mode stack.
@ -189,6 +190,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
%config(noreplace) %{conf_path}/ltran.conf
%changelog
* Tue Nov 15 2022 kircher <majun65@huawei.com> - 1.0.1-22
- fix pdump and mutil NIC init fail
* Mon Nov 14 2022 wuchangsheng <wuchangsheng2@huawei.com> - 1.0.1-21
- support muti-nic
fix some bugs