diff options
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
-rw-r--r-- | net/dccp/ccids/ccid2.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 162032baeac0..6533cb2f27bb 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -619,7 +619,17 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
619 | } | 619 | } |
620 | 620 | ||
621 | ackno = DCCP_SKB_CB(skb)->dccpd_ack_seq; | 621 | ackno = DCCP_SKB_CB(skb)->dccpd_ack_seq; |
622 | seqp = hctx->ccid2hctx_seqh->ccid2s_prev; | 622 | if (after48(ackno, hctx->ccid2hctx_high_ack)) |
623 | hctx->ccid2hctx_high_ack = ackno; | ||
624 | |||
625 | seqp = hctx->ccid2hctx_seqt; | ||
626 | while (before48(seqp->ccid2s_seq, ackno)) { | ||
627 | seqp = seqp->ccid2s_next; | ||
628 | if (seqp == hctx->ccid2hctx_seqh) { | ||
629 | seqp = hctx->ccid2hctx_seqh->ccid2s_prev; | ||
630 | break; | ||
631 | } | ||
632 | } | ||
623 | 633 | ||
624 | /* If in slow-start, cwnd can increase at most Ack Ratio / 2 packets for | 634 | /* If in slow-start, cwnd can increase at most Ack Ratio / 2 packets for |
625 | * this single ack. I round up. | 635 | * this single ack. I round up. |
@@ -697,7 +707,14 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
697 | /* The state about what is acked should be correct now | 707 | /* The state about what is acked should be correct now |
698 | * Check for NUMDUPACK | 708 | * Check for NUMDUPACK |
699 | */ | 709 | */ |
700 | seqp = hctx->ccid2hctx_seqh->ccid2s_prev; | 710 | seqp = hctx->ccid2hctx_seqt; |
711 | while (before48(seqp->ccid2s_seq, hctx->ccid2hctx_high_ack)) { | ||
712 | seqp = seqp->ccid2s_next; | ||
713 | if (seqp == hctx->ccid2hctx_seqh) { | ||
714 | seqp = hctx->ccid2hctx_seqh->ccid2s_prev; | ||
715 | break; | ||
716 | } | ||
717 | } | ||
701 | done = 0; | 718 | done = 0; |
702 | while (1) { | 719 | while (1) { |
703 | if (seqp->ccid2s_acked) { | 720 | if (seqp->ccid2s_acked) { |
@@ -771,6 +788,7 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) | |||
771 | hctx->ccid2hctx_lastrtt = 0; | 788 | hctx->ccid2hctx_lastrtt = 0; |
772 | hctx->ccid2hctx_rpdupack = -1; | 789 | hctx->ccid2hctx_rpdupack = -1; |
773 | hctx->ccid2hctx_last_cong = jiffies; | 790 | hctx->ccid2hctx_last_cong = jiffies; |
791 | hctx->ccid2hctx_high_ack = 0; | ||
774 | 792 | ||
775 | hctx->ccid2hctx_rtotimer.function = &ccid2_hc_tx_rto_expire; | 793 | hctx->ccid2hctx_rtotimer.function = &ccid2_hc_tx_rto_expire; |
776 | hctx->ccid2hctx_rtotimer.data = (unsigned long)sk; | 794 | hctx->ccid2hctx_rtotimer.data = (unsigned long)sk; |