sync fix bond4 EPOLLOUT event error
(cherry picked from commit 7ecd02724564fe72b2ad772c2faa63be949a3823)
This commit is contained in:
parent
1ef8d0de2f
commit
ab5a5149ab
63
0261-fix-bond4-EPOLLOUT-event-error.patch
Normal file
63
0261-fix-bond4-EPOLLOUT-event-error.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
From 0e6863306602e58e21932ed9b5fccf269e77e1da Mon Sep 17 00:00:00 2001
|
||||||
|
From: compile_success <980965867@qq.com>
|
||||||
|
Date: Wed, 28 Jun 2023 11:40:36 +0000
|
||||||
|
Subject: [PATCH] fix bond4 EPOLLOUT event error
|
||||||
|
|
||||||
|
---
|
||||||
|
src/lstack/api/lstack_epoll.c | 12 ++++++------
|
||||||
|
src/lstack/core/lstack_lwip.c | 2 +-
|
||||||
|
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lstack/api/lstack_epoll.c b/src/lstack/api/lstack_epoll.c
|
||||||
|
index 06bd71b..55ca4fe 100644
|
||||||
|
--- a/src/lstack/api/lstack_epoll.c
|
||||||
|
+++ b/src/lstack/api/lstack_epoll.c
|
||||||
|
@@ -140,6 +140,11 @@ static void raise_pending_events(struct wakeup_poll *wakeup, struct lwip_sock *s
|
||||||
|
event |= EPOLLIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (sock->errevent > 0) {
|
||||||
|
+ event |= EPOLLERR | EPOLLIN;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ pthread_spin_lock(&wakeup->event_list_lock);
|
||||||
|
if (NETCONN_IS_OUTIDLE(sock)) {
|
||||||
|
/* lwip_netconn_do_connected set LIBOS FLAGS when connected */
|
||||||
|
if (sock->conn && CONN_TYPE_IS_LIBOS(sock->conn)) {
|
||||||
|
@@ -147,19 +152,14 @@ static void raise_pending_events(struct wakeup_poll *wakeup, struct lwip_sock *s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (sock->errevent > 0) {
|
||||||
|
- event |= EPOLLERR | EPOLLIN;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (event) {
|
||||||
|
- pthread_spin_lock(&wakeup->event_list_lock);
|
||||||
|
sock->events = event;
|
||||||
|
if (wakeup->type == WAKEUP_EPOLL && (sock->events & sock->epoll_events) &&
|
||||||
|
list_is_null(&sock->event_list)) {
|
||||||
|
list_add_node(&wakeup->event_list, &sock->event_list);
|
||||||
|
}
|
||||||
|
- pthread_spin_unlock(&wakeup->event_list_lock);
|
||||||
|
}
|
||||||
|
+ pthread_spin_unlock(&wakeup->event_list_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t lstack_do_epoll_create(int32_t fd)
|
||||||
|
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
|
||||||
|
index d53591d..c1346f6 100644
|
||||||
|
--- a/src/lstack/core/lstack_lwip.c
|
||||||
|
+++ b/src/lstack/core/lstack_lwip.c
|
||||||
|
@@ -645,7 +645,7 @@ static inline bool replenish_send_ring(struct protocol_stack *stack, struct lwip
|
||||||
|
|
||||||
|
replenish_again = replenish_send_idlembuf(stack, sock);
|
||||||
|
|
||||||
|
- if ((sock->epoll_events & EPOLLOUT) && NETCONN_IS_OUTIDLE(sock)) {
|
||||||
|
+ if (NETCONN_IS_OUTIDLE(sock)) {
|
||||||
|
add_sock_event(sock, EPOLLOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: gazelle
|
Name: gazelle
|
||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Release: 70
|
Release: 71
|
||||||
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
|
||||||
@ -276,6 +276,7 @@ Patch9257: 0257-enable-UDP-CKSUM-in-gazelle.patch
|
|||||||
Patch9258: 0258-fix-core-dump-when-slave-mac-failed.patch
|
Patch9258: 0258-fix-core-dump-when-slave-mac-failed.patch
|
||||||
Patch9259: 0259-check-return-value-of-hugepage_init-to-avoid-coredum.patch
|
Patch9259: 0259-check-return-value-of-hugepage_init-to-avoid-coredum.patch
|
||||||
Patch9260: 0260-add-udp_enable-to-turn-off-udp-in-need.patch
|
Patch9260: 0260-add-udp_enable-to-turn-off-udp-in-need.patch
|
||||||
|
Patch9261: 0261-fix-bond4-EPOLLOUT-event-error.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{name} is a high performance user-mode stack.
|
%{name} is a high performance user-mode stack.
|
||||||
@ -317,6 +318,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 Jul 1 2023 jiangheng12 <chengyechun1@huawei.com> - 1.0.1-71
|
||||||
|
- fix bond4 EPOLLOUT event error
|
||||||
|
|
||||||
* Fri Jun 30 2023 jiangheng12 <jiangheng14@huawei.com> - 1.0.1-70
|
* Fri Jun 30 2023 jiangheng12 <jiangheng14@huawei.com> - 1.0.1-70
|
||||||
- add build requires constraints on lwip version
|
- add build requires constraints on lwip version
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user