From: Stephen Hemminger <stephen@networkplumber.org>
To: Ryan Wolfe <rnwolfe@google.com>
Cc: dev@dpdk.org, Junfeng Guo <junfeng.guo@intel.com>,
Joshua Washington <joshwash@google.com>,
stable@dpdk.org, Harshitha Ramamurthy <hramamurthy@google.com>,
Rushil Gupta <rushilg@google.com>
Subject: Re: [PATCH v2 0/3] net/gve: fix GQI Tx cleanup and QPL FIFO reclaim
Date: Wed, 18 Nov 2026 16:00:09 -0800 [thread overview]
Message-ID: <20261118160009.0c72d768@phoenix.local> (raw)
In-Reply-To: <cover.1794908231.git.rnwolfe@google.com>
On Tue, 17 Nov 2026 09:11:41 -0500
Ryan Wolfe <rnwolfe@google.com> wrote:
> This series fixes three independent bugs in the GQI Tx paths of net/gve:
>
> - 1/3 clears the first freed sw_ring entry in gve_free_bulk_mbuf() so
> completed or refcounted segments do not leave stale mbuf pointers that
> are freed a second time on queue stop or release.
> - 2/3 fixes GQI_RDA multi-segment non-TSO packet descriptors to pass
> data_len instead of pkt_len for the head segment, reclaims completed
> descriptors when nb_free runs low mid-burst, and stops counting normal
> ring-full backpressure as stats.errors.
> - 3/3 fixes GQI_QPL jumbo Tx FIFO reclaim, TSO pre-allocation space
> checks, malformed TSO mbuf handling, and doorbell flushing.
>
> v2:
> - split v1 into three atomic Fixes patches for stable backporting
> - free and count malformed TSO mbufs (pkt_len <= hlen) in
> gve_tx_burst_qpl() while tracking nb_sent separately from nb_tx so an
> invalid TSO request cannot stall the queue at tx_pkts[0]
> - use for (;;) and add the missing blank line after
> gve_tx_reclaim_fifo_qpl()
AI review looks clean, though it did see some pre-existing issues
Subject: Re: [PATCH v2 0/3] net/gve: GQI Tx fixes
Applied to main, builds with -Dwerror=true. All three fixes are
correct. Remaining notes are pre-existing code next to what the
series touches, worth picking up while in this area.
Patch 2/3: net/gve: fix GQI RDA multi-seg descriptor length and clean
Info (pre-existing): TSO payload length underflows when the headers
are not all in the first segment.
gve_tx_fill_seg_desc(txd, ol_flags, tx_offload,
tx_pkt->data_len - hlen, addr);
If data_len < l2+l3+l4, the uint16_t wraps and the device is given a
near-64K segment. Either reject that case (free and count as error,
as patch 3 does for QPL) or require headers in the first segment via
tx_prepare.
Patch 3/3: net/gve: fix GQI QPL jumbo Tx FIFO reclaim and doorbell
Info (pre-existing): the 32-bit widening stops at is_fifo_avail().
The allocator still takes uint16_t:
gve_tx_alloc_from_fifo(struct gve_tx_queue *txq, uint16_t tx_id,
uint16_t len)
and is called with
fifo_addr = gve_tx_alloc_from_fifo(txq, tx_id,
tx_pkt->pkt_len - hlen);
GQI advertises RTE_ETH_TX_OFFLOAD_TCP_TSO with no size limit and no
tx_prepare. A TSO mbuf with payload > 65535 now passes the full-width
"need" check, reserves only (len & 0xffff) bytes, then
rte_pktmbuf_read() copies the full payload into the FIFO, overwriting
in-flight frames or running past fifo_size. pkt.len is __be16 so the
device cannot describe such a packet anyway. Simplest fix is to drop
it with the malformed case:
if (unlikely(tx_pkt->pkt_len <= hlen ||
tx_pkt->pkt_len > UINT16_MAX)) {
rte_pktmbuf_free(tx_pkt);
txq->stats.errors++;
continue;
}
Info (pre-existing): the QPL path has the same descriptor-low abort
that patch 2 fixes for RDA:
if (txq->nb_free < nb_used)
goto end_of_tx;
Using gve_tx_reclaim_fifo_qpl() style clean (or at least
gve_tx_clean()) there would be consistent.
next prev parent reply other threads:[~2026-11-19 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 14:00 [PATCH] net/gve: fix GQI QPL jumbo Tx FIFO reclaim and doorbell Ryan Wolfe
2026-11-17 14:11 ` [PATCH v2 0/3] net/gve: fix GQI Tx cleanup and QPL FIFO reclaim Ryan Wolfe
2026-11-17 14:11 ` [PATCH v2 1/3] net/gve: clear first freed slot in bulk mbuf free Ryan Wolfe
2026-11-17 14:11 ` [PATCH v2 2/3] net/gve: fix GQI RDA multi-seg descriptor length and clean Ryan Wolfe
2026-11-17 14:11 ` [PATCH v2 3/3] net/gve: fix GQI QPL jumbo Tx FIFO reclaim and doorbell Ryan Wolfe
2026-11-19 0:00 ` Stephen Hemminger [this message]
2026-11-17 17:34 ` [PATCH] " Stephen Hemminger
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=20261118160009.0c72d768@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=hramamurthy@google.com \
--cc=joshwash@google.com \
--cc=junfeng.guo@intel.com \
--cc=rnwolfe@google.com \
--cc=rushilg@google.com \
--cc=stable@dpdk.org \
/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