From: Nicolai Buchwitz <nb@tipi-net.de>
To: Chris Babroski <cbabroski@nvidia.com>
Cc: Raju.Lakkaraju@microchip.com, UNGLinuxDriver@microchip.com,
andrew+netdev@lunn.ch, bryan.whitehead@microchip.com,
davem@davemloft.net, davthompson@nvidia.com, edumazet@kernel.org,
kuba@kernel.org, linux-kernel@vger.kernel.org,
linux@armlinux.org.uk, maxime.chevallier@bootlin.com,
netdev@vger.kernel.org, pabeni@redhat.com,
richardcochran@gmail.com
Subject: Re: [PATCH net-next v1 0/5] net: lan743x: automatically recover from TX hang
Date: Wed, 21 Oct 2026 21:48:28 +0200 [thread overview]
Message-ID: <86df200787e1be614b21a7d009e8f1be@tipi-net.de> (raw)
In-Reply-To: <20261021192341.361517-1-cbabroski@nvidia.com>
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
next prev parent reply other threads:[~2026-10-21 19:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 15:00 Chris Babroski
2026-10-15 15:00 ` [PATCH net-next v1 1/5] net: lan743x: reset DMA channels that fail to stop Chris Babroski
2026-10-19 10:18 ` Nicolai Buchwitz
2026-10-21 19:53 ` Nicolai Buchwitz
2026-10-15 15:00 ` [PATCH net-next v1 2/5] net: lan743x: start phylink last and stop it first Chris Babroski
2026-10-19 10:13 ` Nicolai Buchwitz
2026-10-15 15:00 ` [PATCH net-next v1 3/5] net: lan743x: quiesce TX before freeing the rings Chris Babroski
2026-10-19 10:14 ` Nicolai Buchwitz
2026-10-21 18:20 ` Woojung.Huh
2026-10-15 15:00 ` [PATCH net-next v1 4/5] net: lan743x: reset the device on TX timeout Chris Babroski
2026-10-19 10:23 ` Nicolai Buchwitz
2026-10-15 15:00 ` [PATCH net-next v1 5/5] net: lan743x: add byte queue limits support Chris Babroski
2026-10-19 10:14 ` Nicolai Buchwitz
2026-10-19 9:47 ` [PATCH net-next v1 0/5] net: lan743x: automatically recover from TX hang Nicolai Buchwitz
2026-10-20 20:36 ` Chris Babroski
2026-10-21 8:06 ` Nicolai Buchwitz
2026-10-21 19:23 ` Chris Babroski
2026-10-21 19:48 ` Nicolai Buchwitz [this message]
2026-10-19 19:49 ` Woojung.Huh
2026-10-21 1:07 ` Jakub Kicinski
2026-10-21 14:03 ` Chris Babroski
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=86df200787e1be614b21a7d009e8f1be@tipi-net.de \
--to=nb@tipi-net.de \
--cc=Raju.Lakkaraju@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=bryan.whitehead@microchip.com \
--cc=cbabroski@nvidia.com \
--cc=davem@davemloft.net \
--cc=davthompson@nvidia.com \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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
all inboxes | Powered by JetHome®