commit | 26c8eb2a2f22eaa237b5997dc9ccb354bd425161 | [log] [tgz] |
---|---|---|
author | Chau Ly <chaul@amperecomputing.com> | Wed Jul 30 06:56:33 2025 +0000 |
committer | Chau Ly <chaul@amperecomputing.com> | Fri Aug 15 05:15:48 2025 +0000 |
tree | 6603cf88f46c60fce7ee3c6dd20f0617bf4f670f | |
parent | 530d1a3a8c83803c42e3f55e9e99ee24074dc3df [diff] |
Stabilize PLDM File Transfer related APIs Thit commit stabilizes PLDM File Transfer API. The APIs include: - decode_pldm_platform_file_descriptor_pdr() - encode_pldm_base_multipart_receive_req() - decode_pldm_base_multipart_receive_resp() - encode_pldm_base_negotiate_transfer_params_req() - decode_pldm_base_negotiate_transfer_params_resp() - encode_pldm_file_df_open_req() - decode_pldm_file_df_open_resp() - encode_pldm_file_df_close_req() - decode_pldm_file_df_close_resp() - encode_pldm_file_df_heartbeat_req() - decode_pldm_file_df_heartbeat_resp() Use of decode_pldm_platform_file_descriptor_pdr() is demonstrated in [1], and the remainder in [2]. Therefore, the gcc.dump file is regenerated accordingly. [1]: https://gerrit.openbmc.org/c/openbmc/pldm/+/82342 [2]: https://gerrit.openbmc.org/c/openbmc/pldm/+/82471 Change-Id: I6f60845b459c6fd0371925468927f8ff15ec4033 Signed-off-by: Chau Ly <chaul@amperecomputing.com>
This is a library which deals with the encoding and decoding of PLDM messages. It should be possible to use this library by projects other than OpenBMC, and hence certain constraints apply to it:
Source files are named according to the PLDM Type, for eg base.[h/c], fru.[h/c], etc.
Given a PLDM command "foo", the library will provide the following API: For the Requester function:
encode_foo_req() - encode a foo request decode_foo_resp() - decode a response to foo
For the Responder function:
decode_foo_req() - decode a foo request encode_foo_resp() - encode a response to foo
The library also provides API to pack and unpack PLDM headers.
libpldm
is configured and built using meson
. Python's pip
or pipx
can be used to install a recent version on your machine:
pipx install meson
Once meson
is installed:
meson setup build && meson compile -C build
meson test -C build
libpldm
Components of the library ABI[^1] (loosely, functions) are separated into three categories:
[^1]: "library API + compiler ABI = library ABI"
Applications depending on libpldm
should aim to only use functions from the stable category. However, this may not always be possible. What to do when required functions fall into the deprecated or testing categories is discussed in CONTRIBUTING.
libpldm is maintained with the expectation that users move between successive releases when upgrading. This constraint allows the library to reintroduce types and functions of the same name in subsequent releases in the knowledge that there are no remaining users of previous definitions. While strategies are employed to avoid breaking existing APIs unnecessarily, the library is still to reach maturity, and we must allow for improvements to be made in the design.