From: dlg Date: Mon, 25 Jan 2021 11:11:22 +0000 (+0000) Subject: if the rx descriptor reports the rss hash, use it for the mbuf flowid. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6850335a6de55a627d8b1847c3e02021253f5b26;p=openbsd if the rx descriptor reports the rss hash, use it for the mbuf flowid. ok jmatthew@ --- diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c index 9bd90116b68..10fe6a6c1c8 100644 --- a/sys/dev/pci/if_ixl.c +++ b/sys/dev/pci/if_ixl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ixl.c,v 1.71 2020/12/22 06:55:16 dlg Exp $ */ +/* $OpenBSD: if_ixl.c,v 1.72 2021/01/25 11:11:22 dlg Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -837,7 +837,8 @@ struct ixl_rx_rd_desc_32 { } __packed __aligned(16); struct ixl_rx_wb_desc_16 { - uint64_t qword0; + uint32_t _reserved1; + uint32_t filter_status; uint64_t qword1; #define IXL_RX_DESC_DD (1 << 0) #define IXL_RX_DESC_EOP (1 << 1) @@ -3180,6 +3181,13 @@ ixl_rxeof(struct ixl_softc *sc, struct ixl_rx_ring *rxr) if (ISSET(word, IXL_RX_DESC_EOP)) { if (!ISSET(word, IXL_RX_DESC_RXE | IXL_RX_DESC_OVERSIZE)) { + if ((word & IXL_RX_DESC_FLTSTAT_MASK) == + IXL_RX_DESC_FLTSTAT_RSS) { + m->m_pkthdr.ph_flowid = + lemtoh32(&rxd->filter_status); + m->m_pkthdr.csum_flags |= M_FLOWID; + } + ml_enqueue(&ml, m); } else { ifp->if_ierrors++; /* XXX */