]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commitdiff
Expose LWIP_SO_RCVBUF config and set on by default
authorAndrei Tatar <andrei@unikraft.io>
Mon, 5 Feb 2024 13:22:27 +0000 (14:22 +0100)
committerRazvan Deaconescu <razvan.deaconescu@upb.ro>
Wed, 7 Feb 2024 11:34:54 +0000 (13:34 +0200)
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 <andrei@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #50

Config.uk
include/lwipopts.h

index fd346c14cb06d2e36cc39984b7530ecf6c82f954..89de16c13626445bcf7e72551c1d9d7f5a77d86c 100644 (file)
--- 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
index 61d557ecbecf9f6ca90dd427ac4526c7257d4d69..efd5cddbe41501fe8b689e33764015a0c82d12ce 100644 (file)
@@ -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 */