sync LOG: Optimize some log displays

(cherry picked from commit 877d1f41a7e438846cf67a03b4ae8e60e8402b50)
This commit is contained in:
jiangheng 2024-11-08 17:21:58 +08:00 committed by openeuler-sync-bot
parent 3f8fc11a12
commit 56df2c50e6
4 changed files with 150 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From e35d6ffd66becc2725b38115322307261dd87f07 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Sat, 2 Nov 2024 19:00:31 +0800
Subject: [PATCH] interrupt: fix timeout events cannot be counted
---
src/lstack/core/lstack_interrupt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lstack/core/lstack_interrupt.c b/src/lstack/core/lstack_interrupt.c
index 26823cd..67b763c 100644
--- a/src/lstack/core/lstack_interrupt.c
+++ b/src/lstack/core/lstack_interrupt.c
@@ -317,7 +317,7 @@ static inline void intr_block(uint16_t stack_id, uint32_t timeout)
}
}
- if (event_cnt < 0) {
+ if (event_cnt == 0) {
intr_config->stats.timeout_event_cnt++;
}
}
--
2.33.0

View File

@ -0,0 +1,76 @@
From 84897b16c0a93606817443f792da97b5923fbdf0 Mon Sep 17 00:00:00 2001
From: hankangkang <hankangkang5@huawei.com>
Date: Thu, 31 Oct 2024 16:06:21 +0800
Subject: [PATCH] remove: code about nobolck mode for mysql
---
src/lstack/api/lstack_rtw_api.c | 5 +----
src/lstack/core/lstack_cfg.c | 9 ---------
src/lstack/include/lstack_cfg.h | 1 -
3 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/src/lstack/api/lstack_rtw_api.c b/src/lstack/api/lstack_rtw_api.c
index 8765463..eab379c 100644
--- a/src/lstack/api/lstack_rtw_api.c
+++ b/src/lstack/api/lstack_rtw_api.c
@@ -190,10 +190,7 @@ static int stack_broadcast_accept4(int fd, struct sockaddr *addr, socklen_t *add
static int stack_broadcast_accept(int fd, struct sockaddr *addr, socklen_t *addrlen)
{
- if (get_global_cfg_params()->nonblock_mode)
- return stack_broadcast_accept4(fd, addr, addrlen, O_NONBLOCK);
- else
- return stack_broadcast_accept4(fd, addr, addrlen, 0);
+ return stack_broadcast_accept4(fd, addr, addrlen, 0);
}
/* choice one stack listen */
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index f239b60..4c8f066 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -81,7 +81,6 @@ static int32_t parse_nic_rxqueue_size(void);
static int32_t parse_nic_txqueue_size(void);
static int32_t parse_stack_thread_mode(void);
static int32_t parse_nic_vlan_mode(void);
-static int32_t parse_defaule_nonblock_mode(void);
static int32_t parse_rpc_msg_max(void);
static int32_t parse_send_cache_mode(void);
static int32_t parse_flow_bifurcation(void);
@@ -149,7 +148,6 @@ static struct config_vector_t g_config_tbl[] = {
{ "nic_txqueue_size", parse_nic_txqueue_size},
{ "stack_thread_mode", parse_stack_thread_mode },
{ "nic_vlan_mode", parse_nic_vlan_mode },
- { "nonblock_mode", parse_defaule_nonblock_mode },
{ "rpc_msg_max", parse_rpc_msg_max },
{ "send_cache_mode", parse_send_cache_mode },
{ "flow_bifurcation", parse_flow_bifurcation},
@@ -1358,13 +1356,6 @@ static int32_t parse_nic_vlan_mode(void)
return ret;
}
-static int32_t parse_defaule_nonblock_mode(void)
-{
- int32_t ret;
- PARSE_ARG(g_config_params.nonblock_mode, "nonblock_mode", 1, 0, 1, ret);
- return ret;
-}
-
static int32_t parse_rpc_msg_max(void)
{
int32_t ret;
diff --git a/src/lstack/include/lstack_cfg.h b/src/lstack/include/lstack_cfg.h
index 071492d..876423d 100644
--- a/src/lstack/include/lstack_cfg.h
+++ b/src/lstack/include/lstack_cfg.h
@@ -136,7 +136,6 @@ struct cfg_params {
struct { // deprecated
char unix_socket_filename[NAME_MAX];
bool use_ltran; // false:lstack read from nic. true:lstack read form ltran process.
- bool nonblock_mode;
bool udp_enable;
bool kni_switch;
};
--
2.33.0

View File

@ -0,0 +1,40 @@
From c33bfd14030ee84d4da1a5083fe47271f4cb27bb Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Tue, 5 Nov 2024 19:55:52 +0800
Subject: [PATCH] LOG: Optimize some log displays
---
src/lstack/core/lstack_init.c | 2 +-
src/lstack/core/lstack_thread_rpc.c | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/lstack/core/lstack_init.c b/src/lstack/core/lstack_init.c
index 8ffc3a1..276cdf8 100644
--- a/src/lstack/core/lstack_init.c
+++ b/src/lstack/core/lstack_init.c
@@ -264,7 +264,7 @@ __attribute__((constructor)) void gazelle_network_init(void)
/* check conflict */
if (check_process_conflict() < 0) {
- LSTACK_PRE_LOG(LSTACK_INFO, "Have another same primary process. WARNING: Posix API will use kernel mode!\n");
+ LSTACK_PRE_LOG(LSTACK_INFO, "Main process has been initialized, this process will use kernel mode!\n");
return;
}
diff --git a/src/lstack/core/lstack_thread_rpc.c b/src/lstack/core/lstack_thread_rpc.c
index aed792d..26bd16a 100644
--- a/src/lstack/core/lstack_thread_rpc.c
+++ b/src/lstack/core/lstack_thread_rpc.c
@@ -470,9 +470,6 @@ int rpc_call_connect(rpc_queue *queue, int fd, const struct sockaddr *addr, sock
static void callback_getpeername(struct rpc_msg *msg)
{
msg->result = lwip_getpeername(msg->args[MSG_ARG_0].i, msg->args[MSG_ARG_1].p, msg->args[MSG_ARG_2].p);
- if (msg->result != 0) {
- LSTACK_LOG(ERR, LSTACK, "tid %ld, fd %d fail %ld\n", get_stack_tid(), msg->args[MSG_ARG_0].i, msg->result);
- }
}
static void callback_getsockname(struct rpc_msg *msg)
--
2.33.0

View File

@ -2,7 +2,7 @@
Name: gazelle
Version: 1.0.2
Release: 73
Release: 74
Summary: gazelle is a high performance user-mode stack
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/gazelle
@ -296,6 +296,9 @@ Patch9276: 0276-Fix-annotation-errors.patch
Patch9277: 0277-remove-the-unused-return-variable.patch
Patch9278: 0278-add-SO_NUMA_ID-optname-for-adapting-opneGauss.patch
Patch9279: 0279-xdp-support-XDP_STATISTICS-by-posix_api-getsockopt_f.patch
Patch9280: 0280-interrupt-fix-timeout-events-cannot-be-counted.patch
Patch9281: 0281-remove-code-about-nobolck-mode-for-mysql.patch
Patch9282: 0282-LOG-Optimize-some-log-displays.patch
%description
%{name} is a high performance user-mode stack.
@ -337,6 +340,11 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
%config(noreplace) %{conf_path}/ltran.conf
%changelog
* Fri Nov 08 2024 yinbin <jiangheng14@huawei.com> - 1.0.2-74
- LOG: Optimize some log displays
- remove: code about nobolck mode for mysql
- interrupt: fix timeout events cannot be counted
* Fri Nov 01 2024 hantwofish <yinbin8@huawei.com> - 1.0.2-73
- xdp: support XDP_STATISTICS by posix_api->getsockopt_fn
- add SO_NUMA_ID(optname) for adapting opneGauss