From owner-freebsd-net@FreeBSD.ORG Tue Oct 29 21:03:45 2013 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 98DF956C; Tue, 29 Oct 2013 21:03:45 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pb0-x22e.google.com (mail-pb0-x22e.google.com [IPv6:2607:f8b0:400e:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6961F2748; Tue, 29 Oct 2013 21:03:45 +0000 (UTC) Received: by mail-pb0-f46.google.com with SMTP id un4so402292pbc.33 for ; Tue, 29 Oct 2013 14:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=GX8gLD4SxWt6kl9FF0AgLSK5vSzpNxvKaob1H5XX4mA=; b=r6PfG3Mwne9Xc2whqETNi5BgbVvnkR2JQt/MRbLhNhQ3Wl5pmTos9mcHRPjgR6dlpW QrzKrk8iIp+GKf0P5+RBE9nu4UWouAf7GsfEwlzc/WYGKxpL5XulywYwdpLoXe9NNr5x Mc80LtdMKsqrbFjijFfdMgUDwJrBlxtYgP5pHaCgXytkP4CktaVhrBz9VNfy+aCeBwUJ Jg2UfGIVCfMXuaMZ+eEQyO7jXcziOG5br6tPPXmpC5p0K2dkBjg6/bnHUEX4hCBzERyj RoXYIgFK29JEc899HG8Nt9Gm2ClzgE9sU/KCwFm1nM3Fw90lsEIHtF8IgypUpD9AZLvL pIBQ== X-Received: by 10.66.233.69 with SMTP id tu5mr2467394pac.78.1383080624103; Tue, 29 Oct 2013 14:03:44 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id v4sm36857732pbq.31.2013.10.29.14.03.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 14:03:43 -0700 (PDT) Sender: Navdeep Parhar Message-ID: <527022AC.4030502@FreeBSD.org> Date: Tue, 29 Oct 2013 14:03:40 -0700 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Andre Oppermann , Luigi Rizzo Subject: Re: MQ Patch. References: <40948D79-E890-4360-A3F2-BEC34A389C7E@lakerest.net> <526FFED9.1070704@freebsd.org> <52701D8B.8050907@freebsd.org> In-Reply-To: <52701D8B.8050907@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Randall Stewart , "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2013 21:03:45 -0000 On 10/29/13 13:41, Andre Oppermann wrote: > Let me jump in here and explain roughly the ideas/path I'm exploring > in creating and eventually implementing a big picture for drivers, > queues, queue management, various QoS and so on: > > Situation: We're still mostly based on the old 4.4BSD IFQ model with > a couple of work-arounds (sndring, drbr) and the bit-rotten ALTQ we > have in tree aren't helpful at all. > > Steps: > > 1. take the soft-queuing method out of the ifnet layer and make it > a property of the driver, so that the upper stack (or actually > protocol L3/L2 mapping/encapsulation layer) calls (*if_transmit) > without any queuing at that point. It then is up to the driver > to decide how it multiplexes multi-core access to its queue(s) > and how they are configured. It would work out much better if the kernel was aware of the number of tx queues of a multiq driver and explicitly selected one in if_transmit. The driver has no information on the CPU affinity etc. of the applications generating the traffic; the kernel does. In general, the kernel has a much better "global view" of the system and some of the stuff currently in the drivers really should move up into the stack. Regards, Navdeep