From: Danit Goldberg <danitg@xxxxxxxxxxxx> 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@xxxxxxxxxxxx> Reviewed-by: Moni Shoua <monis@xxxxxxxxxxxx> Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx> --- librdmacm/man/rdma_set_option.3 | 3 +++ librdmacm/rdma_cma.h | 4 ++++ 2 files changed, 7 insertions(+) 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[] */ }; -- 1.8.3.1