Hi,
We see silent RX data corruption on the Thor MGBE (25G) and traced it to cache coherency.
Could you help confirm the expected coherency configuration of MGBE on T264?
== Setup ==
- Module: Jetson Thor T5000 (p3834-0008) on our carrier board
- BSP: R39.2.1 nvethernet (OOT) on a Linux 6.6 kernel; DT based on the SDK tegra264.dtsi
- MGBE0-3 at 25G fixed-link, FEC off, MTU 1466 (MACsec enabled), rx-checksumming on
- EMC/MCF/SCF locked at max clock (bwmgr halted)
- dmesg (smmu0, MGBE is behind it): “IDR0.COHACC overridden by FW configuration (false)”
== Test ==
- Ubuntu host (bnxt_en 25G) mounts an SMB share on the Thor, runs fio randrw, bs=512K,
iodepth=128, direct=1, verify=crc32c. - Fails in 4 min to 2h15m: verify error in the written data.
== Symptom ==
- One contiguous 56-62 byte run of wrong data per failure, always inside one 64-byte cache line
(62 B = second cache line of a page-aligned RX buffer after 66 B of eth/ip/tcp headers). - Wrong bytes are older data from the same flow, not bit errors. mmc_rx_crc_error does not
increase, and the MAC’s RX checksum check passes. - The same test over a PCIe 25G NIC (bnxt_en) and a local fio run on the Thor: 0 errors in 4h.
== What we found ==
- With rx-checksumming off: 0 verify errors, but TcpInCsumErrors increases (+58 in 2h) while
mmc_rx_tcp_err stays 0. The frame is good at the MAC and goes bad after DMA, when the CPU reads it. - Adding dma_rmb() after the RX descriptor OWN check did not help (fails in 4 min), so CPU load
reordering is ruled out. - A debug hook in osd_receive_packet() compared the CPU-copied data against a re-read after
“dc ivac”: the CPU read a stale cache line while memory held the correct data
(162 stale hits in 2h). Invalidating the buffer before the CPU reads it: 0 errors in 2h. - Workaround: removing “dma-coherent” from mgbe0-3 in our board DTS, so that
dma_sync_single_for_cpu() invalidates. Result: 6h+ with no errors.
== Questions ==
- Is MGBE on T264 designed to be IO-coherent? If yes, what FW/MB1/BPMP configuration is
required, and why does smmu0 report COHACC = false? - Is “dma-coherent” on mgbe0-3 in the SDK tegra264.dtsi correct for R39.2.1? Is there a
known issue or a fix in a later release? - Is removing “dma-coherent” (non-coherent DMA with cache maintenance) the recommended
workaround? Are there any side effects we should be aware of (performance, MACsec, PTP)? - Do other DMA masters behind smmu0 have the same concern?
The attached package contains the test logs and the test method. It is fairly large, so I
suggest feeding it to an AI agent for analysis; start with ANALYSIS.md.
Thanks,
nvidia_fae_attach.tar.gz (5.0 MB)