From owner-freebsd-net@FreeBSD.ORG Thu Jun 12 16:38:01 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57BB61065672 for ; Thu, 12 Jun 2008 16:38:01 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id C1DD38FC17 for ; Thu, 12 Jun 2008 16:38:00 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 88804 invoked from network); 12 Jun 2008 15:33:05 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 12 Jun 2008 15:33:05 -0000 Message-ID: <485150E8.7050903@freebsd.org> Date: Thu, 12 Jun 2008 18:38:00 +0200 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: Yony Yossef References: <20def4870806120817q5b755805hfafa0d0d1523f2ad@mail.gmail.com> In-Reply-To: <20def4870806120817q5b755805hfafa0d0d1523f2ad@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, liranl@mellanox.co.il Subject: Re: TSO bug in FreeBSD 7.0 ? 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, 12 Jun 2008 16:38:01 -0000 Yony Yossef wrote: > Hi freebsd-net, > > I'm seeing mbuf chains larger than 64K being sent down by FreeBSD 7 when TSO > is enabled. > Then my driver crashes in bus_dmamap_load_mbuf_sg (error=EINVAL). > I'm printing the mbuf m_pkthdr.len size right after the DEQUEUE from the > stack: > > IFQ_DRV_DEQUEUE(&dev->if_snd, m_head); > if (m_head == NULL) > break; > if (m_head->m_pkthdr.len > 65000) { > printf("TSO packet mbuf len:%d\n", m_head->m_pkthdr.len); > } > and the output is: > > .... > TSO packet mbuf len:65387 > TSO packet mbuf len:65417 > TSO packet mbuf len:65447 > TSO packet mbuf len:65477 > TSO packet mbuf len:65507 > TSO packet mbuf len:65537 > mtnic0: bus_dmamap_load_mbuf_sg error: 22 > xmit_failure:12 > ... > > Note the 65537, I've also seen TSO packets sized 65542. > > There's this old thread talking about it: > http://unix.derkeiler.com/Mailing-Lists/FreeBSD/net/2007-02/msg00312.html > but I've seen no solution for this bug. > > Is there a fix for that? This bug is supposed to be fixed and the fix should also be included in 7.0. The other users of TSO reported no more overflows. I'll have another look whether later changes may have had an effect. -- Andre