From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 5 01:29:26 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86C36106566C for ; Sun, 5 Aug 2012 01:29:26 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4298FC08 for ; Sun, 5 Aug 2012 01:29:25 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q751TMu0071284; Sun, 5 Aug 2012 01:29:22 GMT (envelope-from kientzle@freebsd.org) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id ge9h2mrabv4zubekr4yds9h5qn; Sun, 05 Aug 2012 01:29:22 +0000 (UTC) (envelope-from kientzle@freebsd.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=windows-1251 From: Tim Kientzle In-Reply-To: <1344109912.1128.94.camel@revolution.hippie.lan> Date: Sat, 4 Aug 2012 18:29:20 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1344109912.1128.94.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1278) Cc: freebsd-hackers Subject: Re: How to Expose Chip-level Ethernet Statistics? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2012 01:29:26 -0000 On Aug 4, 2012, at 12:51 PM, Ian Lepore wrote: > On Sat, 2012-08-04 at 12:21 -0700, Tim Kientzle wrote: >> I believe that some of the issues I'm having with this >> Ethernet driver might be easier to diagnose if I could >> expose the chip-level statistics counters (especially queue >> overrun counts). >>=20 >> Is there a standard way to do this? >>=20 >=20 > I don't know if this is exactly what you mean, but have a look at > src/tools/tools/ifinfo, and find some examples of drivers that fill in > that info by grepping for ifmib_iso_8802_3. >=20 > (I really know nothing about this stuff, except that your request > triggered a memory that the atmel if_ate driver gathers some stats = that > I've not seen in most other drivers.) Thanks, Ian! That's almost exactly what I'm looking for. Only tricky point: I don't immediately see where the standard MIB allows me to run a function when the sysctl query runs (which will be necessary if I want to expose the on-chip counters). That might lead me to use a separate sysctl tree for this. I'll also take at the atmel if_ate driver=85. Tim