Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1516405imm; Fri, 27 Jul 2018 20:04:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf+iRSVX1/O6HMN0+Xq7KW74FQMmQRuMros+HKvh7MEYaZA9I8s7sx98zW0uHWHmyEr1fXT X-Received: by 2002:a62:4909:: with SMTP id w9-v6mr9196546pfa.154.1532747045069; Fri, 27 Jul 2018 20:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532747045; cv=none; d=google.com; s=arc-20160816; b=dJ9pPrsgG0LtppwZFbvtQKnJvEofIw8juC9cX4uxdeQFFhb+CcYtfyhoIHL82nLY3U bj7wqjS26crt/4CycWlT9rXXxDLYAg0HbzyU6CuHS2AAKe4aZaGSVBv+N+VqE4aN5J23 bqoO95Rtnc51zuS6CBLZTnMnGfVmGBbGvnx1qFjruGWnF12jnXs8E43/YZeZyGQ7Fm5r Gf+dh7TODq+3nRoAYSnBixq3bJgYC8iEQoktwFXHlgPTjb4XbrZLAd7SEiV+umv9SlZW JGlb3oKB1st/txBXQfjPerk2Ppf0wzVqkNVVq9VX1XzYq9+WjBfzkI5kKuDEhAy5iHst +KoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=VORt7Vwp8kPRlVcENJKRTCkFAYCMncXQwnhWNINm5uI=; b=VqCJZnMs78GDBwBjTJkL8s8rVRSujRSWdt5omCAmAPWvDz/oXkBvdYnSlCci31L3Dy OGbq3B6DpvBVFzpg+/6Wxi58bA2pY8zL7oyWjKclS1rts9OBWePNxY4ex+4o0v3oUucy 2JpfAQzRrer9OH87Nwl6BCWDUbUspduEXrJjyafWWXSVrP9kAG5e8VErQ6/sppLr/x+W HKJjd0GwqCsFWVs/lmLhQSEobUN2jk9zPPI/9HHaQEiAbifDB0fN3Xjobr/15e1p7RYO 3NuQetaSZvf0KzS/dNBfkLxrZvi0y64LtH9LWK4JLDF5yTpWT1unwVhtYbRZI1PM9F5c jSzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GVV5DDAF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si4848134pld.189.2018.07.27.20.03.38; Fri, 27 Jul 2018 20:04:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GVV5DDAF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726003AbeG1E1C (ORCPT + 99 others); Sat, 28 Jul 2018 00:27:02 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42835 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbeG1E1C (ORCPT ); Sat, 28 Jul 2018 00:27:02 -0400 Received: by mail-pg1-f194.google.com with SMTP id y4-v6so4232931pgp.9; Fri, 27 Jul 2018 20:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=VORt7Vwp8kPRlVcENJKRTCkFAYCMncXQwnhWNINm5uI=; b=GVV5DDAFXeA09yi01EiKb2xUMVIjbPeGhkL4BrsIU8qMgVMHpvLyIKqhMzLQFdruRD Eqs0LBMiIQzouAhXOVkHnahzrQdUDjF5h1N0LswMUgp/U6dh0BogCrW1tjcD1YjbEuxq p9m2/HIFtugmVED0vmaAktYa52Y9Q3IvTCaI21KSemGTMJWb2e1txMv8Efm/+Oe/WzJT F6U/w4TROuz/s9jO0960rbByswA4lbZeiFPgEyr6M09F8VnC2i0j3057n24nP8xphe8C JeCo5W1aCdqr3hxyOWmjD11YoG4DJxTlqgYN3mVgTJeH/gJyjnZD9c4Y2oooiQn5yCHK CO1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VORt7Vwp8kPRlVcENJKRTCkFAYCMncXQwnhWNINm5uI=; b=OcalikQbyGHOsPKbbqj3hN7pEamQwieOtonttvEus//SC2V/V90CeHV8knyoO0hDtH ju2QBPKrORjnhCZCLi8VI65DessZyZc2SRpcuaLiZFEBYG5+oSbFEAM4Yr59gYl48O1p fjLwZA9wg13x7D2xTOYEA0DnZ49FUK3qNs54oIvTpZCecABu3R4RZ6IixCplcL9YAlXm u2U5xB2Gi4jK04vZUl6BA6Xb0psEw6g6OvC0GM26srBgjqhrxMrPYHIYZXTnLCeCA753 J5HpArqp9MbgyNat9AWoj/R8Tpdz/wew5j2fwWCZuDM7nQJ4DLGZ/Gg5FDaKFqV2wiGE Bb5A== X-Gm-Message-State: AOUpUlGeIKfNYVrEB5Zfu2pznRv9xYhMyA/1kH+aFtVQh+xtQ3+gbU6m mobYnTcOWXxqSyToiGJFirc= X-Received: by 2002:a62:c1:: with SMTP id 184-v6mr9159922pfa.100.1532746937729; Fri, 27 Jul 2018 20:02:17 -0700 (PDT) Received: from bogon.didichuxing.com ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id z10-v6sm7329196pfh.83.2018.07.27.20.02.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 20:02:16 -0700 (PDT) From: Yafang Shao To: edumazet@google.com, davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse Date: Sat, 28 Jul 2018 11:01:39 +0800 Message-Id: <1532746900-11710-1-git-send-email-laoar.shao@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When this SKB is dropped, we should add the counter sk_drops. That could help us better tracking this behavior. Signed-off-by: Yafang Shao --- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index d51fa35..90f83eb 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4802,7 +4802,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb, else rb_erase(&skb->rbnode, root); - __kfree_skb(skb); + tcp_drop(sk, skb); NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPRCVCOLLAPSED); return next; -- 1.8.3.1