From owner-freebsd-net@FreeBSD.ORG Sun Jun 18 19:40:50 2006 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13FBD16A474; Sun, 18 Jun 2006 19:40:50 +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 93D4643D53; Sun, 18 Jun 2006 19:40:48 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (og7r2qmqpfp7cv9u@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k5IJemLd074135; Sun, 18 Jun 2006 12:40:48 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k5IJejCW074134; Sun, 18 Jun 2006 12:40:45 -0700 (PDT) (envelope-from jmg) Date: Sun, 18 Jun 2006 12:40:44 -0700 From: John-Mark Gurney To: John Polstra Message-ID: <20060618194044.GC1142@funkthat.com> Mail-Followup-To: John Polstra , Robert Watson , freebsd-net@FreeBSD.org References: <20060615115738.J2512@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: freebsd-net@FreeBSD.org, Robert Watson Subject: Re: IF_HANDOFF vs. IFQ_HANDOFF X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2006 19:40:50 -0000 John Polstra wrote this message on Thu, Jun 15, 2006 at 09:18 -0700: > in the HW but have not yet completed. When the completion interrupt > comes in, the driver is supposed to check the if_snd queue for more > mbufs and process them. Only when the transmit side of the HW goes > totally idle should IFF_OACTIVE be cleared again. Most of our drivers > set the flag only when they run out of transmit descriptors (i.e., > practically never), which is just plain wrong. But the problem is that for small packets, this can mean that there will be a delay in handling the ring if we wait to process packets once the tx ring is empty.. if we ever want to max out gige w/ 64byte packets, we have to clear OACTIVE whenever tx approches running out of packets before we can send this.. In most cases we don't know how long that is (since we don't keep track of packet sizes, etc), so it's easiest/best to clear it whenever the tx ring is not full... Please read the archive of when I changed if_re to use this "correct" intereptation of OACTIVE and the fall out because of it first... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."