Lines Matching defs:pool

680  * @rxpool: The receive buffer pool containing buffer
686 * pool and its corresponding offset. Assume for now that each LTB is of
715 * @txpool: The transmit buffer pool containing buffer
721 * pool and its corresponding offset.
755 struct ibmvnic_rx_pool *pool)
757 int count = pool->size - atomic_read(&pool->available);
758 u64 handle = adapter->rx_scrq[pool->index]->handle;
774 if (!pool->active)
777 rx_scrq = adapter->rx_scrq[pool->index];
787 bufidx = pool->free_map[pool->next_free];
794 skb = pool->rx_buff[bufidx].skb;
797 pool->buff_size);
805 pool->free_map[pool->next_free] = IBMVNIC_INVALID_MAP;
806 pool->next_free = (pool->next_free + 1) % pool->size;
809 map_rxpool_buf_to_ltb(pool, bufidx, &ltb, &offset);
811 memset(dst, 0, pool->buff_size);
814 /* add the skb to an rx_buff in the pool */
815 pool->rx_buff[bufidx].data = dst;
816 pool->rx_buff[bufidx].dma = dma_addr;
817 pool->rx_buff[bufidx].skb = skb;
818 pool->rx_buff[bufidx].pool_index = pool->index;
819 pool->rx_buff[bufidx].size = pool->buff_size;
826 cpu_to_be64((u64)&pool->rx_buff[bufidx]);
838 sub_crq->rx_add.len = cpu_to_be32(pool->buff_size << shift);
854 atomic_add(buffers_added, &pool->available);
863 pool->next_free = pool->next_free == 0 ?
864 pool->size - 1 : pool->next_free - 1;
868 bufidx = (int)(rx_buff - pool->rx_buff);
869 pool->free_map[pool->next_free] = bufidx;
870 dev_kfree_skb_any(pool->rx_buff[bufidx].skb);
871 pool->rx_buff[bufidx].skb = NULL;
874 atomic_add(buffers_added, &pool->available);
877 /* Disable buffer pool replenishment and report carrier off if
1007 * pools can be reused if the pool parameters (number of pools,
1008 * number of buffers in the pool and size of each buffer) have not
1059 u64 pool_size; /* # of buffers in one pool */
1123 dev_dbg(dev, "Updating LTB for rx pool %d [%d, %d]\n",
1147 /* Mark pool "empty" so replenish_rx_pools() will
1154 * on failover. Ensure pool is active now.
1251 * pools can be reused if the pool parameters (number of pools,
1252 * number of buffers in the pool and mtu) have not changed.
1299 u64 pool_size; /* # of buffers in pool */
1307 * size of each buffer in the pool has changed.
1345 dev_dbg(dev, "Init tx pool %d [%llu, %llu]\n",
1377 dev_dbg(dev, "Updating LTB for tx pool %d [%d, %d]\n",
1393 dev_dbg(dev, "Updating LTB for tso pool %d [%d, %d]\n",
3413 struct ibmvnic_rx_pool *pool = &adapter->rx_pool[rx_buff->pool_index];
3417 pool->free_map[pool->next_alloc] = (int)(rx_buff - pool->rx_buff);
3418 pool->next_alloc = (pool->next_alloc + 1) % pool->size;
3420 atomic_dec(&pool->available);
4159 unsigned int pool = scrq->pool_index;
4168 tx_pool = &adapter->tso_pool[pool];
4171 tx_pool = &adapter->tx_pool[pool];