mirror of
https://github.com/ipxe/ipxe
synced 2025-12-24 15:23:42 +03:00
Starting to introduce an Infiniband device abstraction
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user