Skip to content

Commit

Permalink
Modify IPMI Timeout Value
Browse files Browse the repository at this point in the history
  -- 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/75538
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
wghoffa authored and dcrowell77 committed Apr 8, 2019
1 parent 1dc4c34 commit ecf2201
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/usr/ipmibase/ipmirp.C
Expand Up @@ -935,18 +935,20 @@ void IpmiRP::queueForResponse(IPMI::Message& i_msg)
mutex_lock(&iv_mutex);

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

// Put this message on the response queue so we can find it later
// for a response and on the timeout queue so if it times out
// we can find it there. Note all message will all have the same
// timeout - mostly. Every message sent before the BMC tells us
// the timeout (at least one message) will have the shortest possible
// timeout. The BMC might lengthen the timeout, but can not shorten
// it. All messages after that will have the same timeout. So the
// timeout queue is "sorted."

// it.
iv_respondq[i_msg.iv_seq] = i_msg.iv_msg;
iv_timeoutq.push_back(i_msg.iv_msg);

Expand Down

0 comments on commit ecf2201

Please sign in to comment.