diff options
author | Matt Spinler <spinler@us.ibm.com> | 2019-12-12 10:04:33 -0600 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2020-01-27 08:06:26 -0600 |
commit | f77debb9afbbe007ed7e2c3f79ddeb6f1b6f7c49 (patch) | |
tree | ef5d6ebba9d86054835000c213164e88d48fcfa8 /extensions/openpower-pels/host_notifier.hpp | |
parent | 3019c6fb08b99af5e550910f241836e6e46f1c7b (diff) | |
download | phosphor-logging-f77debb9afbbe007ed7e2c3f79ddeb6f1b6f7c49.tar.gz phosphor-logging-f77debb9afbbe007ed7e2c3f79ddeb6f1b6f7c49.zip |
PEL: Take a PEL off the queue and send to host
Fill in the code that looks for the first PEL on the queue that still
needs to be sent up, and send it.
If the failure retry timer is active, or it has already retried the max
number of times, then don't send anything. In the former case the timer
callback will do the send, and in the latter the next time a log comes
in it will start trying again.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ibb9692ca83b23e5e021db8b8a89b5549fb979df1
Diffstat (limited to 'extensions/openpower-pels/host_notifier.hpp')
-rw-r--r-- | extensions/openpower-pels/host_notifier.hpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/extensions/openpower-pels/host_notifier.hpp b/extensions/openpower-pels/host_notifier.hpp index 1bb7538..127eb03 100644 --- a/extensions/openpower-pels/host_notifier.hpp +++ b/extensions/openpower-pels/host_notifier.hpp @@ -67,6 +67,20 @@ class HostNotifier */ bool enqueueRequired(uint32_t id) const; + /** + * @brief If the host still needs to be notified of the PEL + * at the time of the notification. + * + * Only returns false if: + * - Already acked by the host + * - It's hidden, and the HMC already got or will get it. + * + * @param[in] id - The PEL ID + * + * @return bool - If the notify is required + */ + bool notifyRequired(uint32_t id) const; + private: /** * @brief This function gets called by the Repository class @@ -88,8 +102,8 @@ class HostNotifier bool addPELToQueue(const PEL& pel); /** - * @brief Takes the PEL off the front of the queue and issues - * the PLDM send. + * @brief Takes the first PEL from the queue that needs to be + * sent, and issues the send if conditions are right. */ void doNewLogNotify(); |