diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-09-14 20:29:44 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-09-14 20:29:44 +0100 |
commit | 9d08b7c692aac5b1790555f8fc28ddb52ef28bb5 (patch) | |
tree | 478437f79592bca92e2a585f41c6120b084fe0d4 /src/include/gpxe/infiniband.h | |
parent | 75fbc96f754c8cf66b32c52f7b6678308dfdbc26 (diff) | |
download | ipxe-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.h | 63 |
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 ); |