Skip to content

Commit e319903

Browse files
wghoffadcrowell77
authored andcommitted
Modify IPMI Timeout Value
-- Currently the Timeout value for an IPMI message is assigned when the message is placed in the queue. The timeout value is the same whether we have 0 or 100 messages in the queue which leads to the occasional IPMI timeout when the BMC is sent a lot of messages in a short period of time. -- This fix is to implement the timeout as a per message timeout. I.E. if the message being put on the queue is the 3rd message on the queue it would get a timeout of 3x the timeout value. Change-Id: Ieb328d96144f2b1fe9dc39f57191e86cf4821c2c CQ: SW461931 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75537 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
1 parent c824d6f commit e319903

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/usr/ipmibase/ipmirp.C

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2012,2018 */
8+
/* Contributors Listed Below - COPYRIGHT 2012,2019 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -905,18 +905,20 @@ void IpmiRP::queueForResponse(IPMI::Message& i_msg)
905905
mutex_lock(&iv_mutex);
906906

907907
// BMC request-to-response times are always seconds, 1 - 30.
908-
// And I don't think we care about roll over here.
909-
i_msg.iv_timeout.tv_sec += iv_bmc_timeout;
908+
// And I don't think we care about roll over here. Enforce the
909+
// timeout as a timeout per-message. Meaning if there are 2
910+
// messages on the timeout queue, make the timeout of this message
911+
// iv_bmc_timeout + iv_bmc_timeout*2
912+
i_msg.iv_timeout.tv_sec +=
913+
(iv_bmc_timeout + (iv_bmc_timeout*iv_timeoutq.size()) );
910914

911915
// Put this message on the response queue so we can find it later
912916
// for a response and on the timeout queue so if it times out
913917
// we can find it there. Note all message will all have the same
914918
// timeout - mostly. Every message sent before the BMC tells us
915919
// the timeout (at least one message) will have the shortest possible
916920
// timeout. The BMC might lengthen the timeout, but can not shorten
917-
// it. All messages after that will have the same timeout. So the
918-
// timeout queue is "sorted."
919-
921+
// it.
920922
iv_respondq[i_msg.iv_seq] = i_msg.iv_msg;
921923
iv_timeoutq.push_back(i_msg.iv_msg);
922924

0 commit comments

Comments
 (0)