Commit c788d79c authored by Jianbo Liu's avatar Jianbo Liu Committed by Jakub Kicinski

net/mlx5: Skip pages EQ creation for non-page supplier function

Page events are not issued by device on the function if
page_request_disable is set, so no need to create pages EQ.
Signed-off-by: default avatarJianbo Liu <jianbol@nvidia.com>
Reviewed-by: default avatarParav Pandit <parav@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20240402133043.56322-11-tariqt@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 137f3d50
...@@ -688,6 +688,12 @@ static int create_async_eqs(struct mlx5_core_dev *dev) ...@@ -688,6 +688,12 @@ static int create_async_eqs(struct mlx5_core_dev *dev)
if (err) if (err)
goto err2; goto err2;
/* Skip page eq creation when the device does not request for page requests */
if (MLX5_CAP_GEN(dev, page_request_disable)) {
mlx5_core_dbg(dev, "Skip page EQ creation\n");
return 0;
}
param = (struct mlx5_eq_param) { param = (struct mlx5_eq_param) {
.irq = table->ctrl_irq, .irq = table->ctrl_irq,
.nent = /* TODO: sriov max_vf + */ 1, .nent = /* TODO: sriov max_vf + */ 1,
...@@ -716,6 +722,7 @@ static void destroy_async_eqs(struct mlx5_core_dev *dev) ...@@ -716,6 +722,7 @@ static void destroy_async_eqs(struct mlx5_core_dev *dev)
{ {
struct mlx5_eq_table *table = dev->priv.eq_table; struct mlx5_eq_table *table = dev->priv.eq_table;
if (!MLX5_CAP_GEN(dev, page_request_disable))
cleanup_async_eq(dev, &table->pages_eq, "pages"); cleanup_async_eq(dev, &table->pages_eq, "pages");
cleanup_async_eq(dev, &table->async_eq, "async"); cleanup_async_eq(dev, &table->async_eq, "async");
mlx5_cmd_allowed_opcode(dev, MLX5_CMD_OP_DESTROY_EQ); mlx5_cmd_allowed_opcode(dev, MLX5_CMD_OP_DESTROY_EQ);
......
...@@ -1485,7 +1485,9 @@ enum { ...@@ -1485,7 +1485,9 @@ enum {
}; };
struct mlx5_ifc_cmd_hca_cap_bits { struct mlx5_ifc_cmd_hca_cap_bits {
u8 reserved_at_0[0x10]; u8 reserved_at_0[0x6];
u8 page_request_disable[0x1];
u8 reserved_at_7[0x9];
u8 shared_object_to_user_object_allowed[0x1]; u8 shared_object_to_user_object_allowed[0x1];
u8 reserved_at_13[0xe]; u8 reserved_at_13[0xe];
u8 vhca_resource_manager[0x1]; u8 vhca_resource_manager[0x1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment