summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2012-07-05 14:47:28 +0000
committermikeb <mikeb@openbsd.org>2012-07-05 14:47:28 +0000
commit1f42a1d1cc9432abada9d9165d816ae6c9b00d0b (patch)
tree9513fbdfb6009ca5abaadd834dd049db5b886b7f
parentenable the code that forces a cleanup if number of tx descriptors (diff)
downloadwireguard-openbsd-1f42a1d1cc9432abada9d9165d816ae6c9b00d0b.tar.xz
wireguard-openbsd-1f42a1d1cc9432abada9d9165d816ae6c9b00d0b.zip
set the prefetch threshold for 99'er as well. provides some additional
performance improvement. obtained from freebsd.
-rw-r--r--sys/dev/pci/if_ix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index b1a173ae03d..9649ff8af94 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.63 2012/07/05 14:36:22 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.64 2012/07/05 14:47:28 mikeb Exp $ */
/******************************************************************************
@@ -728,6 +728,12 @@ ixgbe_init(void *arg)
txdctl |= IXGBE_TXDCTL_ENABLE;
/* Set WTHRESH to 8, burst writeback */
txdctl |= (8 << 16);
+ /*
+ * When the internal queue falls below PTHRESH (16),
+ * start prefetching as long as there are at least
+ * HTHRESH (1) buffers ready.
+ */
+ txdctl |= (16 << 0) | (1 << 8);
IXGBE_WRITE_REG(&sc->hw, IXGBE_TXDCTL(i), txdctl);
}