diff options
Diffstat (limited to 'net/dccp/ccids')
-rw-r--r-- | net/dccp/ccids/ccid2.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index f564211c3885..28499e030f33 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -33,51 +33,8 @@ | |||
33 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG | 33 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG |
34 | static int ccid2_debug; | 34 | static int ccid2_debug; |
35 | #define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a) | 35 | #define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a) |
36 | |||
37 | static void ccid2_hc_tx_check_sanity(const struct ccid2_hc_tx_sock *hc) | ||
38 | { | ||
39 | int len = 0; | ||
40 | int pipe = 0; | ||
41 | struct ccid2_seq *seqp = hc->tx_seqh; | ||
42 | |||
43 | /* there is data in the chain */ | ||
44 | if (seqp != hc->tx_seqt) { | ||
45 | seqp = seqp->ccid2s_prev; | ||
46 | len++; | ||
47 | if (!seqp->ccid2s_acked) | ||
48 | pipe++; | ||
49 | |||
50 | while (seqp != hc->tx_seqt) { | ||
51 | struct ccid2_seq *prev = seqp->ccid2s_prev; | ||
52 | |||
53 | len++; | ||
54 | if (!prev->ccid2s_acked) | ||
55 | pipe++; | ||
56 | |||
57 | /* packets are sent sequentially */ | ||
58 | BUG_ON(dccp_delta_seqno(seqp->ccid2s_seq, | ||
59 | prev->ccid2s_seq ) >= 0); | ||
60 | BUG_ON(time_before(seqp->ccid2s_sent, | ||
61 | prev->ccid2s_sent)); | ||
62 | |||
63 | seqp = prev; | ||
64 | } | ||
65 | } | ||
66 | |||
67 | BUG_ON(pipe != hc->tx_pipe); | ||
68 | ccid2_pr_debug("len of chain=%d\n", len); | ||
69 | |||
70 | do { | ||
71 | seqp = seqp->ccid2s_prev; | ||
72 | len++; | ||
73 | } while (seqp != hc->tx_seqh); | ||
74 | |||
75 | ccid2_pr_debug("total len=%d\n", len); | ||
76 | BUG_ON(len != hc->tx_seqbufc * CCID2_SEQBUF_LEN); | ||
77 | } | ||
78 | #else | 36 | #else |
79 | #define ccid2_pr_debug(format, a...) | 37 | #define ccid2_pr_debug(format, a...) |
80 | #define ccid2_hc_tx_check_sanity(hc) | ||
81 | #endif | 38 | #endif |
82 | 39 | ||
83 | static int ccid2_hc_tx_alloc_seq(struct ccid2_hc_tx_sock *hc) | 40 | static int ccid2_hc_tx_alloc_seq(struct ccid2_hc_tx_sock *hc) |
@@ -178,8 +135,6 @@ static void ccid2_hc_tx_rto_expire(unsigned long data) | |||
178 | 135 | ||
179 | ccid2_pr_debug("RTO_EXPIRE\n"); | 136 | ccid2_pr_debug("RTO_EXPIRE\n"); |
180 | 137 | ||
181 | ccid2_hc_tx_check_sanity(hc); | ||
182 | |||
183 | /* back-off timer */ | 138 | /* back-off timer */ |
184 | hc->tx_rto <<= 1; | 139 | hc->tx_rto <<= 1; |
185 | 140 | ||
@@ -204,7 +159,6 @@ static void ccid2_hc_tx_rto_expire(unsigned long data) | |||
204 | hc->tx_rpseq = 0; | 159 | hc->tx_rpseq = 0; |
205 | hc->tx_rpdupack = -1; | 160 | hc->tx_rpdupack = -1; |
206 | ccid2_change_l_ack_ratio(sk, 1); | 161 | ccid2_change_l_ack_ratio(sk, 1); |
207 | ccid2_hc_tx_check_sanity(hc); | ||
208 | out: | 162 | out: |
209 | bh_unlock_sock(sk); | 163 | bh_unlock_sock(sk); |
210 | sock_put(sk); | 164 | sock_put(sk); |
@@ -312,7 +266,6 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len) | |||
312 | } | 266 | } |
313 | } while (0); | 267 | } while (0); |
314 | ccid2_pr_debug("=========\n"); | 268 | ccid2_pr_debug("=========\n"); |
315 | ccid2_hc_tx_check_sanity(hc); | ||
316 | #endif | 269 | #endif |
317 | } | 270 | } |
318 | 271 | ||
@@ -510,7 +463,6 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
510 | int done = 0; | 463 | int done = 0; |
511 | unsigned int maxincr = 0; | 464 | unsigned int maxincr = 0; |
512 | 465 | ||
513 | ccid2_hc_tx_check_sanity(hc); | ||
514 | /* check reverse path congestion */ | 466 | /* check reverse path congestion */ |
515 | seqno = DCCP_SKB_CB(skb)->dccpd_seq; | 467 | seqno = DCCP_SKB_CB(skb)->dccpd_seq; |
516 | 468 | ||
@@ -694,8 +646,6 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
694 | 646 | ||
695 | hc->tx_seqt = hc->tx_seqt->ccid2s_next; | 647 | hc->tx_seqt = hc->tx_seqt->ccid2s_next; |
696 | } | 648 | } |
697 | |||
698 | ccid2_hc_tx_check_sanity(hc); | ||
699 | } | 649 | } |
700 | 650 | ||
701 | static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) | 651 | static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) |
@@ -730,8 +680,6 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) | |||
730 | hc->tx_last_cong = jiffies; | 680 | hc->tx_last_cong = jiffies; |
731 | setup_timer(&hc->tx_rtotimer, ccid2_hc_tx_rto_expire, | 681 | setup_timer(&hc->tx_rtotimer, ccid2_hc_tx_rto_expire, |
732 | (unsigned long)sk); | 682 | (unsigned long)sk); |
733 | |||
734 | ccid2_hc_tx_check_sanity(hc); | ||
735 | return 0; | 683 | return 0; |
736 | } | 684 | } |
737 | 685 | ||