Commit 7f575103 authored by Mark Bloch's avatar Mark Bloch Committed by Jason Gunthorpe

RDMA/mlx5: Allow DEVX and raw creation flow on reps

Remove the limitations that were in place and provide support for DEVX and
raw flow creation on reps.
Signed-off-by: default avatarMark Bloch <markb@mellanox.com>
Reviewed-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 56e5acd4
...@@ -1906,7 +1906,7 @@ static bool devx_is_supported(struct ib_device *device) ...@@ -1906,7 +1906,7 @@ static bool devx_is_supported(struct ib_device *device)
{ {
struct mlx5_ib_dev *dev = to_mdev(device); struct mlx5_ib_dev *dev = to_mdev(device);
return !dev->is_rep && MLX5_CAP_GEN(dev->mdev, log_max_uctx); return MLX5_CAP_GEN(dev->mdev, log_max_uctx);
} }
const struct uapi_definition mlx5_ib_devx_defs[] = { const struct uapi_definition mlx5_ib_devx_defs[] = {
......
...@@ -670,15 +670,9 @@ DECLARE_UVERBS_NAMED_OBJECT(MLX5_IB_OBJECT_FLOW_MATCHER, ...@@ -670,15 +670,9 @@ DECLARE_UVERBS_NAMED_OBJECT(MLX5_IB_OBJECT_FLOW_MATCHER,
&UVERBS_METHOD(MLX5_IB_METHOD_FLOW_MATCHER_CREATE), &UVERBS_METHOD(MLX5_IB_METHOD_FLOW_MATCHER_CREATE),
&UVERBS_METHOD(MLX5_IB_METHOD_FLOW_MATCHER_DESTROY)); &UVERBS_METHOD(MLX5_IB_METHOD_FLOW_MATCHER_DESTROY));
static bool flow_is_supported(struct ib_device *device)
{
return !to_mdev(device)->is_rep;
}
const struct uapi_definition mlx5_ib_flow_defs[] = { const struct uapi_definition mlx5_ib_flow_defs[] = {
UAPI_DEF_CHAIN_OBJ_TREE_NAMED( UAPI_DEF_CHAIN_OBJ_TREE_NAMED(
MLX5_IB_OBJECT_FLOW_MATCHER, MLX5_IB_OBJECT_FLOW_MATCHER),
UAPI_DEF_IS_OBJ_SUPPORTED(flow_is_supported)),
UAPI_DEF_CHAIN_OBJ_TREE( UAPI_DEF_CHAIN_OBJ_TREE(
UVERBS_OBJECT_FLOW, UVERBS_OBJECT_FLOW,
&mlx5_ib_fs), &mlx5_ib_fs),
......
...@@ -6572,6 +6572,9 @@ const struct mlx5_ib_profile uplink_rep_profile = { ...@@ -6572,6 +6572,9 @@ const struct mlx5_ib_profile uplink_rep_profile = {
STAGE_CREATE(MLX5_IB_STAGE_PRE_IB_REG_UMR, STAGE_CREATE(MLX5_IB_STAGE_PRE_IB_REG_UMR,
NULL, NULL,
mlx5_ib_stage_pre_ib_reg_umr_cleanup), mlx5_ib_stage_pre_ib_reg_umr_cleanup),
STAGE_CREATE(MLX5_IB_STAGE_WHITELIST_UID,
mlx5_ib_stage_devx_init,
mlx5_ib_stage_devx_cleanup),
STAGE_CREATE(MLX5_IB_STAGE_IB_REG, STAGE_CREATE(MLX5_IB_STAGE_IB_REG,
mlx5_ib_stage_ib_reg_init, mlx5_ib_stage_ib_reg_init,
mlx5_ib_stage_ib_reg_cleanup), mlx5_ib_stage_ib_reg_cleanup),
......
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