Lines Matching defs:pool

17  * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs
18 * @pool: Pool to allocate an skbuff for
19 * @size: Size of the buffer needed for the pool
24 static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
35 cvmx_fpa_free(skb->data, pool, size / 128);
42 * cvm_oct_free_hw_skbuff- free hardware pool skbuffs
43 * @pool: Pool to allocate an skbuff for
44 * @size: Size of the buffer needed for the pool
47 static void cvm_oct_free_hw_skbuff(int pool, int size, int elements)
52 memory = cvmx_fpa_alloc(pool);
62 pr_warn("Freeing of pool %u had too many skbuffs (%d)\n",
63 pool, elements);
65 pr_warn("Freeing of pool %u is missing %d skbuffs\n",
66 pool, elements);
70 * cvm_oct_fill_hw_memory - fill a hardware pool with memory.
71 * @pool: Pool to populate
72 * @size: Size of each buffer in the pool
77 static int cvm_oct_fill_hw_memory(int pool, int size, int elements)
96 pr_warn("Unable to allocate %u bytes for FPA pool %d\n",
97 elements * size, pool);
102 cvmx_fpa_free(fpa, pool, 0);
110 * @pool: FPA pool to free
111 * @size: Size of each buffer in the pool
112 * @elements: Number of buffers that should be in the pool
114 static void cvm_oct_free_hw_memory(int pool, int size, int elements)
120 fpa = cvmx_fpa_alloc(pool);
130 pr_warn("Freeing of pool %u had too many buffers (%d)\n",
131 pool, elements);
133 pr_warn("Warning: Freeing of pool %u is missing %d buffers\n",
134 pool, elements);
137 int cvm_oct_mem_fill_fpa(int pool, int size, int elements)
141 if (pool == CVMX_FPA_PACKET_POOL)
142 freed = cvm_oct_fill_hw_skbuff(pool, size, elements);
144 freed = cvm_oct_fill_hw_memory(pool, size, elements);
148 void cvm_oct_mem_empty_fpa(int pool, int size, int elements)
150 if (pool == CVMX_FPA_PACKET_POOL)
151 cvm_oct_free_hw_skbuff(pool, size, elements);
153 cvm_oct_free_hw_memory(pool, size, elements);