Re: [GSoC 2017] Number fo sockets

2017-08-25 Thread Joan Lledó
> Instead of a linked list, how about using a dynamic array?
>
>   https://en.wikipedia.org/wiki/Dynamic_array
>
> This would give you constant-time lookups, amortized constant time
> insertions and deletions, and better data locality and cache behavior.
>
> What do you think?

It's a good idea, in the lwip mailing list someone proposed to use a
hash table too. A linked list is a simple solution that works for now,
but using another approach would be better.



Re: [PATCH] LwIP translator

2017-08-25 Thread Joan Lledó
>> # Whether we found libgcrypt.
>> HAVE_LIBGCRYPT = @HAVE_LIBGCRYPT@
>>
>> +# Whether we found libgcrypt.
>
> Copy-paste error :)
>

Ops!, yes... you've got a sharp eye!



Re: [PATCH hurd] fixup use lwip_{CFLAGS,LIBS}

2017-08-25 Thread Justus Winter
Justus Winter  writes:

> ---
>  lwip/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lwip/Makefile b/lwip/Makefile
> index e9289b5ae..8d4f45549 100644
> --- a/lwip/Makefile
> +++ b/lwip/Makefile
> @@ -28,7 +28,7 @@ OBJS= $(patsubst %.S,%.o,$(patsubst 
> %.c,%.o,\
>   $(SRCS) $(IFSRCS) $(MIGSRCS)))
>  
>  HURDLIBS= trivfs fshelp ports ihash shouldbeinlibc iohelp
> -LDLIBS = -lpthread -llwip
> +LDLIBS = -lpthread -llwip $(liblwip_LIBS)

Eww, the -llwip is still too much >,<


signature.asc
Description: PGP signature


[PATCH hurd] fixup use lwip_{CFLAGS,LIBS}

2017-08-25 Thread Justus Winter
---
 lwip/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lwip/Makefile b/lwip/Makefile
index e9289b5ae..8d4f45549 100644
--- a/lwip/Makefile
+++ b/lwip/Makefile
@@ -28,7 +28,7 @@ OBJS  = $(patsubst %.S,%.o,$(patsubst %.c,%.o,\
$(SRCS) $(IFSRCS) $(MIGSRCS)))
 
 HURDLIBS= trivfs fshelp ports ihash shouldbeinlibc iohelp
-LDLIBS = -lpthread -llwip
+LDLIBS = -lpthread -llwip $(liblwip_LIBS)
 
 target = lwip
 
@@ -37,7 +37,7 @@ include ../Makeconf
 vpath %.c $(PORTDIR) \
$(PORTDIR)/netif
 
-CFLAGS += -I$(PORTDIR)/include -I$(includedir)/lwip
+CFLAGS += -I$(PORTDIR)/include $(liblwip_CFLAGS)
 
 CPPFLAGS += -imacros $(srcdir)/config.h
 MIGCOMSFLAGS += -prefix lwip_
-- 
2.14.1