Skip to content

Commit

Permalink
[TCP]: SACK fastpath did override adjusted fackets_out
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Jul 11, 2007
1 parent 61cbc2f commit d041005
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit d041005

Please sign in to comment.