Date: Tue, 30 Oct 2012 11:01:26 +0000 (UTC) From: Andre Oppermann <andre@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242353 - in user/andre/tcp_workqueue/sys: dev/ti net netinet sys Message-ID: <201210301101.q9UB1Qd8075671@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andre Date: Tue Oct 30 11:01:25 2012 New Revision: 242353 URL: http://svn.freebsd.org/changeset/base/242353 Log: Remove unused and unnecessary CSUM_IP_FRAGS checksumming capability. Checksumming the IP header of fragments is no different from doing normal IP headers. Modified: user/andre/tcp_workqueue/sys/dev/ti/if_ti.c user/andre/tcp_workqueue/sys/net/if_vlan.c user/andre/tcp_workqueue/sys/netinet/ip_output.c user/andre/tcp_workqueue/sys/sys/mbuf.h Modified: user/andre/tcp_workqueue/sys/dev/ti/if_ti.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ti/if_ti.c Tue Oct 30 10:59:42 2012 (r242352) +++ user/andre/tcp_workqueue/sys/dev/ti/if_ti.c Tue Oct 30 11:01:25 2012 (r242353) @@ -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. Modified: user/andre/tcp_workqueue/sys/net/if_vlan.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/if_vlan.c Tue Oct 30 10:59:42 2012 (r242352) +++ user/andre/tcp_workqueue/sys/net/if_vlan.c Tue Oct 30 11:01:25 2012 (r242353) @@ -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: user/andre/tcp_workqueue/sys/netinet/ip_output.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/ip_output.c Tue Oct 30 10:59:42 2012 (r242352) +++ user/andre/tcp_workqueue/sys/netinet/ip_output.c Tue Oct 30 11:01:25 2012 (r242353) @@ -725,14 +725,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: user/andre/tcp_workqueue/sys/sys/mbuf.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mbuf.h Tue Oct 30 10:59:42 2012 (r242352) +++ user/andre/tcp_workqueue/sys/sys/mbuf.h Tue Oct 30 11:01:25 2012 (r242353) @@ -279,7 +279,7 @@ 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 */ +/* 0x0008 */ #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?201210301101.q9UB1Qd8075671>