Date: Wed, 3 Sep 2014 08:30:18 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271006 - in head/sys: net netinet netpfil/pf sys Message-ID: <201409030830.s838UIxI090242@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Wed Sep 3 08:30:18 2014 New Revision: 271006 URL: http://svnweb.freebsd.org/changeset/base/271006 Log: Clean up unused CSUM_FRAGMENT. Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_output.c head/sys/netpfil/pf/pf.c head/sys/sys/mbuf.h Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/net/if_vlan.c Wed Sep 3 08:30:18 2014 (r271006) @@ -1501,7 +1501,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_FRAGMENT); + CSUM_UDP | CSUM_SCTP); } else { ifp->if_capenable = 0; ifp->if_hwassist = 0; Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/netinet/ip_fastfwd.c Wed Sep 3 08:30:18 2014 (r271006) @@ -523,8 +523,7 @@ passout: else mtu = ifp->if_mtu; - if (ip_len <= mtu || - (ifp->if_hwassist & CSUM_FRAGMENT && (ip_off & IP_DF) == 0)) { + if (ip_len <= mtu) { /* * Avoid confusing lower layers. */ Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/netinet/ip_output.c Wed Sep 3 08:30:18 2014 (r271006) @@ -624,8 +624,7 @@ passout: * care of the fragmentation for us, we can just send directly. */ if (ip_len <= mtu || - (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || - ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { + (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0) { ip->ip_sum = 0; if (m->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) { ip->ip_sum = in_cksum(m, hlen); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/netpfil/pf/pf.c Wed Sep 3 08:30:18 2014 (r271006) @@ -5332,8 +5332,7 @@ pf_route(struct mbuf **m, struct pf_rule * care of the fragmentation for us, we can just send directly. */ if (ip_len <= ifp->if_mtu || - (m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || - ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { + (m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0) { ip->ip_sum = 0; if (m0->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) { ip->ip_sum = in_cksum(m0, ip->ip_hl << 2); Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/sys/mbuf.h Wed Sep 3 08:30:18 2014 (r271006) @@ -445,7 +445,6 @@ void sf_ext_free(void *, void *); #define CSUM_UDP_IPV6 CSUM_IP6_UDP #define CSUM_TCP_IPV6 CSUM_IP6_TCP #define CSUM_SCTP_IPV6 CSUM_IP6_SCTP -#define CSUM_FRAGMENT 0x0 /* Unused */ /* * mbuf types describing the content of the mbuf (including external storage).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409030830.s838UIxI090242>