Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions services/mctp/echo/tests/echo_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct BufferSender<'a> {
impl Sender for BufferSender<'_> {
fn send_vectored(
&mut self,
_eid: mctp::Eid,
mut fragmenter: Fragmenter,
payload: &[&[u8]],
) -> mctp::Result<Tag> {
Expand Down
9 changes: 8 additions & 1 deletion services/mctp/server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,14 @@ impl<S: Sender, const OUTSTANDING: usize> Server<S, OUTSTANDING> {
/// binding. The packet should be a raw MCTP packet without transport
/// headers (the transport binding strips those).
pub fn inbound(&mut self, pkt: &[u8]) -> Result<(), MctpError> {
self.stack.inbound(pkt).map_err(mctp_error_to_server_error)
// The router reports the cookie of the handle a matched message was
// queued for. This server polls every outstanding handle by cookie in
// `update`, so it reaches that message there and drops the cookie
// here.
self.stack
.inbound(pkt)
.map(|_matched_cookie| ())
.map_err(mctp_error_to_server_error)
}
}

Expand Down
3 changes: 3 additions & 0 deletions services/mctp/server/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const MCTP_HEADER_SIZE: usize = 4;
impl Sender for BufferSender<'_> {
fn send_vectored(
&mut self,
_eid: mctp::Eid,
mut fragmenter: Fragmenter,
payload: &[&[u8]],
) -> mctp::Result<Tag> {
Expand Down Expand Up @@ -80,6 +81,7 @@ pub struct SmallMtuBufferSender<'a> {
impl Sender for SmallMtuBufferSender<'_> {
fn send_vectored(
&mut self,
_eid: mctp::Eid,
mut fragmenter: Fragmenter,
payload: &[&[u8]],
) -> mctp::Result<Tag> {
Expand Down Expand Up @@ -114,6 +116,7 @@ pub struct DroppingBufferSender;
impl Sender for DroppingBufferSender {
fn send_vectored(
&mut self,
_eid: mctp::Eid,
mut fragmenter: Fragmenter,
payload: &[&[u8]],
) -> mctp::Result<Tag> {
Expand Down
5 changes: 5 additions & 0 deletions services/mctp/transport-i2c/src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ impl<C: I2c<u8>> I2cSender<C> {
}

impl<C: I2c<u8>> mctp_lib::Sender for I2cSender<C> {
// This sender ignores the destination EID and writes every packet to
// `remote_addr`, the I2C address of the single peer, fixed at construction
// time. The body's TODO tracks the neighbor table that maps an EID to an
// I2C address.
fn send_vectored(
&mut self,
_eid: mctp::Eid,
mut fragmenter: mctp_lib::fragment::Fragmenter,
payload: &[&[u8]],
) -> Result<mctp::Tag> {
Expand Down
3 changes: 3 additions & 0 deletions services/pldm/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ pub struct BufferSender<'a> {
}

impl Sender for BufferSender<'_> {
// This mock captures every packet into a buffer rather than routing it, so
// the destination EID has no effect on the result.
fn send_vectored(
&mut self,
_eid: mctp::Eid,
mut fragmenter: Fragmenter,
payload: &[&[u8]],
) -> mctp::Result<Tag> {
Expand Down
18 changes: 7 additions & 11 deletions third_party/crates_io/Cargo.lock

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

4 changes: 2 additions & 2 deletions third_party/crates_io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ nb = "1.1"
fugit = "0.3.7"
openprot-hal-blocking = { git = "https://github.com/rusty1968/openprot.git", rev = "c6cd23a" }
heapless = { version = "0.9", default-features = false }
mctp = { git = "https://github.com/CodeConstruct/mctp-rs.git", default-features = false }
mctp-lib = { git = "https://github.com/OpenPRoT/mctp-lib.git", branch = "9e-buildup" }
mctp = { git = "https://github.com/CodeConstruct/mctp-rs.git", rev = "9e52b626863b916d900ca1ddfdd9215baf0f80fc", default-features = false }
mctp-lib = { git = "https://github.com/OpenPRoT/mctp-lib.git", branch = "main" }
spdm-lib = { git = "https://github.com/OpenPRoT/spdm-lib.git", branch = "main" }
pldm-common = { git = "https://github.com/OpenPRoT/pldm-lib.git" }
pldm-interface = { git = "https://github.com/OpenPRoT/pldm-lib.git" }
Expand Down
Loading