Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Nicolai Buchwitz
Mon, 19 Oct 2026 09:47
Re: [PATCH net-next v1 0/5] net: lan743x: automatically recover from TX hang
Author: Nicolai Buchwitz
Date: Mon, 19 Oct 2026 09:47
Date: Mon, 19 Oct 2026 09:47
44 lines
7738 bytes
7738 bytes
Hi Chris On 15.10.2026 17:00, Chris Babroski wrote: > Background > ---------- > On a custom HW platform that uses the LAN7430 NIC we have been able to > reproduce a scenario where the SoC stops receiving TX completion > interrupts, appearing as a TX hang. After dumping and decoding the > LAN7430 registers we see that the TX channel reports that it is in > started state with no error, but TX_HEAD stops advancing. TX MSI-X > stops > incrementing while RX interrupts continue to increment. > > This scenario has most often been reproduced in large server cluster > environments, but it's also been seen locally during repeated SCP and > iperf testing. > > The root cause of this issue is still unknown and we are continuing > debug. It was found that bringing the interface down and up recovers > the > network. This issue has not been reproduced with the LAN7430 EVB > connected to a standard Linux server. A TX channel that says started, no error, with TX_HEAD not moving is also what you see when the MAC stops draining the TX FIFO. When it hangs, is the FCT TX FIFO full? Is the MAC in LPI, or paused by the link partner? Does it still happen with EEE and rx pause turned off? The other place to look is the PCIe link. We had a LAN7430 stall on a BCM2712 root complex that was also platform specific. The RC driver cleared an undocumented bit in its CLKREQ#/L1 control register. That one took the whole MMIO window down, so it is probably a different failure, but it took days of uptime to show up too. Do the Device Status or AER registers on the hung device show anything (UnsupReq, CmpltTO)? Is the link running with ASPM L1 or L1 substates on that platform? > [...] I will have a look at the actual patches later today and test with our devices. Regards Nicolai
Re: [PATCH net-next v1 0/5] net: lan743x: automatically recover from TX hang
Author: Nicolai Buchwitz
Date: Wed, 21 Oct 2026 08:06
Date: Wed, 21 Oct 2026 08:06
70 lines
11280 bytes
11280 bytes
Hi Chris On 20.10.2026 22:36, Chris Babroski wrote: > [...] > Interestingly, we are consistently seeing FCT_TX_USED=0x34 when > reproducing the TX hang. We have FCT_TX_FIFO_END=0x27, default of 20kB, > so it is mostly empty when we reproduce. Is there anything special > about > the 52 byte usage? Not that I know of. It looks like the head of a scatter-gather frame whose fragments never came in. Does it match the buffer_length of the first active descriptor at tx->last_head? > >> Is the MAC in LPI, or paused by the link partner? Does it still happen >> with EEE and rx pause turned off? > > In all repro cases so far the MAC does not appear to be in LPI and EEE > is disabled (MAC_CR=0x200C and EEE_EN is clear). I also tested with > "ethtool -A <if> autoneg off rx off tx off" and could still reproduce > the tx hang. > > We have a PCIe switch connecting the NIC to our SoC and on the switch I > can see that the NIC's read requests drop to ~0 implying that it stops > fetching TX data and descriptors rather than the MAC stopping queue > drain. Which one? Ours sit behind a Pericom PI7C9X2G404. > >> The other place to look is the PCIe link. We had a LAN7430 stall on a >> BCM2712 root complex that was also platform specific. The RC driver >> cleared an undocumented bit in its CLKREQ#/L1 control register. That >> one took the whole MMIO window down, so it is probably a different >> failure, but it took days of uptime to show up too. Do the Device >> Status >> or AER registers on the hung device show anything (UnsupReq, CmpltTO)? >> Is the link running with ASPM L1 or L1 substates on that platform? > > I do think the PCIe link could be related; our current best guess is > that there is some issue between the NIC and PCIe switch and we have > tickets open with both vendors to help debug (along with setting up > EVBs > to run comparison tests on). > > UnsupReq and CmpltTO appear clean. ASPM and L1 substates are disabled; > the link stays in L0 at 2.5 GT/s x1. > > Recently we found that after every reproduced hang we see that the NIC > sent a NAK to the switch, potentially in response to a CplD from switch > while reading TX data and descriptors, but I am not yet able to see the > rejected TLP or NAK reason with my setup. Then BadTLP/BadDLLP on the NIC and Rollover/Timeout on the switch port should tell what went wrong with the replay. Are those clean too? My guess: the replay hands the NIC a completion it had already counted, and the DMA engine then waits for data that never comes, with nothing in the error registers. Lowering MaxReadReq to 128 bytes with setpci would be a cheap way to test that? > [...] Regards, Nicolai
Re: [PATCH net-next v1 0/5] net: lan743x: automatically recover from TX hang
Author: Nicolai Buchwitz
Date: Wed, 21 Oct 2026 19:48
Date: Wed, 21 Oct 2026 19:48
66 lines
11139 bytes
11139 bytes
Hi Chris On 21.10.2026 21:23, Chris Babroski wrote: >>> Is there anything special about the 52 byte usage? >> >> Not that I know of. It looks like the head of a scatter-gather frame >> whose fragments never came in. Does it match the buffer_length of the >> first active descriptor at tx->last_head? > > Yes, you're right, tx->last_head is pointing to the header of a TSO > frame and the consistent 52 bytes was just an artifact of the test > data I was using to reproduce this week which creates a 54-byte > header. FCT_TX_USED is 52 bytes, but tx->last_head has a buffer_length > of 54, so not sure where the 2 byte difference comes from. TX_HEAD > stopped at the frame's payload descriptor, after the TSO extension > descriptor. AN2948 5.2.9 says FCT_TX_USED counts the frame length rounded up to a dword plus the command words, so a 54 byte header should read 56 or more. 52 does not add up, so I would leave that to Microchip. The same document lists TX_ERR_STS0 with TX_DATA_READ_ERR and TX_DESC_READ_ERR, set when a PCIe read failed "and all retries have been used", and FCT_TXE for a failed FCT sanity check. They land in DMAC_INT_STS bit 21, which the driver never enables or reads. What do TX_ERR_STS0, DMAC_INT_STS and FCT_INT_STS show while it hangs? DMAC_CFG MAX_READ_REQ is not a size either. It is the number of outstanding TX data reads, 1 to 6, and the driver sets 6. Does the hang survive MAX_READ_REQ = 1? > >> Which one? Ours sit behind a Pericom PI7C9X2G404. > > Oh, we are also using a Diodes switch, the PI7C9X3G606GP. Same family then - and I it's known to have it quirks ... Ours is the Gen2 part at 2.5 GT/s and has not hung so far, but that port sees little TX load. If you can share the reproducer I can run it here. > [...] >> My guess: the replay hands the NIC a completion it had already >> counted, >> and the DMA engine then waits for data that never comes, with nothing >> in the error registers. >> >> Lowering MaxReadReq to 128 bytes with setpci would be a cheap way to >> test that? > > Unfortunately, we can still reproduce with MaxReadReq set to 128. > Using the same test as mentioned previously, the FCT_TX_USED now shows > the header plus ~1 KB of payload data instead of 52 bytes. So not the request size. What is left in the driver is the descriptor prefetch. lan743x_tx_open() sets TX_PF_THRES to 0x10 and TX_PF_PRI_THRES to 4, and the prefetcher works hardest with a full ring, which is when you see the most hangs. Does TX_PF_THRES 1 change the rate? > [...] Regards, Nicolai
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads