Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=539d243fdd7900fa5a544c7c154dc3ddf627e840
Commit:     539d243fdd7900fa5a544c7c154dc3ddf627e840
Parent:     9bff40fda015c4d0b57b444626cdcbf66066dbe7
Author:     Ilpo Järvinen <[EMAIL PROTECTED]>
AuthorDate: Sun May 27 02:03:20 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:47:53 2007 -0700

    [TCP]: Access to highest_sack obsoletes forward_cnt_hint
    
    In addition, added a reference about the purpose of the loop.
    
    Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/linux/tcp.h   |    1 -
 net/ipv4/tcp_output.c |   23 +++++++++--------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index c072f88..d647343 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -346,7 +346,6 @@ struct tcp_sock {
        int     fastpath_cnt_hint;
        int     lost_cnt_hint;
        int     retransmit_cnt_hint;
-       int     forward_cnt_hint;
 
        u16     advmss;         /* Advertised MSS                       */
        u16     prior_ssthresh; /* ssthresh saved at recovery start     */
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 666d8a5..b11025e 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1945,33 +1945,28 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
         * and retransmission... Both ways have their merits...
         *
         * For now we do not retransmit anything, while we have some new
-        * segments to send.
+        * segments to send. In the other cases, follow rule 3 for
+        * NextSeg() specified in RFC3517.
         */
 
        if (tcp_may_send_now(sk))
                return;
 
-       if (tp->forward_skb_hint) {
+       /* If nothing is SACKed, highest_sack in the loop won't be valid */
+       if (!tp->sacked_out)
+               return;
+
+       if (tp->forward_skb_hint)
                skb = tp->forward_skb_hint;
-               packet_cnt = tp->forward_cnt_hint;
-       } else{
+       else
                skb = tcp_write_queue_head(sk);
-               packet_cnt = 0;
-       }
 
        tcp_for_write_queue_from(skb, sk) {
                if (skb == tcp_send_head(sk))
                        break;
-               tp->forward_cnt_hint = packet_cnt;
                tp->forward_skb_hint = skb;
 
-               /* Similar to the retransmit loop above we
-                * can pretend that the retransmitted SKB
-                * we send out here will be composed of one
-                * real MSS sized packet because tcp_retransmit_skb()
-                * will fragment it if necessary.
-                */
-               if (++packet_cnt > tp->fackets_out)
+               if (after(TCP_SKB_CB(skb)->seq, tp->highest_sack))
                        break;
 
                if (tcp_packets_in_flight(tp) >= tp->snd_cwnd)
-
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