summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2012-11-27 19:31:49 +0000
committerandre <andre@FreeBSD.org>2012-11-27 19:31:49 +0000
commitcd840ea089c3546a5cd705044efba4e7ec8621e7 (patch)
treeda7bee092c59e24104ada1cb0bc5808ffab3eacf /sys
parent8f5ba051dc5efdc3f379bbfc3acf53cd1e11e5f3 (diff)
downloadFreeBSD-src-cd840ea089c3546a5cd705044efba4e7ec8621e7.zip
FreeBSD-src-cd840ea089c3546a5cd705044efba4e7ec8621e7.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/bce/if_bce.c2
-rw-r--r--sys/dev/bxe/if_bxe.c2
-rw-r--r--sys/net/if_vlan.c2
-rw-r--r--sys/netinet/ip_output.c6
-rw-r--r--sys/sys/mbuf.h1
5 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index 41a1fad..1fb583f 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -9880,7 +9880,7 @@ bce_dump_mbuf(struct bce_softc *sc, struct mbuf *m)
"\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");
diff --git a/sys/dev/bxe/if_bxe.c b/sys/dev/bxe/if_bxe.c
index bd903b5..1193865 100644
--- a/sys/dev/bxe/if_bxe.c
+++ b/sys/dev/bxe/if_bxe.c
@@ -16281,7 +16281,7 @@ void bxe_dump_mbuf(struct bxe_softc *sc, struct mbuf *m)
"\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");
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 379a59b..70ea3ae 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -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;
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 40785bb..ad709a5 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -722,14 +722,12 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu,
* 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;
}
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index a26d5ca..111bffe 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -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 */
OpenPOWER on IntegriCloud