Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d8591e9
Fix building for no-alloc
mkj Jul 23, 2025
b04abd9
Use deku fork
mkj Jul 22, 2025
23c40d0
mctp-linux: Return NoSpace for buffer too small
mkj Jul 23, 2025
45f195f
mctp-estack: Emit SetEndpointId when unchanged
mkj Jul 24, 2025
09784d2
mctp-estack: Fix responses to req messages
mkj Jul 24, 2025
7bb08ab
mctp-estack: Fix panic when a ReqChannel drops
mkj Jul 24, 2025
4d148c9
mctp-estack: Clarify RouterAsyncReqChannel reuse
mkj Jul 25, 2025
bda3123
pldm: Add async request / response transfer functions
jk-ozlabs Jul 15, 2025
9ced8f1
pldm: Add initial control module
jk-ozlabs Jul 15, 2025
f693014
pldm: Add responder module, for control command implementations
jk-ozlabs Jul 15, 2025
5b1954b
pldm: Request::response() returns a 'static response
jk-ozlabs Jul 21, 2025
563d01f
pldm: Add MultipartReceive definitions
jk-ozlabs Jul 21, 2025
bd350f0
pldm: Add pldm_xfer_buf_async
mkj Jul 22, 2025
0a06ff6
pldm: implement multipart size registration and negotiation
jk-ozlabs Jul 22, 2025
a8ed195
pldm: Make proto_error! perform formatting
mkj Jul 23, 2025
e7b2b77
pldm: Add ccode variant and From<DekuError>
mkj Jul 22, 2025
aa09f4c
pldm: Improve lifetime returned by VecSlice::done
mkj Jul 22, 2025
862c722
pldm: util: make push_le public
mkj Jul 25, 2025
4efb253
pldm: Add control requester functions
mkj Jul 22, 2025
6b83cd3
pldm: control: fix DekuContainerRead::from_bytes arguments
jk-ozlabs Jul 24, 2025
e6e8348
pldm: control: Add negotiate_transfer_parameters function
jk-ozlabs Jul 24, 2025
9fa717e
pldm: derive Debug for control proto structs
mkj Jul 24, 2025
6b9597a
pldm: convert Deku WriteZero to PldmError::NoSpace
mkj Jul 24, 2025
061ff43
pldm: return CC error from pldm_xfer_buf_async
mkj Jul 24, 2025
b696a8f
pldm-platform: Initial PLDM type 2 requester
mkj Jun 19, 2025
00f0020
pldm-platform: add PDR proto and requester modules
mkj Jul 22, 2025
2037701
pldm-platform: Check for data_length
mkj Jul 23, 2025
87a6f26
pldm-platform-util: Add platform requester client
mkj Jun 19, 2025
9c2f68b
pldm-platform-util: Add PDR commands
mkj Jul 23, 2025
39cec03
pldm-file: Add initial PLDM for File Transfer crate
jk-ozlabs Jul 15, 2025
7b76bfe
pldm-file: Add host example
jk-ozlabs Jul 17, 2025
52c4400
pldm-file: Move FileDescriptor and FileIdentifier types to proto module
jk-ozlabs Jul 22, 2025
de820c3
pldm-file: Add definitions for DfOpen attributes
jk-ozlabs Jul 22, 2025
795d4d1
pldm-file: examples: Initial client example
jk-ozlabs Jul 22, 2025
dae7f01
pldm-file: use negotiated part size
jk-ozlabs Jul 24, 2025
da1ca37
pldm-file: Add platform PDR handler to example
mkj Jul 23, 2025
ebb4741
pldm-file: rename example binaries to pldm-file-{host,client}
mkj Jul 24, 2025
0afca7e
pldm-file: host return error on send failure
mkj Jul 24, 2025
5f3e530
pldm-file: Implement part negotiation in example client
jk-ozlabs Jul 24, 2025
682c578
pldm-file: Add standard derives for FileIdentifier and FileDescriptor
jk-ozlabs Jul 24, 2025
f297975
pldm-file: Implement DfClose
jk-ozlabs Jul 24, 2025
a4c54e5
pldm-file: report all implemented commands
jk-ozlabs Jul 24, 2025
851360e
pldm-file: examples: Use df_read_with for printing per-transfer logs
jk-ozlabs Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 137 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = [ "mctp-usb-embassy", "pldm-fw-cli", "standalone" ]
members = [ "mctp-usb-embassy", "pldm-file", "pldm-fw-cli", "pldm-platform", "pldm-platform-util", "standalone" ]
resolver = "2"

[workspace.package]
Expand All @@ -13,6 +13,7 @@ argh = "0.1.12"
chrono = { version = "0.4", default-features = false }
crc = "3.0"
defmt = "0.3"
deku = { git = "https://github.com/CodeConstruct/deku.git", tag = "cc/deku-v0.19.1/no-alloc-3", default-features = false }
embedded-io-adapters = { version = "0.6", features = ["std", "futures-03"] }
embedded-io-async = "0.6"
enumset = "1.1"
Expand All @@ -25,6 +26,7 @@ mctp = { version = "0.2", path = "mctp", default-features = false }
num-derive = { version = "0.4", default-features = false }
num-traits = { version = "0.2", default-features = false }
pldm-fw = { version = "0.2", path = "pldm-fw", default-features = false }
pldm-platform = { path = "pldm-platform", default-features = false }
pldm = { version = "0.2", path = "pldm", default-features = false }
proptest = "1.0.0"
simplelog = "0.12"
Expand Down
11 changes: 9 additions & 2 deletions ci/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ cargo build --release
cargo test

# stable, no_std
NOSTD_CRATES="mctp pldm pldm-fw"
NOSTD_CRATES="mctp pldm pldm-fw pldm-platform pldm-file"
for c in $NOSTD_CRATES; do
(
cd $c
cargo build --target thumbv7em-none-eabihf --no-default-features --release
cargo build --target thumbv7em-none-eabihf --no-default-features
)
done
ALLOC_CRATES="pldm pldm-platform pldm-file"
for c in $ALLOC_CRATES; do
(
cd $c
cargo build --target thumbv7em-none-eabihf --no-default-features --features alloc
)
done

Expand Down
9 changes: 6 additions & 3 deletions mctp-estack/src/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ impl<'a> MctpControl<'a> {
let res = self.router.set_eid(eid).await;
let present_eid = self.router.get_eid().await;

if res.is_ok() && old != present_eid {
if res.is_ok() {
event = Some(ControlEvent::SetEndpointId {
old,
new: present_eid,
Expand Down Expand Up @@ -550,9 +550,12 @@ impl<'a> MctpControl<'a> {

/// An MCTP control handler event
pub enum ControlEvent {
/// Set Endpoint ID changed EID
/// Set Endpoint ID received.
///
/// Note that the EID may be unchanged.
SetEndpointId {
/// Previous EID
/// Previous EID.
///
old: Eid,
/// New EID
new: Eid,
Expand Down
21 changes: 15 additions & 6 deletions mctp-estack/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@
//! `mctp-estack` uses fixed sizes to be suitable on no-alloc platforms.
//! These can be configured at build time, see [`config`]

#![cfg_attr(not(any(feature = "std", test)), no_std)]
#![cfg_attr(not(feature = "std"), no_std)]
#![forbid(unsafe_code)]
#![allow(clippy::int_plus_one)]
#![allow(clippy::too_many_arguments)]
// defmt does not currently allow inline format arguments, so we don't want
// those reworked when using the log crate either.
#![allow(clippy::uninlined_format_args)]

#[cfg(test)]
#[macro_use]
extern crate std;

/// Re-exported so that callers can use the same `heapless` version.
///
/// `heapless::Vec` is currently an argument of `send_fill()` in transports.
Expand Down Expand Up @@ -581,16 +585,21 @@ impl Stack {
trace!("set flow {}", peer);

if let Some(tv) = tag {
if flow_expires {
trace!("Can't specify a tag with tag_expires");
return Err(Error::BadArgument);
}

// Compare with any existing flow
if let Some(f) = self.flows.get_mut(&(peer, tv)) {
if f.expiry_stamp.is_some() {
// An Owned tag given to start_send() must have been initially created
// tag_expires=false.
trace!("Can't specify an owned tag that didn't have tag_expires=false");
if flow_expires != f.expiry_stamp.is_some() {
trace!("varying slow_expires for flow");
return Err(Error::BadArgument);
}

if f.cookie != cookie {
trace!("varying app for flow");
trace!("varying cookie for flow");
return Err(Error::BadArgument);
}
return Ok(tv);
}
Expand Down
Loading