svn commit: r272897 - head/sys/dev/e1000
Gleb Smirnoff
glebius at FreeBSD.org
Fri Oct 10 20:40:08 UTC 2014
On Fri, Oct 10, 2014 at 04:36:26PM +0000, John Baldwin wrote:
J> Author: jhb
J> Date: Fri Oct 10 16:36:25 2014
J> New Revision: 272897
J> URL: https://svnweb.freebsd.org/changeset/base/272897
J>
J> Log:
J> Various fixes to stats:
J> - Read the counts of received, dropped, and transmitted management
J> packets and add sysctl nodes for them.
J> - Fix the total octets received/transmitted to read all 64 bits of
J> the counters.
J> - Add missing sysctl nodes for rlec, tncrs, fcruc, tor, and tot.
J> - Remove spurious spaces.
J>
J> Reviewed by: Eric Joyner @ Intel
J> MFC after: 1 week
JFYI
With the new API (userland part to be done) one wouldn't need a bunch
of sysctls hanging off every NIC.
Look at ift_counter enum in if_var.h. It is int type, so we can cut it
into large blocks for vendor specific counters. The top part, up to the
IFCOUNTERS member would remain standard and copied to if_data when
imported to userland. Above IFCOUNTERS we can give us much number
space to vendors as needed. Like this:
+ IFCOUNTER_INTEL_RLEC = 1000,
+ IFCOUNTER_INTEL_TNCRS,
+ IFCOUNTER_INTEL_FCRUC,
... etc
After that the driver can return them via igb_get_counter().
As said, the userland API not written yet. The plan is that it will
be not as bulky as NET_RT_IFLIST sysctl, that returns all counters
for all NICs. It will allow to request certain counters for certain
NICs.
--
Totus tuus, Glebius.
More information about the svn-src-head
mailing list