From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] [PATCH v2 1/4] mptcp: add and use subflow_write_space
Date: Wed, 23 Oct 2019 16:23:52 +0200 [thread overview]
Message-ID: <20191023142355.31599-2-fw@strlen.de> (raw)
In-Reply-To: 20191023142355.31599-1-fw@strlen.de
[-- 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
reply other threads:[~2019-10-23 14:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191023142355.31599-2-fw@strlen.de \
--to=unknown@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.