From: Andrei Tatar Date: Mon, 5 Feb 2024 13:22:27 +0000 (+0100) Subject: Expose LWIP_SO_RCVBUF config and set on by default X-Git-Tag: RELEASE-0.16.2~5 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0f14a50a1bd06547e64c862638ad57036a51acf6;p=unikraft%2Flibs%2Flwip.git Expose LWIP_SO_RCVBUF config and set on by default This change exposes the LWIP_SO_RCVBUF config option through the Unikraft Kconfig, configuring whether lwip should use receive buffers. Receive buffers enable support for the SO_RCVBUF socket option as well as ioctl(FIONREAD). This option is enabled by default to provide the most compatibility. Signed-off-by: Andrei Tatar Reviewed-by: Eduard Vintilă Approved-by: Razvan Deaconescu GitHub-Closes: #50 --- diff --git a/Config.uk b/Config.uk index fd346c1..89de16c 100644 --- a/Config.uk +++ b/Config.uk @@ -182,6 +182,12 @@ config LWIP_NETIF_STATUS_PRINT help Print netif status changes to standard console +config LWIP_RCVBUF + bool "Use receive buffers" + default y + help + Use receive buffers, enabling the SO_RCVBUF socket option and FIONREAD ioctl + config LWIP_LOOPBACK bool "Loopback traffic" default y diff --git a/include/lwipopts.h b/include/lwipopts.h index 61d557e..efd5cdd 100644 --- a/include/lwipopts.h +++ b/include/lwipopts.h @@ -215,6 +215,10 @@ void sys_free(void *ptr); #define LWIP_SOCKET 0 #endif +#if CONFIG_LWIP_RCVBUF +#define LWIP_SO_RCVBUF 1 +#endif + #if LWIP_SOCKET #if CONFIG_HAVE_LIBC /* Stop lwip to provide ioctl constants */