[DCCP] ccid3: Fix calculation of t_ipi time of scheduled transmission
Problem:
This commit is contained in:
committed by
David S. Miller
parent
f5c2d6367b
commit
91cf5a1725
@@ -304,11 +304,19 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
|
|||||||
break;
|
break;
|
||||||
case TFRC_SSTATE_NO_FBACK:
|
case TFRC_SSTATE_NO_FBACK:
|
||||||
case TFRC_SSTATE_FBACK:
|
case TFRC_SSTATE_FBACK:
|
||||||
delay = (timeval_delta(&now, &hctx->ccid3hctx_t_nom) -
|
delay = timeval_delta(&hctx->ccid3hctx_t_nom, &now);
|
||||||
hctx->ccid3hctx_delta);
|
/*
|
||||||
delay /= -1000;
|
* Scheduling of packet transmissions [RFC 3448, 4.6]
|
||||||
/* divide by -1000 is to convert to ms and get sign right */
|
*
|
||||||
rc = delay > 0 ? delay : 0;
|
* if (t_now > t_nom - delta)
|
||||||
|
* // send the packet now
|
||||||
|
* else
|
||||||
|
* // send the packet in (t_nom - t_now) milliseconds.
|
||||||
|
*/
|
||||||
|
if (delay < hctx->ccid3hctx_delta)
|
||||||
|
rc = 0;
|
||||||
|
else
|
||||||
|
rc = delay/1000L;
|
||||||
break;
|
break;
|
||||||
case TFRC_SSTATE_TERM:
|
case TFRC_SSTATE_TERM:
|
||||||
DCCP_BUG("Illegal %s state TERM, sk=%p", dccp_role(sk), sk);
|
DCCP_BUG("Illegal %s state TERM, sk=%p", dccp_role(sk), sk);
|
||||||
|
Reference in New Issue
Block a user