1From c18ca96d1c2ef02153ce9fb22386b4e8a44b60e9 Mon Sep 17 00:00:00 2001 2From: wuchangsheng <wuchangsheng2@huawei.com> 3Date: Fri, 30 Dec 2022 11:34:31 +0800 4Subject: [PATCH] expand recv mbox size 5 6--- 7 src/core/tcp_out.c | 6 +++--- 8 src/include/lwipopts.h | 2 +- 9 src/include/lwipsock.h | 2 -- 10 3 files changed, 4 insertions(+), 6 deletions(-) 11 12diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c 13index 4feeb69..f84ff57 100644 14--- a/src/core/tcp_out.c 15+++ b/src/core/tcp_out.c 16@@ -1476,9 +1476,9 @@ tcp_output(struct tcp_pcb *pcb) 17 if (get_eth_params_tx_ol() & DEV_TX_OFFLOAD_TCP_TSO) { 18 while(seg && send_len < 0xffff) { 19 /** 20- * 1)遍历unsent队列,找到所有的待发送seg. 将seg的buf串起来 21- * 2) 生成新的seg, 调用tcp_output_segment, 新的seg释放掉 22- * 3) 若成功,则更新snd_nxt, unacked队列,和unsent队列。 23+ * 1) walk unsent queue, find all seg witch wait to send. chain buf in these segs. 24+ * 2) create new segment, send and free new segment. 25+ * 3) update snd_nxt, unacked queue, and unsent queue 26 */ 27 struct tcp_seg *start_seg = seg; 28 struct pbuf *first_pbuf = NULL; 29diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h 30index 405cf11..fedded9 100644 31--- a/src/include/lwipopts.h 32+++ b/src/include/lwipopts.h 33@@ -113,7 +113,7 @@ 34 35 #define LWIP_NETIF_API 1 36 37-#define DEFAULT_TCP_RECVMBOX_SIZE 128 38+#define DEFAULT_TCP_RECVMBOX_SIZE 4096 39 40 #define DEFAULT_ACCEPTMBOX_SIZE 1024 41 42diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h 43index fef5b6d..a807e3e 100644 44--- a/src/include/lwipsock.h 45+++ b/src/include/lwipsock.h 46@@ -104,12 +104,10 @@ struct lwip_sock { 47 char pad1 __rte_cache_aligned; 48 /* app and stack thread all use */ 49 uint32_t in_send; /* avoid sock too much send rpc msg*/ 50- bool read_wait; 51 char pad2 __rte_cache_aligned; 52 /* stack thread all use */ 53 struct list_node recv_list; 54 struct list_node send_list; 55- struct pbuf *lwip_lastdata; 56 struct pbuf *send_lastdata; 57 struct pbuf *send_pre_del; 58 59-- 602.8.4.windows.1 61 62