History log of /openbmc/libpldm/src/transport/ (Results 1 – 25 of 46)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
e984a46107-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

meson: Format build files with `meson format`

Additionally, add the formatting command to `scripts/pre-submit` so it's
run by OpenBMC's CI (via `scripts/run-ci`).

Change-Id: Ifb8fc06106b8cfa9155e98

meson: Format build files with `meson format`

Additionally, add the formatting command to `scripts/pre-submit` so it's
run by OpenBMC's CI (via `scripts/run-ci`).

Change-Id: Ifb8fc06106b8cfa9155e986528b769a5ca450b4c
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

860a43d922-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 ...

11e2e87a16-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: I0af2024502c08b1060bb6beb0895108459f00d48
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


/openbmc/libpldm/CHANGELOG.md
/openbmc/libpldm/README.md
/openbmc/libpldm/abi/x86_64/gcc.dump
/openbmc/libpldm/docs/checklists/changes.md
/openbmc/libpldm/evolutions/current/get_fru_record_by_option_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_append_pad_checksum_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_entry_enum_decode_def_num_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_entry_enum_decode_pv_hdls_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_entry_enum_decode_pv_num_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_entry_enum_encode_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_entry_integer_encode_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_entry_string_decode_def_string_length_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_entry_string_encode_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_value_entry_encode_enum_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_value_entry_encode_integer_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_attr_value_entry_encode_string_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_string_entry_decode_string_check.yaml
/openbmc/libpldm/evolutions/current/pldm_bios_table_string_entry_encode_check.yaml
/openbmc/libpldm/evolutions/current/pldm_entity_association_pdr_add_check.yaml
/openbmc/libpldm/evolutions/current/pldm_entity_association_pdr_add_from_node_check.yaml
/openbmc/libpldm/evolutions/current/pldm_pdr_add_check.yaml
/openbmc/libpldm/evolutions/current/pldm_pdr_add_fru_record_set_check.yaml
/openbmc/libpldm/include/libpldm/bios_table.h
/openbmc/libpldm/include/libpldm/compiler.h
/openbmc/libpldm/include/libpldm/meson.build
/openbmc/libpldm/include/libpldm/pdr.h
/openbmc/libpldm/include/libpldm/platform.h
/openbmc/libpldm/meson.build
/openbmc/libpldm/scripts/abi-dump-updater
/openbmc/libpldm/scripts/apply-renames
/openbmc/libpldm/src/dsp/bios_table.c
/openbmc/libpldm/src/dsp/pdr.c
/openbmc/libpldm/src/dsp/platform.c
container-of.h
/openbmc/libpldm/tests/dsp/bios_table.cpp
/openbmc/libpldm/tests/dsp/pdr.cpp
/openbmc/libpldm/tests/dsp/platform.cpp
2b440d4c24-Jul-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

msgbuf: Ensure memmem() is correctly typed and visible where required

To ensure memmem() is visible _GNU_SOURCE needs to be defined early,
at least before any system headers are included. Define it

msgbuf: Ensure memmem() is correctly typed and visible where required

To ensure memmem() is visible _GNU_SOURCE needs to be defined early,
at least before any system headers are included. Define it in the build
flags as clang-tidy will re-order includes based on vibes rather than
dependencies. Finally, clean up the remaining compiler warnings by
dropping the unnecessary casts.

Note that _GNU_SOURCE implies _DEFAULT_SOURCE, so we drop the latter:

> Since glibc 2.19, defining _GNU_SOURCE also has the effect of
> implicitly defining _DEFAULT_SOURCE. Before glibc 2.20, defining
> _GNU_SOURCE also had the effect of implicitly defining _BSD_SOURCE
> and _SVID_SOURCE.

https://www.man7.org/linux/man-pages/man7/feature_test_macros.7.html

Fixes: #12
Fixes: 1523778d2739 ("msgbuf: Add pldm_msgbuf_span_string_utf16()")
Change-Id: I9206f7616740790a89366762cce11d3045471b97
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


/openbmc/libpldm/CHANGELOG.md
/openbmc/libpldm/OWNERS
/openbmc/libpldm/README.md
/openbmc/libpldm/abi/x86_64/gcc.dump
/openbmc/libpldm/docs/checklists/changes.md
/openbmc/libpldm/docs/checklists/releases.md
/openbmc/libpldm/evolutions/current/get_fru_record_by_option_check.cocci
/openbmc/libpldm/evolutions/current/oem-ibm-header-compat.cocci
/openbmc/libpldm/include/libpldm/base.h
/openbmc/libpldm/include/libpldm/bios_table.h
/openbmc/libpldm/include/libpldm/entity.h
/openbmc/libpldm/include/libpldm/firmware_update.h
/openbmc/libpldm/include/libpldm/fru.h
/openbmc/libpldm/include/libpldm/meson.build
/openbmc/libpldm/include/libpldm/oem/ibm/entity.h
/openbmc/libpldm/include/libpldm/oem/ibm/file_io.h
/openbmc/libpldm/include/libpldm/oem/ibm/fru.h
/openbmc/libpldm/include/libpldm/oem/ibm/host.h
/openbmc/libpldm/include/libpldm/oem/ibm/platform.h
/openbmc/libpldm/include/libpldm/oem/ibm/state_set.h
/openbmc/libpldm/include/libpldm/oem/meta/file_io.h
/openbmc/libpldm/include/libpldm/pdr.h
/openbmc/libpldm/include/libpldm/platform.h
/openbmc/libpldm/include/libpldm/state_set.h
/openbmc/libpldm/meson.build
/openbmc/libpldm/meson.options
/openbmc/libpldm/scripts/abi-dump-formatter
/openbmc/libpldm/scripts/pre-submit
/openbmc/libpldm/src/api.h
/openbmc/libpldm/src/compiler.h
/openbmc/libpldm/src/dsp/base.c
/openbmc/libpldm/src/dsp/base.h
/openbmc/libpldm/src/dsp/bios.c
/openbmc/libpldm/src/dsp/bios_table.c
/openbmc/libpldm/src/dsp/firmware_update.c
/openbmc/libpldm/src/dsp/fru.c
/openbmc/libpldm/src/dsp/meson.build
/openbmc/libpldm/src/dsp/pdr.c
/openbmc/libpldm/src/dsp/platform.c
/openbmc/libpldm/src/meson.build
/openbmc/libpldm/src/msgbuf.h
/openbmc/libpldm/src/msgbuf/platform.h
/openbmc/libpldm/src/oem/meta/file_io.c
/openbmc/libpldm/src/oem/meta/meson.build
/openbmc/libpldm/src/requester/instance-id.c
test.c
/openbmc/libpldm/tests/dsp/base.cpp
/openbmc/libpldm/tests/dsp/bios.cpp
/openbmc/libpldm/tests/dsp/bios_table.cpp
/openbmc/libpldm/tests/dsp/bios_table_iter.c
/openbmc/libpldm/tests/dsp/firmware_update.cpp
/openbmc/libpldm/tests/dsp/fru.cpp
/openbmc/libpldm/tests/dsp/meson.build
/openbmc/libpldm/tests/dsp/pdr.cpp
/openbmc/libpldm/tests/dsp/platform.cpp
/openbmc/libpldm/tests/instance-id.cpp
/openbmc/libpldm/tests/meson.build
/openbmc/libpldm/tests/msgbuf.cpp
/openbmc/libpldm/tests/msgbuf_generic.c
/openbmc/libpldm/tests/oem/ibm/fileio.cpp
/openbmc/libpldm/tests/oem/ibm/host.cpp
/openbmc/libpldm/tests/oem/ibm/meson.build
/openbmc/libpldm/tests/oem/meta/fileio.cpp
/openbmc/libpldm/tests/oem/meta/meson.build
/openbmc/libpldm/tests/transport/meson.build
/openbmc/libpldm/tests/transport/transport.cpp
/openbmc/libpldm/tests/utils.cpp
efb4006909-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 ...

d12dd36e09-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 ...

b0c1d20a07-Nov-2023 Andrew Jeffery <andrew@codeconstruct.com.au>

libpldm: Fix header use

The headers need to work whether we're building libpldm in the repo or
we're building another project depending on the headers in the system
include directory.

Tidy up the p

libpldm: Fix header use

The headers need to work whether we're building libpldm in the repo or
we're building another project depending on the headers in the system
include directory.

Tidy up the paths involved and switch to defining the public headers as
system headers for the purpose of the build.

Change-Id: I49413988c94d393ea5761bc4684edcd2c2482a98
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

691668fe01-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


/openbmc/libpldm/.clang-format
/openbmc/libpldm/CHANGELOG.md
/openbmc/libpldm/OWNERS
/openbmc/libpldm/README.md
/openbmc/libpldm/include/libpldm/base.h
/openbmc/libpldm/include/libpldm/bios.h
/openbmc/libpldm/include/libpldm/bios_table.h
/openbmc/libpldm/include/libpldm/entity.h
/openbmc/libpldm/include/libpldm/firmware_update.h
/openbmc/libpldm/include/libpldm/fru.h
/openbmc/libpldm/include/libpldm/instance-id.h
/openbmc/libpldm/include/libpldm/oem/ibm/libpldm/entity_oem_ibm.h
/openbmc/libpldm/include/libpldm/oem/ibm/libpldm/file_io.h
/openbmc/libpldm/include/libpldm/oem/ibm/libpldm/fru_oem_ibm.h
/openbmc/libpldm/include/libpldm/oem/ibm/libpldm/host.h
/openbmc/libpldm/include/libpldm/oem/ibm/libpldm/platform_oem_ibm.h
/openbmc/libpldm/include/libpldm/oem/ibm/libpldm/state_set_oem_ibm.h
/openbmc/libpldm/include/libpldm/pdr.h
/openbmc/libpldm/include/libpldm/platform.h
/openbmc/libpldm/include/libpldm/pldm_types.h
/openbmc/libpldm/include/libpldm/requester/pldm.h
/openbmc/libpldm/include/libpldm/state_set.h
/openbmc/libpldm/include/libpldm/states.h
/openbmc/libpldm/include/libpldm/transport.h
/openbmc/libpldm/include/libpldm/utils.h
/openbmc/libpldm/src/array.h
/openbmc/libpldm/src/base.c
/openbmc/libpldm/src/bios.c
/openbmc/libpldm/src/bios_table.c
/openbmc/libpldm/src/firmware_update.c
/openbmc/libpldm/src/fru.c
/openbmc/libpldm/src/mctp-defines.h
/openbmc/libpldm/src/msgbuf.h
/openbmc/libpldm/src/msgbuf/platform.h
/openbmc/libpldm/src/oem/ibm/file_io.c
/openbmc/libpldm/src/oem/ibm/host.c
/openbmc/libpldm/src/oem/ibm/platform.c
/openbmc/libpldm/src/pdr.c
/openbmc/libpldm/src/platform.c
/openbmc/libpldm/src/requester/instance-id.c
/openbmc/libpldm/src/requester/pldm.c
/openbmc/libpldm/src/responder.c
/openbmc/libpldm/src/responder.h
af-mctp.c
container-of.h
mctp-demux.c
socket.c
socket.h
test.c
transport.c
transport.h
/openbmc/libpldm/src/utils.c
/openbmc/libpldm/tests/bios_table_iter.c
/openbmc/libpldm/tests/libpldm_bios_table_test.cpp
/openbmc/libpldm/tests/msgbuf_generic.c
7dc429da15-Oct-2023 Andrew Jeffery <andrew@codeconstruct.com.au>

transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()

Use of pldm_transport_af_mctp_bind() is demonstrated in the following
patch to pldmd:

https://gerrit.openbmc.org/c/openbmc/pldm/+/63652

transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()

Use of pldm_transport_af_mctp_bind() is demonstrated in the following
patch to pldmd:

https://gerrit.openbmc.org/c/openbmc/pldm/+/63652

Change-Id: I9c902d94c13bceb611606e7439964d9485ebec07
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

cc45aed710-Sep-2023 Andrew Jeffery <andrew@aj.id.au>

transport: af-mctp: Add pldm_transport_af_mctp_bind()

The af-mctp transport needs specific setup before it can receive
requests[1]. Futher, we must track the MCTP metadata on each request
message an

transport: af-mctp: Add pldm_transport_af_mctp_bind()

The af-mctp transport needs specific setup before it can receive
requests[1]. Futher, we must track the MCTP metadata on each request
message and apply it to the response for correlation at the requester.
This behaviour is addressed in the Message Tag and Tag Owner fields
outlined by Table 1 of DSP0236 v1.3.1.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/mctp.rst?h=v6.5#n73

Change-Id: I3fbd84a4174b56d618a42ca58c9881ea5a80f060
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...

1d0e2d4b22-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 ...

4c1ea56c22-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 ...

5038268c22-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 ...

1184f09a22-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 ...

486d85d230-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 ...

0a6d682122-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 ...

45816b8922-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

transport: mctp-demux: Drop ABI annotation for internal symbols

The symbols need to be exposed beyond the translation unit and so cannot
be static, but we also do not want them exposed in the public

transport: mctp-demux: Drop ABI annotation for internal symbols

The symbols need to be exposed beyond the translation unit and so cannot
be static, but we also do not want them exposed in the public symbol
table of the shared object as they only exist for internal purposes.

Drop the ABI annotation so the symbols are hidden from the symbol table
by the linker.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I1316705277b683767ab15bb6526010b0c7c6e121

show more ...

16cd523222-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 ...

2457629030-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 ...

7caa8af117-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

transport: af-mctp: Ensure malloc() succeeds in *_recv()

Avoid a potential NULL-pointer dereference - don't assume we're
executing under Linux.

Fixes: ba6971b9ae69 ("requester: Add af_mctp transpor

transport: af-mctp: Ensure malloc() succeeds in *_recv()

Avoid a potential NULL-pointer dereference - don't assume we're
executing under Linux.

Fixes: ba6971b9ae69 ("requester: Add af_mctp transport")
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ieb73ace2b981eb94b710000b25e8bed3a6e34e7e

show more ...

ac24737c17-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

transport: af-mctp: Assign out-params on success in *_recv()

More specifically, don't assign to out-params while it's possible we can
fail.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id

transport: af-mctp: Assign out-params on success in *_recv()

More specifically, don't assign to out-params while it's possible we can
fail.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ib848d1b363288e5f0b76885ff96500d09ddfc2bf

show more ...

2a6a342d17-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

transport: af-mctp: Organise variable declarations in *_recv()

Align more closely with kernel-style C where we can.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic40d0801fbfd3fde4ad49

transport: af-mctp: Organise variable declarations in *_recv()

Align more closely with kernel-style C where we can.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic40d0801fbfd3fde4ad4955903cb90265b6fe4b4

show more ...

27f041ca17-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

transport: mctp-demux: Use a common cleanup path in *_recv()

Previously the error paths were all individually freeing the
heap-allocated message data buffer. Provide a common path instead, as
we wil

transport: mctp-demux: Use a common cleanup path in *_recv()

Previously the error paths were all individually freeing the
heap-allocated message data buffer. Provide a common path instead, as
we will soon add another error path to the implementation.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I3356cc503cf774f68237548b79a9a0b0d76134d7

show more ...

ef293fcb17-Aug-2023 Andrew Jeffery <andrew@aj.id.au>

transport: mctp-demux: Organise variable declarations in *_recv()

Align more closely with kernel-style C where we can.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I361a10a6a59c4bf4dc

transport: mctp-demux: Organise variable declarations in *_recv()

Align more closely with kernel-style C where we can.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I361a10a6a59c4bf4dce53d5112e7fe06e7a71444

show more ...

f1ebde4930-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 ...

12