From: Kuniyuki Iwashima <kuniyu@google.com>
To: Alexander Lobakin <aleksander.lobakin@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Madhu Chittim <madhu.chittim@intel.com>,
Phani Burra <phani.r.burra@intel.com>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Brian Vazquez <brianvv@google.com>,
David Decotigny <decot@google.com>, Li Li <boolli@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
intel-wired-lan@lists.osuosl.org
Subject: [PATCH v1 iwl-net 1/2] idpf: Avoid double recycle on empty packet in idpf_rx_hsplit_wa().
Date: Sat, 5 Dec 2026 21:43:09 +0900 [thread overview]
Message-ID: <20261205124319.2264197-2-kuniyu@google.com> (raw)
In-Reply-To: <20261205124319.2264197-1-kuniyu@google.com>
When header split fails to separate the header (!hdr_len) and pkt_len
is 0, idpf_rx_splitq_clean() calls idpf_rx_hsplit_wa() with pkt_len == 0.
idpf_rx_hsplit_wa() invokes libeth_rx_sync_for_cpu(buf, 0), which
immediately recycles the payload netmem. Execution then continues
to the payload label, where libeth_xdp_process_buff(xdp, rx_buf, 0)
calls libeth_rx_sync_for_cpu() and recycles the same netmem a
second time.
Let's skip idpf_rx_hsplit_wa() when pkt_len is 0 so empty descriptors
are handled once by libeth_xdp_process_buff().
Fixes: 90912f9f4f2d ("idpf: convert header split mode to libeth + napi_build_skb()")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
---
drivers/net/ethernet/intel/idpf/idpf_txrx.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index e3a68b4e97d5..c4fc046b041a 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);
--
2.56.1.915.g69d5ec7298-goog
next prev parent reply other threads:[~2026-12-05 12:43 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 ` Kuniyuki Iwashima [this message]
2026-12-05 13:07 ` [PATCH v1 iwl-net 1/2] idpf: Avoid double recycle on empty packet in idpf_rx_hsplit_wa() sashiko-bot
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=20261205124319.2264197-2-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=aleksander.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=boolli@google.com \
--cc=brianvv@google.com \
--cc=decot@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuni1840@gmail.com \
--cc=madhu.chittim@intel.com \
--cc=phani.r.burra@intel.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sridhar.samudrala@intel.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 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.