Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5273206pxb; Wed, 26 Jan 2022 08:22:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxH2Uz62UMELFXP4VpR9TmjsMwzjJ3/pkSxbz/gx0tyhKHay64pWjN8aoxAFgMgrAZudK7v X-Received: by 2002:a17:906:6082:: with SMTP id t2mr20160024ejj.710.1643214136697; Wed, 26 Jan 2022 08:22:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643214136; cv=none; d=google.com; s=arc-20160816; b=rhK9XpshpE+uPQkXkhF9tWFy9y2aAr20LOWaKp+LkjOuSakOjJF72AldFPv8aleB9P yNCFFCE2wlnstbncdRxqMOnhpCW6gNX4Y6dIKh3bb6rziJI+CzfkPpT33av8vnnGqg16 MK0cHTFrMM+Oa4QKdz9U8PGHZTUfGHAE4sc0Uvlo6UzARGs1bnHNpcB/qnU4PFTkt0d3 uqsJSsxKfrKF4N6O9gWNagd73dxaP8oHMwxqjqMVFGlM2+CpueghrjOB9SQsrXvg7AJK GNucpgEnA7TYAEmZa2zp+hfZAhJuLflbVLVG4EPwudlcfKPAoD7vPPZ0Xvme9nHRsVyT 9+SA== 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=jMQbxA1zAXJvdF6Vkunl7me5oxpLLXhPxK0QysU74y4=; b=BgeN0l0PYVCDG96ivmNyW7+1HXidoMfkDwXlmk0X3RNKWabvV1qSykvFum8A/FiAy5 kjWOZKpkxlTSxTJq+6f0qp26JkUnKdZDVI/AJoLRWWcmknmLKOqGTxxWjlVa5Jbo7y0J 8qzwMfb3ybuAcEwmQwROMypi38xOjzY+OYiIcq/StuRiXJLDhoP4WKMi2a1SnfDHUdXH 8Xt7gJl5+qrfoMDtnGSu1QfDq/FU1bHcWFM/9t4Q+Go8oG2AI46kIeHSURxqquEycXkF jVYyavL5P8Yna6OUZ7CsZ1JlcdPYXLu4aFlllXtcfrhAlcds6/qhMb33gReMzPepW1yK YF1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C7SAjoif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id b26si5997849ejl.805.2022.01.26.08.21.51; Wed, 26 Jan 2022 08:22:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C7SAjoif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S236523AbiAZCsN (ORCPT + 99 others); Tue, 25 Jan 2022 21:48:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236514AbiAZCsM (ORCPT ); Tue, 25 Jan 2022 21:48:12 -0500 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 0C210C06161C; Tue, 25 Jan 2022 18:48:12 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id c24so64561746edy.4; Tue, 25 Jan 2022 18:48:11 -0800 (PST) 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=jMQbxA1zAXJvdF6Vkunl7me5oxpLLXhPxK0QysU74y4=; b=C7SAjoifpI9UVWdAdd/fIp3n+iMbRLlMgQq39cANxl3YXlfWjIJYvtRY4i0b5ipJTB MJI9CAESZKmtZ+lQW+QnhHsyGk/aN9dBMhuAJIySKyQvpIojF1etZSOm2o+ybVWwt9mK MDmmXZHQc5w3yCEDOJG2rbDVeBkSbAKoAnVWtsxPRdHrAZQQdpIKY5mUjk1LsnL0U5lF JVcvD/yYZyBG6olTTx02RSBDYHr3KiOSCpMcc9j8QqwmLPqmuIV5GxQqKTFWr1MCORyR aDqjwwREJDRN11bCEJ1wYnP4kBhAeWNNYwrtrUSiv5KX5CxmFxM2AYyBpE602IkLQJvS ra2Q== 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=jMQbxA1zAXJvdF6Vkunl7me5oxpLLXhPxK0QysU74y4=; b=TVd/jEKqeR8A+94jgdQB+bi/loRFxaaUHxF91HO3H/CrDmfOdqh0C7CjHSdr5hZ3q6 Ofd6i6iLWF7zI4uVhoFWzL5qOlM1PDYcCl+phFsVOSSIbm/KMJC5TtX0j5S1V+lF2CkK s0VsYFhtrTua5Z4BWHooMBT2pbRBV19WLAZnoQVNzyFfoZa7QwZKUn1hoEZ0P5NrNBBQ 4Bz9T4A45w9pQRsChzmm4NlITxGKBDGMY/iHlAUXmoAEY9ECThzirlnGz65/ShlCcuLa hKgC3WYtrIt683m4KVLtp9RojzGoEK0YtD5D3mtivNa0c2xnVYiUabrY5H+abDknSQT/ dEbA== X-Gm-Message-State: AOAM532Mlgodty59FFd507NxCRjMJ0CI9HN8kaa9CxUdNpqsj2CYL6bA YEXFAr/64pHL/6VbpYX4zMyP49j2mf18jHI4CcvCFiZiLyk= X-Received: by 2002:a05:6402:c8c:: with SMTP id cm12mr22722736edb.78.1643165290523; Tue, 25 Jan 2022 18:48:10 -0800 (PST) MIME-Version: 1.0 References: <20220124131538.1453657-1-imagedong@tencent.com> <20220124131538.1453657-6-imagedong@tencent.com> <308b88bf-7874-4b04-47f7-51203fef4128@gmail.com> In-Reply-To: <308b88bf-7874-4b04-47f7-51203fef4128@gmail.com> From: Menglong Dong Date: Wed, 26 Jan 2022 10:43:42 +0800 Message-ID: Subject: Re: [PATCH net-next 5/6] net: udp: use kfree_skb_reason() in udp_queue_rcv_one_skb() To: David Ahern Cc: Jakub Kicinski , Steven Rostedt , mingo@redhat.com, David Miller , Hideaki YOSHIFUJI , David Ahern , pablo@netfilter.org, kadlec@netfilter.org, Florian Westphal , Menglong Dong , Eric Dumazet , alobakin@pm.me, paulb@nvidia.com, Paolo Abeni , talalahmad@google.com, haokexin@gmail.com, Kees Cook , memxor@gmail.com, LKML , netdev , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, Cong Wang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 10:25 AM David Ahern wrote: > > On 1/24/22 6:15 AM, menglong8.dong@gmail.com wrote: > > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h > > index 603f77ef2170..dd64a4f2ff1d 100644 > > --- a/include/linux/skbuff.h > > +++ b/include/linux/skbuff.h > > @@ -330,6 +330,7 @@ enum skb_drop_reason { > > SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST, > > SKB_DROP_REASON_XFRM_POLICY, > > SKB_DROP_REASON_IP_NOPROTO, > > + SKB_DROP_REASON_UDP_FILTER, > > Is there really a need for a UDP and TCP version? why not just: > > /* dropped due to bpf filter on socket */ > SKB_DROP_REASON_SOCKET_FILTER > I realized it, but SKB_DROP_REASON_TCP_FILTER was already introduced before. Besides, I think maybe a SKB_DROP_REASON_L4_CSUM is enough for UDP/TCP/ICMP checksum error? > > SKB_DROP_REASON_MAX, > > }; > > >