IB/mlx5: Report that device has udata response in create_ah
authorMoni Shoua <monis@mellanox.com>
Wed, 23 Nov 2016 06:23:23 +0000 (08:23 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 13 Dec 2016 18:37:19 +0000 (13:37 -0500)
To make mlx5 user driver aware of whether kernel driver returns dmac
in user data response add a new flag that will be returned back to
user-space through alloc_ucontext.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c
include/uapi/rdma/mlx5-abi.h

index f7a299431e6c7ac10e556126e5d8f2cbff6d3690..f2ef2a170d9f367dba04b44b0cb0724729cf29b8 100644 (file)
@@ -1117,7 +1117,8 @@ static struct ib_ucontext *mlx5_ib_alloc_ucontext(struct ib_device *ibdev,
                resp.response_length += sizeof(resp.cqe_version);
 
        if (field_avail(typeof(resp), cmds_supp_uhw, udata->outlen)) {
-               resp.cmds_supp_uhw |= MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE;
+               resp.cmds_supp_uhw |= MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE |
+                                     MLX5_USER_CMDS_SUPP_UHW_CREATE_AH;
                resp.response_length += sizeof(resp.cmds_supp_uhw);
        }
 
index b0a41c8dc1fbcfed57e868d0c6064bc7374150bc..ac28729a124518dba42ac010942596279b9a43b4 100644 (file)
@@ -82,6 +82,7 @@ enum mlx5_ib_alloc_ucontext_resp_mask {
 
 enum mlx5_user_cmds_supp_uhw {
        MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0,
+       MLX5_USER_CMDS_SUPP_UHW_CREATE_AH    = 1 << 1,
 };
 
 struct mlx5_ib_alloc_ucontext_resp {