Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2013 10:30:16 +0000 (UTC)
From:      Andre Oppermann <andre@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254517 - head/sys/netinet
Message-ID:  <201308191030.r7JAUGR6024866@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andre
Date: Mon Aug 19 10:30:15 2013
New Revision: 254517
URL: http://svnweb.freebsd.org/changeset/base/254517

Log:
  Remove unused M_FRAG, M_FIRSTFRAG and M_LASTFRAG tagging from ip_fragment().
  There wasn't any real driver (and hardware) support for it.  Modern hardware
  does full fragmentation/segmentation offload instead.

Modified:
  head/sys/netinet/ip_output.c

Modified: head/sys/netinet/ip_output.c
==============================================================================
--- head/sys/netinet/ip_output.c	Mon Aug 19 10:20:20 2013	(r254516)
+++ head/sys/netinet/ip_output.c	Mon Aug 19 10:30:15 2013	(r254517)
@@ -784,7 +784,7 @@ smart_frag_failure:
 			IPSTAT_INC(ips_odropped);
 			goto done;
 		}
-		m->m_flags |= (m0->m_flags & M_MCAST) | M_FRAG;
+		m->m_flags |= (m0->m_flags & M_MCAST);
 		/*
 		 * In the first mbuf, leave room for the link header, then
 		 * copy the original IP header including options. The payload
@@ -801,10 +801,9 @@ smart_frag_failure:
 		m->m_len = mhlen;
 		/* XXX do we need to add ip_off below ? */
 		mhip->ip_off = ((off - hlen) >> 3) + ip_off;
-		if (off + len >= ip_len) {	/* last fragment */
+		if (off + len >= ip_len)
 			len = ip_len - off;
-			m->m_flags |= M_LASTFRAG;
-		} else
+		else
 			mhip->ip_off |= IP_MF;
 		mhip->ip_len = htons((u_short)(len + mhlen));
 		m->m_next = m_copym(m0, off, len, M_NOWAIT);
@@ -831,10 +830,6 @@ smart_frag_failure:
 	}
 	IPSTAT_ADD(ips_ofragments, nfrags);
 
-	/* set first marker for fragment chain */
-	m0->m_flags |= M_FIRSTFRAG | M_FRAG;
-	m0->m_pkthdr.csum_data = nfrags;
-
 	/*
 	 * Update first fragment by trimming what's been copied out
 	 * and updating header.



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