summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/infiniband.h
diff options
context:
space:
mode:
authorMichael Brown2007-09-16 18:25:15 +0200
committerMichael Brown2007-09-16 18:25:15 +0200
commitb21d4ca21e65025410df73b34d685b6e78c86f0d (patch)
tree5a9480ed13dd4aaab860d4c8fefad27872b3999a /src/include/gpxe/infiniband.h
parentdestroy_cq() now implemented (not tested). (diff)
downloadipxe-b21d4ca21e65025410df73b34d685b6e78c86f0d.tar.gz
ipxe-b21d4ca21e65025410df73b34d685b6e78c86f0d.tar.xz
ipxe-b21d4ca21e65025410df73b34d685b6e78c86f0d.zip
Revert to dev_priv/owner_priv scheme, rather than container_of; it
makes it easier to put the generic allocation code into infiniband.c
Diffstat (limited to 'src/include/gpxe/infiniband.h')
-rw-r--r--src/include/gpxe/infiniband.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/include/gpxe/infiniband.h b/src/include/gpxe/infiniband.h
index 973c5823..d7f8b4ab 100644
--- a/src/include/gpxe/infiniband.h
+++ b/src/include/gpxe/infiniband.h
@@ -89,6 +89,8 @@ struct ib_work_queue {
unsigned long next_idx;
/** I/O buffers assigned to work queue */
struct io_buffer **iobufs;
+ /** Device private data */
+ void *dev_priv;
};
/** An Infiniband Queue Pair */
@@ -99,8 +101,10 @@ struct ib_queue_pair {
struct ib_work_queue send;
/** Receive queue */
struct ib_work_queue recv;
+ /** Device private data */
+ void *dev_priv;
/** Queue owner private data */
- void *priv;
+ void *owner_priv;
};
/** An Infiniband Completion Queue */
@@ -119,6 +123,8 @@ struct ib_completion_queue {
unsigned long next_idx;
/** List of work queues completing to this queue */
struct list_head work_queues;
+ /** Device private data */
+ void *dev_priv;
};
/** An Infiniband completion */
@@ -172,13 +178,11 @@ struct ib_device_operations {
* Create completion queue
*
* @v ibdev Infiniband device
- * @v log2_num_cqes Log2 of the number of completion queue entries
- * @ret new_cq New completion queue
+ * @v cq Completion queue
* @ret rc Return status code
*/
int ( * create_cq ) ( struct ib_device *ibdev,
- unsigned int log2_num_cqes,
- struct ib_completion_queue **new_cq );
+ struct ib_completion_queue *cq );
/**
* Destroy completion queue
*
@@ -237,8 +241,10 @@ struct ib_device_operations {
/** An Infiniband device */
struct ib_device {
- /** Driver private data */
- void *priv;
+ /** Infiniband operations */
+ struct ib_device_operations *op;
+ /** Device private data */
+ void *dev_priv;
};