From owner-svn-src-head@FreeBSD.ORG Mon Aug 19 10:34:11 2013 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 ESMTP id 8AE62464; Mon, 19 Aug 2013 10:34:11 +0000 (UTC) (envelope-from andre@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7840122DC; Mon, 19 Aug 2013 10:34:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7JAYBcU027838; Mon, 19 Aug 2013 10:34:11 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7JAYBxm027833; Mon, 19 Aug 2013 10:34:11 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308191034.r7JAYBxm027833@svn.freebsd.org> From: Andre Oppermann Date: Mon, 19 Aug 2013 10:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254518 - head/sys/netinet 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.14 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: Mon, 19 Aug 2013 10:34:11 -0000 Author: andre Date: Mon Aug 19 10:34:10 2013 New Revision: 254518 URL: http://svnweb.freebsd.org/changeset/base/254518 Log: Move ip_reassemble()'s use of the global M_FRAG mbuf flag to a protocol layer specific flag instead. The flag is only relevant while the packet stays in the IP reassembly queue. Discussed with: trociny, glebius Modified: head/sys/netinet/ip_input.c head/sys/netinet/ip_var.h Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Mon Aug 19 10:30:15 2013 (r254517) +++ head/sys/netinet/ip_input.c Mon Aug 19 10:34:10 2013 (r254518) @@ -911,9 +911,9 @@ found: IPSTAT_INC(ips_toosmall); /* XXX */ goto dropfrag; } - m->m_flags |= M_FRAG; + m->m_flags |= M_IP_FRAG; } else - m->m_flags &= ~M_FRAG; + m->m_flags &= ~M_IP_FRAG; ip->ip_off = htons(ntohs(ip->ip_off) << 3); /* @@ -1060,7 +1060,7 @@ found: next += ntohs(GETIP(q)->ip_len); } /* Make sure the last packet didn't have the IP_MF flag */ - if (p->m_flags & M_FRAG) { + if (p->m_flags & M_IP_FRAG) { if (fp->ipq_nfrags > V_maxfragsperpacket) { IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); ip_freef(head, fp); Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Mon Aug 19 10:30:15 2013 (r254517) +++ head/sys/netinet/ip_var.h Mon Aug 19 10:34:10 2013 (r254518) @@ -167,6 +167,7 @@ void kmod_ipstat_dec(int statnum); */ #define M_FASTFWD_OURS M_PROTO1 /* changed dst to local */ #define M_IP_NEXTHOP M_PROTO2 /* explicit ip nexthop */ +#define M_IP_FRAG M_PROTO4 /* fragment reassembly */ #ifdef __NO_STRICT_ALIGNMENT #define IP_HDR_ALIGNED_P(ip) 1