Lines Matching refs:tx_pool
1181 struct ibmvnic_tx_pool *tx_pool) in release_one_tx_pool() argument
1183 kfree(tx_pool->tx_buff); in release_one_tx_pool()
1184 kfree(tx_pool->free_map); in release_one_tx_pool()
1185 free_ltb_set(adapter, &tx_pool->ltb_set); in release_one_tx_pool()
1201 if (!adapter->tx_pool) in release_tx_pools()
1205 release_one_tx_pool(adapter, &adapter->tx_pool[i]); in release_tx_pools()
1209 kfree(adapter->tx_pool); in release_tx_pools()
1210 adapter->tx_pool = NULL; in release_tx_pools()
1218 struct ibmvnic_tx_pool *tx_pool, in init_one_tx_pool() argument
1223 tx_pool->tx_buff = kcalloc(pool_size, in init_one_tx_pool()
1226 if (!tx_pool->tx_buff) in init_one_tx_pool()
1229 tx_pool->free_map = kcalloc(pool_size, sizeof(int), GFP_KERNEL); in init_one_tx_pool()
1230 if (!tx_pool->free_map) { in init_one_tx_pool()
1231 kfree(tx_pool->tx_buff); in init_one_tx_pool()
1232 tx_pool->tx_buff = NULL; in init_one_tx_pool()
1237 tx_pool->free_map[i] = i; in init_one_tx_pool()
1239 tx_pool->consumer_index = 0; in init_one_tx_pool()
1240 tx_pool->producer_index = 0; in init_one_tx_pool()
1241 tx_pool->num_buffers = pool_size; in init_one_tx_pool()
1242 tx_pool->buf_size = buf_size; in init_one_tx_pool()
1266 if (!adapter->tx_pool) in reuse_tx_pools()
1321 adapter->tx_pool = kcalloc(num_pools, in init_tx_pools()
1323 if (!adapter->tx_pool) in init_tx_pools()
1332 kfree(adapter->tx_pool); in init_tx_pools()
1333 adapter->tx_pool = NULL; in init_tx_pools()
1349 rc = init_one_tx_pool(netdev, &adapter->tx_pool[i], in init_tx_pools()
1374 struct ibmvnic_tx_pool *tx_pool; in init_tx_pools() local
1376 tx_pool = &adapter->tx_pool[i]; in init_tx_pools()
1379 i, tx_pool->num_buffers, tx_pool->buf_size); in init_tx_pools()
1381 rc = alloc_ltb_set(adapter, &tx_pool->ltb_set, in init_tx_pools()
1382 tx_pool->num_buffers, tx_pool->buf_size); in init_tx_pools()
1386 tx_pool->consumer_index = 0; in init_tx_pools()
1387 tx_pool->producer_index = 0; in init_tx_pools()
1389 for (j = 0; j < tx_pool->num_buffers; j++) in init_tx_pools()
1390 tx_pool->free_map[j] = j; in init_tx_pools()
2019 struct ibmvnic_tx_pool *tx_pool) in clean_one_tx_pool() argument
2025 if (!tx_pool || !tx_pool->tx_buff) in clean_one_tx_pool()
2028 tx_entries = tx_pool->num_buffers; in clean_one_tx_pool()
2031 tx_buff = &tx_pool->tx_buff[i]; in clean_one_tx_pool()
2044 if (!adapter->tx_pool || !adapter->tso_pool) in clean_tx_pools()
2052 clean_one_tx_pool(adapter, &adapter->tx_pool[i]); in clean_tx_pools()
2284 struct ibmvnic_tx_pool *tx_pool; in ibmvnic_tx_scrq_clean_buffer() local
2301 tx_pool = &adapter->tso_pool[queue_num]; in ibmvnic_tx_scrq_clean_buffer()
2304 tx_pool = &adapter->tx_pool[queue_num]; in ibmvnic_tx_scrq_clean_buffer()
2306 tx_pool->free_map[tx_pool->consumer_index] = index; in ibmvnic_tx_scrq_clean_buffer()
2307 tx_pool->consumer_index = tx_pool->consumer_index == 0 ? in ibmvnic_tx_scrq_clean_buffer()
2308 tx_pool->num_buffers - 1 : in ibmvnic_tx_scrq_clean_buffer()
2309 tx_pool->consumer_index - 1; in ibmvnic_tx_scrq_clean_buffer()
2310 tx_buff = &tx_pool->tx_buff[index]; in ibmvnic_tx_scrq_clean_buffer()
2399 struct ibmvnic_tx_pool *tx_pool; in ibmvnic_xmit() local
2447 tx_pool = &adapter->tso_pool[queue_num]; in ibmvnic_xmit()
2449 tx_pool = &adapter->tx_pool[queue_num]; in ibmvnic_xmit()
2451 bufidx = tx_pool->free_map[tx_pool->consumer_index]; in ibmvnic_xmit()
2464 tx_pool->free_map[tx_pool->consumer_index] = IBMVNIC_INVALID_MAP; in ibmvnic_xmit()
2466 map_txpool_buf_to_ltb(tx_pool, bufidx, <b, &offset); in ibmvnic_xmit()
2469 memset(dst, 0, tx_pool->buf_size); in ibmvnic_xmit()
2505 tx_pool->consumer_index = in ibmvnic_xmit()
2506 (tx_pool->consumer_index + 1) % tx_pool->num_buffers; in ibmvnic_xmit()
2508 tx_buff = &tx_pool->tx_buff[bufidx]; in ibmvnic_xmit()
2622 tx_pool->consumer_index = tx_pool->consumer_index == 0 ? in ibmvnic_xmit()
2623 tx_pool->num_buffers - 1 : in ibmvnic_xmit()
2624 tx_pool->consumer_index - 1; in ibmvnic_xmit()
2946 !adapter->tx_pool) { in do_reset()
4210 struct ibmvnic_tx_pool *tx_pool; in ibmvnic_complete_tx() local
4224 tx_pool = &adapter->tso_pool[pool]; in ibmvnic_complete_tx()
4227 tx_pool = &adapter->tx_pool[pool]; in ibmvnic_complete_tx()
4230 txbuff = &tx_pool->tx_buff[index]; in ibmvnic_complete_tx()
4247 tx_pool->free_map[tx_pool->producer_index] = index; in ibmvnic_complete_tx()
4248 tx_pool->producer_index = in ibmvnic_complete_tx()
4249 (tx_pool->producer_index + 1) % in ibmvnic_complete_tx()
4250 tx_pool->num_buffers; in ibmvnic_complete_tx()