From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Harshitha Ramamurthy <hramamurthy@google.com>
Cc: <joshwash@google.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <willemb@google.com>,
<jordanrhee@google.com>, <netdev@vger.kernel.org>,
<nktgrg@google.com>, <maolson@google.com>, <thostet@google.com>,
<csully@google.com>, <bcf@google.com>,
<maciej.fijalkowski@intel.com>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>,
Eddie Phillips <eddiephillips@google.com>
Subject: Re: [PATCH net v2] gve: fix Rx queue stall on alloc failure
Date: Fri, 10 Jul 2026 16:24:28 +0200 [thread overview]
Message-ID: <0f0e1e47-2f96-44cd-9337-c3d910f1e202@intel.com> (raw)
In-Reply-To: <20260709211906.3322883-1-hramamurthy@google.com>
> @@ -400,6 +414,26 @@ void gve_rx_post_buffers_dqo(struct gve_rx_ring *rx)
> }
>
> rx->fill_cnt += num_posted;
> +
> + /* If the queue has fewer than GVE_RX_BUF_THRESH_DQO descriptors
> + * visible to the hardware, the hardware is in danger of starving
> + * and cannot trigger interrupts.
> + *
> + * We use a threshold of 32 because a single maximum-sized RSC
> + * packet can consume up to 19 descriptors in the Rx path. Lower
> + * thresholds (e.g., 8 or 16) would be unsafe as they could cause
> + * the device to drop/stall on a maximum-sized RSC packet.
> + *
> + * Start the timer to periodically reschedule NAPI and recover.
> + */
> + num_bufs_avail_to_hw =
> + ((bufq->tail & ~(GVE_RX_BUF_THRESH_DQO - 1)) -
> + bufq->head) & bufq->mask;
> +
> + if (num_bufs_avail_to_hw < GVE_RX_BUF_THRESH_DQO) {
nice bit-arith tricks, but perhaps a simpler condiion like:
if (num_avail_slots + num_posted < GVE_RX_BUF_THRESH_DQO)
would be sufficient?
> + mod_timer(&rx->starvation_timer,
> + jiffies + msecs_to_jiffies(GVE_RX_NAPI_RESCHED_MS));
> + }
> }
next prev parent reply other threads:[~2026-07-10 14:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 21:19 [PATCH net v2] gve: fix Rx queue stall on alloc failure Harshitha Ramamurthy
2026-07-10 10:13 ` Maciej Fijalkowski
2026-07-10 14:24 ` Przemek Kitszel [this message]
2026-07-10 17:23 ` Eddie Phillips
2026-07-11 4:11 ` Przemek Kitszel
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=0f0e1e47-2f96-44cd-9337-c3d910f1e202@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcf@google.com \
--cc=csully@google.com \
--cc=davem@davemloft.net \
--cc=eddiephillips@google.com \
--cc=edumazet@google.com \
--cc=hramamurthy@google.com \
--cc=jordanrhee@google.com \
--cc=joshwash@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=maolson@google.com \
--cc=netdev@vger.kernel.org \
--cc=nktgrg@google.com \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=thostet@google.com \
--cc=willemb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox