aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/mptcp/subflow.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-01-21 16:56:25 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-24 13:44:08 +0100
commit1891c4a07672b300b3160ceec59755063b20222b (patch)
treea8b22813609ac268086d3a4b65260711f97978ce /net/mptcp/subflow.c
parentmptcp: Implement MPTCP receive path (diff)
downloadwireguard-linux-1891c4a07672b300b3160ceec59755063b20222b.tar.xz
wireguard-linux-1891c4a07672b300b3160ceec59755063b20222b.zip
mptcp: add subflow write space signalling and mptcp_poll
Add new SEND_SPACE flag to indicate that a subflow has enough space to accept more data for transmission. It gets cleared at the end of mptcp_sendmsg() in case ssk has run below the free watermark. It is (re-set) from the wspace callback. This allows us to use msk->flags to determine the poll mask. Co-developed-by: Peter Krystad <peter.krystad@linux.intel.com> Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/mptcp/subflow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 528351e26371..9fb3eb87a20f 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -529,6 +529,9 @@ static void subflow_write_space(struct sock *sk)
sk_stream_write_space(sk);
if (parent && sk_stream_is_writeable(sk)) {
+ set_bit(MPTCP_SEND_SPACE, &mptcp_sk(parent)->flags);
+ smp_mb__after_atomic();
+ /* set SEND_SPACE before sk_stream_write_space clears NOSPACE */
sk_stream_write_space(parent);
}
}