diff options
author | Michael Brown | 2007-09-16 20:03:24 +0200 |
---|---|---|
committer | Michael Brown | 2007-09-16 20:03:24 +0200 |
commit | 251cc84ed6e10c86a0e97831d8817b993dac13db (patch) | |
tree | ee1bfd558f4c6bf1298973c683d74c0f370650eb /src/include/gpxe/infiniband.h | |
parent | Don't get stuck in an infinite loop on negative integers! (diff) | |
download | ipxe-251cc84ed6e10c86a0e97831d8817b993dac13db.tar.gz ipxe-251cc84ed6e10c86a0e97831d8817b993dac13db.tar.xz ipxe-251cc84ed6e10c86a0e97831d8817b993dac13db.zip |
Started implementing create_qp() and destroy_qp().
Diffstat (limited to 'src/include/gpxe/infiniband.h')
-rw-r--r-- | src/include/gpxe/infiniband.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/include/gpxe/infiniband.h b/src/include/gpxe/infiniband.h index d7f8b4ab..4868f717 100644 --- a/src/include/gpxe/infiniband.h +++ b/src/include/gpxe/infiniband.h @@ -174,8 +174,7 @@ struct ib_address_vector { * These represent a subset of the Infiniband Verbs. */ struct ib_device_operations { - /** - * Create completion queue + /** Create completion queue * * @v ibdev Infiniband device * @v cq Completion queue @@ -183,14 +182,28 @@ struct ib_device_operations { */ int ( * create_cq ) ( struct ib_device *ibdev, struct ib_completion_queue *cq ); - /** - * Destroy completion queue + /** Destroy completion queue * * @v ibdev Infiniband device * @v cq Completion queue */ void ( * destroy_cq ) ( struct ib_device *ibdev, struct ib_completion_queue *cq ); + /** Create queue pair + * + * @v ibdev Infiniband device + * @v qp Queue pair + * @ret rc Return status code + */ + int ( * create_qp ) ( struct ib_device *ibdev, + struct ib_queue_pair *qp ); + /** Destroy queue pair + * + * @v ibdev Infiniband device + * @v qp Queue pair + */ + void ( * destroy_qp ) ( struct ib_device *ibdev, + struct ib_queue_pair *qp ); /** Post send work queue entry * * @v ibdev Infiniband device @@ -247,7 +260,16 @@ struct ib_device { void *dev_priv; }; - +extern struct ib_completion_queue * ib_create_cq ( struct ib_device *ibdev, + unsigned int num_cqes ); +extern void ib_destroy_cq ( struct ib_device *ibdev, + struct ib_completion_queue *cq ); +extern struct ib_queue_pair * +ib_create_qp ( struct ib_device *ibdev, unsigned int num_send_wqes, + struct ib_completion_queue *send_cq, unsigned int num_recv_wqes, + struct ib_completion_queue *recv_cq ); +extern void ib_destroy_qp ( struct ib_device *ibdev, + struct ib_queue_pair *qp ); extern struct ib_work_queue * ib_find_wq ( struct ib_completion_queue *cq, unsigned long qpn, int is_send ); |