/* @pool: Pool to allocate an skbuff for @size: Size of the buffer needed for the pool @elements: Number of buffers to allocate  */
static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
/* @pool: Pool to allocate an skbuff for @size: Size of the buffer needed for the pool @elements: Number of buffers to allocate  */
static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
{
	int freed = elements;
	while (freed) {
		struct sk_buff *skb = dev_alloc_skb(size + 128);
		if (unlikely(skb == NULL)) {
			pr_warning
			    ("Failed to allocate skb for hardware pool %d\n",
			     pool);
			break;
		}
		skb_reserve(skb, 128 - (((unsigned long)skb->data) & 0x7f));
		*(struct sk_buff **)(skb->data - sizeof(void *)) = skb;
		cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128));
		freed--;
	}
	return elements - freed;
}