From 7bfa48162d4924e8cc7fb8eccc8c8f66cc111eb4 Mon Sep 17 00:00:00 2001 From: Jeff Kirsher Date: Thu, 12 Jan 2006 16:50:41 -0800 Subject: [PATCH] e1000: Fix mulitple queues Fixed stats when using multiple queues. When multiple queues are enabled, log a message in syslog. Fixed memory allocation for multiple queues. Signed-off-by: Jeff Kirsher Signed-off-by: Jesse Brandeburg Signed-off-by: John Ronciak Signed-off-by: Jeff Garzik --- drivers/net/e1000/e1000.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'drivers/net/e1000/e1000.h') diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 5940f7a223bc..0a084e915dd6 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -72,10 +72,6 @@ #include #include #include -#ifdef CONFIG_E1000_MQ -#include -#include -#endif #define BAR_0 0 #define BAR_1 1 @@ -87,6 +83,10 @@ struct e1000_adapter; #include "e1000_hw.h" +#ifdef CONFIG_E1000_MQ +#include +#include +#endif #ifdef DBG #define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args) @@ -169,6 +169,13 @@ struct e1000_buffer { uint16_t next_to_watch; }; +#ifdef CONFIG_E1000_MQ +struct e1000_queue_stats { + uint64_t packets; + uint64_t bytes; +}; +#endif + struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; @@ -194,6 +201,9 @@ struct e1000_tx_ring { boolean_t last_tx_tso; +#ifdef CONFIG_E1000_MQ + struct e1000_queue_stats tx_stats; +#endif }; struct e1000_rx_ring { @@ -223,6 +233,9 @@ struct e1000_rx_ring { uint16_t rdh; uint16_t rdt; +#ifdef CONFIG_E1000_MQ + struct e1000_queue_stats rx_stats; +#endif }; #define E1000_DESC_UNUSED(R) \ @@ -255,6 +268,9 @@ struct e1000_adapter { uint16_t link_speed; uint16_t link_duplex; spinlock_t stats_lock; +#ifdef CONFIG_E1000_NAPI + spinlock_t tx_queue_lock; +#endif atomic_t irq_sem; struct work_struct tx_timeout_task; struct work_struct watchdog_task; @@ -302,7 +318,7 @@ struct e1000_adapter { #ifdef CONFIG_E1000_MQ struct net_device **cpu_netdev; /* per-cpu */ struct call_async_data_struct rx_sched_call_data; - int cpu_for_queue[4]; + cpumask_t cpumask; #endif int num_tx_queues; int num_rx_queues; -- cgit v1.2.1