[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Desiderata for 2.2.0 for debian and virtualsquare (upda
From: |
Joan Lledó |
Subject: |
Re: [lwip-devel] Desiderata for 2.2.0 for debian and virtualsquare (updated) |
Date: |
Mon, 20 Mar 2023 12:34:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 |
Hi Renzo,
I took a look at these patches and found a couple of issues:
1-libnoslip.patch:
This snippet:
+if (${LWIP_EXCLUDE_SLIPIF})
+else()
+ list(APPEND lwipnetif_SRCS ${LWIP_DIR}/src/netif/slipif.c)
+endif()
+
In a previous mail I suggested to replace this:
if (${LWIP_EXCLUDE_SLIPIF})
+else()
By something like:
if (NOT ${LWIP_EXCLUDE_SLIPIF})
Have you checked if is there something like that in cmake? it would seem
clearer for me.
2-posixlib.patch:
The copyright assignments are wrong, they say:
+ * Copyright (C) 2017 Free Software Foundation, Inc.
+ * Written by Joan Lledó.
That's because, for my contributions to the GNU/Hurd, I agreed to assign
the copyright to the FSF, and I just copied and pasted those copyright
notices here without double-checking, my mistake. To clarify: Only my
contributions to the Hurd, GNU Mach and Glibc belong to the FSF, that
doesn't apply to LWIP, so please modify it to:
+ * Copyright (C) 2023 Joan Lledó <jlledom@member.fsf.org>
Finally: in this snippet:
+/* User posix socket headers */
+#if 1
+#define LWIP_SOCKET_EXTERNAL_HEADERS 1
+#define LWIP_SOCKET_EXTERNAL_HEADER_SOCKETS_H "posix/sockets.h"
+#define LWIP_SOCKET_EXTERNAL_HEADER_INET_H "posix/inet.h"
+#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS 1
+#endif
+
#if 1; #endif; do nothing here, they could be removed.
Regards,
Joan
El 7/3/23 a les 17:48, Renzo Davoli ha escrit:
Dear Simon and dear lwip developers,
Dear Joan (maintainer of lwip Debian package).
In the latest patch files sent to this ML, I missed to rewrite a path in
posixlib
cmake (when I renamed linuxlib to posixlib). I have updated the patches
consistently.
We have tested posixlib and the generation of a new Debian package, and in my
opinion
these patches are stable enough for the merging.
Recap:
1- The code generated by contrib/ports/unix/lib has unresolved symbols:
$ nm liblwip.so | grep ' U ' | grep -v @
U sio_read
U sio_tryread
slirpif requires sio_read and sio_tryread.
The patch named 1-libnoslip.patch excludes slip.c from the library
2- CMakeLists.txt in contrib/ports/unix/lib lacks support for install and
uninstall and the compatibility with linux sockaddr.
The patch named 2-posixlib.patch adds a new dir contrib/ports/unix/posixlib
to generate a more linux-consistent library.
3- Add VDE support (see https://wiki.virtualsquare.org/#!tutorials/vdebasics.md)
The patch named 3-vdeif.patch adds an interface driver for vde.
Cmake checks for the availability of libvdeplug, the vde support is
automatically
opted out if the library is missing.
4- The patch named 4.socket_accept_avoid_useless_events.patchjust swaps two
sections
of the code in socket.c, function lwip_accept.
In the current implementation it sends the "anticipated" events
to the callback while it can still fail.
see line 727/728:
727 err = netconn_peer(newconn, &naddr, &port);
728 if (err != ERR_OK) {
...
The patch sends the events only when lwip_accept cannot fail any more.
----
All the Best
renzo