From owner-svn-src-head@FreeBSD.ORG Sat Oct 11 11:44:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F5B4C0F; Sat, 11 Oct 2014 11:44:49 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46C42C0C; Sat, 11 Oct 2014 11:44:49 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2B578B968; Sat, 11 Oct 2014 07:44:48 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r272897 - head/sys/dev/e1000 Date: Sat, 11 Oct 2014 07:44:03 -0400 Message-ID: <30805588.2zv3sCXaFo@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) In-Reply-To: <20141010203957.GD73266@glebius.int.ru> References: <201410101636.s9AGaQ43066897@svn.freebsd.org> <20141010203957.GD73266@glebius.int.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 11 Oct 2014 07:44:48 -0400 (EDT) Cc: svn-src-head@freebsd.org, Eric Joyner , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2014 11:44:49 -0000 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