Re: [PATCH net v6 0/5] bnxt_en: Make RING FREE more robust

From: Michael Chan

Date: Mon Nov 30 2026 - 13:12:12 EST


On Mon, Nov 23, 2026 at 3:27 PM Joe Damato <joe@xxxxxxx> wrote:

> Sashiko's review of v6 raised a few questions that depend on how the firmware
> behaves.
>
> 1. Patch 2: firmware ordering for RING_FREE
>
> When the firmware writes the RING_FREE response (valid byte set),
> has it already stopped all DMA for that TX/RX/AGG ring? Is the
> only thing still in flight the completions?

Yes, DMA has stopped from the associated TX/RX/AGG rings.

>
> Also, once the firmware answers RING_FREE for a completion ring, has
> it stopped writing to that ring?

Yes, the HWRM_DONE completion has been written to the completion ring
and should be the last entry. The only thing is that NAPI may not be
synchronized and may not have seen the HWRM_DONE yet if we only rely
on the polling of the RING_FREE response. But in this case, I think
the interrupt is likely broken and we've waited for the entire FW
timeout already, so we proceed ahead.
>
> If the response can be written before the ring is quiesced, patch 2
> is wrong and I'll change it.
>
> 2. Patch 3: abandoned waits because of FW health
>
> hwrm_wait_must_abort() gives up when the health register reports
> not-healthy, and patch 3 counts that RING_FREE as stuck.

I think counting it as stuck is correct. When FW is not healthy, it
may not have processed the RING_FREE at all.

>
> I am going to guess no, but is there a health status that guarantees the
> firmware has discarded its ring state? If so, we could skip stopping
> DMA in that case.
>
> Sashiko suggests that an ifdown overlapping with a firmware reset would
> need a rebind. That might be extremely rare and fine as-is, though.
>
> 3. Patch 5: Drop ?
>
> Sashiko found a deadlock and RDMA restart races. I don't know what the
> simplest fix to all of this would be.
>
> Maybe it's better to drop patch 5 and let bnxt_re handle this in a
> separate series?

I was hoping we could stop RDMA before disabling the device, but if it
is too complicated we can defer that.

>
> It would be really great to get the ring free failure path fixed so that FW
> isn't TX-ing memory the driver has released.
>
> If there's any guidance on the above that Broadcom can provide to help get
> this applied that would be very helpful.
>

Sorry for the late response. I was on PTO last week. Thanks.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature