Commit 78bebbbc authored by bernd's avatar bernd

Cleanup ack-class related stuff

parent 0b9c2c4d
...@@ -1844,8 +1844,8 @@ User outflag outflag off ...@@ -1844,8 +1844,8 @@ User outflag outflag off
>r r@ [ 64bit# qos3# or ]L or outbuf c! set-flags >r r@ [ 64bit# qos3# or ]L or outbuf c! set-flags
outbuf packet-body min-size r> lshift move ; outbuf packet-body min-size r> lshift move ;
: bandwidth+ ( -- ) o? : bandwidth+ ( -- )
ack@ .ns/burst 64@ 1 tick-init 1+ 64*/ ack@ .bandwidth-tick 64+! ; ns/burst 64@ 1 tick-init 1+ 64*/ bandwidth-tick 64+! ;
: burst-end ( flag -- flag ) data-b2b @ ?EXIT : burst-end ( flag -- flag ) data-b2b @ ?EXIT
ticker 64@ ack@ .bandwidth-tick 64@ 64max ack@ .next-tick 64! drop false ; ticker 64@ ack@ .bandwidth-tick 64@ 64max ack@ .next-tick 64! drop false ;
...@@ -1854,7 +1854,7 @@ User outflag outflag off ...@@ -1854,7 +1854,7 @@ User outflag outflag off
>send send-code-packet net2o:update-key ; >send send-code-packet net2o:update-key ;
: send-dX ( addr n -- ) +sendX2 : send-dX ( addr n -- ) +sendX2
>send bandwidth+ send-data-packet ; >send o IF ack@ .bandwidth+ THEN send-data-packet ;
Defer punch-reply Defer punch-reply
...@@ -1921,8 +1921,8 @@ User <size-lb> 1 floats cell- uallot drop ...@@ -1921,8 +1921,8 @@ User <size-lb> 1 floats cell- uallot drop
?toggle-ack send-dX ; ?toggle-ack send-dX ;
: bandwidth? ( -- flag ) : bandwidth? ( -- flag )
ticker 64@ 64dup last-ticks 64! ack@ .next-tick 64@ 64- 64-0>= ticker 64@ 64dup last-ticks 64! next-tick 64@ 64- 64-0>=
ack@ .flybursts @ 0> and ; flybursts @ 0> and ;
\ asynchronous sending \ asynchronous sending
...@@ -1981,7 +1981,7 @@ event: ->send-chunks ( o -- ) .do-send-chunks ; ...@@ -1981,7 +1981,7 @@ event: ->send-chunks ( o -- ) .do-send-chunks ;
: send-a-chunk ( chunk -- flag ) >r : send-a-chunk ( chunk -- flag ) >r
data-b2b @ 0<= IF data-b2b @ 0<= IF
bandwidth? dup IF ack@ .bandwidth? dup IF
b2b-toggle# ack-state xorc! b2b-toggle# ack-state xorc!
bursts# 1- data-b2b ! bursts# 1- data-b2b !
THEN THEN
...@@ -2232,7 +2232,7 @@ Defer handle-beacon ...@@ -2232,7 +2232,7 @@ Defer handle-beacon
ack@ .>flyburst net2o:send-chunks ack@ .>flyburst net2o:send-chunks
timeout( ." timeout? " .ticks space timeout( ." timeout? " .ticks space
resend? . data-tail? . data-head? . fstates . resend? . data-tail? . data-head? . fstates .
chunks+ ? bandwidth? . next-chunk-tick .ticks cr )else( 64drop ) ; chunks+ ? ack@ .bandwidth? . next-chunk-tick .ticks cr )else( 64drop ) ;
\ timeout handling \ timeout handling
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment