summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-07-05 14:47:29 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-07-05 14:47:29 +0000
commit4cd2b471e698fb7c2290949d9cc373f4f25236f5 (patch)
tree60e46ae10860592f0e79dad26ad6b59c4acb7e8c
parent002ae7ed11711796174e19577bab47db218185ee (diff)
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);
}