Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp3054207rdb; Mon, 4 Dec 2023 15:42:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeyAeshmWqnLJRcdmStAR2BreFueYWM3e+AlBEnjbUPEp2sYPDx1/XgqH+BEWnvP4EHRsf X-Received: by 2002:a17:90b:30d2:b0:286:bda7:3eb9 with SMTP id hi18-20020a17090b30d200b00286bda73eb9mr326321pjb.98.1701733370607; Mon, 04 Dec 2023 15:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701733370; cv=none; d=google.com; s=arc-20160816; b=fc8/6dqvNNo0S3k2vTWMFYsMm42A+ma5Mlha4DoI/EHnTocDHYFpW84ZWb1uZgPAFa gu/aM52Bt4AZA0TiV0gNjUCV9i9ZEBose8prSZvj5C69Oj2n5gIDuOAgEe49rRrPX+QO +5NrLhLaKS3JInZQoln1wfAySjKVSftzJkMEfAC1tQ4phFz2j+6PoUVZd5KqEe8C5jEE F3aOqrcRvf+oeLAnuUpsjK4PFjZxwdXDayywlSEP52TlwBGVZSZgdIepY50GdOETFioc +QYCVRMmeAVJH8PuWdmictXhfTFWgnWP/9ofE1F/YIXXtc7WdhHXhzd/yiJgLvYyn10k w8mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=SNAMR8ZWVSQZ/2NChBGejZHuaFiOZmfXGcZ8gNFGqro=; fh=nr1oxofxNMuc4FOK/FK/R1NtYxWeosC5jGVErQwtv5I=; b=NS0stRwOMI/Ri4AX2CjuMg2yrYNey/Sf4C6Kfhm6gRS8vPtieMX+yZi7uzB+Vxign8 oypWZ8b7COEaUhDhiXHQQ2AD8Zfq6/MWshd5G3k2AyTj4zAUDokjSBFR0OV8hNZMFRou jC76NxvurPvq8zWV/c+P6h6nzbs7rZhH9mhc1ifY9lZbYRmA+SjDVQcrZWWhWlh2oX8M OQrElOn2C4dhZjEeaMEoYerlFSjfbFTOVn8pBzlXXqemhEpbBsPKGVovh2chu5lZTjxZ ddFd0I/IaVdGToyWAl5mm4KZot0LbfBc5LLI+rJrW09BHAZRUSF5SSLA/57IZgLYarOu GQQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="JXy/F/ex"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id w12-20020a17090aad4c00b002869aab8f55si3034180pjv.52.2023.12.04.15.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 15:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="JXy/F/ex"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0F27780BAA88; Mon, 4 Dec 2023 15:42:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234491AbjLDXm1 (ORCPT + 99 others); Mon, 4 Dec 2023 18:42:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbjLDXm0 (ORCPT ); Mon, 4 Dec 2023 18:42:26 -0500 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C11BFF; Mon, 4 Dec 2023 15:42:32 -0800 (PST) Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-db510605572so3332837276.0; Mon, 04 Dec 2023 15:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701733351; x=1702338151; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=SNAMR8ZWVSQZ/2NChBGejZHuaFiOZmfXGcZ8gNFGqro=; b=JXy/F/exlMH7LBJtL9xBwzNcGWlbI2d9pIyF7ubDPpIZHEJBKUi4f/ApevFAgTNBGL dAinbnfaN94ARU/50z2oeGjwpuxEJEA2jDAk8QTLuyoX/QGbgDd/RjVTWWtWclNG7Ms+ aYQ4h6sFxeoLvJ3+RvrIpz4Ewm5X1me8f5zX6qZ+l9QDyy2+UfI+l17ZX/JcDA2FJXn4 2LTeLAkqvfCGhd0/4NJMjI/FYAvLBLnSJZwzvuMtEDUD5UIk6Z9pObU4QTwhbpEeeDHO rxCtmpLMwwOkOqKfhz8f+huCwhxvhqCWPzlAAiNxuk0+lSL+m3ni2euG2JEmFex4/l3l 36BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701733351; x=1702338151; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=SNAMR8ZWVSQZ/2NChBGejZHuaFiOZmfXGcZ8gNFGqro=; b=GRJNEdNrbscGwov97NcMbg/SPPbOg7PuDE3LxWiaceX/uBkXDs8hkuzroL8CLf3ds+ aHZ+8eGSFQ1EqvjjmNC3eoauwq+UURKeOKNoG1hovhlVgH/ldY0y7IV72E9uxmFzwdsD fwYOiE3Rh/CSn/NTPjLp5lFkGIBKtE/n9DpYqBMrUxji2M1tQE9/1FE9vQlAfwHSdGB4 1Lb/2JTqOGU67V0lBENWkd2xqyXuYV8Q2HxmcLRP4bvkKeuvxu41/CnNCXoeS9urAVki /TyUo+o9Vi7zWmaYm5dhuddvb7gRz/eMVCAia5+dqddcpXVSMTGL1kI8nMM7aU3L92Fs MggQ== X-Gm-Message-State: AOJu0YyskhYX8/GxpQx1p/rZMI7kUGyFVYJrmzD4wv9wi3LeE02YZuos hD0RgwkpM7vBqtkGzG0oZTLIbup0iRQ= X-Received: by 2002:a25:d158:0:b0:db5:449c:5ebf with SMTP id i85-20020a25d158000000b00db5449c5ebfmr8411789ybg.38.1701733351438; Mon, 04 Dec 2023 15:42:31 -0800 (PST) Received: from localhost (114.66.194.35.bc.googleusercontent.com. [35.194.66.114]) by smtp.gmail.com with ESMTPSA id r13-20020a0ccc0d000000b0067a4a8f9456sm968321qvk.38.2023.12.04.15.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 15:42:30 -0800 (PST) Date: Mon, 04 Dec 2023 18:42:30 -0500 From: Willem de Bruijn To: Eric Dumazet , Yan Zhai Cc: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Jesper Brouer Message-ID: <656e63e6b166a_37b1262943c@willemb.c.googlers.com.notmuch> In-Reply-To: References: Subject: Re: [PATCH v4 net-next] packet: add a generic drop reason for receive Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 04 Dec 2023 15:42:48 -0800 (PST) Eric Dumazet wrote: > On Mon, Dec 4, 2023 at 8:33=E2=80=AFPM Yan Zhai wr= ote: > > > > Commit da37845fdce2 ("packet: uses kfree_skb() for errors.") switches= > > from consume_skb to kfree_skb to improve error handling. However, thi= s > > could bring a lot of noises when we monitor real packet drops in > > kfree_skb[1], because in tpacket_rcv or packet_rcv only packet clones= > > can be freed, not actual packets. > > > > Adding a generic drop reason to allow distinguish these "clone drops"= . > > > > [1]: https://lore.kernel.org/netdev/CABWYdi00L+O30Q=3DZah28QwZ_5RU-xc= xLFUK2Zj08A8MrLk9jzg@mail.gmail.com/ > > Fixes: da37845fdce2 ("packet: uses kfree_skb() for errors.") > > Suggested-by: Eric Dumazet > > Suggested-by: Willem de Bruijn > > Signed-off-by: Yan Zhai > > --- > = > Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn