svn commit: r257931 - projects/mbuf_iovec/sys/net

Adrian Chadd adrian at FreeBSD.org
Sun Nov 10 23:35:09 UTC 2013


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 *


More information about the svn-src-projects mailing list