Date: Sun, 10 Nov 2013 23:35:08 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r257931 - projects/mbuf_iovec/sys/net Message-ID: <201311102335.rAANZ8OS090178@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311102335.rAANZ8OS090178>