IB/mlx5: Support querying eswitch functions from DEVX
authorBodong Wang <bodong@mellanox.com>
Mon, 29 Aug 2022 09:04:12 +0000 (12:04 +0300)
committerLeon Romanovsky <leon@kernel.org>
Mon, 5 Sep 2022 11:54:39 +0000 (14:54 +0300)
Query eswitch functions returns information of the external host
PF(if it exists). It can be used to check if DEVX is running on ECPF.

Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Bodong Wang <bodong@mellanox.com>
Link: https://lore.kernel.org/r/4265925178ab3224dc1d3e3784bb312d808edca5.1661763785.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/devx.c

index 2a2a9e9afc9dadfae51a602353c381b78f3c26e1..adefff89fb397645ff90641118edf7d570b4819d 100644 (file)
@@ -907,6 +907,7 @@ static bool devx_is_whitelist_cmd(void *in)
        case MLX5_CMD_OP_QUERY_HCA_CAP:
        case MLX5_CMD_OP_QUERY_HCA_VPORT_CONTEXT:
        case MLX5_CMD_OP_QUERY_ESW_VPORT_CONTEXT:
+       case MLX5_CMD_OP_QUERY_ESW_FUNCTIONS:
                return true;
        default:
                return false;
@@ -962,6 +963,7 @@ static bool devx_is_general_cmd(void *in, struct mlx5_ib_dev *dev)
        case MLX5_CMD_OP_QUERY_CONG_PARAMS:
        case MLX5_CMD_OP_QUERY_CONG_STATISTICS:
        case MLX5_CMD_OP_QUERY_LAG:
+       case MLX5_CMD_OP_QUERY_ESW_FUNCTIONS:
                return true;
        default:
                return false;