aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000.h
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-01-12 19:50:41 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:40:11 -0500
commit7bfa48162d4924e8cc7fb8eccc8c8f66cc111eb4 (patch)
tree906365b7e1c17f15fa470dbad448cafa3310f011 /drivers/net/e1000/e1000.h
parentf56799ea39a85a6f3760a134aa0e6d1c17eea369 (diff)
[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 <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/e1000/e1000.h')
-rw-r--r--drivers/net/e1000/e1000.h26
1 files changed, 21 insertions, 5 deletions
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 @@
72#include <linux/mii.h> 72#include <linux/mii.h>
73#include <linux/ethtool.h> 73#include <linux/ethtool.h>
74#include <linux/if_vlan.h> 74#include <linux/if_vlan.h>
75#ifdef CONFIG_E1000_MQ
76#include <linux/cpu.h>
77#include <linux/smp.h>
78#endif
79 75
80#define BAR_0 0 76#define BAR_0 0
81#define BAR_1 1 77#define BAR_1 1
@@ -87,6 +83,10 @@
87struct e1000_adapter; 83struct e1000_adapter;
88 84
89#include "e1000_hw.h" 85#include "e1000_hw.h"
86#ifdef CONFIG_E1000_MQ
87#include <linux/cpu.h>
88#include <linux/smp.h>
89#endif
90 90
91#ifdef DBG 91#ifdef DBG
92#define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args) 92#define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args)
@@ -169,6 +169,13 @@ struct e1000_buffer {
169 uint16_t next_to_watch; 169 uint16_t next_to_watch;
170}; 170};
171 171
172#ifdef CONFIG_E1000_MQ
173struct e1000_queue_stats {
174 uint64_t packets;
175 uint64_t bytes;
176};
177#endif
178
172struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; 179struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; };
173struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; 180struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; };
174 181
@@ -194,6 +201,9 @@ struct e1000_tx_ring {
194 201
195 boolean_t last_tx_tso; 202 boolean_t last_tx_tso;
196 203
204#ifdef CONFIG_E1000_MQ
205 struct e1000_queue_stats tx_stats;
206#endif
197}; 207};
198 208
199struct e1000_rx_ring { 209struct e1000_rx_ring {
@@ -223,6 +233,9 @@ struct e1000_rx_ring {
223 233
224 uint16_t rdh; 234 uint16_t rdh;
225 uint16_t rdt; 235 uint16_t rdt;
236#ifdef CONFIG_E1000_MQ
237 struct e1000_queue_stats rx_stats;
238#endif
226}; 239};
227 240
228#define E1000_DESC_UNUSED(R) \ 241#define E1000_DESC_UNUSED(R) \
@@ -255,6 +268,9 @@ struct e1000_adapter {
255 uint16_t link_speed; 268 uint16_t link_speed;
256 uint16_t link_duplex; 269 uint16_t link_duplex;
257 spinlock_t stats_lock; 270 spinlock_t stats_lock;
271#ifdef CONFIG_E1000_NAPI
272 spinlock_t tx_queue_lock;
273#endif
258 atomic_t irq_sem; 274 atomic_t irq_sem;
259 struct work_struct tx_timeout_task; 275 struct work_struct tx_timeout_task;
260 struct work_struct watchdog_task; 276 struct work_struct watchdog_task;
@@ -302,7 +318,7 @@ struct e1000_adapter {
302#ifdef CONFIG_E1000_MQ 318#ifdef CONFIG_E1000_MQ
303 struct net_device **cpu_netdev; /* per-cpu */ 319 struct net_device **cpu_netdev; /* per-cpu */
304 struct call_async_data_struct rx_sched_call_data; 320 struct call_async_data_struct rx_sched_call_data;
305 int cpu_for_queue[4]; 321 cpumask_t cpumask;
306#endif 322#endif
307 int num_tx_queues; 323 int num_tx_queues;
308 int num_rx_queues; 324 int num_rx_queues;