[TCP]: Correct DSACK check placing
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Sat, 17 Nov 2007 00:17:05 +0000 (16:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:54:15 +0000 (14:54 -0800)
Previously one of the in-block skip branches was missing it.

Also, drop it from tail-fully-processed case because the next
iteration will do exactly the same thing, i.e., process the
SACK block that contains the DSACK information.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c

index 3ad6a19ad30f027a9245da5455fd7e44c0e8b2de..79996b16b9425bf44f725ca20daa8bc6ef058cee 100644 (file)
@@ -1554,20 +1554,15 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
                        }
 
                        /* Rest of the block already fully processed? */
-                       if (!after(end_seq, cache->end_seq)) {
-                               skb = tcp_maybe_skipping_dsack(skb, sk, next_dup, cache->end_seq,
-                                                              &fack_count, &reord, &flag);
+                       if (!after(end_seq, cache->end_seq))
                                goto advance_sp;
-                       }
+
+                       skb = tcp_maybe_skipping_dsack(skb, sk, next_dup, cache->end_seq,
+                                                      &fack_count, &reord, &flag);
 
                        /* ...tail remains todo... */
                        if (TCP_SKB_CB(tp->highest_sack)->end_seq == cache->end_seq) {
-                               /* ...but better entrypoint exists! Check that DSACKs are
-                                * properly accounted while skipping here
-                                */
-                               tcp_maybe_skipping_dsack(skb, sk, next_dup, cache->end_seq,
-                                                        &fack_count, &reord, &flag);
-
+                               /* ...but better entrypoint exists! */
                                skb = tcp_write_queue_next(sk, tp->highest_sack);
                                fack_count = tp->fackets_out;
                                cache++;