diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-08-25 01:43:14 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:27 -0400 |
commit | e9144bd8da80f3136b23c615609798e371e885ac (patch) | |
tree | 4ca84a95f2dd7f2e4d49bc8f1868bdfee3deea82 | |
parent | 522400623e240ad134cb4101b1fddc3245d2a7ed (diff) |
[TCP]: Remove unnecessary wrapper tcp_packets_out_dec
Makes caller side more obvious, there's no need to have
a wrapper for this oneliner!
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/tcp.h | 6 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 0a4ed6e85c6f..66827177ae8b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -626,12 +626,6 @@ static inline void tcp_packets_out_inc(struct sock *sk, | |||
626 | inet_csk(sk)->icsk_rto, TCP_RTO_MAX); | 626 | inet_csk(sk)->icsk_rto, TCP_RTO_MAX); |
627 | } | 627 | } |
628 | 628 | ||
629 | static inline void tcp_packets_out_dec(struct tcp_sock *tp, | ||
630 | const struct sk_buff *skb) | ||
631 | { | ||
632 | tp->packets_out -= tcp_skb_pcount(skb); | ||
633 | } | ||
634 | |||
635 | /* Events passed to congestion control interface */ | 629 | /* Events passed to congestion control interface */ |
636 | enum tcp_ca_event { | 630 | enum tcp_ca_event { |
637 | CA_EVENT_TX_START, /* first transmit when no packets in flight */ | 631 | CA_EVENT_TX_START, /* first transmit when no packets in flight */ |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index faba9beb3613..593960d66ed9 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2569,7 +2569,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) | |||
2569 | last_ackt = skb->tstamp; | 2569 | last_ackt = skb->tstamp; |
2570 | } | 2570 | } |
2571 | tcp_dec_pcount_approx(&tp->fackets_out, skb); | 2571 | tcp_dec_pcount_approx(&tp->fackets_out, skb); |
2572 | tcp_packets_out_dec(tp, skb); | 2572 | tp->packets_out -= tcp_skb_pcount(skb); |
2573 | tcp_unlink_write_queue(skb, sk); | 2573 | tcp_unlink_write_queue(skb, sk); |
2574 | sk_stream_free_skb(sk, skb); | 2574 | sk_stream_free_skb(sk, skb); |
2575 | clear_all_retrans_hints(tp); | 2575 | clear_all_retrans_hints(tp); |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index a3679174e78a..1d65ce1b68d7 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1735,7 +1735,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m | |||
1735 | * it is better to underestimate fackets. | 1735 | * it is better to underestimate fackets. |
1736 | */ | 1736 | */ |
1737 | tcp_dec_pcount_approx(&tp->fackets_out, next_skb); | 1737 | tcp_dec_pcount_approx(&tp->fackets_out, next_skb); |
1738 | tcp_packets_out_dec(tp, next_skb); | 1738 | tp->packets_out -= tcp_skb_pcount(next_skb); |
1739 | sk_stream_free_skb(sk, next_skb); | 1739 | sk_stream_free_skb(sk, next_skb); |
1740 | } | 1740 | } |
1741 | } | 1741 | } |