Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Nov 2012 02:08:42 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r242740 - stable/8/sys/dev/ti
Message-ID:  <201211080208.qA828gAD054897@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Thu Nov  8 02:08:42 2012
New Revision: 242740
URL: http://svnweb.freebsd.org/changeset/base/242740

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/8/sys/dev/ti/if_ti.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/ti/   (props changed)

Modified: stable/8/sys/dev/ti/if_ti.c
==============================================================================
--- stable/8/sys/dev/ti/if_ti.c	Thu Nov  8 02:06:27 2012	(r242739)
+++ stable/8/sys/dev/ti/if_ti.c	Thu Nov  8 02:08:42 2012	(r242740)
@@ -127,7 +127,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/sysctl.h>
 
-#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.
@@ -3085,16 +3085,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++) {



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