From 5baa1b8318751255ca288f5033be5a3aeae36089 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 23 Feb 2022 12:58:44 -0600 Subject: [PATCH] ames: add fast retransmit --- pkg/arvo/sys/vane/ames.hoon | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index 7bb0b2de76..854ba69384 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -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)