/* igbvf_desc_unused - calculate if we have unused descriptors  */
static int igbvf_desc_unused(struct igbvf_ring *ring)
/* igbvf_desc_unused - calculate if we have unused descriptors  */
static int igbvf_desc_unused(struct igbvf_ring *ring)
{
	if (ring->next_to_clean > ring->next_to_use)
		return ring->next_to_clean - ring->next_to_use - 1;
	return ring->count + ring->next_to_clean - ring->next_to_use - 1;
}