Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2012 19:31:49 +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: r243624 - in head/sys: dev/bce dev/bxe net netinet sys
Message-ID:  <201211271931.qARJVnxF040845@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andre
Date: Tue Nov 27 19:31:49 2012
New Revision: 243624
URL: http://svnweb.freebsd.org/changeset/base/243624

Log:
  Remove unused and unnecessary CSUM_IP_FRAGS checksumming capability.
  Checksumming the IP header of fragments is no different from doing
  normal IP headers.
  
  Discussed with:	yongari
  MFC after:	1 week

Modified:
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bxe/if_bxe.c
  head/sys/net/if_vlan.c
  head/sys/netinet/ip_output.c
  head/sys/sys/mbuf.h

Modified: head/sys/dev/bce/if_bce.c
==============================================================================
--- head/sys/dev/bce/if_bce.c	Tue Nov 27 19:23:54 2012	(r243623)
+++ head/sys/dev/bce/if_bce.c	Tue Nov 27 19:31:49 2012	(r243624)
@@ -9880,7 +9880,7 @@ bce_dump_mbuf(struct bce_softc *sc, stru
 			    "\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG"
 			    "\22M_PROMISC\23M_NOFREE",
 			    mp->m_pkthdr.csum_flags,
-			    "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS"
+			    "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP"
 			    "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED"
 			    "\12CSUM_IP_VALID\13CSUM_DATA_VALID"
 			    "\14CSUM_PSEUDO_HDR");

Modified: head/sys/dev/bxe/if_bxe.c
==============================================================================
--- head/sys/dev/bxe/if_bxe.c	Tue Nov 27 19:23:54 2012	(r243623)
+++ head/sys/dev/bxe/if_bxe.c	Tue Nov 27 19:31:49 2012	(r243624)
@@ -16281,7 +16281,7 @@ void bxe_dump_mbuf(struct bxe_softc *sc,
 			    "\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG"
 			    "\22M_PROMISC\23M_NOFREE",
 			    m->m_pkthdr.csum_flags,
-			    "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS"
+			    "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP"
 			    "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED"
 			    "\12CSUM_IP_VALID\13CSUM_DATA_VALID"
 			    "\14CSUM_PSEUDO_HDR");

Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c	Tue Nov 27 19:23:54 2012	(r243623)
+++ head/sys/net/if_vlan.c	Tue Nov 27 19:31:49 2012	(r243624)
@@ -1493,7 +1493,7 @@ vlan_capabilities(struct ifvlan *ifv)
 	    p->if_capenable & IFCAP_VLAN_HWTAGGING) {
 		ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM;
 		ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP |
-		    CSUM_UDP | CSUM_SCTP | CSUM_IP_FRAGS | CSUM_FRAGMENT);
+		    CSUM_UDP | CSUM_SCTP | CSUM_FRAGMENT);
 	} else {
 		ifp->if_capenable = 0;
 		ifp->if_hwassist = 0;

Modified: head/sys/netinet/ip_output.c
==============================================================================
--- head/sys/netinet/ip_output.c	Tue Nov 27 19:23:54 2012	(r243623)
+++ head/sys/netinet/ip_output.c	Tue Nov 27 19:31:49 2012	(r243624)
@@ -722,14 +722,12 @@ ip_fragment(struct ip *ip, struct mbuf *
 	 * If the interface will not calculate checksums on
 	 * fragmented packets, then do it here.
 	 */
-	if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA &&
-	    (if_hwassist_flags & CSUM_IP_FRAGS) == 0) {
+	if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
 		in_delayed_cksum(m0);
 		m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
 	}
 #ifdef SCTP
-	if (m0->m_pkthdr.csum_flags & CSUM_SCTP &&
-	    (if_hwassist_flags & CSUM_IP_FRAGS) == 0) {
+	if (m0->m_pkthdr.csum_flags & CSUM_SCTP) {
 		sctp_delayed_cksum(m0, hlen);
 		m0->m_pkthdr.csum_flags &= ~CSUM_SCTP;
 	}

Modified: head/sys/sys/mbuf.h
==============================================================================
--- head/sys/sys/mbuf.h	Tue Nov 27 19:23:54 2012	(r243623)
+++ head/sys/sys/mbuf.h	Tue Nov 27 19:31:49 2012	(r243624)
@@ -279,7 +279,6 @@ struct mbuf {
 #define	CSUM_IP			0x0001		/* will csum IP */
 #define	CSUM_TCP		0x0002		/* will csum TCP */
 #define	CSUM_UDP		0x0004		/* will csum UDP */
-#define	CSUM_IP_FRAGS		0x0008		/* will csum IP fragments */
 #define	CSUM_FRAGMENT		0x0010		/* will do IP fragmentation */
 #define	CSUM_TSO		0x0020		/* will do TSO */
 #define	CSUM_SCTP		0x0040		/* will csum SCTP */



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