Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

RDMA/mlx5: Fix flow creation on representors

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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>

authored by

Mark Bloch and committed by
Jason Gunthorpe
c1b03c25 425784aa

+1 -2
+1 -2
drivers/infiniband/hw/mlx5/flow.c
··· 630 630 UAPI_DEF_IS_OBJ_SUPPORTED(flow_is_supported)), 631 631 UAPI_DEF_CHAIN_OBJ_TREE( 632 632 UVERBS_OBJECT_FLOW, 633 - &mlx5_ib_fs, 634 - UAPI_DEF_IS_OBJ_SUPPORTED(flow_is_supported)), 633 + &mlx5_ib_fs), 635 634 UAPI_DEF_CHAIN_OBJ_TREE(UVERBS_OBJECT_FLOW_ACTION, 636 635 &mlx5_ib_flow_actions), 637 636 {},