res_alloc         475 drivers/net/ethernet/mellanox/mlx4/fw.c 		size = priv->mfunc.master.res_tracker.res_alloc[RES_QP].quota[slave];
res_alloc         480 drivers/net/ethernet/mellanox/mlx4/fw.c 		size = priv->mfunc.master.res_tracker.res_alloc[RES_SRQ].quota[slave];
res_alloc         485 drivers/net/ethernet/mellanox/mlx4/fw.c 		size = priv->mfunc.master.res_tracker.res_alloc[RES_CQ].quota[slave];
res_alloc         509 drivers/net/ethernet/mellanox/mlx4/fw.c 		size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave];
res_alloc         514 drivers/net/ethernet/mellanox/mlx4/fw.c 		size = priv->mfunc.master.res_tracker.res_alloc[RES_MTT].quota[slave];
res_alloc         561 drivers/net/ethernet/mellanox/mlx4/mlx4.h 	struct resource_allocator res_alloc[MLX4_NUM_OF_RESOURCE_TYPE];
res_alloc         312 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct resource_allocator *res_alloc =
res_alloc         313 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		&priv->mfunc.master.res_tracker.res_alloc[res_type];
res_alloc         321 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	spin_lock(&res_alloc->alloc_lock);
res_alloc         323 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->allocated[(port - 1) *
res_alloc         325 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->allocated[slave];
res_alloc         326 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	free = (port > 0) ? res_alloc->res_port_free[port - 1] :
res_alloc         327 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->res_free;
res_alloc         328 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	reserved = (port > 0) ? res_alloc->res_port_rsvd[port - 1] :
res_alloc         329 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->res_reserved;
res_alloc         330 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	guaranteed = res_alloc->guaranteed[slave];
res_alloc         332 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	if (allocated + count > res_alloc->quota[slave]) {
res_alloc         335 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			  allocated, res_alloc->quota[slave]);
res_alloc         362 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->allocated[(port - 1) *
res_alloc         364 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->res_port_free[port - 1] -= count;
res_alloc         365 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->res_port_rsvd[port - 1] -= from_rsvd;
res_alloc         367 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->allocated[slave] += count;
res_alloc         368 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->res_free -= count;
res_alloc         369 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->res_reserved -= from_rsvd;
res_alloc         374 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	spin_unlock(&res_alloc->alloc_lock);
res_alloc         383 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	struct resource_allocator *res_alloc =
res_alloc         384 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		&priv->mfunc.master.res_tracker.res_alloc[res_type];
res_alloc         390 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	spin_lock(&res_alloc->alloc_lock);
res_alloc         393 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->allocated[(port - 1) *
res_alloc         395 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->allocated[slave];
res_alloc         396 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	guaranteed = res_alloc->guaranteed[slave];
res_alloc         409 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->allocated[(port - 1) *
res_alloc         411 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->res_port_free[port - 1] += count;
res_alloc         412 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->res_port_rsvd[port - 1] += from_rsvd;
res_alloc         414 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->allocated[slave] -= count;
res_alloc         415 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->res_free += count;
res_alloc         416 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->res_reserved += from_rsvd;
res_alloc         419 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	spin_unlock(&res_alloc->alloc_lock);
res_alloc         424 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					 struct resource_allocator *res_alloc,
res_alloc         428 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	res_alloc->guaranteed[vf] = num_instances /
res_alloc         430 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	res_alloc->quota[vf] = (num_instances / 2) + res_alloc->guaranteed[vf];
res_alloc         432 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->res_free = num_instances;
res_alloc         435 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->res_free += dev->caps.reserved_mtts;
res_alloc         436 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->guaranteed[vf] += dev->caps.reserved_mtts;
res_alloc         437 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->quota[vf] += dev->caps.reserved_mtts;
res_alloc         463 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[RES_QP].quota[pf];
res_alloc         465 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[RES_CQ].quota[pf];
res_alloc         467 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[RES_SRQ].quota[pf];
res_alloc         469 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[RES_MTT].quota[pf];
res_alloc         471 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[pf];
res_alloc         476 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				 struct resource_allocator *res_alloc,
res_alloc         494 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	if ((res_alloc->res_reserved + counters_guaranteed) >
res_alloc         526 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		struct resource_allocator *res_alloc =
res_alloc         527 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			&priv->mfunc.master.res_tracker.res_alloc[i];
res_alloc         528 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->quota = kmalloc_array(dev->persist->num_vfs + 1,
res_alloc         531 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		res_alloc->guaranteed = kmalloc_array(dev->persist->num_vfs + 1,
res_alloc         535 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->allocated =
res_alloc         540 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->allocated =
res_alloc         545 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			res_alloc->res_free = dev->caps.max_counters - 1;
res_alloc         547 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		if (!res_alloc->quota || !res_alloc->guaranteed ||
res_alloc         548 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		    !res_alloc->allocated)
res_alloc         551 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		spin_lock_init(&res_alloc->alloc_lock);
res_alloc         557 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				initialize_res_quotas(dev, res_alloc, RES_QP,
res_alloc         563 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				initialize_res_quotas(dev, res_alloc, RES_CQ,
res_alloc         568 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				initialize_res_quotas(dev, res_alloc, RES_SRQ,
res_alloc         573 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				initialize_res_quotas(dev, res_alloc, RES_MPT,
res_alloc         578 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				initialize_res_quotas(dev, res_alloc, RES_MTT,
res_alloc         598 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->quota[t] =
res_alloc         601 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->guaranteed[t] = 2;
res_alloc         603 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 						res_alloc->res_port_free[j] =
res_alloc         606 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->quota[t] = MLX4_MAX_MAC_NUM;
res_alloc         607 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->guaranteed[t] = 2;
res_alloc         612 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->quota[t] = MLX4_MAX_VLAN_NUM;
res_alloc         613 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->guaranteed[t] = MLX4_MAX_VLAN_NUM / 2;
res_alloc         615 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 						res_alloc->res_port_free[j] =
res_alloc         616 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 							res_alloc->quota[t];
res_alloc         618 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->quota[t] = MLX4_MAX_VLAN_NUM / 2;
res_alloc         619 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					res_alloc->guaranteed[t] = 0;
res_alloc         623 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				res_alloc->quota[t] = dev->caps.max_counters;
res_alloc         624 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				res_alloc->guaranteed[t] =
res_alloc         625 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 					mlx4_calc_res_counter_guaranteed(dev, res_alloc, t);
res_alloc         633 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 						res_alloc->res_port_rsvd[j] +=
res_alloc         634 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 							res_alloc->guaranteed[t];
res_alloc         636 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				res_alloc->res_reserved += res_alloc->guaranteed[t];
res_alloc         645 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		kfree(priv->mfunc.master.res_tracker.res_alloc[i].allocated);
res_alloc         646 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[i].allocated = NULL;
res_alloc         647 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		kfree(priv->mfunc.master.res_tracker.res_alloc[i].guaranteed);
res_alloc         648 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[i].guaranteed = NULL;
res_alloc         649 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		kfree(priv->mfunc.master.res_tracker.res_alloc[i].quota);
res_alloc         650 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		priv->mfunc.master.res_tracker.res_alloc[i].quota = NULL;
res_alloc         678 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				kfree(priv->mfunc.master.res_tracker.res_alloc[i].allocated);
res_alloc         679 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				priv->mfunc.master.res_tracker.res_alloc[i].allocated = NULL;
res_alloc         680 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				kfree(priv->mfunc.master.res_tracker.res_alloc[i].guaranteed);
res_alloc         681 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				priv->mfunc.master.res_tracker.res_alloc[i].guaranteed = NULL;
res_alloc         682 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				kfree(priv->mfunc.master.res_tracker.res_alloc[i].quota);
res_alloc         683 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 				priv->mfunc.master.res_tracker.res_alloc[i].quota = NULL;