diff options
author | Michael Chan <mchan@broadcom.com> | 2006-03-23 01:13:43 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-23 01:13:43 -0800 |
commit | 29b12174ac14f110225d6d9ebb66c30df5023baf (patch) | |
tree | 2c90b0bb6d3e6e4e7528cd381688b4413c77507b /drivers | |
parent | f2a4f05216e95f3b8c06b858abc0fe9a77500816 (diff) | |
download | op-kernel-dev-29b12174ac14f110225d6d9ebb66c30df5023baf.zip op-kernel-dev-29b12174ac14f110225d6d9ebb66c30df5023baf.tar.gz |
[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 3f2eaf5..6ccacb5 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -48,6 +48,7 @@ #include <linux/workqueue.h> #include <linux/crc32.h> #include <linux/prefetch.h> +#include <linux/cache.h> #include "bnx2.h" #include "bnx2_fw.h" diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 6059884..b87925f6 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -3877,15 +3877,17 @@ struct bnx2 { #define USING_MSI_FLAG 0x20 #define ASF_ENABLE_FLAG 0x40 - struct tx_bd *tx_desc_ring; - struct sw_bd *tx_buf_ring; - u32 tx_prod_bseq; - u16 tx_prod; - u16 tx_cons; - int tx_ring_size; - - u16 hw_tx_cons; - u16 hw_rx_cons; + /* Put tx producer and consumer fields in separate cache lines. */ + + u32 tx_prod_bseq __attribute__((aligned(L1_CACHE_BYTES))); + u16 tx_prod; + + struct tx_bd *tx_desc_ring; + struct sw_bd *tx_buf_ring; + int tx_ring_size; + + u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); + u16 hw_tx_cons; #ifdef BCM_VLAN struct vlan_group *vlgrp; @@ -3899,6 +3901,7 @@ struct bnx2 { u32 rx_prod_bseq; u16 rx_prod; u16 rx_cons; + u16 hw_rx_cons; u32 rx_csum; |