OSDN Git Service

IB/uverbs: Expose XRC ODP device capabilities
authorMoni Shoua <monis@mellanox.com>
Tue, 22 Jan 2019 06:48:42 +0000 (08:48 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 4 Feb 2019 21:34:06 +0000 (14:34 -0700)
Expose XRC ODP capabilities as part of the extended device capabilities.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_verbs.h
include/uapi/rdma/ib_user_verbs.h

index d4f1a2e..68c4ea5 100644 (file)
@@ -3613,6 +3613,7 @@ static int ib_uverbs_ex_query_device(struct uverbs_attr_bundle *attrs)
                attr.odp_caps.per_transport_caps.uc_odp_caps;
        resp.odp_caps.per_transport_caps.ud_odp_caps =
                attr.odp_caps.per_transport_caps.ud_odp_caps;
+       resp.xrc_odp_caps = attr.odp_caps.per_transport_caps.xrc_odp_caps;
 
        resp.timestamp_mask = attr.timestamp_mask;
        resp.hca_core_clock = attr.hca_core_clock;
index 5eefdea..8219c07 100644 (file)
@@ -277,6 +277,7 @@ struct ib_odp_caps {
                uint32_t  rc_odp_caps;
                uint32_t  uc_odp_caps;
                uint32_t  ud_odp_caps;
+               uint32_t  xrc_odp_caps;
        } per_transport_caps;
 };
 
index 480d9a6..0474c74 100644 (file)
@@ -270,6 +270,8 @@ struct ib_uverbs_ex_query_device_resp {
        struct ib_uverbs_tm_caps tm_caps;
        struct ib_uverbs_cq_moderation_caps cq_moderation_caps;
        __aligned_u64 max_dm_size;
+       __u32 xrc_odp_caps;
+       __u32 reserved;
 };
 
 struct ib_uverbs_query_port {