Skip to main content

Crate virtio_accel_transport

Crate virtio_accel_transport 

Source
Expand description

Portable descriptor-chain, queue, and notification contracts.

This crate owns no guest addresses, mappings, ring layout, threads, or global runtime. Concrete transports retain those details and expose only validated chain metadata plus owned queue tokens.

Structs§

ChainId
Opaque queue-chain identity scoped to one reset epoch.
ChainIo
Borrowed regions and byte ports for one consumed device chain.
ChainLayout
Validated counts and byte totals for one flattened descriptor chain.
ChainRegion
Direction and length of one flattened chain region, without an address or transport identity.
PublishError
Failed driver publication that returns the unpublished chain for retry or reclamation.
PublishedChain
Successful driver publication.
QueueEpoch
Monotonic queue-reset epoch used to reject stale chain operations.
QueueSize
Valid nonzero, power-of-two split-virtqueue size.
QueueState
Validated queue configuration and lifecycle snapshot.
ReclaimedChain
Published driver chain reclaimed during reset without a used entry.
UsedChain
Driver-owned chain returned by used-ring consumption.
UsedLength
Exact number of device-written bytes published with a used chain.

Enums§

ByteAccessError
Failure while accessing a validated transport byte region.
ChainError
Failure to expose one consumed chain as validated byte ports.
ChainLayoutError
Failure to validate the device-specific flattened chain layout.
MalformedChain
Structurally malformed descriptor-chain classification.
NotificationHint
Whether the peer should be notified after a publication operation.
NotificationRecheck
Result of atomically enabling notifications and rechecking queue state.
PublishErrorKind
Pre-publication failure classification.
QueueConfigError
Invalid queue configuration.
QueueError
Portable queue operation failure.
RegionDirection
Direction of one flattened descriptor-backed byte region.

Constants§

MAX_SPLIT_QUEUE_SIZE
Maximum queue size permitted by the split-ring index representation.

Traits§

DeviceChain
Consumed device-side descriptor chain.
DeviceQueue
Device-side available-ring consumption and completion publication.
DriverChainBuffer
Driver-owned byte access for one unpublished or reclaimed descriptor chain.
DriverQueue
Driver-side descriptor publication and used-ring consumption.
QueueControl
Queue configuration control plane.
QueuePort
Read-only state shared by driver, device, and configuration ports.
ReadableBytes
Bounded readable bytes exposed by a transport implementation.
WritableBytes
Bounded writable bytes exposed by a transport implementation.

Functions§

validate_chain_layout
Validate transport-neutral descriptor metadata before frame bytes are decoded.

Type Aliases§

ChainIoResult
Result of exposing one consumed chain as mapped byte ports.