aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2010-06-01 07:19:39 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-02 05:21:08 -0400
commit90d683afd1395016775c8d90508614f8d3000b81 (patch)
tree33c239c5cd1e607a22dca1af0fd3615cee584ef9 /drivers/net/sfc/net_driver.h
parentd730dc527a5abd4717f6320e82cfce54edc882a3 (diff)
sfc: Remove efx_rx_queue::add_lock
Ensure that efx_fast_push_rx_descriptors() must only run from efx_process_channel() [NAPI], or when napi_disable() has been executed. Reimplement the slow fill by sending an event to the channel, so that NAPI runs, and hanging the subsequent fast fill off the event handler. Replace the sfc_refill workqueue and delayed work items with a timer. We do not need to stop this timer in efx_flush_all() because it's safe to send the event always; receiving it will be delayed until NAPI is restarted. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index ee0ea01c847e..45398039dee6 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -18,6 +18,7 @@
18#include <linux/etherdevice.h> 18#include <linux/etherdevice.h>
19#include <linux/ethtool.h> 19#include <linux/ethtool.h>
20#include <linux/if_vlan.h> 20#include <linux/if_vlan.h>
21#include <linux/timer.h>
21#include <linux/mdio.h> 22#include <linux/mdio.h>
22#include <linux/list.h> 23#include <linux/list.h>
23#include <linux/pci.h> 24#include <linux/pci.h>
@@ -242,10 +243,6 @@ struct efx_rx_buffer {
242 * @added_count: Number of buffers added to the receive queue. 243 * @added_count: Number of buffers added to the receive queue.
243 * @notified_count: Number of buffers given to NIC (<= @added_count). 244 * @notified_count: Number of buffers given to NIC (<= @added_count).
244 * @removed_count: Number of buffers removed from the receive queue. 245 * @removed_count: Number of buffers removed from the receive queue.
245 * @add_lock: Receive queue descriptor add spin lock.
246 * This lock must be held in order to add buffers to the RX
247 * descriptor ring (rxd and buffer) and to update added_count (but
248 * not removed_count).
249 * @max_fill: RX descriptor maximum fill level (<= ring size) 246 * @max_fill: RX descriptor maximum fill level (<= ring size)
250 * @fast_fill_trigger: RX descriptor fill level that will trigger a fast fill 247 * @fast_fill_trigger: RX descriptor fill level that will trigger a fast fill
251 * (<= @max_fill) 248 * (<= @max_fill)
@@ -259,7 +256,7 @@ struct efx_rx_buffer {
259 * overflow was observed. It should never be set. 256 * overflow was observed. It should never be set.
260 * @alloc_page_count: RX allocation strategy counter. 257 * @alloc_page_count: RX allocation strategy counter.
261 * @alloc_skb_count: RX allocation strategy counter. 258 * @alloc_skb_count: RX allocation strategy counter.
262 * @work: Descriptor push work thread 259 * @slow_fill: Timer used to defer efx_nic_generate_fill_event().
263 * @buf_page: Page for next RX buffer. 260 * @buf_page: Page for next RX buffer.
264 * We can use a single page for multiple RX buffers. This tracks 261 * We can use a single page for multiple RX buffers. This tracks
265 * the remaining space in the allocation. 262 * the remaining space in the allocation.
@@ -277,7 +274,6 @@ struct efx_rx_queue {
277 int added_count; 274 int added_count;
278 int notified_count; 275 int notified_count;
279 int removed_count; 276 int removed_count;
280 spinlock_t add_lock;
281 unsigned int max_fill; 277 unsigned int max_fill;
282 unsigned int fast_fill_trigger; 278 unsigned int fast_fill_trigger;
283 unsigned int fast_fill_limit; 279 unsigned int fast_fill_limit;
@@ -285,7 +281,7 @@ struct efx_rx_queue {
285 unsigned int min_overfill; 281 unsigned int min_overfill;
286 unsigned int alloc_page_count; 282 unsigned int alloc_page_count;
287 unsigned int alloc_skb_count; 283 unsigned int alloc_skb_count;
288 struct delayed_work work; 284 struct timer_list slow_fill;
289 unsigned int slow_fill_count; 285 unsigned int slow_fill_count;
290 286
291 struct page *buf_page; 287 struct page *buf_page;