Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2012 04:39:41 +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-9@freebsd.org
Subject:   svn commit: r243551 - stable/9/sys/dev/bge
Message-ID:  <201211260439.qAQ4df9d095975@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon Nov 26 04:39:41 2012
New Revision: 243551
URL: http://svnweb.freebsd.org/changeset/base/243551

Log:
  MFC r242426:
    TCP/UDP checksum offloading feature for IP fragmented datagram was
    removed in r99417.  bge(4) controllers can do TCP checksum offload
    for IP fragmented datagrams but unlike ti(4), it lacks UDP checksum
    offloading for IP fragmented datagrams. The problem was bge(4)
    blindly requested TCP/UDP checksum for IP fragmented datagrams such
    that it resulted in corrupted UDP datagrams before r99417.
    Remove remaining code for TCP checksum offloading for IP fragmented
    datagrams which should have been removed in r99417.

Modified:
  stable/9/sys/dev/bge/if_bge.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bge/if_bge.c
==============================================================================
--- stable/9/sys/dev/bge/if_bge.c	Mon Nov 26 04:34:53 2012	(r243550)
+++ stable/9/sys/dev/bge/if_bge.c	Mon Nov 26 04:39:41 2012	(r243551)
@@ -5128,10 +5128,6 @@ bge_encap(struct bge_softc *sc, struct m
 				return (error);
 			}
 		}
-		if (m->m_flags & M_LASTFRAG)
-			csum_flags |= BGE_TXBDFLAG_IP_FRAG_END;
-		else if (m->m_flags & M_FRAG)
-			csum_flags |= BGE_TXBDFLAG_IP_FRAG;
 	}
 
 	if ((m->m_pkthdr.csum_flags & CSUM_TSO) == 0) {
@@ -5253,29 +5249,6 @@ bge_start_locked(struct ifnet *ifp)
 			break;
 
 		/*
-		 * XXX
-		 * The code inside the if() block is never reached since we
-		 * must mark CSUM_IP_FRAGS in our if_hwassist to start getting
-		 * requests to checksum TCP/UDP in a fragmented packet.
-		 *
-		 * XXX
-		 * safety overkill.  If this is a fragmented packet chain
-		 * with delayed TCP/UDP checksums, then only encapsulate
-		 * it if we have enough descriptors to handle the entire
-		 * chain at once.
-		 * (paranoia -- may not actually be needed)
-		 */
-		if (m_head->m_flags & M_FIRSTFRAG &&
-		    m_head->m_pkthdr.csum_flags & (CSUM_DELAY_DATA)) {
-			if ((BGE_TX_RING_CNT - sc->bge_txcnt) <
-			    m_head->m_pkthdr.csum_data + 16) {
-				IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
-				ifp->if_drv_flags |= IFF_DRV_OACTIVE;
-				break;
-			}
-		}
-
-		/*
 		 * Pack the data into the transmit ring. If we
 		 * don't have room, set the OACTIVE flag and wait
 		 * for the NIC to drain the ring.



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