diff options
| author | Michael Brown | 2009-07-02 10:56:14 +0200 |
|---|---|---|
| committer | Michael Brown | 2009-07-18 00:06:33 +0200 |
| commit | b25a4b6c8a7f311f639bf999050dbad5e50ede4d (patch) | |
| tree | e8f07ae0c2f93740aa85b0494d543c69c171760b /src/include | |
| parent | [infiniband] Move non-driver-specific code to net/infiniband (diff) | |
| download | ipxe-b25a4b6c8a7f311f639bf999050dbad5e50ede4d.tar.gz ipxe-b25a4b6c8a7f311f639bf999050dbad5e50ede4d.tar.xz ipxe-b25a4b6c8a7f311f639bf999050dbad5e50ede4d.zip | |
[infiniband] Split queue set functionality out of ipoib.c to ib_qset.c
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/errfile.h | 1 | ||||
| -rw-r--r-- | src/include/gpxe/ib_qset.h | 38 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/include/gpxe/errfile.h b/src/include/gpxe/errfile.h index 1312cbc95..4b560009e 100644 --- a/src/include/gpxe/errfile.h +++ b/src/include/gpxe/errfile.h @@ -143,6 +143,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ERRFILE_ib_sma ( ERRFILE_NET | 0x00170000 ) #define ERRFILE_ib_packet ( ERRFILE_NET | 0x00180000 ) #define ERRFILE_icmp ( ERRFILE_NET | 0x00190000 ) +#define ERRFILE_ib_qset ( ERRFILE_NET | 0x001a0000 ) #define ERRFILE_image ( ERRFILE_IMAGE | 0x00000000 ) #define ERRFILE_elf ( ERRFILE_IMAGE | 0x00010000 ) diff --git a/src/include/gpxe/ib_qset.h b/src/include/gpxe/ib_qset.h new file mode 100644 index 000000000..90c92a589 --- /dev/null +++ b/src/include/gpxe/ib_qset.h @@ -0,0 +1,38 @@ +#ifndef _GPXE_IB_QSET_H +#define _GPXE_IB_QSET_H + +/** @file + * + * Infiniband queue sets + * + */ + +FILE_LICENCE ( GPL2_OR_LATER ); + +#include <stdint.h> +#include <gpxe/infiniband.h> + +/** An Infiniband queue set */ +struct ib_queue_set { + /** Completion queue */ + struct ib_completion_queue *cq; + /** Queue pair */ + struct ib_queue_pair *qp; + /** Receive work queue maximum fill level */ + unsigned int recv_max_fill; + /** Receive packet length */ + size_t recv_pkt_len; +}; + +extern int ib_create_qset ( struct ib_device *ibdev, + struct ib_queue_set *qset, unsigned int num_cqes, + struct ib_completion_queue_operations *cq_op, + unsigned int num_send_wqes, + unsigned int num_recv_wqes, size_t recv_pkt_len, + unsigned long qkey ); +extern void ib_qset_refill_recv ( struct ib_device *ibdev, + struct ib_queue_set *qset ); +extern void ib_destroy_qset ( struct ib_device *ibdev, + struct ib_queue_set *qset ); + +#endif /* _GPXE_IB_QSET_H */ |
