Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213917
b: refs/heads/master
c: c38c92a
h: refs/heads/master
i:
  213915: 12aef84
v: v3
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Aug 24, 2010
1 parent df4b96e commit bcab456
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30564e355511b434613aa42375317b5a07fc9f23
refs/heads/master: c38c92a84a9291a3d0eaf6a13650a11961ae964f
27 changes: 8 additions & 19 deletions trunk/net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,23 +413,6 @@ static inline void ccid2_new_ack(struct sock *sk,
hc->tx_srtt, hc->tx_rttvar,
hc->tx_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 *hc = ccid2_hc_tx_sk(sk);

if (hc->tx_pipe == 0)
DCCP_BUG("pipe == 0");
else
hc->tx_pipe--;

if (hc->tx_pipe == 0)
ccid2_hc_tx_kill_rto_timer(sk);
}

static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
Expand Down Expand Up @@ -572,7 +555,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
seqp->ccid2s_acked = 1;
ccid2_pr_debug("Got ack for %llu\n",
(unsigned long long)seqp->ccid2s_seq);
ccid2_hc_tx_dec_pipe(sk);
hc->tx_pipe--;
}
if (seqp == hc->tx_seqt) {
done = 1;
Expand Down Expand Up @@ -629,7 +612,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
* one ack vector.
*/
ccid2_congestion_event(sk, seqp);
ccid2_hc_tx_dec_pipe(sk);
hc->tx_pipe--;
}
if (seqp == hc->tx_seqt)
break;
Expand All @@ -646,6 +629,12 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)

hc->tx_seqt = hc->tx_seqt->ccid2s_next;
}

/* restart RTO timer if not all outstanding data has been acked */
if (hc->tx_pipe == 0)
sk_stop_timer(sk, &hc->tx_rtotimer);
else
sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto);
}

static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
Expand Down

0 comments on commit bcab456

Please sign in to comment.