Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1190966iol; Fri, 10 Jun 2022 02:10:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh4uRZEVEz0cZ7pjKiHsOOYvYMfQcMEYhnKjn4BG0xyCGIIsxX2v82RiuPdxSFRa1LjwEz X-Received: by 2002:a17:906:5053:b0:70d:a0cc:b3fd with SMTP id e19-20020a170906505300b0070da0ccb3fdmr33989268ejk.162.1654852245343; Fri, 10 Jun 2022 02:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654852245; cv=none; d=google.com; s=arc-20160816; b=xrnnq/ZqdhAtImrp3gHsUKH0CBlE46VebU5UBZx3byqzlQC/02uCjH/GYPRT8rOSVa 9pvWkHKtVXKe9HI5SKGN30uitgKbXfnZJFSu8PFn0Q987/f5/MK0WnLJhqRkTSc6hwDH t4/7YCWI2UOmAWTz8LWp73ms3DeCjqFOh4csSsRaKBa66BPXWcJ3fBpLOSZ2s9vcb6N5 2n9CkeVowx5SYaOS3Um6m4OONdAfbIBYS7b5M7Bfm0woI6bzCxyfWWmHMTGFXrkAMTmX bsAri8MoSz3/3XU4bEiIz9qjXyfZrZY4wiBV+PTtoF6dne3MS8HBxZVVy2/4IK2+w+hH JQbg== 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=XH02qxttNt5dNPWDoERvNepSgpr1P+EkVPWfaAbgETY=; b=hVqaLx4i/GweC/+o6+LF1QFS0fvoFXTN76vFJ8P1vvIZbsOLdLJDT1d71qH9yk7F9c i1kM/cPtx2NHLLZFeca/YJ7lrAAbVfN4FsGir6Fcwcb1imSAWEJLI1hqTaKLRHCigFYf lhONBQuq8bsG8r+HIlG65WrFqIdxycUIW4T/kRewdHmrGl/BIEQ24aF7E75Kq+JdMk4n ZNX+PqWEipipYdEl5oF6Nzoq4gdh2AGG44ruEglJqSFIgGExZJI7VZDU/KY8Ost26kBy PQG91q0GI8F5430j2xajcjVkUXgAzYNNVTtcndV5iyLYo66pyUcGOEZe9cWHNP6gadoz 68TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=tUWPVWhq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a1709065d1200b00711d0bc2394si1589546ejt.892.2022.06.10.02.10.20; Fri, 10 Jun 2022 02:10:45 -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=@google.com header.s=20210112 header.b=tUWPVWhq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344054AbiFJI4n (ORCPT + 99 others); Fri, 10 Jun 2022 04:56:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237484AbiFJI4i (ORCPT ); Fri, 10 Jun 2022 04:56:38 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28181271A8B for ; Fri, 10 Jun 2022 01:56:38 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id y188so16459439ybe.11 for ; Fri, 10 Jun 2022 01:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XH02qxttNt5dNPWDoERvNepSgpr1P+EkVPWfaAbgETY=; b=tUWPVWhq26Egy5stSWqG3nEuB6M2CjvgLS+AKR9dzCYugVMqezBhPBxFLanSli7hDQ OBDQZKOAkEby39w28pgo3gEKoFaEXzTSSYTfRJwcX7X5VNm2C0tL7oEyDq0uYv2m8zFd 4lJo/wQHp0u5uthqP5rAcYh6HcIZ2j2ng4yqM2mQ+tSNaCy3JZmIbQ/mp4sBh/qTgJxm MKiD7nrswDfsUllIyFu7rQ3ZCgUWduTFSLyfB0q6FU1fLWo58Tw86uWCeR6SuY3yMF2q YTc+1gvKyUybI9brhua6UnGYNzicYj/VVBrgG0EkmzxunuLqnsqf/vKo3lhs0afxWRAP 7FwQ== 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=XH02qxttNt5dNPWDoERvNepSgpr1P+EkVPWfaAbgETY=; b=57keHqgpq6+aV1N0Ca6GVa4l1ZnLYt94yyWlfQfCmGakOvnlG2s/Y5k4FhVJw/kjT0 +hbemFPnQiSSHFnCszYaILXuabo5FPb2adkR5+0KbaPPKQeV5fwBqaPe/G2IRhU4gY05 EmsWrwoUrORNPCFIJ8++hYMroe1mjAjpxX9h3JunqfT+hEPns84QQ75ftd49h6eq0I7z /CQ9ItsbMDRn9xZeAWHmNBnX0/wzcyBx/ufoVOnegJclK/RdmEEh6byDnLHo9MfA4tvq m7oNO1Ka3XG6KuBorHc18mYzN83S8hXrtY4tGZX7uYwQjuUYkh1KPAPa6lVsW9tbvcwd K+zA== X-Gm-Message-State: AOAM531hz1FCZQDRc01zwhwQy29o4UODhoqjxvcpg8ib/1BgtNmNwNAN EAKX1SRd/7hpwcnTX+WYhheqQuqOEXHHDvZr1iPd7Q== X-Received: by 2002:a25:aa32:0:b0:65c:af6a:3502 with SMTP id s47-20020a25aa32000000b0065caf6a3502mr43818525ybi.598.1654851397036; Fri, 10 Jun 2022 01:56:37 -0700 (PDT) MIME-Version: 1.0 References: <20220610034204.67901-1-imagedong@tencent.com> <20220610034204.67901-6-imagedong@tencent.com> In-Reply-To: <20220610034204.67901-6-imagedong@tencent.com> From: Eric Dumazet Date: Fri, 10 Jun 2022 01:56:25 -0700 Message-ID: Subject: Re: [PATCH net-next v3 5/9] net: tcp: make tcp_rcv_state_process() return drop reason To: Menglong Dong 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=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 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.