-
Notifications
You must be signed in to change notification settings - Fork 10
PLDM File Transfer protocol implementation #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Conditionally use alloc when feature is enabled. no_std is no longer conditional on test, instead "extern crate std" is used for that. CI now tests some creates with "alloc" feature. Signed-off-by: Matt Johnston <[email protected]>
We're going to introduce code that uses deku for binary parsing. Add a worspace dependency on the no-alloc-compatible deku fork while that goes upstream. Signed-off-by: Jeremy Kerr <[email protected]>
Otherwise the message is silently truncated. Signed-off-by: Matt Johnston <[email protected]>
Previously it was only emitted on a new EID, but it may be useful for applications to know when a bus owner assigns an EID. Signed-off-by: Matt Johnston <[email protected]>
The cookie wasn't being passed to the stack on send, so never got woken on a response. Signed-off-by: Matt Johnston <[email protected]>
A message could be received with a particular AppCookie, but the cookie would have already been dropped from the waker pool. This is a workaround, needs a proper fix to remove corresponding flows/reassemblers from the core stack on ReqChannel drop. Signed-off-by: Matt Johnston <[email protected]>
RouterAsyncReqChannel should not reuse tags between requests (unless !tag_expires). Now a new tag and cookie are allocated for each send(), cleared after recv(). The Stack::set_flow() checks for consistency between calls are also simplified. Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Containing just the Cmd type for now. Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Add an async version of pldm_xfer_buf() Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Matt Johnston <[email protected]>
In order for the control responder to implement multipart transfer parameter negotiation, it needs to know the max part size values for each PLDM type handler. Add an Option<u16> to the registration function, for handlers to do so. Now that we have the supported multipart size data, implement a simple Negotiate Transfer Parameters. This is currently across all types; we only allow one negotiation for all of a requester's types as one operation (the spec allows multiple). Any secondary negotiation request will be rejected. Type handlers can query the negotiated part size with negotiated_xfer_size(). Signed-off-by: Jeremy Kerr <[email protected]>
This allowing ignoring desc arguments on no-alloc, which would otherwise give an unused variable warning. Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
Now a truncated version of the original buffer can be kept by the caller. Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
The second tuple item is a bit skip, not a length. Signed-off-by: Jeremy Kerr <[email protected]>
Helper for issuing a Negotiate Transfer Parameters command, mainly in handling the types data. Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
This could be extended in future to other calls. Signed-off-by: Matt Johnston <[email protected]>
Adds - GetSensorReading - GetStateSensorReading - SetNumericSensorEnable - SetStateSensorEnables [+minor change by Jeremy Kerr <[email protected]>: don't elide StateFieldDebug lifetime] Signed-off-by: Matt Johnston <[email protected]>
Add Platform Data Record (PDR) definitions to the platform core and requester modules. Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Supports: numeric-sensor Get Numeric Sensor Reading state-sensor Get State Sensor Reading. Only simple sensors supported. numeric-enable Set Numeric Sensor Enable state-enable Set State Sensor Enable. Only simple sensors supported. Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
We'll use these for general command handling too. Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Do a DfProperties, DfOpen and read. Signed-off-by: Jeremy Kerr <[email protected]>
We can query the part size from the pldm control responder, so use this for our transfer size selection. Signed-off-by: Jeremy Kerr <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
Signed-off-by: Matt Johnston <[email protected]>
... and merge the two block_on() invocations. Signed-off-by: Jeremy Kerr <[email protected]>
These are just the u16 wrappers, so allow Copy, plus the usual set of PartialEq, Eq and Hash. Signed-off-by: Jeremy Kerr <[email protected]>
We should be able to close FileDescriptors to free up the host slot. Signed-off-by: Jeremy Kerr <[email protected]>
We were only registering the DfProperties command; report support for DfOpen, DfRead and DfClose too. Signed-off-by: Jeremy Kerr <[email protected]>
Handy to have some indication about individual transfer operations. Signed-off-by: Jeremy Kerr <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This series adds support for the PLDM for File Transfer ("type 7") protocol.
Since type 7 is dependent on the PLDM base (type 0) and PLDM for Platform Montioring and Control (type 2), we also add support for dependent parts of those, including PLDM type registration, PLDM version reporting and multipart size negotiation.
We're primarily targeting async here, so we'll need to introduce async versions of some of the pldm transfer functions. For binary protocol parsing, we'll use deku, so introduce that as a workspace-wide dependency.
We introduce a few example utilities along the way, for some reference test support.