From: sashiko-bot@kernel.org
To: "Satish Kharat" <satishkh@cisco.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH RFC net-next 04/12] net: enic: expose per-queue XDP and AF_XDP counters
Date: Wed, 02 Dec 2026 01:16:17 +0000 [thread overview]
Message-ID: <sashiko-outbox-244587@kernel.org> (raw)
In-Reply-To: <20261130-enic-xdp-rfc-p1-20261130-v1-4-3be5458c9118@cisco.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net: enic: per-queue XSK packet, byte, and alloc stats in
ethtool -S
--
commit b7fb77ac6d4bb8b7f60d52b0b1a25ef5f8a5098c
Author: Satish Kharat <satishkh@cisco.com>
net: enic: expose per-queue XDP and AF_XDP counters
This commit adds per-queue XDP and AF_XDP statistics to struct
enic_rq_stats and struct enic_wq_stats and exposes them through
ethtool -S.
> diff --git a/drivers/net/ethernet/cisco/enic/enic_ethtool.c b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
> index 61541fb8db7b7..ca1d9ae27d82f 100644
> --- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c
> +++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c
> @@ -51,6 +51,17 @@ static const struct enic_stat enic_per_rq_stats[] = {
> ENIC_PER_RQ_STAT(napi_repoll),
> ENIC_PER_RQ_STAT(no_skb),
> ENIC_PER_RQ_STAT(desc_skip),
> + ENIC_PER_RQ_STAT(xdp_pass),
> + ENIC_PER_RQ_STAT(xdp_drop),
> + ENIC_PER_RQ_STAT(xdp_tx),
> + ENIC_PER_RQ_STAT(xdp_tx_drops),
> + ENIC_PER_RQ_STAT(xdp_redirect),
> + ENIC_PER_RQ_STAT(xdp_redirect_drops),
> + ENIC_PER_RQ_STAT(xdp_aborted),
> + ENIC_PER_RQ_STAT(xdp_invalid),
> + ENIC_PER_RQ_STAT(xsk_rx_pkts),
> + ENIC_PER_RQ_STAT(xsk_rx_bytes),
> + ENIC_PER_RQ_STAT(xsk_fill_empty),
> };
>
> #define NUM_ENIC_PER_RQ_STATS ARRAY_SIZE(enic_per_rq_stats)
> @@ -64,6 +75,10 @@ static const struct enic_stat enic_per_wq_stats[] = {
> ENIC_PER_WQ_STAT(null_pkt),
> ENIC_PER_WQ_STAT(skb_linear_fail),
> ENIC_PER_WQ_STAT(desc_full_awake),
> + ENIC_PER_WQ_STAT(xsk_tx_pkts),
> + ENIC_PER_WQ_STAT(xsk_tx_bytes),
> + ENIC_PER_WQ_STAT(xsk_tx_no_room),
> + ENIC_PER_WQ_STAT(xsk_tx_completed),
> };
[Severity: Medium]
Should xsk_rx_pkts, xsk_rx_bytes, xsk_fill_empty, xsk_tx_pkts, and
xsk_tx_bytes be reported through standard statistics interfaces instead
of ethtool -S?
ethtool -S is reserved for driver-private counters without a standard
uAPI (Documentation/networking/statistics.rst). Per-queue RX/TX packet,
byte, and RX buffer allocation failure counters are covered by
netdev_queue_stats_rx and netdev_queue_stats_tx, which enic already
implements in enic_get_queue_stats_rx() and enic_get_queue_stats_tx()
(and commit bde04d9876c0 ("enic: Report some per queue statistics in
ethtool") excluded per-queue packets, bytes, and pp_alloc_fail from
ethtool -S for that reason). AF_XDP fill ring empty events are also
already tracked by xsk_buff_alloc() in pool->fq->queue_empty_descs and
exposed via SOL_XDP XDP_STATISTICS and sock_diag.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130-enic-xdp-rfc-p1-20261130-v1-0-3be5458c9118@cisco.com?part=4
next prev parent reply other threads:[~2026-12-02 1:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 1:15 [PATCH RFC net-next 00/12] enic: add native XDP and AF_XDP support Satish Kharat
2026-12-01 1:15 ` [PATCH RFC net-next 01/12] net: enic: bound skb TX rollback to current packet Satish Kharat
2026-12-01 1:15 ` [PATCH RFC net-next 02/12] net: enic: tag work queue descriptor ownership Satish Kharat
2026-12-01 1:15 ` [PATCH RFC net-next 03/12] net: enic: gate native XDP on mixed RQ descriptor capability Satish Kharat
2026-12-01 1:15 ` [PATCH RFC net-next 04/12] net: enic: expose per-queue XDP and AF_XDP counters Satish Kharat
2026-12-02 1:16 ` sashiko-bot [this message]
2026-12-01 1:15 ` [PATCH RFC net-next 05/12] net: enic: complete XDP frames by WQ descriptor ownership Satish Kharat
2026-12-01 1:15 ` [PATCH RFC net-next 06/12] net: enic: reserve XDP head and tailroom in RX pages Satish Kharat
2026-12-02 1:16 ` sashiko-bot
2026-12-01 1:15 ` [PATCH RFC net-next 07/12] net: enic: publish partial receive descriptor batches Satish Kharat
2026-12-02 1:16 ` sashiko-bot
2026-12-01 1:15 ` [PATCH RFC net-next 08/12] net: enic: add native XDP RX, TX, and redirect Satish Kharat
2026-12-02 1:16 ` sashiko-bot
2026-12-01 1:15 ` [PATCH RFC net-next 09/12] net: enic: batch AF_XDP TX completions by pool Satish Kharat
2026-12-01 1:15 ` [PATCH RFC net-next 10/12] net: enic: add AF_XDP zero-copy RX and TX Satish Kharat
2026-12-02 1:16 ` sashiko-bot
2026-12-01 1:15 ` [PATCH RFC net-next 11/12] selftests/xsk: exercise XDP detach with bound socket Satish Kharat
2026-12-01 1:15 ` [PATCH RFC net-next 12/12] net: enic: count XDP and AF_XDP TX in queue statistics Satish Kharat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-244587@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=satishkh@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox