Skip to content

Data Plane and Operation Identity

FRAME_SUBMIT creates one operation. The operation identity and frame identity are related but not interchangeable:

  • operation_id: u64 is the stable lifecycle identity used by cancellation, scheduling, progress, partial results, route hints, object references, trace correlation, and drop reasons.
  • header.frame_id: u32 is the ordered data-plane work-unit identity used to correlate submit, terminal result, replay, and frame-oriented profile data.

An implementation MUST preserve the pair for the complete operation lifetime. It MUST NOT derive operation_id from a local handle, truncate it to frame_id, or silently set the two values equal. Opaque SDK/FFI handles are process-local resources and never become wire identities.

FRAME_SUBMIT Metadata

Preview4 freezes the fixed metadata at 72 bytes:

OffsetFieldTypeRule
0src_widthu16Tensor field; zero for non-tensor payloads.
2src_heightu16Tensor field; zero for non-tensor payloads.
4tile_widthu16Tensor field.
6tile_heightu16Tensor field.
8tile_countu16Tensor field.
10section_countu16Number of declared tensor sections.
12frame_classu8Profile-defined frame class.
13input_profileu8Standard input profile registry value.
14tile_index_modeu8Tile-index encoding.
15reserved0u8MUST be zero.
16latency_budget_msu16Submit latency budget.
18target_fps_x100u16Optional frame-rate target.
20retry_of_frameu32Prior frame identity, or zero.
24tile_base_idu32First tile identity.
28camera_bytesu32Declared camera block length.
32tile_index_bytesu32Declared tile-index block length.
36reserved1u32MUST be zero.
40operation_idu64Non-zero lifecycle identity for this submit.
48reserved2u32MUST be zero.
52submit_modeu8inline, reference, or mixed.
53budget_policyu8Frozen budget-policy bitmask.
54loss_tolerance_policyu8Frame policy or 0xff to inherit.
55reserved3u8MUST be zero.
56object_ref_masku32Standard referenced-object slots.
60dependency_frame_idu32Dependency frame, or zero.
64payload_kind_bitmapu32Declared payload families.
68payload_frame_countu16Number of typed payload frames.
70reserved4u16MUST be zero.

The tile_index_bytes field occupies bytes 32..35. Bytes 36..39 are reserved; they do not overlap the tile-index length. operation_id occupies bytes 40..47 and is part of every valid Preview4 FRAME_SUBMIT.

Body-Region Length Rules

The current NNRP/1 body prelude keeps the inherited 32-byte field layout but applies the current descriptor sizes:

  1. object_reference_bytes MUST be an integer multiple of the 24-byte object-reference block.
  2. typed_payload_descriptor_bytes MUST be an integer multiple of the current 24-byte typed payload descriptor. For FRAME_SUBMIT and RESULT_PUSH, it MUST equal payload_frame_count * 24.
  3. extension_descriptor_bytes MUST be an integer multiple of the 16-byte extension descriptor.

The Preview2 16-byte typed-payload descriptor is a historical layout and is not accepted by the current Preview4 wire format.

RESULT_PUSH Result Class and Reuse

RESULT_PUSH.result_class describes the primary delivery class, while result_flags contains composable properties. A partial result may therefore reuse an earlier frame, subject to these rules:

  1. result_class=stale_reuse or result_flags.stale requires a non-zero reused_frame_id.
  2. reused_frame_id MUST be zero when stale semantics are not declared.
  3. For tensor payloads, result_class=partial or result_flags.partial requires a non-zero dropped_tile_count, and covered_tile_count + dropped_tile_count MUST equal tile_count. Non-tensor payloads keep all tensor coverage fields zero and express partial ranges through their typed-payload descriptor and profile-specific metadata.
  4. Partial and stale semantics may be combined. The combined form uses result_class=partial, sets both the partial | stale flags, and carries a non-zero reused_frame_id.

Runtime Correlation

  1. A client allocates both identities before encoding the submit.
  2. A server records both identities when it accepts the submit and binds them to its local operation handle.
  3. Partial results and operation-scoped control frames use operation_id in fixed metadata.
  4. Every operation-scoped message MUST carry the header.frame_id bound to its metadata operation_id; a receiver MUST reject an unknown operation or a mismatched pair.
  5. RESULT_PUSH and RESULT_DROP retain header.frame_id correlation.
  6. A terminal result releases lifecycle state only after the corresponding terminal event has been delivered or durably recorded.
  7. TRACE_CONTEXT is the exception whose fixed metadata does not repeat operation_id. header.frame_id=0 is session-scoped; a non-zero value MUST equal the active operation's recorded submit frame id and is resolved back to the preserved operation pair.

NNRP Documentation