Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d738cd8fca948e45d53120247cb7a5f5be3ca09e
Commit:     d738cd8fca948e45d53120247cb7a5f5be3ca09e
Parent:     d961db358f41033a8fc7b62948bc7cff1b4bb1fe
Author:     Ilpo Järvinen <[EMAIL PROTECTED]>
AuthorDate: Sat Mar 24 21:03:23 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:47:50 2007 -0700

    [TCP]: Add highest_sack seqno, points to globally highest SACK
    
    It is guaranteed to be valid only when !tp->sacked_out. In most
    cases this seqno is available in the last ACK but there is no
    guarantee for that. The new fast recovery loss marking algorithm
    needs this as entry point.
    
    Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/linux/tcp.h  |    2 ++
 net/ipv4/tcp_input.c |    8 +++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index c6b9f92..c072f88 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -333,6 +333,8 @@ struct tcp_sock {
 
        struct tcp_sack_block_wire recv_sack_cache[4];
 
+       u32     highest_sack;   /* Start seq of globally highest revd SACK 
(valid only in slowpath) */
+
        /* from STCP, retrans queue hinting */
        struct sk_buff* lost_skb_hint;
 
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index f893e90..813f204 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -979,8 +979,10 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff 
*ack_skb, u32 prior_snd_
        int i;
        int first_sack_index;
 
-       if (!tp->sacked_out)
+       if (!tp->sacked_out) {
                tp->fackets_out = 0;
+               tp->highest_sack = tp->snd_una;
+       }
        prior_fackets = tp->fackets_out;
 
        /* Check for D-SACK. */
@@ -1217,6 +1219,10 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff 
*ack_skb, u32 prior_snd_
 
                                if (fack_count > tp->fackets_out)
                                        tp->fackets_out = fack_count;
+
+                               if (after(TCP_SKB_CB(skb)->seq,
+                                   tp->highest_sack))
+                                       tp->highest_sack = TCP_SKB_CB(skb)->seq;
                        } else {
                                if (dup_sack && (sacked&TCPCB_RETRANS))
                                        reord = min(fack_count, reord);
-
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