]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: rethink 'is writable' conditional
authorPaolo Abeni <pabeni@redhat.com>
Mon, 14 Sep 2020 08:01:07 +0000 (10:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Sep 2020 20:28:02 +0000 (13:28 -0700)
commit1f4673a95ad3401ba2bb6b9fbc6d6535b9520522
treef0cabc37a55b26c56856445fb1645c82dc44cce8
parent76ff1cb49f61a936d356b3c44181be808d8aef74
mptcp: rethink 'is writable' conditional

Currently, when checking for the 'msk is writable' condition, we
look at the individual subflows write space.
That works well while we send data via a single subflow, but will
not as soon as we will enable concurrent xmit on multiple subflows.

With this change msk becomes writable when the following conditions
hold:
- the socket has some free write space
- there is at least a subflow with write free space

Additionally we need to set the NOSPACE bit on all subflows
before blocking.

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/subflow.c