expand recv mbox size
(cherry picked from commit 8af4c656e2462964cfedc5b8672296b6aa0b4612)
This commit is contained in:
parent
913df55b2b
commit
a00839adf3
61
0049-expand-recv-mbox-size.patch
Normal file
61
0049-expand-recv-mbox-size.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From c18ca96d1c2ef02153ce9fb22386b4e8a44b60e9 Mon Sep 17 00:00:00 2001
|
||||
From: wuchangsheng <wuchangsheng2@huawei.com>
|
||||
Date: Fri, 30 Dec 2022 11:34:31 +0800
|
||||
Subject: [PATCH] expand recv mbox size
|
||||
|
||||
---
|
||||
src/core/tcp_out.c | 6 +++---
|
||||
src/include/lwipopts.h | 2 +-
|
||||
src/include/lwipsock.h | 2 --
|
||||
3 files changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c
|
||||
index 4feeb69..f84ff57 100644
|
||||
--- a/src/core/tcp_out.c
|
||||
+++ b/src/core/tcp_out.c
|
||||
@@ -1476,9 +1476,9 @@ tcp_output(struct tcp_pcb *pcb)
|
||||
if (get_eth_params_tx_ol() & DEV_TX_OFFLOAD_TCP_TSO) {
|
||||
while(seg && send_len < 0xffff) {
|
||||
/**
|
||||
- * 1)遍历unsent队列,找到所有的待发送seg. 将seg的buf串起来
|
||||
- * 2) 生成新的seg, 调用tcp_output_segment, 新的seg释放掉
|
||||
- * 3) 若成功,则更新snd_nxt, unacked队列,和unsent队列。
|
||||
+ * 1) walk unsent queue, find all seg witch wait to send. chain buf in these segs.
|
||||
+ * 2) create new segment, send and free new segment.
|
||||
+ * 3) update snd_nxt, unacked queue, and unsent queue
|
||||
*/
|
||||
struct tcp_seg *start_seg = seg;
|
||||
struct pbuf *first_pbuf = NULL;
|
||||
diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h
|
||||
index 405cf11..fedded9 100644
|
||||
--- a/src/include/lwipopts.h
|
||||
+++ b/src/include/lwipopts.h
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
#define LWIP_NETIF_API 1
|
||||
|
||||
-#define DEFAULT_TCP_RECVMBOX_SIZE 128
|
||||
+#define DEFAULT_TCP_RECVMBOX_SIZE 4096
|
||||
|
||||
#define DEFAULT_ACCEPTMBOX_SIZE 1024
|
||||
|
||||
diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h
|
||||
index fef5b6d..a807e3e 100644
|
||||
--- a/src/include/lwipsock.h
|
||||
+++ b/src/include/lwipsock.h
|
||||
@@ -104,12 +104,10 @@ struct lwip_sock {
|
||||
char pad1 __rte_cache_aligned;
|
||||
/* app and stack thread all use */
|
||||
uint32_t in_send; /* avoid sock too much send rpc msg*/
|
||||
- bool read_wait;
|
||||
char pad2 __rte_cache_aligned;
|
||||
/* stack thread all use */
|
||||
struct list_node recv_list;
|
||||
struct list_node send_list;
|
||||
- struct pbuf *lwip_lastdata;
|
||||
struct pbuf *send_lastdata;
|
||||
struct pbuf *send_pre_del;
|
||||
|
||||
--
|
||||
2.8.4.windows.1
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.1.3
|
||||
Release: 38
|
||||
Release: 39
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||
@ -60,6 +60,7 @@ Patch9044: 0045-add-variable-in-struct-sock.patch
|
||||
Patch9045: 0046-add-dataack-when-recv-too-many-acks-with-data.patch
|
||||
Patch9046: 0047-reduce-struct-pbuf-size.patch
|
||||
Patch9047: 0048-listen-pcb-also-use-pcb_if.patch
|
||||
Patch9048: 0049-expand-recv-mbox-size.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -124,6 +125,7 @@ find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \;
|
||||
%patch9045 -p1
|
||||
%patch9046 -p1
|
||||
%patch9047 -p1
|
||||
%patch9048 -p1
|
||||
|
||||
%build
|
||||
cd %{_builddir}/%{name}-%{version}/src
|
||||
@ -139,6 +141,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Fri Dec 30 2022 wuchangsheng<wuchangsheng2@huawei.com> - 2.1.3-39
|
||||
- expand recv mbox size
|
||||
|
||||
* Wed Dec 21 2022 jiangheng <jiangheng14@huawei.com> - 2.1.3-38
|
||||
- move pcb_if to ip_pcb to let listen pcb can use it
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user