059fc892 | 15-Apr-2025 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Avoid freeing instance IDs acquired by other apps
With all applications now utilizing the transport APIs built on top of libpldm, instance ID allocation and management are consistently handled throu
Avoid freeing instance IDs acquired by other apps
With all applications now utilizing the transport APIs built on top of libpldm, instance ID allocation and management are consistently handled through a shared mechanism. These updated APIs also allow applications to explicitly free their own instance IDs once they're done using them.
As a result, pldmd no longer needs to free instance IDs on behalf of other applications. Furthermore, when pldmd is operating over AF_MCTP, it cannot observe or intercept PLDM traffic initiated by other applications. In such cases, any attempt by pldmd to manage instance IDs for external requests becomes redundant and effectively dead code.
Change-Id: I5226cc4fa24030583ddbd000ff944a16c5b2e7a6 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
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 ...
|
5ea72377 | 04-Feb-2025 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
tests: Migrate to placement_new from reinterpret casting
reinterpret_cast is prohibited by the C++ core guidelines because it takes the behavior outside the language definition and gives problems wi
tests: Migrate to placement_new from reinterpret casting
reinterpret_cast is prohibited by the C++ core guidelines because it takes the behavior outside the language definition and gives problems with type safety. Placement-new on the other-hand allows to control the object storage while still properly instantiating an object,keeping the behavior inside the C++ language specification.
Change-Id: Ifab9ea58b932db11d7af0b9def119bed1bfdc44d Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
38e12aa2 | 21-Jan-2025 |
Thu Nguyen <thu@os.amperecomputing.com> |
Support `terminus_name` option in `dbus_to_terminus_effecter`
Support `terminus_name` configuration option in `dbus_to_terminus_effecter` to allow setting the destination terminus beside `mctp_eid`.
Support `terminus_name` option in `dbus_to_terminus_effecter`
Support `terminus_name` configuration option in `dbus_to_terminus_effecter` to allow setting the destination terminus beside `mctp_eid`. This is helpful when the mctp endpoint Eid is not static.
Change-Id: I8b1ed15741807086254146017c99c13ae667dac1 Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|
75e00422 | 19-Mar-2024 |
Chau Ly <chaul@amperecomputing.com> |
platform-mc: Handle `Connectivity` propertiesChanged signal
From Mctp codeConstruct version 2.0 [1], mctpd supports `.Connectivity` property under `au.com.CodeConstruct.MCTP.Endpoint` interface of t
platform-mc: Handle `Connectivity` propertiesChanged signal
From Mctp codeConstruct version 2.0 [1], mctpd supports `.Connectivity` property under `au.com.CodeConstruct.MCTP.Endpoint` interface of the endpoint. This commit handles the propertiesChanged signal from this interface, and updates the Availability of the MCTP Endpoint accordingly in the source to enable or disable message sending/receiving via that endpoint of the terminus.
[1] https://github.com/CodeConstruct/mctp/blob/v2.0/docs/endpoint-recovery.md#proposed-design
When the discovery process first starts, it will only handle the endpoints that have `Available` `.Connectivity`. It lets the propertiesChanged signal trigger the adding of the endpoints when they are back to` Available`.
On interfaceAdded signal, it assumes that mctpd only publishes available endpoints to D-Bus, so it adds the endpoints to the terminus anyway.
Tested: 1. Enable `unsafe-writable-connectivity` option in PACKAGECONFIG of mctp recipe. 2. After PLDM discovers all the endpoints, write `Degraded` to `.Connectivity` of one of the endpoint. 3. Write it back to `Available` to see how message is stopped from being sent/received via the endpoint.
Signed-off-by: Chau Ly <chaul@amperecomputing.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I5b7a38ae72e655b60d71396a1118f2809aaa3838
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 ...
|
ef16cdec | 09-Jul-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
Update MCTP D-Bus interface sources
The MCTP D-Bus interface sources are changed as [1] https://codeconstruct.com.au/docs/mctp-utils-v2-0-release/ The `pldmd` should be updated to follow that change
Update MCTP D-Bus interface sources
The MCTP D-Bus interface sources are changed as [1] https://codeconstruct.com.au/docs/mctp-utils-v2-0-release/ The `pldmd` should be updated to follow that change.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I5bdc8b82f7b8341a06d0a78ca790092b5488ecc9
show more ...
|
9027497f | 17-Jul-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
mctp-discovery: Get endpoint UUID from D-Bus
Getting the MCTP endpoint UUID from `UUID` D-Bus property in `xyz.openbmc_project.Common.UUID` D-Bus interface of MCTP Endpoint object. Update the endpoi
mctp-discovery: Get endpoint UUID from D-Bus
Getting the MCTP endpoint UUID from `UUID` D-Bus property in `xyz.openbmc_project.Common.UUID` D-Bus interface of MCTP Endpoint object. Update the endpoint MCTPInfo with that UUID.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I35e83eac11fafafdad57cdc0285b344650caefbd
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 ...
|
3012b632 | 22-Aug-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Format meson files with meson.format
Meson 1.5.0 introduced a new feature to format all the meson files. Formatting all the meson files is now as simple as running `meson format -i -r` command in th
Format meson files with meson.format
Meson 1.5.0 introduced a new feature to format all the meson files. Formatting all the meson files is now as simple as running `meson format -i -r` command in the repository root folder.
more details : https://mesonbuild.com/Commands.html#format
Change-Id: I9c5468cc502ae78b7a055e2de2a10296930cb9ec Signed-off-by: Manojkiran Eda <manojkiran.eda@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 ...
|
61be7347 | 30-Jul-2024 |
Patrick Williams <patrick@stwcx.xyz> |
stdexec: pass scheduler to default_task_context
The latest version of stdexec[1] does not allow a default constructed `default_task_context` but requires a scheduler to be passed in. The previous d
stdexec: pass scheduler to default_task_context
The latest version of stdexec[1] does not allow a default constructed `default_task_context` but requires a scheduler to be passed in. The previous default was to use an `inline_scheduler` so explicitly pass that in.
[1]: https://github.com/openbmc/sdbusplus/commit/5cee91570368554a7fcbbd9418f65efda449fa70
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib210b42ba5272e0176cd4423b156ca6372115a55
show more ...
|
c14fb4bd | 25-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
pldm: Drop pessimizing moves
Fixes issues such as:
``` ../host-bmc/host_pdr_handler.cpp:684:9: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] 684 | st
pldm: Drop pessimizing moves
Fixes issues such as:
``` ../host-bmc/host_pdr_handler.cpp:684:9: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] 684 | std::move(std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION)), | ^ ../host-bmc/host_pdr_handler.cpp:684:9: note: remove std::move call here 684 | std::move(std::vector<uint8_t>(1, PLDM_PDR_ENTITY_ASSOCIATION)), | ^~~~~~~~~~ ~ ```
Change-Id: Id26f0d6fc21837e1eb76ae3c294c222782a4e69f Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
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 ...
|
e3596384 | 21-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
fix markdownlint issues reported in CI
There are a lot of warnings reported by markdownlint in the CI, this commit aims at fixing all of them.
Tested :
No more warnings reported by markdownlint in
fix markdownlint issues reported in CI
There are a lot of warnings reported by markdownlint in the CI, this commit aims at fixing all of them.
Tested :
No more warnings reported by markdownlint in the CI.
Change-Id: I92d24bc0efd230dd0974ff49853ef928caf1febd Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
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 ...
|
ba741d5f | 08-May-2024 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Change-Id: Ib77ec68be0c5ffd73a8dcc140e22f011191c9de5 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
44524a5f | 14-Feb-2022 |
Gilbert Chen <gilbert.chen@arm.com> |
requester: Modified MctpDiscovery class
Modified MctpDiscovery class to take list of managers instead of single fwManager. The change is for adding platform-mc manager. Added loadStaticEndpoints API
requester: Modified MctpDiscovery class
Modified MctpDiscovery class to take list of managers instead of single fwManager. The change is for adding platform-mc manager. Added loadStaticEndpoints API for MCTP layer which doesn't implement /xyz/openbmc_project/MCTP/Endpoint.Interface
The patch is part of implementation of design document below. https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/47252
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I1e1673504583a87f2a9bc3adf76fb49c2dc30254
show more ...
|
93f1e00f | 11-Jul-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
Replace sizeof() with .size()
This change replaces the usage of sizeof() with .size() to calculate size of arrays and expressions of STL container types. Using .size() with containers like std::vect
Replace sizeof() with .size()
This change replaces the usage of sizeof() with .size() to calculate size of arrays and expressions of STL container types. Using .size() with containers like std::vector, std::array, and std::string improves code readability and adheres to modern C++ standards. This also helps in clang-tidy checks.
Change-Id: I1e9e6e453a3b9218682098887763a4908f186815 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
ace4e14d | 24-Apr-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Deprecate the support for x86 sdk
OpenBMC as a project has moved away from using yocto x86 sdks for unit testing. Instead now the preferred way to build and test code is by two ways:
1. Leveraging
Deprecate the support for x86 sdk
OpenBMC as a project has moved away from using yocto x86 sdks for unit testing. Instead now the preferred way to build and test code is by two ways:
1. Leveraging the meson subproject support 2. Using openbmc docker container
Since x86 sdks needed some weird hacks in the code base like figuring out the linker arguments ourselves & running custom bash commands from the meson build files. Also with changing yocto code base, its a large maintainer burden to make sure this support works.
Tested: Code builds & unit tests are passed with both the approaches mentioned above.
Change-Id: Iaf55e2c003ffd9ee1a295de5bdfd14d81222e94b Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
754041d0 | 20-Feb-2024 |
Riya Dixit <riyadixitagra@gmail.com> |
utils: Retrieval of managed objects of DBUS
This commit implements functionality to retrieve the managed object of a specific DBUS service on a particular path. Additionally implements a function t
utils: Retrieval of managed objects of DBUS
This commit implements functionality to retrieve the managed object of a specific DBUS service on a particular path. Additionally implements a function template for inventory objects which efficiently enables retrieval of managed object for Inventory Manager.
Tested: Added unit test cases for checking the return value.
Change-Id: Ide652f843db1623bdacebf3e269e03895bbb7f1a Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
show more ...
|
58cbcaf2 | 06-Oct-2023 |
Kamalkumar Patel <kamalkumar.patel@ibm.com> |
PLDM:Catching exception precisely and printing it
Correcting catch block in PLDM repo to print all exception precisely so pldm trace can be more useful to identify defect easily.
Change-Id: If2e86d
PLDM:Catching exception precisely and printing it
Correcting catch block in PLDM repo to print all exception precisely so pldm trace can be more useful to identify defect easily.
Change-Id: If2e86dcb031ddc2e927e7836d7f4359f5b44cdec Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
show more ...
|