/openbmc/libpldm/src/oem/meta/ |
H A D | file_io.c | c8df31c1 Tue May 21 02:17:43 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Add error code personalities
libpldm is in a bit of a transitional period with respect to returned error codes. A historical choice was to return PLDM completion codes from the library API to indicate errors. This is unfortunate because we're now constrained to errors that are specified by the PLDM protocol, which is much less expressive than the set of errors that might be produced by a run-time environment for the library.
The choice going forward is to return C's errno codes. However at this point we step on another rake in the libpldm design, which is that some internal data structures are very much the wire format of corresponding PLDM messages (such as the PDR repository implementation). Working with wire-format buffers is most safely done via the msgbuf APIs, however we then hit the conflict of different error code styles in various parts of the API surface.
Do a bit of surgery to provide different error code personalities for msgbuf, such that the caller can pick the style of error code they need it to return to maintain consistency.
Note that like the previous patch marking all msgbuf APIs as __attribute__((always_inline)), the rework here makes another small impact on the argument register allocation of several stable APIs. The ABI dump is updated accordingly.
Change-Id: Id59c39c5c822f514f546dab88575317071a97c96 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|
/openbmc/libpldm/tests/ |
H A D | msgbuf_generic.c | c8df31c1 Tue May 21 02:17:43 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Add error code personalities
libpldm is in a bit of a transitional period with respect to returned error codes. A historical choice was to return PLDM completion codes from the library API to indicate errors. This is unfortunate because we're now constrained to errors that are specified by the PLDM protocol, which is much less expressive than the set of errors that might be produced by a run-time environment for the library.
The choice going forward is to return C's errno codes. However at this point we step on another rake in the libpldm design, which is that some internal data structures are very much the wire format of corresponding PLDM messages (such as the PDR repository implementation). Working with wire-format buffers is most safely done via the msgbuf APIs, however we then hit the conflict of different error code styles in various parts of the API surface.
Do a bit of surgery to provide different error code personalities for msgbuf, such that the caller can pick the style of error code they need it to return to maintain consistency.
Note that like the previous patch marking all msgbuf APIs as __attribute__((always_inline)), the rework here makes another small impact on the argument register allocation of several stable APIs. The ABI dump is updated accordingly.
Change-Id: Id59c39c5c822f514f546dab88575317071a97c96 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|
H A D | msgbuf.cpp | c8df31c1 Tue May 21 02:17:43 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Add error code personalities
libpldm is in a bit of a transitional period with respect to returned error codes. A historical choice was to return PLDM completion codes from the library API to indicate errors. This is unfortunate because we're now constrained to errors that are specified by the PLDM protocol, which is much less expressive than the set of errors that might be produced by a run-time environment for the library.
The choice going forward is to return C's errno codes. However at this point we step on another rake in the libpldm design, which is that some internal data structures are very much the wire format of corresponding PLDM messages (such as the PDR repository implementation). Working with wire-format buffers is most safely done via the msgbuf APIs, however we then hit the conflict of different error code styles in various parts of the API surface.
Do a bit of surgery to provide different error code personalities for msgbuf, such that the caller can pick the style of error code they need it to return to maintain consistency.
Note that like the previous patch marking all msgbuf APIs as __attribute__((always_inline)), the rework here makes another small impact on the argument register allocation of several stable APIs. The ABI dump is updated accordingly.
Change-Id: Id59c39c5c822f514f546dab88575317071a97c96 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|
/openbmc/libpldm/docs/checklists/ |
H A D | changes.md | c8df31c1 Tue May 21 02:17:43 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Add error code personalities
libpldm is in a bit of a transitional period with respect to returned error codes. A historical choice was to return PLDM completion codes from the library API to indicate errors. This is unfortunate because we're now constrained to errors that are specified by the PLDM protocol, which is much less expressive than the set of errors that might be produced by a run-time environment for the library.
The choice going forward is to return C's errno codes. However at this point we step on another rake in the libpldm design, which is that some internal data structures are very much the wire format of corresponding PLDM messages (such as the PDR repository implementation). Working with wire-format buffers is most safely done via the msgbuf APIs, however we then hit the conflict of different error code styles in various parts of the API surface.
Do a bit of surgery to provide different error code personalities for msgbuf, such that the caller can pick the style of error code they need it to return to maintain consistency.
Note that like the previous patch marking all msgbuf APIs as __attribute__((always_inline)), the rework here makes another small impact on the argument register allocation of several stable APIs. The ABI dump is updated accordingly.
Change-Id: Id59c39c5c822f514f546dab88575317071a97c96 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|
/openbmc/libpldm/abi/x86_64/ |
H A D | gcc.dump | c8df31c1 Tue May 21 02:17:43 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Add error code personalities
libpldm is in a bit of a transitional period with respect to returned error codes. A historical choice was to return PLDM completion codes from the library API to indicate errors. This is unfortunate because we're now constrained to errors that are specified by the PLDM protocol, which is much less expressive than the set of errors that might be produced by a run-time environment for the library.
The choice going forward is to return C's errno codes. However at this point we step on another rake in the libpldm design, which is that some internal data structures are very much the wire format of corresponding PLDM messages (such as the PDR repository implementation). Working with wire-format buffers is most safely done via the msgbuf APIs, however we then hit the conflict of different error code styles in various parts of the API surface.
Do a bit of surgery to provide different error code personalities for msgbuf, such that the caller can pick the style of error code they need it to return to maintain consistency.
Note that like the previous patch marking all msgbuf APIs as __attribute__((always_inline)), the rework here makes another small impact on the argument register allocation of several stable APIs. The ABI dump is updated accordingly.
Change-Id: Id59c39c5c822f514f546dab88575317071a97c96 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|
/openbmc/libpldm/src/ |
H A D | msgbuf.h | c8df31c1 Tue May 21 02:17:43 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Add error code personalities
libpldm is in a bit of a transitional period with respect to returned error codes. A historical choice was to return PLDM completion codes from the library API to indicate errors. This is unfortunate because we're now constrained to errors that are specified by the PLDM protocol, which is much less expressive than the set of errors that might be produced by a run-time environment for the library.
The choice going forward is to return C's errno codes. However at this point we step on another rake in the libpldm design, which is that some internal data structures are very much the wire format of corresponding PLDM messages (such as the PDR repository implementation). Working with wire-format buffers is most safely done via the msgbuf APIs, however we then hit the conflict of different error code styles in various parts of the API surface.
Do a bit of surgery to provide different error code personalities for msgbuf, such that the caller can pick the style of error code they need it to return to maintain consistency.
Note that like the previous patch marking all msgbuf APIs as __attribute__((always_inline)), the rework here makes another small impact on the argument register allocation of several stable APIs. The ABI dump is updated accordingly.
Change-Id: Id59c39c5c822f514f546dab88575317071a97c96 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|