Skip to content

add MPTCP (Multipath TCP)-support to kernel #713

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

Closed
gstammw opened this issue Oct 23, 2014 · 12 comments
Closed

add MPTCP (Multipath TCP)-support to kernel #713

gstammw opened this issue Oct 23, 2014 · 12 comments

Comments

@gstammw
Copy link

gstammw commented Oct 23, 2014

Hello community,

Multipath TCP ("MPTCP") enables seamless handover between different network connections like a wlan and 3G as well as bandwidth aggregation if the remote-site is also mptcp enabled.
See http://multipath-tcp.org/ for further details.

I hope that the communiity aggrees that this is a very interesting feature that should be added to the raspbian default-kernel.
The sourcecode is available at http://multipath-tcp.org/pmwiki.php?n=Main.Release89 and they have already ported mptcp to Rasppbery PI at https://github.com/multipath-tcp/mptcp-rpi.

Kind regards

I have cross-compiled it myself on Ubuntu 14.04.1LTS following https://gist.github.com/davasiloaei/7301598:

Prerequisites for compiling

$ sudo apt-get install gcc-arm-linux-gnueabi make ncurses-dev

CHECKOUT

$ mkdir rpi_mptcp_kernel
$ cd rpi_mptpc_kernel
$ git clone --depth 1 git://github.com/raspberrypi/linux.git
Merge MPTCP kernel source and Raspberry PI 3.12.y into rpi_mptcp:
$ git init
$ git remote add mptcp https://github.com/multipath-tcp/mptcp.git
$ git fetch mptcp --depth 1
$ cd linux/.git
$ git branch -a
$ cd ..
$ git checkout -b rpi_mptcp origin/rpi-3.12.y
$ cd ..
$ git merge -X theirs mptcp/mptcp_v0.89

COMPILE

Clean:
$ make mrproper
Get default rpi configuration:
$ make ARCH=arm bcmrpi_defconfig
Open the configuration gui:
$ make ARCH=arm nconfig
Under Networking Support ---> Networking options, enable 'The IPv6 protocol'. 2 more options should show up under IPv6 Protocol (MPTCP protocol and MPTCP: advanced path-manager control). Enable both, then exit and save.
Configure the cross compiler prefix:
$ export CCPREFIX=arm-linux-gnueabi-
Cross compile:
$ make ARCH=arm CROSS_COMPILE=${CCPREFIX}

@popcornmix
Copy link
Collaborator

Has the kernel code for this been upstreamed?
We're very unlikely to include non-upstreamed code in the kernel without a compelling reason.

@gstammw
Copy link
Author

gstammw commented Oct 23, 2014

No the master kernel code has not yet been amended by the MPTCP-code.

It still makes sense as Multipath-TCP is a very interesting protocol that allows seamless handover between networks e.g. wifi to 3G/mobile as well as to combine the speed of two links.
I guess a lot of raspberryPIs are being used for homecenters and the second most use might be as a network server. In that case mptcp would be an interesting thing.

Let's stay ahead of the crows and adtop mptcp as the first ones :-)

@popcornmix
Copy link
Collaborator

Sorry, not happening with official kernel. There's a high chance of regressions, a maintenance headache when moving to newer kernels, and a very small set of users who will benefit.

Feel free to create a fork of the pi kernel tree and include the MPTCP patches. You can publish custom kernels for interested users.

@opensourcegeek
Copy link

@gstammw Did you get to fork this repo and apply mptcp patches?

@oionos75
Copy link

In order to avoid the risks @popcornmix mentions would n't it be more simple to port in Raspbian the Debian package mptcp on https://dl.bintray.com/cpaasch/deb for jessie ?

I'd like to test mptcp in a raspberry pi mesh network, I agree with @popcornmix that kernel recompilation is not the answer. But porting a debian package?

@dur3x
Copy link

dur3x commented Apr 17, 2017

@popcornmix I'm trying to port mptcp on my raspberry pi (1 B) but it's currently difficult.
I tried to merge rpi-4.1.y with mptcp 0.91 but it didn't work :-(
I followed the procedure (with some changes) from @gstammw but I got that:

# make ARCH=arm bcmrpi_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
***
*** Can't find default configuration "arch/arm/configs/bcmrpi_defconfig"!
***
scripts/kconfig/Makefile:105: recipe for target 'bcmrpi_defconfig' failed
make[1]: *** [bcmrpi_defconfig] Error 1
Makefile:541: recipe for target 'bcmrpi_defconfig' failed
make: *** [bcmrpi_defconfig] Error 2

Can you help me ?
Thanks :)

@popcornmix
Copy link
Collaborator

You don't have the file arch/arm/configs/bcmrpi_defconfig
That should come from:
https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/configs/bcmrpi_defconfig

Make sure you start with the raspberrypi/linux kernel tree and then apply whatever mptcp patches.

But you are right - porting out of tree drivers to new kernel versions is hard - hence the comment "maintenance headache".

Really you should be encouraging the author the out-of-tree driver to submit his driver upstream. Once it is accepted upstream use of it becomes much easier.

@dur3x
Copy link

dur3x commented Apr 18, 2017

Indeed it's a little bit complicated :-)
Currently I have a rpi with mptcp 0.88/0.89 & kernel 3.16 but I got some problems to create new subflows. The idea was just to try a more recent version of kernel+mptcp to see if the problem are solved (or not).
Perhaps the problem is only something wrong on my initial setup.
Btw, thanks for your answer
ps: if you have, by chance, a rpi (1) with mptcp I'm very interested to know your setup and see if this one is really working as expected, otherwise no problem :)

@reedog117
Copy link

Not sure if there's much movement on this, but I did find someone who has v0.92 working with a 4.4.50 kernel on a Pi 3. I'm attempting to replicate the directions to see if I can script this somehow with newer versions of the kernel.

http://mptcp.zugaina.com
https://github.com/Ysurac/raspberry_kernel_mptcp

@c1ngular
Copy link

c1ngular commented Jun 5, 2018

Anyone updates on this ? This is intriguing

@c1ngular
Copy link

c1ngular commented Jun 7, 2018

at least a tutorial how to install mptcp on Pi 3 if it is not gonna be added to kernel by default ?

@pelwell
Copy link
Contributor

pelwell commented Jun 7, 2018

Raspberry Pi won't be writing such a guide, but we'll host it on the wiki if somebody wants to contribute one.

popcornmix pushed a commit that referenced this issue May 4, 2022
The driver would disable the worker when cpu is being put offline, but
it happens closer to the end of cpufreq_offline(). The function
qcom_lmh_dcvs_poll() can be running in parallel with this, when
policy->cpus already has been updated. Read policy->related_cpus
instead.

[   37.122433] ------------[ cut here ]------------
[   37.127225] WARNING: CPU: 0 PID: 187 at drivers/base/arch_topology.c:180 topology_update_thermal_pressure+0xec/0x100
[   37.138098] Modules linked in:
[   37.141279] CPU: 0 PID: 187 Comm: kworker/0:3 Tainted: G S                5.17.0-rc6-00389-g37c83d0b8710-dirty #713
[   37.158306] Workqueue: events qcom_lmh_dcvs_poll
[   37.163095] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   37.170278] pc : topology_update_thermal_pressure+0xec/0x100
[   37.176131] lr : topology_update_thermal_pressure+0x20/0x100
[   37.181977] sp : ffff800009b6bce0
[   37.185402] x29: ffff800009b6bce0 x28: ffffd87abe92b000 x27: ffff04bd7292e205
[   37.192792] x26: ffffd87abe930af8 x25: ffffd87abe94e4c8 x24: 0000000000000000
[   37.200180] x23: ffff04bb01177018 x22: ffff04bb011770c0 x21: ffff04bb01177000
[   37.207567] x20: ffff04bb0a419000 x19: 00000000000c4e00 x18: 0000000000000000
[   37.214954] x17: 000000040044ffff x16: 004000b2b5503510 x15: 0000006aaa1326d2
[   37.222333] x14: 0000000000000232 x13: 0000000000000001 x12: 0000000000000040
[   37.229718] x11: ffff04bb00400000 x10: 968f57bd39f701c8 x9 : ffff04bb0acc8674
[   37.237095] x8 : fefefefefefefeff x7 : 0000000000000018 x6 : ffffd87abd90092c
[   37.244478] x5 : 0000000000000016 x4 : 0000000000000000 x3 : 0000000000000100
[   37.251852] x2 : ffff04bb0a419020 x1 : 0000000000000100 x0 : 0000000000000100
[   37.259235] Call trace:
[   37.261771]  topology_update_thermal_pressure+0xec/0x100
[   37.267266]  qcom_lmh_dcvs_poll+0xbc/0x154
[   37.271505]  process_one_work+0x288/0x69c
[   37.275654]  worker_thread+0x74/0x470
[   37.279450]  kthread+0xfc/0x100
[   37.282712]  ret_from_fork+0x10/0x20
[   37.286417] irq event stamp: 74
[   37.289664] hardirqs last  enabled at (73): [<ffffd87abdd78af4>] _raw_spin_unlock_irq+0x44/0x80
[   37.298632] hardirqs last disabled at (74): [<ffffd87abdd71fc0>] __schedule+0x710/0xa10
[   37.306885] softirqs last  enabled at (58): [<ffffd87abcc90410>] _stext+0x410/0x588
[   37.314778] softirqs last disabled at (51): [<ffffd87abcd1bf68>] __irq_exit_rcu+0x158/0x174
[   37.323386] ---[ end trace 0000000000000000 ]---

Fixes: 275157b ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
herrnst pushed a commit to herrnst/linux-raspberrypi that referenced this issue May 9, 2022
[ Upstream commit 5e4f009 ]

The driver would disable the worker when cpu is being put offline, but
it happens closer to the end of cpufreq_offline(). The function
qcom_lmh_dcvs_poll() can be running in parallel with this, when
policy->cpus already has been updated. Read policy->related_cpus
instead.

[   37.122433] ------------[ cut here ]------------
[   37.127225] WARNING: CPU: 0 PID: 187 at drivers/base/arch_topology.c:180 topology_update_thermal_pressure+0xec/0x100
[   37.138098] Modules linked in:
[   37.141279] CPU: 0 PID: 187 Comm: kworker/0:3 Tainted: G S                5.17.0-rc6-00389-g37c83d0b8710-dirty raspberrypi#713
[   37.158306] Workqueue: events qcom_lmh_dcvs_poll
[   37.163095] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   37.170278] pc : topology_update_thermal_pressure+0xec/0x100
[   37.176131] lr : topology_update_thermal_pressure+0x20/0x100
[   37.181977] sp : ffff800009b6bce0
[   37.185402] x29: ffff800009b6bce0 x28: ffffd87abe92b000 x27: ffff04bd7292e205
[   37.192792] x26: ffffd87abe930af8 x25: ffffd87abe94e4c8 x24: 0000000000000000
[   37.200180] x23: ffff04bb01177018 x22: ffff04bb011770c0 x21: ffff04bb01177000
[   37.207567] x20: ffff04bb0a419000 x19: 00000000000c4e00 x18: 0000000000000000
[   37.214954] x17: 000000040044ffff x16: 004000b2b5503510 x15: 0000006aaa1326d2
[   37.222333] x14: 0000000000000232 x13: 0000000000000001 x12: 0000000000000040
[   37.229718] x11: ffff04bb00400000 x10: 968f57bd39f701c8 x9 : ffff04bb0acc8674
[   37.237095] x8 : fefefefefefefeff x7 : 0000000000000018 x6 : ffffd87abd90092c
[   37.244478] x5 : 0000000000000016 x4 : 0000000000000000 x3 : 0000000000000100
[   37.251852] x2 : ffff04bb0a419020 x1 : 0000000000000100 x0 : 0000000000000100
[   37.259235] Call trace:
[   37.261771]  topology_update_thermal_pressure+0xec/0x100
[   37.267266]  qcom_lmh_dcvs_poll+0xbc/0x154
[   37.271505]  process_one_work+0x288/0x69c
[   37.275654]  worker_thread+0x74/0x470
[   37.279450]  kthread+0xfc/0x100
[   37.282712]  ret_from_fork+0x10/0x20
[   37.286417] irq event stamp: 74
[   37.289664] hardirqs last  enabled at (73): [<ffffd87abdd78af4>] _raw_spin_unlock_irq+0x44/0x80
[   37.298632] hardirqs last disabled at (74): [<ffffd87abdd71fc0>] __schedule+0x710/0xa10
[   37.306885] softirqs last  enabled at (58): [<ffffd87abcc90410>] _stext+0x410/0x588
[   37.314778] softirqs last disabled at (51): [<ffffd87abcd1bf68>] __irq_exit_rcu+0x158/0x174
[   37.323386] ---[ end trace 0000000000000000 ]---

Fixes: 275157b ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
popcornmix pushed a commit that referenced this issue May 9, 2022
[ Upstream commit 5e4f009 ]

The driver would disable the worker when cpu is being put offline, but
it happens closer to the end of cpufreq_offline(). The function
qcom_lmh_dcvs_poll() can be running in parallel with this, when
policy->cpus already has been updated. Read policy->related_cpus
instead.

[   37.122433] ------------[ cut here ]------------
[   37.127225] WARNING: CPU: 0 PID: 187 at drivers/base/arch_topology.c:180 topology_update_thermal_pressure+0xec/0x100
[   37.138098] Modules linked in:
[   37.141279] CPU: 0 PID: 187 Comm: kworker/0:3 Tainted: G S                5.17.0-rc6-00389-g37c83d0b8710-dirty #713
[   37.158306] Workqueue: events qcom_lmh_dcvs_poll
[   37.163095] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   37.170278] pc : topology_update_thermal_pressure+0xec/0x100
[   37.176131] lr : topology_update_thermal_pressure+0x20/0x100
[   37.181977] sp : ffff800009b6bce0
[   37.185402] x29: ffff800009b6bce0 x28: ffffd87abe92b000 x27: ffff04bd7292e205
[   37.192792] x26: ffffd87abe930af8 x25: ffffd87abe94e4c8 x24: 0000000000000000
[   37.200180] x23: ffff04bb01177018 x22: ffff04bb011770c0 x21: ffff04bb01177000
[   37.207567] x20: ffff04bb0a419000 x19: 00000000000c4e00 x18: 0000000000000000
[   37.214954] x17: 000000040044ffff x16: 004000b2b5503510 x15: 0000006aaa1326d2
[   37.222333] x14: 0000000000000232 x13: 0000000000000001 x12: 0000000000000040
[   37.229718] x11: ffff04bb00400000 x10: 968f57bd39f701c8 x9 : ffff04bb0acc8674
[   37.237095] x8 : fefefefefefefeff x7 : 0000000000000018 x6 : ffffd87abd90092c
[   37.244478] x5 : 0000000000000016 x4 : 0000000000000000 x3 : 0000000000000100
[   37.251852] x2 : ffff04bb0a419020 x1 : 0000000000000100 x0 : 0000000000000100
[   37.259235] Call trace:
[   37.261771]  topology_update_thermal_pressure+0xec/0x100
[   37.267266]  qcom_lmh_dcvs_poll+0xbc/0x154
[   37.271505]  process_one_work+0x288/0x69c
[   37.275654]  worker_thread+0x74/0x470
[   37.279450]  kthread+0xfc/0x100
[   37.282712]  ret_from_fork+0x10/0x20
[   37.286417] irq event stamp: 74
[   37.289664] hardirqs last  enabled at (73): [<ffffd87abdd78af4>] _raw_spin_unlock_irq+0x44/0x80
[   37.298632] hardirqs last disabled at (74): [<ffffd87abdd71fc0>] __schedule+0x710/0xa10
[   37.306885] softirqs last  enabled at (58): [<ffffd87abcc90410>] _stext+0x410/0x588
[   37.314778] softirqs last disabled at (51): [<ffffd87abcd1bf68>] __irq_exit_rcu+0x158/0x174
[   37.323386] ---[ end trace 0000000000000000 ]---

Fixes: 275157b ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
pfpacket pushed a commit to pfpacket/linux-rpi-rust that referenced this issue Apr 7, 2023
rust: C files improvements & cleanups
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

No branches or pull requests

8 participants