Revision tags: v0.11.0, v0.10.0, v0.9.1, v0.9.0 |
|
#
860a43d9 |
| 22-Aug-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
compiler: Provide LIBPLDM_CC_UNUSED
Ensure that we have __has_attribute available, and then further ensure that the unused attribute is provided. Once satisfied, define LIBPDLM_CC_UNUSED and replace
compiler: Provide LIBPLDM_CC_UNUSED
Ensure that we have __has_attribute available, and then further ensure that the unused attribute is provided. Once satisfied, define LIBPDLM_CC_UNUSED and replace raw use of __attribute__((unused)).
Change-Id: I2433039297d5fdedb8b8d99b30e73e4542d9069f Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
Revision tags: v0.8.0 |
|
#
efb40069 |
| 09-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: More fixes for header use
b0c1d20a5bde ("libpldm: Fix header use") only did half the job, addressing compilation concerns for the library itself. As it turns out there were still plenty of
libpldm: More fixes for header use
b0c1d20a5bde ("libpldm: Fix header use") only did half the job, addressing compilation concerns for the library itself. As it turns out there were still plenty of places that used local includes for paths to the public headers.
Apply the rest of the header cleanups to hopefully get us into a consistent state.
Fixes: b0c1d20a5bde ("libpldm: Fix header use") Change-Id: I8d4b59c9241770583abb30389452af0a32b18b99 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
d12dd36e |
| 09-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: Rationalise the local and installed path of pldm.h
Since chopping libpldm out of openbmc/pldm.git there's been a symlink from `include/libpldm/pldm.h` pointing to `include/libpldm/requester
libpldm: Rationalise the local and installed path of pldm.h
Since chopping libpldm out of openbmc/pldm.git there's been a symlink from `include/libpldm/pldm.h` pointing to `include/libpldm/requester/pldm.h`. The file list contained in the `libpldm_headers` variable defined by `include/libpldm/meson.build` contained an entry for `requester/pldm.h`, though not the symlink found at `include/libpldm/pldm.h`.
Prior to a7989cd65d51 ("meson: Fix for OEM header collision issue") `install_headers(libpldm_headers, ...)` directive didn't specify `preserve_path: true`, therefore the `requester/pldm.h` header file was installed directly under `${INCLUDEDIR}/libpldm` as `${INCLUDEDIR}/libpldm/pldm.h`, and no file was installed to `${INCLUDEDIR}/libpldm/requester/pldm.h`.
All dependent applications using the declarations in `pldm.h` therefore included the header using the directive `#include <libpldm/pldm.h>`. However, internal to the libpldm implementation we were using the non-symlinked path in the local tree: `#include "libpldm/requester/pldm.h"`
With a7989cd65d51 ("meson: Fix for OEM header collision issue") we rationalised the meson variables used to install the headers as part of properly separating OEM headers from one-another. This lead to specifying `preserve_path: true` for the `install_headers(libpldm_headers, ...)` meson directive, which further lead to the installed location of `pldm.h` changing to `${INCLUDEDIR}/libpldm/requester/pldm.h`. This broke all consuming applications which were necessarily using `#include <libpldm/pldm.h>` as outlined above.
Get rid of the symlink at `include/libpldm/pldm.h`, move `include/libpldm/requester/pldm.h` there instead, and fix up all internal references to the header. This unbreaks applications consuming libpldm, and prevents internal inconsistencies going forward.
Fixes: a7989cd65d51 ("meson: Fix for OEM header collision issue") Change-Id: I24f1e25303890c41fd3da6323c67d838022cc55d Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
691668fe |
| 01-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
license: add spdx identifier to all files
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ifddd07cc0eb5edeb2dcb410747073d68c6631cb1
|
#
1d0e2d4b |
| 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: Use pldm_msg_hdr_correlate_response() for response correlation
Previously the correlation logic was open-coded in pldm_transport_send_recv_msg(). Make use of pldm_msg_hdr_correlate_respon
transport: Use pldm_msg_hdr_correlate_response() for response correlation
Previously the correlation logic was open-coded in pldm_transport_send_recv_msg(). Make use of pldm_msg_hdr_correlate_response() internally as well, given logic is already exposed for users of the asynchronous pldm_transport_send_msg() and pldm_transport_recv_msg() APIs.
Change-Id: I332b8db0ff86e16bae6a7332f381ea0c439531a1 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
4c1ea56c |
| 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: Fix include of libpldm/base.h
This should be prefixed to make it clear that the include is not intended to be relative to `src/`. Headers under `src/` are internal-only.
Change-Id: I1b3a
transport: Fix include of libpldm/base.h
This should be prefixed to make it clear that the include is not intended to be relative to `src/`. Headers under `src/` are internal-only.
Change-Id: I1b3a1b9218003cde8c4b66956b3c7178156219fe Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
5038268c |
| 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: Establish remaining time prior to response correlation
This makes it a bit easier to handle resources with respect to correlation success or failure.
Change-Id: I0bc16aadcdc53cdcd361bce1
transport: Establish remaining time prior to response correlation
This makes it a bit easier to handle resources with respect to correlation success or failure.
Change-Id: I0bc16aadcdc53cdcd361bce1b2303ac63ff9e99a Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
1184f09a |
| 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: Use a direct return to reduce branching
Save ourselves from the mental gymnastics of the break statement.
Change-Id: Ib58717b7abe4416e2788d8ce3d03b6317c94ee39 Signed-off-by: Andrew Jeffe
transport: Use a direct return to reduce branching
Save ourselves from the mental gymnastics of the break statement.
Change-Id: Ib58717b7abe4416e2788d8ce3d03b6317c94ee39 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
486d85d2 |
| 30-Aug-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: Filter for the response to the issued request
mctp-demux-daemon broadcasts all messages delivered to the local endpoint to all connected UNIX domain sockets. The consequence is that e.g.
transport: Filter for the response to the issued request
mctp-demux-daemon broadcasts all messages delivered to the local endpoint to all connected UNIX domain sockets. The consequence is that e.g. the request message from pldmtool destined for pldmd on the BMC is reflected back to pldmtool.
For pldm_transport_send_recv_msg(), ensure that the message received after the request is sent is specifically a response to the the request, and not the request itself.
Additionally, enforce that the provided message to send is a request message, as that's the intent of the API.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib93a5bcfe5fdeae83d5853ec3c474f4ec3179c4a
show more ...
|
Revision tags: v0.7.0 |
|
#
0a6d6821 |
| 22-Aug-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: Stabilise core transport and implementation APIs
The following two patches demonstrate their use in pldmd:
1. https://gerrit.openbmc.org/c/openbmc/pldm/+/63652 2. https://gerrit.openbmc.
transport: Stabilise core transport and implementation APIs
The following two patches demonstrate their use in pldmd:
1. https://gerrit.openbmc.org/c/openbmc/pldm/+/63652 2. https://gerrit.openbmc.org/c/openbmc/pldm/+/65676
In the process, deprecate the old requester APIs. These are unsuitable for OpenBMC going forward, which will rely on AF_MCTP sockets for the MCTP transport implementation.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I94a9d9ff5fc67d5d6cf9a2393ebef12fa7b277d7
show more ...
|
#
16cd5232 |
| 22-Aug-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
transport: Match specified metadata in pldm_transport_send_recv_msg()
The mctp-demux broadcasts the PLDM RX response messages to all of mctp socket instances. That means the GetSensorReading respons
transport: Match specified metadata in pldm_transport_send_recv_msg()
The mctp-demux broadcasts the PLDM RX response messages to all of mctp socket instances. That means the GetSensorReading response from one instance (pldmd) can be received by the other instance (pldmtool) which is waiting for the response of GetPDR request message. When the gap time between the two requests of pldmtool is long enough the number of GetSensorReading response messages can be more than 32. That means the instance ID of new GetPDR command in pldmtool can equal with the used and free one in GetSensorReading. So the `pldm_transport_send_recv_msg()` will match the response of GetSensorReading with the response of GetPDR. So only comparing the instance ID in `pldm_transport_send_recv_msg` is not enough.
Section "Requirements for requesters" in DSP0240 version 1.1.0, "A PLDM terminus that issues PLDM requests should be prepared to handle the order of responses that may not match the order in which the requests were sent (that is, it should not automatically assume that a response that it receives is in the order in which the request was sent). It should check to see that the PLDM Type, PLDM Command Code, and Instance ID values in the response match up with a corresponding outstanding command before acting on any parameters returned in the response."
Add the PLDM type and command code on matching the response of `pldm_transport_send_recv_msg()`.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I7284bd4ecd8be3786fa078af1eb3f06046e4baa3
show more ...
|
Revision tags: v0.6.0, v0.5.0 |
|
#
24576290 |
| 30-Jul-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
transport: Generalise the pldm_transport_recv_msg() API
Currently pldm_transport_recv_msg() only works for requesters as the TID param is an input. Responders need the source TID of the message rece
transport: Generalise the pldm_transport_recv_msg() API
Currently pldm_transport_recv_msg() only works for requesters as the TID param is an input. Responders need the source TID of the message received so they know where to send the response.
The TID was being used to look up the EID mapped to the TID and failing the function call if it didn't match. This check doesn't need to happen at this level, and can be added in at the requester API level if required.
Make the TID param an output, and use the EID of the message to lookup the TID.
Change-Id: I671dbfe2d94a9ad8d77ea0ef150f1c744f928c53 Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
show more ...
|
#
f1ebde49 |
| 30-Jul-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
transport: Fix doxygen and variables for send and recv functions
This was missed updated properly when making the transport functions work for both requesters and responders.
Fixes: c1b66f420912 ("
transport: Fix doxygen and variables for send and recv functions
This was missed updated properly when making the transport functions work for both requesters and responders.
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports") Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> Change-Id: Ie32f11a98ab1b11caaafbca5e837e1eda5c9cc37
show more ...
|
#
f56e4dcd |
| 23-Jul-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
transport: free un-wanted responses in pldm_transport_send_recv_msg()
mctp-demux broadcasts the PLDM response messages to all of mctp socket instances. That means the GetSensorReading response from
transport: free un-wanted responses in pldm_transport_send_recv_msg()
mctp-demux broadcasts the PLDM response messages to all of mctp socket instances. That means the GetSensorReading response from one instance (pldmd) can be received by the other instance (pldmtool) which is waiting for the response of GetPDR request message. When the gap time between the two requests of pldmtool is long enough the number of GetSensorReading response messages can be more than 32. That means the instance ID of new GetPDR command in pldmtool can equal with the used and free one in GetSensorReading. The `pldm_transport_send_recv_msg()` will detect the reponse of GetSensorReading as the response of the GetPDR request.
To prevent this unexpected behavior the `pldm_transport_send_recv_msg()` should free the un-wanted responses before sending new PLDM request. The serialised message to be sent must already encode an allocated instance ID, which by the specification must not be reused before expiry. Therefore after the socket is drained, any subsequent response containing the request's instance ID must be the response matching the request.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> [AJ: Add a test, massage the commit message] Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I6c684bdaea2ba5d96b24ecd3c72e846c644fb16d
show more ...
|
#
ef485068 |
| 14-Jul-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
transport: Correct comparison in while loop condition
With the latest libpldm code version 0.4, sometimes the calling `pldmtool platform GetPDR` command while polling the sensors will be ended with
transport: Correct comparison in while loop condition
With the latest libpldm code version 0.4, sometimes the calling `pldmtool platform GetPDR` command while polling the sensors will be ended with the error `Failed to receive RC = 8`. This error code is printed when the `pldm_transport_send_recv_msg()` responses PLDM_REQUESTER_RECV_FAIL when it exits the while loop. The while loop will continue while the now time is still not later than the end time. The comparison should be corrected.
Tested: 1. Call "pldmtool platform GetPDR" while reading the sensors. 2. No "Failed to receive RC = 8". 3. Added a test case and verified we see multiple invocations of poll:
``` 22:49:31.807615 timerfd_create(CLOCK_MONOTONIC, 0) = 3 22:49:31.807774 timerfd_settime(3, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 22:49:31.807893 timerfd_settime(3, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=1, tv_nsec=0}}, NULL) = 0 22:49:31.808009 ppoll([{fd=3, events=POLLIN}], 1, {tv_sec=4, tv_nsec=800000000}, NULL, 0) = 1 ([{fd=3, revents=POLLIN}], left {tv_sec=3, tv_nsec=799317702}) 22:49:32.809245 timerfd_settime(3, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0 22:49:32.810336 timerfd_settime(3, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=4, tv_nsec=0}}, NULL) = 0 22:49:32.810899 ppoll([{fd=3, events=POLLIN}], 1, {tv_sec=3, tv_nsec=798000000}, NULL, 0) = 0 (Timeout) 22:49:36.614235 close(3) = 0 ```
Fixes: abaf61f45e2a ("transport: Prevent sticking in waiting for response") Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> [AJ: Add unit test] Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: If1829a35d755d68fd6a18d8e6ad54d1648ccc4ce
show more ...
|
Revision tags: v0.4.0 |
|
#
3380a6c6 |
| 11-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: pldm_transport_poll(): Adjust return value semantics
Prior, a timeout in pldm_transport_poll() would result in a pldm_transport_recv() call being issued in pldm_transport_send_recv(). Tha
transport: pldm_transport_poll(): Adjust return value semantics
Prior, a timeout in pldm_transport_poll() would result in a pldm_transport_recv() call being issued in pldm_transport_send_recv(). That's not the right course of action as it will translate to a blocking recv() system call for either of the current transport implementations. As there's no data present the recv() blocks indefinitely, violating the timeout constraint.
Instead, align the behaviour with POSIX poll(2)[1], which returns the number of active descriptors. The number of active descriptors is 0 if a timeout occurs.
[1]: https://www.man7.org/linux/man-pages/man2/poll.2.html#RETURN_VALUE
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id75e8dad49a0ea6081830d0825896094bff0e827
show more ...
|
#
98085faf |
| 18-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: pldm_transport_poll(): Handle errors from ->init_pollfd()
A failure of the callback may cause a subsequent failure of poll() and we spin in a tight loop.
Signed-off-by: Andrew Jeffery <a
transport: pldm_transport_poll(): Handle errors from ->init_pollfd()
A failure of the callback may cause a subsequent failure of poll() and we spin in a tight loop.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I4560db91ecb26a7f4618a209e14a33de2dee9976
show more ...
|
Revision tags: v0.3.0 |
|
#
f89befe3 |
| 15-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
meson: Force inclusion of config.h via `-include`
Make sure there's no ambiguity about which config.h is used for includes in the event that libpldm acquires subprojects, or is used as a subproject
meson: Force inclusion of config.h via `-include`
Make sure there's no ambiguity about which config.h is used for includes in the event that libpldm acquires subprojects, or is used as a subproject itself.
Tested: `meson compile -C build` succeeds
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I08c3bdc807cc268d2401e06f0bfaee07f89ba534
show more ...
|
#
0411b712 |
| 30-May-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
transport: Make APIs work for all types of messages
These transport APIs were written with the idea of being used by a requester. However they don't need to be, so remove these checks so we can send
transport: Make APIs work for all types of messages
These transport APIs were written with the idea of being used by a requester. However they don't need to be, so remove these checks so we can send and receive both requests and responses.
Put the checks into the old API calls so we don't break anyone.
Change-Id: I194e22341025a00388fa7e031d2c6db05976874f Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
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 ...
|
#
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 ...
|
Revision tags: v0.2.0 |
|
#
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 ...
|
#
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 ...
|
#
c1b66f42 |
| 08-Dec-2022 |
Rashmica Gupta <rashmica@linux.ibm.com> |
requester: Add new APIs to support multiple transports
This patch has two goals: (1) enable consumers to send PLDM messages over different transports and (2) do this in a way that allows us to move
requester: Add new APIs to support multiple transports
This patch has two goals: (1) enable consumers to send PLDM messages over different transports and (2) do this in a way that allows us to move towards a cleaner and more complete set of requester APIs.
The sole transport option of MCTP via the userspace mctp-demux-daemon is being deprecated. New transports are being added: MCTP via the kernel (AF_MCTP) and eventually NC-SI. As such, the requester APIs need updating to support multiple transports, as well as not having MCTP specific details in the APIs. To avoid a flag day, the current APIs (pldm_send, etc) have been rewritten terms of the new APIs.
The current APIs operate at the transport level - they don't implement all of the behaviour necessary for a requester. As such, the new APIs to send/recv a message have the prefix `pldm_transport`, rather than `pldm_requester`. Given the level that these APIs are operating at, these only send and receive a PLDM message. Any additional logic, such as looking for a response with a particular instance ID, belongs at the requester abstraction level.
Some of the missing behaviours to fully be a PLDM requester are: assigning instance IDs, request retransmission, implementing timeouts, and enforcing only one PLDM request to a specific TID at a time. These things are currently implemented in pldmd, meaning any consumer other than pldmd using the libpldm "requester" APIs doesn't get the full functionality of a requester and has to implement these things themselves.
We would like to eventually move these behaviours into libpldm so the libpldm requester APIs actually implement what is required to be a PLDM requester.
The next steps to add in a full set of requester APIs, while enabling the use of multiple transports looks something like this:
1) add instance id APIs into libpldm. 2) convert pldmd to use libpldm instance id APIs - so all users of PLDM are still using the same instance id allocation method. 3) convert all consumers of libpldm over to using the new libpldm APIs, including the instance id functions. 4) add in the AF_MCTP transport and move consumers over to it. 5) refactor the encode/decode functions to only encode/decode and not frame the message (ie, remove the instance id from these functions) 6) add additional requester functionality into libpldm, and have these use the `pldm_transport` APIs directly. 7) move consumers over to the new `pldm_requester` APIs. 8) remove unused code from pldmd.
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> Change-Id: I06e602831f360bbd0efda53d410bfb5080b3100d
show more ...
|