diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-04-01 19:15:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-02 19:31:44 -0400 |
commit | 797108d134a91afca9fa59c572336b279bc66afb (patch) | |
tree | 0355a88f43e16448e0126f51d7be66d953152fd5 /include | |
parent | 0de8ca597d7b449e9e7ce7af138944acf06c8f05 (diff) |
tcp: add helper for counter tweaking due mid-wq change
We need full-scale adjustment to fix a TCP miscount in the next
patch, so just move it into a helper and call for that from the
other places.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/tcp.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index e54c76d75495..1b94b9bfe2dc 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -616,21 +616,6 @@ static inline int tcp_skb_mss(const struct sk_buff *skb) | |||
616 | return skb_shinfo(skb)->gso_size; | 616 | return skb_shinfo(skb)->gso_size; |
617 | } | 617 | } |
618 | 618 | ||
619 | static inline void tcp_dec_pcount_approx_int(__u32 *count, const int decr) | ||
620 | { | ||
621 | if (*count) { | ||
622 | *count -= decr; | ||
623 | if ((int)*count < 0) | ||
624 | *count = 0; | ||
625 | } | ||
626 | } | ||
627 | |||
628 | static inline void tcp_dec_pcount_approx(__u32 *count, | ||
629 | const struct sk_buff *skb) | ||
630 | { | ||
631 | tcp_dec_pcount_approx_int(count, tcp_skb_pcount(skb)); | ||
632 | } | ||
633 | |||
634 | /* Events passed to congestion control interface */ | 619 | /* Events passed to congestion control interface */ |
635 | enum tcp_ca_event { | 620 | enum tcp_ca_event { |
636 | CA_EVENT_TX_START, /* first transmit when no packets in flight */ | 621 | CA_EVENT_TX_START, /* first transmit when no packets in flight */ |