From owner-freebsd-net@FreeBSD.ORG Thu Nov 8 10:39:30 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EFB878F for ; Thu, 8 Nov 2012 10:39:30 +0000 (UTC) (envelope-from oppermann@networx.ch) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 80E1A8FC19 for ; Thu, 8 Nov 2012 10:39:29 +0000 (UTC) Received: (qmail 64326 invoked from network); 8 Nov 2012 12:14:36 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 8 Nov 2012 12:14:36 -0000 Message-ID: <509B8BDB.4070000@networx.ch> Date: Thu, 08 Nov 2012 11:39:23 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r242739 - stable/9/sys/dev/ti References: <201211080206.qA826RiN054539@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Net , Pyun YongHyeon X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 08 Nov 2012 10:39:30 -0000 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 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) >>