diff options
author | Bill Taylor <Bill.Taylor@Sun.COM> | 2009-06-02 12:23:04 -0700 |
---|---|---|
committer | Bill Taylor <Bill.Taylor@Sun.COM> | 2009-06-02 12:23:04 -0700 |
commit | e830289583dd66f43cb4dfa20b1b25dd7a72b033 (patch) | |
tree | 26f6e2a7c80061ce89d32a2da2111b21646e2b4b | |
parent | 67bdf3b0f9c03ddb09508476025689fb2ca68f45 (diff) | |
download | illumos-joyent-e830289583dd66f43cb4dfa20b1b25dd7a72b033.tar.gz |
6841939 IBMF may hang when SA lost
-rw-r--r-- | usr/src/uts/common/io/ib/mgt/ibmf/ibmf_saa_impl.c | 31 | ||||
-rw-r--r-- | usr/src/uts/common/sys/ib/mgt/ibmf/ibmf_saa_impl.h | 7 |
2 files changed, 26 insertions, 12 deletions
diff --git a/usr/src/uts/common/io/ib/mgt/ibmf/ibmf_saa_impl.c b/usr/src/uts/common/io/ib/mgt/ibmf/ibmf_saa_impl.c index fcdb48161b..5e0cc85d1c 100644 --- a/usr/src/uts/common/io/ib/mgt/ibmf/ibmf_saa_impl.c +++ b/usr/src/uts/common/io/ib/mgt/ibmf/ibmf_saa_impl.c @@ -74,6 +74,8 @@ static int ibmf_saa_impl_ibmf_unreg(saa_port_t *saa_portp); int ibmf_saa_max_wait_time = IBMF_SAA_MAX_WAIT_TIME_IN_SECS; int ibmf_saa_trans_wait_time = IBMF_SAA_TRANS_WAIT_TIME_IN_SECS; +int ibmf_saa_max_resp_time = IBMF_SAA_MAX_RESP_TIME; +int ibmf_saa_max_subnet_timeout = IBMF_SAA_MAX_SUBNET_TIMEOUT; /* * ibmf_saa_impl_init: @@ -1257,6 +1259,21 @@ ibmf_saa_impl_get_cpi_cb(void *arg, size_t length, char *buffer, int status) resp_time_value = classportinfo->RespTimeValue & 0x1f; + /* + * Because some subnet managers might not provide sane + * value for "resp_time_value", we limit it here. In + * case this limit is too restrictive (very large fabric), + * we allow the limit to be raised (/etc/system). + */ + if (resp_time_value > ibmf_saa_max_resp_time) { + cmn_err(CE_CONT, "!ibmf_saa_max_resp_time (%d) " + "exceeded.", ibmf_saa_max_resp_time); + cmn_err(CE_CONT, "!Reducing subnet administrator " + "resp_time value from %d to %d.", + resp_time_value, ibmf_saa_max_resp_time); + resp_time_value = ibmf_saa_max_resp_time; + } + sa_cap_mask = classportinfo->CapabilityMask; IBMF_TRACE_3(IBMF_TNF_DEBUG, DPRINT_L3, @@ -2028,8 +2045,8 @@ ibmf_saa_impl_new_smlid_retry(saa_port_t *saa_portp, ibmf_msg_t *msgp, saa_portp->saa_pt_timeout = subnet_timeout; /* place upper bound on subnet timeout in case of faulty SM */ - if (saa_portp->saa_pt_timeout > IBMF_SAA_MAX_SUBNET_TIMEOUT) - saa_portp->saa_pt_timeout = IBMF_SAA_MAX_SUBNET_TIMEOUT; + if (saa_portp->saa_pt_timeout > ibmf_saa_max_subnet_timeout) + saa_portp->saa_pt_timeout = ibmf_saa_max_subnet_timeout; /* increment the reference count to account for the cpi call */ saa_portp->saa_pt_reference_count++; @@ -2173,8 +2190,8 @@ ibmf_saa_impl_revert_to_qp1(saa_port_t *saa_portp, ibmf_msg_t *msgp, saa_portp->saa_pt_timeout = subnet_timeout; /* place upper bound on subnet timeout in case of faulty SM */ - if (saa_portp->saa_pt_timeout > IBMF_SAA_MAX_SUBNET_TIMEOUT) - saa_portp->saa_pt_timeout = IBMF_SAA_MAX_SUBNET_TIMEOUT; + if (saa_portp->saa_pt_timeout > ibmf_saa_max_subnet_timeout) + saa_portp->saa_pt_timeout = ibmf_saa_max_subnet_timeout; /* increment the reference count to account for the cpi call */ saa_portp->saa_pt_reference_count++; @@ -3508,10 +3525,8 @@ ibmf_saa_impl_set_transaction_params(saa_port_t *saa_portp, /* place upper bound on subnet timeout in case of faulty SM */ saa_portp->saa_pt_timeout = portinfop->p_subnet_timeout; - if (saa_portp->saa_pt_timeout > IBMF_SAA_MAX_SUBNET_TIMEOUT) { - - saa_portp->saa_pt_timeout = IBMF_SAA_MAX_SUBNET_TIMEOUT; - } + if (saa_portp->saa_pt_timeout > ibmf_saa_max_subnet_timeout) + saa_portp->saa_pt_timeout = ibmf_saa_max_subnet_timeout; IBMF_TRACE_4(IBMF_TNF_DEBUG, DPRINT_L3, ibmf_saa_impl_set_transaction_params, diff --git a/usr/src/uts/common/sys/ib/mgt/ibmf/ibmf_saa_impl.h b/usr/src/uts/common/sys/ib/mgt/ibmf/ibmf_saa_impl.h index 947c90453a..472aa328db 100644 --- a/usr/src/uts/common/sys/ib/mgt/ibmf/ibmf_saa_impl.h +++ b/usr/src/uts/common/sys/ib/mgt/ibmf/ibmf_saa_impl.h @@ -19,15 +19,13 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _SYS_IB_MGT_IBMF_IBMF_SAA_IMPL_H #define _SYS_IB_MGT_IBMF_IBMF_SAA_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * saa_impl.h */ @@ -43,7 +41,8 @@ extern "C" { #define SAA_MAD_BASE_VERSION 1 #define SAA_MAD_CLASS_VERSION 2 #define IBMF_SAA_RETRANS_RETRIES 2 -#define IBMF_SAA_MAX_SUBNET_TIMEOUT 17 +#define IBMF_SAA_MAX_SUBNET_TIMEOUT 20 +#define IBMF_SAA_MAX_RESP_TIME 20 #define IBMF_SAA_MAX_BUSY_RETRY_COUNT 10 #define IBMF_SAA_MAX_WAIT_TIME_IN_SECS 60 #define IBMF_SAA_TRANS_WAIT_TIME_IN_SECS 240 |