aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x.h
diff options
context:
space:
mode:
authorVladislav Zolotarov <vladz@broadcom.com>2009-11-16 01:05:58 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-17 07:08:48 -0500
commit54b9ddaa68414fad72ab2e1042be067c902441a6 (patch)
tree2adf18084aab8d2a013d31c8a2ac708f2e3ddec8 /drivers/net/bnx2x.h
parent208f2037ae4a2f23fe5f232d25f4030b3a35c3ed (diff)
bnx2x: Handle Rx and Tx together in NAPI
Put Tx and Rx DPC to be handled in the NAPI: - Saves status blocks. - Moves the Tx work from hardIRQ to NAPI. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x.h')
-rw-r--r--drivers/net/bnx2x.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h
index 928942b74ce6..602ab86b6392 100644
--- a/drivers/net/bnx2x.h
+++ b/drivers/net/bnx2x.h
@@ -259,9 +259,6 @@ struct bnx2x_eth_q_stats {
259struct bnx2x_fastpath { 259struct bnx2x_fastpath {
260 260
261 struct napi_struct napi; 261 struct napi_struct napi;
262
263 u8 is_rx_queue;
264
265 struct host_status_block *status_blk; 262 struct host_status_block *status_blk;
266 dma_addr_t status_blk_mapping; 263 dma_addr_t status_blk_mapping;
267 264
@@ -970,8 +967,7 @@ struct bnx2x {
970#define BNX2X_STATE_ERROR 0xf000 967#define BNX2X_STATE_ERROR 0xf000
971 968
972 int multi_mode; 969 int multi_mode;
973 int num_rx_queues; 970 int num_queues;
974 int num_tx_queues;
975 971
976 u32 rx_mode; 972 u32 rx_mode;
977#define BNX2X_RX_MODE_NONE 0 973#define BNX2X_RX_MODE_NONE 0
@@ -1074,20 +1070,15 @@ struct bnx2x {
1074}; 1070};
1075 1071
1076 1072
1077#define BNX2X_MAX_QUEUES(bp) (IS_E1HMF(bp) ? (MAX_CONTEXT/(2 * E1HVN_MAX)) \ 1073#define BNX2X_MAX_QUEUES(bp) (IS_E1HMF(bp) ? (MAX_CONTEXT/E1HVN_MAX) \
1078 : (MAX_CONTEXT/2)) 1074 : MAX_CONTEXT)
1079#define BNX2X_NUM_QUEUES(bp) (bp->num_rx_queues + bp->num_tx_queues) 1075#define BNX2X_NUM_QUEUES(bp) (bp->num_queues)
1080#define is_multi(bp) (BNX2X_NUM_QUEUES(bp) > 2) 1076#define is_multi(bp) (BNX2X_NUM_QUEUES(bp) > 1)
1081 1077
1082#define for_each_rx_queue(bp, var) \
1083 for (var = 0; var < bp->num_rx_queues; var++)
1084#define for_each_tx_queue(bp, var) \
1085 for (var = bp->num_rx_queues; \
1086 var < BNX2X_NUM_QUEUES(bp); var++)
1087#define for_each_queue(bp, var) \ 1078#define for_each_queue(bp, var) \
1088 for (var = 0; var < BNX2X_NUM_QUEUES(bp); var++) 1079 for (var = 0; var < BNX2X_NUM_QUEUES(bp); var++)
1089#define for_each_nondefault_queue(bp, var) \ 1080#define for_each_nondefault_queue(bp, var) \
1090 for (var = 1; var < bp->num_rx_queues; var++) 1081 for (var = 1; var < BNX2X_NUM_QUEUES(bp); var++)
1091 1082
1092 1083
1093void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32); 1084void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32);