Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Sep 2014 15:25:59 -0700
From:      Eric Joyner <ricera10@gmail.com>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        freebsd-net <freebsd-net@freebsd.org>, Ryan Stone <rysto32@gmail.com>
Subject:   Re: [PATCH] Convert ixl(4) and ixlv(4) to ifcounters, and fix some counter bugs
Message-ID:  <CA%2Bb0zg-oN2CH-XRSNTm6O7O67BSHdscfC1ntLaZUeXi448S9xA@mail.gmail.com>
In-Reply-To: <20140925120810.GA884@FreeBSD.org>
References:  <CAFMmRNyn0Kjr30Ew%2B8YRRvT-tMFH6WdprAAyJieLz_ABDNK8%2BA@mail.gmail.com> <20140925120810.GA884@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I approve of this patch -- I tested it on ixl and ixlv on stable/10, and at
least the sysctl stats still look good.

---
- Eric Joyner

On Thu, Sep 25, 2014 at 5:08 AM, Gleb Smirnoff <glebius@freebsd.org> wrote:

> On Tue, Sep 23, 2014 at 07:18:51PM -0400, Ryan Stone wrote:
> R> The patch below converts the ixl(4) and ixlv(4) drivers to use the new
> R> ifcounter interface.  I've hidden the interface behind some macros to
> R> ensure that the driver continues to compile for FreeBSD 10 and
> R> earlier.  The result of the macros is that the ifcounter
> R> implementation is somewhat clunkier than I would have liked, but I
> R> preferred to try and share as much code between the legacy counter
> R> implementation and the ifcounter implementation.
> R>
> R> I have tested the ixl driver with head.  I have only compile-tested it
> R> for stable/10.
> R>
> R> This patch also fixes some counter bugs:
> R>
> R> - Ensure that tx discards are reported
> R> - There are actually two types of rx discard counters in the hardware.
> R> Currently the driver is only reporting discards from one of the two
> R> counters, so I fixed that
> R> - The ipackets and opackets counters were being unnecessarily
> R> incremented in the rx and tx paths.  This was racy, unnecessary (the
> R> counters also get explicitly set based on the values in HW counters)
> R> and very bad for performance -- the cacheline contained the counters
> R> was constantly bouncing between CPUs.  I saw this even with only one
> R> queue active, probably due to false sharing with some other field in
> R> the ifnet struct.
> R>
> R>
> https://people.freebsd.org/~rstone/patches/ixl/0005-Convert-ixl-and-ixlv-drivers-to-use-new-ifcounter-in.patch
>
> Thanks, Ryan!
>
> I'd suggest to use check against __FreeBSD_version >= 1100036.
>
> Can you please commit this? Navdeep promised to do cxgbe(4), Alexander
> is working on ixgbe. After that we can go forward with making counters
> in struct ifnet non-racy and cheap counter(9).
>
> --
> Totus tuus, Glebius.
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bb0zg-oN2CH-XRSNTm6O7O67BSHdscfC1ntLaZUeXi448S9xA>