From owner-freebsd-net@FreeBSD.ORG Thu Aug 24 06:09:33 2006 Return-Path: X-Original-To: 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 71A1116A4DD; Thu, 24 Aug 2006 06:09:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7097D43D55; Thu, 24 Aug 2006 06:09:32 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id k7O69NUc081374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Aug 2006 10:09:23 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id k7O69MN2081373; Thu, 24 Aug 2006 10:09:22 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 24 Aug 2006 10:09:22 +0400 From: Gleb Smirnoff To: David Christensen Message-ID: <20060824060922.GF76666@cell.sick.ru> References: <20060823161649.GE76666@cell.sick.ru> <09BFF2FA5EAB4A45B6655E151BBDD90301D43002@NT-IRVA-0750.brcm.ad.broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <09BFF2FA5EAB4A45B6655E151BBDD90301D43002@NT-IRVA-0750.brcm.ad.broadcom.com> User-Agent: Mutt/1.5.6i Cc: brad@openbsd.org, oleg@FreeBSD.org, net@FreeBSD.org Subject: Re: bge(4) one packet wedge X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2006 06:09:33 -0000 On Wed, Aug 23, 2006 at 12:53:49PM -0700, David Christensen wrote: D> This "lost interrupt" type of problem is addressed by the use of the D> status_tag D> field in the status block. (Listed as bge_rsvd0 in the bge_status_block D> structure). D> Everytime the status block is updated a new tag value is written to the D> status block. D> When the ISR starts the driver should record the status_tag value. At D> the end D> of the ISR, the driver should compare the current status_tag value is D> the status D> block with the value recorded on entry to the ISR. If the values are D> the same D> then no additional status block updates have occurred so there shouldn't D> be D> any packets hanging around. If the values are different then additional D> packets D> or completions are waiting around so the ISR should loop around again. D> At the D> end of the ISR the driver will write the status_tag value it last D> handled to a D> mailbox register, letting the hardware know the last status block update D> handled. D> If necessary the hardware will generate a new interrupt and start the D> process over D> again. D> D> This entire process should be included in the Linux driver, I don't see D> it being D> used in the bge driver (bge_intr()). True, this isn't done in FreeBSD driver. First I started to work on this, but just noticed that I am seeing this problem on 5700 chip, that is known not to support the status tag. What can be the problem for not updated status block in the 5700 case? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE