aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2006-10-06 17:29:34 -0500
committerRoland Dreier <rolandd@cisco.com>2006-11-16 16:15:18 -0800
commitd5b9ab3d7009b77ee45e98827e803205d322ce7d (patch)
tree6be33df7e4a76593d7bd527ecfbd9b6d3f701d33
parent2cb8be197628dbf19ac46eb0a4383a2bc9f3e51f (diff)
downloadlibibverbs-d5b9ab3d7009b77ee45e98827e803205d322ce7d.tar.gz
Pass driver data through ibv_cmd_req_notify_cq()
The Chelsio iWARP driver library needs to pass information to the kernel device-specific driver for re-arming the CQ. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--include/infiniband/driver.h5
-rw-r--r--src/cmd.c12
2 files changed, 10 insertions, 7 deletions
diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h
index 77e1ff5..f759d52 100644
--- a/include/infiniband/driver.h
+++ b/include/infiniband/driver.h
@@ -93,7 +93,10 @@ int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
struct ibv_create_cq *cmd, size_t cmd_size,
struct ibv_create_cq_resp *resp, size_t resp_size);
int ibv_cmd_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc);
-int ibv_cmd_req_notify_cq(struct ibv_cq *cq, int solicited_only);
+#define IBV_CMD_REQ_NOTIFY_HAS_CMD_PARAMS
+int ibv_cmd_req_notify_cq(struct ibv_cq *cq, int solicited_only,
+ struct ibv_req_notify_cq *cmd, size_t cmd_size);
+
#define IBV_CMD_RESIZE_CQ_HAS_RESP_PARAMS
int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
struct ibv_resize_cq *cmd, size_t cmd_size,
diff --git a/src/cmd.c b/src/cmd.c
index b267603..f549f42 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -370,15 +370,15 @@ out:
return ret;
}
-int ibv_cmd_req_notify_cq(struct ibv_cq *ibcq, int solicited_only)
+int ibv_cmd_req_notify_cq(struct ibv_cq *ibcq, int solicited_only,
+ struct ibv_req_notify_cq *cmd, size_t cmd_size)
{
- struct ibv_req_notify_cq cmd;
- IBV_INIT_CMD(&cmd, sizeof cmd, REQ_NOTIFY_CQ);
- cmd.cq_handle = ibcq->handle;
- cmd.solicited = !!solicited_only;
+ IBV_INIT_CMD(cmd, cmd_size, REQ_NOTIFY_CQ);
+ cmd->cq_handle = ibcq->handle;
+ cmd->solicited = !!solicited_only;
- if (write(ibcq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
+ if (write(ibcq->context->cmd_fd, cmd, cmd_size) != cmd_size)
return errno;
return 0;