From owner-svn-src-head@FreeBSD.ORG Sat May 2 19:10:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F8CAA8D; Sat, 2 May 2015 19:10:10 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D3545195A; Sat, 2 May 2015 19:10:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t42JA0VY033978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 2 May 2015 22:10:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t42JA0mx033977; Sat, 2 May 2015 22:10:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 2 May 2015 22:10:00 +0300 From: Gleb Smirnoff To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Message-ID: <20150502191000.GE546@FreeBSD.org> References: <201504301823.t3UINd74073186@svn.freebsd.org> <1998053.shmPH6saZj@ralph.baldwin.cx> <20150501135134.GC546@FreeBSD.org> <2197979.EUYqekgM4M@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2197979.EUYqekgM4M@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 19:10:10 -0000 On Fri, May 01, 2015 at 10:47:43AM -0400, John Baldwin wrote: J> > J> > While you are here, let me remind you about this plan: J> > J> > J> > J> > https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html J> > J> > J> > J> > We can prototype the API to userland now, write down a utility that uses J> > J> > it, or add the functionality to an existing utility. And start with Intel J> > J> > drivers, that seem to be most interested in extra stats. J> > J> J> > J> So the importaing thing here is that if_get_counter() is still doing J> > J> per-ifnet stats. The stat you underlined above is per-queue instead. J> > J> We well need more explicitly knowledge of queues outside of drivers J> > J> and in the stack itself to support a generic framework for per-queue J> > J> stats. J> > J> > This depends on how generic we want the API to be. Of course, we can add J> > an extra argument to if_get_counter(). J> > J> > However, if we don't expect the number of queues to exceed a reasonable J> > number of 255 :), we can fit the functionality into existing API. J> > We can keep the queue number in the highest 8 bits of the ift_counter J> > parameter. J> > J> > #define IFCOUNTER_MASK 0x00ffffff J> > #define IFCOUNTER_QUEUE(c) ((c) >> 24) J> J> I'd prefer that expose queues more directly and figure out how to handle J> per-queue stats then (e.g. do we have some sort of driver-independent J> structure that each ifnet has 1 or more of that maps to a queue and has J> driver provided methods, etc. If so you could have a driver method for J> queue stats). Note that I did use if_get_counter to report the J> per-interface stats instead of adding a new sysctl. What do you prefer: an extra argument to the if_get_counter() or a extra ifop? -- Totus tuus, Glebius.