8de8e1ec | 09-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
meson: Reduce strength of oem-ibm requirements from enabled to allowed
If it's not expressly disabled, do what's necessary to build the oem-ibm pieces of the code-base. Capture the newly-enabled API
meson: Reduce strength of oem-ibm requirements from enabled to allowed
If it's not expressly disabled, do what's necessary to build the oem-ibm pieces of the code-base. Capture the newly-enabled APIs in the ABI dumps.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I50168309432620e03f00a4620b6bfc38f2e575c8
show more ...
|
9d2a1c6a | 04-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Explicit deprecated, stable and testing ABI classes
Experimenting with new APIs is important, but ABI stability of the library is also important. We wish to have the freedom to add APIs wit
libpldm: Explicit deprecated, stable and testing ABI classes
Experimenting with new APIs is important, but ABI stability of the library is also important. We wish to have the freedom to add APIs without being burdened by them being immediately set in stone.
We implement this wish by introducing three classes of ABI:
1. deprecated 2. stable 3. testing
These are enforced by corresponding function attributes:
1. LIBPLDM_ABI_DEPRECATED 2. LIBPLDM_ABI_STABLE 3. LIBPLDM_ABI_TESTING
Symbol visibility in the library is flipped to 'hidden' by default, so one of these annotations must be used for the symbol to be exposed.
With these classes in place there are now clear points in time at which we update the ABI dumps captured under the abi/ directory: When an API is migrated from the 'testing' class to the 'stable' class, or when removed from the 'deprecated' class.
Which classes of functions are exposed by the build is controlled by the new 'abi' meson option. The option is of array type which contains the list of ABI classes the build should consider. It defaults to enabling all classes to provide test coverage in CI. The classes used should be constrained to deprecated and stable (and not test) in any dependent projects.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I25402e20c7be9c9f264f9ccd7ac36b384823734c
show more ...
|
55e5e0a0 | 04-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Remove the requester-api option
Let's not have more opportunities to mangle the ABI than we need. This option was never explicitly set one way or the other in the OpenBMC Github organisatio
libpldm: Remove the requester-api option
Let's not have more opportunities to mangle the ABI than we need. This option was never explicitly set one way or the other in the OpenBMC Github organisation. Remove it, and always expose the associated symbols.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I2d73c85ee1fe3c9b2f851bb63065111d68c57821
show more ...
|
b01fb1cc | 27-May-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
transport: Match on response in pldm_transport_send_recv_msg()
pldm_send_recv() does not verify the corrected match of a PLDM response message with the request message by comparing the Instance ID a
transport: Match on response in pldm_transport_send_recv_msg()
pldm_send_recv() does not verify the corrected match of a PLDM response message with the request message by comparing the Instance ID as pldm_recv(). This will cause the PLDM command of the pldmtool receives the response message of the other PLDM command from other services. The pldm_transport_send_recv_msg() which is called by pldm_send_recv() method should check the Instance ID of the response to verify the match.
Tested:
1. Run pldmtool while pldmd service continuously polls multiple pldm sensors. 2. The pldmtool should not be failed with PLDM_ERROR_INVALID_LENGTH error.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I491db086cf2a0dff1981f2959d1dab936d46d2db
show more ...
|
a8532b54 | 04-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: mctp-demux: Refactor buffer handling in recv callback
Assigning to *pldm_resp_msg added to the cleanup required prior to returning. Instead, only assign to *pldm_resp_msg once it's no-lon
transport: mctp-demux: Refactor buffer handling in recv callback
Assigning to *pldm_resp_msg added to the cleanup required prior to returning. Instead, only assign to *pldm_resp_msg once it's no-longer possible to fail.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I584b2307f71acde4c3da38336fb70c975e22a4d8
show more ...
|
abaf61f4 | 15-Nov-2022 |
Dung Cao <dung@os.amperecomputing.com> |
transport: Prevent sticking in waiting for response
When the connection has an issue, one request may not receive the response. The pldm_transport_send_recv_msg should not be stuck in while loop to
transport: Prevent sticking in waiting for response
When the connection has an issue, one request may not receive the response. The pldm_transport_send_recv_msg should not be stuck in while loop to wait for the response. As the section "Requirements for requesters" in DSP0240 PLDM Base specs, the maximum value of "Time-out waiting for a response" PT2max is 4800ms. This commit uses that time out to prevent pldm_transport_send_recv_msg from forever waiting for the response.
Signed-off-by: Dung Cao <dung@os.amperecomputing.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I70b62b1ff30a8a715716db43867b479a5b214dfa
show more ...
|
7c250340 | 16-Nov-2022 |
Dung Cao <dung@os.amperecomputing.com> |
Add encode/decode pldmMessagePollEvent data
The API decodes/encodes eventData fields for pldmMessagePollEvent type (section 16.15) of PlatformEventMessage command(0xA) which is defined in DSP0248 Ve
Add encode/decode pldmMessagePollEvent data
The API decodes/encodes eventData fields for pldmMessagePollEvent type (section 16.15) of PlatformEventMessage command(0xA) which is defined in DSP0248 Version 1.2.2.
Signed-off-by: Dung Cao <dung@os.amperecomputing.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I1934792f0ce8f339ee04c4bae0c65e3973ed38b4
show more ...
|
39f88325 | 12-May-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
requester: Make pldm_open() return existing fd
Considering how this is used, it makes more sense to return the fd of the open transport rather than error out.
Fixes: c1b66f420912 ("requester: Add n
requester: Make pldm_open() return existing fd
Considering how this is used, it makes more sense to return the fd of the open transport rather than error out.
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports") Change-Id: Ibff526a013d0f4000217d8b0b1004ff51814d820 Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
show more ...
|
37dd6a3d | 12-May-2023 |
Andrew Jeffery <andrew@aj.id.au> |
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[1] and reformat the repository.
[1] https://gerrit.openbmc.org/c/openbmc/docs/+/63441
Further, shift the fixup for C's `_Static_assert` into src/msgbuf.h to prevent a clang-tidy-16 error:
``` /data0/jenkins/workspace/ci-repository/openbmc/libpldm/src/msgbuf.h:315:2: error: '_Static_assert' is a C11 extension [clang-diagnostic-c11-extensions,-warnings-as-errors] _Static_assert(sizeof(*dst) == sizeof(ldst), ^ ```
And fix up the function prototype in the definition of `pldm_open()`:
``` ../src/requester/pldm.c:128:16: error: a function declaration without a prototype is deprecated in all versions of C [clang-diagnostic-strict-prototypes,-warnings-as-errors] void pldm_close() ^ void ```
Change-Id: I57b53f51914e39237e733d024e62ab41b3d306c1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
8eb20f28 | 16-Nov-2022 |
Thu Nguyen <thu@os.amperecomputing.com> |
responder: Add PollForPlatformEventMessage APIs
Added APIs to encode/decode PollForPlatformEventMessage command(0x0B) which is defined in DSP0248 Version 1.2.2 sec:16.7.
Signed-off-by: Dung Cao <du
responder: Add PollForPlatformEventMessage APIs
Added APIs to encode/decode PollForPlatformEventMessage command(0x0B) which is defined in DSP0248 Version 1.2.2 sec:16.7.
Signed-off-by: Dung Cao <dung@os.amperecomputing.com> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Ic4a91625c9e30b49a9a3ea99755dffff2c667ca8
show more ...
|
159a98ba | 01-Nov-2022 |
Thu Nguyen <thu@os.amperecomputing.com> |
requester: Add PollForPlatformEventMessage APIs
Added encode/decode APIs for PollForPlatformEventMessage command(0x0B) which is defined in DSP0248 Version 1.2.1 sec:16.7.
Signed-off-by: Thu Nguyen
requester: Add PollForPlatformEventMessage APIs
Added encode/decode APIs for PollForPlatformEventMessage command(0x0B) which is defined in DSP0248 Version 1.2.1 sec:16.7.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Dung Cao <dung@os.amperecomputing.com> Change-Id: I0a707256d0ff6133d48a384dc252bce736b802f7
show more ...
|
062c8762 | 22-Apr-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
msgbuf: Add insert and span APIs
pldm_msgbuf_insert() is generic APIs to insert data to a pointer. It automatically calls the correct insertor API for the type of the packing data. pldm_msgbuf_span_
msgbuf: Add insert and span APIs
pldm_msgbuf_insert() is generic APIs to insert data to a pointer. It automatically calls the correct insertor API for the type of the packing data. pldm_msgbuf_span_required() spans the input number of bytes from buffer to the input double pointer. pldm_msgbuf_span_remaining() extracts the remaining number of bytes from buffer to the input double pointer.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Ide7dbf735f69a8288e6f39a0b7b5c33aad38a98e
show more ...
|
a6f0cf3e | 23-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
instance-id: Ensure database is appropriately sized
Fail initialisation if we know that we may fail to satisfy valid allocations.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iff38b27
instance-id: Ensure database is appropriately sized
Fail initialisation if we know that we may fail to satisfy valid allocations.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iff38b27fd324da57a1d81b6ad3c5951e369ce3b3
show more ...
|
0aea707b | 23-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
instance-id: Track existing allocations for each db instance
OFD locking allows merging and splitting of locks, which means that it won't fail an attempt to "recursively" lock the range. We were rel
instance-id: Track existing allocations for each db instance
OFD locking allows merging and splitting of locks, which means that it won't fail an attempt to "recursively" lock the range. We were relying on that to prevent double allocation when the available instance IDs for a TID were exhausted.
Given that we can't rely on it, explicitly track the allocations in the local state.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic0f6903935ac712a86a7967d1cceb5a0c463878b
show more ...
|
a918a628 | 21-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
include: Move instance-id.h under libpldm/
The installed location for the header is `${includedir}/libpldm/instance-id.h`. Make the in-tree location equivalent so we don't have a slightly jarring in
include: Move instance-id.h under libpldm/
The installed location for the header is `${includedir}/libpldm/instance-id.h`. Make the in-tree location equivalent so we don't have a slightly jarring inconsistency.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I9c1f324e18ba504261845187e88e35db0d8ef873
show more ...
|
9667f582 | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_set_event_receiver_req()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iacf3b2f8708c781da85567a1f13c5a9cfbc34261 |
42dd4e59 | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_set_event_receiver_resp()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I454ce8169544a0d67e1fd9471eca9f08b2162424 |
2d1d1bdf | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_get_sensor_reading_req()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I233b990cd31f55de665d6dc21815dc5a51a7a369 |
840b140a | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_get_sensor_reading_resp()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib059858cdec0e02acccffe93c50629d610aa5ada |
61cab6f7 | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_pldm_pdr_repository_change_record_data()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iba39d421fde5bfd081d0c822a384907871c9aece |
2fe70122 | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_pldm_pdr_repository_chg_event_data()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I56f5ebe875a361a778fcce32df5b8bdc79f2d4bf |
99c03f39 | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_get_numeric_effecter_value_req()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic2a0a452b6a8b3a115d5221c772f0e3b6857d2eb |
dd26582b | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_get_numeric_effecter_value_req()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I70fbd51d31efe72e61159b9db98163b8ef9ab143 |
155317e5 | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_numeric_sensor_data()
In the process, remove a test for short buffer handling as this triggers an assert in pldm_msgbuf.
Signed-off-by: Andrew Jeffery <andrew@aj.id
platform: pldm_msgbuf for decode_numeric_sensor_data()
In the process, remove a test for short buffer handling as this triggers an assert in pldm_msgbuf.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I66c510568934e5cdd8b1aeb9ab5d2e65a196f93c
show more ...
|
422790b6 | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_state_sensor_data()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ia06cc552c2942ae200922a25e91b280e715f0729 |