aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-12-09 20:24:16 -0500
committerBen Hutchings <bhutchings@solarflare.com>2010-12-10 14:53:46 -0500
commitc04bfc6b223662c42a77727342c1df7d39e686a2 (patch)
tree96f8623e13366b677f8437ba678f617231942d58 /drivers/net/sfc/net_driver.h
parent6ecfd0c70c05531b2850649d0cec46833cd6c381 (diff)
sfc: Remove ancient support for nesting of TX stop
Long before this driver went into mainline, it had support for multiple TX queues per port, with lockless TX enabled. Since Linux did not know anything of this, filling up any hardware TX queue would stop the core TX queue and multiple hardware TX queues could fill up before the scheduler reacted. Thus it was necessary to keep a count of how many TX queues were stopped and to wake the core TX queue only when all had free space again. The driver also previously (ab)used the per-hardware-queue stopped flag as a counter to deal with various things that can inhibit TX, but it no longer does that. Remove the per-channel tx_stop_count, tx_stop_lock and per-hardware-queue stopped count and just use the networking core queue state directly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 294379faca4a..bdce66ddf93a 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -136,6 +136,7 @@ struct efx_tx_buffer {
136 * @efx: The associated Efx NIC 136 * @efx: The associated Efx NIC
137 * @queue: DMA queue number 137 * @queue: DMA queue number
138 * @channel: The associated channel 138 * @channel: The associated channel
139 * @core_txq: The networking core TX queue structure
139 * @buffer: The software buffer ring 140 * @buffer: The software buffer ring
140 * @txd: The hardware descriptor ring 141 * @txd: The hardware descriptor ring
141 * @ptr_mask: The size of the ring minus 1. 142 * @ptr_mask: The size of the ring minus 1.
@@ -148,8 +149,6 @@ struct efx_tx_buffer {
148 * variable indicates that the queue is empty. This is to 149 * variable indicates that the queue is empty. This is to
149 * avoid cache-line ping-pong between the xmit path and the 150 * avoid cache-line ping-pong between the xmit path and the
150 * completion path. 151 * completion path.
151 * @stopped: Stopped count.
152 * Set if this TX queue is currently stopping its port.
153 * @insert_count: Current insert pointer 152 * @insert_count: Current insert pointer
154 * This is the number of buffers that have been added to the 153 * This is the number of buffers that have been added to the
155 * software ring. 154 * software ring.
@@ -179,6 +178,7 @@ struct efx_tx_queue {
179 struct efx_nic *efx ____cacheline_aligned_in_smp; 178 struct efx_nic *efx ____cacheline_aligned_in_smp;
180 unsigned queue; 179 unsigned queue;
181 struct efx_channel *channel; 180 struct efx_channel *channel;
181 struct netdev_queue *core_txq;
182 struct efx_tx_buffer *buffer; 182 struct efx_tx_buffer *buffer;
183 struct efx_special_buffer txd; 183 struct efx_special_buffer txd;
184 unsigned int ptr_mask; 184 unsigned int ptr_mask;
@@ -187,7 +187,6 @@ struct efx_tx_queue {
187 /* Members used mainly on the completion path */ 187 /* Members used mainly on the completion path */
188 unsigned int read_count ____cacheline_aligned_in_smp; 188 unsigned int read_count ____cacheline_aligned_in_smp;
189 unsigned int old_write_count; 189 unsigned int old_write_count;
190 int stopped;
191 190
192 /* Members used only on the xmit path */ 191 /* Members used only on the xmit path */
193 unsigned int insert_count ____cacheline_aligned_in_smp; 192 unsigned int insert_count ____cacheline_aligned_in_smp;
@@ -340,8 +339,6 @@ enum efx_rx_alloc_method {
340 * @n_rx_overlength: Count of RX_OVERLENGTH errors 339 * @n_rx_overlength: Count of RX_OVERLENGTH errors
341 * @n_skbuff_leaks: Count of skbuffs leaked due to RX overrun 340 * @n_skbuff_leaks: Count of skbuffs leaked due to RX overrun
342 * @rx_queue: RX queue for this channel 341 * @rx_queue: RX queue for this channel
343 * @tx_stop_count: Core TX queue stop count
344 * @tx_stop_lock: Core TX queue stop lock
345 * @tx_queue: TX queues for this channel 342 * @tx_queue: TX queues for this channel
346 */ 343 */
347struct efx_channel { 344struct efx_channel {
@@ -380,10 +377,6 @@ struct efx_channel {
380 bool rx_pkt_csummed; 377 bool rx_pkt_csummed;
381 378
382 struct efx_rx_queue rx_queue; 379 struct efx_rx_queue rx_queue;
383
384 atomic_t tx_stop_count;
385 spinlock_t tx_stop_lock;
386
387 struct efx_tx_queue tx_queue[2]; 380 struct efx_tx_queue tx_queue[2];
388}; 381};
389 382