dp->dccps_l_ack_ratio = val;
}
-static void ccid2_start_rto_timer(struct sock *sk);
-
static void ccid2_hc_tx_rto_expire(unsigned long data)
{
struct sock *sk = (struct sock *)data;
/* if we were blocked before, we may now send cwnd=1 packet */
if (sender_was_blocked)
tasklet_schedule(&dccp_sk(sk)->dccps_xmitlet);
- ccid2_start_rto_timer(sk);
+ /* restart backed-off timer */
+ sk_reset_timer(sk, &hctx->rtotimer, jiffies + hctx->rto);
out:
bh_unlock_sock(sk);
sock_put(sk);
}
-static void ccid2_start_rto_timer(struct sock *sk)
-{
- struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
-
- ccid2_pr_debug("setting RTO timeout=%ld\n", hctx->rto);
-
- BUG_ON(timer_pending(&hctx->rtotimer));
- sk_reset_timer(sk, &hctx->rtotimer,
- jiffies + hctx->rto);
-}
-
static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len)
{
struct dccp_sock *dp = dccp_sk(sk);
/* setup RTO timer */
if (!timer_pending(&hctx->rtotimer))
- ccid2_start_rto_timer(sk);
+ sk_reset_timer(sk, &hctx->rtotimer, jiffies + hctx->rto);
#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
do {
#endif
}
-static void ccid2_hc_tx_kill_rto_timer(struct sock *sk)
-{
- struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
-
- sk_stop_timer(sk, &hctx->rtotimer);
- ccid2_pr_debug("deleted RTO timer\n");
-}
-
/**
* ccid2_rtt_estimator - Sample RTT and compute RTO using RFC2988 algorithm
* This code is almost identical with TCP's tcp_rtt_estimator(), since
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
int i;
- ccid2_hc_tx_kill_rto_timer(sk);
+ sk_stop_timer(sk, &hctx->rtotimer);
for (i = 0; i < hctx->seqbufc; i++)
kfree(hctx->seqbuf[i]);