From owner-freebsd-net@FreeBSD.ORG Thu Nov 8 02:15:31 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 EF9F758E; Thu, 8 Nov 2012 02:15:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id B8A3A8FC0A; Thu, 8 Nov 2012 02:15:30 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so1724003pad.13 for ; Wed, 07 Nov 2012 18:15:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ErI1HVLcimIzDCsGrySEB+4h4FYEG9UEO3oN5WEEkJA=; b=CUr8MwbQOOTJyJhh7uJ9webLUrOGmm6spAyjROnomoTFGNmxhh58aVuHSCoVuaBobw p4ZpHEH9feBx5wcdQyPPRkHKvzqxcFMq22bAyt79xTBmmtkZv6WzgpRXPWYq5B5aLnEV CiGWVoXmXHu5KVtJqe1uvZkQV9NRzj6ixmlUAdNEC8Gv3lw8euVniYn8AaGmsSxpT8SQ +MRq8Y2sn95huUymVwCcx/uNlBy6c4VCATt75wXHqzJknVQ+J7mDJLvCADx7flhuAMUb vnV8vvxPy9h8R/A1VKcwV36VEnfiKFRwIInlxzNlI+ZNniYt+HgE3w0JV/G3Q14zIcRL 0GMw== MIME-Version: 1.0 Received: by 10.66.87.105 with SMTP id w9mr18060914paz.5.1352340930526; Wed, 07 Nov 2012 18:15:30 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Wed, 7 Nov 2012 18:15:30 -0800 (PST) In-Reply-To: <201211080206.qA826RiN054539@svn.freebsd.org> References: <201211080206.qA826RiN054539@svn.freebsd.org> Date: Wed, 7 Nov 2012 18:15:30 -0800 X-Google-Sender-Auth: DcywpRTnalmexLZ4wwD8DvV_BhI Message-ID: Subject: Re: svn commit: r242739 - stable/9/sys/dev/ti From: Adrian Chadd To: Pyun YongHyeon Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Net 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 02:15:31 -0000 So I am curious - did this give a real benefit? 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) > > Modified: stable/9/sys/dev/ti/if_ti.c > ============================================================================== > --- stable/9/sys/dev/ti/if_ti.c Thu Nov 8 02:01:04 2012 (r242738) > +++ stable/9/sys/dev/ti/if_ti.c Thu Nov 8 02:06:27 2012 (r242739) > @@ -127,7 +127,7 @@ __FBSDID("$FreeBSD$"); > > #include > > -#define TI_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_IP_FRAGS) > +#define TI_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) > /* > * We can only turn on header splitting if we're using extended receive > * BDs. > @@ -3083,16 +3083,10 @@ ti_encap(struct ti_softc *sc, struct mbu > > m = *m_head; > csum_flags = 0; > - if (m->m_pkthdr.csum_flags) { > - if (m->m_pkthdr.csum_flags & CSUM_IP) > - csum_flags |= TI_BDFLAG_IP_CKSUM; > - if (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP)) > - csum_flags |= TI_BDFLAG_TCP_UDP_CKSUM; > - if (m->m_flags & M_LASTFRAG) > - csum_flags |= TI_BDFLAG_IP_FRAG_END; > - else if (m->m_flags & M_FRAG) > - csum_flags |= TI_BDFLAG_IP_FRAG; > - } > + if (m->m_pkthdr.csum_flags & CSUM_IP) > + csum_flags |= TI_BDFLAG_IP_CKSUM; > + if (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP)) > + csum_flags |= TI_BDFLAG_TCP_UDP_CKSUM; > > frag = sc->ti_tx_saved_prodidx; > for (i = 0; i < nseg; i++) {