@@ -3766,6 +3766,15 @@ ssize_t ib_uverbs_destroy_srq(struct ib_uverbs_file *file,
return in_len;
}
+static void copy_ooo_caps(struct ib_uverbs_ooo_caps *uverb_caps,
+ struct ib_ooo_caps *attr_caps)
+{
+ uverb_caps->rc_caps = attr_caps->rc_caps;
+ uverb_caps->xrc_caps = attr_caps->xrc_caps;
+ uverb_caps->ud_caps = attr_caps->ud_caps;
+ uverb_caps->uc_caps = attr_caps->uc_caps;
+}
+
int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
struct ib_device *ib_dev,
struct ib_udata *ucore,
@@ -3854,6 +3863,13 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
resp.raw_packet_caps = attr.raw_packet_caps;
resp.response_length += sizeof(resp.raw_packet_caps);
+
+ if (ucore->outlen < resp.response_length + sizeof(resp.ooo_caps))
+ goto end;
+
+ copy_ooo_caps(&resp.ooo_caps, &attr.ooo_caps);
+ resp.response_length += sizeof(resp.ooo_caps);
+
end:
err = ib_copy_to_udata(ucore, &resp, resp.response_length);
return err;
@@ -236,6 +236,17 @@ struct ib_uverbs_rss_caps {
__u32 reserved;
};
+struct ib_uverbs_ooo_caps {
+ /*
+ * Per transport capability indicating whether out of order data
+ * placement is supported or not.
+ */
+ __u32 rc_caps;
+ __u32 xrc_caps;
+ __u32 ud_caps;
+ __u32 uc_caps;
+};
+
struct ib_uverbs_ex_query_device_resp {
struct ib_uverbs_query_device_resp base;
__u32 comp_mask;
@@ -247,6 +258,7 @@ struct ib_uverbs_ex_query_device_resp {
struct ib_uverbs_rss_caps rss_caps;
__u32 max_wq_type_rq;
__u32 raw_packet_caps;
+ struct ib_uverbs_ooo_caps ooo_caps;
};
struct ib_uverbs_query_port {
@@ -555,9 +567,9 @@ enum {
enum {
/*
- * This value is equal to IB_QP_RATE_LIMIT.
+ * This value is equal to IB_QP_OOO_RW_DATA_PLACEMENT.
*/
- IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25,
+ IB_USER_LAST_QP_ATTR_MASK = 1ULL << 26,
};
struct ib_uverbs_ex_create_qp {