@@ -650,6 +650,14 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
}
}
+ if (!ib_mad_kernel_rmpp_agent(agent) && packet->mad.hdr.timeout_ms) {
+ ret = ib_set_mad_deadline(packet->msg,
+ (packet->mad.hdr.retries + 1) *
+ packet->mad.hdr.timeout_ms);
+ if (ret)
+ goto err_send;
+ }
+
ret = ib_post_send_mad(packet->msg, NULL);
if (ret)
goto err_send;
@@ -57,7 +57,11 @@
* received (transaction ID in data[] will be set to TID of original
* request) (ignored on send)
* @timeout_ms - Milliseconds to wait for response (unset on receive)
- * @retries - Number of automatic retries to attempt
+ * before issuing a retry
+ * @retries - Maximum number of automatic retries to attempt. Actual
+ * number of retries could be less if (@retries + 1) * @timeout_ms
+ * is exceeded. When the registration request sets @rmpp_version,
+ * it applies per RMPP window
* @qpn - Remote QP number received from/to be sent to
* @qkey - Remote Q_Key to be sent with (unset on receive)
* @lid - Remote lid received from/to be sent to
@@ -100,7 +104,11 @@ struct ib_user_mad_hdr_old {
* received (transaction ID in data[] will be set to TID of original
* request) (ignored on send)
* @timeout_ms - Milliseconds to wait for response (unset on receive)
- * @retries - Number of automatic retries to attempt
+ * before issuing a retry
+ * @retries - Maximum number of automatic retries to attempt. Actual
+ * number of retries could be less if (@retries + 1) * @timeout_ms
+ * is exceeded. When the registration request sets @rmpp_version,
+ * it applies per RMPP window
* @qpn - Remote QP number received from/to be sent to
* @qkey - Remote Q_Key to be sent with (unset on receive)
* @lid - Remote lid received from/to be sent to