aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2017-09-18 14:05:16 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-18 20:26:11 -0400
commit4c7124413aa759b8ea0b90cd39177e525396e662 (patch)
tree37fe674a307b1674450dc3e2822d0885535beebb /net/ipv4/tcp_output.c
parent582db7e0c4c2fc5bb4f932f268035883385e3692 (diff)
tcp: remove two unused functions
remove tcp_may_send_now and tcp_snd_test that are no longer used Fixes: 840a3cbe8969 ("tcp: remove forward retransmit feature") Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 1c839c99114c..517d737059d1 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1806,40 +1806,6 @@ static bool tcp_snd_wnd_test(const struct tcp_sock *tp,
1806 return !after(end_seq, tcp_wnd_end(tp)); 1806 return !after(end_seq, tcp_wnd_end(tp));
1807} 1807}
1808 1808
1809/* This checks if the data bearing packet SKB (usually tcp_send_head(sk))
1810 * should be put on the wire right now. If so, it returns the number of
1811 * packets allowed by the congestion window.
1812 */
1813static unsigned int tcp_snd_test(const struct sock *sk, struct sk_buff *skb,
1814 unsigned int cur_mss, int nonagle)
1815{
1816 const struct tcp_sock *tp = tcp_sk(sk);
1817 unsigned int cwnd_quota;
1818
1819 tcp_init_tso_segs(skb, cur_mss);
1820
1821 if (!tcp_nagle_test(tp, skb, cur_mss, nonagle))
1822 return 0;
1823
1824 cwnd_quota = tcp_cwnd_test(tp, skb);
1825 if (cwnd_quota && !tcp_snd_wnd_test(tp, skb, cur_mss))
1826 cwnd_quota = 0;
1827
1828 return cwnd_quota;
1829}
1830
1831/* Test if sending is allowed right now. */
1832bool tcp_may_send_now(struct sock *sk)
1833{
1834 const struct tcp_sock *tp = tcp_sk(sk);
1835 struct sk_buff *skb = tcp_send_head(sk);
1836
1837 return skb &&
1838 tcp_snd_test(sk, skb, tcp_current_mss(sk),
1839 (tcp_skb_is_last(sk, skb) ?
1840 tp->nonagle : TCP_NAGLE_PUSH));
1841}
1842
1843/* Trim TSO SKB to LEN bytes, put the remaining data into a new packet 1809/* Trim TSO SKB to LEN bytes, put the remaining data into a new packet
1844 * which is put after SKB on the list. It is very much like 1810 * which is put after SKB on the list. It is very much like
1845 * tcp_fragment() except that it may make several kinds of assumptions 1811 * tcp_fragment() except that it may make several kinds of assumptions