From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 8 02:06:28 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1A64F43; Thu, 8 Nov 2012 02:06:27 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BA5A98FC0A; Thu, 8 Nov 2012 02:06:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qA826Rat054541; Thu, 8 Nov 2012 02:06:27 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qA826RiN054539; Thu, 8 Nov 2012 02:06:27 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201211080206.qA826RiN054539@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 8 Nov 2012 02:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242739 - stable/9/sys/dev/ti X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2012 02:06:28 -0000 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++) {