From: sashiko-bot@kernel.org
To: "Kuniyuki Iwashima" <kuniyu@google.com>
Cc: intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH v1 iwl-net 1/2] idpf: Avoid double recycle on empty packet in idpf_rx_hsplit_wa().
Date: Sat, 05 Dec 2026 13:07:57 +0000 [thread overview]
Message-ID: <sashiko-outbox-251549@kernel.org> (raw)
In-Reply-To: <20261205124319.2264197-2-kuniyu@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] idpf: empty descriptors still count hsplit_buf_ovf in
idpf_rx_splitq_clean()
--
commit af024d94ffa2c65eeae02d75ee9e7e6166de24ad
Author: Kuniyuki Iwashima <kuniyu@google.com>
idpf: Avoid double recycle on empty packet in idpf_rx_hsplit_wa().
This commit guards idpf_rx_hsplit_wa() in idpf_rx_splitq_clean() with a
non-zero pkt_len check so empty descriptors do not double-recycle the
payload netmem.
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> index e3a68b4e97d59..c4fc046b041a7 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> @@ -3699,9 +3699,11 @@ static int idpf_rx_splitq_clean(struct idpf_rx_queue *rxq, int budget)
> hdr = &rx_bufq->hdr_buf[buf_id];
>
> if (unlikely(!hdr_len && !xdp->data)) {
> - hdr_len = idpf_rx_hsplit_wa(hdr, rx_buf, pkt_len);
> - /* If failed, drop both buffers by setting len to 0 */
> - pkt_len -= hdr_len ? : pkt_len;
> + if (pkt_len) {
> + hdr_len = idpf_rx_hsplit_wa(hdr, rx_buf, pkt_len);
> + /* If failed, drop both buffers by setting len to 0 */
> + pkt_len -= hdr_len ? : pkt_len;
> + }
>
> u64_stats_update_begin(&rxq->stats_sync);
> u64_stats_inc(&rxq->q_stats.hsplit_buf_ovf);
[Severity: Low]
Should empty descriptors still increment rxq->q_stats.hsplit_buf_ovf here?
When pkt_len is 0, no header buffer overflow occurred and
idpf_rx_hsplit_wa() is skipped, yet hsplit_buf_ovf is still incremented.
Moving the pkt_len check into if (unlikely(!hdr_len && pkt_len && !xdp->data))
avoids the extra nesting and prevents miscounting empty descriptors.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205124319.2264197-1-kuniyu@google.com?part=1
next prev parent reply other threads:[~2026-12-05 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 12:43 [PATCH v1 iwl-net 0/2] idpf: Fix Rx header split overflow edge cases Kuniyuki Iwashima
2026-12-05 12:43 ` [PATCH v1 iwl-net 1/2] idpf: Avoid double recycle on empty packet in idpf_rx_hsplit_wa() Kuniyuki Iwashima
2026-12-05 13:07 ` sashiko-bot [this message]
2026-12-05 12:43 ` [PATCH v1 iwl-net 2/2] idpf: Linearise headers and fix segments calculation in idpf_rx_rsc() Kuniyuki Iwashima
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-251549@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuniyu@google.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.