Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1537360imm; Fri, 27 Jul 2018 20:36:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpegj4YWcgypbfzjjDGkfxJvwl9xIgULkhWco8/7Lf+NiRyMc86TBkT/HIfKU74jWzpyOTk2 X-Received: by 2002:a63:1811:: with SMTP id y17-v6mr8355176pgl.356.1532749014207; Fri, 27 Jul 2018 20:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532749014; cv=none; d=google.com; s=arc-20160816; b=cITQae9hHL+S3f2Fv2ejlznQLGGR0tnn1i8qhJIJHU9YGsoeFA5ruEVjQEROhqVaR+ OdqfyjuoY/HBP5HYHrdsMbjPfB2TOjJQ1samzFkHjZnz2V7qSxdacBVCiSOKBgij0KNN Qxy2NNDfo+dc6UDxxMLQPj93u1QgYOdWUBSAJvhpqhBLkVu0CMlGbReyAMLxdth7q1sO QWU68GAEHtkKrBhRT1OhJC9U6YYSmLLeeh4MdRQot7Wr3rhcc9ZElZXWtXHd/mzwmq9p 3p3t6y37+taFIWouLLAvqjDhvkxAIbxB4HnHy26xooj2PYsnuqokPmytwnJ6JnmtX89g gEww== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=D3amOF7G+ay6TIFFNc7aL9pg4uX0aWl+AajvVc2IoWI=; b=VCA1n6DOutWN3grcCnKH9OdmJhwdFYTahr9dWEiR92Tz40bLmS/gx4ecIICC+c7fOV taNvDLRzozynftDN3sc8tMuo+PKoyNHHELydR54M1AVg20QSQ7Zp59Hq7uhLaRSr/j2Z SYtBk11etVO/+4gjxFPviiFtRuDCkA30x+nCDMIJ2apSpe3EuJM7aFr7LRxpN1TUXYSB KsYWgw9aqcYOmmtq8oBWMnqvbrtZhsj46DLL+ZYOINu55YJ8f6B4jj5CuywVzKc+yrfp J+3IWh3x+FMNhDDq07NnoFslrgGZStllVRSHBkBZVrUOBVGd13G1bMfYeClDJ8QIXXHz dsjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YeeE2CLV; 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 b4-v6si5366856pgg.537.2018.07.27.20.36.25; Fri, 27 Jul 2018 20:36:54 -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=YeeE2CLV; 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 S1726065AbeG1E7x (ORCPT + 99 others); Sat, 28 Jul 2018 00:59:53 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:40121 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725888AbeG1E7x (ORCPT ); Sat, 28 Jul 2018 00:59:53 -0400 Received: by mail-it0-f67.google.com with SMTP id h23-v6so10038390ita.5; Fri, 27 Jul 2018 20:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=D3amOF7G+ay6TIFFNc7aL9pg4uX0aWl+AajvVc2IoWI=; b=YeeE2CLVhYL006t16hAZyBF8uj9XPH5sHwxZ13PBh6dPRMD2DPSceUJlt4cUGaCs6s 3suGtXf6EivuOhAmACXUomci0Vzwo+kcvRqCgj+wdKBBvWYtBCh03q3pxab2ZOgCWnZS m+ndHqStZcxoKXyhpYeh2Clo10MlbaHfbaThAr7vPXFua6vol80wU/T+c3GogFY5W2Wv VWokRWoCQMdVD1P6mjaE38y2pH0CEwEFieZQP9OFQUIDPHxwcXyEGLh4dXOX53Kalcr+ NpOh/hT4tePhXcy3I4GUJJaRikwqiaGx75iDOXtlAGnvGcqKfYQSW3OgW4T3xxyzkpml 2M5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=D3amOF7G+ay6TIFFNc7aL9pg4uX0aWl+AajvVc2IoWI=; b=EP7xBQ7KnBrNOhgJH+GzAii5V72Pk32+SBclor3qhe2K7PPcSBUrcn4egkMKn3FyVc G7fsvMqCxhUkZB4qbS/lzgX1EVnDn//veCoYroxnebbTLqcAYRqbPU6R0XDzCCGarC/d erkD+FLG6llQ7Hp5BideuEzb2gryKVYynX0MZ9+kqH/v71Zia8aEw9XPKlG19y1LLKfY fJGwn7xGq1GMIXHXudXmOUEXDwI6Qaab4P3V4yL6gtJnfyPD5QtWg1FY89jcqr0YMEQz 8+oJFSGmJ9EOL8xNgJ+M+VUBv/JIBYDqCwPZRBADT8D+DaRNsf77yA4EXIusRcbqbZaE NgxQ== X-Gm-Message-State: AOUpUlGcxEq/HqE96pqPCDYXZSALl4drkiUFwSdRbWtSHF51KGJw24iF YqEtnhqXnFwseA9e0MKyFPREhwNBWBQ+COCEdX3Ru7mnusY= X-Received: by 2002:a02:13c6:: with SMTP id 189-v6mr8786354jaz.50.1532748903255; Fri, 27 Jul 2018 20:35:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:7a47:0:0:0:0:0 with HTTP; Fri, 27 Jul 2018 20:34:22 -0700 (PDT) In-Reply-To: References: <1532746900-11710-1-git-send-email-laoar.shao@gmail.com> From: Yafang Shao Date: Sat, 28 Jul 2018 11:34:22 +0800 Message-ID: Subject: Re: [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse To: Eric Dumazet 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 Sat, Jul 28, 2018 at 11:06 AM, Eric Dumazet wrote: > 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. So what about LINUX_MIB_TCPOFOMERGE ? Regarding LINUX_MIB_TCPOFOMERGE, a skb is already covered by another skb, is that dropping the packet or simply lowering the memory overhead ? Thanks Yafang