Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1519103imm; Fri, 27 Jul 2018 20:08:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf0tsvWqk/WQjC02dY67OO3LrVe6BMiXnSNtbbt8O9BCD7Kq/mbHBdd+tjQGkp0o3UiSebo X-Received: by 2002:a17:902:1e6:: with SMTP id b93-v6mr8306491plb.149.1532747285041; Fri, 27 Jul 2018 20:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532747285; cv=none; d=google.com; s=arc-20160816; b=dpz2wtBraDr5aYUMJxHDiP6/U0+1i0c6OUeibV2NblokjYsKMn9qZzgSo7ShBq9+Pj 2mwa0UOxKMrqgC2u4gaoV2OtW9NG6W4dZDrbfnvtOQP5wf2OadE2unXgGFlXJTK76lNV 5J4F1dwPBYArFRH21Q6Gd+XkA9NOfcGP4rOaTuIxJFcwRF+GqygDdt2Kl+jN8wjKcKJb BmjpjWyHPMrp8J//zUlHEdfHvgPLELJ2OoKh1nZoZRgmnjPiW9SLC1q1ON9KUhg08PTE ejbPv6Rc0ygrNa5oTZEK/3ReO36r204tfTkH2KhY9HhAPh2SRdq6TI4l2JqyKhUhLDG/ 2pzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=onm8mXfE6xFzwHbybl1j+WNjU0RRlLK7PzLbBMjpozA=; b=UUvMDEisWvWWW1QNHvFkvIywM9HgS8r3aLqS73W3pHf/95XkJ77Db+SqZJvX66l4KD npJJqBBBfdgLRaAs3ZiZxUCbAdPfKqoR77TuioME+X08l2dMEefPXpa+xpEECZ4AAHqH AiAUaRGUxN4EuDvlCOFKXNtRMKI61gDzek9ISS76vGTVYh+YywNwZDdh0z80yJN2uOS3 XPfxuOYQA6mT//Ar3MJhmCXBreHMB9pcU8yXoJnegZ6H54+Nzc+4c0R7hWGvpocIBlbE ApGah9AARASRdRFJIxV9NjBasp3d2fWtpkfIjiuIahNAa3hEIT4LINPT6yxo7RCzfFE6 sHmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CS35gKYs; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17-v6si5464567pgn.182.2018.07.27.20.07.49; Fri, 27 Jul 2018 20:08: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=@google.com header.s=20161025 header.b=CS35gKYs; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbeG1EbG (ORCPT + 99 others); Sat, 28 Jul 2018 00:31:06 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:34668 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725898AbeG1EbG (ORCPT ); Sat, 28 Jul 2018 00:31:06 -0400 Received: by mail-io0-f196.google.com with SMTP id l7-v6so5713018ioj.1 for ; Fri, 27 Jul 2018 20:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=onm8mXfE6xFzwHbybl1j+WNjU0RRlLK7PzLbBMjpozA=; b=CS35gKYsnyWsBpH2ijs9F3/aBFoYTpO3jqTesV1Znm99/PjWhvkBTk03gDAx94QYry YtJr/k1ZpZBIAK3wa51dIbSw5mUIpb1l/qA4QrbSyjrCTUz08yR2AOt+HKwvph37AbQ+ +6eS4ghnHKf1zti1/ctBaCzraAI7ewXaQH6OSUX+Gsw9yO4cdQVuNsnawZ1EX3vBbRHX ZeFliz2yJ42rVMFa1bwlUZnR/i8s+9GTaRy5+34Azlky026MJ8G0/2Ndd2ZEV73ooTT6 LERzy5/8k4wHipwLzaCQ0JIjWhTS5qbyTr0x7KH7MGKly5CNBiOK4/3q2NokfAusmEXP Ubbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=onm8mXfE6xFzwHbybl1j+WNjU0RRlLK7PzLbBMjpozA=; b=pfmKbhlsDzWDzFIQZNK0rje/WuQ9+jTVt3JvL/R7dBd06RqbAfUv649EireqCqggEr itynw206nyg0rAsklDHYnLpP/nijYIB7uT5Gd6Z84DAVZmKPaMset7YK6EmdBVeTk/sk 7xSvcoGFiaeRuTpaiaHu5/hp8GXMqIzgJjLXc+NSdXZDMpf285OjqR5tlkMn0bUJZV8M Y3Xce9sYH0qj9LolfljYYUcolUZjLdH90jgpRyUKYeeyl40soesky9KzsRyxDtEwlHZv RPGLDKQZ6KOuz3bdeLKwDC35voUxM8m8rfz94iP/KIgeRkZPeTl54rCrz+zMQ647K2bB aY7g== X-Gm-Message-State: AOUpUlE14jdl7u/fS8LPLvSgwqPiRKlULwnHEoRFyVPSafxUfOEnESOV nZRVBZQgPLeQlcIy2Rkzxw/hjOsLG6T/TkGXGnRVH9r+ X-Received: by 2002:a6b:825e:: with SMTP id e91-v6mr7088093iod.118.1532747180476; Fri, 27 Jul 2018 20:06:20 -0700 (PDT) MIME-Version: 1.0 References: <1532746900-11710-1-git-send-email-laoar.shao@gmail.com> In-Reply-To: <1532746900-11710-1-git-send-email-laoar.shao@gmail.com> From: Eric Dumazet Date: Fri, 27 Jul 2018 20:06:09 -0700 Message-ID: Subject: Re: [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse To: Yafang Shao Cc: David Miller , netdev , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 27, 2018 at 8:02 PM Yafang Shao wrote: > > 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); Absolutely not. We do not drop the packet, we have simply lowered the memory overhead.