diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2019-06-11 03:22:30 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2019-06-11 03:22:30 +0000 |
commit | 2516de944aa307d983a74e952f5276e568fa0891 (patch) | |
tree | faed98382e0c93064ea07355dace1967a45e2a88 /sys | |
parent | 63de3f3634601f1f03ecdfdac1a81adf19145058 (diff) |
records a flowid in the mbuf if the rx cqe provides an rx hash value.
jmatthew@ says we need to configure the hw to populate that, but i
can put this in now in preparation for it.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_mcx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c index a09718f67f2..1681f78e2b1 100644 --- a/sys/dev/pci/if_mcx.c +++ b/sys/dev/pci/if_mcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mcx.c,v 1.22 2019/06/10 23:05:52 dlg Exp $ */ +/* $OpenBSD: if_mcx.c,v 1.23 2019/06/11 03:22:29 dlg Exp $ */ /* * Copyright (c) 2017 David Gwynne <dlg@openbsd.org> @@ -5653,6 +5653,11 @@ mcx_process_rx(struct mcx_softc *sc, struct mcx_cq_entry *cqe, m->m_pkthdr.len = m->m_len = bemtoh32(&cqe->cq_byte_cnt); + if (cqe->cq_rx_hash_type) { + m->m_pkthdr.ph_flowid = M_FLOWID_VALID | + betoh32(cqe->cq_rx_hash); + } + if (c->c_tdiff) { uint64_t t = bemtoh64(&cqe->cq_timestamp) - c->c_timestamp; t *= c->c_udiff; |