multipath-tcp / mptcp

⚠️⚠️⚠️ Deprecated 🚫 Out-of-tree Linux Kernel implementation of MultiPath TCP. 👉 Use https://github.com/multipath-tcp/mptcp_net-next repo instead ⚠️⚠️⚠️
https://github.com/multipath-tcp/mptcp_net-next
Other
889 stars 335 forks source link

num_subflows of mptcp #453

Closed lhz-1236 closed 2 years ago

lhz-1236 commented 2 years ago

hello, my mptcp version : v0.95 Linux system: ubuntu 18 Number of network cards:2 I use iperf3 for packet sending test.

Problem1: path_manager: fullmesh I set /sys/module/mptcp_fullmesh/parameters/num_subflows to be 2, but the actual number of substreams is 62. It’s weird that it’s invalid when set up.

VenkateswaranJ commented 2 years ago

Hi, How many ip addresses you have configured per interface?

lhz-1236 commented 2 years ago

one ip address per network cards

matttbe commented 2 years ago

I set /sys/module/mptcp_fullmesh/parameters/num_subflows to be 2, but the actual number of substreams is 62.

What did you do exactly?

# echo 2 > /sys/module/mptcp_fullmesh/parameters/num_subflows
# cat /sys/module/mptcp_fullmesh/parameters/num_subflows
62

Did you compile the MPTCP "fullmesh" path manager as a module?

lhz-1236 commented 2 years ago

Yes, I did First:

echo 2 > /sys/module/mptcp_fullmesh/parameters/num_subflows

Then I used the mpcc congestion algorithm and printed the path number. I found that the largest path number is 62.

matttbe commented 2 years ago

How did you print this "path number"?

How many IPs are available on both the client and server?

How is the server configured?

What's the output of these commands on both the client and server?

sysctl net.mptcp
cat /proc/net/mptcp_fullmesh
lhz-1236 commented 2 years ago

First: I added such a few lines of code to the congestion algorithm:

mptcp_for_each_sub(mpcb, mptcp_sk)
    {      
                struct sock *curr_sk = mptcp_to_sock(mptcp_sk);  
        printk("pathid:%d",tcp_sk(curr_sk)->mptcp->path_index);
    }
and then use sudo dmesg

Second: client:4 IPs server: 2 IPs

Third: server path_manager: fullmesh

Fourth: client&server

net.mptcp.mptcp_binder_gateways = 
net.mptcp.mptcp_checksum = 1
net.mptcp.mptcp_debug = 0
net.mptcp.mptcp_enabled = 1
net.mptcp.mptcp_path_manager = fullmesh
net.mptcp.mptcp_scheduler=default
net.mptcp.mptcp_syn_retries=3
net.mptcp.mptcp_version=0

client:

Index,Address-ID,Backup,IP-address,if-idx
IPv4,next v4-index:4
1,2,0,10.103.239.88,2
2,3,0,10.103.239.134,3
3,4,0,172.17.0.1,4
IPv6,next v6-index:4
...

server:

Index,Address-ID,Backup,IP-address,if-idx
IPv4,next v4-index:6
1,2,0,10.103.239.30,2
2,3,0,10.103.239.160,3
3,4,0,10.103.239.32,4
4,5,0,10.103.239.163,5
5,6,0,172.17.0.1,6
IPv6,next v6-index:8
...
matttbe commented 2 years ago

I added such a few lines of code to the congestion algorithm

path_index doesn't show you the number of subflows, it is just a path index. And depending on where you look at it, it can be something else as it is used in an union.

If you want to know the number of subflows, you can look at cat /proc/net/mptcp_net/mptcp, in the ns column.

lhz-1236 commented 2 years ago

use cat /proc/net/mptcp_net/mptcp ,in the ns column ,the value is 2E. It seems that the number is not normal.

matttbe commented 2 years ago

So it is set to 46. It is possible: it looks like you have quite a lot of IPs available (IPv4 and IPv6). The PM on the server side will announce all its IPs (5 in v4 and 7 in v6) and the client will try to establish subflows between each possible IPs (35 in v4 and 37 in v6). Then you double this because num_subflows is set to 2. I guess it is not possible to do all combinations so reaching 46 seems possible.

You can ask the PM not to use some interfaces, see http://multipath-tcp.org/pmwiki.php/Users/Tools (or other issues that have been created about that)

lhz-1236 commented 2 years ago

Okay, thank you very much for your reply. I will try it later

matttbe commented 2 years ago

Please close the ticket if everything is OK at the end.