From owner-freebsd-net@FreeBSD.ORG Thu Aug 24 19:39:38 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 0FC3816A4E6; Thu, 24 Aug 2006 19:39:38 +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 45AAE43D55; Thu, 24 Aug 2006 19:39:35 +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 k7OJdTgb085889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Aug 2006 23:39:29 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id k7OJdTMk085888; Thu, 24 Aug 2006 23:39:29 +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 23:39:28 +0400 From: Gleb Smirnoff To: David Christensen Message-ID: <20060824193928.GP76666@cell.sick.ru> References: <20060824060922.GF76666@cell.sick.ru> <09BFF2FA5EAB4A45B6655E151BBDD90301D4325E@NT-IRVA-0750.brcm.ad.broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <09BFF2FA5EAB4A45B6655E151BBDD90301D4325E@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 19:39:38 -0000 David, On Thu, Aug 24, 2006 at 10:29:32AM -0700, David Christensen wrote: D> In general the problem isn't that the status block isn't being updated, D> but that D> the status update occurs AFTER the ISR has stopped looking at the status D> block, but before the ISR has re-enabled interrupts, thus missing the D> update. D> That's why tagged status mode is an improvement, the ISR actively tells D> the D> hardware which status block update it last processed and forces the D> hardware D> to generate another interrupt if a status block update was missed by the D> ISR. My kgdb session shows that the status block is not updated later, after ISR, but isn't updated at all until next packet arrives! It looks like this: once netperf wedges, I run kgdb, find address of softc, look at status block, look that the ring index is the same as saved in softc. It takes a minute for me to type all these things. Status block isn't updated. Then I can look into the ring itself at the index+1 descriptor, and analyze the mbuf inside of it. This mbuf will be that one wedged packet! The packet I would see in tcpdump as soon as I send another one. Ok, can you please review the patch, I've sent earlier today, that utilizes the status block tag correctly? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE