From owner-svn-src-all@FreeBSD.ORG Thu Sep 18 19:11:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADD7AA0; Thu, 18 Sep 2014 19:11:23 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F785754; Thu, 18 Sep 2014 19:11:22 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s8IJBJHs002505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 18 Sep 2014 23:11:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s8IJBJF9002504; Thu, 18 Sep 2014 23:11:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 18 Sep 2014 23:11:19 +0400 From: Gleb Smirnoff To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271782 - in head/sys/dev: bge bxe e1000 fxp nfe Message-ID: <20140918191119.GA884@FreeBSD.org> References: <201409181556.s8IFuEK1013392@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409181556.s8IFuEK1013392@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 19:11:23 -0000 On Thu, Sep 18, 2014 at 03:56:14PM +0000, Gleb Smirnoff wrote: T> Author: glebius T> Date: Thu Sep 18 15:56:14 2014 T> New Revision: 271782 T> URL: http://svnweb.freebsd.org/changeset/base/271782 T> T> Log: T> - Use if_inc_counter() to increment various counters. T> - Do not ever set a counter to a value. For those counters T> that we don't increment, but return directly from hardware T> create cases in if_get_counter() method. Note that this patch was done mechanically. However, with new API all statistics handling in all drivers can be improved. It is no longer required to poll hardware counters and write down their values into ifnet. Hardware counters now can (and should!) be read on demand at the time when either sysctl(2) or network stack asks for a counter. Of course such change to drivers can't be committed without testing on hardware, that's why I decided to be conservative. I'll convert several drivers as an example soon. -- Totus tuus, Glebius.