aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe.h
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2010-11-16 22:27:12 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-11-16 22:27:12 -0500
commitc84d324c770dc81acebc1042163da33c8ded2364 (patch)
treebed8d4eace15895f9a194f9b114ba6f2b6ca5578 /drivers/net/ixgbe/ixgbe.h
parente3de4b7bdfd2c06884c95cfb4ad4d64be046595e (diff)
ixgbe: rework Tx hang detection to fix reoccurring false Tx hangs
The Tx hang logic has been known to detect false hangs when the device is receiving pause frames or has delayed processing for some other reason. This patch makes the logic more robust and resolves these known issues. The old logic checked to see if the device was paused by querying the HW then the hang logic was aborted if the device was currently paused. This check was racy because the device could have been in the pause state any time up to this check. The other operation of the hang logic is to verify the Tx ring is still advancing the old logic checked the EOP timestamp. This is not sufficient to determine the ring is not advancing but only infers that it may be moving slowly. Here we add logic to track the number of completed Tx descriptors and use the adapter stats to check if any pause frames have been received since the previous Tx hang check. This way we avoid racing with the HW register and do not detect false hangs if the ring is advancing slowly. This patch is primarily the work of Jesse Brandeburg. I clean it up some and fixed the PFC checking. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe.h')
-rw-r--r--drivers/net/ixgbe/ixgbe.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index ce43c9352681..2b8cbb3a81fa 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -149,6 +149,8 @@ struct ixgbe_queue_stats {
149struct ixgbe_tx_queue_stats { 149struct ixgbe_tx_queue_stats {
150 u64 restart_queue; 150 u64 restart_queue;
151 u64 tx_busy; 151 u64 tx_busy;
152 u64 completed;
153 u64 tx_done_old;
152}; 154};
153 155
154struct ixgbe_rx_queue_stats { 156struct ixgbe_rx_queue_stats {
@@ -162,6 +164,7 @@ struct ixgbe_rx_queue_stats {
162enum ixbge_ring_state_t { 164enum ixbge_ring_state_t {
163 __IXGBE_TX_FDIR_INIT_DONE, 165 __IXGBE_TX_FDIR_INIT_DONE,
164 __IXGBE_TX_DETECT_HANG, 166 __IXGBE_TX_DETECT_HANG,
167 __IXGBE_HANG_CHECK_ARMED,
165 __IXGBE_RX_PS_ENABLED, 168 __IXGBE_RX_PS_ENABLED,
166 __IXGBE_RX_RSC_ENABLED, 169 __IXGBE_RX_RSC_ENABLED,
167}; 170};
@@ -514,6 +517,7 @@ extern void ixgbe_unmap_and_free_tx_resource(struct ixgbe_ring *,
514extern void ixgbe_alloc_rx_buffers(struct ixgbe_ring *, u16); 517extern void ixgbe_alloc_rx_buffers(struct ixgbe_ring *, u16);
515extern void ixgbe_write_eitr(struct ixgbe_q_vector *); 518extern void ixgbe_write_eitr(struct ixgbe_q_vector *);
516extern int ethtool_ioctl(struct ifreq *ifr); 519extern int ethtool_ioctl(struct ifreq *ifr);
520extern u8 ixgbe_dcb_txq_to_tc(struct ixgbe_adapter *adapter, u8 index);
517extern s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); 521extern s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw);
518extern s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc); 522extern s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc);
519extern s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc); 523extern s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc);