diff --git a/0144-cfg-add-lwip_opts-recvmbox_size.patch b/0144-cfg-add-lwip_opts-recvmbox_size.patch new file mode 100644 index 0000000000000000000000000000000000000000..06cf7f0f8204feccc85b8f91d54604c129740373 --- /dev/null +++ b/0144-cfg-add-lwip_opts-recvmbox_size.patch @@ -0,0 +1,44 @@ +diff --git a/src/api/sockets.c b/src/api/sockets.c +index 5a72b62..924e1a2 100644 +--- a/src/api/sockets.c ++++ b/src/api/sockets.c +@@ -329,6 +329,9 @@ static void lwip_socket_drop_registered_mld6_memberships(int s); + #if GAZELLE_ENABLE + uint32_t sockets_num; + struct lwip_sock *sockets; ++struct lwip_opts g_lwip_opts = { ++ .recvmbox_size = 4096, ++}; + #else + static struct lwip_sock sockets[NUM_SOCKETS]; + #endif /* GAZELLE_ENABLE */ +diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h +index cb3154a..8c021e2 100644 +--- a/src/include/lwipopts.h ++++ b/src/include/lwipopts.h +@@ -207,7 +207,7 @@ + #define TCP_HLEN 20 + + #define DEFAULT_ACCEPTMBOX_SIZE 4096 +-#define DEFAULT_TCP_RECVMBOX_SIZE 4096 ++#define DEFAULT_TCP_RECVMBOX_SIZE g_lwip_opts.recvmbox_size + + #define TCP_LISTEN_BACKLOG 1 + #define TCP_DEFAULT_LISTEN_BACKLOG 0xffff +diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h +index d700cee..627dab9 100644 +--- a/src/include/lwipsock.h ++++ b/src/include/lwipsock.h +@@ -168,6 +168,12 @@ static inline unsigned same_node_ring_count(struct lwip_sock *sock) + * -------------------------------------------------- + */ + #if GAZELLE_ENABLE ++struct lwip_opts { ++ uint32_t recvmbox_size; ++}; ++ ++extern struct lwip_opts g_lwip_opts; ++ + extern uint32_t sockets_num; + extern struct lwip_sock *sockets; + diff --git a/lwip.spec b/lwip.spec index 7f31f1f5935ec1e52d0f4046438b737e99013a4e..23b3ad0a91e5a9f7dbe869140331242a5600709b 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: 36 +Release: 37 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -155,6 +155,8 @@ Patch9139: 0140-add-IP_ADD_SOURCE_MEMBERSHIP-to-setsockopt-for-igmpv3.patch Patch9140: 0141-Improve-size-of-multicast-specifications.patch Patch9141: 0142-virtio-record-local_port-for-port_map-of-virtio.patch Patch9142: 0143-add-MCAST_MSFILTER-to-setsockopt-for-IGMPv3.patch +Patch9143: 0144-cfg-add-lwip_opts-r^Cvmbox_size.patch + BuildRequires: gcc-c++ dos2unix dpdk-devel #Requires: @@ -183,6 +185,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Thu Jul 04 2024 zhengjiebing - 2.2.0-37 +- cfg: add lwip_opts.recvmbox_size + * Fri Jun 28 2024 wanfeng - 2.2.0-36 - add MCAST_MSFILTER to setsockopt for IGMPv3