diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-11-27 16:14:32 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-11-27 16:14:32 +0000 |
commit | 9c676e85515ee6b281b9a4a00e92e6623a0862c1 (patch) | |
tree | 2216ba914ee9c395eec27a25196272e638b05b0c /sys/dev/pci/if_ix.c | |
parent | 21e5243295b3a7089fb28c5f6f613d48ecee5f5f (diff) |
Bring back low latency interrupt moderation for 82599
lost during update. Originally from claudio, rev1.46.
ok claudio
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r-- | sys/dev/pci/if_ix.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index d405870d956..c2a6964cc45 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.55 2011/11/27 16:10:23 mikeb Exp $ */ +/* $OpenBSD: if_ix.c,v 1.56 2011/11/27 16:14:31 mikeb Exp $ */ /****************************************************************************** @@ -635,8 +635,7 @@ ixgbe_init(void *arg) struct ifnet *ifp = &sc->arpcom.ac_if; struct rx_ring *rxr = sc->rx_rings; uint32_t k, txdctl, rxdctl, rxctrl, mhadd, gpie; - int err; - int i, s; + int i, s, err, llimode = 0; INIT_DEBUGOUT("ixgbe_init: begin"); @@ -695,10 +694,18 @@ ixgbe_init(void *arg) /* Enable Fan Failure Interrupt */ gpie |= IXGBE_SDP1_GPIEN; - /* Add for Thermal detection */ - if (sc->hw.mac.type == ixgbe_mac_82599EB) + if (sc->hw.mac.type == ixgbe_mac_82599EB) { + /* Add for Thermal detection */ 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; + llimode = IXGBE_EITR_LLI_MOD; + } + if (sc->msix > 1) { /* Enable Enhanced MSIX mode */ gpie |= IXGBE_GPIE_MSIX_MODE; @@ -714,7 +721,7 @@ ixgbe_init(void *arg) mhadd |= sc->max_frame_size << IXGBE_MHADD_MFS_SHIFT; IXGBE_WRITE_REG(&sc->hw, IXGBE_MHADD, mhadd); } - + /* Now enable all the queues */ for (i = 0; i < sc->num_queues; i++) { @@ -801,7 +808,8 @@ ixgbe_init(void *arg) } /* Set moderation on the Link interrupt */ - IXGBE_WRITE_REG(&sc->hw, IXGBE_EITR(sc->linkvec), IXGBE_LINK_ITR); + IXGBE_WRITE_REG(&sc->hw, IXGBE_EITR(sc->linkvec), + IXGBE_LINK_ITR | llimode); /* Config/Enable Link */ ixgbe_config_link(sc); |