aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>2007-05-03 06:48:47 -0400
committerRoland Dreier <rolandd@cisco.com>2007-05-07 00:18:11 -0400
commitf4fd0b224d60044d2da5ca02f8f2b5150c1d8731 (patch)
tree9bc6c08bde26e6b7d5c51ebd48fc26357d6ae9c5 /include/rdma/ib_verbs.h
parent154257f3626ea6dd96781fac0896c3f27fe2b0a1 (diff)
IB: Add CQ comp_vector support
Add a num_comp_vectors member to struct ib_device and extend ib_create_cq() to pass in a comp_vector parameter -- this parallels the userspace libibverbs API. Update all hardware drivers to set num_comp_vectors to 1 and have all ULPs pass 0 for the comp_vector value. Pass the value of num_comp_vectors to userspace rather than hard-coding a value of 1. We want multiple CQ event vector support (via MSI-X or similar for adapters that can generate multiple interrupts), but it's not clear how many vectors we want, or how we want to deal with policy issues such as how to decide which vector to use or how to set up interrupt affinity. This patch is useful for experimenting, since no core changes will be necessary when updating a driver to support multiple vectors, and we know that we want to make at least these changes anyway. Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 765589f4d166..17cc309d03ef 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -912,6 +912,8 @@ struct ib_device {
912 912
913 u32 flags; 913 u32 flags;
914 914
915 int num_comp_vectors;
916
915 struct iw_cm_verbs *iwcm; 917 struct iw_cm_verbs *iwcm;
916 918
917 int (*query_device)(struct ib_device *device, 919 int (*query_device)(struct ib_device *device,
@@ -978,6 +980,7 @@ struct ib_device {
978 struct ib_recv_wr *recv_wr, 980 struct ib_recv_wr *recv_wr,
979 struct ib_recv_wr **bad_recv_wr); 981 struct ib_recv_wr **bad_recv_wr);
980 struct ib_cq * (*create_cq)(struct ib_device *device, int cqe, 982 struct ib_cq * (*create_cq)(struct ib_device *device, int cqe,
983 int comp_vector,
981 struct ib_ucontext *context, 984 struct ib_ucontext *context,
982 struct ib_udata *udata); 985 struct ib_udata *udata);
983 int (*destroy_cq)(struct ib_cq *cq); 986 int (*destroy_cq)(struct ib_cq *cq);
@@ -1358,13 +1361,15 @@ static inline int ib_post_recv(struct ib_qp *qp,
1358 * @cq_context: Context associated with the CQ returned to the user via 1361 * @cq_context: Context associated with the CQ returned to the user via
1359 * the associated completion and event handlers. 1362 * the associated completion and event handlers.
1360 * @cqe: The minimum size of the CQ. 1363 * @cqe: The minimum size of the CQ.
1364 * @comp_vector - Completion vector used to signal completion events.
1365 * Must be >= 0 and < context->num_comp_vectors.
1361 * 1366 *
1362 * Users can examine the cq structure to determine the actual CQ size. 1367 * Users can examine the cq structure to determine the actual CQ size.
1363 */ 1368 */
1364struct ib_cq *ib_create_cq(struct ib_device *device, 1369struct ib_cq *ib_create_cq(struct ib_device *device,
1365 ib_comp_handler comp_handler, 1370 ib_comp_handler comp_handler,
1366 void (*event_handler)(struct ib_event *, void *), 1371 void (*event_handler)(struct ib_event *, void *),
1367 void *cq_context, int cqe); 1372 void *cq_context, int cqe, int comp_vector);
1368 1373
1369/** 1374/**
1370 * ib_resize_cq - Modifies the capacity of the CQ. 1375 * ib_resize_cq - Modifies the capacity of the CQ.