summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_cmd.c
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2018-05-31 16:43:35 +0300
committerLeon Romanovsky <leonro@mellanox.com>2018-06-02 07:33:55 +0300
commit59082a327d0145c69b419a0f5bed96b13c5e9ed4 (patch)
tree27e2e564cd0bb8c7c46ca0a600b918a84288891d /drivers/infiniband/core/uverbs_cmd.c
parentebb6796bd397f3fb9b2b46398b2fbb585e1b8bb6 (diff)
downloadlinux-0-day-59082a327d0145c69b419a0f5bed96b13c5e9ed4.tar.gz
linux-0-day-59082a327d0145c69b419a0f5bed96b13c5e9ed4.tar.xz
IB/core: Support passing uhw for create_flow
This is required when user-space drivers need to pass extra information regarding how to handle this flow steering specification. Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 13cb5e4deb866..c735c13e53b0e 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -3513,11 +3513,16 @@ int ib_uverbs_ex_create_flow(struct ib_uverbs_file *file,
err = -EINVAL;
goto err_free;
}
- flow_id = ib_create_flow(qp, flow_attr, IB_FLOW_DOMAIN_USER);
+
+ flow_id = qp->device->create_flow(qp, flow_attr,
+ IB_FLOW_DOMAIN_USER, uhw);
+
if (IS_ERR(flow_id)) {
err = PTR_ERR(flow_id);
goto err_free;
}
+ atomic_inc(&qp->usecnt);
+ flow_id->qp = qp;
flow_id->uobject = uobj;
uobj->object = flow_id;
uflow = container_of(uobj, typeof(*uflow), uobject);