From owner-svn-src-projects@FreeBSD.ORG Sun Nov 10 23:35:09 2013 Return-Path: Delivered-To: svn-src-projects@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 1E1DEB6D; Sun, 10 Nov 2013 23:35:09 +0000 (UTC) (envelope-from adrian@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 0B64A29AF; Sun, 10 Nov 2013 23:35:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAANZ8ba090179; Sun, 10 Nov 2013 23:35:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAANZ8OS090178; Sun, 10 Nov 2013 23:35:08 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311102335.rAANZ8OS090178@svn.freebsd.org> From: Adrian Chadd Date: Sun, 10 Nov 2013 23:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r257931 - projects/mbuf_iovec/sys/net X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2013 23:35:09 -0000 Author: adrian Date: Sun Nov 10 23:35:08 2013 New Revision: 257931 URL: http://svnweb.freebsd.org/changeset/base/257931 Log: Convert another couple of mbuf m_data/m_len fiddling points to use the new methods. Sponsored by: Netflix, Inc. Modified: projects/mbuf_iovec/sys/net/if_ethersubr.c Modified: projects/mbuf_iovec/sys/net/if_ethersubr.c ============================================================================== --- projects/mbuf_iovec/sys/net/if_ethersubr.c Sun Nov 10 23:34:32 2013 (r257930) +++ projects/mbuf_iovec/sys/net/if_ethersubr.c Sun Nov 10 23:35:08 2013 (r257931) @@ -1265,8 +1265,7 @@ ether_vlan_mtap(struct bpf_if *bp, struc vlan.evl_proto = vlan.evl_encap_proto; vlan.evl_encap_proto = htons(ETHERTYPE_VLAN); vlan.evl_tag = htons(m->m_pkthdr.ether_vtag); - m->m_len -= sizeof(struct ether_header); - m->m_data += sizeof(struct ether_header); + m_adj_data_head_rel(m, sizeof(struct ether_header)); /* * If a data link has been supplied by the caller, then we will need to * re-create a stack allocated mbuf chain with the following structure: @@ -1287,8 +1286,7 @@ ether_vlan_mtap(struct bpf_if *bp, struc bpf_mtap(bp, &mb); } else bpf_mtap2(bp, &vlan, sizeof(vlan), m); - m->m_len += sizeof(struct ether_header); - m->m_data -= sizeof(struct ether_header); + m_adj_data_head_rel(m, -((int) sizeof(struct ether_header))); } struct mbuf *