From owner-freebsd-sparc64@FreeBSD.ORG Fri Apr 15 06:00: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 B4CCB16A4CE for ; Fri, 15 Apr 2005 06:00:47 +0000 (GMT) Received: from rndsoft.co.kr (michelle.rndsoft.co.kr [211.32.202.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA40643D31 for ; Fri, 15 Apr 2005 06:00: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.127568 secs; 15 Apr 2005 14:59:00 +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 j3F60X4L008624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Apr 2005 15:00:33 +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 j3F60W8F008623; Fri, 15 Apr 2005 15:00:32 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Fri, 15 Apr 2005 15:00:32 +0900 From: Pyun YongHyeon To: John-Mark Gurney Message-ID: <20050415060032.GF7393@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> <20050415042731.GD7393@michelle.rndsoft.co.kr> <20050415051112.GE7393@michelle.rndsoft.co.kr> <20050415054627.GR56487@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050415054627.GR56487@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 06:00:47 -0000 On Thu, Apr 14, 2005 at 10:46:27PM -0700, John-Mark Gurney wrote: > > With your changes JUMBO frames work here. This should also fix PR75794. > > It would be really great if your changes could be comitted. > > I was working on trying to get some performance measurements by using > if_re... But I haven't been able to get if_re to work on sparc64... > I don't have hardware that use re(4) so don't know current status of re(4) on sparc64. :-( > Though if em doesn't need realignment for normal frames, why do we need > them for jumbo? > Look at: if_em.c(stock version) line 2605, 2592 if (mp == NULL) { 2593 mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); 2594 if (mp == NULL) { 2595 adapter->mbuf_cluster_failed++; 2596 return(ENOBUFS); 2597 } 2598 mp->m_len = mp->m_pkthdr.len = MCLBYTES; 2599 } else { 2600 mp->m_len = mp->m_pkthdr.len = MCLBYTES; 2601 mp->m_data = mp->m_ext.ext_buf; 2602 mp->m_next = NULL; 2603 } 2604 2605 if (ifp->if_mtu <= ETHERMTU) { 2606 m_adj(mp, ETHER_ALIGN); 2607 } 2608 2609 rx_buffer = &adapter->rx_buffer_area[i]; If mtu is greater than ETHERMTU em(4) does not align it. When JUMBO frame is used the frame would occupy several RX descriptors and it can't use simple m_adj. -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org