diff options
Diffstat (limited to 'drivers/net/ibmveth.h')
-rw-r--r-- | drivers/net/ibmveth.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/ibmveth.h b/drivers/net/ibmveth.h index 51a470da9686..46919a814fca 100644 --- a/drivers/net/ibmveth.h +++ b/drivers/net/ibmveth.h | |||
@@ -49,6 +49,7 @@ | |||
49 | #define H_SEND_LOGICAL_LAN 0x120 | 49 | #define H_SEND_LOGICAL_LAN 0x120 |
50 | #define H_MULTICAST_CTRL 0x130 | 50 | #define H_MULTICAST_CTRL 0x130 |
51 | #define H_CHANGE_LOGICAL_LAN_MAC 0x14C | 51 | #define H_CHANGE_LOGICAL_LAN_MAC 0x14C |
52 | #define H_FREE_LOGICAL_LAN_BUFFER 0x1D4 | ||
52 | 53 | ||
53 | /* hcall macros */ | 54 | /* hcall macros */ |
54 | #define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \ | 55 | #define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \ |
@@ -69,13 +70,15 @@ | |||
69 | #define h_change_logical_lan_mac(ua, mac) \ | 70 | #define h_change_logical_lan_mac(ua, mac) \ |
70 | plpar_hcall_norets(H_CHANGE_LOGICAL_LAN_MAC, ua, mac) | 71 | plpar_hcall_norets(H_CHANGE_LOGICAL_LAN_MAC, ua, mac) |
71 | 72 | ||
72 | #define IbmVethNumBufferPools 3 | 73 | #define h_free_logical_lan_buffer(ua, bufsize) \ |
73 | #define IbmVethPool0DftSize (1024 * 2) | 74 | plpar_hcall_norets(H_FREE_LOGICAL_LAN_BUFFER, ua, bufsize) |
74 | #define IbmVethPool1DftSize (1024 * 4) | 75 | |
75 | #define IbmVethPool2DftSize (1024 * 10) | 76 | #define IbmVethNumBufferPools 5 |
76 | #define IbmVethPool0DftCnt 256 | 77 | #define IBMVETH_BUFF_OH 22 /* Overhead: 14 ethernet header + 8 opaque handle */ |
77 | #define IbmVethPool1DftCnt 256 | 78 | |
78 | #define IbmVethPool2DftCnt 256 | 79 | /* pool_size should be sorted */ |
80 | static int pool_size[] = { 512, 1024 * 2, 1024 * 16, 1024 * 32, 1024 * 64 }; | ||
81 | static int pool_count[] = { 256, 768, 256, 256, 256 }; | ||
79 | 82 | ||
80 | #define IBM_VETH_INVALID_MAP ((u16)0xffff) | 83 | #define IBM_VETH_INVALID_MAP ((u16)0xffff) |
81 | 84 | ||
@@ -90,6 +93,7 @@ struct ibmveth_buff_pool { | |||
90 | u16 *free_map; | 93 | u16 *free_map; |
91 | dma_addr_t *dma_addr; | 94 | dma_addr_t *dma_addr; |
92 | struct sk_buff **skbuff; | 95 | struct sk_buff **skbuff; |
96 | int active; | ||
93 | }; | 97 | }; |
94 | 98 | ||
95 | struct ibmveth_rx_q { | 99 | struct ibmveth_rx_q { |
@@ -114,10 +118,6 @@ struct ibmveth_adapter { | |||
114 | dma_addr_t filter_list_dma; | 118 | dma_addr_t filter_list_dma; |
115 | struct ibmveth_buff_pool rx_buff_pool[IbmVethNumBufferPools]; | 119 | struct ibmveth_buff_pool rx_buff_pool[IbmVethNumBufferPools]; |
116 | struct ibmveth_rx_q rx_queue; | 120 | struct ibmveth_rx_q rx_queue; |
117 | atomic_t not_replenishing; | ||
118 | |||
119 | /* helper tasks */ | ||
120 | struct work_struct replenish_task; | ||
121 | 121 | ||
122 | /* adapter specific stats */ | 122 | /* adapter specific stats */ |
123 | u64 replenish_task_cycles; | 123 | u64 replenish_task_cycles; |
@@ -131,6 +131,7 @@ struct ibmveth_adapter { | |||
131 | u64 tx_linearize_failed; | 131 | u64 tx_linearize_failed; |
132 | u64 tx_map_failed; | 132 | u64 tx_map_failed; |
133 | u64 tx_send_failed; | 133 | u64 tx_send_failed; |
134 | spinlock_t stats_lock; | ||
134 | }; | 135 | }; |
135 | 136 | ||
136 | struct ibmveth_buf_desc_fields { | 137 | struct ibmveth_buf_desc_fields { |