From 394e26c3a3e14d0b662ed78c916d35174e805c9d Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Thu, 27 Sep 2012 11:33:21 -0700 Subject: [PATCH] Refresh of xrc_qp --- src/cmd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cmd.c b/src/cmd.c index 8aac841..c8a1586 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -668,12 +668,18 @@ int ibv_cmd_create_qp_ex(struct verbs_context *context, IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_QP, resp, resp_size); + if (attr_ex->comp_mask >= IBV_QP_INIT_ATTR_RESERVED) + return ENOSYS; + cmd->user_handle = (uintptr_t) qp; if (attr_ex->comp_mask & IBV_QP_INIT_ATTR_XRCD) { vxrcd = container_of(attr_ex->xrcd, struct verbs_xrcd, xrcd); cmd->pd_handle = vxrcd->handle; } else { + if (!(attr_ex->comp_mask & IBV_QP_INIT_ATTR_PD)) + return EINVAL; + cmd->pd_handle = attr_ex->pd->handle; cmd->send_cq_handle = attr_ex->send_cq->handle; -- 2.46.0