diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-11-12 10:07:15 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-11-12 10:07:15 +0000 |
commit | 99c72e5cd99254c79c11b9b9eaadffed9ef9bfb7 (patch) | |
tree | a294017eceae8ea5e333f687e313726188da5c10 | |
parent | a7ef133359c667d6c47bbf3b4ad2bdd05ba19416 (diff) |
Prefix flowid with ph_ and print it in m_print().
ok dlg@
-rw-r--r-- | share/man/man9/mbuf.9 | 6 | ||||
-rw-r--r-- | sys/kern/uipc_mbuf.c | 3 | ||||
-rw-r--r-- | sys/net/if_trunk.c | 6 | ||||
-rw-r--r-- | sys/net/pf.c | 4 | ||||
-rw-r--r-- | sys/sys/mbuf.h | 4 |
5 files changed, 12 insertions, 11 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index ff70ab9112c..679c25b9f0b 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mbuf.9,v 1.92 2015/10/30 21:21:19 benno Exp $ +.\" $OpenBSD: mbuf.9,v 1.93 2015/11/12 10:07:14 mpi Exp $ .\" .\" Copyright (c) 2001 Jean-Jacques Bernard-Gundol <jjbg@openbsd.org> .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 30 2015 $ +.Dd $Mdocdate: November 12 2015 $ .Dt MBUF 9 .Os .Sh NAME @@ -124,7 +124,7 @@ struct pkthdr { SLIST_HEAD(packet_tags, m_tag) tags; int len; u_int16_t tagsset; - u_int16_t flowid; + u_int16_t ph_flowid; u_int16_t csum_flags; u_int16_t ether_vtag; u_int ph_rtableid; diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 78b70935be3..8a1124f0b7b 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.211 2015/11/02 09:21:48 dlg Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.212 2015/11/12 10:07:14 mpi Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -1231,6 +1231,7 @@ m_print(void *v, (*pr)("m_ptkhdr.tags: %p\tm_pkthdr.tagsset: %b\n", SLIST_FIRST(&m->m_pkthdr.tags), m->m_pkthdr.tagsset, MTAG_BITS); + (*pr)("m_pkthdr.ph_flowid: %u\n", m->m_pkthdr.ph_flowid); (*pr)("m_pkthdr.csum_flags: %b\n", m->m_pkthdr.csum_flags, MCS_BITS); (*pr)("m_pkthdr.ether_vtag: %u\tm_ptkhdr.ph_rtableid: %u\n", diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index ee77fde80db..3fe22700419 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.122 2015/10/25 12:05:40 mpi Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.123 2015/11/12 10:07:14 mpi Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -965,8 +965,8 @@ trunk_hashmbuf(struct mbuf *m, SIPHASH_KEY *key) #endif SIPHASH_CTX ctx; - if (m->m_pkthdr.flowid & M_FLOWID_VALID) - return (m->m_pkthdr.flowid & M_FLOWID_MASK); + if (m->m_pkthdr.ph_flowid & M_FLOWID_VALID) + return (m->m_pkthdr.ph_flowid & M_FLOWID_MASK); SipHash24_Init(&ctx, key); off = sizeof(*eh); diff --git a/sys/net/pf.c b/sys/net/pf.c index a5fa24024df..0b2a3e2fd84 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.949 2015/11/06 17:55:55 mpi Exp $ */ +/* $OpenBSD: pf.c,v 1.950 2015/11/12 10:07:14 mpi Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -6531,7 +6531,7 @@ done: } if (s) { - pd.m->m_pkthdr.flowid = M_FLOWID_VALID | + pd.m->m_pkthdr.ph_flowid = M_FLOWID_VALID | (M_FLOWID_MASK & bemtoh64(&s->id)); } diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 6117d5c58f3..40edc1ad3fc 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mbuf.h,v 1.200 2015/11/02 09:21:48 dlg Exp $ */ +/* $OpenBSD: mbuf.h,v 1.201 2015/11/12 10:07:14 mpi Exp $ */ /* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */ /* @@ -125,7 +125,7 @@ struct pkthdr { SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */ int len; /* total packet length */ u_int16_t tagsset; /* mtags attached */ - u_int16_t flowid; /* pseudo unique flow id */ + u_int16_t ph_flowid; /* pseudo unique flow id */ u_int16_t csum_flags; /* checksum flags */ u_int16_t ether_vtag; /* Ethernet 802.1p+Q vlan tag */ u_int ph_rtableid; /* routing table id */ |