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

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, October 11, 2014 12:39:58 AM Gleb Smirnoff wrote:
> 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.

This sounds good to me.  cxgb/cxgbe also have a bunch of useful stat counters 
as well.

-- 
John Baldwin



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