ixgbe: Fix netpoll to be properly multiqueue aware
Subsystems (2)
PATCH 1/3 ixgbe: Fix netpoll to be properly multiqueue aware
From: Peter P Waskiewicz Jr <[email protected]>
Our ndo_poll_controller callback is broken for anything but non-multiqueue setups. This fixes that issue.
---
drivers/net/ixgbe/ixgbe_main.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +10 -3
@@ -5360,12 +5360,19 @@ static int ixgbe_del_sanmac_netdev(struct net_device *dev)static void ixgbe_netpoll (struct net_device *netdev) {struct ixgbe_adapter *adapter =netdev_priv (netdev); +int i; -disable_irq (adapter->pdev->irq); adapter->flags |=IXGBE_FLAG_IN_NETPOLL ; -ixgbe_intr (adapter->pdev->irq, netdev); +if (adapter->flags &IXGBE_FLAG_MSIX_ENABLED ) { +int num_q_vectors = adapter->num_msix_vectors -NON_Q_VECTORS ; +for (i =0 ; i < num_q_vectors; i++) { +struct ixgbe_q_vector *q_vector = adapter->q_vector[i]; +ixgbe_msix_clean_many (0 , q_vector); + } + }else { +ixgbe_intr (adapter->pdev->irq, netdev); + } adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL ; -enable_irq (adapter->pdev->irq); }#endif
PATCH 2/3 ixgbe: Fix usage of second flags bitmap when using LRO/RSC
From: Peter P Waskiewicz Jr <[email protected]>
A second set of feature flag bits was added, and the hardware RSC engine flags were moved there. However, the code itself didn't make the move completely to use the new bitmap.
---
drivers/net/ixgbe/ixgbe_ethtool.c | 6 +++--- drivers/net/ixgbe/ixgbe_main.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/net/ixgbe/ixgbe_ethtool.c +3 -3
@@ -1999,13 +1999,13 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)ethtool_op_set_flags (netdev, data); -if (!(adapter->flags &IXGBE_FLAG2_RSC_CAPABLE )) +if (!(adapter->flags2 &IXGBE_FLAG2_RSC_CAPABLE ))return 0 ;/* if state changes we need to update adapter->flags and reset */ if ((!!(data Ð_FLAG_LRO )) != - (!!(adapter->flags &IXGBE_FLAG2_RSC_ENABLED ))) { - adapter->flags ^=IXGBE_FLAG2_RSC_ENABLED ; + (!!(adapter->flags2 &IXGBE_FLAG2_RSC_ENABLED ))) { + adapter->flags2 ^=IXGBE_FLAG2_RSC_ENABLED ;if (netif_running (netdev))ixgbe_reinit_locked (adapter);else
drivers/net/ixgbe/ixgbe_main.c +6 -6
@@ -780,7 +780,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,prefetch (next_rxd); cleaned_count++; -if (adapter->flags &IXGBE_FLAG2_RSC_CAPABLE ) +if (adapter->flags2 &IXGBE_FLAG2_RSC_CAPABLE ) rsc_count =ixgbe_get_rsc_count (rx_desc);if (rsc_count) {
@@ -2036,7 +2036,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)IXGBE_WRITE_REG (hw,IXGBE_PSRTYPE (0 ), psrtype); } }else { -if (!(adapter->flags &IXGBE_FLAG2_RSC_ENABLED ) && +if (!(adapter->flags2 &IXGBE_FLAG2_RSC_ENABLED ) && (netdev->mtu <=ETH_DATA_LEN )) rx_buf_len =MAXIMUM_ETHERNET_VLAN_SIZE ;else
@@ -2165,7 +2165,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)IXGBE_WRITE_REG (hw,IXGBE_RDRXCTL , rdrxctl); } -if (adapter->flags &IXGBE_FLAG2_RSC_ENABLED ) { +if (adapter->flags2 &IXGBE_FLAG2_RSC_ENABLED ) {/* Enable 82599 HW-RSC */ for (i =0 ; i < adapter->num_rx_queues; i++) { j = adapter->rx_ring[i].reg_idx;
@@ -3812,8 +3812,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) adapter->max_msix_q_vectors =MAX_MSIX_Q_VECTORS_82598 ; }else if (hw->mac.type == ixgbe_mac_82599EB) { adapter->max_msix_q_vectors =MAX_MSIX_Q_VECTORS_82599 ; - adapter->flags |=IXGBE_FLAG2_RSC_CAPABLE ; - adapter->flags |=IXGBE_FLAG2_RSC_ENABLED ; + adapter->flags2 |=IXGBE_FLAG2_RSC_CAPABLE ; + adapter->flags2 |=IXGBE_FLAG2_RSC_ENABLED ; adapter->flags |=IXGBE_FLAG_FDIR_HASH_CAPABLE ; adapter->ring_feature[RING_F_FDIR ].indices =IXGBE_MAX_FDIR_INDICES ;
@@ -5618,7 +5618,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,if (pci_using_dac) netdev->features |=NETIF_F_HIGHDMA ; -if (adapter->flags &IXGBE_FLAG2_RSC_ENABLED ) +if (adapter->flags2 &IXGBE_FLAG2_RSC_ENABLED ) netdev->features |=NETIF_F_LRO ;/* make sure the EEPROM is good */
Re: [net-2.6 PATCH 2/3] ixgbe: Fix usage of second flags bitmap when using LRO/RSC
From: Jeff Kirsher <[email protected]>
Date: Thu, 30 Jul 2009 15:25:28 -0700
Quoted 7 lines
A second set of feature flag bits was added, and the hardware RSC engine flags were moved there. However, the code itself didn't make the move completely to use the new bitmap.
Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
PATCH 3/3 ixgbe: Fix RSC completion delay causing Rx interrupts to stop
In reply to Jeff KirsherFrom: Peter P Waskiewicz Jr <[email protected]>
When a user disables interrupt throttling with ethtool on 82599 devices, the interrupt timer may not be re-enabled if hardware RSC is running. The RSC completions in hardware don't complete before the next ITR event tries to fire, so the ITR timer never gets re-armed. This patch increases the amount of time between interrupts when throttling is disabled (rx-usecs =
0) when the hardware RSC deature is enabled.
---
drivers/net/ixgbe/ixgbe.h | 2 ++ drivers/net/ixgbe/ixgbe_ethtool.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe.h +2 -0
@@ -96,6 +96,8 @@#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000#define IXGBE_TX_FLAGS_VLAN_SHIFT 16 +#define IXGBE_MAX_RSC_INT_RATE 162760 +/* wrapper around a pointer to a socket buffer, * so a DMA handle can be stored along with the buffer */ struct ixgbe_tx_buffer {
drivers/net/ixgbe/ixgbe_ethtool.c +4 -1
@@ -1975,7 +1975,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev,* any other value means disable eitr, which is best * served by setting the interrupt rate very high */ - adapter->eitr_param =IXGBE_MAX_INT_RATE ; +if (adapter->flags2 &IXGBE_FLAG2_RSC_ENABLED ) + adapter->eitr_param =IXGBE_MAX_RSC_INT_RATE ; +else + adapter->eitr_param =IXGBE_MAX_INT_RATE ; adapter->itr_setting =0 ; }
Re: [net-2.6 PATCH 3/3] ixgbe: Fix RSC completion delay causing Rx interrupts to stop
From: Jeff Kirsher <[email protected]>
Date: Thu, 30 Jul 2009 15:26:00 -0700
Quoted 9 lines
When a user disables interrupt throttling with ethtool on 82599 devices, the interrupt timer may not be re-enabled if hardware RSC is running. The RSC completions in hardware don't complete before the next ITR event tries to fire, so the ITR timer never gets re-armed. This patch increases the amount of time between interrupts when throttling is disabled (rx-usecs =
0) when the hardware RSC deature is enabled.Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
From: Jeff Kirsher <[email protected]>
Date: Thu, 30 Jul 2009 15:25:09 -0700
Quoted 5 lines
Our
ndo_poll_controllercallback is broken for anything but non-multiqueue setups. This fixes that issue.Signed-off-by Peter P Waskiewicz Jr <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.