Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jun 2008 18:38:00 +0200
From:      Andre Oppermann <andre@freebsd.org>
To:        Yony Yossef <yonyossef.lists@gmail.com>
Cc:        freebsd-net@freebsd.org, liranl@mellanox.co.il
Subject:   Re: TSO bug in FreeBSD 7.0 ?
Message-ID:  <485150E8.7050903@freebsd.org>
In-Reply-To: <20def4870806120817q5b755805hfafa0d0d1523f2ad@mail.gmail.com>
References:  <20def4870806120817q5b755805hfafa0d0d1523f2ad@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?485150E8.7050903>