From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] strparser: Remove early eaten to fix full tcp receive buffer stall Date: Thu, 28 Jun 2018 21:43:16 +0900 (KST) Message-ID: <20180628.214316.1810821427583973651.davem@davemloft.net> References: <20180627013333.3584797-1-doronrk@fb.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: davejwatson@fb.com, tom@quantonium.net, netdev@vger.kernel.org To: doronrk@fb.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:51924 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965482AbeF1MnZ (ORCPT ); Thu, 28 Jun 2018 08:43:25 -0400 In-Reply-To: <20180627013333.3584797-1-doronrk@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Doron Roberts-Kedes Date: Tue, 26 Jun 2018 18:33:33 -0700 > On receving an incomplete message, the existing code stores the > remaining length of the cloned skb in the early_eaten field instead of > incrementing the value returned by __strp_recv. This defers invocation > of sock_rfree for the current skb until the next invocation of > __strp_recv, which returns early_eaten if early_eaten is non-zero. > > This behavior causes a stall when the current message occupies the very > tail end of a massive skb, and strp_peek/need_bytes indicates that the > remainder of the current message has yet to arrive on the socket. The > TCP receive buffer is totally full, causing the TCP window to go to > zero, so the remainder of the message will never arrive. > > Incrementing the value returned by __strp_recv by the amount otherwise > stored in early_eaten prevents stalls of this nature. > > Signed-off-by: Doron Roberts-Kedes Applied and queued up for -stable.