[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4857a377-7034-4a5b-adc3-11f803496827@intel.com>
Date: Wed, 8 Oct 2025 16:29:45 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<andrew+netdev@...n.ch>, <horms@...nel.org>, <bpf@...r.kernel.org>,
<alexanderduyck@...com>, <sdf@...ichev.me>, <mohsin.bashr@...il.com>
Subject: Re: [PATCH net v2 2/9] eth: fbnic: fix accounting of XDP packets
On 10/7/2025 4:26 PM, Jakub Kicinski wrote:
> Make XDP-handled packets appear in the Rx stats. The driver has been
> counting XDP_TX packets on the Tx ring, but there wasn't much accounting
> on the Rx side (the Rx bytes appear to be incremented on XDP_TX but
> XDP_DROP / XDP_ABORT are only counted as Rx drops).
>
> Counting XDP_TX packets (not just bytes) in Rx stats looks like
> a simple bug of omission.
>
> The XDP_DROP handling appears to be intentional. Whether XDP_DROP
> packets should be counted in interface-level Rx stats is a bit
> unclear historically. When we were defining qstats, however,
> we clarified based on operational experience that in this context:
>
> name: rx-packets
> doc: |
> Number of wire packets successfully received and passed to the stack.
> For drivers supporting XDP, XDP is considered the first layer
> of the stack, so packets consumed by XDP are still counted here.
>
> fbnic does not obey this requirement. Since XDP support has been added
> in current release cycle, instead of splitting interface and qstat
> handling - make them both follow the qstat definition.
>
> Another small tweak here is that we count bytes as received on the wire
> rather than post-XDP bytes (xdp_get_buff_len() vs skb->len).
>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Fixes: 5213ff086344 ("eth: fbnic: Collect packet statistics for XDP")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> v2:
> - remove now unnecessary adjustment to bytes
>
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)
Powered by blists - more mailing lists