From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09A4CC43381 for ; Tue, 26 Feb 2019 17:49:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCF8A2173C for ; Tue, 26 Feb 2019 17:49:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="pyT1P0vV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728762AbfBZRtW (ORCPT ); Tue, 26 Feb 2019 12:49:22 -0500 Received: from mail-oi1-f202.google.com ([209.85.167.202]:53056 "EHLO mail-oi1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727624AbfBZRtW (ORCPT ); Tue, 26 Feb 2019 12:49:22 -0500 Received: by mail-oi1-f202.google.com with SMTP id s18so5948079oie.19 for ; Tue, 26 Feb 2019 09:49:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=4PL2+jdXNR5F74wlWgFUMF1eCfb9WTGGx+ZZOY4j0kE=; b=pyT1P0vV4H0/6KHXV0H1jWjoQKyw9T2JEjZqUhlyOvY9QQ/D52aroS4EUT5RUklour HZZKUcmls1DG56ehclMGj6FY9v50b+LF8qQzS0SjC5ubfQCAHrijIBFPc3qqWd67msSg d4SV+kMoTnyoMcYiPAM1MUnj9K5rz4wzt7/rRS6lvhTVCc/SeIZWepkLFaMpyCUttQdT 8fLwOBl6koO7DJVEHZADqD9zwfsZ6UsAWSlK5ksDexQPtXQliU/4XTffGlqhOLgkw1Tw br1zevEdKOEQA0KAYNtYTDA01PwVhM47W0MYDYhPHYM3PkPSuXrZjZ711qRmNp7ZlBIo JgKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=4PL2+jdXNR5F74wlWgFUMF1eCfb9WTGGx+ZZOY4j0kE=; b=Ij3ooUZNfjbODHCVGz+LamcjkeE7t39yEs4UxP4KT3PD0B1jdADhHqYRCeF8i9kbBV BZuEgOMsNFJlohBbCygpapeJ0A/Z0V1NXVZ+0EcrPD35eAtUh4q9m0Ec9Gdn3/XMFRaq o5gmPFKW+JqKXI86ePC906UCaVq2tKWOFsDe8zXc63xEs7uO+R1Tgl/ERRJwHUomXa2H FwtNwiqNKrS5U4+aPGjl2amCIyiyHvZYZ8cAgkKCdFWUOZ1XJRgOKCfEPxe+LW+T9VHX Z6R9Hpjl550YtqF7IdYYFcmLHaBzEiKQLQ9pDJLztWZcujAQI7hQO82645Wswr6hPQe1 YVFQ== X-Gm-Message-State: AHQUAuZa947E24ZFVaeEU8G8q9D4atZxUcurnwe/rm3u0DGABUcsfbTI 0kjLb6lPoaXsKaICmblHOBIy/1aZ7SCO/A== X-Google-Smtp-Source: AHgI3IYJ44icZArSt5Wj2A/DBmWrmINFFsDx6lBHvJh+NqAZp3LPG794ABoC0hAPjrgDbQSLJBW0RHuUTH1EMA== X-Received: by 2002:a9d:6f98:: with SMTP id h24mr14700975otq.30.1551203361677; Tue, 26 Feb 2019 09:49:21 -0800 (PST) Date: Tue, 26 Feb 2019 09:49:09 -0800 In-Reply-To: <20190226174913.18824-1-edumazet@google.com> Message-Id: <20190226174913.18824-2-edumazet@google.com> Mime-Version: 1.0 References: <20190226174913.18824-1-edumazet@google.com> X-Mailer: git-send-email 2.21.0.rc2.261.ga7da99ff1b-goog Subject: [PATCH net-next 1/5] tcp: get rid of tcp_check_send_head() From: Eric Dumazet To: "David S . Miller" Cc: netdev , Eric Dumazet , Eric Dumazet Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This helper is used only once, and its name is no longer relevant. Signed-off-by: Eric Dumazet --- 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