[openib-general] [PATCH 1/7] IB/ipath - performance improvements via mmap of queues

Ralph Campbell ralphc at pathscale.com
Fri Aug 11 14:54:36 PDT 2006


The following patches update libibverbs, libmthca, libipathverbs,
and the kernel ib_core, ib_mthca, ib_ehca, and ib_ipath modules in
order to improve performance on QLogic InfiniPath HCAs.

The completion queue and receive queues are now mmap'ed into the
user's address space.  The kernel changes are compatible with
either the new or old user library and the new user library is
compatible with the old or new kernel driver.

The patches should be applied to the SVN trunk except for the
InfiniPath kernel driver patch (last one) which is applied to
the kernel git tree.

These patches have been posted earlier for review.
This posting should be considered ready for inclusion.
Allow the driver plug-in library to return additional data in the response
from ibv_cmd_resize_cq().

Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>

Index: src/userspace/libibverbs/include/infiniband/driver.h
===================================================================
--- src/userspace/libibverbs/include/infiniband/driver.h	(revision 8843)
+++ src/userspace/libibverbs/include/infiniband/driver.h	(working copy)
@@ -95,7 +95,8 @@
 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);
 int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
-		      struct ibv_resize_cq *cmd, size_t cmd_size);
+		      struct ibv_resize_cq *cmd, size_t cmd_size,
+		      struct ibv_resize_cq_resp *resp, size_t resp_size);
 int ibv_cmd_destroy_cq(struct ibv_cq *cq);
 
 int ibv_cmd_create_srq(struct ibv_pd *pd,
Index: src/userspace/libibverbs/include/infiniband/kern-abi.h
===================================================================
--- src/userspace/libibverbs/include/infiniband/kern-abi.h	(revision 8843)
+++ src/userspace/libibverbs/include/infiniband/kern-abi.h	(working copy)
@@ -355,6 +355,8 @@
 
 struct ibv_resize_cq_resp {
 	__u32 cqe;
+	__u32 reserved;
+	__u64 driver_data[0];
 };
 
 struct ibv_destroy_cq {
Index: src/userspace/libibverbs/src/cmd.c
===================================================================
--- src/userspace/libibverbs/src/cmd.c	(revision 8843)
+++ src/userspace/libibverbs/src/cmd.c	(working copy)
@@ -368,18 +368,18 @@
 }
 
 int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
-		      struct ibv_resize_cq *cmd, size_t cmd_size)
+		      struct ibv_resize_cq *cmd, size_t cmd_size,
+		      struct ibv_resize_cq_resp *resp, size_t resp_size)
 {
-	struct ibv_resize_cq_resp resp;
 
-	IBV_INIT_CMD_RESP(cmd, cmd_size, RESIZE_CQ, &resp, sizeof resp);
+	IBV_INIT_CMD_RESP(cmd, cmd_size, RESIZE_CQ, resp, resp_size);
 	cmd->cq_handle = cq->handle;
 	cmd->cqe       = cqe;
 
 	if (write(cq->context->cmd_fd, cmd, cmd_size) != cmd_size)
 		return errno;
 
-	cq->cqe = resp.cqe;
+	cq->cqe = resp->cqe;
 
 	return 0;
 }






More information about the general mailing list