-.\" $OpenBSD: mbuf.9,v 1.89 2015/09/21 11:30:50 mpi Exp $
+.\" $OpenBSD: mbuf.9,v 1.90 2015/10/08 11:36:15 dlg Exp $
.\"
.\" Copyright (c) 2001 Jean-Jacques Bernard-Gundol <jjbg@openbsd.org>
.\" All rights reserved.
.\" (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: September 21 2015 $
+.Dd $Mdocdate: October 8 2015 $
.Dt MBUF 9
.Os
.Sh NAME
SLIST_HEAD(packet_tags, m_tag) tags;
int len;
u_int16_t tagsset;
- u_int16_t pad;
+ u_int16_t flowid;
u_int16_t csum_flags;
u_int16_t ether_vtag;
u_int ph_rtableid;
ICMP/ICMPv6 checksum bad.
.El
.Pp
+The
+.Fa m_pkthdr.flowid
+variable can contain a low resolution (15 bit) classification of a
+flow or connection that the current mbuf is part of.
+If the flowid is valid, it may be used as an alternative to hashing
+the packets content to pick between different paths for the traffic.
+The following masks can be ORed with the flowid:
+.Pp
+.Bl -tag -compact -offset indent -width XXXXXXXXXXXXXXXXXX
+.It Dv M_FLOWID_VALID
+The flow id has been set.
+.It Dv M_FLOWID_MASK
+The flow id.
+.El
+.Pp
When only M_EXT flag is set, an external storage buffer is being used to
hold the data, which is no longer stored in the mbuf.
The data part of the mbuf has now the following elements:
-/* $OpenBSD: mbuf.h,v 1.196 2015/08/14 05:25:29 dlg Exp $ */
+/* $OpenBSD: mbuf.h,v 1.197 2015/10/08 11:36:15 dlg Exp $ */
/* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */
/*
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 pad;
+ u_int16_t 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 */
#define MT_CONTROL 6 /* extra-data protocol message */
#define MT_OOBDATA 7 /* expedited data */
+/* flowid field */
+#define M_FLOWID_VALID 0x8000 /* is the flowid set */
+#define M_FLOWID_MASK 0x7fff /* flow id to map to path */
+
/* flags to m_get/MGET */
#define M_DONTWAIT M_NOWAIT
#define M_WAIT M_WAITOK