From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 6 16:06:03 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3C21476B; Wed, 6 Feb 2013 16:06:03 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 01AFF684; Wed, 6 Feb 2013 16:06:02 +0000 (UTC) Received: from [38.105.238.108] (port=56842 helo=[10.7.1.235]) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1U37VU-0002Sj-0r; Wed, 06 Feb 2013 11:05:56 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Make kernel aware of NIC queues From: George Neville-Neil In-Reply-To: <20130206143714.GA45782@onelab2.iet.unipi.it> Date: Wed, 6 Feb 2013 11:05:59 -0500 Content-Transfer-Encoding: 7bit Message-Id: References: <5112666F.3050904@FreeBSD.org> <20130206143714.GA45782@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.1499) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Mailman-Approved-At: Wed, 06 Feb 2013 16:32:53 +0000 Cc: freebsd-hackers@freebsd.org, "Alexander V. Chernikov" , net@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 16:06:03 -0000 On Feb 6, 2013, at 09:37 , Luigi Rizzo wrote: > On Wed, Feb 06, 2013 at 06:19:27PM +0400, Alexander V. Chernikov wrote: >> Hello list! >> >> Today more and more NICs are capable of splitting traffic to different >> Rx/TX rings permitting OS to dispatch this traffic on different CPU >> cores. However, there are some problems that arises from using multi-nic >> (or even singe multi-port NIC) configurations: > ... >> I propose implementing common API to permit drivers: >> * read user-supplied number of queues/other queue options (e.g: >> * notify kernel of each RX/TX queue being created/destroyed >> * make binding queues to cores via given API >> * Export data to userland (for example, via sysctl) to permit users: >> a) quickly see current configuration >> b) change CPU binding on-fly >> c) change flowid numbers on-fly (with the possibility to set 1) >> NIC-supplied hash 2) manually supplied value 3) disable setting M_FLOWID) >> >> Having common interface will help users to make network stack tuning >> easier and puts us one step further to make (probably userland) AI which >> can auto-tune system according to template ("router", "webserver") and >> rc.conf configuration (lagg presense, etc..) >> >> >> What do you guys think? > > this is certainly a good idea and a welcome one. > > Linux has tried to come up with a common framework to implement > this kind of controls using "ethtool", and we should probably > have a look at their approach and reuse it (or at least the good ideas) > to avoid reinventing the same thing. > And, though Luigi didn't say it, I will, this should integrate with netmap. Best, George