diff options
author | Michael Chan <mchan@broadcom.com> | 2006-03-23 04:13:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-23 04:13:43 -0500 |
commit | 29b12174ac14f110225d6d9ebb66c30df5023baf (patch) | |
tree | 2c90b0bb6d3e6e4e7528cd381688b4413c77507b /drivers | |
parent | f2a4f05216e95f3b8c06b858abc0fe9a77500816 (diff) |
[BNX2]: Separate tx producer and consumer fields
Put the tx producer and consumer fields in separate cache lines in
the device structure, similar to the VJ net channel queue structure.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2.c | 1 | ||||
-rw-r--r-- | drivers/net/bnx2.h | 21 |
2 files changed, 13 insertions, 9 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 3f2eaf52d197..6ccacb5f2545 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/workqueue.h> | 48 | #include <linux/workqueue.h> |
49 | #include <linux/crc32.h> | 49 | #include <linux/crc32.h> |
50 | #include <linux/prefetch.h> | 50 | #include <linux/prefetch.h> |
51 | #include <linux/cache.h> | ||
51 | 52 | ||
52 | #include "bnx2.h" | 53 | #include "bnx2.h" |
53 | #include "bnx2_fw.h" | 54 | #include "bnx2_fw.h" |
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 60598849acd4..b87925f6a228 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -3877,15 +3877,17 @@ struct bnx2 { | |||
3877 | #define USING_MSI_FLAG 0x20 | 3877 | #define USING_MSI_FLAG 0x20 |
3878 | #define ASF_ENABLE_FLAG 0x40 | 3878 | #define ASF_ENABLE_FLAG 0x40 |
3879 | 3879 | ||
3880 | struct tx_bd *tx_desc_ring; | 3880 | /* Put tx producer and consumer fields in separate cache lines. */ |
3881 | struct sw_bd *tx_buf_ring; | 3881 | |
3882 | u32 tx_prod_bseq; | 3882 | u32 tx_prod_bseq __attribute__((aligned(L1_CACHE_BYTES))); |
3883 | u16 tx_prod; | 3883 | u16 tx_prod; |
3884 | u16 tx_cons; | 3884 | |
3885 | int tx_ring_size; | 3885 | struct tx_bd *tx_desc_ring; |
3886 | 3886 | struct sw_bd *tx_buf_ring; | |
3887 | u16 hw_tx_cons; | 3887 | int tx_ring_size; |
3888 | u16 hw_rx_cons; | 3888 | |
3889 | u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); | ||
3890 | u16 hw_tx_cons; | ||
3889 | 3891 | ||
3890 | #ifdef BCM_VLAN | 3892 | #ifdef BCM_VLAN |
3891 | struct vlan_group *vlgrp; | 3893 | struct vlan_group *vlgrp; |
@@ -3899,6 +3901,7 @@ struct bnx2 { | |||
3899 | u32 rx_prod_bseq; | 3901 | u32 rx_prod_bseq; |
3900 | u16 rx_prod; | 3902 | u16 rx_prod; |
3901 | u16 rx_cons; | 3903 | u16 rx_cons; |
3904 | u16 hw_rx_cons; | ||
3902 | 3905 | ||
3903 | u32 rx_csum; | 3906 | u32 rx_csum; |
3904 | 3907 | ||