代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 7f3dbd7145d683c22e70d69ec8799a49cb837415 Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Wed, 9 Mar 2022 17:44:50 +0800
Subject: [PATCH 11/34] fix evetns err
---
src/lstack/core/lstack_lwip.c | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 87d99d3..3b97bb8 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -317,14 +317,16 @@ ssize_t write_stack_data(struct lwip_sock *sock, const void *buf, size_t len)
send_pkt++;
}
- if (NETCONN_IS_DATAOUT(sock)) {
- sock->have_event = true;
- sock->events |= EPOLLOUT;
- rte_ring_mp_enqueue(sock->weakup->event_ring, (void *)sock);
- sem_post(&sock->weakup->event_sem);
- sock->stack->stats.write_events++;
- } else {
- sock->have_event = false;
+ if ((sock->epoll_events & EPOLLOUT)) {
+ if (NETCONN_IS_DATAOUT(sock)) {
+ sock->have_event = true;
+ sock->events |= EPOLLOUT;
+ rte_ring_mp_enqueue(sock->weakup->event_ring, (void *)sock);
+ sem_post(&sock->weakup->event_sem);
+ sock->stack->stats.write_events++;
+ } else {
+ sock->have_event = false;
+ }
}
if (rte_ring_free_count(sock->stack->send_idle_ring) > USED_IDLE_WATERMARK && !sock->stack->in_replenish) {
@@ -518,14 +520,16 @@ ssize_t read_stack_data(int32_t fd, void *buf, size_t len, int32_t flags)
}
}
- if (NETCONN_IS_DATAIN(sock)) {
- sock->have_event = true;
- sock->events |= EPOLLIN;
- rte_ring_mp_enqueue(sock->weakup->event_ring, (void *)sock);
- sem_post(&sock->weakup->event_sem);
- sock->stack->stats.read_events++;
- } else {
- sock->have_event = false;
+ if ((sock->epoll_events & EPOLLIN)) {
+ if (NETCONN_IS_DATAIN(sock)) {
+ sock->have_event = true;
+ sock->events |= EPOLLIN;
+ rte_ring_mp_enqueue(sock->weakup->event_ring, (void *)sock);
+ sem_post(&sock->weakup->event_sem);
+ sock->stack->stats.read_events++;
+ } else {
+ sock->have_event = false;
+ }
}
if (recvd == 0) {
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。