Skip to content

kernel: enable Multi-Path TCP for !SMALL_FLASH targets#16786

Merged
openwrt-bot merged 2 commits intoopenwrt:mainfrom
dangowrt:enable-mptcp
Oct 26, 2024
Merged

kernel: enable Multi-Path TCP for !SMALL_FLASH targets#16786
openwrt-bot merged 2 commits intoopenwrt:mainfrom
dangowrt:enable-mptcp

Conversation

@dangowrt
Copy link
Copy Markdown
Member

Expose Kernel's CONFIG_MPTCP option and enable it by default for !SMALL_FLASH targets.

@dangowrt
Copy link
Copy Markdown
Member Author

@arinc9 Let me know if any additional patches are needed on top of that for MPTCP.

@nbd168
Copy link
Copy Markdown
Member

nbd168 commented Oct 25, 2024

Why enable it by default?

@dangowrt
Copy link
Copy Markdown
Member Author

The idea behind enabling it by default is to allow users of the binary distribution to make use of MPTCP tunneling for link aggregation. There is apparently huge demand for that, it's a often discussed topic in the forum and there is even a whole OpenWrt fork (MPTCPRouter) just for that (which supports only very few devices). Enabling the kernel-side of the story by default will allow using MPTCP on vanilla OpenWrt without having to build anything from source.

@nbd168
Copy link
Copy Markdown
Member

nbd168 commented Oct 25, 2024

Makes sense, thanks. Please put that into the commit description, so that other people can figure out the reason as well.

Comment thread config/Config-kernel.in

config KERNEL_MPTCP_IPV6
bool "IPv6 support for Multipath TCP"
depends on KERNEL_MPTCP
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this option depend on KERNEL_IPV6 or move it to the block inside the if KERNEL_IPV6 block.

@hauke
Copy link
Copy Markdown
Member

hauke commented Oct 25, 2024

There are also two other PRs, which are close to the finish line, see #14323 and #12884. They also add net/mptcp/mptcp_diag.ko. I would like to have this MPTCP activated on not small devices like you did.

@github-actions github-actions Bot added kernel pull request/issue with Linux kernel related changes core packages pull request/issue for core (in-tree) packages labels Oct 26, 2024
@dangowrt
Copy link
Copy Markdown
Member Author

Thank you @hauke for bringing the existing pull requests to my attention. I've picked the module from #14323 and made CONFIG_KERNEL_MPTCP_IPV6 dependent on CONFIG_IPV6.

@Neustradamus
Copy link
Copy Markdown

@dangowrt: Nice PR, thanks!

@romanovj
Copy link
Copy Markdown

romanovj commented Oct 26, 2024

@matttbe
Copy link
Copy Markdown

matttbe commented Oct 26, 2024

Thank you for looking at that!

what about bpf schedulers from mptcp next?

If these BPF schedulers have not been upstreamed, that's because they are not ready yet. I would personally not recommend using them in production.

dangowrt and others added 2 commits October 26, 2024 15:21
Expose Kernel's CONFIG_MPTCP option and enable it by default for
!SMALL_FLASH targets.

The idea behind enabling it by default is to allow users of the binary
distribution to make use of MPTCP tunneling for link aggregation.

Using MPTCP for link aggregation is an often discussed topic in the
forum and there is even a whole OpenWrt fork (MPTCPRouter) just for that.

Enabling the kernel-side of the story by default will allow using MPTCP
on vanilla OpenWrt without having to build anything from source.

See also https://openwrt.org/docs/guide-user/network/mptcp

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add INET diag socket monitoring interface module for MultiPath TCP.
It allows using native Linux socket diagnostic tools such as 'ss' for
Multipath TCP connections.

Co-authored-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
Signed-off-by: sKy King <29267720+sKyissKy@users.noreply.github.com>
Link: openwrt#12884
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
@openwrt-bot openwrt-bot merged commit a2aabc9 into openwrt:main Oct 26, 2024
@dangowrt dangowrt deleted the enable-mptcp branch October 26, 2024 18:18
@dangowrt
Copy link
Copy Markdown
Member Author

what about bpf schedulers from mptcp next?

I'm open to include those in a future PR backporting the necessary changes from net-next once they are available there.

matttbe added a commit to multipath-tcp/mptcp.dev that referenced this pull request Oct 27, 2024
OpenWRT's future version (v24?) will support MPTCP by default on non
"small flash" targets. No need for custom builds or forks!

Thanks to @dangowrt, @rodsmar, and @sKyissKy for the work, and @hauke
for the review!

Link: openwrt/openwrt#16786
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
@Neustradamus
Copy link
Copy Markdown

@dangowrt: Good job!

@systemcrash
Copy link
Copy Markdown
Contributor

Hi @dangowrt - you linked to the wiki page in your commit description, which talks about options which I cannot find referenced anywhere. It's my understanding that procd and netifd don't yet know anything about e.g. backup, master, handover etc. Should those even be in there?

Are those for something older in another project?

@matttbe
Copy link
Copy Markdown

matttbe commented Dec 28, 2024

Hi @dangowrt - you linked to the wiki page in your commit description, which talks about options which I cannot find referenced anywhere. It's my understanding that procd and netifd don't yet know anything about e.g. backup, master, handover etc. Should those even be in there?

Are those for something older in another project?

Indeed, it looks like it is linked to another project (Open MPTCP Router?). I guess everything from the Configuration section should be removed, no?

Also, don't hesitate to reference mptcp.dev instead of multipath.org (previous project, for kernels < 5.6).

@matttbe
Copy link
Copy Markdown

matttbe commented Dec 28, 2024

Regarding the mptcp wiki page, I don't think it is clear what needs to be done for the configuration. Is the idea to install mptcpd so it can set the MPTCP endpoints automatically. Or is the goal to have netifd (or something else reading /etc/config/network) setting the MPTCP limits and endpoints when a new IP is available on certain interfaces?

In the meantime, I guess a script in /etc/hotplug.d/iface/ could be used to set the endpoints manually with ip mptcp (requiring ip-full package).

@Neustradamus
Copy link
Copy Markdown

@matttbe: Maybe you can connect on Wiki to update?

@matttbe
Copy link
Copy Markdown

matttbe commented Dec 28, 2024

@Neustradamus I could ask the admins to create an account for me to change the website, but for the rest, I don't know how MPTCP is supposed to be configured on OpenWrt.

All I can see is the wiki page history: only the introduction ("Start" and "Multipath TCP") has been modified recently. The rest is confusing: it looks outdated and no longer valid. I could remove it, but I don't know what to replace it with: what's the recommended way to setup MPTCP on OpenWrt if this cannot be done via uci?

On mptcp.dev, I recommend using NM and mptcpd, but not sure if that's a good idea on OpenWrt: I guess NM is not doing to be used here, and mptcpd is currently not integrated with (l)uci. Also, for the manual configuration, ip mptcp is not available by default. For the workaround with hotplug.d, I don't have any setup to validate it (and currently no need to).

@systemcrash
Copy link
Copy Markdown
Contributor

I had a poke around and found the same thing. Some info there is only relevant to the fork and is quite confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core packages pull request/issue for core (in-tree) packages kernel pull request/issue with Linux kernel related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants