Article View: linux.kernel.netdev
Article #5242Re: [PATCH net-next v2 2/4] eth: mpnic: report per-queue stats
From: Jakub Kicinski
Date: Tue, 20 Oct 2026 02:00
Date: Tue, 20 Oct 2026 02:00
40 lines
9696 bytes
9696 bytes
On Tue, 13 Oct 2026 09:30:02 -0400 Daniel Zahka wrote: > > The counter semantics come from "eth: mpnic: count packets, bytes, and > > drops per ring" earlier in this series. This patch is the one that > > exposes them as qstats rx-packets and rx-bytes. > > > > The later patch "eth: mpnic: count Rx allocation failures" also counts > > skb build failures in alloc_failed. Those packets still stay in packets > > and bytes. > > So, the question is whether or not rx-packets, reported both to rtnl > stats and qstats, should count drops in the driver. Here, drops are > either running out of shinfo frags, but really just skb allocation > failure. > > The docs for rtnl stats strongly suggest an skb allocation failure > should still be counted for rx-packets. > > The docs for qstats imply the opposite. Especially when xdp is not > present, which is the case as of this point. Once xdp is introduced, > though, counting an skb allocation failure in rx-packets becomes > reasonable by the qstats docs, because xdp runs before the point of skb > allocation. > > Another option would be reporting rx-packets differently for the two > APIs. I think this is not desirable, and seems to violate what is in > the stats.py selftest. > > So, I could either submit a v3, which would just be reverting to v1, or > take the approach here as is. The rtnl stats and qstats are supposed to behave the same if maintained by SW. I should have been clearer in the doc but "XDP is considered the first layer" was supposed to mean - if you reach the point in the driver where you'd call an XDP prog - its a successful Rx, whether the XDP prog is actually attached & called, or is NULL & skipped. I believe the series is good as is. Acked-by: Jakub Kicinski <kuba@kernel.org>
Technical Details
Message-ID:
<20261019190035.4c3ebf4d@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348969-linux-kernel-netdev=dewy.ruReferences:
<20261012-mpnic-counters3-v2-2-8afba81c2d5a@gmail.com> <179189313526.434549.10762925482009523771@kernel.org> <DM3QWDZ4B408.2O12B5PXKY8AR@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348969-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v2 2/4] eth: mpnic: report per-queue stats Date: Mon, 19 Oct 2026 19:00:35 -0700 Organization: Usenet Network Message-ID: <20261019190035.4c3ebf4d@kernel.org> References: <20261012-mpnic-counters3-v2-2-8afba81c2d5a@gmail.com> <179189313526.434549.10762925482009523771@kernel.org> <DM3QWDZ4B408.2O12B5PXKY8AR@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="3762682"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:kenH7SUb4tfavMaEMxFBEPIS1Bc= sha256:a+vPcUjM3lZ387qPTypiBn5lKD5yTHKVuVrumYaLKvQ= sha1:ir/A0ZpVgnmPiGkK4YHRS+qrl0Q= sha256:XsjvRt5XjnjnXWZR5owZBItzgv5Dryp1ghkl8qj1ybc= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 53D47110BB9; Tue, 20 Oct 2026 05:01:01 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.728 X-Spam-Status: No, score=-3.728 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.329, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AHbA5pt3k2Y1; Tue, 20 Oct 2026 05:00:58 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-348969-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 32B46110AF9; Tue, 20 Oct 2026 05:00:50 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 4B5FD4071F; Tue, 20 Oct 2026 02:00:48 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792461643; b=ONkhbufWIC25hanh+xKQxpfxAVht85Ky8I+hL0P+/vTpjtE9jFihCNAFajRurdGytdy+ ZhEkXA/990lDSdLTD1kLPZSxT4+VL5b1Qz2qM6nX8Iqf3pVgotdsW3U/TPsB5/+RZ92Nv KI6udJQSNDdzREo07LBOyHiVNJ1VF8p779YTJ6PGuG7wtll/8yQ5VxKdK6v9E8/nTdnFR uKWUx+cHhUM3+Nv1HoTgDoBze1z9xtPzZmsIX2PTB3b1lurwmrwN5DTAAvb+GSTWsQIzL +yhQJcApdeLjZA1E4jrO37jKs1nwRFXx1Q0Kyyi2FMfNEQUk9lSvHW2YWNRkv+6n4pg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792461643; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=JlodduQldZdsStWJrjgdzJgqzFFrar5i3dmdR0/tpuk=; b=0Gh8ghjdo9IeVJKn8PueaH8B5d7E/FEhNvxq/32Vc3FrBQDc7394qL86wFdio/PPSQgO 0iibd5lFES7l1YsyjqsDYkOeFXR3UqXi2y9mpqldohyJx1+DskvEhMipYxKcj+uuLh1d6 taAWPuo9xdOKWZj+tqKUgfdDuAtveQ9mDd9ToC9eG/JgJNc4fFcyrdxGMmmbsWiJsnfst OIVlCQ4H56Z3xoupDehQY2G/GucXA3+ne2wCzIKVFapoeeMw0NzlWSiyTSzPE1zH9LoZ4 L074Kb6i3h034cPqEMhqbdji8BN9HaCzWHQRii4m4y/VIAW1e6ANEoW8faL1MuRTGxw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fX22Ah8a; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F406B606A329; Tue, 20 Oct 2026 02:00:42 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fX22Ah8a X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792461637; b=fDLddZD2oAIRPVfl//Wc8NOskz3+E+/BWZQUbqse51bVEjYxv73ww3060N/oo3ITHDrq 3jC0onYIWrinUWhbl++GHASAaOapd5T0qRcS3wvoS1zFgSFAil9dwrj4soNPFAqA2WgUX SjQBwXsH9M2Li6ilUfBDK+hDe9/YmKEtY42bOwCISARKRuSkPuSQjrfHNEZnvr9ul7QmL e2v8eREGXbZLYCiQqCeuI7A49bCFMkfYpEuuRiPaxhssF5otSHkutYqGQGxK8TP4Gvycs iRmERCAtgvLkjcovFAeGK4ElGzDxCHGZ4d/iwlLnEJMw31hC4NwgP9FxJ0sjIe8aaHQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792461637; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=JlodduQldZdsStWJrjgdzJgqzFFrar5i3dmdR0/tpuk=; b=vuVSDJGXtkMPlfd6SfxMMZnlAksZkYheTQ4fhzt//N8UG2OSP35Pbp1/+iN56BBHFkmL 2i1X7AJFM//fEFXiZ5mBIqpATpKPOELOyy+iTX3avsjFLaQceSQvycvokKlV6qyOf5oG/ JpcdSY8/3ImUYPDHWzbCHgNoew32RQMamAhbxBAr5uXCMPnR6ZBJre9UjbLHIXps5ILuZ 2/WDKzi8O+rE6IM2HbuNzlOITIAtnx1iieKaSoS2igUsAA9hLiRr9cREVObfgiXDWNo0e APP4DTwax7pfEmAb4Tx9n04eopol5u/leX2dOc8ETex4ZsQ/4hauzaYB4MEzjQRfEBQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fX22Ah8a; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE345606A319; Tue, 20 Oct 2026 02:00:36 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C3571F000C4; Tue, 20 Oct 2026 02:00:36 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792461636; bh=JlodduQldZdsStWJrjgdzJgqzFFrar5i3dmdR0/tpuk=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=fX22Ah8aZrRJqDcfW+nPRCo2sGrBATBa6L38IXJVuy3esscBe+LDQwt9um8KJVp4v YQh6HqKf3aEuRWKkURcTmYh3n/6eiBAC8eF/FwfMGtXQR9k35kIxn0V4ctVOq4B9AN BnP4v4FXaTPFd0jQGkQqr/l2kQkUEvIxF7YmhP9rVgUvFBlSAyfk6UjMVbRr5dTqR6 czsHrahS+ooGy+qDR3u+vK5usX8ZvoHaxAaq8jDbgMAbSuN3d0X28NwR0a3+u6f7WS w6Z5CcYccQAEEKleHBEZ+n6/nnC4XetXnvNDMzo81KGGr2+qL+yF/XjC64QQmpjiib Vhqx5p7Zzwbpw== X-Cc: <netdev-bot+sashiko@kernel.org>, <alexanderduyck@fb.com>, <kernel-team@meta.com>, <andrew+netdev@lunn.ch>, <davem@davemloft.net>, <pabeni@redhat.com>, <ast@kernel.org>, <daniel@iogearbox.net>, <hawk@kernel.org>, <john.fastabend@gmail.com>, <sdf@fomichev.me>, <edumazet@kernel.org>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org> X-In-Reply-To: <DM3QWDZ4B408.2O12B5PXKY8AR@gmail.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list