Skip to contentSkip to conversation

: Accurately determine idle & application-limited periods

PATCH Gerrit Renker 1 participant 1 message Apr 11, 2007

lore
Share & tools
lore

Gerrit Renker

author Acked-by Ian McDonald
#0 lore raw
Quoted 1 line

[CCID3]: Accurately determine idle & application-limited periods

<snip>

Review

Quoted 8 lines
(quoted diff) +8 -0
+/**
+ *  ccid3_hc_tx_idle  -  Whether sender is idle or application-limited
+ *  @now: Current time needs to be supplied
+ *  Returns the number of full RTTs during which the sender has been idle.
+ */
+static int ccid3_hc_tx_idle(struct ccid3_hc_tx_sock *hctx, struct timeval *now)
+{
+       struct timeval last_send;

Maybe this would be better called ccid3_hc_tx_idle_rtt to indicate what is happening here.

Review

Quoted 3 lines
         */
(quoted diff) +1 -1
-       if (unlikely(hctx->ccid3hctx_idle)) {
+       if (ccid3_hc_tx_idle(hctx, now) >= 2) {

See what I mean? You're left wondering - what does this code do? It makes some sense if you check comment above but not totally obvious.

Code seems OK but not yet tested it all.

Signature · 3 lines
Web: http://wand.net.nz/~iam4/
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group