代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lwip 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b3a058a46a27beadb5976d4618e2f33a69909c9b Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Tue, 18 Jun 2024 09:31:12 +0800
Subject: [PATCH] distinguish tcp/udp get_from_sendring
---
src/core/tcp_out.c | 3 ++-
src/core/udp.c | 4 +---
src/include/lwip/pbuf.h | 2 +-
src/include/lwipsock.h | 3 ++-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c
index 8a9016b..839e904 100644
--- a/src/core/tcp_out.c
+++ b/src/core/tcp_out.c
@@ -907,8 +907,9 @@ tcp_write_from_stack(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apifl
u16_t max_len = mss_local - optlen;
u16_t seglen = LWIP_MIN(left, max_len);
- p = do_lwip_get_from_sendring((struct lwip_sock *)arg, len - pos, &apiflags);
+ p = do_lwip_tcp_get_from_sendring((struct lwip_sock *)arg, len - pos);
if (p == NULL) {
+ apiflags &= ~TCP_WRITE_FLAG_MORE;
break;
}
seglen = p->tot_len;
diff --git a/src/core/udp.c b/src/core/udp.c
index 1fae8b6..086e7e0 100644
--- a/src/core/udp.c
+++ b/src/core/udp.c
@@ -702,9 +702,7 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip,
return ERR_RTE;
}
#if GAZELLE_UDP_ENABLE
- uint8_t apiflags = 0;
-
- struct pbuf *udp_pbuf = do_lwip_get_from_sendring((struct lwip_sock *)(p->payload), p->tot_len, &apiflags);
+ struct pbuf *udp_pbuf = do_lwip_udp_get_from_sendring((struct lwip_sock *)(p->payload), p->tot_len);
do_lwip_get_from_sendring_over((struct lwip_sock *)(p->payload));
p = udp_pbuf;
diff --git a/src/include/lwip/pbuf.h b/src/include/lwip/pbuf.h
index d84c9da..2bb9675 100644
--- a/src/include/lwip/pbuf.h
+++ b/src/include/lwip/pbuf.h
@@ -225,7 +225,7 @@ struct pbuf {
u8_t if_idx;
#if GAZELLE_ENABLE && CHECKSUM_OFFLOAD_ALL
- volatile u8_t allow_in;
+ volatile u8_t allow_append;
pthread_spinlock_t pbuf_lock;
struct tcp_pcb *pcb;
#if GAZELLE_UDP_ENABLE
diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h
index d700cee..7ba685a 100644
--- a/src/include/lwipsock.h
+++ b/src/include/lwipsock.h
@@ -174,7 +174,8 @@ extern struct lwip_sock *sockets;
extern void do_lwip_init_sock(int32_t fd);
extern void do_lwip_clean_sock(int32_t fd);
extern void do_lwip_connected_callback(struct netconn *conn);
-extern struct pbuf *do_lwip_get_from_sendring(struct lwip_sock *sock, uint16_t remain_size, uint8_t *apiflags);
+extern struct pbuf *do_lwip_udp_get_from_sendring(struct lwip_sock *sock, uint16_t remain_size);
+extern struct pbuf *do_lwip_tcp_get_from_sendring(struct lwip_sock *sock, uint16_t remain_size);
extern void do_lwip_get_from_sendring_over(struct lwip_sock *sock);
extern ssize_t do_lwip_read_from_lwip(struct lwip_sock *sock, int32_t flags, u8_t apiflags);
extern void do_lwip_add_recvlist(int32_t fd);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。