summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
diff options
context:
space:
mode:
authorHariprasad Shenai2015-12-08 05:39:14 +0100
committerDavid S. Miller2015-12-09 04:43:15 +0100
commit126fca643e3f6ee6e26533366f77acdd9e07d2ec (patch)
treeca0b19895615bfda68d1f238efae3e240ae570c8 /drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
parentcxgb4: Use ACCES_ONCE macro to read queue's consumer index (diff)
downloadkernel-qcow2-linux-126fca643e3f6ee6e26533366f77acdd9e07d2ec.tar.gz
kernel-qcow2-linux-126fca643e3f6ee6e26533366f77acdd9e07d2ec.tar.xz
kernel-qcow2-linux-126fca643e3f6ee6e26533366f77acdd9e07d2ec.zip
cxgb4: prevent simultaneous execution of service_ofldq()
Change mutual exclusion mechanism to prevent multiple threads of execution from running in service_ofldq() at the same time. The old mechanism used an implicit guard on the down-call path and none on the restart path and wasn't working. This checking makes the mechanism explicit and is much easier to understand as a result. Based on original work by Casey Leedom <leedom@chelsio.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4.h')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index 55a47de544ea..d4076e8e2e0b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -618,6 +618,7 @@ struct sge_ofld_txq { /* state for an SGE offload Tx queue */
struct adapter *adap;
struct sk_buff_head sendq; /* list of backpressured packets */
struct tasklet_struct qresume_tsk; /* restarts the queue */
+ bool service_ofldq_running; /* service_ofldq() is processing sendq */
u8 full; /* the Tx ring is full */
unsigned long mapping_err; /* # of I/O MMU packet mapping errors */
} ____cacheline_aligned_in_smp;