From owner-svn-src-head@FreeBSD.ORG Tue Nov 19 21:06:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFE8B408; Tue, 19 Nov 2013 21:06:12 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id A44302C72; Tue, 19 Nov 2013 21:06:11 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 44E277300A; Tue, 19 Nov 2013 22:08:21 +0100 (CET) Date: Tue, 19 Nov 2013 22:08:21 +0100 From: Luigi Rizzo To: "George V. Neville-Neil" Subject: Re: svn commit: r258328 - head/sys/net Message-ID: <20131119210821.GA13961@onelab2.iet.unipi.it> References: <201311182258.rAIMwEFd048783@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311182258.rAIMwEFd048783@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 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: Tue, 19 Nov 2013 21:06:13 -0000 On Mon, Nov 18, 2013 at 10:58:14PM +0000, George V. Neville-Neil wrote: > Author: gnn > Date: Mon Nov 18 22:58:14 2013 > New Revision: 258328 > URL: http://svnweb.freebsd.org/changeset/base/258328 > > Log: > Allow ethernet drivers to pass in packets connected via the nextpkt pointer. > Handling packets in this way allows drivers to amortize work during packet reception. yes. This is only a first step and eventually we should pass the entire batch to the netisr handler to further reduce overhead. Some of the followup emails suggested to change the argument from struct mbuf * to something else. I do think we should change it, but what we need is a struct with head and tail pointers _and_ a counter, because sometimes the code downstream may have to append the mbuf/batch to a queue, and these extra fields would save iterating through the chain. Related to this: at some point we should also address batching in the transmit path, and for that we will eventually need to introduce a 'more packets to come' flag to the API/mbuf so that intermediate functions in the path will build batches before passing them down. cheers luigi