This commit makes sure old libsif versions works
with the driver while providing a forward compatible
way of making additional changes to the extra
headroom in the CQs.
We anticipate to be able to trim
down the extra entries once we have PQP errors
handled transparently. This commit then ensures that
the headroom is only set in one place, at the
driver side, and that user mode just can
pick up the configured headroom from the kernel.
This is done by providing the used headroom
in a formerly reserved 32 bit field, thus no changes
to the packet size is necessary.
Nevertheless we increment the abi version from
3.6 to 3.7 to allow libsif to detect whether
the headroom field can be trusted.
Orabug:
24926265
Signed-off-by: Knut Omang <knut.omang@oracle.com>
Reviewed-by: franklin <osl04sys_no_grp@oracle.com>
user_mode = false;
if (uc->abi_version < 0x0302) /* TBD: Remove - bw comp */
user_mode = !user_mode;
+ if (uc->abi_version < SIF_UVERBS_VERSION(3, 6))
+ user_flags |= no_x_cqe;
}
cq = create_cq(pd, entries, comp_vector, proxy, user_mode, user_flags);
memset(&resp, 0, sizeof(resp));
resp.cq_idx = cq->index;
+ if (user_mode)
+ resp.headroom = cq->entries - cq->ibcq.cqe;
ret = ib_copy_to_udata(udata, &resp, sizeof(resp));
if (ret) {
destroy_cq(cq);
*
*/
#define SIF_UVERBS_ABI_MAJOR_VERSION 3
-#define SIF_UVERBS_ABI_MINOR_VERSION 6
+#define SIF_UVERBS_ABI_MINOR_VERSION 7
#define SIF_UVERBS_VERSION(x, y) ((x) << 8 | (y))
struct sif_create_cq_resp_ext {
__u32 cq_idx;
- __u32 reserved;
+ __u32 headroom; /* #of reserved entries (not exposed to the user) in the CQ */
};
struct sif_create_qp_ext {
struct sif_version sif_version = {
.git_repo = "sifdrv [origin/master]",
-.last_commit = "titan_1.0.5.0 Retest last allocated entry with roundrobin allocation",
+.last_commit = "titan_1.0.6.0 cq: transfer headroom attribute to user mode",
.git_status = "",
-.build_git_time = "Mon, 03 Oct 2016 10:12:59 +0000",
+.build_git_time = "Mon, 24 Oct 2016 11:51:44 +0000",
.build_user = "komang",
.git_psifapi_repo = "psifapi [origin/master]",
-.last_psifapi_commit = "titan_1.0.5.0 preparations for venus",
+.last_psifapi_commit = "titan_1.0.6.0 preparations for venus",
.git_psifapi_status = "",
};
/* Misc driver release info */
-#define BUILD_DATE "2016-10-03"
-#define BUILD_TIME "10:12:59"
-#define BUILD_EPOCH 1475489579
-#define TITAN_RELEASE "1.0.5.0"
+#define BUILD_DATE "2016-10-24"
+#define BUILD_TIME "11:51:44"
+#define BUILD_EPOCH 1477309904
+#define TITAN_RELEASE "1.0.6.0"