.. | .. |
---|
58 | 58 | extern const struct rvt_operation_params hfi1_post_parms[]; |
---|
59 | 59 | |
---|
60 | 60 | /* |
---|
61 | | - * Send if not busy or waiting for I/O and either |
---|
62 | | - * a RC response is pending or we can process send work requests. |
---|
63 | | - */ |
---|
64 | | -static inline int hfi1_send_ok(struct rvt_qp *qp) |
---|
65 | | -{ |
---|
66 | | - return !(qp->s_flags & (RVT_S_BUSY | RVT_S_ANY_WAIT_IO)) && |
---|
67 | | - (verbs_txreq_queued(qp) || |
---|
68 | | - (qp->s_flags & RVT_S_RESP_PENDING) || |
---|
69 | | - !(qp->s_flags & RVT_S_ANY_WAIT_SEND)); |
---|
70 | | -} |
---|
71 | | - |
---|
72 | | -/* |
---|
73 | 61 | * Driver specific s_flags starting at bit 31 down to HFI1_S_MIN_BIT_MASK |
---|
74 | 62 | * |
---|
75 | 63 | * HFI1_S_AHG_VALID - ahg header valid on chip |
---|
76 | 64 | * HFI1_S_AHG_CLEAR - have send engine clear ahg state |
---|
77 | 65 | * HFI1_S_WAIT_PIO_DRAIN - qp waiting for PIOs to drain |
---|
| 66 | + * HFI1_S_WAIT_TID_SPACE - a QP is waiting for TID resource |
---|
| 67 | + * HFI1_S_WAIT_TID_RESP - waiting for a TID RDMA WRITE response |
---|
| 68 | + * HFI1_S_WAIT_HALT - halt the first leg send engine |
---|
78 | 69 | * HFI1_S_MIN_BIT_MASK - the lowest bit that can be used by hfi1 |
---|
79 | 70 | */ |
---|
80 | 71 | #define HFI1_S_AHG_VALID 0x80000000 |
---|
81 | 72 | #define HFI1_S_AHG_CLEAR 0x40000000 |
---|
82 | 73 | #define HFI1_S_WAIT_PIO_DRAIN 0x20000000 |
---|
| 74 | +#define HFI1_S_WAIT_TID_SPACE 0x10000000 |
---|
| 75 | +#define HFI1_S_WAIT_TID_RESP 0x08000000 |
---|
| 76 | +#define HFI1_S_WAIT_HALT 0x04000000 |
---|
83 | 77 | #define HFI1_S_MIN_BIT_MASK 0x01000000 |
---|
84 | 78 | |
---|
85 | 79 | /* |
---|
.. | .. |
---|
88 | 82 | |
---|
89 | 83 | #define HFI1_S_ANY_WAIT_IO (RVT_S_ANY_WAIT_IO | HFI1_S_WAIT_PIO_DRAIN) |
---|
90 | 84 | #define HFI1_S_ANY_WAIT (HFI1_S_ANY_WAIT_IO | RVT_S_ANY_WAIT_SEND) |
---|
| 85 | +#define HFI1_S_ANY_TID_WAIT_SEND (RVT_S_WAIT_SSN_CREDIT | RVT_S_WAIT_DMA) |
---|
| 86 | + |
---|
| 87 | +/* |
---|
| 88 | + * Send if not busy or waiting for I/O and either |
---|
| 89 | + * a RC response is pending or we can process send work requests. |
---|
| 90 | + */ |
---|
| 91 | +static inline int hfi1_send_ok(struct rvt_qp *qp) |
---|
| 92 | +{ |
---|
| 93 | + struct hfi1_qp_priv *priv = qp->priv; |
---|
| 94 | + |
---|
| 95 | + return !(qp->s_flags & (RVT_S_BUSY | HFI1_S_ANY_WAIT_IO)) && |
---|
| 96 | + (verbs_txreq_queued(iowait_get_ib_work(&priv->s_iowait)) || |
---|
| 97 | + (qp->s_flags & RVT_S_RESP_PENDING) || |
---|
| 98 | + !(qp->s_flags & RVT_S_ANY_WAIT_SEND)); |
---|
| 99 | +} |
---|
91 | 100 | |
---|
92 | 101 | /* |
---|
93 | 102 | * free_ahg - clear ahg from QP |
---|
.. | .. |
---|
104 | 113 | } |
---|
105 | 114 | |
---|
106 | 115 | /** |
---|
107 | | - * hfi1_create_qp - create a queue pair for a device |
---|
108 | | - * @ibpd: the protection domain who's device we create the queue pair for |
---|
109 | | - * @init_attr: the attributes of the queue pair |
---|
110 | | - * @udata: user data for libibverbs.so |
---|
111 | | - * |
---|
112 | | - * Returns the queue pair on success, otherwise returns an errno. |
---|
113 | | - * |
---|
114 | | - * Called by the ib_create_qp() core verbs function. |
---|
115 | | - */ |
---|
116 | | -struct ib_qp *hfi1_create_qp(struct ib_pd *ibpd, |
---|
117 | | - struct ib_qp_init_attr *init_attr, |
---|
118 | | - struct ib_udata *udata); |
---|
119 | | - |
---|
120 | | -/** |
---|
121 | 116 | * hfi1_qp_wakeup - wake up on the indicated event |
---|
122 | 117 | * @qp: the QP |
---|
123 | 118 | * @flag: flag the qp on which the qp is stalled |
---|
.. | .. |
---|
129 | 124 | |
---|
130 | 125 | void qp_iter_print(struct seq_file *s, struct rvt_qp_iter *iter); |
---|
131 | 126 | |
---|
132 | | -void _hfi1_schedule_send(struct rvt_qp *qp); |
---|
133 | | -void hfi1_schedule_send(struct rvt_qp *qp); |
---|
| 127 | +bool _hfi1_schedule_send(struct rvt_qp *qp); |
---|
| 128 | +bool hfi1_schedule_send(struct rvt_qp *qp); |
---|
134 | 129 | |
---|
135 | 130 | void hfi1_migrate_qp(struct rvt_qp *qp); |
---|
136 | 131 | |
---|
.. | .. |
---|
150 | 145 | u32 mtu_from_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, u32 pmtu); |
---|
151 | 146 | int mtu_to_path_mtu(u32 mtu); |
---|
152 | 147 | void hfi1_error_port_qps(struct hfi1_ibport *ibp, u8 sl); |
---|
| 148 | +void hfi1_qp_unbusy(struct rvt_qp *qp, struct iowait_work *wait); |
---|
153 | 149 | #endif /* _QP_H */ |
---|