diff mbox series

[rdma-rc] RDMA/mlx5: Fix flow creation on representors

Message ID 20190124123332.15152-1-leon@kernel.org (mailing list archive)
State Mainlined
Commit c1b03c25f5c1503e2db3ac1c0e12ef3e054fa065
Delegated to: Jason Gunthorpe
Headers show
Series [rdma-rc] RDMA/mlx5: Fix flow creation on representors | expand

Commit Message

Leon Romanovsky Jan. 24, 2019, 12:33 p.m. UTC
From: Mark Bloch <markb@mellanox.com>

The intention of the flow_is_supported was to disable the entire tree and
methods that allow raw flow creation, but the grammar syntax has this
disable the entire UVERBS_FLOW object. Since the method requires a
MLX5_IB_OBJECT_FLOW_MATCHER there is no need to do anything, as it is
automatically disabled when matchers are disabled.

This restores the ability to create flow steering rules on representors
via regular verbs.

Fixes: a1462351b590 ("RDMA/mlx5: Fail early if user tries to create flows on IB representors")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/flow.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jason Gunthorpe Jan. 25, 2019, 7:19 p.m. UTC | #1
On Thu, Jan 24, 2019 at 02:33:32PM +0200, Leon Romanovsky wrote:
> From: Mark Bloch <markb@mellanox.com>
> 
> The intention of the flow_is_supported was to disable the entire tree and
> methods that allow raw flow creation, but the grammar syntax has this
> disable the entire UVERBS_FLOW object. Since the method requires a
> MLX5_IB_OBJECT_FLOW_MATCHER there is no need to do anything, as it is
> automatically disabled when matchers are disabled.
> 
> This restores the ability to create flow steering rules on representors
> via regular verbs.
> 
> Fixes: a1462351b590 ("RDMA/mlx5: Fail early if user tries to create flows on IB representors")
> Signed-off-by: Mark Bloch <markb@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/mlx5/flow.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-rc

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/mlx5/flow.c b/drivers/infiniband/hw/mlx5/flow.c
index e8a1e4498e3f..798591a18484 100644
--- a/drivers/infiniband/hw/mlx5/flow.c
+++ b/drivers/infiniband/hw/mlx5/flow.c
@@ -630,8 +630,7 @@  const struct uapi_definition mlx5_ib_flow_defs[] = {
 		UAPI_DEF_IS_OBJ_SUPPORTED(flow_is_supported)),
 	UAPI_DEF_CHAIN_OBJ_TREE(
 		UVERBS_OBJECT_FLOW,
-		&mlx5_ib_fs,
-		UAPI_DEF_IS_OBJ_SUPPORTED(flow_is_supported)),
+		&mlx5_ib_fs),
 	UAPI_DEF_CHAIN_OBJ_TREE(UVERBS_OBJECT_FLOW_ACTION,
 				&mlx5_ib_flow_actions),
 	{},