diff options
Diffstat (limited to 'net/dccp/input.c')
-rw-r--r-- | net/dccp/input.c | 69 |
1 files changed, 13 insertions, 56 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c index 062e9f8359d0..1b6b2cb12376 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <net/sock.h> | 17 | #include <net/sock.h> |
18 | 18 | ||
19 | #include "ackvec.h" | ||
19 | #include "ccid.h" | 20 | #include "ccid.h" |
20 | #include "dccp.h" | 21 | #include "dccp.h" |
21 | 22 | ||
@@ -60,8 +61,8 @@ static inline void dccp_event_ack_recv(struct sock *sk, struct sk_buff *skb) | |||
60 | struct dccp_sock *dp = dccp_sk(sk); | 61 | struct dccp_sock *dp = dccp_sk(sk); |
61 | 62 | ||
62 | if (dp->dccps_options.dccpo_send_ack_vector) | 63 | if (dp->dccps_options.dccpo_send_ack_vector) |
63 | dccp_ackpkts_check_rcv_ackno(dp->dccps_hc_rx_ackpkts, sk, | 64 | dccp_ackvec_check_rcv_ackno(dp->dccps_hc_rx_ackvec, sk, |
64 | DCCP_SKB_CB(skb)->dccpd_ack_seq); | 65 | DCCP_SKB_CB(skb)->dccpd_ack_seq); |
65 | } | 66 | } |
66 | 67 | ||
67 | static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb) | 68 | static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb) |
@@ -164,37 +165,11 @@ int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, | |||
164 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) | 165 | if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ) |
165 | dccp_event_ack_recv(sk, skb); | 166 | dccp_event_ack_recv(sk, skb); |
166 | 167 | ||
167 | /* | 168 | if (dp->dccps_options.dccpo_send_ack_vector && |
168 | * FIXME: check ECN to see if we should use | 169 | dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk, |
169 | * DCCP_ACKPKTS_STATE_ECN_MARKED | 170 | DCCP_SKB_CB(skb)->dccpd_seq, |
170 | */ | 171 | DCCP_ACKVEC_STATE_RECEIVED)) |
171 | if (dp->dccps_options.dccpo_send_ack_vector) { | 172 | goto discard; |
172 | struct dccp_ackpkts *ap = dp->dccps_hc_rx_ackpkts; | ||
173 | |||
174 | if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts, sk, | ||
175 | DCCP_SKB_CB(skb)->dccpd_seq, | ||
176 | DCCP_ACKPKTS_STATE_RECEIVED)) { | ||
177 | LIMIT_NETDEBUG(KERN_WARNING "DCCP: acknowledgeable " | ||
178 | "packets buffer full!\n"); | ||
179 | ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1; | ||
180 | inet_csk_schedule_ack(sk); | ||
181 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | ||
182 | TCP_DELACK_MIN, | ||
183 | DCCP_RTO_MAX); | ||
184 | goto discard; | ||
185 | } | ||
186 | |||
187 | /* | ||
188 | * FIXME: this activation is probably wrong, have to study more | ||
189 | * TCP delack machinery and how it fits into DCCP draft, but | ||
190 | * for now it kinda "works" 8) | ||
191 | */ | ||
192 | if (!inet_csk_ack_scheduled(sk)) { | ||
193 | inet_csk_schedule_ack(sk); | ||
194 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, 5 * HZ, | ||
195 | DCCP_RTO_MAX); | ||
196 | } | ||
197 | } | ||
198 | 173 | ||
199 | ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb); | 174 | ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb); |
200 | ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb); | 175 | ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb); |
@@ -495,29 +470,11 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
495 | ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb); | 470 | ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb); |
496 | ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb); | 471 | ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb); |
497 | 472 | ||
498 | /* | 473 | if (dp->dccps_options.dccpo_send_ack_vector && |
499 | * FIXME: check ECN to see if we should use | 474 | dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk, |
500 | * DCCP_ACKPKTS_STATE_ECN_MARKED | 475 | DCCP_SKB_CB(skb)->dccpd_seq, |
501 | */ | 476 | DCCP_ACKVEC_STATE_RECEIVED)) |
502 | if (dp->dccps_options.dccpo_send_ack_vector) { | 477 | goto discard; |
503 | if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts, sk, | ||
504 | dcb->dccpd_seq, | ||
505 | DCCP_ACKPKTS_STATE_RECEIVED)) | ||
506 | goto discard; | ||
507 | /* | ||
508 | * FIXME: this activation is probably wrong, have to | ||
509 | * study more TCP delack machinery and how it fits into | ||
510 | * DCCP draft, but for now it kinda "works" 8) | ||
511 | */ | ||
512 | if ((dp->dccps_hc_rx_ackpkts->dccpap_ack_seqno == | ||
513 | DCCP_MAX_SEQNO + 1) && | ||
514 | !inet_csk_ack_scheduled(sk)) { | ||
515 | inet_csk_schedule_ack(sk); | ||
516 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | ||
517 | TCP_DELACK_MIN, | ||
518 | DCCP_RTO_MAX); | ||
519 | } | ||
520 | } | ||
521 | } | 478 | } |
522 | 479 | ||
523 | /* | 480 | /* |