* [PATCH 1/5] igb: force all queues to interrupt once every 2 seconds
@ 2008-08-26 11:25 Jeff Kirsher
2008-08-26 11:25 ` [PATCH 2/5] igb: ethtool -d reads EICR which is incorrect as it is read on clear Jeff Kirsher
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Jeff Kirsher @ 2008-08-26 11:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, davem, akpm, Jeff Kirsher, Alexander Duyck
From: Alexander Duyck <alexander.h.duyck@intel.com>
Set the EICS bit for each of the RX queues at least once every 2 seconds to
prevent the rx queues from stalling.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
drivers/net/igb/igb_main.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 4b19abb..40a205e 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2279,7 +2279,9 @@ static void igb_watchdog_task(struct work_struct *work)
struct igb_ring *tx_ring = adapter->tx_ring;
struct e1000_mac_info *mac = &adapter->hw.mac;
u32 link;
+ u32 eics = 0;
s32 ret_val;
+ int i;
if ((netif_carrier_ok(netdev)) &&
(rd32(E1000_STATUS) & E1000_STATUS_LU))
@@ -2381,7 +2383,13 @@ link_up:
}
/* Cause software interrupt to ensure rx ring is cleaned */
- wr32(E1000_ICS, E1000_ICS_RXDMT0);
+ if (adapter->msix_entries) {
+ for (i = 0; i < adapter->num_rx_queues; i++)
+ eics |= adapter->rx_ring[i].eims_value;
+ wr32(E1000_EICS, eics);
+ } else {
+ wr32(E1000_ICS, E1000_ICS_RXDMT0);
+ }
/* Force detection of hung controller every watchdog period */
tx_ring->detect_tx_hung = true;
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] igb: ethtool -d reads EICR which is incorrect as it is read on clear
2008-08-26 11:25 [PATCH 1/5] igb: force all queues to interrupt once every 2 seconds Jeff Kirsher
@ 2008-08-26 11:25 ` Jeff Kirsher
2008-08-26 11:25 ` [PATCH 3/5] igb: remove unneeded cleaned variable in clean_tx_irq path Jeff Kirsher
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Jeff Kirsher @ 2008-08-26 11:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, davem, akpm, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
Ethtool -d is reading the EICR and ICR registers which is currently
clearing these registers and masking off interrupts. To prevent this we
read the EICS and ICS equivilents as they can be read without clearing or
masking.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/igb_ethtool.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 6c0a8c2..58906c9 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -373,13 +373,17 @@ static void igb_get_regs(struct net_device *netdev,
regs_buff[12] = rd32(E1000_EECD);
/* Interrupt */
- regs_buff[13] = rd32(E1000_EICR);
+ /* Reading EICS for EICR because they read the
+ * same but EICS does not clear on read */
+ regs_buff[13] = rd32(E1000_EICS);
regs_buff[14] = rd32(E1000_EICS);
regs_buff[15] = rd32(E1000_EIMS);
regs_buff[16] = rd32(E1000_EIMC);
regs_buff[17] = rd32(E1000_EIAC);
regs_buff[18] = rd32(E1000_EIAM);
- regs_buff[19] = rd32(E1000_ICR);
+ /* Reading ICS for ICR because they read the
+ * same but ICS does not clear on read */
+ regs_buff[19] = rd32(E1000_ICS);
regs_buff[20] = rd32(E1000_ICS);
regs_buff[21] = rd32(E1000_IMS);
regs_buff[22] = rd32(E1000_IMC);
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] igb: remove unneeded cleaned variable in clean_tx_irq path
2008-08-26 11:25 [PATCH 1/5] igb: force all queues to interrupt once every 2 seconds Jeff Kirsher
2008-08-26 11:25 ` [PATCH 2/5] igb: ethtool -d reads EICR which is incorrect as it is read on clear Jeff Kirsher
@ 2008-08-26 11:25 ` Jeff Kirsher
2008-09-03 14:09 ` Jeff Garzik
2008-08-26 11:25 ` [PATCH 4/5] igb: clean up a stray fake netdev code left in rx path Jeff Kirsher
2008-08-26 11:25 ` [PATCH 5/5] igb: fix setting the number of tx queues Jeff Kirsher
3 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2008-08-26 11:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, davem, akpm, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
The cleaned variable can be replaced by the count of packets cleaned during
the tx interrupt routine so it can be removed.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/igb_main.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 40a205e..8d47882 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3617,16 +3617,14 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring)
unsigned int i;
u32 head, oldhead;
unsigned int count = 0;
- bool cleaned = false;
- bool retval = true;
unsigned int total_bytes = 0, total_packets = 0;
+ bool retval = true;
rmb();
head = get_head(tx_ring);
i = tx_ring->next_to_clean;
while (1) {
while (i != head) {
- cleaned = true;
tx_desc = E1000_TX_DESC(*tx_ring, i);
buffer_info = &tx_ring->buffer_info[i];
skb = buffer_info->skb;
@@ -3643,7 +3641,6 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring)
}
igb_unmap_and_free_tx_resource(adapter, buffer_info);
- tx_desc->upper.data = 0;
i++;
if (i == tx_ring->count)
@@ -3665,7 +3662,7 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring)
done_cleaning:
tx_ring->next_to_clean = i;
- if (unlikely(cleaned &&
+ if (unlikely(count &&
netif_carrier_ok(netdev) &&
IGB_DESC_UNUSED(tx_ring) >= IGB_TX_QUEUE_WAKE)) {
/* Make sure that anybody stopping the queue after this
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] igb: clean up a stray fake netdev code left in rx path
2008-08-26 11:25 [PATCH 1/5] igb: force all queues to interrupt once every 2 seconds Jeff Kirsher
2008-08-26 11:25 ` [PATCH 2/5] igb: ethtool -d reads EICR which is incorrect as it is read on clear Jeff Kirsher
2008-08-26 11:25 ` [PATCH 3/5] igb: remove unneeded cleaned variable in clean_tx_irq path Jeff Kirsher
@ 2008-08-26 11:25 ` Jeff Kirsher
2008-09-03 14:09 ` Jeff Garzik
2008-08-26 11:25 ` [PATCH 5/5] igb: fix setting the number of tx queues Jeff Kirsher
3 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2008-08-26 11:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, davem, akpm, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
Remove code that was in place to support fake netdev
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/igb_main.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 8d47882..2728730 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3563,10 +3563,6 @@ static int igb_clean_rx_ring_msix(struct napi_struct *napi, int budget)
struct net_device *netdev = adapter->netdev;
int work_done = 0;
- /* Keep link state information with original netdev */
- if (!netif_carrier_ok(netdev))
- goto quit_polling;
-
#ifdef CONFIG_DCA
if (adapter->flags & IGB_FLAG_DCA_ENABLED)
igb_update_rx_dca(rx_ring);
@@ -3576,7 +3572,6 @@ static int igb_clean_rx_ring_msix(struct napi_struct *napi, int budget)
/* If not enough Rx work done, exit the polling mode */
if ((work_done == 0) || !netif_running(netdev)) {
-quit_polling:
netif_rx_complete(netdev, napi);
if (adapter->itr_setting & 3) {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] igb: fix setting the number of tx queues
2008-08-26 11:25 [PATCH 1/5] igb: force all queues to interrupt once every 2 seconds Jeff Kirsher
` (2 preceding siblings ...)
2008-08-26 11:25 ` [PATCH 4/5] igb: clean up a stray fake netdev code left in rx path Jeff Kirsher
@ 2008-08-26 11:25 ` Jeff Kirsher
2008-08-27 9:18 ` Jeff Garzik
3 siblings, 1 reply; 8+ messages in thread
From: Jeff Kirsher @ 2008-08-26 11:25 UTC (permalink / raw)
To: jeff; +Cc: netdev, davem, akpm, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
The real_num_tx_queues was not being set when in MSI-X only mode. This patch
corrects that path so all interrupt types are correctly configured.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/igb/igb_main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 2728730..93d02ef 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -520,7 +520,7 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
adapter->msix_entries,
numvecs);
if (err == 0)
- return;
+ goto out;
igb_reset_interrupt_capability(adapter);
@@ -530,7 +530,7 @@ msi_only:
adapter->num_tx_queues = 1;
if (!pci_enable_msi(adapter->pdev))
adapter->flags |= IGB_FLAG_HAS_MSI;
-
+out:
/* Notify the stack of the (possibly) reduced Tx Queue count. */
adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
return;
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 5/5] igb: fix setting the number of tx queues
2008-08-26 11:25 ` [PATCH 5/5] igb: fix setting the number of tx queues Jeff Kirsher
@ 2008-08-27 9:18 ` Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2008-08-27 9:18 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: netdev, davem, akpm, Alexander Duyck
Jeff Kirsher wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> The real_num_tx_queues was not being set when in MSI-X only mode. This patch
> corrects that path so all interrupt types are correctly configured.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>
> drivers/net/igb/igb_main.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
applied 1, 2, and 5
patches 3 and 4 did not look like -rc4 material
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/5] igb: remove unneeded cleaned variable in clean_tx_irq path
2008-08-26 11:25 ` [PATCH 3/5] igb: remove unneeded cleaned variable in clean_tx_irq path Jeff Kirsher
@ 2008-09-03 14:09 ` Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2008-09-03 14:09 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: netdev, davem, akpm, Alexander Duyck
Jeff Kirsher wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> The cleaned variable can be replaced by the count of packets cleaned during
> the tx interrupt routine so it can be removed.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>
> drivers/net/igb/igb_main.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
applied
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/5] igb: clean up a stray fake netdev code left in rx path
2008-08-26 11:25 ` [PATCH 4/5] igb: clean up a stray fake netdev code left in rx path Jeff Kirsher
@ 2008-09-03 14:09 ` Jeff Garzik
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2008-09-03 14:09 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: netdev, davem, akpm, Alexander Duyck
Jeff Kirsher wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> Remove code that was in place to support fake netdev
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>
> drivers/net/igb/igb_main.c | 5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
applied
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-09-03 14:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26 11:25 [PATCH 1/5] igb: force all queues to interrupt once every 2 seconds Jeff Kirsher
2008-08-26 11:25 ` [PATCH 2/5] igb: ethtool -d reads EICR which is incorrect as it is read on clear Jeff Kirsher
2008-08-26 11:25 ` [PATCH 3/5] igb: remove unneeded cleaned variable in clean_tx_irq path Jeff Kirsher
2008-09-03 14:09 ` Jeff Garzik
2008-08-26 11:25 ` [PATCH 4/5] igb: clean up a stray fake netdev code left in rx path Jeff Kirsher
2008-09-03 14:09 ` Jeff Garzik
2008-08-26 11:25 ` [PATCH 5/5] igb: fix setting the number of tx queues Jeff Kirsher
2008-08-27 9:18 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).