Date: Thu, 18 Sep 2014 23:19:56 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Adrian Chadd <adrian@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: <20140918191956.GC884@FreeBSD.org> In-Reply-To: <CAJ-Vmo=B1Ceed2vBa68mKZPn4YXrqyfOERBXUU1uJOngZJU=MA@mail.gmail.com> References: <201409181556.s8IFuEK1013392@svn.freebsd.org> <20140918191119.GA884@FreeBSD.org> <CAJ-Vmo=B1Ceed2vBa68mKZPn4YXrqyfOERBXUU1uJOngZJU=MA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 18, 2014 at 12:18:24PM -0700, Adrian Chadd wrote: A> On 18 September 2014 12:11, Gleb Smirnoff <glebius@freebsd.org> wrote: A> > On Thu, Sep 18, 2014 at 03:56:14PM +0000, Gleb Smirnoff wrote: A> > T> Author: glebius A> > T> Date: Thu Sep 18 15:56:14 2014 A> > T> New Revision: 271782 A> > T> URL: http://svnweb.freebsd.org/changeset/base/271782 A> > T> A> > T> Log: A> > T> - Use if_inc_counter() to increment various counters. A> > T> - Do not ever set a counter to a value. For those counters A> > T> that we don't increment, but return directly from hardware A> > T> create cases in if_get_counter() method. A> > A> > Note that this patch was done mechanically. However, with new API A> > all statistics handling in all drivers can be improved. It is no A> > longer required to poll hardware counters and write down their A> > values into ifnet. Hardware counters now can (and should!) be read A> > on demand at the time when either sysctl(2) or network stack A> > asks for a counter. A> > A> > Of course such change to drivers can't be committed without A> > testing on hardware, that's why I decided to be conservative. A> > A> > I'll convert several drivers as an example soon. A> A> Something that recently popped up at home with my RSS testing is that A> the hardware counters may actually reflect the packets that the MAC A> has seen, rather than the packets the driver side has actually seen. A> A> It looks like with flow control disabled, the counters used for A> ixgbe(4) reflect the per-queue and global MAC RX counters, before a A> saturated receive thread drops some frames. Before, the interface A> counters reflected what the driver managed to see, not necessarily A> what was received by the NIC. A> A> What should we do about that? Of course we should report that as ierrors, being silent on them is a disaster for a sysadmin. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140918191956.GC884>