History log of /openbmc/pldm/requester/test/handler_test.cpp (Results 1 – 12 of 12)
Revision Date Author Comments
# a85c69d3 09-Jan-2024 Gilbert Chen <gilbert.chen@arm.com>

requester: Add coroutine API

Added coroutine API to Handler using stdexec to help send and receive
messages in one function call.

For example, to get all PDRs from terminus needs multiple getPDR
co

requester: Add coroutine API

Added coroutine API to Handler using stdexec to help send and receive
messages in one function call.

For example, to get all PDRs from terminus needs multiple getPDR
commands. Except first getPDR commands, the following getPDR command
request data(e.g. dataTransferHandle) needs the previous getPDR command
response data(e.g. nextDataTransferHandle). By using C++ co_await, the
code to get all PDRs can straightforward be implemented by a while loop.

Pseudo code example:
do
{
auto rc = co_await getPDR(dataTransferHndl, ...);

// update dataTransferHndl for next getPDR command
dataTransferHndl = nextDataTransferHndl;

} while(...);

Signed-off-by: Gilbert Chen <gilbert.chen@arm.com>
Signed-off-by: Khang Nguyen <khangng@amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I7b47d15ac15f6ae661ec94dca6a281844b939a44

show more ...


# 93f1e00f 11-Jul-2023 Pavithra Barithaya <pavithra.b@ibm.com>

Replace sizeof() with .size()

This change replaces the usage of sizeof() with .size() to
calculate size of arrays and expressions of STL container types.
Using .size() with containers like std::vect

Replace sizeof() with .size()

This change replaces the usage of sizeof() with .size() to
calculate size of arrays and expressions of STL container types.
Using .size() with containers like std::vector, std::array, and
std::string improves code readability and adheres to modern C++
standards. This also helps in clang-tidy checks.

Change-Id: I1e9e6e453a3b9218682098887763a4908f186815
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>

show more ...


# 4ddee3a0 02-Aug-2023 Thu Nguyen <thu@os.amperecomputing.com>

requestHandler: Queue the request messages to one endpoint

Section "Requirements for requesters" in DSP0240 details "A PLDM
terminus that issues PLDM requests to another PLDM terminus shall wait
unt

requestHandler: Queue the request messages to one endpoint

Section "Requirements for requesters" in DSP0240 details "A PLDM
terminus that issues PLDM requests to another PLDM terminus shall wait
until one of the following occurs before issuing a new PLDM request:
it gets the response to a particular request, it times out waiting for
the response, or it receives an indication that transmission of the
particular request failed." So the registered request messages to one
endpoint have to be queued before sending to meet the requester
requirement.
When a sensor manager is added to pldmd daemon to manage the sensors
of one terminus, the sensor manager will support the sensor polling
timers. The timers will poll the PLDM sensors with different intervals
so there can be many `getSensorReading` requests to one endpoint to
get the sensor values. Moreover, BMC also sends
`PollForPlatformEventMessage` requests to get the event data when it
receives the `pldmMessagePollEvent` event from the terminus. So those
TX request messages have to be queued.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I9756e1029b41a297a8f73e2ab7be47bc143ef710

show more ...


# 1ed5f7a6 21-May-2023 Rashmica Gupta <rashmica@linux.ibm.com>

pldm: Convert to using libpldm transport APIs

A significant amount of logic can be removed by exploiting the new
transport APIs provided by libpldm. Switch the pldm repository over to
use these by i

pldm: Convert to using libpldm transport APIs

A significant amount of logic can be removed by exploiting the new
transport APIs provided by libpldm. Switch the pldm repository over to
use these by introducing an RAII wrapper for the APIs. The current
stance is to continue using the legacy mctp-demux transport
implementation, but we also provide a build option to switch to the
AF_MCTP transport.

We don't currently have the infrastructure in place to get the correct
TIDs, so to keep everything working as before use the EID as the TID in
the EID-to-TID mapping.

Change-Id: I366f079082b102cfc0e90db0f62208581eb8693e
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...


# 2abbce76 17-Oct-2023 Andrew Jeffery <andrew@codeconstruct.com.au>

InstanceIdDb: Move header from pldmd/ to common/

The header is used across all executables produced by the project, which
makes it "common".

Change-Id: I022b179fad1de8dba2ef39fd33bc240ec73a2d33
Sig

InstanceIdDb: Move header from pldmd/ to common/

The header is used across all executables produced by the project, which
makes it "common".

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

show more ...


# a330b2f0 04-May-2023 Andrew Jeffery <andrew@aj.id.au>

pldmd: Migrate instance ID allocation to pldm::InstanceIdDb

This removes use of `pldm::dbus_api::Requester` from around the
code-base. This makes progress towards removing the DBus API entirely
once

pldmd: Migrate instance ID allocation to pldm::InstanceIdDb

This removes use of `pldm::dbus_api::Requester` from around the
code-base. This makes progress towards removing the DBus API entirely
once all its consumers are converted to the libpldm instance ID APIs.

There was never a good reason for the code using the class to have
knowledge that it was related to DBus anyway, so this is, in-effect, a
double clean up improving separation of concerns.

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

show more ...


# 7c1dc7ea 28-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

pldmd: move to libpldm instance ID alloc/free

Refactor the dbus_api::Requester class to be implemented in terms of
libpldm's instance ID database. To make that easier to deal with we
introduce a lig

pldmd: move to libpldm instance ID alloc/free

Refactor the dbus_api::Requester class to be implemented in terms of
libpldm's instance ID database. To make that easier to deal with we
introduce a light-weight RAII C++ binding along with a helper class for
unit tests.

Change-Id: Ia03de8245dfb114e6266ba36dcf26ca4398a4ce0
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# c453e164 21-Dec-2022 George Liu <liuxiwei@inspur.com>

libpldm: Correct reference to libpldm header files

When relying on header files from external libraries, #include<> should
be used instead of #include "" to avoid ambiguity.

Tested: Built pldm succ

libpldm: Correct reference to libpldm header files

When relying on header files from external libraries, #include<> should
be used instead of #include "" to avoid ambiguity.

Tested: Built pldm successfully after enabling ibm-oem

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ia1997de7e0f61564055bbd837f4e24c8f14e55a5

show more ...


# 9fffea2c 27-Oct-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Change the send Buffer size dynamically

On a Linux system the send buffer size has defaulted
to around 90k, and when a pldm message is sent via
the pldm_send() that is bigger than 90k, we get an err

Change the send Buffer size dynamically

On a Linux system the send buffer size has defaulted
to around 90k, and when a pldm message is sent via
the pldm_send() that is bigger than 90k, we get an error
ENOBUFS (No buffer space avilable).

This commit would dynamically change the socket parameter
(SO_SNDBUF) to set the new maximum socket send buffer size
so that we can successfully send the message.

Tested By:

1. hard coded the current buffer size value to 10 and forced
the buffer size to be increase for mutiple commands & was able
to power on the host with out any problems.

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I5f7a3948ea019b4dc983cf5e1926cfc128c02084

show more ...


# e5268cda 07-Sep-2021 Tom Joseph <rushtotom@gmail.com>

Refactor the verbose tracing in PLDM

1. Add verbose tracing in requester code
2. Change the prefix of verbose tracing to "Tx: " and "Rx: "
3. Remove explicit verbose tracing flag in

Refactor the verbose tracing in PLDM

1. Add verbose tracing in requester code
2. Change the prefix of verbose tracing to "Tx: " and "Rx: "
3. Remove explicit verbose tracing flag in libpldmresponder
4. Change the prefix of pldmtool verbose tracing to "pldmtool: Tx: "
and "pldmtool: Rx: "

Signed-off-by: Tom Joseph <rushtotom@gmail.com>
Change-Id: Ie2c6b323e32e0828ed5ecaeb3e61943a98a2f089

show more ...


# a5ed6585 18-Jun-2021 Tom Joseph <rushtotom@gmail.com>

requester: Enhance the PLDM requester code

- Free the instance id on error paths
- Make the conditional checks consistent
- Make the unit tests robust

Signed-off-by: Tom Jos

requester: Enhance the PLDM requester code

- Free the instance id on error paths
- Make the conditional checks consistent
- Make the unit tests robust

Signed-off-by: Tom Joseph <rushtotom@gmail.com>
Change-Id: Ieb70da2820ab818c36f5bf874a602fb090659836

show more ...


# 74f27c73 16-May-2021 Tom Joseph <rushtotom@gmail.com>

requester: PLDM handler for async request/response

PLDM request handler provides APIs to register PLDM request message,
handle retries and instance ID expiration. Sending the PLDM reques

requester: PLDM handler for async request/response

PLDM request handler provides APIs to register PLDM request message,
handle retries and instance ID expiration. Sending the PLDM request
and handling response is handled in an async manner. On receiving
the response the corresponding response handler registered for the
request is invoked.

Tested: Ran unit tests

Signed-off-by: Tom Joseph <rushtotom@gmail.com>
Change-Id: I9f0a9dfcf0fbc9a84eefad375b92d40dd8b48d3d

show more ...