diff --git a/0175-lwip_sock-add-semt-sock_wait.patch b/0175-lwip_sock-add-semt-sock_wait.patch new file mode 100644 index 0000000000000000000000000000000000000000..2bd042e25aed08e79e4dca8b510254fa77aeff0d --- /dev/null +++ b/0175-lwip_sock-add-semt-sock_wait.patch @@ -0,0 +1,40 @@ +From 0e3fc8b726c832487191dde14020d80b386e6787 Mon Sep 17 00:00:00 2001 +From: yinbin +Date: Sat, 2 Nov 2024 14:57:09 +0800 +Subject: [PATCH] lwip_sock: add semt sock_wait + +--- + src/api/lwipgz_sock.c | 4 ++++ + src/include/lwipgz_sock.h | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/src/api/lwipgz_sock.c b/src/api/lwipgz_sock.c +index 5419057..5ec4fbf 100644 +--- a/src/api/lwipgz_sock.c ++++ b/src/api/lwipgz_sock.c +@@ -104,6 +104,10 @@ int gazelle_alloc_socket(struct netconn *newconn, int accepted, int flags) + if (do_lwip_init_sock(fd) != 0) + goto out; + ++ int index = fd - LWIP_SOCKET_OFFSET; ++ if (sem_init(&sockets[index].sock_wait, 0, 0) != 0) ++ goto out; ++ + if (accepted) { + int ret = 0; + struct tcp_pcb *pcb = newconn->pcb.tcp; +diff --git a/src/include/lwipgz_sock.h b/src/include/lwipgz_sock.h +index 4f8e17b..e1700c1 100644 +--- a/src/include/lwipgz_sock.h ++++ b/src/include/lwipgz_sock.h +@@ -194,6 +194,7 @@ struct lwip_sock { + uint8_t already_bind_numa; + + struct sock_time_stamp stamp; ++ sem_t sock_wait; + #endif /* GAZELLE_ENABLE */ + }; + +-- +2.34.1 + diff --git a/lwip.spec b/lwip.spec index c86556ed57cfdbe1cc47b2dc1229cc00c9d9db24..1c0e221baf968c6772b9b1f3e95837a40d1b8f29 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.2.0 -Release: 62 +Release: 63 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -186,6 +186,7 @@ Patch9170: 0171-IPV6-fix-array-out-of-bounds-in-function-ip6_ntoa_r.patch Patch9171: 0172-IPV6-add-group-check-while-mld6-schedule-a-report.patch Patch9172: 0173-IGMP-fix-problem-that-can-not-join-the-sixteen-igmp-.patch Patch9173: 0174-bugfix-Codedump-occurs-when-the-GAZELLE_TCP_REUSE_IP.patch +Patch9174: 0175-lwip_sock-add-semt-sock_wait.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -215,6 +216,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Sat Nov 2 2024 yinbin - 2.2.0-63 +- lwip_sock: add semt sock_wait + * Fri Nov 1 2024 hankangkang - 2.2.0-62 - When the GAZELLE_TCP_REUSE_IPPORT is on, min_cnts_lpcb is NULL - Turn on the LWIP_SO-LINGER switch