diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2008-03-17 22:59:50 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-25 23:16:18 -0400 |
commit | ba53e6b4878e07411826312c59bfe49561594b6e (patch) | |
tree | f9275465c58ebdea37a81ef4796ed29e792bea81 /drivers/net/netxen/netxen_nic.h | |
parent | 05aaa02d799e8e9548d57ac92fcb05e783027341 (diff) |
netxen: remove low level tx lock
o eliminate tx lock in netxen adapter struct, instead pound on netdev
tx lock appropriately.
o remove old "concurrent transmit" code that unnecessarily drops and
reacquires tx lock in hard_xmit_frame(), this is already serialized
the netdev xmit lock.
o reduce scope of tx lock in tx cleanup. tx cleanup operates on
different section of the ring than transmitting cpus and is
guarded by producer and consumer indices. This fixes a race
caused by rx softirq preemption on realtime kernels.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Tested-by: Vernon Mauery <mauery@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 8b6546ccb47b..070421b9e4f9 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -85,7 +85,7 @@ | |||
85 | (sizeof(struct netxen_cmd_buffer) * adapter->max_tx_desc_count) | 85 | (sizeof(struct netxen_cmd_buffer) * adapter->max_tx_desc_count) |
86 | #define RCV_BUFFSIZE \ | 86 | #define RCV_BUFFSIZE \ |
87 | (sizeof(struct netxen_rx_buffer) * rcv_desc->max_rx_desc_count) | 87 | (sizeof(struct netxen_rx_buffer) * rcv_desc->max_rx_desc_count) |
88 | #define find_diff_among(a,b,range) ((a)<=(b)?((b)-(a)):((b)+(range)-(a))) | 88 | #define find_diff_among(a,b,range) ((a)<(b)?((b)-(a)):((b)+(range)-(a))) |
89 | 89 | ||
90 | #define NETXEN_NETDEV_STATUS 0x1 | 90 | #define NETXEN_NETDEV_STATUS 0x1 |
91 | #define NETXEN_RCV_PRODUCER_OFFSET 0 | 91 | #define NETXEN_RCV_PRODUCER_OFFSET 0 |
@@ -204,7 +204,7 @@ enum { | |||
204 | ? RCV_DESC_LRO : \ | 204 | ? RCV_DESC_LRO : \ |
205 | (RCV_DESC_NORMAL))) | 205 | (RCV_DESC_NORMAL))) |
206 | 206 | ||
207 | #define MAX_CMD_DESCRIPTORS 1024 | 207 | #define MAX_CMD_DESCRIPTORS 4096 |
208 | #define MAX_RCV_DESCRIPTORS 16384 | 208 | #define MAX_RCV_DESCRIPTORS 16384 |
209 | #define MAX_CMD_DESCRIPTORS_HOST (MAX_CMD_DESCRIPTORS / 4) | 209 | #define MAX_CMD_DESCRIPTORS_HOST (MAX_CMD_DESCRIPTORS / 4) |
210 | #define MAX_RCV_DESCRIPTORS_1G (MAX_RCV_DESCRIPTORS / 4) | 210 | #define MAX_RCV_DESCRIPTORS_1G (MAX_RCV_DESCRIPTORS / 4) |
@@ -824,9 +824,7 @@ struct netxen_adapter_stats { | |||
824 | u64 uphcong; | 824 | u64 uphcong; |
825 | u64 upmcong; | 825 | u64 upmcong; |
826 | u64 updunno; | 826 | u64 updunno; |
827 | u64 skbfreed; | ||
828 | u64 txdropped; | 827 | u64 txdropped; |
829 | u64 txnullskb; | ||
830 | u64 csummed; | 828 | u64 csummed; |
831 | u64 no_rcv; | 829 | u64 no_rcv; |
832 | u64 rxbytes; | 830 | u64 rxbytes; |
@@ -888,8 +886,6 @@ struct netxen_adapter { | |||
888 | int mtu; | 886 | int mtu; |
889 | int portnum; | 887 | int portnum; |
890 | 888 | ||
891 | spinlock_t tx_lock; | ||
892 | spinlock_t lock; | ||
893 | struct work_struct watchdog_task; | 889 | struct work_struct watchdog_task; |
894 | struct timer_list watchdog_timer; | 890 | struct timer_list watchdog_timer; |
895 | struct work_struct tx_timeout_task; | 891 | struct work_struct tx_timeout_task; |
@@ -898,16 +894,12 @@ struct netxen_adapter { | |||
898 | 894 | ||
899 | u32 cmd_producer; | 895 | u32 cmd_producer; |
900 | __le32 *cmd_consumer; | 896 | __le32 *cmd_consumer; |
901 | |||
902 | u32 last_cmd_consumer; | 897 | u32 last_cmd_consumer; |
898 | |||
903 | u32 max_tx_desc_count; | 899 | u32 max_tx_desc_count; |
904 | u32 max_rx_desc_count; | 900 | u32 max_rx_desc_count; |
905 | u32 max_jumbo_rx_desc_count; | 901 | u32 max_jumbo_rx_desc_count; |
906 | u32 max_lro_rx_desc_count; | 902 | u32 max_lro_rx_desc_count; |
907 | /* Num of instances active on cmd buffer ring */ | ||
908 | u32 proc_cmd_buf_counter; | ||
909 | |||
910 | u32 num_threads, total_threads; /*Use to keep track of xmit threads */ | ||
911 | 903 | ||
912 | u32 flags; | 904 | u32 flags; |
913 | u32 irq; | 905 | u32 irq; |