aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/infiniband.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-09-14 20:29:44 +0100
committerMichael Brown <mcb30@etherboot.org>2007-09-14 20:29:44 +0100
commit9d08b7c692aac5b1790555f8fc28ddb52ef28bb5 (patch)
tree478437f79592bca92e2a585f41c6120b084fe0d4 /src/include/gpxe/infiniband.h
parent75fbc96f754c8cf66b32c52f7b6678308dfdbc26 (diff)
downloadipxe-9d08b7c692aac5b1790555f8fc28ddb52ef28bb5.tar.gz
Starting to introduce an Infiniband device abstraction
Diffstat (limited to 'src/include/gpxe/infiniband.h')
-rw-r--r--src/include/gpxe/infiniband.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/include/gpxe/infiniband.h b/src/include/gpxe/infiniband.h
index 9f126b49d..22a8a9824 100644
--- a/src/include/gpxe/infiniband.h
+++ b/src/include/gpxe/infiniband.h
@@ -61,6 +61,69 @@ struct ibhdr {
uint16_t reserved;
} __attribute__ (( packed ));
+/** An Infiniband Work Queue */
+struct ib_work_queue {
+ /** Number of work queue entries */
+ unsigned int num_wqes;
+ /** Posted index
+ *
+ * This is the index of the most recently posted entry.
+ */
+ unsigned int posted;
+ /** Driver-private data
+ *
+ * Typically used to hold the address of the work queue.
+ */
+ void *priv;
+ /** I/O buffers assigned to work queue */
+ struct io_buffer *iobuf[0];
+};
+
+/** An Infiniband Queue Pair */
+struct ib_queue_pair {
+ /** Queue Pair Number */
+ uint32_t qpn;
+ /** Send queue */
+ struct ib_work_queue send;
+ /** Receive queue */
+ struct ib_work_queue recv;
+};
+
+/** An Infiniband Address Vector */
+struct ib_address_vector {
+
+};
+
+/**
+ * Infiniband device operations
+ *
+ * These represent a subset of the Infiniband Verbs.
+ */
+struct ib_device_operations {
+ /** Post Send work queue entry
+ *
+ * @v ibdev Infiniband device
+ * @v iobuf I/O buffer
+ * @v av Address vector
+ * @v qp Queue pair
+ * @ret rc Return status code
+ *
+ * If this method returns success, the I/O buffer remains
+ * owned by the queue pair. If this method returns failure,
+ * the I/O buffer is immediately released; the failure is
+ * interpreted as "failure to enqueue buffer".
+ */
+ int ( * post_send ) ( struct ib_device *ibdev,
+ struct io_buffer *iobuf,
+ struct ib_address_vector *av,
+ struct ib_queue_pair *qp );
+};
+
+
+
+
+
+
extern struct ll_protocol infiniband_protocol;
extern const char * ib_ntoa ( const void *ll_addr );