Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Oct 2014 00:39:58 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>, Eric Joyner <ricera10@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r272897 - head/sys/dev/e1000
Message-ID:  <20141010203957.GD73266@glebius.int.ru>
In-Reply-To: <201410101636.s9AGaQ43066897@svn.freebsd.org>
References:  <201410101636.s9AGaQ43066897@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141010203957.GD73266>