summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000.h
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-01-12 16:50:41 -0800
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:40:11 -0500
commit7bfa48162d4924e8cc7fb8eccc8c8f66cc111eb4 (patch)
tree906365b7e1c17f15fa470dbad448cafa3310f011 /drivers/net/e1000/e1000.h
parentf56799ea39a85a6f3760a134aa0e6d1c17eea369 (diff)
downloadtalos-op-linux-7bfa48162d4924e8cc7fb8eccc8c8f66cc111eb4.tar.gz
talos-op-linux-7bfa48162d4924e8cc7fb8eccc8c8f66cc111eb4.zip
[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 @@
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
-#ifdef CONFIG_E1000_MQ
-#include <linux/cpu.h>
-#include <linux/smp.h>
-#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 <linux/cpu.h>
+#include <linux/smp.h>
+#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;
OpenPOWER on IntegriCloud