From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZPXlX-0008Kd-96 for mharc-grub-devel@gnu.org; Wed, 12 Aug 2015 11:16:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPXlU-0008K8-Mq for grub-devel@gnu.org; Wed, 12 Aug 2015 11:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPXlR-00058V-GR for grub-devel@gnu.org; Wed, 12 Aug 2015 11:16:28 -0400 Received: from 66-220-155-178.intmwg.facebook.com ([66.220.155.178]:56353 helo=mx-out.facebook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPXlR-00058D-C8 for grub-devel@gnu.org; Wed, 12 Aug 2015 11:16:25 -0400 Received: from facebook.com (2401:db00:2040:5012:face:0:9:0) by mx-out.facebook.com (10.212.232.59) with ESMTP id 189e2a88410511e593e90002c991e86a-f5bfb2b0 for ; Wed, 12 Aug 2015 08:16:24 -0700 Received: by devbig041.ash4.facebook.com (Postfix, from userid 8730) id A68864542075; Wed, 12 Aug 2015 08:16:24 -0700 (PDT) From: Josef Bacik To: kernel-team@fb.com, grub-devel@gnu.org Subject: [PATCH] tcp: ack when we get an OOO/lost packet Date: Wed, 12 Aug 2015 08:16:22 -0700 Message-Id: <1439392582-3172342-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 1.8.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 66.220.155.178 Cc: Josef Bacik X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2015 15:16:29 -0000 While adding tcp window scaling support I was finding that I'd get some packet loss or reordering when transferring from large distances and grub would just timeout. This is because we weren't ack'ing when we got our OOO packet, so the sender didn't know it needed to retransmit anything, so eventually it would fill the window and stop transmitting, and we'd time out. Fix this by ACK'ing when we don't find our next sequence numbered packet. With this fix I no longer time out. Thanks, Signed-off-by: Josef Bacik --- grub-core/net/tcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grub-core/net/tcp.c b/grub-core/net/tcp.c index 25720b1..6b411dd 100644 --- a/grub-core/net/tcp.c +++ b/grub-core/net/tcp.c @@ -902,7 +902,10 @@ grub_net_recv_tcp_packet (struct grub_net_buff *nb, grub_priority_queue_pop (sock->pq); } if (grub_be_to_cpu32 (tcph->seqnr) != sock->their_cur_seq) - return GRUB_ERR_NONE; + { + ack (sock); + return GRUB_ERR_NONE; + } while (1) { nb_top_p = grub_priority_queue_top (sock->pq); -- 1.8.1