From: sashiko-bot@kernel.org
To: "Joshua Washington" <joshwash@google.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net v2 7/9] gve: disable NAPI when registering XSK pools in QPL mode
Date: Wed, 23 Sep 2026 19:45:55 +0000 [thread overview]
Message-ID: <20260923194556.220251F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922194533.631387-8-joshwash@google.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] gve: double disable/enable of identical NAPI instance causes deadlock/panic
- [High] gve: missing NAPI schedule for DQO queues causes permanent stall
--
commit fca9a2d42c21eb316a02fe534db2369308d03e28
Author: Joshua Washington <joshwash@google.com>
gve: disable NAPI when registering XSK pools in QPL mode
This commit disables NAPI when registering the XSK memory pool for QPL
interfaces to quiesce traffic and prevent race conditions.
> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index 49ae2b8c6a270..f2bd4011de23f 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c
> @@ -1626,6 +1626,40 @@ static int gve_xdp_xmit(struct net_device *dev, int n,
> return -EOPNOTSUPP;
> }
>
> +static void gve_disable_xsk_napis(struct gve_priv *priv, u16 qid)
> +{
> + struct napi_struct *napi_rx, *napi_tx;
> + u16 tx_qid;
> +
> + napi_rx = &priv->ntfy_blocks[priv->rx[qid].ntfy_id].napi;
> + napi_disable_locked(napi_rx);
> +
> + tx_qid = gve_xdp_tx_queue_id(priv, qid);
> + napi_tx = &priv->ntfy_blocks[priv->tx[tx_qid].ntfy_id].napi;
> + napi_disable_locked(napi_tx);
[Severity: Critical]
Does this double-disable the same NAPI instance in symmetric configurations?
Since XDP TX queues share the same NAPI block as RX queues in the default
symmetric configuration, napi_rx and napi_tx resolve to the exact same pointer.
Calling napi_disable_locked() twice on the same NAPI instance will cause a
deadlock since it will spin forever waiting for the NAPI state to change.
> +}
> +
> +static void gve_enable_xsk_napis(struct gve_priv *priv, u16 qid)
> +{
> + struct napi_struct *napi_rx, *napi_tx;
> + u16 tx_qid;
> +
> + napi_rx = &priv->ntfy_blocks[priv->rx[qid].ntfy_id].napi;
> + napi_enable_locked(napi_rx);
> +
> + tx_qid = gve_xdp_tx_queue_id(priv, qid);
> + napi_tx = &priv->ntfy_blocks[priv->tx[tx_qid].ntfy_id].napi;
> + napi_enable_locked(napi_tx);
[Severity: Critical]
Similarly, will enabling the same NAPI instance twice trigger a BUG_ON()
panic inside napi_enable_locked()?
> +
> + if (gve_is_gqi(priv)) {
> + if (gve_rx_work_pending(&priv->rx[qid]))
> + napi_schedule(napi_rx);
> +
> + if (gve_tx_clean_pending(priv, &priv->tx[tx_qid]))
> + napi_schedule(napi_tx);
> + }
[Severity: High]
Does this logic leave DQO queues permanently stalled if an interrupt fires
while NAPI is disabled?
This exclusively checks for pending work and schedules NAPI on GQI formats,
completely neglecting DQO formats. If an interrupt fired while NAPI was
disabled, the hardware interrupt remains masked forever.
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260922194533.631387-1-joshwash@google.com?part=7
next prev parent reply other threads:[~2026-09-23 19:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 19:45 [PATCH net v2 0/9] gve: various XDP fixes Joshua Washington
2026-09-22 19:45 ` [PATCH net v2 1/9] gve: increment work_done for XDP and error packets Joshua Washington
2026-09-24 10:46 ` netdev-bot+sashiko
2026-09-22 19:45 ` [PATCH net v2 2/9] gve: fix XSK buffer leak when rings are stopped Joshua Washington
2026-09-22 19:45 ` [PATCH net v2 3/9] gve: fix XSK buffer leak on error descriptor Joshua Washington
2026-09-22 19:45 ` [PATCH net v2 4/9] gve: don't register xsk pool on pre-existing queues in RDA mode Joshua Washington
2026-09-24 10:46 ` netdev-bot+sashiko
2026-09-22 19:45 ` [PATCH net v2 5/9] gve: fix napi_disable deadlock when attempting to disable XSK pools Joshua Washington
2026-09-22 19:45 ` [PATCH net v2 6/9] gve: fix NULL dereference from premature XSK pool DMA unmap Joshua Washington
2026-09-24 10:46 ` netdev-bot+sashiko
2026-09-22 19:45 ` [PATCH net v2 7/9] gve: disable NAPI when registering XSK pools in QPL mode Joshua Washington
2026-09-23 19:45 ` sashiko-bot [this message]
2026-09-24 10:46 ` netdev-bot+sashiko
2026-09-22 19:45 ` [PATCH net v2 8/9] gve: ensure XDP mem model is registered when disabling XSK pools Joshua Washington
2026-09-23 19:45 ` sashiko-bot
2026-09-24 10:46 ` netdev-bot+sashiko
2026-09-22 19:45 ` [PATCH net v2 9/9] gve: prevent XDP frame leak and corruption during DQO TX cleanup Joshua Washington
2026-09-24 10:46 ` netdev-bot+sashiko
2026-09-29 17:48 ` [PATCH net v2 0/9] gve: various XDP fixes Joshua Washington
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=20260923194556.220251F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=joshwash@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox