Lines Matching refs:tx_pool
1180 struct ibmvnic_tx_pool *tx_pool) in release_one_tx_pool() argument
1182 kfree(tx_pool->tx_buff); in release_one_tx_pool()
1183 kfree(tx_pool->free_map); in release_one_tx_pool()
1184 free_ltb_set(adapter, &tx_pool->ltb_set); in release_one_tx_pool()
1200 if (!adapter->tx_pool) in release_tx_pools()
1204 release_one_tx_pool(adapter, &adapter->tx_pool[i]); in release_tx_pools()
1208 kfree(adapter->tx_pool); in release_tx_pools()
1209 adapter->tx_pool = NULL; in release_tx_pools()
1217 struct ibmvnic_tx_pool *tx_pool, in init_one_tx_pool() argument
1222 tx_pool->tx_buff = kcalloc(pool_size, in init_one_tx_pool()
1225 if (!tx_pool->tx_buff) in init_one_tx_pool()
1228 tx_pool->free_map = kcalloc(pool_size, sizeof(int), GFP_KERNEL); in init_one_tx_pool()
1229 if (!tx_pool->free_map) { in init_one_tx_pool()
1230 kfree(tx_pool->tx_buff); in init_one_tx_pool()
1231 tx_pool->tx_buff = NULL; in init_one_tx_pool()
1236 tx_pool->free_map[i] = i; in init_one_tx_pool()
1238 tx_pool->consumer_index = 0; in init_one_tx_pool()
1239 tx_pool->producer_index = 0; in init_one_tx_pool()
1240 tx_pool->num_buffers = pool_size; in init_one_tx_pool()
1241 tx_pool->buf_size = buf_size; in init_one_tx_pool()
1265 if (!adapter->tx_pool) in reuse_tx_pools()
1320 adapter->tx_pool = kcalloc(num_pools, in init_tx_pools()
1322 if (!adapter->tx_pool) in init_tx_pools()
1331 kfree(adapter->tx_pool); in init_tx_pools()
1332 adapter->tx_pool = NULL; in init_tx_pools()
1348 rc = init_one_tx_pool(netdev, &adapter->tx_pool[i], in init_tx_pools()
1373 struct ibmvnic_tx_pool *tx_pool; in init_tx_pools() local
1375 tx_pool = &adapter->tx_pool[i]; in init_tx_pools()
1378 i, tx_pool->num_buffers, tx_pool->buf_size); in init_tx_pools()
1380 rc = alloc_ltb_set(adapter, &tx_pool->ltb_set, in init_tx_pools()
1381 tx_pool->num_buffers, tx_pool->buf_size); in init_tx_pools()
1385 tx_pool->consumer_index = 0; in init_tx_pools()
1386 tx_pool->producer_index = 0; in init_tx_pools()
1388 for (j = 0; j < tx_pool->num_buffers; j++) in init_tx_pools()
1389 tx_pool->free_map[j] = j; in init_tx_pools()
2018 struct ibmvnic_tx_pool *tx_pool) in clean_one_tx_pool() argument
2024 if (!tx_pool || !tx_pool->tx_buff) in clean_one_tx_pool()
2027 tx_entries = tx_pool->num_buffers; in clean_one_tx_pool()
2030 tx_buff = &tx_pool->tx_buff[i]; in clean_one_tx_pool()
2043 if (!adapter->tx_pool || !adapter->tso_pool) in clean_tx_pools()
2051 clean_one_tx_pool(adapter, &adapter->tx_pool[i]); in clean_tx_pools()
2299 struct ibmvnic_tx_pool *tx_pool; in ibmvnic_tx_scrq_clean_buffer() local
2316 tx_pool = &adapter->tso_pool[queue_num]; in ibmvnic_tx_scrq_clean_buffer()
2319 tx_pool = &adapter->tx_pool[queue_num]; in ibmvnic_tx_scrq_clean_buffer()
2321 tx_pool->free_map[tx_pool->consumer_index] = index; in ibmvnic_tx_scrq_clean_buffer()
2322 tx_pool->consumer_index = tx_pool->consumer_index == 0 ? in ibmvnic_tx_scrq_clean_buffer()
2323 tx_pool->num_buffers - 1 : in ibmvnic_tx_scrq_clean_buffer()
2324 tx_pool->consumer_index - 1; in ibmvnic_tx_scrq_clean_buffer()
2325 tx_buff = &tx_pool->tx_buff[index]; in ibmvnic_tx_scrq_clean_buffer()
2387 struct ibmvnic_tx_pool *tx_pool; in ibmvnic_xmit() local
2432 tx_pool = &adapter->tso_pool[queue_num]; in ibmvnic_xmit()
2434 tx_pool = &adapter->tx_pool[queue_num]; in ibmvnic_xmit()
2436 bufidx = tx_pool->free_map[tx_pool->consumer_index]; in ibmvnic_xmit()
2447 tx_pool->free_map[tx_pool->consumer_index] = IBMVNIC_INVALID_MAP; in ibmvnic_xmit()
2449 map_txpool_buf_to_ltb(tx_pool, bufidx, <b, &offset); in ibmvnic_xmit()
2452 memset(dst, 0, tx_pool->buf_size); in ibmvnic_xmit()
2477 tx_pool->consumer_index = in ibmvnic_xmit()
2478 (tx_pool->consumer_index + 1) % tx_pool->num_buffers; in ibmvnic_xmit()
2480 tx_buff = &tx_pool->tx_buff[bufidx]; in ibmvnic_xmit()
2568 tx_pool->consumer_index = tx_pool->consumer_index == 0 ? in ibmvnic_xmit()
2569 tx_pool->num_buffers - 1 : in ibmvnic_xmit()
2570 tx_pool->consumer_index - 1; in ibmvnic_xmit()
2892 !adapter->tx_pool) { in do_reset()
4150 struct ibmvnic_tx_pool *tx_pool; in ibmvnic_complete_tx() local
4168 tx_pool = &adapter->tso_pool[pool]; in ibmvnic_complete_tx()
4171 tx_pool = &adapter->tx_pool[pool]; in ibmvnic_complete_tx()
4174 txbuff = &tx_pool->tx_buff[index]; in ibmvnic_complete_tx()
4191 tx_pool->free_map[tx_pool->producer_index] = index; in ibmvnic_complete_tx()
4192 tx_pool->producer_index = in ibmvnic_complete_tx()
4193 (tx_pool->producer_index + 1) % in ibmvnic_complete_tx()
4194 tx_pool->num_buffers; in ibmvnic_complete_tx()