summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2019-02-26 04:04:31 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2019-02-26 04:04:31 +0000
commite679687c9f95d9171e09c15bb54b5ff8b572aac3 (patch)
tree518a71c0353c4db3d22d2a1f098765407d695cfe /sys
parent9a3ca4b7063b51bc0391abadeba45469fdfee2b2 (diff)
don't let rxr completely fill the rxr ring.
at the moment there are 256 slots on the right. if rxr raises the high watermark to 256, we overwrite ring entries.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_ix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index a69d669a241..b23dce349cd 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.154 2019/02/26 03:09:50 dlg Exp $ */
+/* $OpenBSD: if_ix.c,v 1.155 2019/02/26 04:04:30 dlg Exp $ */
/******************************************************************************
@@ -2483,7 +2483,7 @@ ixgbe_setup_receive_ring(struct rx_ring *rxr)
rxr->last_desc_filled = sc->num_rx_desc - 1;
if_rxr_init(&rxr->rx_ring, 2 * ((ifp->if_hardmtu / MCLBYTES) + 1),
- sc->num_rx_desc);
+ sc->num_rx_desc - 1);
ixgbe_rxfill(rxr);
if (if_rxr_inuse(&rxr->rx_ring) == 0) {