From: Roland Dreier Date: Thu, 11 Jan 2007 15:19:49 +0000 (-0800) Subject: Revert "Pass driver data through ibv_cmd_req_notify_cq()" X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1460b78bac9d320f04f3e748ca324c4d831fb957;p=~shefty%2Flibibverbs.git Revert "Pass driver data through ibv_cmd_req_notify_cq()" This reverts commit d5b9ab3d7009b77ee45e98827e803205d322ce7d, since the Chelsio cxgb3 driver no longer needs it and the kernel side of req_notify_cq() doesn't handle user data anyway. Signed-off-by: Roland Dreier --- diff --git a/include/infiniband/driver.h b/include/infiniband/driver.h index 8e2418c..67a3bf8 100644 --- a/include/infiniband/driver.h +++ b/include/infiniband/driver.h @@ -88,10 +88,7 @@ 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); -#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); - +int ibv_cmd_req_notify_cq(struct ibv_cq *cq, int solicited_only); #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 f549f42..b267603 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, - struct ibv_req_notify_cq *cmd, size_t cmd_size) +int ibv_cmd_req_notify_cq(struct ibv_cq *ibcq, int solicited_only) { + struct ibv_req_notify_cq cmd; - IBV_INIT_CMD(cmd, cmd_size, REQ_NOTIFY_CQ); - cmd->cq_handle = ibcq->handle; - cmd->solicited = !!solicited_only; + IBV_INIT_CMD(&cmd, sizeof cmd, REQ_NOTIFY_CQ); + cmd.cq_handle = ibcq->handle; + cmd.solicited = !!solicited_only; - if (write(ibcq->context->cmd_fd, cmd, cmd_size) != cmd_size) + if (write(ibcq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd) return errno; return 0;