!1002 [sync] PR-988: sync LOG:add log when udp send_ring is exhausted
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
ebff16560b
71
0255-DFX-adapt-log-optimization.patch
Normal file
71
0255-DFX-adapt-log-optimization.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 0093be5afee0264c669111a0137a580b2c314b6c Mon Sep 17 00:00:00 2001
|
||||
From: yinbin <yinbin8@huawei.com>
|
||||
Date: Wed, 18 Sep 2024 15:24:17 +0800
|
||||
Subject: [PATCH] DFX: adapt log optimization
|
||||
|
||||
---
|
||||
src/common/gazelle_dfx_msg.h | 8 ++++++++
|
||||
src/lstack/core/lstack_protocol_stack.c | 2 --
|
||||
src/ltran/ltran_dfx.c | 7 +++++++
|
||||
3 files changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/common/gazelle_dfx_msg.h b/src/common/gazelle_dfx_msg.h
|
||||
index 8eb54ff..08f9df1 100644
|
||||
--- a/src/common/gazelle_dfx_msg.h
|
||||
+++ b/src/common/gazelle_dfx_msg.h
|
||||
@@ -195,6 +195,14 @@ struct gazelle_stat_lstack_snmp {
|
||||
uint32_t tcp_acceptmbox_full;
|
||||
uint32_t tcp_listen_drops;
|
||||
uint32_t tcp_in_empty_acks;
|
||||
+ /* GAZELLE TCP */
|
||||
+ uint32_t tcp_rst_in_keepalive_timeout;
|
||||
+ uint32_t tcp_rst_wrong_syn_in_timewait;
|
||||
+ uint32_t tcp_rst_wrong_ack_in_syn_rcvd;
|
||||
+ uint32_t tcp_ooseq_data_drop;
|
||||
+ uint32_t tcp_free_pcb_in_syn_maxrtx;
|
||||
+ uint32_t tcp_free_pcb_in_maxrtx;
|
||||
+ uint32_t tcp_alloc_pcb_fails;
|
||||
|
||||
/* UDP */
|
||||
uint32_t udp_in_datagrams;
|
||||
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
|
||||
index 49b3ec8..00900e7 100644
|
||||
--- a/src/lstack/core/lstack_protocol_stack.c
|
||||
+++ b/src/lstack/core/lstack_protocol_stack.c
|
||||
@@ -886,7 +886,6 @@ void stack_tcp_send(struct rpc_msg *msg)
|
||||
struct lwip_sock *sock = lwip_get_socket(fd);
|
||||
if (POSIX_IS_CLOSED(sock)) {
|
||||
msg->result = -1;
|
||||
- LSTACK_LOG(ERR, LSTACK, "get sock error! fd=%d, len=%ld\n", fd, len);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -922,7 +921,6 @@ void stack_udp_send(struct rpc_msg *msg)
|
||||
struct lwip_sock *sock = lwip_get_socket(fd);
|
||||
if (POSIX_IS_CLOSED(sock)) {
|
||||
msg->result = -1;
|
||||
- LSTACK_LOG(ERR, LSTACK, "get sock error! fd=%d, len=%ld\n", fd, len);
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
|
||||
index 9815009..fc30054 100644
|
||||
--- a/src/ltran/ltran_dfx.c
|
||||
+++ b/src/ltran/ltran_dfx.c
|
||||
@@ -1005,6 +1005,13 @@ static void gazelle_print_lstack_tcp_stat(const struct gazelle_stat_lstack_snmp
|
||||
printf("tcp_acceptmbox_full: %u\n", snmp->tcp_acceptmbox_full);
|
||||
printf("tcp_listen_drops: %u\n", snmp->tcp_listen_drops);
|
||||
printf("tcp_in_empty_acks: %u\n", snmp->tcp_in_empty_acks);
|
||||
+ printf("tcp_rst_in_keepalive_timeout: %u\n", snmp->tcp_rst_in_keepalive_timeout);
|
||||
+ printf("tcp_rst_wrong_syn_in_timewait: %u\n", snmp->tcp_rst_wrong_syn_in_timewait);
|
||||
+ printf("tcp_rst_wrong_ack_in_syn_rcvd: %u\n", snmp->tcp_rst_wrong_ack_in_syn_rcvd);
|
||||
+ printf("tcp_ooseq_data_drop: %u\n", snmp->tcp_ooseq_data_drop);
|
||||
+ printf("tcp_free_pcb_in_syn_maxrtx: %u\n", snmp->tcp_free_pcb_in_syn_maxrtx);
|
||||
+ printf("tcp_free_pcb_in_maxrtx: %u\n", snmp->tcp_free_pcb_in_maxrtx);
|
||||
+ printf("tcp_alloc_pcb_fails: %u\n", snmp->tcp_alloc_pcb_fails);
|
||||
}
|
||||
|
||||
static void gazelle_print_ltran_stat_lb_rate(void *buf, const struct gazelle_stat_msg_request *req_msg)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
24
0256-LOG-add-log-when-udp-send_ring-is-exhausted.patch
Normal file
24
0256-LOG-add-log-when-udp-send_ring-is-exhausted.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 66b11c7916740615be6012938e82abd821a1b06e Mon Sep 17 00:00:00 2001
|
||||
From: yinbin <yinbin8@huawei.com>
|
||||
Date: Mon, 23 Sep 2024 20:17:10 +0800
|
||||
Subject: [PATCH] LOG:add log when udp send_ring is exhausted
|
||||
|
||||
---
|
||||
src/lstack/core/lstack_lwip.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
|
||||
index 636bbc7..a7b7202 100644
|
||||
--- a/src/lstack/core/lstack_lwip.c
|
||||
+++ b/src/lstack/core/lstack_lwip.c
|
||||
@@ -497,6 +497,7 @@ static ssize_t do_lwip_udp_fill_sendring(struct lwip_sock *sock, const void *buf
|
||||
}
|
||||
|
||||
if (write_avail < write_num) {
|
||||
+ LSTACK_LOG(WARNING, LSTACK, "sock send_ring is already exhausted.\n");
|
||||
sem_timedwait_nsecs(&sock->snd_ring_sem);
|
||||
GAZELLE_RETURN(ENOMEM);
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: gazelle
|
||||
Version: 1.0.2
|
||||
Release: 62
|
||||
Release: 63
|
||||
Summary: gazelle is a high performance user-mode stack
|
||||
License: MulanPSL-2.0
|
||||
URL: https://gitee.com/openeuler/gazelle
|
||||
@ -271,6 +271,8 @@ Patch9251: 0251-fix-when-errno-is-ENOTCONN-ignore-it.patch
|
||||
Patch9252: 0252-rtc-do_lwip_init_sock-no-need-to-create-ring-in-rtc-.patch
|
||||
Patch9253: 0253-example-solve-double-free.patch
|
||||
Patch9254: 0254-WRAP-support-setsockopt-SO_SNDTIMEO-SO_SNBUF.patch
|
||||
Patch9255: 0255-DFX-adapt-log-optimization.patch
|
||||
Patch9256: 0256-LOG-add-log-when-udp-send_ring-is-exhausted.patch
|
||||
|
||||
%description
|
||||
%{name} is a high performance user-mode stack.
|
||||
@ -312,6 +314,10 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
||||
%config(noreplace) %{conf_path}/ltran.conf
|
||||
|
||||
%changelog
|
||||
* Fri Sep 27 2024 yinbin6 <jiangheng14@huawei.com> - 1.0.2-63
|
||||
- LOG:add log when udp send_ring is exhausted
|
||||
- DFX: adapt log optimization
|
||||
|
||||
* Fri Sep 20 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-62
|
||||
- WRAP: support setsockopt SO_SNDTIMEO SO_SNBUF
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user