HomeFreeBSD

if_dwc: avoid duplicate packet counts

Description

if_dwc: avoid duplicate packet counts

We already increment the unicast IPACKETS and OPACKETS counters in the
rx/tx paths, respectively. Multicast packets are counted in the generic
ethernet code. Therefore, we shouldn't increment these counters in
dwc_harvest_stats().

Drop the early return from dwc_rxfinish_one() so that we still count
received packets with e.g. a checksum error.

PR: 263817
Reported by: Jiahao LI <jiahali@blackberry.com>
Reviewed by: manu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35499

(cherry picked from commit 9718759043ec2ef36f12b15963194b866d731b5b)

Details

Provenance
mhorneAuthored on Jun 21 2022, 1:24 PM
Reviewer
manu
Differential Revision
D35499: if_dwc: avoid duplicate packet counts
Parents
rG5dec16de37f5: if_dwc: add detach method
Branches
Unknown
Tags
Unknown