lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 22 May 2020 16:22:01 +0200
From:   Paolo Abeni <pabeni@...hat.com>
To:     Florian Westphal <fw@...len.de>, netdev@...r.kernel.org
Cc:     matthieu.baerts@...sares.net, mathew.j.martineau@...ux.intel.com
Subject: Re: [PATCH net-next] mptcp: adjust tcp rcvspace after moving skbs
 from ssk to sk queue

Hi,

On Fri, 2020-05-22 at 14:43 +0200, Florian Westphal wrote:
> TCP does tcp rcvbuf tuning when copying packets to userspace, e.g. in
> tcp_read_sock().  In case of mptcp, that function is only rarely used
> (when discarding retransmitted duplicate data).
> 
> Instead, skbs are moved from the tcp rx queue to the mptcp socket rx
> queue.
> Adjust subflow rcvbuf when we do so, its the last spot where we can
> adjust the ssk rcvbuf -- later we only have the mptcp-level socket.
> 
> This greatly improves performance on mptcp bulk transfers.
> 
> Signed-off-by: Florian Westphal <fw@...len.de>
> ---
>  net/mptcp/protocol.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index ba9d3d5c625f..dbb86cbb9e77 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -248,6 +248,9 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
>  
>  	*bytes = moved;
>  
> +	if (moved)
> +		tcp_rcv_space_adjust(ssk);
> +
>  	return done;
>  }

It looks like this way ssk rcvbuf will grow up to tcp_rmem[2] even if
there is no user-space reader - assuming the link is fast enough.

Don't we need to somehow cap that? e.g. moving mptcp rcvbuf update in
mptcp_revmsg()?

Thanks,

Paolo


Powered by blists - more mailing lists