summaryrefslogtreecommitdiff
path: root/drivers/net/bnx2.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2007-12-20 19:56:37 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:57:35 -0800
commit35efa7c1f4aa868d4a948a9069f20ccef1b3b28d (patch)
tree9369da5bfcd93139ce0ac961059d29b57c66626c /drivers/net/bnx2.h
parent6d866ffc69b0c3e584782f212a3f783708d31e9a (diff)
[BNX2]: Introduce new bnx2_napi structure.
Introduce a bnx2_napi structure that will hold a napi_struct and other fields to handle NAPI polling for the napi_struct. Various tx and rx indexes and status block pointers will be moved from the main bnx2 structure to this bnx2_napi structure. Most NAPI path functions are modified to be passed this bnx2_napi struct pointer. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r--drivers/net/bnx2.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 1accf0093126..345b6db9a947 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6503,6 +6503,14 @@ struct bnx2_irq {
char name[16];
};
+struct bnx2_napi {
+ struct napi_struct napi ____cacheline_aligned;
+ struct bnx2 *bp;
+ struct status_block *status_blk;
+ u32 last_status_idx;
+ u32 int_num;
+};
+
struct bnx2 {
/* Fields used in the tx and intr/napi performance paths are grouped */
/* together in the beginning of the structure. */
@@ -6511,13 +6519,8 @@ struct bnx2 {
struct net_device *dev;
struct pci_dev *pdev;
- struct napi_struct napi;
-
atomic_t intr_sem;
- struct status_block *status_blk;
- u32 last_status_idx;
-
u32 flags;
#define PCIX_FLAG 0x00000001
#define PCI_32BIT_FLAG 0x00000002
@@ -6539,6 +6542,8 @@ struct bnx2 {
u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES)));
u16 hw_tx_cons;
+ struct bnx2_napi bnx2_napi;
+
#ifdef BCM_VLAN
struct vlan_group *vlgrp;
#endif
@@ -6672,6 +6677,7 @@ struct bnx2 {
u32 stats_ticks;
+ struct status_block *status_blk;
dma_addr_t status_blk_mapping;
struct statistics_block *stats_blk;