Date: Thu, 18 Sep 2014 12:18:24 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r271782 - in head/sys/dev: bge bxe e1000 fxp nfe Message-ID: <CAJ-Vmo=B1Ceed2vBa68mKZPn4YXrqyfOERBXUU1uJOngZJU=MA@mail.gmail.com> In-Reply-To: <20140918191119.GA884@FreeBSD.org> References: <201409181556.s8IFuEK1013392@svn.freebsd.org> <20140918191119.GA884@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18 September 2014 12:11, Gleb Smirnoff <glebius@freebsd.org> wrote: > 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. Something that recently popped up at home with my RSS testing is that the hardware counters may actually reflect the packets that the MAC has seen, rather than the packets the driver side has actually seen. It looks like with flow control disabled, the counters used for ixgbe(4) reflect the per-queue and global MAC RX counters, before a saturated receive thread drops some frames. Before, the interface counters reflected what the driver managed to see, not necessarily what was received by the NIC. What should we do about that? -a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=B1Ceed2vBa68mKZPn4YXrqyfOERBXUU1uJOngZJU=MA>