Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Eric Dumazet <eric.dumazet@gmail.com>
Subject: [PATCH net-next 1/5] tcp: get rid of tcp_check_send_head()
Date: Tue, 26 Feb 2019 09:49:09 -0800	[thread overview]
Message-ID: <20190226174913.18824-2-edumazet@google.com> (raw)
In-Reply-To: <20190226174913.18824-1-edumazet@google.com>

This helper is used only once, and its name is no longer relevant.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/net/tcp.h | 6 ------
 net/ipv4/tcp.c    | 3 ++-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index a6e0355921e1d0cf6df3bb20fba8b3d4e9d9ef08..813042c08dc5a7438279821890439b02490391d1 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1716,12 +1716,6 @@ static inline bool tcp_rtx_and_write_queues_empty(const struct sock *sk)
 	return tcp_rtx_queue_empty(sk) && tcp_write_queue_empty(sk);
 }
 
-static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked)
-{
-	if (tcp_write_queue_empty(sk))
-		tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
-}
-
 static inline void __tcp_add_write_queue_tail(struct sock *sk, struct sk_buff *skb)
 {
 	__skb_queue_tail(&sk->sk_write_queue, skb);
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 769508c75dce5a39bd78766d801ca01abb77f4bb..e2fa6eb9f81aa0244ea05d99e2870a3d9294673b 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1412,7 +1412,8 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
 		/* It is the one place in all of TCP, except connection
 		 * reset, where we can be unlinking the send_head.
 		 */
-		tcp_check_send_head(sk, skb);
+		if (tcp_write_queue_empty(sk))
+			tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
 		sk_wmem_free_skb(sk, skb);
 	}
 
-- 
2.21.0.rc2.261.ga7da99ff1b-goog


  reply	other threads:[~2019-02-26 17:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 17:49 [PATCH net-next 0/5] tcp: cleanups for linux-5.1 Eric Dumazet
2019-02-26 17:49 ` Eric Dumazet [this message]
2019-02-26 17:49 ` [PATCH net-next 2/5] tcp: get rid of __tcp_add_write_queue_tail() Eric Dumazet
2019-02-26 17:49 ` [PATCH net-next 3/5] tcp: convert tcp_md5_needed to static_branch API Eric Dumazet
2019-02-26 17:49 ` [PATCH net-next 4/5] tcp: use tcp_md5_needed for timewait sockets Eric Dumazet
2019-02-26 17:49 ` [PATCH net-next 5/5] tcp: remove tcp_queue argument from tso_fragment() Eric Dumazet
2019-02-26 21:16 ` [PATCH net-next 0/5] tcp: cleanups for linux-5.1 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190226174913.18824-2-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox