From c6c4c601661e06830ae9c809a7680fd25fea55ae Mon Sep 17 00:00:00 2001 From: compile_success <980965867@qq.com> Date: Thu, 22 Sep 2022 11:49:49 +0000 Subject: [PATCH] modify path condition and add value for gazelle --- 0026-modify-EISCONN-condition.patch | 24 ++++++++++++++++++++++++ lwip.spec | 8 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 0026-modify-EISCONN-condition.patch diff --git a/0026-modify-EISCONN-condition.patch b/0026-modify-EISCONN-condition.patch new file mode 100644 index 0000000..b817f77 --- /dev/null +++ b/0026-modify-EISCONN-condition.patch @@ -0,0 +1,24 @@ +diff -Nur lwip-2.1.3-org/src/api/api_msg.c lwip-2.1.3/src/api/api_msg.c +--- lwip-2.1.3-org/src/api/api_msg.c 2022-09-21 14:18:31.456000000 +0000 ++++ lwip-2.1.3/src/api/api_msg.c 2022-09-21 14:19:58.852000000 +0000 +@@ -1417,7 +1417,7 @@ + /* Prevent connect while doing any other action. */ + if (msg->conn->state == NETCONN_CONNECT) { + err = ERR_ALREADY; +- } else if (msg->conn->state != NETCONN_NONE) { ++ } else if (msg->conn->pcb.tcp->state != ESTABLISHED) { + err = ERR_ISCONN; + } else { + setup_tcp(msg->conn); +diff -Nur lwip-2.1.3-org/src/include/lwipsock.h lwip-2.1.3/src/include/lwipsock.h +--- lwip-2.1.3-org/src/include/lwipsock.h 2022-09-21 14:18:31.440000000 +0000 ++++ lwip-2.1.3/src/include/lwipsock.h 2022-09-21 14:22:30.404000000 +0000 +@@ -98,6 +98,8 @@ + struct list_node recv_list __rte_cache_aligned; + struct list_node event_list __rte_cache_aligned; + struct list_node send_list __rte_cache_aligned; ++ uint32_t in_send __rte_cache_aligned; /* avoid sock too much send rpc msg*/ ++ uint32_t send_flag __rte_cache_aligned; /* avoid sock too much send rpc msg*/ + uint32_t epoll_events; /* registered events, EPOLLONESHOT write frequently */ + char pad __rte_cache_aligned; + diff --git a/lwip.spec b/lwip.spec index 6067100..773d70e 100644 --- a/lwip.spec +++ b/lwip.spec @@ -4,7 +4,7 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip Version: 2.1.2 -Release: 5 +Release: 6 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -39,6 +39,7 @@ Patch9022: 0022-notify-app-that-sock-state-changes-to-CLOSE_WAIT.patch Patch9023: 0023-refactor-event-and-checksum-offload-support.patch Patch9024: 0024-refactor-pkt-read-send-performance.patch Patch9025: 0025-del-redundant-wait_close-and-move-epoll_events-pos.patch +Patch9026: 0026-modify-EISCONN-condition.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -82,6 +83,7 @@ find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \; %patch9023 -p1 %patch9024 -p1 %patch9025 -p1 +%patch9026 -p1 %build cd %{_builddir}/%{name}-%{version}/src @@ -97,6 +99,10 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Thu Sep 22 2022 zhujunhao - 2.1.2-6 +- modify EISCONN path condition + add in_send and send_flag value for gazelle + * Tue Jul 26 2022 wuchangsheng - 2.1.2-5 - del redundant wait_close in lwip_sock move epoll_events into cache aligned area -- Gitee