Skip to content

pldmd: OOB error event data logging#58

Open
spargaon wants to merge 1 commit intointeg_sp8from
fwdev183036-logfile-review
Open

pldmd: OOB error event data logging#58
spargaon wants to merge 1 commit intointeg_sp8from
fwdev183036-logfile-review

Conversation

@spargaon
Copy link
Copy Markdown
Collaborator

Generate a log file with the event data received
as part of Out-of-Band PLDM error event.

@spargaon
Copy link
Copy Markdown
Collaborator Author

Rx: 80 02 0a 01 01 05 01 01 4c 00 00 20 5c
<6> Received pldmMessagePollEvent for terminus 1 and eventid 0x0
Tx: 00 02 0a 00 00
Tx: 8b 02 0b 01 01 00 00 20 5c 00 00
Rx: 0b 02 0b 00 01 01 4c 00 00 00 00 05 05 80 00 00 00 7f 00 00 00 00 00 00 80 0b 08 3f 00 00 00 a0 ba 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 ed 01 00 00 27 00 00 00 00 70 b1 13 18 00 00 00 00 00 00 5d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 33 22 11
Tx: 8c 02 0b 01 02 00 00 00 00 01 4c
Rx: 0c 02 0b 00 01 00 00
<6> Received pldmMessagePollEvent for terminus 1 and eventid 0x4c01
<7> PLDM event file created. PATH=/tmp/pldmerr/pldm_oob_err__1774651093_0_ec0x05_tid0x01_eventid0x4c01.bin TID=1 EID=19457 ECLASS=5

root@congo-0381:~# tcpdump -i mctpi3c4
tcpdump: WARNING: arptype 290 not supported by libpcap - falling back to cooked socket
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on mctpi3c4, link-type LINUX_SLL (Linux cooked v1), snapshot length 262144 bytes
22:38:13.394408
0x0000: 0109 11c9 0180 020a 0101 0501 014c 0000 .............L..
0x0010: 205c .
22:38:13.394819
0x0000: 0111 09c1 0100 020a 0000 ..........
22:38:13.642411
0x0000: 0111 09c8 018b 020b 0101 0000 205c 0000 ...............
22:38:13.666483
0x0000: 0109 1180 010b 020b 0001 014c 0000 0000 ...........L....
0x0010: 0505 8000 0000 7f00 0000 0000 0080 0b08 ................
0x0020: 3f00 0000 a0ba 0000 0000 0000 0000 0000 ?...............
0x0030: 0000 0000 00d0 ed01 0000 2700 0000 0070 ..........'....p
0x0040: b113 1800 ....
22:38:13.666627
0x0000: 0109 1110 0000 0000 005d 0000 0000 0000 .........]......
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0030: 0000 0000 0000 2600 0000 0000 0000 0000 ......&.........
0x0040: 0000 0000 ....
22:38:13.666719
0x0000: 0109 1160 0000 0000 0000 0000 0000 0000 ...`............
0x0010: 0000 0000 0000 4433 2211 ......D3".
22:38:13.667121
0x0000: 0111 09c8 018c 020b 0102 0000 0000 014c ...............L
22:38:13.690425
0x0000: 0109 11c0 010c 020b 0001 0000 ............

root@congo-0381:~# ls -l /tmp/pldmerr
-rw-r--r-- 1 root root 128 Mar 27 21:53 evt_1774648416_0_ec0x05_tid0x01_eid0x4c01.bin
-rw-r--r-- 1 root root 128 Mar 27 22:19 evt_1774649950_0_ec0x05_tid0x01_eid0x4c01.bin
-rw-r--r-- 1 root root 128 Mar 27 22:38 pldm_oob_err__1774651093_0_ec0x05_tid0x01_eventid0x4c01.bin

terminus->pollDataTransferHandle = poll_event.data_transfer_handle;

if (eventId != PLDM_PLATFORM_EVENT_ID_NULL)
log_pldm_error_event(tid, eventId, eventClass, eventData, eventDataSize);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow the camelCase.
why this function can't be a method of EventManager calss? Any specific reason?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change the name to logPldmErrorEvent.
There is nothing specific to EventManager class being done in this function, so considered making it a worker function and not class specific worker function.

pldm_tid_t tid, uint16_t eventId, uint8_t eventClass,
const uint8_t* eventData, size_t eventDataSize)
{
fs::path dir{"/tmp/pldmerr"};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not pldmerr. please rename it as "/tmp/pldmEventLog/"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure but I think pldmeventlog might be consistent with the file and directory names in this Linux filesystem?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will change to pldm_event_log

@spargaon spargaon force-pushed the fwdev183036-logfile-review branch from 92d52f0 to 467e3cd Compare March 30, 2026 02:15
@spargaon
Copy link
Copy Markdown
Collaborator Author

Rx: 80 02 0a 01 01 05 01 01 4c 00 00 20 5c
<6> Received pldmMessagePollEvent for terminus 1 and eventid 0x0
Tx: 00 02 0a 00 00
Tx: 8b 02 0b 01 01 00 00 20 5c 00 00
Rx: 0b 02 0b 00 01 01 4c 00 00 00 00 05 05 80 00 00 00 7f 00 00 00 00 00 00 80 0b 08 3f 00 00 00 a0 ba 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 ed 01 00 00 27 00 00 00 00 70 b1 13 18 00 00 00 00 00 00 5d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 33 22 11
Tx: 8c 02 0b 01 02 00 00 00 00 01 4c
Rx: 0c 02 0b 00 01 00 00
<6> Received pldmMessagePollEvent for terminus 1 and eventid 0x4c01
<7> PLDM event file created. PATH=/tmp/pldmeventlog/pldm_oob_err_1774838848_0_ec0x05_tid0x01_eventid0x4c01.bin TID=1 EID=19457 ECLASS=5

root@congo-0381:~# ls -l /tmp/pldmeventlog/*
-rw-r--r-- 1 root root 128 Mar 30 02:47 /tmp/pldmeventlog/pldm_oob_err_1774838848_0_ec0x05_tid0x01_eventid0x4c01.bin

root@congo-0381:~# hexdump -C /tmp/pldmeventlog/pldm_oob_err_1774838848_0_ec0x05_tid0x01_eventid0x4c01.bin
00000000 7f 00 00 00 00 00 00 80 0b 08 3f 00 00 00 a0 ba |..........?.....|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0 |................|
00000020 ed 01 00 00 27 00 00 00 00 70 b1 13 18 00 00 00 |....'....p......|
00000030 00 00 00 5d 00 00 00 00 00 00 00 00 00 00 00 00 |...]............|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000060 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |&...............|
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000080

Generate a PldmMessagePollEvent D-Bus signal when
an Out-Of-Band (OOB) error event is received.

In verbose mode only, also generate a log file with
the data received as part of OOB PLDM error event.

Signed-off-by: Shirish Pargaonkar <Shirish.Pargaonkar@amd.com>
@spargaon spargaon force-pushed the fwdev183036-logfile-review branch from 467e3cd to e75e892 Compare April 3, 2026 19:22
@spargaon
Copy link
Copy Markdown
Collaborator Author

spargaon commented Apr 3, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants