From owner-freebsd-arch@FreeBSD.ORG Mon Jul 31 19:09:25 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 344DC16A4E2; Mon, 31 Jul 2006 19:09:25 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A27443D60; Mon, 31 Jul 2006 19:09:24 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (pq0v1uefe3wdhse6@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k6VJ9OGn098109; Mon, 31 Jul 2006 12:09:24 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k6VJ9MbM098108; Mon, 31 Jul 2006 12:09:22 -0700 (PDT) (envelope-from jmg) Date: Mon, 31 Jul 2006 12:09:22 -0700 From: John-Mark Gurney To: Robert Watson Message-ID: <20060731190922.GJ96589@funkthat.com> Mail-Followup-To: Robert Watson , John Polstra , arch@freebsd.org, net@freebsd.org References: <20060731180643.E71432@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060731180643.E71432@fledge.watson.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: arch@FreeBSD.org, net@FreeBSD.org, John Polstra Subject: Re: Changes in the network interface queueing handoff model X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2006 19:09:25 -0000 Robert Watson wrote this message on Mon, Jul 31, 2006 at 18:08 +0100: > >I question whether you need a fallback software if_snd queue at all for > >modern devices such as the Intel and Broadcom gigabit chips. The hardware > >transmit descriptor rings typically have sizes of the order of 256 > >descriptors. I think if the ring fills up, you could simply drop the > >packet with ENOBUFS. That's what happens if the if_snd queue fills up, > >and its maximum size is comparable to the sizes of modern descriptor > >rings. It would simplify things quite a bit to eliminate the if_snd queue > >entirely for such devices. > > I tend to agree, but implemented full queueing support for if_em to make > sure I understood to complexity implications of completely removing > queueing from the ifnet side dispatch. I guess an interesting question for > us is how we decide what the right threshold is to implement software > queuing. Do any if_em cards need software queueing, or do they all have > adequate in-hardware queues as is? Entirely cutting the queue code would > significantly simplify em_startmbuf. This work tends to lead to a generic ethernet card framework that I've been thinking about.. where instead of cards doing all the handling of a ring buffer, the card registers a few functions to manipulate a ring buffer (if it has one), and does the necessary work... Though encoding all the different style of ring buffers may be interesting, per packet instead of per segment (if_re)... The other part is to digest the current monolithic lock structure that the ethernet cards have, into three (or four) different locks, tx head, tx tail, rx head & tail... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."