sync slove compile err when GAZELLE_TCP_REUSE_IPPORT is off
(cherry picked from commit 3335a9e8505134a212318093df9a05596ecdd4ae)
This commit is contained in:
parent
9950a82c2c
commit
0e87cb796e
@ -0,0 +1,50 @@
|
|||||||
|
From d64a161fb935b8fbfd69781a5cf891d2cebed2df Mon Sep 17 00:00:00 2001
|
||||||
|
From: hkk <hankangkang5@huawei.com>
|
||||||
|
Date: Fri, 25 Oct 2024 16:55:23 +0800
|
||||||
|
Subject: [PATCH] slove compile err when GAZELLE_TCP_REUSE_IPPORT is off
|
||||||
|
|
||||||
|
---
|
||||||
|
src/lstack/api/lstack_rtw_api.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lstack/api/lstack_rtw_api.c b/src/lstack/api/lstack_rtw_api.c
|
||||||
|
index 7ceff20..8765463 100644
|
||||||
|
--- a/src/lstack/api/lstack_rtw_api.c
|
||||||
|
+++ b/src/lstack/api/lstack_rtw_api.c
|
||||||
|
@@ -233,8 +233,9 @@ static int stack_broadcast_listen(int fd, int backlog)
|
||||||
|
}
|
||||||
|
|
||||||
|
struct protocol_stack_group *stack_group = get_protocol_stack_group();
|
||||||
|
+#if GAZELLE_TCP_REUSE_IPPORT
|
||||||
|
int min_conn_stk_idx = get_min_conn_stack(stack_group);
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
for (int32_t i = 0; i < stack_group->stack_num; ++i) {
|
||||||
|
stack = stack_group->stacks[i];
|
||||||
|
if (get_global_cfg_params()->seperate_send_recv && stack->is_send_thread) {
|
||||||
|
@@ -249,13 +250,13 @@ static int stack_broadcast_listen(int fd, int backlog)
|
||||||
|
} else {
|
||||||
|
clone_fd = fd;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+#if GAZELLE_TCP_REUSE_IPPORT
|
||||||
|
if (min_conn_stk_idx == i) {
|
||||||
|
lwip_get_socket(clone_fd)->conn->is_master_fd = 1;
|
||||||
|
} else {
|
||||||
|
lwip_get_socket(clone_fd)->conn->is_master_fd = 0;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
ret = rpc_call_listen(&stack->rpc_queue, clone_fd, backlog);
|
||||||
|
if (ret < 0) {
|
||||||
|
stack_broadcast_close(fd);
|
||||||
|
@@ -546,4 +547,4 @@ void rtw_api_init(posix_api_t *api)
|
||||||
|
|
||||||
|
api->poll_fn = rtw_poll;
|
||||||
|
api->select_fn = rtw_select;
|
||||||
|
-}
|
||||||
|
\ No newline at end of file
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: gazelle
|
Name: gazelle
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 71
|
Release: 72
|
||||||
Summary: gazelle is a high performance user-mode stack
|
Summary: gazelle is a high performance user-mode stack
|
||||||
License: MulanPSL-2.0
|
License: MulanPSL-2.0
|
||||||
URL: https://gitee.com/openeuler/gazelle
|
URL: https://gitee.com/openeuler/gazelle
|
||||||
@ -290,6 +290,7 @@ Patch9270: 0270-fix-dpdk_nic_is_xdp-coredump-in-ltran-mode.patch
|
|||||||
Patch9271: 0271-fix-the-coredump-when-gazellectl-l.patch
|
Patch9271: 0271-fix-the-coredump-when-gazellectl-l.patch
|
||||||
Patch9272: 0272-control-call-epoll_ctl-delete-fd-when-fd-close.patch
|
Patch9272: 0272-control-call-epoll_ctl-delete-fd-when-fd-close.patch
|
||||||
Patch9273: 0273-epoll-remove-unnecessary-judgment-code.patch
|
Patch9273: 0273-epoll-remove-unnecessary-judgment-code.patch
|
||||||
|
Patch9274: 0274-slove-compile-err-when-GAZELLE_TCP_REUSE_IPPORT-is-o.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{name} is a high performance user-mode stack.
|
%{name} is a high performance user-mode stack.
|
||||||
@ -331,6 +332,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
|
|||||||
%config(noreplace) %{conf_path}/ltran.conf
|
%config(noreplace) %{conf_path}/ltran.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Oct 26 2024 hantwofish <hankangkang5@huawei.com> - 1.0.2-72
|
||||||
|
- slove compile err when GAZELLE_TCP_REUSE_IPPORT is off
|
||||||
|
|
||||||
* Wed Oct 23 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-71
|
* Wed Oct 23 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-71
|
||||||
- epoll: remove unnecessary judgment code
|
- epoll: remove unnecessary judgment code
|
||||||
- control: call epoll_ctl delete fd when fd close
|
- control: call epoll_ctl delete fd when fd close
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user