Messages in this thread Patch in this message | | | From | Saeed Mahameed <> | Subject | [PATCH 1/5] mlx5: Add aux dev for ctl interface | Date | Wed, 18 Oct 2023 01:19:37 -0700 |
| |
From: Saeed Mahameed <saeedm@nvidia.com>
Allow ctl protocol interface auxiliary driver in mlx5.
Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> --- drivers/net/ethernet/mellanox/mlx5/core/dev.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/core/dev.c index 7909f378dc93..f0e91793f4ad 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/dev.c @@ -215,8 +215,14 @@ enum { MLX5_INTERFACE_PROTOCOL_MPIB, MLX5_INTERFACE_PROTOCOL_VNET, + MLX5_INTERFACE_PROTOCOL_CTL, }; +static bool is_ctl_supported(struct mlx5_core_dev *dev) +{ + return MLX5_CAP_GEN(dev, uctx_cap); +} + static const struct mlx5_adev_device { const char *suffix; bool (*is_supported)(struct mlx5_core_dev *dev); @@ -237,6 +243,8 @@ static const struct mlx5_adev_device { .is_supported = &is_ib_rep_supported }, [MLX5_INTERFACE_PROTOCOL_MPIB] = { .suffix = "multiport", .is_supported = &is_mp_supported }, + [MLX5_INTERFACE_PROTOCOL_CTL] = { .suffix = "ctl", + .is_supported = &is_ctl_supported }, }; int mlx5_adev_idx_alloc(void) -- 2.41.0
| |