: Accurately determine idle & application-limited periods
Gerrit Renker
Acked-by Ian McDonaldQuoted 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.
Acked-by Ian McDonald <[email protected]>
Signature · 3 lines
Web: http://wand.net.nz/~iam4/ Blog: http://iansblog.jandi.co.nz WAND Network Research Group