From: sashiko-bot@kernel.org
To: "Amaan Cheval" <amaan.cheval@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net v4 1/2] gve: block XDP on the DQO-QPL queue format
Date: Sat, 07 Nov 2026 11:46:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-202865@kernel.org> (raw)
In-Reply-To: <20261106114551.212675-2-amaan.cheval@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] gve: gve_verify_xdp_configuration() fails to reject
GVE_GQI_RDA_FORMAT
--
commit effd5965643e22a2856ad20f55eafb8449ee0b34
Author: Amaan Cheval <amaan.cheval@gmail.com>
gve: block XDP on the DQO-QPL queue format
This commit rejects XDP program attachment on the GVE_DQO_QPL_FORMAT
queue format in gve_verify_xdp_configuration().
> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index 2437cd8ba6331..4e9e692a0ed0a 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c
> @@ -1723,6 +1723,12 @@ static int gve_verify_xdp_configuration(struct net_device *dev,
> struct gve_priv *priv = netdev_priv(dev);
> u16 max_xdp_mtu;
>
> + if (priv->queue_format == GVE_DQO_QPL_FORMAT) {
> + NL_SET_ERR_MSG_MOD(extack,
> + "XDP is not supported in DQO QPL queue format.");
> + return -EOPNOTSUPP;
> + }
[Severity: Medium]
Should gve_verify_xdp_configuration() also reject GVE_GQI_RDA_FORMAT (or
any queue format other than GVE_GQI_QPL_FORMAT and GVE_DQO_RDA_FORMAT)?
Before d8a8ca14c937 ("gve: add XDP_TX and XDP_REDIRECT support for DQ
RDA"), verify_xdp_configuration() rejected every queue format except
GVE_GQI_QPL_FORMAT, and gve_set_netdev_xdp_features() only advertises XDP
features on GVE_GQI_QPL_FORMAT and GVE_DQO_RDA_FORMAT.
With only GVE_DQO_QPL_FORMAT blocked here, attaching an XDP program on a
running GVE_GQI_RDA_FORMAT interface passes validation and enters
gve_set_xdp() -> gve_configure_rings_xdp() -> gve_adjust_config(). After
gve_close() tears down the existing queues, gve_queues_start() ->
gve_reg_xdp_info() takes the !gve_is_qpl(priv) branch:
drivers/net/ethernet/google/gve/gve_main.c:gve_reg_xdp_info() {
...
else if (gve_is_qpl(priv))
err = xdp_rxq_info_reg_mem_model(&rx->xdp_rxq,
MEM_TYPE_PAGE_SHARED,
NULL);
else
err = xdp_rxq_info_reg_mem_model(&rx->xdp_rxq,
MEM_TYPE_PAGE_POOL,
rx->dqo.page_pool);
...
}
Because GQI rings do not allocate rx->dqo.page_pool,
xdp_rxq_info_reg_mem_model() returns -EINVAL, causing gve_adjust_config()
to call gve_queues_mem_remove() and leave the interface with all queues
disabled and priv->tx_cfg.num_xdp_queues non-zero so subsequent
gve_open() calls also fail.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261106114551.212675-1-amaan.cheval@gmail.com?part=1
next prev parent reply other threads:[~2026-11-07 11:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 11:45 [PATCH net v4 0/2] gve: fix RX page refcount overflow with the pagecnt bias Amaan Cheval
2026-11-06 11:45 ` [PATCH net v4 1/2] gve: block XDP on the DQO-QPL queue format Amaan Cheval
2026-11-07 3:13 ` Joshua Washington
2026-11-09 9:38 ` Amaan Cheval
2026-11-07 11:46 ` sashiko-bot [this message]
2026-11-10 12:04 ` netdev-bot+sashiko
2026-11-10 13:33 ` Amaan Cheval
2026-11-06 11:45 ` [PATCH net v4 2/2] gve: fix RX page refcount overflow from the pagecnt bias Amaan Cheval
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-202865@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amaan.cheval@gmail.com \
--cc=bpf@vger.kernel.org \
--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.