Re: [PATCH net v6 0/5] bnxt_en: Make RING FREE more robust
From: Joe Damato
Date: Mon Nov 23 2026 - 18:27:28 EST
On Fri, Nov 20, 2026 at 07:28:22AM -0800, Joe Damato wrote:
> Greetings:
>
> On two production systems, I saw the following dmesg pattern:
>
> NETDEV WATCHDOG: transmit queue 0 timed out 6073 ms
> Resp cmpl intr err msg: 0x51 x20
> hwrm_ring_free type 1 failed x12
> hwrm_ring_free type 2 failed x8
> AMD-Vi: IO_PAGE_FAULT x3
>
> This suggests that, for some currently unknown reason, TX completions stall
> and the netdev watchdog fires. The driver asks FW to free the rings, this
> times out, but the driver ignores the possible failure and frees ring memory.
> Since the FW didn't respond to the ring free command, it is possible that the
> FW is still DMAing to the memory which was freed.
>
> To address this, this series makes the driver stop DMA before freeing ring
> memory when the firmware did not answer RING_FREE.
>
> Since the RFCv4, I found a third system that hit this repeatedly:
>
> NETDEV WATCHDOG: CPU: 35: transmit queue 0 timed out 5459 ms
> hwrm_ring_free type 1 failed. rc:fffffff0 err:0 x64
> hwrm_ring_free type 2 failed. rc:fffffff0 err:0 x32
> hwrm_ring_free type 0 failed. rc:fffffffb err:1 x64
> hwrm_ring_alloc type 1 failed. rc:ffffffe4 err:4
> hwrm_ring_free type 1 failed. rc:fffffff0 err:0 x44
> Abandoning msg {0x51 0x3e35} len: 0 due to firmware status: 0x408100
> nic open fail (rc: fffffffb)
> DMAR: [DMA Write NO_PASID] Request device [47:00.0] fault addr
> 0xffffa07ef000 [fault reason 0x05] PTE Write access is not set
>
> This case differs from the first two in a few ways, but this series would have
> still helped:
>
> - The ring frees fail on the close path and again on the error path of
> the reopen (bnxt_init_chip()), and the device then writes to memory the
> driver has already unmapped. The series stops DMA on both paths.
>
> - The interface came back up later, the watchdog fired again, and the
> cycle started over. The host logged 79 DMAR write faults in about 20
> hours. Patch 4 breaks this loop by refusing to reopen after DMA has
> been stopped.
>
> - The firmware answers each RING_FREE about 5 seconds late, after the
> driver has given up, and finally reports an error in its health
> register. Patch 2 does not treat these late responses as success because
> their sequence ids do not match.
>
> In this most recent case, I suspect the hardware is faulty, but the driver
> shouldn't hand memory back to the system while the device could still write to
> it.
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?
Also, once the firmware answers RING_FREE for a completion ring, has
it stopped writing to that ring?
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 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?
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.
Thanks,
Joe