diff options
| author | Michael Brown | 2012-08-29 23:11:58 +0200 |
|---|---|---|
| committer | Michael Brown | 2012-08-31 22:22:57 +0200 |
| commit | f747fac3e1dad31378579326d8e9dce0df85c214 (patch) | |
| tree | 68393b4686b7d28737b16b26c6f49c4d2db431d0 /src/include/ipxe | |
| parent | [iobuf] Allow allocation of I/O buffers with a specified alignment offset (diff) | |
| download | ipxe-f747fac3e1dad31378579326d8e9dce0df85c214.tar.gz ipxe-f747fac3e1dad31378579326d8e9dce0df85c214.tar.xz ipxe-f747fac3e1dad31378579326d8e9dce0df85c214.zip | |
[infiniband] Allow queue pairs to have a custom allocator for receive iobufs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
| -rw-r--r-- | src/include/ipxe/infiniband.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/ipxe/infiniband.h b/src/include/ipxe/infiniband.h index f97a5d4fe..1a64eef6c 100644 --- a/src/include/ipxe/infiniband.h +++ b/src/include/ipxe/infiniband.h @@ -142,6 +142,16 @@ enum ib_queue_pair_type { IB_QPT_ETH, }; +/** Infiniband queue pair operations */ +struct ib_queue_pair_operations { + /** Allocate receive I/O buffer + * + * @v len Maximum receive length + * @ret iobuf I/O buffer (or NULL if out of memory) + */ + struct io_buffer * ( * alloc_iob ) ( size_t len ); +}; + /** An Infiniband Queue Pair */ struct ib_queue_pair { /** Containing Infiniband device */ @@ -169,6 +179,8 @@ struct ib_queue_pair { struct list_head mgids; /** Address vector */ struct ib_address_vector av; + /** Queue pair operations */ + struct ib_queue_pair_operations *op; /** Driver private data */ void *drv_priv; /** Queue owner private data */ @@ -478,8 +490,8 @@ extern void ib_poll_cq ( struct ib_device *ibdev, extern struct ib_queue_pair * ib_create_qp ( struct ib_device *ibdev, enum ib_queue_pair_type type, unsigned int num_send_wqes, struct ib_completion_queue *send_cq, - unsigned int num_recv_wqes, - struct ib_completion_queue *recv_cq ); + unsigned int num_recv_wqes, struct ib_completion_queue *recv_cq, + struct ib_queue_pair_operations *op ); extern int ib_modify_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp ); extern void ib_destroy_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp ); |
