]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TCP]: SACK fastpath did override adjusted fackets_out
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Tue, 3 Jul 2007 05:07:22 +0000 (22:07 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 11 Jul 2007 05:16:24 +0000 (22:16 -0700)
Do same adjustment to SACK fastpath counters provided that
they're valid.

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

index 53232dd6fb48af5a9c4f5d2373a1630936bb7980..20aea1595c4daab9f61991792cd56a4877180276 100644 (file)
@@ -699,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;
+                       }
                }
        }