#
4bf3ed84 |
| 14-Mar-2025 |
Eric Yang <eric.yang.wiwynn@gmail.com> |
requester: Fix error handling in registerRequest
Add error handling for pollEndpointQueue in registerRequest to prevent incorrect PLDM_SUCCESS returns. This ensures SendRecvMsgSender can handle send
requester: Fix error handling in registerRequest
Add error handling for pollEndpointQueue in registerRequest to prevent incorrect PLDM_SUCCESS returns. This ensures SendRecvMsgSender can handle send failures, preventing discoverMctpTerminusTask from stalling and remaining incomplete.
Change-Id: I153934490ee848166e7dce5892136bbbdeeacdd9 Signed-off-by: Eric Yang <eric.yang.wiwynn@gmail.com>
show more ...
|
#
366507c8 |
| 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I95f756bab7f403af49a94011bbb1fe4e51f985ad Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I95f756bab7f403af49a94011bbb1fe4e51f985ad Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
f7d249ed |
| 02-Sep-2024 |
SeanCChuang <sean.chuang.wiwynn@gmail.com> |
requester: Fix pldmd crash
Add a check to see if the key is exist in the queue of remove request , to prevent calling the response handler twice after the request has timed out.
Change-Id: Iafe061d
requester: Fix pldmd crash
Add a check to see if the key is exist in the queue of remove request , to prevent calling the response handler twice after the request has timed out.
Change-Id: Iafe061d71a6ae7e04a11f462acf00423bd52f4b6 Signed-off-by: SeanCChuang <sean.chuang.wiwynn@gmail.com>
show more ...
|
#
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 ...
|
#
6b901e4a |
| 10-Jul-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
requester: Use return code instead of throwing exception
The coroutine API should only forward error code and response data to the caller when sends/receives PLDM message instead check the response
requester: Use return code instead of throwing exception
The coroutine API should only forward error code and response data to the caller when sends/receives PLDM message instead check the response and thrown exception.
The `sendRecvMsg` API will response tuple of error code, response and response length as below:
+ [error_code, _, _] if registerRequest fails with `error_code`. + [PLDM_ERROR_NOT_READY, nullptr, 0] if the request is timed out. + [PLDM_SUCCESS, resp, len] if succeeded.
Signed-off-by: Khang Nguyen Duy <khangng@amperecomputing.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Id8262d147e9fed50af8f55f1c611a3a3b153b6e3
show more ...
|
#
2576aecd |
| 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I539a0c5baa63be240fc1c76367c0af338dd89c7b Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
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 ...
|
#
a85c69d3 |
| 09-Jan-2024 |
Gilbert Chen <gilbert.chen@arm.com> |
requester: Add coroutine API
Added coroutine API to Handler using stdexec to help send and receive messages in one function call.
For example, to get all PDRs from terminus needs multiple getPDR co
requester: Add coroutine API
Added coroutine API to Handler using stdexec to help send and receive messages in one function call.
For example, to get all PDRs from terminus needs multiple getPDR commands. Except first getPDR commands, the following getPDR command request data(e.g. dataTransferHandle) needs the previous getPDR command response data(e.g. nextDataTransferHandle). By using C++ co_await, the code to get all PDRs can straightforward be implemented by a while loop.
Pseudo code example: do { auto rc = co_await getPDR(dataTransferHndl, ...);
// update dataTransferHndl for next getPDR command dataTransferHndl = nextDataTransferHndl;
} while(...);
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com> Signed-off-by: Khang Nguyen <khangng@amperecomputing.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I7b47d15ac15f6ae661ec94dca6a281844b939a44
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 ...
|
#
4ddee3a0 |
| 02-Aug-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
requestHandler: Queue the request messages to one endpoint
Section "Requirements for requesters" in DSP0240 details "A PLDM terminus that issues PLDM requests to another PLDM terminus shall wait unt
requestHandler: Queue the request messages to one endpoint
Section "Requirements for requesters" in DSP0240 details "A PLDM terminus that issues PLDM requests to another PLDM terminus shall wait until one of the following occurs before issuing a new PLDM request: it gets the response to a particular request, it times out waiting for the response, or it receives an indication that transmission of the particular request failed." So the registered request messages to one endpoint have to be queued before sending to meet the requester requirement. When a sensor manager is added to pldmd daemon to manage the sensors of one terminus, the sensor manager will support the sensor polling timers. The timers will poll the PLDM sensors with different intervals so there can be many `getSensorReading` requests to one endpoint to get the sensor values. Moreover, BMC also sends `PollForPlatformEventMessage` requests to get the event data when it receives the `pldmMessagePollEvent` event from the terminus. So those TX request messages have to be queued.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I9756e1029b41a297a8f73e2ab7be47bc143ef710
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 ...
|
#
2abbce76 |
| 17-Oct-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
InstanceIdDb: Move header from pldmd/ to common/
The header is used across all executables produced by the project, which makes it "common".
Change-Id: I022b179fad1de8dba2ef39fd33bc240ec73a2d33 Sig
InstanceIdDb: Move header from pldmd/ to common/
The header is used across all executables produced by the project, which makes it "common".
Change-Id: I022b179fad1de8dba2ef39fd33bc240ec73a2d33 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
cdbb9e27 |
| 13-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
use std::move_only_function
Since enabling C++23, we can eliminate the need for `function2` and instead leverage `std::move_only_function`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Chang
use std::move_only_function
Since enabling C++23, we can eliminate the need for `function2` and instead leverage `std::move_only_function`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iafc70c918e38b429e586bf18f71a716bdede43f8
show more ...
|
#
47792274 |
| 13-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pldm: Include config.h via compiler argument
This removes any ambiguity about which config.h is being included. Subprojects such as libpldm and phosphor-logging also generate config.h files, and the
pldm: Include config.h via compiler argument
This removes any ambiguity about which config.h is being included. Subprojects such as libpldm and phosphor-logging also generate config.h files, and these are exposed in the include path.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3e0ccd6339f088380ffa29d41167b07aefc7dd16
show more ...
|
#
b4e8cfde |
| 23-Mar-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
requester: Check duplicate key when call registerRequest
Add checking the existing of key {eid, instanceId, type, command} when call registerRequest.
Tested: 1. Stress polling PLDM sensors. 2. Call
requester: Check duplicate key when call registerRequest
Add checking the existing of key {eid, instanceId, type, command} when call registerRequest.
Tested: 1. Stress polling PLDM sensors. 2. Call pldmtool command to get sensor quickly. 3. Check message "The eid:InstanceID <eid>:<InstanceID> is using."
Change-Id: Ib547eb56e738a7aebfe87ce4967ebf1694e5b3ee Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|
#
a330b2f0 |
| 04-May-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pldmd: Migrate instance ID allocation to pldm::InstanceIdDb
This removes use of `pldm::dbus_api::Requester` from around the code-base. This makes progress towards removing the DBus API entirely once
pldmd: Migrate instance ID allocation to pldm::InstanceIdDb
This removes use of `pldm::dbus_api::Requester` from around the code-base. This makes progress towards removing the DBus API entirely once all its consumers are converted to the libpldm instance ID APIs.
There was never a good reason for the code using the class to have knowledge that it was related to DBus anyway, so this is, in-effect, a double clean up improving separation of concerns.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I2d9397cae1b3c8c251c32e36ca520aad9c9b8cf6
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 ...
|
#
ca1998f3 |
| 06-Jun-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
update clang-format
This commit would update the repo's clang-format file to the latest of docs/style/cpp/clang-format file.
Following is the new change that is added: Brad : clang-format: cpp: r
update clang-format
This commit would update the repo's clang-format file to the latest of docs/style/cpp/clang-format file.
Following is the new change that is added: Brad : clang-format: cpp: remove empty lines
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ieaadd8a1cd779c9c12adf6d065cc1f9e9a8fa37b
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 ...
|