Lines Matching defs:func_id

50 	u16	func_id;
72 static u32 get_function(u16 func_id, bool ec_function)
74 return (u32)func_id | (ec_function << 16);
77 static u16 func_id_to_type(struct mlx5_core_dev *dev, u16 func_id, bool ec_function)
79 if (!func_id)
82 if (func_id <= max(mlx5_core_max_vfs(dev), mlx5_core_max_ec_vfs(dev))) {
198 static int mlx5_cmd_query_pages(struct mlx5_core_dev *dev, u16 *func_id,
216 *func_id = MLX5_GET(query_pages_out, out, function_id);
336 static void page_notify_fail(struct mlx5_core_dev *dev, u16 func_id,
344 MLX5_SET(manage_pages_in, in, function_id, func_id);
349 mlx5_core_warn(dev, "page notify failed func_id(%d) err(%d)\n",
350 func_id, err);
353 static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,
356 u32 function = get_function(func_id, ec_function);
392 MLX5_SET(manage_pages_in, in, function_id, func_id);
407 mlx5_core_warn(dev, "func_id 0x%x, npages %d, err %d\n",
408 func_id, npages, err);
412 func_type = func_id_to_type(dev, func_id, ec_function);
416 mlx5_core_dbg(dev, "npages %d, ec_function %d, func_id 0x%x, err %d\n",
417 npages, ec_function, func_id, err);
430 page_notify_fail(dev, func_id, ec_function);
434 static void release_all_pages(struct mlx5_core_dev *dev, u16 func_id,
437 u32 function = get_function(func_id, ec_function);
456 func_type = func_id_to_type(dev, func_id, ec_function);
460 mlx5_core_dbg(dev, "npages %d, ec_function %d, func_id 0x%x\n",
461 npages, ec_function, func_id);
489 u32 func_id;
498 func_id = MLX5_GET(manage_pages_in, in, function_id);
501 root = xa_load(&dev->priv.page_root_xa, get_function(func_id, ec_function));
517 static int reclaim_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,
520 u32 function = get_function(func_id, ec_function);
539 MLX5_SET(manage_pages_in, in, function_id, func_id);
544 func_id, npages, outlen);
576 func_type = func_id_to_type(dev, func_id, ec_function);
592 release_all_pages(dev, req->func_id, req->ec_function);
594 err = reclaim_pages(dev, req->func_id, -1 * req->npages, NULL,
597 err = give_pages(dev, req->func_id, req->npages, 1, req->ec_function);
620 u16 func_id;
627 func_id = be16_to_cpu(eqe->data.req_pages.func_id);
633 func_id, npages, release_all);
641 req->func_id = func_id;
652 u16 func_id;
656 err = mlx5_cmd_query_pages(dev, &func_id, &npages, boot);
660 mlx5_core_dbg(dev, "requested %d %s pages for func_id 0x%x\n",
661 npages, boot ? "boot" : "init", func_id);
663 return give_pages(dev, func_id, npages, 0, mlx5_core_is_ecpf(dev));
698 mlx5_core_warn(dev, "reclaim_pages err (%d) func_id=0x%x ec_func=0x%x\n",