Lines Matching refs:allocated
315 int allocated, free, reserved, guaranteed, from_free; in mlx4_grant_resource() local
322 allocated = (port > 0) ? in mlx4_grant_resource()
323 res_alloc->allocated[(port - 1) * in mlx4_grant_resource()
325 res_alloc->allocated[slave]; in mlx4_grant_resource()
332 if (allocated + count > res_alloc->quota[slave]) { in mlx4_grant_resource()
335 allocated, res_alloc->quota[slave]); in mlx4_grant_resource()
339 if (allocated + count <= guaranteed) { in mlx4_grant_resource()
344 if (guaranteed - allocated > 0) in mlx4_grant_resource()
345 from_free = count - (guaranteed - allocated); in mlx4_grant_resource()
362 res_alloc->allocated[(port - 1) * in mlx4_grant_resource()
367 res_alloc->allocated[slave] += count; in mlx4_grant_resource()
385 int allocated, guaranteed, from_rsvd; in mlx4_release_resource() local
392 allocated = (port > 0) ? in mlx4_release_resource()
393 res_alloc->allocated[(port - 1) * in mlx4_release_resource()
395 res_alloc->allocated[slave]; in mlx4_release_resource()
398 if (allocated - count >= guaranteed) { in mlx4_release_resource()
402 if (allocated - guaranteed > 0) in mlx4_release_resource()
403 from_rsvd = count - (allocated - guaranteed); in mlx4_release_resource()
409 res_alloc->allocated[(port - 1) * in mlx4_release_resource()
414 res_alloc->allocated[slave] -= count; in mlx4_release_resource()
535 res_alloc->allocated = in mlx4_init_resource_tracker()
540 res_alloc->allocated = in mlx4_init_resource_tracker()
548 !res_alloc->allocated) in mlx4_init_resource_tracker()
645 kfree(priv->mfunc.master.res_tracker.res_alloc[i].allocated); in mlx4_init_resource_tracker()
646 priv->mfunc.master.res_tracker.res_alloc[i].allocated = NULL; in mlx4_init_resource_tracker()
678 kfree(priv->mfunc.master.res_tracker.res_alloc[i].allocated); in mlx4_free_resource_tracker()
679 priv->mfunc.master.res_tracker.res_alloc[i].allocated = NULL; in mlx4_free_resource_tracker()