mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <jmaselbas@kalray.eu>
To: barebox@lists.infradead.org
Cc: Jules Maselbas <jmaselbas@kalray.eu>
Subject: [PATCH v3 5/5] ratp: Increase the initial RTO to 200ms
Date: Tue,  7 Feb 2023 17:20:55 +0100	[thread overview]
Message-ID: <20230207162055.10050-5-jmaselbas@kalray.eu> (raw)
In-Reply-To: <20230207162055.10050-1-jmaselbas@kalray.eu>

The initial value for RTO is 100ms which might be a bit low. From the
RFC916 the RTO is expected to have a lower and upper bound but values
are not specified.  The RFC916 also define the calculation of the RTO
to be somewhere between 1.3 to 2.0 times the SRTT (which is currently
defined to 100ms).  Thus I propose to set the initial value of RTO to
200ms, to be 2.0 times greater than the initial SRTT.

Moreover, the current runtime calculation for RTO is done in the
function ratp_msg_done and has lower bound of 200ms:
    ri->srtt = (alpha * ri->srtt + (10 - alpha) * rtt) / 10;
    ri->rto = max(200, beta * ri->srtt / 10);

Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
---
 lib/ratp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ratp.c b/lib/ratp.c
index d5205a4e93..c597e96784 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1648,7 +1648,7 @@ int ratp_establish(struct ratp *ratp, bool active, int timeout_ms)
 	INIT_LIST_HEAD(&ri->sendmsg);
 	ri->max_retransmission = 100;
 	ri->srtt = 100;
-	ri->rto = 100;
+	ri->rto = 200;
 	ri->active = active;
 
 	ri->in_ratp++;
-- 
2.17.1




  parent reply	other threads:[~2023-02-07 16:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 16:20 [PATCH v3 1/5] bbremote: Fix default payload value in BBPacket Jules Maselbas
2023-02-07 16:20 ` [PATCH v3 2/5] bbremote: Fix RATP handshake, errata #7321 for RFC916 Jules Maselbas
2023-02-07 16:20 ` [PATCH v3 3/5] ratp: Fix retransmission for header-only packets Jules Maselbas
2023-02-07 16:20 ` [PATCH v3 4/5] ratp: Increase the establish timeout to 1sec Jules Maselbas
2023-02-07 16:20 ` Jules Maselbas [this message]
2023-02-13  9:11 ` [PATCH v3 1/5] bbremote: Fix default payload value in BBPacket Sascha Hauer

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=20230207162055.10050-5-jmaselbas@kalray.eu \
    --to=jmaselbas@kalray.eu \
    --cc=barebox@lists.infradead.org \
    /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