Skip to main content

Crate rtlp_lib

Crate rtlp_lib 

Source
Expand description

Rust library for parsing PCI Express Transaction Layer Packets (TLPs).

Supports both non-flit (PCIe 1.0–5.0) and flit-mode (PCIe 6.0+) framing.

Structs§

CompletionReqDW23
ConfigRequest
FlitDW0
Parsed representation of a flit-mode DW0 (first 4 bytes of a flit TLP).
FlitOhcA
Parsed OHC-A word — the byte layout is shared by OHC-A1, OHC-A2, and OHC-A3.
FlitStreamWalker
Iterator over a packed stream of flit-mode TLPs.
MemRequest3DW
MemRequest4DW
MessageReqDW24
TlpPacket
TLP Packet structure is high level abstraction for entire TLP packet Contains Header and Data
TlpPacketHeader
TLP Packet Header Contains bytes for Packet header and informations about TLP type

Enums§

AtomicOp
Atomic operation discriminant
AtomicWidth
Operand width — derived from TLP format: 3DW → 32-bit, 4DW → 64-bit
FlitTlpType
TLP type codes used in Flit Mode DW0 byte 0.
TlpError
Errors that can occur when parsing TLP packets
TlpFmt
TLP format field encoding — encodes header size and whether a data payload is present.
TlpMode
Selects the framing mode used to interpret the raw byte buffer.
TlpType
High-level TLP transaction type decoded from the DW0 Format and Type fields.

Traits§

AtomicRequest
Atomic Request trait: header fields and operand(s) for atomic op TLPs. Use new_atomic_req() to obtain a trait object from raw packet bytes.
CompletionRequest
Completion Request Trait Completions are always 3DW (for with data (fmt = b010) and without data (fmt = b000) ) This trait is provided to have same API as other headers with variable size To obtain this trait new_cmpl_req() function has to be used Trait release user from dealing with bitfield structures.
ConfigurationRequest
Configuration Request Trait: Configuration Requests Headers are always same size (3DW), this trait is provided to have same API as other headers with variable size
MemRequest
Memory Request Trait: Applies to 32 and 64 bits requests as well as legacy IO-Request (Legacy IO Request has the same structure as MemRead3DW) Software using the library may want to use trait instead of bitfield structures Both 3DW (32-bit) and 4DW (64-bit) headers implement this trait 3DW header is also used for all Legacy IO Requests.
MessageRequest
Message Request trait Provide method to access fields in DW2-4 header is handled by TlpHeader

Functions§

new_atomic_req
Parse an atomic TLP request from a TlpPacket.
new_cmpl_req
Obtain Completion Request dyn Trait:
new_conf_req
Obtain Configuration Request trait from bytes in vector as dyn.
new_mem_req
Obtain Memory Request trait from bytes in vector as dyn. This is the preferred way of dealing with TLP headers when the exact format (32-bit vs 64-bit) does not need to be known at the call site.
new_msg_req
Obtain Message Request dyn Trait: