diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 6ac274249961..4eb0c8ca3c60 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3591,7 +3591,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3591 | * this segment (RFC793 Section 3.9). | 3591 | * this segment (RFC793 Section 3.9). |
3592 | */ | 3592 | */ |
3593 | if (after(ack, tp->snd_nxt)) | 3593 | if (after(ack, tp->snd_nxt)) |
3594 | goto invalid_ack; | 3594 | return -1; |
3595 | 3595 | ||
3596 | if (after(ack, prior_snd_una)) { | 3596 | if (after(ack, prior_snd_una)) { |
3597 | flag |= FLAG_SND_UNA_ADVANCED; | 3597 | flag |= FLAG_SND_UNA_ADVANCED; |
@@ -3710,10 +3710,6 @@ no_queue: | |||
3710 | tcp_process_tlp_ack(sk, ack, flag); | 3710 | tcp_process_tlp_ack(sk, ack, flag); |
3711 | return 1; | 3711 | return 1; |
3712 | 3712 | ||
3713 | invalid_ack: | ||
3714 | SOCK_DEBUG(sk, "Ack %u after %u:%u\n", ack, tp->snd_una, tp->snd_nxt); | ||
3715 | return -1; | ||
3716 | |||
3717 | old_ack: | 3713 | old_ack: |
3718 | /* If data was SACKed, tag it and see if we should send more data. | 3714 | /* If data was SACKed, tag it and see if we should send more data. |
3719 | * If data was DSACKed, see if we can undo a cwnd reduction. | 3715 | * If data was DSACKed, see if we can undo a cwnd reduction. |
@@ -3727,7 +3723,6 @@ old_ack: | |||
3727 | tcp_xmit_recovery(sk, rexmit); | 3723 | tcp_xmit_recovery(sk, rexmit); |
3728 | } | 3724 | } |
3729 | 3725 | ||
3730 | SOCK_DEBUG(sk, "Ack %u before %u:%u\n", ack, tp->snd_una, tp->snd_nxt); | ||
3731 | return 0; | 3726 | return 0; |
3732 | } | 3727 | } |
3733 | 3728 | ||
@@ -4428,13 +4423,9 @@ static void tcp_ofo_queue(struct sock *sk) | |||
4428 | rb_erase(&skb->rbnode, &tp->out_of_order_queue); | 4423 | rb_erase(&skb->rbnode, &tp->out_of_order_queue); |
4429 | 4424 | ||
4430 | if (unlikely(!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))) { | 4425 | if (unlikely(!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))) { |
4431 | SOCK_DEBUG(sk, "ofo packet was already received\n"); | ||
4432 | tcp_drop(sk, skb); | 4426 | tcp_drop(sk, skb); |
4433 | continue; | 4427 | continue; |
4434 | } | 4428 | } |
4435 | SOCK_DEBUG(sk, "ofo requeuing : rcv_next %X seq %X - %X\n", | ||
4436 | tp->rcv_nxt, TCP_SKB_CB(skb)->seq, | ||
4437 | TCP_SKB_CB(skb)->end_seq); | ||
4438 | 4429 | ||
4439 | tail = skb_peek_tail(&sk->sk_receive_queue); | 4430 | tail = skb_peek_tail(&sk->sk_receive_queue); |
4440 | eaten = tail && tcp_try_coalesce(sk, tail, skb, &fragstolen); | 4431 | eaten = tail && tcp_try_coalesce(sk, tail, skb, &fragstolen); |
@@ -4498,8 +4489,6 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb) | |||
4498 | NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFOQUEUE); | 4489 | NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFOQUEUE); |
4499 | seq = TCP_SKB_CB(skb)->seq; | 4490 | seq = TCP_SKB_CB(skb)->seq; |
4500 | end_seq = TCP_SKB_CB(skb)->end_seq; | 4491 | end_seq = TCP_SKB_CB(skb)->end_seq; |
4501 | SOCK_DEBUG(sk, "out of order segment: rcv_next %X seq %X - %X\n", | ||
4502 | tp->rcv_nxt, seq, end_seq); | ||
4503 | 4492 | ||
4504 | p = &tp->out_of_order_queue.rb_node; | 4493 | p = &tp->out_of_order_queue.rb_node; |
4505 | if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { | 4494 | if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { |
@@ -4775,10 +4764,6 @@ drop: | |||
4775 | 4764 | ||
4776 | if (before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) { | 4765 | if (before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) { |
4777 | /* Partial packet, seq < rcv_next < end_seq */ | 4766 | /* Partial packet, seq < rcv_next < end_seq */ |
4778 | SOCK_DEBUG(sk, "partial packet: rcv_next %X seq %X - %X\n", | ||
4779 | tp->rcv_nxt, TCP_SKB_CB(skb)->seq, | ||
4780 | TCP_SKB_CB(skb)->end_seq); | ||
4781 | |||
4782 | tcp_dsack_set(sk, TCP_SKB_CB(skb)->seq, tp->rcv_nxt); | 4767 | tcp_dsack_set(sk, TCP_SKB_CB(skb)->seq, tp->rcv_nxt); |
4783 | 4768 | ||
4784 | /* If window is closed, drop tail of packet. But after | 4769 | /* If window is closed, drop tail of packet. But after |
@@ -5057,8 +5042,6 @@ static int tcp_prune_queue(struct sock *sk) | |||
5057 | { | 5042 | { |
5058 | struct tcp_sock *tp = tcp_sk(sk); | 5043 | struct tcp_sock *tp = tcp_sk(sk); |
5059 | 5044 | ||
5060 | SOCK_DEBUG(sk, "prune_queue: c=%x\n", tp->copied_seq); | ||
5061 | |||
5062 | NET_INC_STATS(sock_net(sk), LINUX_MIB_PRUNECALLED); | 5045 | NET_INC_STATS(sock_net(sk), LINUX_MIB_PRUNECALLED); |
5063 | 5046 | ||
5064 | if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) | 5047 | if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) |