* [MPTCP] [PATCH v2 1/4] mptcp: add and use subflow_write_space
@ 2019-10-23 14:23 Florian Westphal
0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2019-10-23 14:23 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]
This will be used to unblock tasks waiting for POLLOUT event
once mptcp_poll is altered to not wait for each subflow anymore.
Signed-off-by: Florian Westphal <fw(a)strlen.de>
---
net/mptcp/subflow.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 991198466c13..1f27a96d0439 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -610,6 +610,16 @@ static void subflow_data_ready(struct sock *sk)
}
}
+static void subflow_write_space(struct sock *sk)
+{
+ struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
+ struct sock *parent = subflow->conn;
+
+ sk_stream_write_space(sk);
+ if (parent)
+ sk_stream_write_space(parent);
+}
+
int mptcp_subflow_connect(struct sock *sk, struct sockaddr *local,
struct sockaddr *remote, u8 remote_id)
{
@@ -739,6 +749,7 @@ static int subflow_ulp_init(struct sock *sk)
icsk->icsk_af_ops = &subflow_specific;
ctx->tcp_sk_data_ready = sk->sk_data_ready;
sk->sk_data_ready = subflow_data_ready;
+ sk->sk_write_space = subflow_write_space;
out:
return err;
}
--
2.21.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-23 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-23 14:23 [MPTCP] [PATCH v2 1/4] mptcp: add and use subflow_write_space Florian Westphal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.