FreeBSD Bugzilla – Attachment 233828 Details for
Bug 263817
dwc: dwc driver will re-count the number of sent/received uni-cast mac address packets and multicast mac address packets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
remove duplicate packet counts from if_dwc
dwc_counts.patch (text/plain), 1.45 KB, created by
Mitchell Horne
on 2022-05-09 22:23:41 UTC
(
hide
)
Description:
remove duplicate packet counts from if_dwc
Filename:
MIME Type:
Creator:
Mitchell Horne
Created:
2022-05-09 22:23:41 UTC
Size:
1.45 KB
patch
obsolete
>commit 6c00cb3486a8f69dbb05050cac1ba2b69d49ad08 >Author: Mitchell Horne <mhorne@FreeBSD.org> >Date: Sat May 7 17:08:56 2022 -0300 > > 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(). > > PR: 263817 > Reported by: Jiahao LI <jiahali@blackberry.com> > >diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c >index e2bdf9965f84..79f1d17ae086 100644 >--- a/sys/dev/dwc/if_dwc.c >+++ b/sys/dev/dwc/if_dwc.c >@@ -1378,16 +1378,12 @@ dwc_harvest_stats(struct dwc_softc *sc) > sc->stats_harvest_count = 0; > ifp = sc->ifp; > >- if_inc_counter(ifp, IFCOUNTER_IPACKETS, READ4(sc, RXFRAMECOUNT_GB)); >- if_inc_counter(ifp, IFCOUNTER_IMCASTS, READ4(sc, RXMULTICASTFRAMES_G)); > if_inc_counter(ifp, IFCOUNTER_IERRORS, > READ4(sc, RXOVERSIZE_G) + READ4(sc, RXUNDERSIZE_G) + > READ4(sc, RXCRCERROR) + READ4(sc, RXALIGNMENTERROR) + > READ4(sc, RXRUNTERROR) + READ4(sc, RXJABBERERROR) + > READ4(sc, RXLENGTHERROR)); > >- if_inc_counter(ifp, IFCOUNTER_OPACKETS, READ4(sc, TXFRAMECOUNT_G)); >- if_inc_counter(ifp, IFCOUNTER_OMCASTS, READ4(sc, TXMULTICASTFRAMES_G)); > if_inc_counter(ifp, IFCOUNTER_OERRORS, > READ4(sc, TXOVERSIZE_G) + READ4(sc, TXEXCESSDEF) + > READ4(sc, TXCARRIERERR) + READ4(sc, TXUNDERFLOWERROR));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 263817
: 233828