History log of /openbmc/pldm/pldmtool/pldm_cmd_helper.cpp (Results 1 – 19 of 19)
Revision Date Author Comments
# 16c2a0a0 16-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: I8c84201cb2343a8c8a5507a49de0721a1bee7063
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 9427089e 25-Oct-2023 Thu Nguyen <thu@os.amperecomputing.com>

pldmtool : Add retry option `-n` or `--retry-count`

Add `-n` or `--retry-count` option to support resendinng the PLDM
message when the sendRecvMsg method of pldm transport handler is
failed.

Tested

pldmtool : Add retry option `-n` or `--retry-count`

Add `-n` or `--retry-count` option to support resendinng the PLDM
message when the sendRecvMsg method of pldm transport handler is
failed.

Tested:
1. When the option `-n` or `--retry-count` is included in pldmtool
command and the pldm message keeps be failed. pldmtool will retry to
send PLDM message `-n` times after first failure.

Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com>
Change-Id: I2c3d5e1514ead5a1f2eea6eb43178d45439788f8

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


# 3d03f3fa 07-Sep-2023 Dung Cao <dung@os.amperecomputing.com>

pldmtool/softoff: Use InstanceId APIs from libpldm

The af-mctp transport does not broadcast the PLDM messages between the
MCTP socket instances. Pldmtool/softoff have to handle get/free
instanceId i

pldmtool/softoff: Use InstanceId APIs from libpldm

The af-mctp transport does not broadcast the PLDM messages between the
MCTP socket instances. Pldmtool/softoff have to handle get/free
instanceId instead of depending on the pldmd. Update pldmtool/softoff
to use get/free instanceId APIs in libpldm.

Tested.
1. Call more than 32 pldmtool commands to make sure the allocated
InstanceId are free correctly.
2. Repeat calling softoff more than 32 times. Make sure the functional
should work normally.

Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Change-Id: I7cda124694d95d00c37f4993e22cfe33a980d364

show more ...


# dcceda54 18-Oct-2023 Andrew Jeffery <andrew@codeconstruct.com.au>

pldmtool: Remove redundent include of 'config.h'

The inclusion is redundant as it's forced on the compiler command-line.
We specify this in the build system with the following in meson.build:

```
a

pldmtool: Remove redundent include of 'config.h'

The inclusion is redundant as it's forced on the compiler command-line.
We specify this in the build system with the following in meson.build:

```
add_project_arguments('-include', '@0@'.format(config), language: 'cpp')
```

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

show more ...


# 91a092f6 18-Sep-2023 vkaverap@in.ibm.com <vkaverap@in.ibm.com>

PLDM:Use new alias of DBUS_TIMEOUT for bus.call

This commit uses a new global variable for DBUS_TIMEOUT which is included as an input parameter for bus.call dbus calls. The new alias makes the bus.c

PLDM:Use new alias of DBUS_TIMEOUT for bus.call

This commit uses a new global variable for DBUS_TIMEOUT which is included as an input parameter for bus.call dbus calls. The new alias makes the bus.call function shorter and readable.

Change-Id: I336c97bc0631d5370ff3648e41f50e3e283d771b
Signed-off-by: vkaverap@in.ibm.com <vkaverap@in.ibm.com>

show more ...


# 9138c209 19-May-2023 vkaverap@in.ibm.com <vkaverap@in.ibm.com>

PLDM : Change the dbus timeout to 5 seconds

Dbus timeout value for every dbus call in PLDM is set to 5 seconds
instead of default 25 seconds so that all dbus calls that expect a
reply exists after 5

PLDM : Change the dbus timeout to 5 seconds

Dbus timeout value for every dbus call in PLDM is set to 5 seconds
instead of default 25 seconds so that all dbus calls that expect a
reply exists after 5 seconds if there is no response from the client.
While BMC is still waiting for a response on any dbus calls it is
possible that host can timeout and return an error.
Another reason is that memory address from where BMC would read data
sent by host may get deallocated after 20 seconds and it is possible
for this to happen even before BMC has read the data. This has lead
to DMA issues.

Tested by adding a sleep for 10 seconds inside main function of
phospher-host-postd and executed get dbus property on snoopd
interface from pldm. PLDM dbus call timed out after 5 seconds.

Change-Id: I1aa1b4ad7fceff2224a3ccc3bcf6abd5705963bc
Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>

show more ...


# 2b85d784 24-May-2022 Dung Cao <dung@os.amperecomputing.com>

pldmtool: Close socket connection

With pldm commands like getPDR, pldmtool opens new socket for each PDR.
In case we have hundred number of PDRs, pldmtool open hundred number of
socket connection to

pldmtool: Close socket connection

With pldm commands like getPDR, pldmtool opens new socket for each PDR.
In case we have hundred number of PDRs, pldmtool open hundred number of
socket connection to server. It causes mctp-demux (role as server) reach
limit number of clients can handle.

So pldmtool should close socket connection to server after completely
using it.

Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Change-Id: I66fb00cd2d51f131c8901a8964552bcb2fc1de13

show more ...


# 6da4f91b 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

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 and reformat the
repository.

Change-Id: I61b093f75011417cc9c7acf9605200f4fa429bac
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

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


# 27a022ca 10-Aug-2022 Andrew Jeffery <andrew@aj.id.au>

libpldm: Migrate to subproject

Organize files in libpldm to make it a subproject

In the current state, libpldm is not readily consumable
as a subproject.This commit does all the necessary re-organi

libpldm: Migrate to subproject

Organize files in libpldm to make it a subproject

In the current state, libpldm is not readily consumable
as a subproject.This commit does all the necessary re-organisation
of the source code to make it work as a subproject.

There are no .c/.h files changes in this commit, only meson
changes and re-organising the code structure.

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

show more ...


# ca1998f3 06-Jun-2022 Manojkiran Eda <manojkiran.eda@gmail.com>

update clang-format

This commit would update the repo's clang-format file to
the latest of docs/style/cpp/clang-format file.

Following is the new change that is added:
Brad :
clang-format: cpp: r

update clang-format

This commit would update the repo's clang-format file to
the latest of docs/style/cpp/clang-format file.

Following is the new change that is added:
Brad :
clang-format: cpp: remove empty lines

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

show more ...


# 0a725f83 22-Oct-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix a bad error traces

There are couple of places where we are trying to print
the 8 bit value, and it std::cout cannot display those directly,
we need to typecast it to an integer.

Signed-off-by:

Fix a bad error traces

There are couple of places where we are trying to print
the 8 bit value, and it std::cout cannot display those directly,
we need to typecast it to an integer.

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

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 libpldmresponder

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


# 5079ac4a 19-Aug-2021 Brad Bishop <bradleyb@fuzziesquirrel.com>

treewide: remove 'using namespace' from headers

Using namespace at global scope in a header file violates the cpp core
guidelines. Quoting the guidelines:

"Doing so takes away an #includer’s abi

treewide: remove 'using namespace' from headers

Using namespace at global scope in a header file violates the cpp core
guidelines. Quoting the guidelines:

"Doing so takes away an #includer’s ability to effectively
disambiguate and to use alternatives. It also makes #included headers
order-dependent as they might have different meaning when included in
different orders."

For further reading:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive

The guidelines don't call out using using namespace from namespace
scope, but it is only marginally less problematic and still unexpected,
so this patch removes those as well.

The process used to do the update is roughly:

1 - git grep 'using namespace' **.hpp
2 - For each instance, remove the offending 'using namespace' line
3 - build
4 - add 'using namespace' to cpp files or fully resolve types in hpp
files until the project builds again.

Further cleanup is possible - for example cpp files could be scrubbed
for unnecessary namespace qualification - this was not done here to make
review as simple as possible.

Change-Id: I4931f5e78a1b5b74b4a4774c035a549f4d59b91a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 9f8d2b0a 24-Mar-2021 Sampa Misra <sampmisr@in.ibm.com>

Revert "Fix return value for the pldm_send method"

This reverts commit 4d25f6a6f4a027d51863393e55cb770ededf0358.

Reason for revert: <sendMsg returns the number of bytes transferred in success. that

Revert "Fix return value for the pldm_send method"

This reverts commit 4d25f6a6f4a027d51863393e55cb770ededf0358.

Reason for revert: <sendMsg returns the number of bytes transferred in success. that is being treated as error response as per current code. blocking Host to power on. Reverting for now until we find a better solution>

Change-Id: I606f0245075e38eb99de74219453dc5f781d46b7

show more ...


# 4d25f6a6 16-Mar-2021 George Liu <liuxiwei@inspur.com>

Fix return value for the pldm_send method

- If the caller uses invalid mctp_eid to call the pldm_send/sendmsg
method, it will return a value greater than 0(non -1).

- At this time, the pldm_send

Fix return value for the pldm_send method

- If the caller uses invalid mctp_eid to call the pldm_send/sendmsg
method, it will return a value greater than 0(non -1).

- At this time, the pldm_send method will return to
`PLDM_REQUESTER_SUCCESS`, and will cause the pldm daemon to die.

Tested:
- use an invalid mctp_eid:
Before:
pldmtool platform getpdr -d 0 -m 11 -v
the pldm daemon to die.

After:
pldmtool platform getpdr -d 0 -m 11 -v
Request Message:
0b 01 80 02 51 00 00 00 00 00 00 00 00 01 ff ff 00 00
Failed to call pldm_send_recv, rc = 18
pldmSendRecv: Failed to receive RC = 18

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

show more ...


# ae28bc77 10-Dec-2020 Sridevi Ramesh <sridevra@in.ibm.com>

Add tracing when the BMC PLDM daemon issues GetPDR to host

After PDR trace enabled

Sending Msg:
80 02 51 18 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 19 00 00 00 00 00 00 00 05

Add tracing when the BMC PLDM daemon issues GetPDR to host

After PDR trace enabled

Sending Msg:
80 02 51 18 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 19 00 00 00 00 00 00 00 05 14 00 18 00 00 00 01 14 00 00 0a 00 02 00 40 01 43 00 01 00 01 00
Sending Msg:
80 02 51 19 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 1a 00 00 00 00 00 00 00 05 14 00 19 00 00 00 01 14 00 00 0a 00 02 00 41 01 43 00 02 00 01 00
Sending Msg:
80 02 51 1a 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 1b 00 00 00 00 00 00 00 05 14 00 1a 00 00 00 01 14 00 00 0a 00 02 00 c0 20 42 00 01 00 01 00
Sending Msg:
80 02 51 1b 00 00 00 00 00 00 00 01 ff ff 00 00
Receiving Msg:
00 02 51 00 1c 00 00 00 00 00 00 00 05 14 00 1b 00 00 00 01 14 00 00 0a 00 02 00 c2 20 42 00 02 00 01 00

Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
Change-Id: I464de3c128054b381dbba6199f2525ed2b327195

show more ...


# f7f5da97 17-Jun-2020 Deepak Kodihalli <dkodihal@in.ibm.com>

Rename tool/ as pldmtool/

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I38d7a6ab907014cd5fca049b095d692d069feab1