diff options
author | Sean Hefty <sean.hefty@intel.com> | 2007-08-01 16:49:53 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-10-09 22:59:17 -0400 |
commit | de98b693e9857e183679cd2f49b3c30d2bc57629 (patch) | |
tree | bfb31d9109f5057926b8849671e2937df22b37fd /include/rdma/ib_cm.h | |
parent | 1a1eb6a646f52dc62e3f9ceac4aab9c27e781186 (diff) |
IB/cm: Modify interface to send MRAs in response to duplicate messages
The IB CM provides a message received acknowledged (MRA) message that
can be sent to indicate that a REQ or REP message has been received, but
will require more time to process than the timeout specified by those
messages. In many cases, the application may not know how long it will
take to respond to a CM message, but the majority of the time, it will
usually respond before a retry has been sent. Rather than sending an
MRA in response to all messages just to handle the case where a longer
timeout is needed, it is more efficient to queue the MRA for sending in
case a duplicate message is received.
This avoids sending an MRA when it is not needed, but limits the number
of times that a REQ or REP will be resent. It also provides for a
simpler implementation than generating the MRA based on a timer event.
(That is, trying to send the MRA after receiving the first REQ or REP if
a response has not been generated, so that it is received at the remote
side before a duplicate REQ or REP has been received)
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma/ib_cm.h')
-rw-r--r-- | include/rdma/ib_cm.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h index 12243e80c70..a627c8682d2 100644 --- a/include/rdma/ib_cm.h +++ b/include/rdma/ib_cm.h | |||
@@ -477,12 +477,15 @@ int ib_send_cm_rej(struct ib_cm_id *cm_id, | |||
477 | const void *private_data, | 477 | const void *private_data, |
478 | u8 private_data_len); | 478 | u8 private_data_len); |
479 | 479 | ||
480 | #define IB_CM_MRA_FLAG_DELAY 0x80 /* Send MRA only after a duplicate msg */ | ||
481 | |||
480 | /** | 482 | /** |
481 | * ib_send_cm_mra - Sends a message receipt acknowledgement to a connection | 483 | * ib_send_cm_mra - Sends a message receipt acknowledgement to a connection |
482 | * message. | 484 | * message. |
483 | * @cm_id: Connection identifier associated with the connection message. | 485 | * @cm_id: Connection identifier associated with the connection message. |
484 | * @service_timeout: The maximum time required for the sender to reply to | 486 | * @service_timeout: The lower 5-bits specify the maximum time required for |
485 | * to the connection message. | 487 | * the sender to reply to to the connection message. The upper 3-bits |
488 | * specify additional control flags. | ||
486 | * @private_data: Optional user-defined private data sent with the | 489 | * @private_data: Optional user-defined private data sent with the |
487 | * message receipt acknowledgement. | 490 | * message receipt acknowledgement. |
488 | * @private_data_len: Size of the private data buffer, in bytes. | 491 | * @private_data_len: Size of the private data buffer, in bytes. |