diff options
| author | Michael Brown | 2009-07-09 04:09:00 +0200 |
|---|---|---|
| committer | Michael Brown | 2009-07-18 00:06:34 +0200 |
| commit | 80c41b90d226b8f6d80feb221a4920a0e0a88da2 (patch) | |
| tree | 376989d4c3e3daf6d1a2e1595742136858750e4b /src/include | |
| parent | [infiniband] Allow completion queue operations to be optional (diff) | |
| download | ipxe-80c41b90d226b8f6d80feb221a4920a0e0a88da2.tar.gz ipxe-80c41b90d226b8f6d80feb221a4920a0e0a88da2.tar.xz ipxe-80c41b90d226b8f6d80feb221a4920a0e0a88da2.zip | |
[infiniband] Add notion of a queue pair type
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/ib_gma.h | 3 | ||||
| -rw-r--r-- | src/include/gpxe/infiniband.h | 16 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/include/gpxe/ib_gma.h b/src/include/gpxe/ib_gma.h index d24b32dbe..9ba25ddf7 100644 --- a/src/include/gpxe/ib_gma.h +++ b/src/include/gpxe/ib_gma.h @@ -18,6 +18,7 @@ struct ib_completion_queue; struct ib_queue_pair; union ib_mad; struct ib_gma; +enum ib_queue_pair_type; /** A GMA attribute handler */ struct ib_gma_handler { @@ -68,7 +69,7 @@ struct ib_gma { extern int ib_gma_request ( struct ib_gma *gma, union ib_mad *mad, struct ib_address_vector *av, int retry ); extern int ib_create_gma ( struct ib_gma *gma, struct ib_device *ibdev, - unsigned long qkey ); + enum ib_queue_pair_type type ); extern void ib_destroy_gma ( struct ib_gma *gma ); #endif /* _GPXE_IB_GMA_H */ diff --git a/src/include/gpxe/infiniband.h b/src/include/gpxe/infiniband.h index c00388e58..80e59bf5e 100644 --- a/src/include/gpxe/infiniband.h +++ b/src/include/gpxe/infiniband.h @@ -83,6 +83,13 @@ struct ib_multicast_gid { struct ib_gid gid; }; +/** An Infiniband queue pair type */ +enum ib_queue_pair_type { + IB_QPT_SMA, + IB_QPT_GMA, + IB_QPT_UD, +}; + /** An Infiniband Queue Pair */ struct ib_queue_pair { /** Containing Infiniband device */ @@ -91,6 +98,8 @@ struct ib_queue_pair { struct list_head list; /** Queue Pair Number */ unsigned long qpn; + /** Queue pair type */ + enum ib_queue_pair_type type; /** Queue key */ unsigned long qkey; /** Send queue */ @@ -395,9 +404,10 @@ extern void ib_destroy_cq ( struct ib_device *ibdev, extern void ib_poll_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, unsigned long qkey ); +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 long qkey ); extern int ib_modify_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp, unsigned long mod_list, unsigned long qkey ); extern void ib_destroy_qp ( struct ib_device *ibdev, |
