From 58486e3faf35065f4ab7ac09ab5f7ba780175fb2 Mon Sep 17 00:00:00 2001 From: jiangheng Date: Tue, 15 Mar 2022 19:26:57 +0800 Subject: [PATCH] refactor event, if ring is full node is added to list (cherry picked from commit f106706c420f2aae20302b71f4e7da623566a865) --- ...f-ring-is-full-the-node-is-added-to-.patch | 33 +++++++++++++++++++ lwip.spec | 6 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0021-refactor-event-if-ring-is-full-the-node-is-added-to-.patch diff --git a/0021-refactor-event-if-ring-is-full-the-node-is-added-to-.patch b/0021-refactor-event-if-ring-is-full-the-node-is-added-to-.patch new file mode 100644 index 0000000..b5b5e29 --- /dev/null +++ b/0021-refactor-event-if-ring-is-full-the-node-is-added-to-.patch @@ -0,0 +1,33 @@ +From b7faf0800631668d4d23cb497f1ceeb5948e4a41 Mon Sep 17 00:00:00 2001 +From: jiangheng +Date: Tue, 15 Mar 2022 19:22:22 +0800 +Subject: [PATCH] refactor event, if ring is full, the node is added to list + +--- + src/include/lwipsock.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h +index 355bf47..36bcaed 100644 +--- a/src/include/lwipsock.h ++++ b/src/include/lwipsock.h +@@ -104,12 +104,16 @@ struct lwip_sock { + struct pbuf *send_lastdata; /* unread data in one pbuf */ + void *send_ring; + int32_t recv_flags; ++ int32_t send_flags; + bool wait_close; + int32_t attach_fd; + struct lwip_sock *shadowed_sock; + struct list_node attach_list; + struct list_node listen_list; + struct list_node recv_list; ++ struct list_node event_list; ++ struct list_node wakeup_list; ++ struct list_node send_list; + int32_t nextfd; /* listenfd list */ + #endif + }; +-- +1.8.3.1 + diff --git a/lwip.spec b/lwip.spec index a3b51cf..352e0b4 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.3 -Release: 7 +Release: 8 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz @@ -29,6 +29,7 @@ Patch9016: 0017-support-REUSEPOR-option.patch Patch9017: 0018-exec-gazelle_init_sock-before-read-event.patch Patch9018: 0019-gazelle-reduce-copy-in-send.patch Patch9019: 0020-remove-chose_dlsym_handle-function-set-handle-to-RTL.patch +Patch9020: 0021-refactor-event-if-ring-is-full-the-node-is-added-to-.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -57,6 +58,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Tue Mar 15 2022 jiangheng - 2.1.3-8 +- refactor event,if ring is full, node is added to list + * Mon Mar 07 2022 jiangheng - 2.1.3-7 - remove chose_dlsym_handle function as it is redundant -- Gitee