From: mingming cao <mmc@linux.ibm.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, horms@kernel.org, bjking1@linux.ibm.com,
haren@linux.ibm.com, ricklind@linux.ibm.com, edumazet@google.com,
pabeni@redhat.com, davem@davemloft.net,
linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com,
mpe@ellerman.id.au, simon.horman@corigine.com,
shaik.abdulla1@ibm.com, Dave Marquardt <davemarq@linux.ibm.com>
Subject: Re: [PATCH net-next v4 14/14] ibmveth: Fix MQ RX poll and shutdown hangs after queue resize
Date: Tue, 11 Aug 2026 11:59:47 -0700 [thread overview]
Message-ID: <23fd0f9d-b13a-4454-ad29-e6c4488b79b0@linux.ibm.com> (raw)
In-Reply-To: <20260806114928.3f4adfa9@kernel.org>
On 8/6/26 11:49 AM, Jakub Kicinski wrote:
> On Thu, 30 Jul 2026 17:47:17 -0700 Mingming Cao wrote:
>> After aggressive ethtool -L cycling, PHYP can leave a VALID RX descriptor
>> with a correlator that no longer matches the per-queue buffer pools. Poll
>> treated this as fatal: ibmveth_rxq_get_buffer() WARNed and returned NULL
>> without advancing the ring, then restart_poll retried the same slot
>> forever.
>>
>> Advance past bad correlators instead of spinning: validate correlators
>> without WARN_ON, skip invalid slots in poll (count as invalid_buffers),
>> and advance the RX ring when remove_buffer_from_pool cannot map the
>> correlator. Rate-limit the bad correlator message.
>>
>> Complete NAPI when the interface is down or napi_disable is pending so
>> close/quiesce can finish. Do not restart_poll in that window. Close
>> keeps hypervisor IRQ disable before napi_disable (via
>> cleanup_rx_interrupts() / related cleanup helpers).
>>
>> Also validate descriptor length against skb tailroom before skb_put(),
>> and after napi_complete_done() on the budget-exhausted shutdown path
>> return a value less than budget so NAPI does not immediately reschedule.
> This patch looks very odd, like there's a bug somewhere and instead of
> fixing it we're making the rx path more resilient. BTW minor coding
> note - you're adding a bunch of heavily indented code to an already
> long function. Please consider factoring things out. Similar comment
> can be applied to other patches.
Agreed. The main fix here should be in the earlier resize/teardown path,
not in a trailing resilience patch.
I’ll fold that back into the owning resize work: drain before
deregister/unmap/free, publish the surviving queue range before freeing
queue resources, and use the same teardown path on the scale-up
enable_irq failure path. The poll-side skip logic should stay only as
belt-and-braces after the teardown fix, not as the primary answer.
I’ll also move the new poll branches into small helpers so
ibmveth_poll() stays a thin loop, but keep those helpers with the
patches that introduce the logic rather than as a standalone trailer
refactor.
I think the same cleanup principle applies to a few of the other
patches as well, so I’ll fold helper extraction into the owning changes
there too.
Thanks,
Mingming
prev parent reply other threads:[~2026-08-11 19:00 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 0:47 [PATCH net-next v4 00/14] ibmveth: Add multi-queue RX support Mingming Cao
2026-07-31 0:47 ` [PATCH net-next v4 01/14] ibmveth: Add MQ RX hypercall wrappers and call definitions Mingming Cao
2026-08-06 18:36 ` Jakub Kicinski
2026-08-10 19:19 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 02/14] ibmveth: Prepare MQ RX adapter data structures Mingming Cao
2026-08-06 18:36 ` Jakub Kicinski
2026-08-10 19:40 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 03/14] ibmveth: Refactor RX resource allocation for MQ RX bring-up Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 20:44 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 04/14] ibmveth: Refactor buffer pool management for per-queue MQ RX Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 21:11 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 05/14] ibmveth: Refactor RX interrupt control for MQ RX queues Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 22:07 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 06/14] ibmveth: Refactor TX resource allocation in open/close paths Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 22:21 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 07/14] ibmveth: Add RX queue register/deregister helpers for MQ Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 22:32 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 08/14] ibmveth: Add queue-aware RX buffer submit helper " Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 22:51 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 09/14] ibmveth: Enable multi-queue RX receive path Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 23:28 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 10/14] ibmveth: Add per-queue RX and TX statistics collection Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 23:42 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 11/14] ibmveth: Expose per-queue buffer pool details via debugfs Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-10 23:53 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 12/14] ibmveth: Implement incremental MQ RX queue resize Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-11 1:21 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 13/14] ibmveth: Wire ethtool set_channels to " Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-11 2:47 ` mingming cao
2026-07-31 0:47 ` [PATCH net-next v4 14/14] ibmveth: Fix MQ RX poll and shutdown hangs after " Mingming Cao
2026-08-06 18:37 ` Jakub Kicinski
2026-08-11 18:54 ` mingming cao
2026-08-06 18:49 ` Jakub Kicinski
2026-08-11 18:59 ` mingming cao [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=23fd0f9d-b13a-4454-ad29-e6c4488b79b0@linux.ibm.com \
--to=mmc@linux.ibm.com \
--cc=bjking1@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=davemarq@linux.ibm.com \
--cc=edumazet@google.com \
--cc=haren@linux.ibm.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ricklind@linux.ibm.com \
--cc=shaik.abdulla1@ibm.com \
--cc=simon.horman@corigine.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;
as well as URLs for NNTP newsgroup(s).