Blame SOURCES/0181-tcp-ack-when-we-get-an-OOO-lost-packet.patch

d41074
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a85e8e
From: Josef Bacik <jbacik@fb.com>
a85e8e
Date: Wed, 12 Aug 2015 08:16:22 -0700
d41074
Subject: [PATCH] tcp: ack when we get an OOO/lost packet
a85e8e
a85e8e
While adding tcp window scaling support I was finding that I'd get some packet
a85e8e
loss or reordering when transferring from large distances and grub would just
a85e8e
timeout.  This is because we weren't ack'ing when we got our OOO packet, so the
a85e8e
sender didn't know it needed to retransmit anything, so eventually it would fill
a85e8e
the window and stop transmitting, and we'd time out.  Fix this by ACK'ing when
a85e8e
we don't find our next sequence numbered packet.  With this fix I no longer time
a85e8e
out.  Thanks,
a85e8e
a85e8e
Signed-off-by: Josef Bacik <jbacik@fb.com>
a85e8e
---
a85e8e
 grub-core/net/tcp.c | 5 ++++-
a85e8e
 1 file changed, 4 insertions(+), 1 deletion(-)
a85e8e
a85e8e
diff --git a/grub-core/net/tcp.c b/grub-core/net/tcp.c
d41074
index 2077f5519b2..fa29a2afc6c 100644
a85e8e
--- a/grub-core/net/tcp.c
a85e8e
+++ b/grub-core/net/tcp.c
a85e8e
@@ -882,7 +882,10 @@ grub_net_recv_tcp_packet (struct grub_net_buff *nb,
a85e8e
 	  grub_priority_queue_pop (sock->pq);
a85e8e
 	}
a85e8e
       if (grub_be_to_cpu32 (tcph->seqnr) != sock->their_cur_seq)
a85e8e
-	return GRUB_ERR_NONE;
a85e8e
+	{
a85e8e
+	  ack (sock);
a85e8e
+	  return GRUB_ERR_NONE;
a85e8e
+	}
a85e8e
       while (1)
a85e8e
 	{
a85e8e
 	  nb_top_p = grub_priority_queue_top (sock->pq);