aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index dde04afbe0a4..9d3438f6b52f 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -599,16 +599,21 @@ static inline int tcp_skb_mss(const struct sk_buff *skb)
599 return skb_shinfo(skb)->gso_size; 599 return skb_shinfo(skb)->gso_size;
600} 600}
601 601
602static inline void tcp_dec_pcount_approx(__u32 *count, 602static inline void tcp_dec_pcount_approx_int(__u32 *count, const int decr)
603 const struct sk_buff *skb)
604{ 603{
605 if (*count) { 604 if (*count) {
606 *count -= tcp_skb_pcount(skb); 605 *count -= decr;
607 if ((int)*count < 0) 606 if ((int)*count < 0)
608 *count = 0; 607 *count = 0;
609 } 608 }
610} 609}
611 610
611static inline void tcp_dec_pcount_approx(__u32 *count,
612 const struct sk_buff *skb)
613{
614 tcp_dec_pcount_approx_int(count, tcp_skb_pcount(skb));
615}
616
612static inline void tcp_packets_out_inc(struct sock *sk, 617static inline void tcp_packets_out_inc(struct sock *sk,
613 const struct sk_buff *skb) 618 const struct sk_buff *skb)
614{ 619{