and a bunch of header fields we have to parse the mbuf for.
siphash24 is about 20% of the cost of sending a udp packet on a
trunk interface with tcpbench on my box. if there's a flowid set
we get all that back.
ok mpi@ mikeb@ sthen@
-/* $OpenBSD: if_trunk.c,v 1.119 2015/10/05 13:00:04 mikeb Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.120 2015/10/08 11:39:59 dlg Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
#endif
SIPHASH_CTX ctx;
+ if (m->m_pkthdr.flowid & M_FLOWID_VALID)
+ return (m->m_pkthdr.flowid & M_FLOWID_MASK);
+
SipHash24_Init(&ctx, key);
off = sizeof(*eh);
if (m->m_len < off)