[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT/LIBLWIP PATCH v3 1/3] lib/lwip: Reserve per netdev space for lwip



Reserves space for per-network-device (uknetdev). This will be later
used to store network stack specific specific information in the netdevice.
Reserving this memory allows us to store the memory continuously in the
netdev instead of additional dereferences.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
 Config.uk   | 9 +++++++++
 Makefile.uk | 1 +
 2 files changed, 10 insertions(+)

diff --git a/Config.uk b/Config.uk
index aaaaae0..e2eacb5 100644
--- a/Config.uk
+++ b/Config.uk
@@ -22,6 +22,15 @@ config LWIP_UKNETDEV
                In case threaded mode is selected and the underlying device
                driver does not support receive interrupts the network
                interfaces have to be polled manually (uknetdev_poll()).
+
+config LWIP_UKNETDEV_SCRATCH
+       int
+       default 32
+       help
+               The network stack reserves space in the uknetdev device for its
+               use. Please do not change this value and in case change this
+               value please make sure it is sufficient enough to hold the
+               lwip_netdev_data data structure.
 endmenu
 
 config LWIP_AUTOIFACE
diff --git a/Makefile.uk b/Makefile.uk
index d3c6c9c..99005a9 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -62,6 +62,7 @@ LIBLWIP_COMMON_INCLUDES-y += 
-I$(LIBLWIP_BASE)/musl-imported/include
 LIBLWIP_COMMON_INCLUDES-y += -I$(LIBLWIP_EXTRACTED)/include
 CINCLUDES-$(CONFIG_LIBLWIP)   += $(LIBLWIP_COMMON_INCLUDES-y)
 CXXINCLUDES-$(CONFIG_LIBLWIP) += $(LIBLWIP_COMMON_INCLUDES-y)
+$(eval $(call uknetdev_scratch_mem,$(CONFIG_LWIP_UKNETDEV_SCRATCH)))
 
 
################################################################################
 # Library flags
-- 
2.7.4




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.