diff options
author | dlg <dlg@openbsd.org> | 2020-06-17 06:45:22 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2020-06-17 06:45:22 +0000 |
commit | 379654e8aeea3de2831b9211617a4fafc616564f (patch) | |
tree | 31f423dd4b6977b4a150c60b61410f8545f09578 /sys/net/if.c | |
parent | Remove some of the unnecessary complications in the calculation of the (diff) | |
download | wireguard-openbsd-379654e8aeea3de2831b9211617a4fafc616564f.tar.xz wireguard-openbsd-379654e8aeea3de2831b9211617a4fafc616564f.zip |
make ph_flowid in mbufs 16bits by storing whether it's set in csum_flags.
i've been wanting to do this for a while, and now that we've got
stoeplitz and it gives us 16 bits, it seems like the right time.
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index ff7a03f7e0a..1cd42e48bc5 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.606 2020/05/29 04:42:25 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.607 2020/06/17 06:45:22 dlg Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -803,8 +803,8 @@ if_output_local(struct ifnet *ifp, struct mbuf *m, sa_family_t af) m->m_pkthdr.ph_ifidx = ifp->if_index; m->m_pkthdr.ph_rtableid = ifp->if_rdomain; - if (ISSET(m->m_pkthdr.ph_flowid, M_FLOWID_VALID)) - flow = m->m_pkthdr.ph_flowid & M_FLOWID_MASK; + if (ISSET(m->m_pkthdr.csum_flags, M_FLOWID)) + flow = m->m_pkthdr.ph_flowid; ifiq = ifp->if_iqs[flow % ifp->if_niqs]; |