Skip to content

Commit 4c71244

Browse files
yuchungchengdavem330
authored andcommitted
tcp: remove two unused functions
remove tcp_may_send_now and tcp_snd_test that are no longer used Fixes: 840a3cb ("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>
1 parent 582db7e commit 4c71244

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

include/net/tcp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,6 @@ u32 tcp_tso_autosize(const struct sock *sk, unsigned int mss_now,
544544
int min_tso_segs);
545545
void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
546546
int nonagle);
547-
bool tcp_may_send_now(struct sock *sk);
548547
int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
549548
int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
550549
void tcp_retransmit_timer(struct sock *sk);

net/ipv4/tcp_output.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,40 +1806,6 @@ static bool tcp_snd_wnd_test(const struct tcp_sock *tp,
18061806
return !after(end_seq, tcp_wnd_end(tp));
18071807
}
18081808

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-
*/
1813-
static 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. */
1832-
bool 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-
18431809
/* Trim TSO SKB to LEN bytes, put the remaining data into a new packet
18441810
* which is put after SKB on the list. It is very much like
18451811
* tcp_fragment() except that it may make several kinds of assumptions

0 commit comments

Comments
 (0)