From owner-svn-src-head@FreeBSD.ORG Wed Sep 3 08:30:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84BA9D58; Wed, 3 Sep 2014 08:30:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F7701106; Wed, 3 Sep 2014 08:30:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838UJcJ090248; Wed, 3 Sep 2014 08:30:19 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838UIxI090242; Wed, 3 Sep 2014 08:30:18 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409030830.s838UIxI090242@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Sep 2014 08:30:18 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:30:19 -0000 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).