From owner-cvs-src@FreeBSD.ORG Wed Nov 1 15:27:45 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C78316A4FA; Wed, 1 Nov 2006 15:27:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA74A43D49; Wed, 1 Nov 2006 15:27:44 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA1FRa2L001625; Wed, 1 Nov 2006 10:27:40 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Gleb Smirnoff Date: Wed, 1 Nov 2006 10:27:22 -0500 User-Agent: KMail/1.9.1 References: <200610311721.k9VHLFpw058923@repoman.freebsd.org> <20061101101928.GJ75694@FreeBSD.org> <20061101104648.GK75694@FreeBSD.org> In-Reply-To: <20061101104648.GK75694@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611011027.23169.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 01 Nov 2006 10:27:40 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2138/Wed Nov 1 06:55:22 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/em if_em.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2006 15:27:45 -0000 On Wednesday 01 November 2006 05:46, Gleb Smirnoff wrote: > On Wed, Nov 01, 2006 at 01:19:28PM +0300, Gleb Smirnoff wrote: > T> On Wed, Nov 01, 2006 at 11:05:24AM +0100, Pawel Worach wrote: > T> P> On 10/31/06, John Baldwin wrote: > T> P> >jhb 2006-10-31 17:21:15 UTC > T> P> > > T> P> > FreeBSD src repository > T> P> > > T> P> > Modified files: > T> P> > sys/dev/em if_em.c > T> P> > Log: > T> P> > Allocate receive and transmit data structures during attach() and free > T> P> > them > T> P> > T> P> Could this be related? > T> > T> Yes, it is. John's patch was tested on RELENG_6 only, where TSO support > T> isn't yet present. > T> > T> I'll try to fix this. > > The attached patch fixes this. I am not sure whether it is correct, > I've mimiced behaviour of mxge(4) driver here. Ahh, hmm. I think it still needs to support variable size based on whether or not the adapter supports TSO just to be safe. How about this: Index: if_em.c =================================================================== RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v retrieving revision 1.160 diff -u -r1.160 if_em.c --- if_em.c 31 Oct 2006 17:21:14 -0000 1.160 +++ if_em.c 1 Nov 2006 15:26:42 -0000 @@ -1100,10 +1100,6 @@ if (adapter->hw.mac_type >= em_82543) { if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = EM_CHECKSUM_FEATURES; - /* - * em_setup_transmit_structures() will behave differently - * based on the state of TSO. - */ if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= EM_TCPSEG_FEATURES; } @@ -2626,7 +2622,8 @@ segsize = size = roundup2(adapter->hw.max_frame_size, MCLBYTES); /* Overrides for TSO - want large sizes */ - if (ifp->if_hwassist & EM_TCPSEG_FEATURES) { + if ((adapter->hw.mac_type > em_82544) && + (adapter->hw.mac_type != em_82547)) { size = EM_TSO_SIZE; segsize = PAGE_SIZE; } -- John Baldwin