Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9d86585dc6c9265aa373c7036458fe8aa7627c6
Commit:     b9d86585dc6c9265aa373c7036458fe8aa7627c6
Parent:     c0ef877b2c9f543e9fb7953bfe1a0cd3a4eae362
Author:     Ilpo Järvinen <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 15 19:33:31 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:54:01 2008 -0800

    [TCP]: Move !in_sack test earlier in sacktag & reorganize if()s
    
    All intermediate conditions include it already, make them
    simpler as well.
    
    Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/tcp_input.c |   31 ++++++++++++++-----------------
 1 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b39f0d8..901240f 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1406,28 +1406,25 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff 
*ack_skb, u32 prior_snd_
                        if (unlikely(in_sack < 0))
                                break;
 
+                       if (!in_sack) {
+                               fack_count += tcp_skb_pcount(skb);
+                               continue;
+                       }
+
                        sacked = TCP_SKB_CB(skb)->sacked;
 
                        /* Account D-SACK for retransmitted packet. */
-                       if ((dup_sack && in_sack) &&
-                           (sacked & TCPCB_RETRANS) &&
-                           after(TCP_SKB_CB(skb)->end_seq, tp->undo_marker))
-                               tp->undo_retrans--;
-
-                       /* The frame is ACKed. */
-                       if (!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) {
-                               if (sacked&TCPCB_RETRANS) {
-                                       if ((dup_sack && in_sack) &&
-                                           (sacked&TCPCB_SACKED_ACKED))
-                                               reord = min(fack_count, reord);
-                               }
-
-                               /* Nothing to do; acked frame is about to be 
dropped. */
-                               fack_count += tcp_skb_pcount(skb);
-                               continue;
+                       if (dup_sack && (sacked & TCPCB_RETRANS)) {
+                               if (after(TCP_SKB_CB(skb)->end_seq, 
tp->undo_marker))
+                                       tp->undo_retrans--;
+                               if (!after(TCP_SKB_CB(skb)->end_seq, 
tp->snd_una) &&
+                                   (sacked & TCPCB_SACKED_ACKED))
+                                       reord = min(fack_count, reord);
                        }
 
-                       if (!in_sack) {
+
+                       /* Nothing to do; acked frame is about to be dropped 
(was ACKed). */
+                       if (!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) {
                                fack_count += tcp_skb_pcount(skb);
                                continue;
                        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to