Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1606148rdb; Sat, 2 Dec 2023 02:39:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGN8EvyylBq6OnAyxhadBtEqL5BVg8uqECw2klUuLA8hsj4HWQ0/lqN8nr2aipY20TkS1eo X-Received: by 2002:a05:6870:2401:b0:1fa:f001:aeaf with SMTP id n1-20020a056870240100b001faf001aeafmr1329797oap.38.1701513576954; Sat, 02 Dec 2023 02:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701513576; cv=none; d=google.com; s=arc-20160816; b=0/X8+bBKTZ2/dzy2ZAisfiAGRivioIZWW9Ze5ZecXJVQbzhenEPtFbkYBdepqsdNAZ 8f2jJhKHx9/qcnsmHT9KW6uUldJdA5vGMWpscB4AIqsjuLRIjtPR7ayAWOprG7D8ZdsK OeyCfJSIFcOyjwew66Df3AwN9uiYpBi1sJPaRT/yGbqr8AgNvqtb375LG4zQbDz1t7Mk Ipy5pWqcGObKTTa1t42b6n5fNEqIU96FJFAGI17mf5ecFzbX4gEvwQE8FZk4/P/AvxJC uNRnC7b/MXItjPwJT84u2Ugcc029ySwKBLnFjxS33SIDJ+f2K3vZTGnCKvztC35UKUNc ItVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=N/WnMXxklSY059GayMJ+VSslOmBX953aAVO/IsJZMxg=; fh=O4xcZbnTvYIkvIcg+CmJI5R4FuZXAq/ZFrTIQWC0Mvw=; b=MEBosHiZ5EPW8hSwT0S7bz0NNVnXSUwW3OYp2g7MANdR3LPYNnCLUTQDl7jCZz3sga ZeQw4gWG+sLdbVIsbvD3Ql+ZntX/GTznR46X4kYHsd6xeoUPH1nu7H4w1y2pklOHUCyD QI/yfG0YOs/RRncn6xzXmnunXuvoh4rehIiXE89iNJjOL6PDilSTPVi8tyb3onDJZuMg G8iYy7hthYn+5+OkImrHHirVvIILIGT+DjybMa7wBp0R4S0IbFAB0FXpGLQcx1MQkteg 7QMmdzfFBSKYZnajD0xCQbdkaq67kOnuVS39DTG3SKiWVfFjoDoLcuql7ldC89asHYYp A7Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=dfr6mqAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id j34-20020a63fc22000000b005c179c00758si4794552pgi.891.2023.12.02.02.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 02:39:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=dfr6mqAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 336548059797; Sat, 2 Dec 2023 02:39:34 -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 S232083AbjLBKjO (ORCPT + 99 others); Sat, 2 Dec 2023 05:39:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjLBKjN (ORCPT ); Sat, 2 Dec 2023 05:39:13 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9C8E12E for ; Sat, 2 Dec 2023 02:39:19 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-54c79cca895so4970a12.0 for ; Sat, 02 Dec 2023 02:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701513558; x=1702118358; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=N/WnMXxklSY059GayMJ+VSslOmBX953aAVO/IsJZMxg=; b=dfr6mqATDtY8AR/5BrrNyhhcpWeoNBl+xc2D4SA7mJxkUkKn8FoMHcyrUm4uYVGyCl RHhNRtcYx/aXN443mNHfoVhzs+FlGM1CmdkxCYsviaYM/ygtuHqJQj+d9COVybxYoGu+ xA2wPfSHTYnkn1ALAbI5Rtc0o7m0KyzFN4QPC1U+7d+fZcwTUS3AzsGReiFMBDBD1LoM QNy6P0dHErKWVmNKsRbbIqkUh+fVyYFFNg5oz9OX6Yq7OW068gwnGbiyqlmPl2p38HHz of9FNlYdr+8CHt2ovR5VCnSjBEHzPgBZHfM/RRw6j0hXRyIDjcBVgQCdomwObaxVXFtv rcqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701513558; x=1702118358; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N/WnMXxklSY059GayMJ+VSslOmBX953aAVO/IsJZMxg=; b=NIrqnDZn0tZjRIIwHhsbc0RE4iFph3pFrVJeSu0qcoqqYrBRAC1WrBdpjf3ZXewiFN c9Rwel/0gQhg1hYdOHbNcRXp8zmQt/4Bbdpi+gKiLTE84eMNy/b8xjJfNc2wZ9h0mTPw YUahUBt9uZRUPGkVDospmBZv9W5mrGMEaxfXahuzmANSNXtr4NtDHTNRqQdj+WyZ1T1W f1DSjmCWErYQhpiXG2s8uvB3sa+4Hfjw73prMZtj1Jcq63WdpPWflAT6QrzyG8py4ylM xzzegscnSHUviIGcNgEKW9m05hJ+2VhBg7YRkJgEeYlQuyBThEw2R15VEuhprWAfTGNP CVyA== X-Gm-Message-State: AOJu0Yy+Cl20k9RAbCnupTUaWgVoM8yvlVCz4r2FOxxdpTsK8D8EEGBH IA0l91rNjFa94IOIcvyV2IfVNe3epOuNFzThMaXXHg== X-Received: by 2002:a50:d7c1:0:b0:545:279:d075 with SMTP id m1-20020a50d7c1000000b005450279d075mr221900edj.1.1701513557906; Sat, 02 Dec 2023 02:39:17 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Eric Dumazet Date: Sat, 2 Dec 2023 11:39:06 +0100 Message-ID: Subject: Re: [PATCH v3 net-next] packet: add a generic drop reason for receive To: Yan Zhai Cc: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Weongyo Jeong , linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Jesper Brouer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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]); Sat, 02 Dec 2023 02:39:34 -0800 (PST) On Fri, Dec 1, 2023 at 7:32=E2=80=AFPM Yan Zhai wrote: > > Commit da37845fdce2 ("packet: uses kfree_skb() for errors.") switches > from consume_skb to kfree_skb to improve error handling. However, this > 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-xcxLFU= K2Zj08A8MrLk9jzg@mail.gmail.com/ > Fixes: da37845fdce2 ("packet: uses kfree_skb() for errors.") > Suggested-by: Eric Dumazet > Signed-off-by: Yan Zhai > --- Reviewed-by: Eric Dumazet