!26 [sync] PR-23: gazelle_sock_init 函数需要在产生读事件之前执行
From: @openeuler-sync-bot Reviewed-by: @nlgwcy Signed-off-by: @nlgwcy
This commit is contained in:
commit
de35ca0d62
37
0018-exec-gazelle_init_sock-before-read-event.patch
Normal file
37
0018-exec-gazelle_init_sock-before-read-event.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 544bf45ec99c853ad5e9ec2607669df01b4e0572 Mon Sep 17 00:00:00 2001
|
||||||
|
From: jiangheng <jiangheng12@huawei.com>
|
||||||
|
Date: Mon, 7 Mar 2022 21:06:39 +0800
|
||||||
|
Subject: [PATCH] exec gazelle_init_sock() before read event
|
||||||
|
|
||||||
|
---
|
||||||
|
src/api/sockets.c | 1 +
|
||||||
|
src/include/lwipsock.h | 1 +
|
||||||
|
2 files changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/api/sockets.c b/src/api/sockets.c
|
||||||
|
index 4b682f3..21de5d9 100644
|
||||||
|
--- a/src/api/sockets.c
|
||||||
|
+++ b/src/api/sockets.c
|
||||||
|
@@ -763,6 +763,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
|
||||||
|
}
|
||||||
|
#if USE_LIBOS
|
||||||
|
LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < sockets_num + LWIP_SOCKET_OFFSET));
|
||||||
|
+ gazelle_init_sock(newsock);
|
||||||
|
#else
|
||||||
|
LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LWIP_SOCKET_OFFSET));
|
||||||
|
#endif /* USE_LIBOS */
|
||||||
|
diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h
|
||||||
|
index e2519ff..355bf47 100644
|
||||||
|
--- a/src/include/lwipsock.h
|
||||||
|
+++ b/src/include/lwipsock.h
|
||||||
|
@@ -157,6 +157,7 @@ get_socket_without_errno(int s)
|
||||||
|
extern void add_recv_list(int32_t fd);
|
||||||
|
extern ssize_t read_lwip_data(struct lwip_sock *sock, int32_t flags, u8_t apiflags);
|
||||||
|
extern void gazelle_clean_sock(int32_t fd);
|
||||||
|
+extern void gazelle_init_sock(int32_t fd);
|
||||||
|
#endif /* USE_LIBOS */
|
||||||
|
|
||||||
|
struct lwip_sock *get_socket(int s);
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||||
Name: lwip
|
Name: lwip
|
||||||
Version: 2.1.3
|
Version: 2.1.3
|
||||||
Release: 4
|
Release: 5
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://savannah.nongnu.org/projects/lwip/
|
URL: http://savannah.nongnu.org/projects/lwip/
|
||||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz
|
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz
|
||||||
@ -26,6 +26,7 @@ Patch9013: 0014-fix-some-compile-errors.patch
|
|||||||
Patch9014: 0015-fix-tcp-port-alloc-issue.patch
|
Patch9014: 0015-fix-tcp-port-alloc-issue.patch
|
||||||
Patch9015: 0016-lstack-support-mysql-mode.patch
|
Patch9015: 0016-lstack-support-mysql-mode.patch
|
||||||
Patch9016: 0017-support-REUSEPOR-option.patch
|
Patch9016: 0017-support-REUSEPOR-option.patch
|
||||||
|
Patch9017: 0018-exec-gazelle_init_sock-before-read-event.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \;
|
|||||||
%patch9014 -p1
|
%patch9014 -p1
|
||||||
%patch9015 -p1
|
%patch9015 -p1
|
||||||
%patch9016 -p1
|
%patch9016 -p1
|
||||||
|
%patch9017 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd %{_builddir}/%{name}-%{version}/src
|
cd %{_builddir}/%{name}-%{version}/src
|
||||||
@ -72,6 +74,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
|||||||
%{_libdir}/liblwip.a
|
%{_libdir}/liblwip.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 07 2022 jiangheng<jiangheng12@huawei.com> - 2.1.3-5
|
||||||
|
- exec gazelle_sock_init before read event
|
||||||
|
|
||||||
* Thu Mar 03 2022 jiangheng<jiangheng12@huawei.com> - 2.1.3-4
|
* Thu Mar 03 2022 jiangheng<jiangheng12@huawei.com> - 2.1.3-4
|
||||||
- support REUSEPOR option
|
- support REUSEPOR option
|
||||||
- fix rpc msg too much
|
- fix rpc msg too much
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user