Lines Matching refs:rx_pool
558 adapter->rx_pool[i].active = 0; in deactivate_rx_pools()
700 if (adapter->rx_pool[i].active) in replenish_pools()
701 replenish_rx_pool(adapter, &adapter->rx_pool[i]); in replenish_pools()
775 struct ibmvnic_rx_pool *rx_pool; in release_rx_pools() local
778 if (!adapter->rx_pool) in release_rx_pools()
782 rx_pool = &adapter->rx_pool[i]; in release_rx_pools()
786 kfree(rx_pool->free_map); in release_rx_pools()
788 free_ltb_set(adapter, &rx_pool->ltb_set); in release_rx_pools()
790 if (!rx_pool->rx_buff) in release_rx_pools()
793 for (j = 0; j < rx_pool->size; j++) { in release_rx_pools()
794 if (rx_pool->rx_buff[j].skb) { in release_rx_pools()
795 dev_kfree_skb_any(rx_pool->rx_buff[j].skb); in release_rx_pools()
796 rx_pool->rx_buff[j].skb = NULL; in release_rx_pools()
800 kfree(rx_pool->rx_buff); in release_rx_pools()
803 kfree(adapter->rx_pool); in release_rx_pools()
804 adapter->rx_pool = NULL; in release_rx_pools()
829 if (!adapter->rx_pool) in reuse_rx_pools()
864 struct ibmvnic_rx_pool *rx_pool; in init_rx_pools() local
882 adapter->rx_pool = kcalloc(num_pools, in init_rx_pools()
885 if (!adapter->rx_pool) { in init_rx_pools()
896 rx_pool = &adapter->rx_pool[i]; in init_rx_pools()
902 rx_pool->size = pool_size; in init_rx_pools()
903 rx_pool->index = i; in init_rx_pools()
904 rx_pool->buff_size = ALIGN(buff_size, L1_CACHE_BYTES); in init_rx_pools()
906 rx_pool->free_map = kcalloc(rx_pool->size, sizeof(int), in init_rx_pools()
908 if (!rx_pool->free_map) { in init_rx_pools()
914 rx_pool->rx_buff = kcalloc(rx_pool->size, in init_rx_pools()
917 if (!rx_pool->rx_buff) { in init_rx_pools()
929 rx_pool = &adapter->rx_pool[i]; in init_rx_pools()
931 i, rx_pool->size, rx_pool->buff_size); in init_rx_pools()
933 rc = alloc_ltb_set(adapter, &rx_pool->ltb_set, in init_rx_pools()
934 rx_pool->size, rx_pool->buff_size); in init_rx_pools()
938 for (j = 0; j < rx_pool->size; ++j) { in init_rx_pools()
941 rx_pool->free_map[j] = j; in init_rx_pools()
947 rx_buff = &rx_pool->rx_buff[j]; in init_rx_pools()
957 atomic_set(&rx_pool->available, 0); in init_rx_pools()
958 rx_pool->next_alloc = 0; in init_rx_pools()
959 rx_pool->next_free = 0; in init_rx_pools()
963 rx_pool->active = 1; in init_rx_pools()
1721 struct ibmvnic_rx_pool *rx_pool; in clean_rx_pools() local
1727 if (!adapter->rx_pool) in clean_rx_pools()
1735 rx_pool = &adapter->rx_pool[i]; in clean_rx_pools()
1736 if (!rx_pool || !rx_pool->rx_buff) in clean_rx_pools()
1741 rx_buff = &rx_pool->rx_buff[j]; in clean_rx_pools()
2623 !adapter->rx_pool || in do_reset()
3146 struct ibmvnic_rx_pool *pool = &adapter->rx_pool[rx_buff->pool_index]; in remove_buff_from_pool()
3247 ((atomic_read(&adapter->rx_pool[scrq_num].available) < in ibmvnic_poll()
3250 replenish_rx_pool(adapter, &adapter->rx_pool[scrq_num]); in ibmvnic_poll()
6298 ret += adapter->rx_pool[i].size * in ibmvnic_get_desired_dma()
6299 IOMMU_PAGE_ALIGN(adapter->rx_pool[i].buff_size, tbl); in ibmvnic_get_desired_dma()