sync fix function call error
(cherry picked from commit de948320ba08ed46e8bbbe80d4aca5555ef32f0e)
This commit is contained in:
parent
e91de899f3
commit
a9a72c0658
66
0198-fix-function-call-error.patch
Normal file
66
0198-fix-function-call-error.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From bcf0dff302a8416cb7528ee44c2f0fb3138ff13e Mon Sep 17 00:00:00 2001
|
||||
From: yangchen <yangchen145@huawei.com>
|
||||
Date: Tue, 25 Jun 2024 17:53:36 +0800
|
||||
Subject: [PATCH] fix function call error
|
||||
|
||||
---
|
||||
src/lstack/core/lstack_protocol_stack.c | 8 ++++----
|
||||
src/lstack/core/lstack_stack_stat.c | 2 +-
|
||||
src/lstack/include/lstack_stack_stat.h | 2 --
|
||||
3 files changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
|
||||
index d130c91..d6e3c86 100644
|
||||
--- a/src/lstack/core/lstack_protocol_stack.c
|
||||
+++ b/src/lstack/core/lstack_protocol_stack.c
|
||||
@@ -921,10 +921,6 @@ void stack_udp_send(struct rpc_msg *msg)
|
||||
int replenish_again;
|
||||
uint32_t call_num;
|
||||
|
||||
- if (get_protocol_stack_group()->latency_start) {
|
||||
- calculate_rpcmsg_latency(&stack->latency, msg, GAZELLE_LATENCY_WRITE_RPC_MSG);
|
||||
- }
|
||||
-
|
||||
struct lwip_sock *sock = get_socket(fd);
|
||||
if (sock == NULL) {
|
||||
msg->result = -1;
|
||||
@@ -932,6 +928,10 @@ void stack_udp_send(struct rpc_msg *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (get_protocol_stack_group()->latency_start) {
|
||||
+ calculate_sock_latency(&stack->latency, sock, GAZELLE_LATENCY_WRITE_RPC_MSG);
|
||||
+ }
|
||||
+
|
||||
replenish_again = do_lwip_send(stack, sock->conn->callback_arg.socket, sock, len, 0);
|
||||
call_num = __sync_fetch_and_sub(&sock->call_num, 1);
|
||||
if (replenish_again < 0) {
|
||||
diff --git a/src/lstack/core/lstack_stack_stat.c b/src/lstack/core/lstack_stack_stat.c
|
||||
index a1bd44d..0f1f693 100644
|
||||
--- a/src/lstack/core/lstack_stack_stat.c
|
||||
+++ b/src/lstack/core/lstack_stack_stat.c
|
||||
@@ -82,7 +82,7 @@ void time_stamp_record(int fd, struct pbuf *pbuf)
|
||||
{
|
||||
struct lwip_sock *sock = get_socket_by_fd(fd);
|
||||
|
||||
- if (get_protocol_stack_group()->latency_start && pbuf != NULL) {
|
||||
+ if (get_protocol_stack_group()->latency_start && sock && pbuf) {
|
||||
calculate_lstack_latency(&sock->stack->latency, pbuf, GAZELLE_LATENCY_INTO_MBOX, 0);
|
||||
time_stamp_into_recvmbox(sock);
|
||||
}
|
||||
diff --git a/src/lstack/include/lstack_stack_stat.h b/src/lstack/include/lstack_stack_stat.h
|
||||
index f0d3d5d..9fca04a 100644
|
||||
--- a/src/lstack/include/lstack_stack_stat.h
|
||||
+++ b/src/lstack/include/lstack_stack_stat.h
|
||||
@@ -26,8 +26,6 @@ struct lwip_sock;
|
||||
|
||||
void calculate_lstack_latency(struct gazelle_stack_latency *stack_latency, const struct pbuf *pbuf,
|
||||
enum GAZELLE_LATENCY_TYPE type, uint64_t time_record);
|
||||
-void calculate_rpcmsg_latency(struct gazelle_stack_latency *stack_latency, struct rpc_msg *msg,
|
||||
- enum GAZELLE_LATENCY_TYPE type);
|
||||
void calculate_sock_latency(struct gazelle_stack_latency *stack_latency, struct lwip_sock *sock,
|
||||
enum GAZELLE_LATENCY_TYPE type);
|
||||
void stack_stat_init(void);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: gazelle
|
||||
Version: 1.0.2
|
||||
Release: 45
|
||||
Release: 46
|
||||
Summary: gazelle is a high performance user-mode stack
|
||||
License: MulanPSL-2.0
|
||||
URL: https://gitee.com/openeuler/gazelle
|
||||
@ -214,6 +214,7 @@ Patch9194: 0194-refactor-tx-cache-module.patch
|
||||
Patch9195: 0195-virtio-create-and-init-virtio_port.patch
|
||||
Patch9196: 0196-refactor-udp-send.patch
|
||||
Patch9197: 0197-solve-compile-err-in-20.03.patch
|
||||
Patch9198: 0198-fix-function-call-error.patch
|
||||
|
||||
%description
|
||||
%{name} is a high performance user-mode stack.
|
||||
@ -255,6 +256,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
||||
%config(noreplace) %{conf_path}/ltran.conf
|
||||
|
||||
%changelog
|
||||
* Wed Jun 26 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-46
|
||||
- fix function call error
|
||||
|
||||
* Tue Jun 25 2024 yinbin<yinbin6@huawei.com> - 1.0.2-45
|
||||
- fix changelog version incorrect
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user