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

Re: [Minios-devel] [UNIKRAFT/LIBLWIP PATCH] liblwip: Move liblwip_init to inittab



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 07.10.19 10:54, Sharan Santhanam wrote:
We move the liblwip initialization to the into the lwip library
and register it with the inittab.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
  init.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/init.c b/init.c
index a5854b8..1447a2c 100644
--- a/init.c
+++ b/init.c
@@ -44,6 +44,7 @@
  #include <uk/semaphore.h>
  #endif /* CONFIG_LWIP_NOTHREADS */
  #include "netif/uknetdev.h"
+#include <uk/init.h>
#if LWIP_NETIF_EXT_STATUS_CALLBACK && CONFIG_LWIP_NETIF_STATUS_PRINT
  #include <stdio.h>
@@ -128,7 +129,7 @@ static void _lwip_init_done(void *arg __unused)
  /*
   * This function initializing the lwip network stack
   */
-int liblwip_init(void)
+static int liblwip_init(void)
  {
  #if CONFIG_LWIP_UKNETDEV && CONFIG_LWIP_AUTOIFACE
        unsigned int devid;
@@ -147,6 +148,7 @@ int liblwip_init(void)
  #endif /* LWIP_IPV4 */
  #endif /* CONFIG_LWIP_UKNETDEV && CONFIG_LWIP_AUTOIFACE */
+ uk_pr_info("Initializing lwip\n");
  #if !CONFIG_LWIP_NOTHREADS
        uk_semaphore_init(&_lwip_init_sem, 0);
  #endif /* !CONFIG_LWIP_NOTHREADS */
@@ -238,3 +240,4 @@ int liblwip_init(void)
  #endif /* CONFIG_LWIP_UKNETDEV && CONFIG_LWIP_AUTOIFACE */
        return 0;
  }
+uk_lib_initcall(liblwip_init);


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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