#
16c2a0a0 |
| 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: I8c84201cb2343a8c8a5507a49de0721a1bee7063 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
1e5c81e0 |
| 03-May-2024 |
Riya Dixit <riyadixitagra@gmail.com> |
pldm: Remove unnecessary type casting in logs
This commit removes the unnecessary type casting of values of the journal logs based on supported types mentioned in LG2 documentation [1].
Testing: Ve
pldm: Remove unnecessary type casting in logs
This commit removes the unnecessary type casting of values of the journal logs based on supported types mentioned in LG2 documentation [1].
Testing: Verified the debug traces to correct.
''' For Instance: Earlier - error(”TYPE = {TYPE} “, “TYPE”, static_cast<unsigned>(PLDM_STATE_EFFECTER_PDR)); Journal trace - May 27 08:16:51 p10bmc pldmd[931]: TYPE = 11
After Correction - error(”TYPE = {TYPE}“, “TYPE”, PLDM_STATE_EFFECTER_PDR); Journal trace - May 27 08:16:51 p10bmc pldmd[931]: TYPE = Enum(11) '''
[1]: https://github.com/openbmc/phosphor-logging/blob/master/docs/structured-logging.md#lg2
Change-Id: Ia649ecd4ecbb73c421f7844885f58a6835805719 Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
show more ...
|
#
087a751f |
| 06-Apr-2024 |
Riya Dixit <riyadixitagra@gmail.com> |
pldmd, requester, softoff & utilities: Improving logs (lg2)
This commit corrects the severity level of logs and also formats the message string, fixing the ill-defined message string of the logs as
pldmd, requester, softoff & utilities: Improving logs (lg2)
This commit corrects the severity level of logs and also formats the message string, fixing the ill-defined message string of the logs as mentioned in the anti-pattern document [1]. Additionally, based on the requirement this commit adds more debug information to logs.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#ill-defined-data-structuring-in-lg2-message-strings
Change-Id: I230e9e1404db8c92c81e2f872183d691c91ff16c Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
show more ...
|
#
35535cf2 |
| 05-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: avoid deprecated phosphor::Timer
sdbusplus had an older type named `phosphor::Timer` which was recently renamed to `sdbusplus::Timer`. Update the code to use the new type alias.
Change-
sdbusplus: avoid deprecated phosphor::Timer
sdbusplus had an older type named `phosphor::Timer` which was recently renamed to `sdbusplus::Timer`. Update the code to use the new type alias.
Change-Id: I68d3968bcb359bee5ea0c9e695572b68fcf34136 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
1ed5f7a6 |
| 21-May-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
pldm: Convert to using libpldm transport APIs
A significant amount of logic can be removed by exploiting the new transport APIs provided by libpldm. Switch the pldm repository over to use these by i
pldm: Convert to using libpldm transport APIs
A significant amount of logic can be removed by exploiting the new transport APIs provided by libpldm. Switch the pldm repository over to use these by introducing an RAII wrapper for the APIs. The current stance is to continue using the legacy mctp-demux transport implementation, but we also provide a build option to switch to the AF_MCTP transport.
We don't currently have the infrastructure in place to get the correct TIDs, so to keep everything working as before use the EID as the TID in the EID-to-TID mapping.
Change-Id: I366f079082b102cfc0e90db0f62208581eb8693e Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
#
a7dbca53 |
| 07-Jul-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
clang-error: fix clang-diagnostic-defaulted-function-deleted error
The clang-diagnostic-defaulted-function-deleted error is generated when explicitly defaulted move assignment operator is implicitly
clang-error: fix clang-diagnostic-defaulted-function-deleted error
The clang-diagnostic-defaulted-function-deleted error is generated when explicitly defaulted move assignment operator is implicitly deleted. This commit fixes those errors.
Change-Id: I7a407dd3411b19a73a13b1c1e4805b89fc2ec51a Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
#
6da4f91b |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I61b093f75011417cc9c7acf9605200f4fa429bac Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
49cfb138 |
| 02-Mar-2023 |
Riya Dixit <riyadixitagra@gmail.com> |
PLDM: Implementing Phosphor-Logging/LG2 logging
This commit adds changes in PLDM for implementing structured LG2 logging, thereby moving away from std::cout/cerr practice of logging which are output
PLDM: Implementing Phosphor-Logging/LG2 logging
This commit adds changes in PLDM for implementing structured LG2 logging, thereby moving away from std::cout/cerr practice of logging which are output streams and not logging mechanism.
PLDM now can make use of lg2 features like accurate CODE LINE Number and CODE_FUNCTION Name and better detailing in json object values which can be used in log tracking.
More detailed logging change: https://gist.github.com/riyadixitagra/c251685c1ba84248181891f7bc282395
Tested: Ran a power off, on, cycle, and reset-reload.
Change-Id: I0485035f15f278c3fd172f0581b053c1c37f3a5b Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
show more ...
|
#
c453e164 |
| 21-Dec-2022 |
George Liu <liuxiwei@inspur.com> |
libpldm: Correct reference to libpldm header files
When relying on header files from external libraries, #include<> should be used instead of #include "" to avoid ambiguity.
Tested: Built pldm succ
libpldm: Correct reference to libpldm header files
When relying on header files from external libraries, #include<> should be used instead of #include "" to avoid ambiguity.
Tested: Built pldm successfully after enabling ibm-oem
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ia1997de7e0f61564055bbd837f4e24c8f14e55a5
show more ...
|
#
27a022ca |
| 10-Aug-2022 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Migrate to subproject
Organize files in libpldm to make it a subproject
In the current state, libpldm is not readily consumable as a subproject.This commit does all the necessary re-organi
libpldm: Migrate to subproject
Organize files in libpldm to make it a subproject
In the current state, libpldm is not readily consumable as a subproject.This commit does all the necessary re-organisation of the source code to make it work as a subproject.
There are no .c/.h files changes in this commit, only meson changes and re-organising the code structure.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I20a71c0c972b1fd81fb359d604433618799102c6
show more ...
|
#
ef773059 |
| 28-Jul-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
In-Memory FlightRecorder support for pldmd
pldm daemon in BMC can act both as a requester and responder, and it is capable of talking to any device that talks pldm spec.
With the rapid increase in
In-Memory FlightRecorder support for pldmd
pldm daemon in BMC can act both as a requester and responder, and it is capable of talking to any device that talks pldm spec.
With the rapid increase in the number of commands supported by pldmd, and also with the async request/response support enabled, its becomes extremely tough to debug the failures in the communication.
And most of times, the essential information that is needed to debug are the last few commands that BMC pldm responded to. So this commit is an attempt to bring in an in-memory flight recorder that could save the last 10(can be configurable) pldm transactions in a circular buffer, and dumps the contents of it into a file when it receives a SIGUR1 signal.
Resolves openbmc/pldm#24
Tested By :
1. Power on host 2. In the middle of poweron, send the SIGUSR1 signal to pldmd
root@rain118bmc:/tmp# kill -10 836 Received SIGUR1(10) Signal interrupt root@rain118bmc:/tmp# Dumping the flight recorder into /tmp/pldm_flight_recorder
3. Make sure pldmd is not killed and does the rest of the power on operation.
4. check the contents of /tmp/pldm_flight_recorder root@p10bmc:~# cat /tmp/pldm_flight_recorder UTC Nov 05 / 11:27:25.334606 : Tx : 0a 3f 0d 00 UTC Nov 05 / 11:27:26.292988 : Rx : 09 01 8b 3f 0d 00 00 7b 1e 00 50 00 UTC Nov 05 / 11:27:26.296915 : Tx : 0b 3f 0d 00 UTC Nov 05 / 11:27:27.250999 : Rx : 09 01 8c 3f 0d 00 00 7c 1e 00 50 00 UTC Nov 05 / 11:27:27.254762 : Tx : 0c 3f 0d 00 UTC Nov 05 / 11:27:28.212168 : Rx : 09 01 8d 3f 0d 00 00 7d 1e 00 50 00 UTC Nov 05 / 11:27:28.216086 : Tx : 0d 3f 0d 00 UTC Nov 05 / 11:27:29.171228 : Rx : 09 01 8e 3f 0d 00 00 7e 1e 00 50 00 UTC Nov 05 / 11:27:29.175143 : Tx : 0e 3f 0d 00 UTC Nov 05 / 11:27:25.330716 : Rx : 09 01 8a 3f 0d 00 00 7a 1e 00 50 00
5. Configure with -Dflightrecorder-max-entries=0 root@p10bmc:~# kill -10 21847 Received SIGUR1(10) Signal interrupt Fight recorder policy is disabled
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I4e9c828f4ada9f1db6bf3a9b68c16e71b6e5d8f0
show more ...
|
#
9fffea2c |
| 27-Oct-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Change the send Buffer size dynamically
On a Linux system the send buffer size has defaulted to around 90k, and when a pldm message is sent via the pldm_send() that is bigger than 90k, we get an err
Change the send Buffer size dynamically
On a Linux system the send buffer size has defaulted to around 90k, and when a pldm message is sent via the pldm_send() that is bigger than 90k, we get an error ENOBUFS (No buffer space avilable).
This commit would dynamically change the socket parameter (SO_SNDBUF) to set the new maximum socket send buffer size so that we can successfully send the message.
Tested By:
1. hard coded the current buffer size value to 10 and forced the buffer size to be increase for mutiple commands & was able to power on the host with out any problems.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I5f7a3948ea019b4dc983cf5e1926cfc128c02084
show more ...
|
#
e5268cda |
| 07-Sep-2021 |
Tom Joseph <rushtotom@gmail.com> |
Refactor the verbose tracing in PLDM
1. Add verbose tracing in requester code 2. Change the prefix of verbose tracing to "Tx: " and "Rx: " 3. Remove explicit verbose tracing flag in libpldmresponder
Refactor the verbose tracing in PLDM
1. Add verbose tracing in requester code 2. Change the prefix of verbose tracing to "Tx: " and "Rx: " 3. Remove explicit verbose tracing flag in libpldmresponder 4. Change the prefix of pldmtool verbose tracing to "pldmtool: Tx: " and "pldmtool: Rx: "
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: Ie2c6b323e32e0828ed5ecaeb3e61943a98a2f089
show more ...
|
#
5079ac4a |
| 19-Aug-2021 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
treewide: remove 'using namespace' from headers
Using namespace at global scope in a header file violates the cpp core guidelines. Quoting the guidelines:
"Doing so takes away an #includer’s abi
treewide: remove 'using namespace' from headers
Using namespace at global scope in a header file violates the cpp core guidelines. Quoting the guidelines:
"Doing so takes away an #includer’s ability to effectively disambiguate and to use alternatives. It also makes #included headers order-dependent as they might have different meaning when included in different orders."
For further reading: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive
The guidelines don't call out using using namespace from namespace scope, but it is only marginally less problematic and still unexpected, so this patch removes those as well.
The process used to do the update is roughly:
1 - git grep 'using namespace' **.hpp 2 - For each instance, remove the offending 'using namespace' line 3 - build 4 - add 'using namespace' to cpp files or fully resolve types in hpp files until the project builds again.
Further cleanup is possible - for example cpp files could be scrubbed for unnecessary namespace qualification - this was not done here to make review as simple as possible.
Change-Id: I4931f5e78a1b5b74b4a4774c035a549f4d59b91a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
#
42336b5c |
| 18-Aug-2021 |
Sampa Misra <sampmisr@in.ibm.com> |
remove the rvalue reference from Request class
the rvalue is causing the buffer to be lost when retrying. we tried sending msg to Host when Host was off and pldmd crashed
before fix: pldmd calling
remove the rvalue reference from Request class
the rvalue is causing the buffer to be lost when retrying. we tried sending msg to Host when Host was off and pldmd crashed
before fix: pldmd calling setHostState enter setHostStateSending first Msg: 80 00 03 00 00 00 00 01 00 enter pldm_send with requestMsg.size() 9 enter pldm_send with requestMsg.size() 4162004581
after fix: pldmd calling setHostState enter setHostStateSending first Msg: 80 00 03 00 00 00 00 01 00 enter pldm_send with requestMsg.size() 9 enter pldm_send with requestMsg.size() 9 enter pldm_send with requestMsg.size() 9 Response not received for the request, instance ID expired. EID = 9 INSTANCE_ID= 0 TYPE = 0 COMMAND = 3 into getPLDMVersionHandler callback Failed to receive response for getPLDMVersion command, Host seems to be off
Change-Id: Iee9b08db117122eaa07e8b8fd21f47a8ed1fe142 Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
show more ...
|
#
c0c79481 |
| 02-Jun-2021 |
Sampa Misra <sampmisr@in.ibm.com> |
implement async handlers for all requester commands
this commit makes use of 74f27c730ef3925a0f2a3adfaa04f8790f931372 to convert the existing blocking requester commands in pldm to async ones. this
implement async handlers for all requester commands
this commit makes use of 74f27c730ef3925a0f2a3adfaa04f8790f931372 to convert the existing blocking requester commands in pldm to async ones. this is tested with Host code and seems to work fine
Change-Id: I8d4762c3cd5bce49f854b30f8325bfcd1dcb4ff9 Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
show more ...
|
#
a5ed6585 |
| 18-Jun-2021 |
Tom Joseph <rushtotom@gmail.com> |
requester: Enhance the PLDM requester code
- Free the instance id on error paths - Make the conditional checks consistent - Make the unit tests robust
Signed-off-by: Tom Joseph <rushtotom@gmail.com
requester: Enhance the PLDM requester code
- Free the instance id on error paths - Make the conditional checks consistent - Make the unit tests robust
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: Ieb70da2820ab818c36f5bf874a602fb090659836
show more ...
|
#
74f27c73 |
| 16-May-2021 |
Tom Joseph <rushtotom@gmail.com> |
requester: PLDM handler for async request/response
PLDM request handler provides APIs to register PLDM request message, handle retries and instance ID expiration. Sending the PLDM request and handli
requester: PLDM handler for async request/response
PLDM request handler provides APIs to register PLDM request message, handle retries and instance ID expiration. Sending the PLDM request and handling response is handled in an async manner. On receiving the response the corresponding response handler registered for the request is invoked.
Tested: Ran unit tests
Signed-off-by: Tom Joseph <rushtotom@gmail.com> Change-Id: I9f0a9dfcf0fbc9a84eefad375b92d40dd8b48d3d
show more ...
|