Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docs/src/design/ipc-service-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sequenceDiagram
participant AT as AsyncTransaction<br/>(util/ipc)
participant K as pw_kernel<br/>(channel)
participant S as Server process
participant D as dispatch()<br/>(ipc-server)
participant D as dispatch()<br/>(pldm/server)
participant H as FdHandler

Note over C,H: Request
Expand Down Expand Up @@ -58,7 +58,7 @@ path.
sequenceDiagram
participant C as Client<br/>(test code)
participant L as Loopback&lt;D, N&gt;<br/>(util/service)
participant D as dispatch()<br/>(ipc-server)
participant D as dispatch()<br/>(pldm/server)
participant H as FdHandler

C->>L: start(req: &[u8])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

rust_library(
name = "pldm_ipc_api",
name = "pldm_api",
srcs = glob(["src/**/*.rs"]),
edition = "2024",
visibility = ["//visibility:public"],
)

rust_test(
name = "pldm_ipc_api_test",
crate = ":pldm_ipc_api",
name = "pldm_api_test",
crate = ":pldm_api",
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

rust_library(
name = "pldm_ipc_server",
name = "pldm_server",
srcs = glob(["src/**/*.rs"]),
edition = "2024",
visibility = ["//visibility:public"],
deps = [
"//services/pldm/ipc-api:pldm_ipc_api",
"//services/pldm/api:pldm_api",
"//util/service",
],
)

rust_test(
name = "pldm_ipc_server_test",
crate = ":pldm_ipc_server",
name = "pldm_server_test",
crate = ":pldm_server",
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#![no_std]

use pldm_ipc_api::wire::{self, PldmOp};
use pldm_ipc_api::{DenyReason, FdStatus, ResponseCode, WireError};
use pldm_api::wire::{self, PldmOp};
use pldm_api::{DenyReason, FdStatus, ResponseCode, WireError};
use util_service::{Dispatch, DispatchError};

/// What the FD does in response to each orchestrator operation.
Expand Down Expand Up @@ -151,8 +151,8 @@ fn encode_unit_result(
#[cfg(test)]
mod tests {
use super::*;
use pldm_ipc_api::status::TransferMode;
use pldm_ipc_api::wire::{RequestHeader, MAX_RESPONSE_SIZE};
use pldm_api::status::TransferMode;
use pldm_api::wire::{RequestHeader, MAX_RESPONSE_SIZE};

/// Mock handler that records calls and returns canned responses.
struct MockFd {
Expand Down Expand Up @@ -449,7 +449,7 @@ mod tests {
#[cfg(test)]
mod loopback_tests {
use super::*;
use pldm_ipc_api::wire::MAX_REQUEST_SIZE;
use pldm_api::wire::MAX_REQUEST_SIZE;
use util_service::{AsyncTransport, Loopback, TransportError};

/// Start one request and poll the response out, as the client layer
Expand All @@ -462,9 +462,9 @@ mod loopback_tests {
transport.start(req).unwrap();
transport.poll(resp).unwrap().unwrap()
}
use pldm_ipc_api::status::TransferMode;
use pldm_ipc_api::wire::{self, MAX_RESPONSE_SIZE};
use pldm_ipc_api::{DenyReason, FdStatus, ResponseCode};
use pldm_api::status::TransferMode;
use pldm_api::wire::{self, MAX_RESPONSE_SIZE};
use pldm_api::{DenyReason, FdStatus, ResponseCode};

/// Minimal handler for loopback tests.
struct StubFd {
Expand Down