]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 296975: cxgbe(4): Tidy up PAUSE frame accounting.
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 4 Nov 2016 20:56:28 +0000 (20:56 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 4 Nov 2016 20:56:28 +0000 (20:56 +0000)
commit0fd84937a5843c90fabd99a26a497f9accf1ad5b
treeaa307001e4c321db2e17d5a5496c89b15d64400e
parent76d0cf7aa0a86b113479f9315b981eaee63f062f
MFC 296975: cxgbe(4): Tidy up PAUSE frame accounting.

Figure out if the chip is counting PAUSE frames in the "normal" stats
and take them out if it is.  This fixes a bug in the tx stats because
the default hardware behavior is different for Tx and Rx but the driver
was treating both the same way.  The result was that OPACKETS, OBYTES,
and OMCASTS were under-reported (if tx_pause > 0) before this change.

Note that the mac_stats sysctl still gives you the raw value of these
statistics straight from the device registers.

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@308315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/cxgbe/common/t4_hw.c
sys/dev/cxgbe/t4_main.c