Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mptcpd: add package #25203

Merged
merged 2 commits into from
Oct 26, 2024
Merged

mptcpd: add package #25203

merged 2 commits into from
Oct 26, 2024

Conversation

dangowrt
Copy link
Member

Maintainer: me
Compile tested: aarch64/cortex-a53
Run tested: -

Description:
Package the Multipath TCP daemon as well as the Embedded Linux Library (ell) it depends on.
Loosely based on prior work of @jeff277

Requires openwrt/openwrt#16786

@vortexilation
Copy link
Contributor

vortexilation commented Oct 25, 2024

Thanks but I have failed to see on how ell will take over some parts of libc related functionalities.
Is it automatically work on it's own ?.
Isn't it ell is 'only' a shared library?, or do we need application which also supports ell lib?.

[EDIT]
Looking again at the mptcpd Makefile, so it through mptcpd ?.

@dangowrt
Copy link
Member Author

ell is simply a shared library providing additional functions as well as alternative implementations (under different names).
mptcpd and mptcpize uses some of the functions provided by ell.

@vortexilation
Copy link
Contributor

getting error (x86_64, glibc, gcc 14.2.0) :

_dir/toolchain-x86_64_gcc-14.2.0_glibc/usr/include -I/home/user/works/openwrt/staging_dir/toolchain-x86_64_gcc-14.2.0_glibc/include -I/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include -Wall -mtune=tigerlake -march=tigerlake -O3 -funsafe-math-optimizations -ffp-contract=fast -ftree-vectorize -fno-caller-saves -fno-plt -mtune=tigerlake -march=tigerlake -O3 -funsafe-math-optimizations -ffp-contract=fast -ftree-vectorize -fhonour-copts -fmacro-prefix-map=/home/user/works/openwrt/build_dir/target-x86_64_glibc_custom/mptcpd-0.12=mptcpd-0.12 -fstack-protector -D_FORTIFY_SOURCE=1 -O2 -fvisibility=hidden -Wextra -Werror -pedantic -fstack-protector-strong -c path_manager.c  -fPIC -DPIC -o .libs/libmptcpd_la-path_manager.o
In file included from path_manager.c:21:
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h: In function 'l_genl_attr_next':
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:98:16: error: implicit declaration of function 'l_netlink_attr_next'; did you mean 'l_genl_attr_next'? [-Wimplicit-function-declaration]
   98 |         return l_netlink_attr_next((struct l_netlink_attr *) attr,
      |                ^~~~~~~~~~~~~~~~~~~
      |                l_genl_attr_next
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h: In function 'l_genl_attr_recurse':
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:105:16: error: implicit declaration of function 'l_netlink_attr_recurse'; did you mean 'l_genl_attr_recurse'? [-Wimplicit-function-declaration]
  105 |         return l_netlink_attr_recurse((struct l_netlink_attr *) attr,
      |                ^~~~~~~~~~~~~~~~~~~~~~
      |                l_genl_attr_recurse
make[4]: *** [Makefile:597: libmptcpd_la-path_manager.lo] Error 1

@dangowrt
Copy link
Member Author

dangowrt commented Oct 25, 2024

Ok, thanks for testing with glibc. What does _custom stand for in your toolchain path?
I'm trying to reproduce this when buildong with glibc now...

@vortexilation
Copy link
Contributor

vortexilation commented Oct 25, 2024

It's only the folder named from CONFIG_BUILD_SUFFIX . Normally i am just testing around with glibc trunk/main/master version/2.41, seems faster by general on 2.41.

[EDIT]
Looks like someone already reported in before on here.

@vortexilation
Copy link
Contributor

Based on the changelog, they have moved out the function declaration into other header file "netlink.h", the fix is simple :

diff -Naur a/ell/genl.h b/ell/genl.h
--- a/ell/genl.h
+++ b/ell/genl.h
@@ -11,6 +11,7 @@
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
+#include "netlink.h"
 
 #ifdef __cplusplus
 extern "C" {

@Neustradamus
Copy link

@dangowrt: Nice PR, thanks!

@dangowrt dangowrt force-pushed the mptcpd branch 2 times, most recently from 0f151f9 to 3d66d1c Compare October 26, 2024 02:28
@dangowrt
Copy link
Member Author

@vortexilation I managed to reproduce the problem with GCC-14 and included your fix. Please also post your patch to the ell@lists.linux.dev mailing list for inclusion in future versions. See https://subspace.kernel.org/lists.linux.dev.html on how to join the mailing lists and post there. Thank you!

@matttbe
Copy link
Contributor

matttbe commented Oct 26, 2024

Thank you for packaging ell and mptcpd (and enabling MPTCP in the kernel config!)

@vortexilation @dangowrt : Regarding the error with GCC 14, it looks like the issue comes from mptcpd, because it was including only the header files it needed. Even if that sounds like the proper thing to do, that's apparently not what is supposed to be done with ell. See multipath-tcp/mptcpd#309

In other words, no need to send a patch to ELL devs I suppose. (Or send a patch to have a proper documentation for ELL ;-) )

Add package for Embedded Linux Library (ell) from kernel.org.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Package Multipath TCP daemon (mptcpd) and wrapper (mptcpize).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
@dangowrt dangowrt merged commit d6908b2 into openwrt:master Oct 26, 2024
13 checks passed
@dangowrt dangowrt deleted the mptcpd branch October 26, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants