From owner-freebsd-net@FreeBSD.ORG Thu Aug 24 01:47:49 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 A26CC16A4E9 for ; Thu, 24 Aug 2006 01:47:49 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B06643D70 for ; Thu, 24 Aug 2006 01:47:38 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so437494pye for ; Wed, 23 Aug 2006 18:47:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=pFcn0S47HOG9o2GaCD+K0Alc3TdtFr55kMgjjjBVjvGpVORaMnfSQTylsnn713MT02G0atypbo+bonOiS4gdK5BlB8+2zXmus7SoYixwkVknEMEh56tCZd+p4aYCdz2rXGuelzc9086Vfa0OwLhyNxDdkD1S5nH3e02qTVopqaE= Received: by 10.35.11.15 with SMTP id o15mr1702661pyi; Wed, 23 Aug 2006 18:47:38 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.gmail.com with ESMTP id 15sm2024789nzp.2006.08.23.18.47.35; Wed, 23 Aug 2006 18:47:37 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id k7O1ljAv023191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Aug 2006 10:47:45 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k7O1lhmw023190; Thu, 24 Aug 2006 10:47:43 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Thu, 24 Aug 2006 10:47:43 +0900 From: Pyun YongHyeon To: David Christensen Message-ID: <20060824014743.GF22634@cdnetworks.co.kr> References: <20060823161649.GE76666@cell.sick.ru> <09BFF2FA5EAB4A45B6655E151BBDD90301D43002@NT-IRVA-0750.brcm.ad.broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09BFF2FA5EAB4A45B6655E151BBDD90301D43002@NT-IRVA-0750.brcm.ad.broadcom.com> User-Agent: Mutt/1.4.2.1i Cc: brad@openbsd.org, Gleb Smirnoff , 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 Reply-To: pyunyh@gmail.com 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 01:47:49 -0000 On Wed, Aug 23, 2006 at 12:53:49PM -0700, David Christensen wrote: > This "lost interrupt" type of problem is addressed by the use of the > status_tag > field in the status block. (Listed as bge_rsvd0 in the bge_status_block > structure). > Everytime the status block is updated a new tag value is written to the > status block. > When the ISR starts the driver should record the status_tag value. At > the end > of the ISR, the driver should compare the current status_tag value is > the status > block with the value recorded on entry to the ISR. If the values are > the same > then no additional status block updates have occurred so there shouldn't > be > any packets hanging around. If the values are different then additional > packets > or completions are waiting around so the ISR should loop around again. > At the > end of the ISR the driver will write the status_tag value it last > handled to a > mailbox register, letting the hardware know the last status block update > handled. > If necessary the hardware will generate a new interrupt and start the > process over > again. > > This entire process should be included in the Linux driver, I don't see > it being > used in the bge driver (bge_intr()). > Hi, I have a question too. How we know generated interrupt is ours? It seems that status block could be updated before/after generation of an interrupt. If the interrupt is shared with other devices what is correct way to know the origion of the interrupt? -- Regards, Pyun YongHyeon