All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [PATCH] mptcp: copy mptcp receive buffer setting to subflow
@ 2020-03-13 22:48 Mat Martineau
  0 siblings, 0 replies; only message in thread
From: Mat Martineau @ 2020-03-13 22:48 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]


On Thu, 12 Mar 2020, Florian Westphal wrote:

> For incoming/outgoing connections, initial window is chosen based om
> the subflow receive buffer size.
>
> In case mptcp socket has a fixed buffer size, we should copy it to the
> subflow/tcp socket as well.

Does this need to be synced later in the connection when SO_RECVBUF is 
changed? If it does, this patch is not really blocked: copying the value 
at subflow creation time allows initial window tuning that isn't currently 
possible.

Mat


>
> Signed-off-by: Florian Westphal <fw(a)strlen.de>
> ---
> I'll pass this to netdev@ unless there are objections.
>
> net/mptcp/protocol.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index ddfd02ab6e31..a65cedcb905f 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -89,6 +89,15 @@ static bool __mptcp_can_create_subflow(const struct mptcp_sock *msk)
> 	return !msk->first;
> }
>
> +static void sync_rcvbuf(const struct sock *msk, struct sock *ssk)
> +{
> +	if (unlikely((msk->sk_userlocks & SOCK_RCVBUF_LOCK) &&
> +	     ssk->sk_rcvbuf != msk->sk_rcvbuf)) {
> +		ssk->sk_userlocks |= SOCK_RCVBUF_LOCK;
> +		WRITE_ONCE(ssk->sk_rcvbuf, msk->sk_rcvbuf);
> +	}
> +}
> +
> static struct socket *__mptcp_socket_create(struct mptcp_sock *msk, int state)
> {
> 	struct mptcp_subflow_context *subflow;
> @@ -107,6 +116,7 @@ static struct socket *__mptcp_socket_create(struct mptcp_sock *msk, int state)
> 	if (err)
> 		return ERR_PTR(err);
>
> +	sync_rcvbuf(sk, ssock->sk);
> 	msk->first = ssock->sk;
> 	msk->subflow = ssock;
> 	subflow = mptcp_subflow_ctx(ssock->sk);
> -- 
> 2.24.1
> _______________________________________________
> mptcp mailing list -- mptcp(a)lists.01.org
> To unsubscribe send an email to mptcp-leave(a)lists.01.org
>

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-13 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13 22:48 [MPTCP] Re: [PATCH] mptcp: copy mptcp receive buffer setting to subflow Mat Martineau

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.