@startuml
skinparam shadowing false
title RoCE-v2 packet-batch latency and bandwidth model

participant "GPU / Storage Client" as Client
participant "RNIC / DPU" as RNIC
participant "Lossless Ethernet Fabric" as Fabric
participant "Target RNIC" as Target
participant "GPU / ZFS / Mesh Target" as Service

Client -> RNIC : RDMA opcode\nREAD / WRITE / SEND
RNIC -> RNIC : split payload into MTU-sized packets\nadd Ethernet + IP + UDP + BTH + ICRC headers
RNIC -> Fabric : packet batch over N rails
Fabric -> Fabric : serialization delay\nqueue delay\nECN mark when utilization > threshold
Fabric -> RNIC : CNP feedback if ECN marks accumulate
Fabric -> Fabric : PFC pause if lossless queue exceeds threshold
Fabric -> Target : delivered packet batch
Target -> Service : completion / memory placement
Service --> Client : ACK / completion event

note over Fabric
latency = NIC + switch_hops + propagation + serialization + queue + PFC pause
bandwidth = rails × Gbps-per-rail, adjusted by congestion and backlog
end note
@enduml
