From owner-freebsd-sparc64@FreeBSD.ORG Fri Apr 15 04:27:47 2005 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23FB416A4CE for ; Fri, 15 Apr 2005 04:27:47 +0000 (GMT) Received: from rndsoft.co.kr (michelle.rndsoft.co.kr [211.32.202.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id 228E643D1D for ; Fri, 15 Apr 2005 04:27:46 +0000 (GMT) (envelope-from yongari@rndsoft.co.kr) Received: from yongari@rndsoft.co.kr(192.168.5.90) by MailFilter v1.05 with ESMTP Processed in 0.128437 secs; 15 Apr 2005 13:25:59 +0900 Received: from michelle.rndsoft.co.kr (localhost.rndsoft.co.kr [127.0.0.1]) by michelle.rndsoft.co.kr (8.13.1/8.13.1) with ESMTP id j3F4RVlq008278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Apr 2005 13:27:31 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Received: (from yongari@localhost) by michelle.rndsoft.co.kr (8.13.1/8.13.1/Submit) id j3F4RVo0008277; Fri, 15 Apr 2005 13:27:31 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Fri, 15 Apr 2005 13:27:31 +0900 From: Pyun YongHyeon To: John-Mark Gurney Message-ID: <20050415042731.GD7393@michelle.rndsoft.co.kr> References: <20050414092608.GB2855@michelle.rndsoft.co.kr> <20050414192749.GO56487@funkthat.com> <20050415023902.GC7393@michelle.rndsoft.co.kr> <20050415030935.GQ56487@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050415030935.GQ56487@funkthat.com> User-Agent: Mutt/1.4.2.1i cc: freebsd-sparc64@freebsd.org Subject: Re: em(4) patch X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@rndsoft.co.kr List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 04:27:47 -0000 On Thu, Apr 14, 2005 at 08:09:35PM -0700, John-Mark Gurney wrote: [...] > > IFF_OACTIVE should be set when the hardward cannot queue anymore packets, > and should be cleared when the hardware can accept additional packets.. > It basicly controls calling an interface's if_start routine.. If > IFF_OACTIVE is set, then it is assumed no additional packets can be > processed, and if_start will not be called when a packet is queued for > the interface... > > If you look at net/if_var.h for the define IFQ_HANDOFF_ADJ, you'll > see where it is tested... > Thanks for detailed explanation. Failure of em_encap() does not necessarily mean out of TX decriptors. So previous code is right. But checking IFF_OACTIVE flags at the beginning of em_start_locked() is necessary since the function is called by if_start and TX interrupt handler. > > > > . TX/RX descriptor alignment is 16 not PAGE_SIZE > > > > . TX/RX descriptor length should be multiple of 128 not 4096. > > > > > > You should probably use a define for this... > > > > > > > Yes. But AFAIK if_em_hw.h has no defined constants for these purposes. > > Then add them.. :) > I'll do. > > There are another hardcoded constants for processing 64bit IO BAR. I > > belive these constants should go pcireg.h. > > Hmmm. which ones are these? > patched if_em.c, line 1846. > > > Also, I have work in progress to make non-aligned packets better... > > > I committed part of it as the m_copyup change... On a -current, you > > > should just be able to apply the following change: > > > http://perforce.freebsd.org/fileDiffView.cgi?FSPC=//depot/user/jmg/arm/src/sys/netinet/ip%5finput.c&REV=3&ACT=edit > > > > > > > This looks promising. Some miserable hardwares that use sf(4)/rl(4) > > driver could take advatnage of it. BTW what is IP_HDR_ALIGNED_P macro? > > Look at: > http://perforce.freebsd.org/fileDiffView.cgi?FSPC=//depot/user/jmg/arm/src/sys/netinet/ip%5fvar.h&REV=2&ACT=edit > > and __NO_STRICT_ALIGNMENT should be defined somewhere for i386 and I'll try that. Thanks. > amd64.. I sent an email to bde asking about where to define this, but > he didn't respond... > -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org