diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2009-12-03 06:33:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 18:43:22 -0500 |
commit | 9b471446cb376e2d1a4ceb4695059acfc3437f32 (patch) | |
tree | 9578694e15b99da7a797924d1c087e506d8126fc /drivers/net/ixgbe/ixgbe_main.c | |
parent | 7ca3bc582cd24c2e6c0693a2ba2c71f3c2419c8b (diff) |
ixgbe: use EIAM to automask MSI-X
when disabling interrupts, driver was writing with IO, this is no
necessary because on ixgbe parts the hardware can "oneshot"
disable and clear the interrupt. So on 82598/82599 use of EIAM
should avoid one posted write per interrupt when in MSI-X mode.
This should improve performance and seems to in my limited
testing, reduce CPU utilization VERY slightly.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index db05030a30ec..247ed2a24769 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1329,8 +1329,7 @@ static irqreturn_t ixgbe_msix_clean_tx(int irq, void *data) | |||
1329 | r_idx + 1); | 1329 | r_idx + 1); |
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | /* disable interrupts on this vector only */ | 1332 | /* EIAM disabled interrupts (on this vector) for us */ |
1333 | ixgbe_irq_disable_queues(adapter, ((u64)1 << q_vector->v_idx)); | ||
1334 | napi_schedule(&q_vector->napi); | 1333 | napi_schedule(&q_vector->napi); |
1335 | 1334 | ||
1336 | return IRQ_HANDLED; | 1335 | return IRQ_HANDLED; |
@@ -1362,7 +1361,7 @@ static irqreturn_t ixgbe_msix_clean_rx(int irq, void *data) | |||
1362 | return IRQ_HANDLED; | 1361 | return IRQ_HANDLED; |
1363 | 1362 | ||
1364 | /* disable interrupts on this vector only */ | 1363 | /* disable interrupts on this vector only */ |
1365 | ixgbe_irq_disable_queues(adapter, ((u64)1 << q_vector->v_idx)); | 1364 | /* EIAM disabled interrupts (on this vector) for us */ |
1366 | napi_schedule(&q_vector->napi); | 1365 | napi_schedule(&q_vector->napi); |
1367 | 1366 | ||
1368 | return IRQ_HANDLED; | 1367 | return IRQ_HANDLED; |
@@ -1397,8 +1396,7 @@ static irqreturn_t ixgbe_msix_clean_many(int irq, void *data) | |||
1397 | r_idx + 1); | 1396 | r_idx + 1); |
1398 | } | 1397 | } |
1399 | 1398 | ||
1400 | /* disable interrupts on this vector only */ | 1399 | /* EIAM disabled interrupts (on this vector) for us */ |
1401 | ixgbe_irq_disable_queues(adapter, ((u64)1 << q_vector->v_idx)); | ||
1402 | napi_schedule(&q_vector->napi); | 1400 | napi_schedule(&q_vector->napi); |
1403 | 1401 | ||
1404 | return IRQ_HANDLED; | 1402 | return IRQ_HANDLED; |
@@ -2716,7 +2714,22 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) | |||
2716 | IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); | 2714 | IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); |
2717 | } | 2715 | } |
2718 | 2716 | ||
2719 | if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) { | 2717 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { |
2718 | /* | ||
2719 | * use EIAM to auto-mask when MSI-X interrupt is asserted | ||
2720 | * this saves a register write for every interrupt | ||
2721 | */ | ||
2722 | switch (hw->mac.type) { | ||
2723 | case ixgbe_mac_82598EB: | ||
2724 | IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE); | ||
2725 | break; | ||
2726 | default: | ||
2727 | case ixgbe_mac_82599EB: | ||
2728 | IXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(0), 0xFFFFFFFF); | ||
2729 | IXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(1), 0xFFFFFFFF); | ||
2730 | break; | ||
2731 | } | ||
2732 | } else { | ||
2720 | /* legacy interrupts, use EIAM to auto-mask when reading EICR, | 2733 | /* legacy interrupts, use EIAM to auto-mask when reading EICR, |
2721 | * specifically only auto mask tx and rx interrupts */ | 2734 | * specifically only auto mask tx and rx interrupts */ |
2722 | IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE); | 2735 | IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE); |