#
075c7923 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I21d2ca8065f24fd73509229c517f5caf48934b60 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
610e80f4 |
| 12-Sep-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Change info trace to a debug one
The PLDM daemon was missing the call to HostReject when PHYP responded to getting a new PEL with the 'file discarded' response. Now that it's being added, this
PEL: Change info trace to a debug one
The PLDM daemon was missing the call to HostReject when PHYP responded to getting a new PEL with the 'file discarded' response. Now that it's being added, this trace was showing up multiple times as PHYP would accept one new PEL at a time as the OS slowly acked them.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I13bccf821b96a8d918d33646893efa34faf4c088
show more ...
|
#
1b41886d |
| 29-Jun-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Use lg2 in PLMD related files
There are a lot of debug traces in the code that uses PLDM to send PELs up to the OS. Convert the files that deal with that to lg2 so that the debug traces can be
PEL: Use lg2 in PLMD related files
There are a lot of debug traces in the code that uses PLDM to send PELs up to the OS. Convert the files that deal with that to lg2 so that the debug traces can be seen by just running phosphor-log-manager from the command line where lg2 will print to the console as opposed to having to change the journal priority in an overlay file.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I818bab1bf636fe83d3e7ff64c1bc31ad5e09705e
show more ...
|
#
4f1bed7e |
| 09-Jun-2022 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Remove use of deprecated mem_fun
Replace it with mem_fn.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I1b223f2de54f9b6c6883fb539276f9750575ab96
|
#
e5f7508b |
| 24-Jan-2022 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Wait a bit after host up before sending PELs
Wait a minute after the host state switches to running before sending any PELs to the host. This applies both on a normal boot and also when the BM
PEL: Wait a bit after host up before sending PELs
Wait a minute after the host state switches to running before sending any PELs to the host. This applies both on a normal boot and also when the BMC is rebooted when the host is already up.
This is being done for 2 reasons: 1) Give some relief to the PLDM traffic and CPU load that occurs after a BMC reboot when the host is already up, because the host will also be exchanging PLDM PDRs with the BMC then and pretty much every application is also starting up at the time as well. 2) A lot of times on a normal boot the host notifier code ends up having to do a few retries when it first starts sending the PELs because the first few commands fail, possibly because the code on the receiving end isn't quite ready yet.
I arrived at that amount of time by deciding 30 seconds was reasonable, and then doubling it just to be sure. During testing of the reboots the minute timeout gave plenty of time for the BMC to get back to BMC ready.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I0929a4acdda0a9fe8fbdcd624c5821a642ad83a6
show more ...
|
#
d26fa3e7 |
| 21-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: clean up various compile warnings
Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags of Meson.
Issue
openpower-pels: clean up various compile warnings
Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags of Meson.
Issues fixed: - many unused parameters - invalid case fall-through - excess semi-colons - incorrect 'const' on return-by-value type - removal of variable length array in test case - uncaught return from 'system' call in test case
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8af69184042cf8661d1307a02ecf3afcab4724a1
show more ...
|
#
5f5352e5 |
| 05-Mar-2020 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add HostNotifier related debug traces
Add some debug traces that make it easier to debug issues in the code paths that send PELs to the host. They will only show up when the journald conf file
PEL: Add HostNotifier related debug traces
Add some debug traces that make it easier to debug issues in the code paths that send PELs to the host. They will only show up when the journald conf files are modified to turn on debug journal entries.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I1ad6b584bed8c6b58aee94ac2178c4d0b6e3e5d8
show more ...
|
#
7cb985ff |
| 05-Mar-2020 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Tell HostNotifier about deleted PELs
Have the HostNotifier class subscribe to the Repository class's PEL deletion callbacks so that when a PEL is deleted HostNotifier can remove that PEL from i
PEL: Tell HostNotifier about deleted PELs
Have the HostNotifier class subscribe to the Repository class's PEL deletion callbacks so that when a PEL is deleted HostNotifier can remove that PEL from its queue and also from its sent list.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I37c61bd62f208512e0c45a628548e0881272d2f5
show more ...
|
#
829b052d |
| 04-Mar-2020 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Clear PLDM instance IDs in certain cases
When the host powers off or the code hits the maximum amount of retries after a failure and gives up, call the PLDM interface's cancelCmd function to en
PEL: Clear PLDM instance IDs in certain cases
When the host powers off or the code hits the maximum amount of retries after a failure and gives up, call the PLDM interface's cancelCmd function to ensure that the code will get a new instance ID on any future attempts at sending a PEL to the host.
Note that in the power off case the PLDMInterface class would only have an instance ID around if it was in the middle of sending a command at the time.
It is doing this because there is no way to know when the next attempt at sending up a PEL will occur, it could be months or years, and it can't assume the PLDM daemon will not have already given that ID to someone else by then.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I6cd5ef6131ee0b2a205fcf71db5a2bfaa2e44e36
show more ...
|
#
24a8558b |
| 27-Jan-2020 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Don't send PELs to host when flag disabled
Don't put any PELs on the queue to send to the host when the setting to send event logs to the host has been set to false.
Signed-off-by: Matt Spinle
PEL: Don't send PELs to host when flag disabled
Don't put any PELs on the queue to send to the host when the setting to send event logs to the host has been set to false.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I37be53f54c354e2c440ac3a932630a4905e311f1
show more ...
|
#
a19b6234 |
| 12-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Receive a 'bad PEL' indication from host
If the code somehow sent the host a malformed PEL, it will respond with the 'Ack PEL' PLDM command with a special value that indicates this, and the PLD
PEL: Receive a 'bad PEL' indication from host
If the code somehow sent the host a malformed PEL, it will respond with the 'Ack PEL' PLDM command with a special value that indicates this, and the PLDM daemon will relay it to this daemon.
In this case, change the host transmission state to 'bad' so it doesn't get sent again. This should never happen as the Repository class already validates PELs and removes bad ones, though maybe the host and Repository have different ideas about what constitutes a malformed PEL.
In the future, if event logging support is added to the PEL code running inside the logging daemon, it may be a good idea to create a new PEL for this case.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id6f9fd37764bf5b5d09b4277a1e36b1f26b3e9a5
show more ...
|
#
41293cb8 |
| 12-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Notifier support for 'host full'
The host firmware may have a limited size for its staging area before it passes the PELs through to the OS, and this area may fill up with PELs it can't send if
PEL: Notifier support for 'host full'
The host firmware may have a limited size for its staging area before it passes the PELs through to the OS, and this area may fill up with PELs it can't send if there are too many or the OS isn't up yet.
In this case, it will send down an 'Ack PEL' PLDM command with a special response indicating this host full condition. The PLDM daemon will then call a method on this daemon to let it know.
This command handles the host full condition on the HostNotifier class. When this is set:
* The PEL that hit this condition will be put back on the queue to be sent again. * No new PELs will be sent up, except as noted below * A 60s timer will be started at the end of which another attempt will be made to send a PEL, in the hopes the condition went away. - If it didn't go away, this process will repeat. - If it did go away, a successful ack will be received and things will proceed as normal.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iaeb38f43f7acc595bcff234ba50cedf8188b3d9b
show more ...
|
#
cc3b64ae |
| 12-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Support for the host acking a PEL
After the host firmware successfully transfers a PEL to the OS, it will respond with an 'Ack' command that the PLDM daemon sends over to this daemon via a D-Bu
PEL: Support for the host acking a PEL
After the host firmware successfully transfers a PEL to the OS, it will respond with an 'Ack' command that the PLDM daemon sends over to this daemon via a D-Bus method call.
Add support to the HostNotifier class for this. It will change the state field in the PEL to 'acked' so that it doesn't get sent up again.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Id2a9985965017d9431419c1375d5374a2d0ae00b
show more ...
|
#
7d800a4e |
| 12-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: On new PEL, send to host if necessary
When a new PEL comes in, send it to the host now if the host is up and the class is currently idle.
The PLDM command will be dispatched in a standalone fu
PEL: On new PEL, send to host if necessary
When a new PEL comes in, send it to the host now if the host is up and the class is currently idle.
The PLDM command will be dispatched in a standalone function called from the event loop so that this function, which may be part of the 'Create new log' D-Bus method response, can return first.
Also added testcases to start verifying these paths now that there is a full mock of the HostInterface class.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ib30a99cc61be9205122287ba310bc315d762e863
show more ...
|
#
f77debb9 |
| 12-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
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 ha
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
show more ...
|
#
3019c6fb |
| 11-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Fill in host state change callback
If the host is up, start sending PELs.
If the host is off, move all of the PELs that are sent but not acked back to the queue to be sent again next time.
Si
PEL: Fill in host state change callback
If the host is up, start sending PELs.
If the host is off, move all of the PELs that are sent but not acked back to the queue to be sent again next time.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I66d382a85afc88f6b23367fb515df4dbe5326be1
show more ...
|
#
f869fcf8 |
| 11-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Fill in host command response handler
If notifying the host of a new PEL was successful, then it will modify the PEL's host transmission state to 'sent' and add it to the list of sent PELs.
If
PEL: Fill in host command response handler
If notifying the host of a new PEL was successful, then it will modify the PEL's host transmission state to 'sent' and add it to the list of sent PELs.
If there was a failure, then a timer will be started so a retry can be done.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I77000c603a18726d4cdbb3920ca349e69198fb7f
show more ...
|
#
a943b15b |
| 11-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Logic to enqueue a PEL to send to host
Fill in the function to determine if a PEL needs to be placed on the qeueue to be sent up to the host. It involves checking both the host and HMC transmi
PEL: Logic to enqueue a PEL to send to host
Fill in the function to determine if a PEL needs to be placed on the qeueue to be sent up to the host. It involves checking both the host and HMC transmission states, as well as the PEL action flags field.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9f1a9fba1b7e6dc7a167f1c7e9dfd6c40d90883f
show more ...
|
#
f60ac27e |
| 11-Dec-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add HostNotifier class
This class will watch for new PELs being created, and handle sending them up to the host. This first commit for this class mostly just fills in the constructor to set up
PEL: Add HostNotifier class
This class will watch for new PELs being created, and handle sending them up to the host. This first commit for this class mostly just fills in the constructor to set up the various callbacks it will use.
It is only instantiated in the Manager class if the Manager constructor used is the one that passes in the HostInterface object, to allow for configurations that don't need PELs passed up.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I0ddcf94d047979eb78209d396c2351566c634dbe
show more ...
|