Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2113117imm; Sat, 28 Jul 2018 09:30:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe1NesO362to8o3EIsuyDg7eaqxMZhk+D8bLg8rtYYio22o+x2Rl3MZzd5mrEWHu8UFCoLf X-Received: by 2002:a65:4888:: with SMTP id n8-v6mr10410694pgs.149.1532795406941; Sat, 28 Jul 2018 09:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532795406; cv=none; d=google.com; s=arc-20160816; b=EnLeRaON7lnHTLaKlcKhiMQ+Ql6FHSYYbv6C+dm0hEptHvdtfI68xub5zIIGepXNAu n3NX8LybxqocsEENqap9wnEa/m1LIwXhX2/H4cfxovtvV2dzb89lOJpPN3ZU60Mr4rul Kg3BpuHgzWEyzlQB1gaux8mdOazBX7f5BEDvp1xII5XC1LFCpusLXu4UerbLOY9VSTSm 8pXxtkArtCqA6GfNR09LeBbQMVUHT6apyDAlHqpoejMh/ynqpIvcuoqvcdAn0/q1oq12 ZbxsTuc3ggoWKXL/leuEHa9SLCyeN4TfPz9sHWw4hvGNcM5dHZ+FyRGgAAGVoVb27QL3 Sk3A== 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=7PwynDpToed+TUoMbg8D4UlLiZYVpuSwuwOqeSAmzho=; b=e0sGM8ury3OmgxlZVVVPq1465tNer1xahi2TLcwPwg7mybDJba9yWSHTHzb1pr3TzX r/HQ61uct84WiMy+toEuzKX3Jmsixmvz5Vl3Cj0cuggJtwe41XVTFix9Ip2seGZZlyIo 9STDmP7u8fuzdZ3uiKD5UXYe9D7r1eDxTPG8b+bVSbUFrWp/qXcofmVGv6BAQXSSM5F+ ISgWV6VsAnvHURevlk0ncP1P+CY8GUMAKfJwbtNHwNoAFY2ZfTyXEbGxbdtYD5dVzUeT SN2/t2BKtoFDaSLfDbdIsZLZ4cFkK08op/SyW7sGC7RjY2mqsR5aSQ+ht/Bf5QRKd9Jo SiFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=H7JZGVmi; 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 t8-v6si6418074pgl.620.2018.07.28.09.29.52; Sat, 28 Jul 2018 09:30:06 -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=H7JZGVmi; 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 S1729277AbeG1R4I (ORCPT + 99 others); Sat, 28 Jul 2018 13:56:08 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:35647 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729238AbeG1R4H (ORCPT ); Sat, 28 Jul 2018 13:56:07 -0400 Received: by mail-io0-f194.google.com with SMTP id w11-v6so6607295iob.2 for ; Sat, 28 Jul 2018 09:29:04 -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=7PwynDpToed+TUoMbg8D4UlLiZYVpuSwuwOqeSAmzho=; b=H7JZGVmiKpqn7Jb1D8OaiYLfgG3w6Csxs8QB8CwGsoB8NJVKzhkBRaZMS0NfMfADkF LJfmbDqMsh/zOD2yhnFiRTfMncVJIMCcdcvTZQg5q5GXvU+OATEU7yr6iS5fGbe/fH3+ pnHQcevlqazeF/7my2pJvmIuouC5hrE3rglhVN4X9rMyMAfOiTXaoX3IMlGTbX9DETi8 jbIeETer6Yur4+V+o6U3AkTKCY70W7bXu7w4V54ON59CqaNnisC4iRce8hUPRml9ZLqR 9+9WjwdAhmFYE69Ok4ylljok0N/QxoSmp+ydppf+LNXPZ8CGdbZi318SBdSB9fxM0Eeo x8Ug== 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=7PwynDpToed+TUoMbg8D4UlLiZYVpuSwuwOqeSAmzho=; b=iFyRNTMRfDQhUOyCBp9SBhgSDps73M9QCCuMA0yKhwKZkA3hhMr/3yT1/wpuqJfySI L5RY9DqJK4x0UlyAy39mIU76+hv37uX/Lo2DDaUwwpiGas2Q4l64e1ZV3rVHunjFuffR 1FJwdhknaVZn7/hO0yRHml3f1rTR4qIlvO4NtEhSXimGKIpqVOvjX9F8e5ZshKe/9tzZ gjlKowfH2RmCYkSH1hrF9cZajDfLMsZWjzlBPIBln4cyVYzzxqCLJn+wjFNV8Y2R2KpE GxSAJg44fmK/737RAjiZ9iyrLWpMXPYCr0YDt7u9e6KNW9NBWskz2jB8jwlJsm9xsiFi u/yA== X-Gm-Message-State: AOUpUlEUjOJThUugjO6dTJqTJ84wLSGO7tFyPH/nPnS/7oNVkFbq1N0R qNbtkvQEvNw4Wp/cDzg52MsZWjPhj+JQYHeS015rSg== X-Received: by 2002:a6b:f10f:: with SMTP id e15-v6mr8061747iog.271.1532795344151; Sat, 28 Jul 2018 09:29:04 -0700 (PDT) MIME-Version: 1.0 References: <1532746900-11710-1-git-send-email-laoar.shao@gmail.com> In-Reply-To: From: Eric Dumazet Date: Sat, 28 Jul 2018 09:28:52 -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 Sat, Jul 28, 2018 at 12:43 AM Yafang Shao wrote: > > On Sat, Jul 28, 2018 at 11:38 AM, Eric Dumazet wrote: > > On Fri, Jul 27, 2018 at 8:35 PM Yafang Shao wrote: > > > >> 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 ? > > > > What do you think ? > > > > If you receive two times the same payload, don't you have to drop one > > of the duplicate ? > > > > There is a a big difference between the two cases. > > If the drop caused some data lost (which may then cause retransmition > or something), then this is a really DROP. > While if the drop won't cause any data lost, meaning it is a > non-harmful behavior, I think it should not be defined as DROP. > This is my suggestion anyway. Sigh. We count drops, not because they are ' bad or something went wrong'. If TCP stack receives twice the same sequence (same payload), we _drop_ one of the duplicate, so we account for this event. When ' collapsing' we reorganize our own storage, not because we have to drop a payload, but for some memory pressure reason. We have specific SNMP counters to account for these, we do not want to pretend a packet was ' dropped' since it was not. If we have to _drop_ some packets, it is called Pruning, and we do properly account for these drops.