Content-Type: multipart/mixed; boundary="===============2394881790556670365==" MIME-Version: 1.0 From: Paolo Abeni To: mptcp at lists.01.org Subject: [MPTCP] Re: [PATCH net-next 1/7] mptcp: break and restart in case mptcp sndbuf is full Date: Tue, 12 May 2020 12:41:40 +0200 Message-ID: <0ff4205b5f3aa251fa738e8f751c10e7593af519.camel@redhat.com> In-Reply-To: 20200511115538.6015-2-fw@strlen.de X-Status: X-Keywords: X-UID: 4372 --===============2394881790556670365== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Mon, 2020-05-11 at 13:55 +0200, Florian Westphal wrote: > Its not enough to wait for TCP-level acks (free tcp send space). > We also hold on to any transmitted data for mptcp-level retransmits, > so we can't continue sending more data when there is no more mptcp send > buffer space available. > = > Therefore add needed check in mptcp_sendmsg, flush tcp data and > wait until mptcp snd space becomes available. > = > Signed-off-by: Florian Westphal > --- > net/mptcp/protocol.c | 37 ++++++++++++++++++++++++++++++------- > 1 file changed, 30 insertions(+), 7 deletions(-) > = > diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c > index e1f23016ed3f..d14e2aa30a14 100644 > --- a/net/mptcp/protocol.c > +++ b/net/mptcp/protocol.c > @@ -653,6 +653,15 @@ static int mptcp_sendmsg_frag(struct sock *sk, struc= t sock *ssk, > return ret; > } > = > +static void mptcp_nospace(struct mptcp_sock *msk, struct socket *sock) > +{ > + clear_bit(MPTCP_SEND_SPACE, &msk->flags); > + smp_mb__after_atomic(); /* msk->flags is changed by write_space cb */ > + > + /* enables sk->write_space() callbacks */ > + set_bit(SOCK_NOSPACE, &sock->flags); > +} (sharing on the ML a topic already discussed privatelly) I think we can use this helper also in ssk_check_wmem(). Other than this, series LGTM! = Thanks Floerian, /P --===============2394881790556670365==--