ames: add fast retransmit

This commit is contained in:
Liam Fitzgerald 2022-02-23 12:58:44 -06:00
parent 4be4e9a7a0
commit 5baa1b8318

View File

@ -2788,9 +2788,7 @@
(ke-on-ack fra)
::
?. found
:: discard changes
~& dupe-ack/fra
og
(ke-fast-retransmit:og fra)
=/ =have [fra rawr]
=. hav.keen
`(list ^have)`[have hav.keen]
@ -2799,6 +2797,23 @@
(ke-done [sig dat]:ke-decode-full)
ke-continue
::
++ ke-fast-retransmit
|= fra=@ud
=; [cor=_ke-core wants=(pha want)]
cor(wan.keen wants)
%^ (dip-left:ke-deq ,cor=_ke-core) wan.keen
ke-core
|= [cor=_ke-core =want]
^- [(unit ^want) stop=? cor=_ke-core]
?. (lte fra.want fra)
[`want & cor]
?: (gth (next-expiry:ke-gauge:cor +>.want) now)
[`want & cor]
=. last-sent.want now
=. cor
(ke-emit:cor hoot.want)
[`want | cor]
::
++ ke-gauge
=* bug bug.ames-state
(make-pump-gauge now metrics.keen ship bug)