diff options
author | Jules Maselbas <jmaselbas@kalray.eu> | 2023-02-07 17:20:55 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-02-13 10:10:28 +0100 |
commit | 734e8e3a2630974c2532946d930dd6fce9d48c8a (patch) | |
tree | 5a6add377a9634021247ff8ef6ddcb17f20b10b1 /lib | |
parent | 7458d7f530daef8cc7ec788da569be137227b581 (diff) | |
download | barebox-734e8e3a2630974c2532946d930dd6fce9d48c8a.tar.gz |
ratp: Increase the initial RTO to 200ms
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>
Link: https://lore.barebox.org/20230207162055.10050-5-jmaselbas@kalray.eu
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ratp.c | 2 |
1 files changed, 1 insertions, 1 deletions
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++; |