Re: [PATCH net-next v4 3/3] net: phy: dp83tg720: report inclusive RX packet totals
From: Oleksij Rempel
Date: Fri Nov 13 2026 - 16:39:50 EST
On Fri, Nov 13, 2026 at 10:12:07AM -0700, James Hilliard wrote:
> The DP83TG720S-Q1 datasheet describes PKT_STAT_4 and PKT_STAT_5
> (0x063c and 0x063d) as the total received packet count, including packets
> with errors. The driver currently reports this count through rx_packets,
> which is defined as successfully received packets.
>
> Report the accumulated count through rx_packets_total instead. This
> exposes it as RxFramesTotal rather than RxFrames in the ethtool phydev
> statistics group, matching the hardware counter's semantics.
>
> Fixes: 677d895af1cc ("net: phy: dp83tg720: add statistics support")
> Link: https://www.ti.com/lit/ds/symlink/dp83tg720s-q1.pdf
> Cc: <stable+noautosel@xxxxxxxxxx> # Requires the new PHY receive-total statistics API
> Cc: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
I do not think this patch should go in. Please drop it from the series.
Patches 1 and 2 do not depend on it; dp83tg720 can keep reporting
rx_packets as it does today.
The datasheet (SNLS604G) does not say that this count includes frames
with errors. Tables 7-80 and 7-81 describe the fields only as the lower
and upper 16 bits of the Rx packet counter. Section 6.3.1.3 and Table 6-2
list a total packet count and a count of packets with errors. They do
not say whether the total includes those packets. The word "total" alone
does not settle it.
Before the reported value changes, I need either a test or other TI
documentation that shows whether the counter includes frames with
CRC errors.
Even if it turns out that the counter includes frames with CRC errors, I
would rather subtract the CRC error count (RxErrors) in the driver and
keep rx_packets with its documented meaning than change the interface
for existing users.
Oleksij