summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
diff options
context:
space:
mode:
authorAnjali Singhai Jain <anjali.singhai@intel.com>2016-01-16 01:33:12 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-02-18 09:44:00 +0300
commitdd353109e41c1e92e0cea9954404a6f5a7d46218 (patch)
tree1a7849253faa0c0580f230d96af6c99250692ca9 /drivers/net/ethernet/intel/i40evf/i40e_txrx.h
parentf734dfff2f2bc2d92c392fbcfe2039893a8cdd08 (diff)
downloadlinux-dd353109e41c1e92e0cea9954404a6f5a7d46218.tar.xz
i40e: Add a SW workaround for lost interrupts
This patch adds a workaround for cases where we might have interrupts that got lost but WB happened. If that happens without this patch we will see a tx_timeout. To work around it, this patch goes ahead and reschedules NAPI in that situation, if NAPI is not already scheduled. We also add a counter in ethtool to keep track of when we detect a case of tx_lost_interrupt. Note: napi_reschedule() can be safely called from process/service_task context and is done in other drivers as well without an issue. Change-ID: I00f98f1ce3774524d9421227652bef20fcbd0d20 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40e_txrx.h')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_txrx.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index 5467fcdf7670..81c96619287b 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -202,6 +202,7 @@ struct i40e_tx_queue_stats {
u64 tx_done_old;
u64 tx_linearize;
u64 tx_force_wb;
+ u64 tx_lost_interrupt;
};
struct i40e_rx_queue_stats {
@@ -326,7 +327,7 @@ void i40evf_free_tx_resources(struct i40e_ring *tx_ring);
void i40evf_free_rx_resources(struct i40e_ring *rx_ring);
int i40evf_napi_poll(struct napi_struct *napi, int budget);
void i40evf_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector);
-u32 i40evf_get_tx_pending(struct i40e_ring *ring);
+u32 i40evf_get_tx_pending(struct i40e_ring *ring, bool in_sw);
/**
* i40e_get_head - Retrieve head from head writeback