]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_output.c
[TCP]: Allow minimum RTO to be configurable via routing metrics.
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_output.c
index 0faacf9c419d5a888c8578d15e3f3c948edfb0b9..666d8a58d14a3d573f11963de87773f25201d573 100644 (file)
@@ -40,7 +40,6 @@
 
 #include <linux/compiler.h>
 #include <linux/module.h>
-#include <linux/smp_lock.h>
 
 /* People can turn this off for buggy TCP's found in printers etc. */
 int sysctl_tcp_retrans_collapse __read_mostly = 1;
@@ -700,6 +699,14 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
                        tp->fackets_out -= diff;
                        if ((int)tp->fackets_out < 0)
                                tp->fackets_out = 0;
+                       /* SACK fastpath might overwrite it unless dealt with */
+                       if (tp->fastpath_skb_hint != NULL &&
+                           after(TCP_SKB_CB(tp->fastpath_skb_hint)->seq,
+                                 TCP_SKB_CB(skb)->seq)) {
+                               tp->fastpath_cnt_hint -= diff;
+                               if ((int)tp->fastpath_cnt_hint < 0)
+                                       tp->fastpath_cnt_hint = 0;
+                       }
                }
        }
 
@@ -1608,7 +1615,7 @@ u32 __tcp_select_window(struct sock *sk)
                if (window <= free_space - mss || window > free_space)
                        window = (free_space/mss)*mss;
                else if (mss == full_space &&
-                        free_space > window + full_space/2)
+                        free_space > window + full_space/2)
                        window = free_space;
        }