summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFan Ye <fy15309206903@gmail.com>2026-08-15 10:21:52 +0000
committerJakub Kicinski <kuba@kernel.org>2026-08-20 12:20:06 -0700
commitc5ae83ee02c04487b1be1d143b791ec2caca888e (patch)
tree1da31c3d54a12b7b6238a817dac87823bf6508a2 /include
parentf826df95332c07380206dbd54178b6eefb311aba (diff)
net: thunderbolt: Count delivered packets in rx_packets and rx_bytes
tbnet_poll() increments rx_packets once per received frame because that is the NAPI work unit, and then adds the same number to stats.rx_packets. An skb is handed to the stack only when the last frame of a packet arrives, so once the MTU exceeds TBNET_MAX_PAYLOAD_SIZE the statistic reports frames. tx_packets is bumped once per skb, so the two ends of a link disagree: at MTU 65330 the receiver reports 16 times the packets its sender sent. rx_bytes has the matching problem: frames of a packet that is later dropped mid-assembly are already accounted, so it does not correspond to rx_packets as documented. Account for both where the packet is completed, and leave the NAPI work counter alone. Fixes: e69b6c02b4c3 ("net: Add support for networking over Thunderbolt cable") Signed-off-by: Fan Ye <fy15309206903@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Mika Westerberg <westeri@kernel.org> Link: https://patch.msgid.link/20260815-tbnet-rx-stats-v1-1-8da375c2cd09@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions