Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp92619iog; Sun, 12 Jun 2022 20:06:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkmV5zawmtSJt7KgDhOBXKINt11X77HF/kOD2zFLv4WqX84vQ+DEjV3NmmcvK0lywXmBhq X-Received: by 2002:a17:902:ab05:b0:164:21:6802 with SMTP id ik5-20020a170902ab0500b0016400216802mr56054909plb.56.1655089574007; Sun, 12 Jun 2022 20:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655089574; cv=none; d=google.com; s=arc-20160816; b=enCvm7Ey8KiM4RQmXAlgBOOxUwBy4Je6sTaxscbvyV72nODjwPOn4pzdRJ00KbWYQL XZHVQD+bvssGyK9edts3T1oEJAfktJGDayv69lKoKcfnvS1BwPXD81sGkVIXSTcG7m91 04k7uXfNvzyv7AtyFolrijqCMy0t2zALM8jvH/pu4+HIyIfL9tmqQ8V9TXsrwmlSogWi FReN5v+6VJQr5TOglYrQ41Th0YpeaQF5rw5M6v+hl1bEhse4C6ZLk9uEqK3SGY1Nmbhd CwlTcs22NzmkXHnl0ulKqmSIPQcFTyxsUFJpAipYNxQXo7RqY34roRBeJadkmQl6U3/r JZKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sUZpw0LopGjc0FjmXPxeWU9L6hvwiZttSZ8ZRDX50kI=; b=oSToJg2VwaCYZcLlIBHVHdj6MH4cOQilaVtaJOC3sLD1P/Dh9Ss43PULj4Xo6YpiVh S4V5ULIZ5FEXbhqwqsfKYKIM3KHQ5yoQ8wkY8nXDCal4D0+Z2bgSzM28xz3sqWy+3lZK QbmipmJdYvGBegbBXRdF4nQ3pi5nfaW3YwquVnvpEJI8DUkvNFIx/4gZ+eZqGgxzLT3B kuwQl+K0ACSLT6g8WmE+49Nj9JdzJ6Ji6rKL2zmkQ0U6v3m1JO1Xg1gGovAFJSVY8EDu A0ZD2Zp2l5b/evvsGmKmqpQuXmjyXsRCuguVtq5vyDj+KWCA+40cWvC3cMJYrSLgcWAk +Nlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TpFDyiS2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020a056a00080d00b00518947dd9e9si8697188pfk.326.2022.06.12.20.06.02; Sun, 12 Jun 2022 20:06:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TpFDyiS2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230125AbiFMCnm (ORCPT + 99 others); Sun, 12 Jun 2022 22:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231194AbiFMCnj (ORCPT ); Sun, 12 Jun 2022 22:43:39 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA6D63337F; Sun, 12 Jun 2022 19:43:37 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id b8so5313344edj.11; Sun, 12 Jun 2022 19:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sUZpw0LopGjc0FjmXPxeWU9L6hvwiZttSZ8ZRDX50kI=; b=TpFDyiS2s1I3InqSYo4+CxTLgKRw9ZSzvWWVldgOy8MQhrsa3g5q9Ba8Xm53N8R4mz rS1Jy8ogN814wmB4ML3WYL3OFeA61dB1s+z1NRIJRrleQPUnvBDeuemygYSEx4f4uP8A OGOeFtUtiAc1vSQeng+Fazaqigh6JB4zwXQynQBhJWGXNbhLkRWeJBH6o8lTK3FlWYbl 0ezDUct+wHCTcJMikPShyZZ4iD7gcvFMFREvBahPYlNo7EtnDj6YQyA8TfCxNrDEyRK7 X36eUtMTZCMD0DSpf83VdQD+2Je9I0/rm5BsOoEiuRtae9Pbo1ZG1AlpvxR3QNoLnxNh 9/8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sUZpw0LopGjc0FjmXPxeWU9L6hvwiZttSZ8ZRDX50kI=; b=PR1vyI47smMP015klPJpUO6leVk5AkQKQdpdU8shvqHNXoBCYYOzOno9NW35QablMF tgStaF0ngSnd11PZ3PM/eOgoDM1ZWlSx8xgORLnEyiVu8H0m/Fym7ZUzOicvvg/czIjj BcbLPVtrqcH0e5tZmcXBQpcrMM6ERKWw+M5kgCp/G3+f73LLLhUgzIjfE8Mjbj8Pi+7f 6OEk8YdF+RagHD+r+oYQM/eZpmHO1KcJaHoz0hUa8tPHU3YffFBAHNaY8bCUftBzVlKo +IRvSyWjXhevvLBSBfNm7FUl/Iy5uuRHCVOdCw3gn8pZWwq/G65QZCLYGS9AFfHnZsuQ rP7A== X-Gm-Message-State: AOAM5313J/oj6AXmlmucsgjN2gWF7z2UwXUCcGis3FY/bM1S8wDCcfRt rTlzkhxtz8UT8XHIrp7szxpNVsQQMhx7AN1gRcQ= X-Received: by 2002:a05:6402:709:b0:431:3a54:5cbb with SMTP id w9-20020a056402070900b004313a545cbbmr47506349edx.355.1655088216420; Sun, 12 Jun 2022 19:43:36 -0700 (PDT) MIME-Version: 1.0 References: <20220610034204.67901-1-imagedong@tencent.com> <20220610034204.67901-6-imagedong@tencent.com> In-Reply-To: From: Menglong Dong Date: Mon, 13 Jun 2022 10:43:25 +0800 Message-ID: Subject: Re: [PATCH net-next v3 5/9] net: tcp: make tcp_rcv_state_process() return drop reason To: Eric Dumazet Cc: Steven Rostedt , Ingo Molnar , David Miller , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Paolo Abeni , Menglong Dong , Martin KaFai Lau , Talal Ahmad , Kees Cook , Dongli Zhang , LKML , netdev , Jiang Biao , Hao Peng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 10, 2022 at 4:56 PM Eric Dumazet wrote: > > On Thu, Jun 9, 2022 at 8:45 PM wrote: > > > > From: Menglong Dong > > > > For now, the return value of tcp_rcv_state_process() is treated as bool. > > Therefore, we can make it return the reasons of the skb drops. > > > > Meanwhile, the return value of tcp_child_process() comes from > > tcp_rcv_state_process(), make it drop reasons by the way. > > > > The new drop reason SKB_DROP_REASON_TCP_LINGER is added for skb dropping > > out of TCP linger. > > > > Reviewed-by: Jiang Biao > > Reviewed-by: Hao Peng > > Signed-off-by: Menglong Dong > > v3: > > - instead SKB_DROP_REASON_TCP_ABORTONDATA with SKB_DROP_REASON_TCP_LINGER > > --- > > include/net/dropreason.h | 6 ++++++ > > include/net/tcp.h | 8 +++++--- > > net/ipv4/tcp_input.c | 36 ++++++++++++++++++++---------------- > > net/ipv4/tcp_ipv4.c | 20 +++++++++++++------- > > net/ipv4/tcp_minisocks.c | 11 ++++++----- > > net/ipv6/tcp_ipv6.c | 19 ++++++++++++------- > > 6 files changed, 62 insertions(+), 38 deletions(-) > > > > I am sorry, this patch is too invasive, and will make future bug fix > backports a real nightmare. Is there any advice to save this patch? Or should we just skip this part (for now) ? Thanks! Menglong Dong