aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2008-06-19 16:41:08 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-19 16:41:08 -0700
commit43e80b89b65cbc62b5e0fde09b47c9fc572a8b11 (patch)
tree894984eda36c720a44e00a6bd1c1c2567b45102b /drivers/net/bnx2.h
parentbb4f98abf590cf9899017f14f1a54984f02a0009 (diff)
downloadkernel_samsung_crespo-43e80b89b65cbc62b5e0fde09b47c9fc572a8b11.zip
kernel_samsung_crespo-43e80b89b65cbc62b5e0fde09b47c9fc572a8b11.tar.gz
kernel_samsung_crespo-43e80b89b65cbc62b5e0fde09b47c9fc572a8b11.tar.bz2
bnx2: Optimize fast-path tx and rx work.
Add hw_tx_cons_ptr and hw_rx_cons_ptr to speed up the retreival of the tx and rx consumer index, since the MSI-X and default status blocks have different structures. Combine status_blk and status_blk_msix into a union. We'll only use one type of status block for each vector. Separate the code to detect more rx and tx work from the code to detect link related work. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r--drivers/net/bnx2.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 1c5ce80..362bef6 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6609,8 +6609,12 @@ struct bnx2_rx_ring_info {
struct bnx2_napi {
struct napi_struct napi ____cacheline_aligned;
struct bnx2 *bp;
- struct status_block *status_blk;
- struct status_block_msix *status_blk_msix;
+ union {
+ struct status_block *msi;
+ struct status_block_msix *msix;
+ } status_blk;
+ u16 *hw_tx_cons_ptr;
+ u16 *hw_rx_cons_ptr;
u32 last_status_idx;
u32 int_num;
@@ -6759,7 +6763,6 @@ struct bnx2 {
u32 stats_ticks;
- struct status_block *status_blk;
dma_addr_t status_blk_mapping;
struct statistics_block *stats_blk;