From: Stephen Hemminger <stephen@networkplumber.org>
To: Joshua Washington <joshwash@google.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH 00/12] net/gve: stability fixes and DQO scattered Rx support
Date: Fri, 4 Dec 2026 11:13:16 -0800 [thread overview]
Message-ID: <20261204111316.53553b15@phoenix.local> (raw)
In-Reply-To: <20261203232637.1044501-1-joshwash@google.com>
On Thu, 3 Dec 2026 15:26:23 -0800
Joshua Washington <joshwash@google.com> wrote:
> This patch series collects 11 bug fixes followed by DQO scattered Rx
> support for the GVE PMD:
>
> Fixes (patches 01-11):
> - Disable per-queue start/stop ops until individual queue lifecycle
> commands are supported, preventing device/driver ring desync.
> - Free partially received GQI Rx chains on queue teardown and avoid
> allocating an extra unposted mbuf in GQI Rx queue setup.
> - Guard against integer underflow in GQI Rx when frag_size < GVE_RX_PAD
> and against integer truncation / descriptor bounds violations in GQI
> QPL Tx.
> - Stop counting normal ring-exhaustion backpressure as oerrors in DQO
> Tx.
> - Disable unsupported TCP LRO/RSC offload and drop multi-segment Rx
> packets when scatter is disabled in DQO.
> - Reject non-power-of-2 ring sizes in DQO Rx/Tx setup.
> - Handle RSS allocation failures cleanly without corrupting cached state.
> - Reject unsupported flow attributes and item masks.
>
> Feature (patch 12):
> - Add scattered Rx offload support for the DQO descriptor format.
Lots of feedback from AI review pass.
Review of "net/gve" series (12 patches), applied on top of 27.03-rc0.
Patches 04, 07, 08 and 12 need next-net context; hunks were adjusted
to apply here. All 12 commits build with -Dwerror=true.
Errors
======
Patch 07/12, 12/12: rxq->scatter is stale after reconfigure
rxq->scatter is latched at Rx queue setup:
gve_rx.c:
rxq->scatter = !!(offloads & RTE_ETH_RX_OFFLOAD_SCATTER);
gve_rx_dqo.c:
rxq->scatter = !!(offloads & RTE_ETH_RX_OFFLOAD_SCATTER);
rte_eth_dev_configure() may run again on a stopped port with
different Rx offloads, and eth_dev_rx_queue_config() only releases
queues above the new count, so queues set up earlier survive with
the old flag. gve_dev_configure() updates dev->data->scattered_rx
from the new port offloads, but nothing updates rxq->scatter.
configure(no SCATTER), rx_queue_setup, configure(SCATTER), start:
the port has scatter on, rxq->scatter is false, and every chained
frame is dropped and counted as an Rx error:
gve_rx_dqo.c, gve_rx_seg_invalid_dqo():
bool unexpected_multiseg = is_first_seg && !is_eop && !rxq->scatter;
gve_rx.c, gve_rx():
if (unlikely(is_first_frag && !is_last_frag && !rxq->scatter)) {
gve_rx_check_scatter() returns 0 at its first test in this case, so
the mismatch is never noticed. In the other order the flag stays
true and GQI hands multi-segment mbufs to an application that
disabled the offload, since that function only re-validates the
buffer size.
The comment 12/12 adds to gve_dev_start() already describes this
sequence ("keeps Rx queues already set up, so check them again"), so
refresh the flag there as well:
for (i = 0; i < dev->data->nb_rx_queues; i++) {
struct gve_rx_queue *rxq = dev->data->rx_queues[i];
if (rxq != NULL)
rxq->scatter = !!(dev->data->dev_conf.rxmode.offloads &
RTE_ETH_RX_OFFLOAD_SCATTER);
}
Warnings
========
Patch 07/12: rxm dereferenced without the NULL check added alongside
if (unlikely(rxq->ctx.drop_pkt)) {
if (rxm != NULL)
rte_pktmbuf_free(rxm);
...
frag_len = rte_le_to_cpu_16(rx_desc->packet_len);
rxm->data_len = frag_len;
sw_ring[rx_buf_id] is cleared as soon as a completion consumes it and
is only repopulated by gve_rx_refill_dqo() at the end of the burst, so
a buf_id repeated within one burst yields rxm == NULL with drop_pkt
false. gve_completed_buf_list_push() also runs twice for that id,
leaving completed_buf_list[id] == id, which makes
gve_completed_buf_list_pop() hand out the same id indefinitely. Make
the two paths agree:
} else {
rxm = rxq->sw_ring[rx_buf_id];
if (unlikely(rxm == NULL)) {
PMD_DRV_DP_LOG(ERR, "Duplicate rx_buf_id %u on queue %u",
rx_buf_id, rxq->queue_id);
if (!rxq->ctx.drop_pkt) {
rxq->stats.errors++;
rxq->ctx.drop_pkt = true;
}
} else {
...
}
}
Patch 07/12: duplicate cleanup in gve_release_rxq_mbufs()
02/12 already adds the free and clear at the top of the function.
07/12 adds the same pair again after the loop, so the series ends with:
rte_pktmbuf_free(rxq->ctx.mbuf_head);
gve_rx_ctx_clear(&rxq->ctx);
for (i = 0; i < rxq->nb_rx_desc; i++) {
...
}
if (rxq->ctx.mbuf_head != NULL)
rte_pktmbuf_free(rxq->ctx.mbuf_head);
gve_rx_ctx_clear(&rxq->ctx);
The first clear NULLs mbuf_head, so the second pair is dead rather
than a double free. Drop the hunk from 07/12.
Patch 10/12: documented full-match restriction is still unenforced
gve_flow_mask_is_supported() only rejects bits outside the item's
default mask:
if ((m[i] & ~s[i]) != 0)
return false;
A partial mask on a field gve does support passes. Both port bytes of
rte_flow_item_udp_mask are set, so mask->hdr.src_port = 0x00ff is
accepted, and
rule->mask.src_port = mask->hdr.src_port;
is copied verbatim into the AdminQ command by
gve_adminq_add_flow_rule().
gve.rst states "Masking is limited to full matches i.e. 0x00...0 or
0xFF...F" and the commit message says masks are validated against
each protocol's supported fields. Either check each
supported field, e.g.
if ((mask->hdr.src_port != 0 && mask->hdr.src_port != UINT16_MAX) ||
(mask->hdr.dst_port != 0 && mask->hdr.dst_port != UINT16_MAX))
return reject;
or drop the claim from the documentation.
Info
====
Patch 07/12: DQO Rx queue setup is unusable on a jumbo VPC until 12/12
if (gve_rx_dqo_needs_scatter(hw->max_mtu, rx_buf_len)) {
return -EINVAL;
With a 2 KB mbuf pool rx_buf_len is 1920, so any max_mtu above 1906
fails setup unconditionally. 12/12 makes the test conditional on the
scatter offload. Both commits build, so bisect is safe, but a bisect
landing in 07..11 has no working DQO configuration on such a VPC.
Folding the condition into 07/12 avoids that.
Patch 12/12: RTE_MAX() is dead for DQO
check_mtu = gve_is_gqi(priv) ? mtu : RTE_MAX(mtu, priv->max_mtu);
rte_eth_dev_configure() and gve_dev_mtu_set() both reject an MTU above
priv->max_mtu, so the DQO arm always yields priv->max_mtu and the mtu
argument is unused there. Using priv->max_mtu directly also makes the
log line read as the device maximum rather than the requested MTU.
Patch 12/12: frag_len is not checked against rx_buf_len
frag_len = rte_le_to_cpu_16(rx_desc->packet_len);
rxm->data_len = frag_len;
packet_len is a 14-bit field, so it can exceed rx_buf_len, giving a
segment whose data_len is larger than its buffer; the head's pkt_len
then accumulates that across the chain. Pre-existing for the single
segment case, but 12/12 extends it to chains. Folding the test into
gve_rx_seg_invalid_dqo() would cover both.
Patch 07/12: DQO drop state needs an end-of-packet to clear
if (is_eop)
gve_rx_ctx_clear(&rxq->ctx);
drop_pkt now persists across bursts and is cleared only on an
end-of-packet completion, so a chain that never carries one leaves the
queue dropping every later completion until it is stopped and started.
Bounding it on the number of fragments dropped, rather than on EOP
alone, would make it self-recovering.
Patch 09/12: gve_init_rss_config() error path leaves a dangling key
if (!gve_rss_conf->indir) {
err = -ENOMEM;
goto err_with_key;
}
...
err_with_key:
rte_free(gve_rss_conf->key);
return err;
key is freed but not NULLed, and key_size and indir_size keep the
values assigned above. Every current caller lets the local struct die
on that path, so nothing dereferences it; pre-existing, not introduced
here, but it is the remaining hole in the area this patch tightens.
prev parent reply other threads:[~2026-12-04 19:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 23:26 [PATCH 00/12] net/gve: stability fixes and DQO scattered Rx support Joshua Washington
2026-12-03 23:26 ` [PATCH 01/12] net/gve: disable queue start and stop Joshua Washington
2026-12-03 23:26 ` [PATCH 02/12] net/gve: free partially received GQI Rx packet Joshua Washington
2026-12-03 23:26 ` [PATCH 03/12] net/gve: fix integer underflow in GQI Rx path Joshua Washington
2026-12-03 23:26 ` [PATCH 04/12] net/gve: fix integer truncation in GQI QPL Tx path Joshua Washington
2026-12-03 23:26 ` [PATCH 05/12] net/gve: do not count unsent DQO Tx packets as oerrors Joshua Washington
2026-12-03 23:26 ` [PATCH 06/12] net/gve: disable unsupported TCP LRO offload Joshua Washington
2026-12-03 23:26 ` [PATCH 07/12] net/gve: drop multi-seg Rx packets if scatter is off Joshua Washington
2026-12-03 23:26 ` [PATCH 08/12] net/gve: reject non-power-of-2 ring sizes on DQO Joshua Washington
2026-12-03 23:26 ` [PATCH 09/12] net/gve: properly handle RSS realloc failures Joshua Washington
2026-12-03 23:26 ` [PATCH 10/12] net/gve: reject unsupported flow attributes and item masks Joshua Washington
2026-12-03 23:26 ` [PATCH 11/12] net/gve: fix mbuf leak on GQI Rx queue start Joshua Washington
2026-12-03 23:26 ` [PATCH 12/12] net/gve: support scattered Rx for DQO Joshua Washington
2026-12-04 19:13 ` Stephen Hemminger [this message]
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=20261204111316.53553b15@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=joshwash@google.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.