mptcp: allow picking different xmit subflows
authorPaolo Abeni <pabeni@redhat.com>
Mon, 14 Sep 2020 08:01:17 +0000 (10:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Sep 2020 20:28:02 +0000 (13:28 -0700)
commitd5f49190def61c47b2faff170ba8fbc48bac4371
tree32cb6e5177d7f54d34e9611758c2d7117f30e5bb
parent4596a2c1b7f55b8dac9ef4d8724cbef6e11eb74c
mptcp: allow picking different xmit subflows

Update the scheduler to less trivial heuristic: cache
the last used subflow, and try to send on it a reasonably
long burst of data.

When the burst or the subflow send space is exhausted, pick
the subflow with the lower ratio between write space and
send buffer - that is, the subflow with the greater relative
amount of free space.

v1 -> v2:
 - fix 32 bit build breakage due to 64bits div
 - fix checkpath issues (uint64_t -> u64)

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c
net/mptcp/protocol.h