summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKevin Lo <kevlo@cvs.openbsd.org>2021-07-27 01:44:56 +0000
committerKevin Lo <kevlo@cvs.openbsd.org>2021-07-27 01:44:56 +0000
commit6da68c1e882066dd15bd8dc4e4ad5072296e0392 (patch)
tree2c0b35a9a59e8125936c33d07c6e865146a6df0a /sys
parent992fe9af703c5564c9f83ee7e939673145a45aaa (diff)
Fix Rx hash type
This matches what Linux and FreeBSD do. ok jmatthew@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_ix.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index 45a8025c89f..6e6655446b5 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.179 2021/07/23 00:29:14 jmatthew Exp $ */
+/* $OpenBSD: if_ix.c,v 1.180 2021/07/27 01:44:55 kevlo Exp $ */
/******************************************************************************
@@ -3071,7 +3071,8 @@ ixgbe_rxeof(struct rx_ring *rxr)
i = rxr->next_to_check;
while (if_rxr_inuse(&rxr->rx_ring) > 0) {
- uint32_t hash, hashtype;
+ uint32_t hash;
+ uint16_t hashtype;
bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
dsize * i, dsize, BUS_DMASYNC_POSTREAD);
@@ -3101,7 +3102,8 @@ ixgbe_rxeof(struct rx_ring *rxr)
vtag = letoh16(rxdesc->wb.upper.vlan);
eop = ((staterr & IXGBE_RXD_STAT_EOP) != 0);
hash = lemtoh32(&rxdesc->wb.lower.hi_dword.rss);
- hashtype = lemtoh32(&rxdesc->wb.lower.lo_dword.data) &
+ hashtype =
+ lemtoh16(&rxdesc->wb.lower.lo_dword.hs_rss.pkt_info) &
IXGBE_RXDADV_RSSTYPE_MASK;
if (staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) {