|
@@ -353,23 +353,6 @@ static inline void ccid2_new_ack(struct sock *sk,
|
|
hctx->srtt, hctx->rttvar,
|
|
hctx->srtt, hctx->rttvar,
|
|
hctx->rto, HZ, r);
|
|
hctx->rto, HZ, r);
|
|
}
|
|
}
|
|
-
|
|
|
|
- /* we got a new ack, so re-start RTO timer */
|
|
|
|
- ccid2_hc_tx_kill_rto_timer(sk);
|
|
|
|
- ccid2_start_rto_timer(sk);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void ccid2_hc_tx_dec_pipe(struct sock *sk)
|
|
|
|
-{
|
|
|
|
- struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
|
|
|
|
-
|
|
|
|
- if (hctx->pipe == 0)
|
|
|
|
- DCCP_BUG("pipe == 0");
|
|
|
|
- else
|
|
|
|
- hctx->pipe--;
|
|
|
|
-
|
|
|
|
- if (hctx->pipe == 0)
|
|
|
|
- ccid2_hc_tx_kill_rto_timer(sk);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
|
|
static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
|
|
@@ -518,7 +501,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
|
|
seqp->ccid2s_acked = 1;
|
|
seqp->ccid2s_acked = 1;
|
|
ccid2_pr_debug("Got ack for %llu\n",
|
|
ccid2_pr_debug("Got ack for %llu\n",
|
|
(unsigned long long)seqp->ccid2s_seq);
|
|
(unsigned long long)seqp->ccid2s_seq);
|
|
- ccid2_hc_tx_dec_pipe(sk);
|
|
|
|
|
|
+ hctx->pipe--;
|
|
}
|
|
}
|
|
if (seqp == hctx->seqt) {
|
|
if (seqp == hctx->seqt) {
|
|
done = 1;
|
|
done = 1;
|
|
@@ -574,7 +557,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
|
|
* one ack vector.
|
|
* one ack vector.
|
|
*/
|
|
*/
|
|
ccid2_congestion_event(sk, seqp);
|
|
ccid2_congestion_event(sk, seqp);
|
|
- ccid2_hc_tx_dec_pipe(sk);
|
|
|
|
|
|
+ hctx->pipe--;
|
|
}
|
|
}
|
|
if (seqp == hctx->seqt)
|
|
if (seqp == hctx->seqt)
|
|
break;
|
|
break;
|
|
@@ -592,6 +575,12 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
|
|
hctx->seqt = hctx->seqt->ccid2s_next;
|
|
hctx->seqt = hctx->seqt->ccid2s_next;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* restart RTO timer if not all outstanding data has been acked */
|
|
|
|
+ if (hctx->pipe == 0)
|
|
|
|
+ sk_stop_timer(sk, &hctx->rtotimer);
|
|
|
|
+ else
|
|
|
|
+ sk_reset_timer(sk, &hctx->rtotimer,
|
|
|
|
+ jiffies + hctx->rto);
|
|
done:
|
|
done:
|
|
/* check if incoming Acks allow pending packets to be sent */
|
|
/* check if incoming Acks allow pending packets to be sent */
|
|
if (sender_was_blocked && !ccid2_cwnd_network_limited(hctx))
|
|
if (sender_was_blocked && !ccid2_cwnd_network_limited(hctx))
|