summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/main.c
diff options
context:
space:
mode:
authorYishai Hadas2018-07-23 14:25:12 +0200
committerJason Gunthorpe2018-07-24 22:33:52 +0200
commitcb80fb189270e7b2c32fa470d40e951852614eb2 (patch)
tree0a538622315d2a159938a85d4632dc84946bc97e /drivers/infiniband/hw/mlx5/main.c
parentIB/mlx5: Add support for a flow table destination for driver flow steering (diff)
downloadkernel-qcow2-linux-cb80fb189270e7b2c32fa470d40e951852614eb2.tar.gz
kernel-qcow2-linux-cb80fb189270e7b2c32fa470d40e951852614eb2.tar.xz
kernel-qcow2-linux-cb80fb189270e7b2c32fa470d40e951852614eb2.zip
IB/mlx5: Enable driver uapi commands for flow steering
Expose the mlx5 flow steering parsing trees, exposing the functionality to user space. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/main.c')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 11ed9416db48..a26ab69f3741 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -5535,7 +5535,7 @@ ADD_UVERBS_ATTRIBUTES_SIMPLE(
UVERBS_ATTR_TYPE(u64),
UA_MANDATORY));
-#define NUM_TREES 3
+#define NUM_TREES 5
static int populate_specs_root(struct mlx5_ib_dev *dev)
{
const struct uverbs_object_tree_def *default_root[NUM_TREES + 1] = {
@@ -5555,6 +5555,8 @@ static int populate_specs_root(struct mlx5_ib_dev *dev)
!WARN_ON(num_trees >= ARRAY_SIZE(default_root)))
default_root[num_trees++] = mlx5_ib_get_devx_tree();
+ num_trees += mlx5_ib_get_flow_trees(default_root + num_trees);
+
dev->ib_dev.driver_specs_root =
uverbs_alloc_spec_tree(num_trees, default_root);