Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Nov 2012 11:39:23 +0100
From:      Andre Oppermann <oppermann@networx.ch>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>, Pyun YongHyeon <yongari@freebsd.org>
Subject:   Re: svn commit: r242739 - stable/9/sys/dev/ti
Message-ID:  <509B8BDB.4070000@networx.ch>
In-Reply-To: <CAJ-VmomEOPGbLwmOmL0EdenZA7QKbV5P-hAYsTRcwLao2LbAqg@mail.gmail.com>
References:  <201211080206.qA826RiN054539@svn.freebsd.org> <CAJ-VmomEOPGbLwmOmL0EdenZA7QKbV5P-hAYsTRcwLao2LbAqg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08.11.2012 03:15, Adrian Chadd wrote:
> So I am curious - did this give a real benefit?

No.  Not really.  The only place where it would have helped was with
locally sourced packets (from a socket) that are larger than the MTU.
For TCP we set the DF bit (don't fragment) so we get EMSGSIZE when
the MTU is smaller than the packet and no fragmentation happens in any
case.  For UDP fragmentation does happen.  However the UDP checksum is
optional and disabled by default anyway.  So UDP fragment checksum
offloading wouldn't be a gain either way.  What really helps here is
full UDP fragmentation offload (like TSO TCP segmentation offload)
where a large packet is passed down and the NIC splits it up into
MTU sized packets by itself.  Intel and Broadcom do support that
but the feature lay dormant and wasn't exposed to the stack so far.
I've added support for that in my tcp_workqueue branch and plan on
merging it to HEAD once shaken out.  It may be that cards other than
Intel and Broadcom support it as well but so far I've only read the
datasheet of those two.

For forwarded packets no payload checksum has to be recalculated on
fragmentation, only the IP header checksum is recomputed.  That is
still working.

-- 
Andre

> If so, may I suggest we perhaps accelerate discussing if_transmit() of
> multiple frames per call?
> That would allow features like this to be re-enabled.
>
>
>
> Adrian
>
> On 7 November 2012 18:06, Pyun YongHyeon <yongari@freebsd.org> wrote:
>> Author: yongari
>> Date: Thu Nov  8 02:06:27 2012
>> New Revision: 242739
>> URL: http://svnweb.freebsd.org/changeset/base/242739
>>
>> Log:
>>    MFC r242425:
>>      Remove TCP/UDP checksum offloading feature for IP fragmented
>>      datagrams.  Traditionally upper stack fragmented packets without
>>      computing TCP/UDP checksum and these datagrams were passed to
>>      driver.  But there are chances that other packets slip into the
>>      interface queue in SMP world. If this happens firmware running on
>>      MIPS 4000 processor in the controller would see mixed packets and
>>      it shall send out corrupted packets.
>>      While I'm here simplify checksum offloading setup.
>>
>> Modified:
>>    stable/9/sys/dev/ti/if_ti.c
>> Directory Properties:
>>    stable/9/sys/   (props changed)
>>    stable/9/sys/dev/   (props changed)
>>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509B8BDB.4070000>