summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-11-10 15:23:26 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-11-10 15:23:26 +0000
commit55d0bbb1041c69069dbf176ccd140898d931bfc7 (patch)
tree48789e319119896e6c7bb376fcb18ac0db6b7e3a /sys/dev/pci/if_ix.c
parent27722dccc8614c464c25bbb960415ae2dd1aa482 (diff)
Enable low latency interrupt moderation and set the LL interval
to the maximum value to reduce the number of low latency interrupts hitting the card when the ring is getting full. Tested at least by deraadt@ on 99 and myself on 99 and 98 ix(4). OK mikeb@
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r--sys/dev/pci/if_ix.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index c580c9163c7..13ba32acfb8 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.45 2010/10/27 20:48:27 deraadt Exp $ */
+/* $OpenBSD: if_ix.c,v 1.46 2010/11/10 15:23:25 claudio Exp $ */
/******************************************************************************
@@ -657,6 +657,11 @@ ixgbe_init(void *arg)
if (sc->hw.mac.type == ixgbe_mac_82599EB) {
gpie |= IXGBE_SDP1_GPIEN;
gpie |= IXGBE_SDP2_GPIEN;
+ /*
+ * Set LL interval to max to reduce the number of low latency
+ * interrupts hitting the card when the ring is getting full.
+ */
+ gpie |= 0xf << IXGBE_GPIE_LLI_DELAY_SHIFT;
}
/* Enable Fan Failure Interrupt */
@@ -2483,6 +2488,7 @@ ixgbe_initialize_receive_units(struct ix_softc *sc)
uint32_t rxctrl, fctrl, srrctl, rxcsum;
uint32_t reta, mrqc, hlreg, linkvec;
uint32_t random[10];
+ uint32_t llimod = 0;
int i;
/*
@@ -2516,8 +2522,10 @@ ixgbe_initialize_receive_units(struct ix_softc *sc)
IXGBE_WRITE_REG(&sc->hw, IXGBE_SRRCTL(0), srrctl);
/* Set Queue moderation rate */
+ if (sc->hw.mac.type == ixgbe_mac_82599EB)
+ llimod = IXGBE_EITR_LLI_MOD;
for (i = 0; i < IXGBE_MSGS; i++)
- IXGBE_WRITE_REG(&sc->hw, IXGBE_EITR(i), DEFAULT_ITR);
+ IXGBE_WRITE_REG(&sc->hw, IXGBE_EITR(i), DEFAULT_ITR | llimod);
/* Set Link moderation lower */
linkvec = sc->num_tx_queues + sc->num_rx_queues;