diff mbox series

[rdma-core,3/4] rdmacm: Add option to set ACK timeout

Message ID 1548683787-18270-4-git-send-email-yishaih@mellanox.com (mailing list archive)
State Not Applicable
Headers show
Series rdmacm: Add option to set ACK timeout | expand

Commit Message

Yishai Hadas Jan. 28, 2019, 1:56 p.m. UTC
From: Danit Goldberg <danitg@mellanox.com>

Add new option to rdma_set_option that allows applications to override
the RDMA-CM's QP ACK timeout value.

Signed-off-by: Danit Goldberg <danitg@mellanox.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
---
 librdmacm/man/rdma_set_option.3 | 3 +++
 librdmacm/rdma_cma.h            | 4 ++++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/librdmacm/man/rdma_set_option.3 b/librdmacm/man/rdma_set_option.3
index 24b13e4..c6660c6 100644
--- a/librdmacm/man/rdma_set_option.3
+++ b/librdmacm/man/rdma_set_option.3
@@ -38,6 +38,9 @@  The expected optlen is size of int.
 .IP "RDMA_OPTION_IB_PATH" 12
 Set IB path record data.
 The expected optlen is size of struct ibv_path_data[].
+.IP "RDMA_OPTION_ID_ACK_TIMEOUT" 12
+Set QP ACK timeout.
+The value calculated according to the formula 4.096 * 2^(ack_timeout) usec.
 .SH "RETURN VALUE"
 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
 set to indicate the failure reason.
diff --git a/librdmacm/rdma_cma.h b/librdmacm/rdma_cma.h
index 2096a81..6f3f074 100644
--- a/librdmacm/rdma_cma.h
+++ b/librdmacm/rdma_cma.h
@@ -691,6 +691,10 @@  enum {
 	RDMA_OPTION_ID_TOS	 = 0,	/* uint8_t: RFC 2474 */
 	RDMA_OPTION_ID_REUSEADDR = 1,   /* int: ~SO_REUSEADDR */
 	RDMA_OPTION_ID_AFONLY	 = 2,   /* int: ~IPV6_V6ONLY */
+	RDMA_OPTION_ID_ACK_TIMEOUT = 3	/* uint8_t */
+};
+
+enum {
 	RDMA_OPTION_IB_PATH	 = 1	/* struct ibv_path_data[] */
 };