grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: kernel-team@fb.com, grub-devel@gnu.org
Cc: Josef Bacik <jbacik@fb.com>
Subject: [PATCH] tcp: ack when we get an OOO/lost packet
Date: Wed, 12 Aug 2015 08:16:22 -0700	[thread overview]
Message-ID: <1439392582-3172342-1-git-send-email-jbacik@fb.com> (raw)

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 <jbacik@fb.com>
---
 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



             reply	other threads:[~2015-08-12 15:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 15:16 Josef Bacik [this message]
2015-08-13  8:19 ` [PATCH] tcp: ack when we get an OOO/lost packet Andrei Borzenkov
2015-08-13 13:59   ` Josef Bacik
2015-08-13 17:13     ` Andrei Borzenkov
2015-08-13 17:40       ` Josef Bacik
2015-08-17 12:38     ` Andrei Borzenkov
2015-08-18 17:58       ` Josef Bacik
2015-12-07 17:59 ` Andrei Borzenkov
2015-12-07 18:28   ` Josef Bacik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439392582-3172342-1-git-send-email-jbacik@fb.com \
    --to=jbacik@fb.com \
    --cc=grub-devel@gnu.org \
    --cc=kernel-team@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).