[sundance] Add reset completion check
[gpxe.git] / src / include / gpxe / ib_sma.h
blob835ed4eadbfd80a50c1c4dc0edd0e8699bc41207
1 #ifndef _GPXE_IB_SMA_H
2 #define _GPXE_IB_SMA_H
4 /** @file
6 * Infiniband Subnet Management Agent
8 */
10 #include <gpxe/infiniband.h>
11 #include <gpxe/process.h>
13 /** Infiniband Subnet Management Agent operations */
14 struct ib_sma_operations {
15 /** Set port information
17 * @v ibdev Infiniband device
18 * @v port_info New port information
20 int ( * set_port_info ) ( struct ib_device *ibdev,
21 const struct ib_port_info *port_info );
24 /** An Infiniband Subnet Management Agent */
25 struct ib_sma {
26 /** Infiniband device */
27 struct ib_device *ibdev;
28 /** SMA operations */
29 struct ib_sma_operations *op;
30 /** SMA completion queue */
31 struct ib_completion_queue *cq;
32 /** SMA queue pair */
33 struct ib_queue_pair *qp;
34 /** Poll process */
35 struct process poll;
38 /** SMA payload size allocated for received packets */
39 #define IB_SMA_PAYLOAD_LEN 2048
41 /** SMA number of send WQEs
43 * This is a policy decision.
45 #define IB_SMA_NUM_SEND_WQES 4
47 /** SMA number of receive WQEs
49 * This is a policy decision.
51 #define IB_SMA_NUM_RECV_WQES 2
53 /** SMA number of completion queue entries
55 * This is a policy decision
57 #define IB_SMA_NUM_CQES 8
59 extern int ib_create_sma ( struct ib_sma *sma, struct ib_device *ibdev,
60 struct ib_sma_operations *op );
61 extern void ib_destroy_sma ( struct ib_sma *sma );
63 #endif /* _GPXE_IB_SMA_H */