svn commit: r271782 - in head/sys/dev: bge bxe e1000 fxp nfe

Gleb Smirnoff glebius at FreeBSD.org
Thu Sep 18 19:11:23 UTC 2014


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.


More information about the svn-src-head mailing list