Closed jmc5113 closed 1 year ago
My apologies, it seems we struggle a bit with keeping track of issues filed here. Let me track down the spec you suggest and push a patch.
@jmc5113 Can you please clarify your reference? Ideally that clarification would be the specification ID and version (e.g. DSP0248 v1.0.0), and the section number and name or table number in the case of a breakdown of a specific message type.
I ask that for several reasons:
include/libpldm/base.h
, as that file is specific to structures and constants defined in DSP0240, Platform Level Data Model Base Specification.As it turns out, both DSP0240 and DSP0248 define a TransferFlag
field at various points:
DSP0240 v1.1.0, Table 10 - GetPLDMVersion request and response message format:
TransferFlag This field is the transfer flag that indicates what part of the transfer this response represents. Possible values: {Start=1, Middle=2, End=4, StartAndEnd = 5}
DSP0248 v1.2.0, Table 16 - PollForPlatformEventMessage command format
TransferFlag The transfer flag that indicates what part of the transfer this response represents. Possible values: {Start=0x00, Middle=0x01, End=0x04, StartAndEnd=0x05} This field shall be omitted if eventID is 0x0000 or 0xFFFF.
Given the transfer_resp_flag
is defined in include/libpldm/base.h
it should be interpreted as referring to the DSP0240 definition for TransferFlag
, in which case it is not incorrect.
That said, it's kinda awkward that PMCI defined multiple values for conceptually the same problem.
Oh wow, thank you for the explanation. For my current project, I picked up some PLDM work and have been focused on DSP0248. In particular the polled platform events. (They're strangely spec'd) and this was one issue I had run into after working with the code. I wasn't aware that there was a second similar but different enum values.
Thank you for the breakdown and explaination.
enum transfer_resp_flag { PLDM_START = 0x01, PLDM_MIDDLE = 0x02, PLDM_END = 0x04, PLDM_START_AND_END = 0x05, };
These are defined in the PLDM PMC spec as
start = 0 middle = 1 end = 4 start_and_end = 5