Lines Matching +full:frame +full:- +full:buffer
1 QUIC Frame-in-Flight Management
4 The QUIC frame-in-flight manager is responsible for tracking frames which were
7 packets, whereas the QUIC frame-in-flight manager (FIFM) works on the level of
12 - the Control Frame Queue (CFQ);
13 - the Transmitted Packet Information Manager (TXPIM); and
14 - the Frame-in-Flight Dispatcher (FIFD).
16 
18 These are introduced in turn below, but first we discuss the various QUIC frame
21 Analysis of QUIC Frame Retransmission Requirements
22 --------------------------------------------------
24 ### Frame Types
26 Standard QUIC uses the following frame types:
36 PATH_CHALLENGE -
37 PATH_RESPONSE -
38 ACK - (non-ACK-eliciting)
39 CONNECTION_CLOSE special (non-ACK-eliciting)
47 PING -
48 PADDING - (non-ACK-eliciting)
51 The different frame types require various different ways of handling
54 - **GCR** (Generic Control Frame Retransmission): The raw bytes of
55 the encoded frame can simply be sent again. This retransmission system does
56 not need to understand the specific frame type. A simple queue can be used,
57 with each queue entry being an octet string representing an encoded frame.
61 - **REGEN** (Regenerate): These frames can be marked for dynamic regeneration
63 up-to-date data at the time of transmission, so is preferred over `GCR` when
66 - Special — `STREAM`, `CRYPTO`: `STREAM` frame handling is handled as a
67 special case by the QUIC Send Stream Manager. `CRYPTO` frame retransmission
72 - Some frame types do not need to be retransmitted even if lost (`PING`,
75 - Special — `CONNECTION_CLOSE`: This frame is a special case and is not
82 - Need for a generic control queue which can store encoded control frames.
86 - The ability to determine, when the ACK Manager determines that a packet has
89 - What stream IDs were sent in a packet, and the logical ranges of application
95 - The logical ranges of the CRYPTO stream which were sent in the packet
98 - Which stream IDs had a FIN bit set in the packet.
103 - What control frames using the **GCR** strategy were sent in the packet
106 - For each type of frame using the **REGEN** strategy, a flag as to whether
107 that frame type was contained in the packet (so that the flag can be set
110 The Control Frame Queue (CFQ)
111 -----------------------------
113 
121 Each frame in the CFQ is a simple opaque byte buffer, which has the following
124 - An integral priority value, used to maintain priority ordering.
126 - The frame type, which is provided by the caller along with the buffer.
127 This can be determined from the encoded frame buffer, but this saves the
131 - A state, which is either `NEW` or `TX`. Frames added to the CFQ have
132 the `NEW` state initially. When the frame is transmitted, it is transitioned
141 CFQ item is released. A free callback provided when the buffer was added to the
142 CFQ is called, providing an opportunity to free or reuse the buffer. Buffers
151 * QUIC Control Frame Queue Item
173 /* Returns the frame type of a CFQ item. */
176 /* Returns a pointer to the encoded buffer of a CFQ item. */
179 /* Returns the length of the encoded buffer in bytes. */
189 * QUIC Control Frame Queue
199 * ----------
203 * Enqueue a frame to the CFQ. encoded points to the opaque encoded frame.
205 * free_cb is called by the CFQ when the buffer is no longer needed;
209 * Higher numerical values for priority mean that a frame should come earlier in
213 * the queued frame. On failure, returns NULL.
215 * The frame is initially in the TX state, so there is no need to call
218 * The frame type is duplicated as the frame_type argument here, even though it
219 * is also encoded into the buffer. This allows the caller to determine the
220 * frame type if desired without having to decode the frame.
240 * allowing the frame to be retransmitted. If priority is not UINT32_MAX,
254 * -----------
266 * ossl_quic_cfq_get_priority_head(), returns the next-lower priority item.
274 --------------------------------------------------
276 
281 self-contained memory pool handing out `QUIC_TXPIM_PKT` structures. Each
282 `QUIC_TXPIM_PKT` is a self-contained data structure intended for consumption by
287 - Keeping track of all GCR control frames which were transmitted
290 - Keeping track of all REGEN-strategy control frame types, via a flag
291 for each frame type indicating whether the packet contained
292 such a frame.
294 - Keeping track of all stream IDs sent in a given packet, and
298 - Keeping track of what logical ranges of the CRYPTO stream were sent.
301 Manager's `QUIC_ACKM_TX_PKT` structure into its per-packet bookkeeping
321 /* ACKM-specific data. Caller should fill this. */
330 /* Regenerate-strategy frames. */
346 * start, designates a frame of zero length (used for FIN-only frames).
404 The Frame-in-Flight Dispatcher (FIFD)
405 -------------------------------------
409 implementations for the on-loss, on-acked and on-discarded callbacks issued by
426 - It references a CFQ used to manage CFQ items;
427 - It references an ACK manager which it informs of transmitted packets;
428 - It references a TXPIM which manages each `QUIC_TXPIM_PKT`;
429 - It is provided with a callback to obtain a QUIC Send Stream based on a stream
432 - It is provided with a callback which is called when it thinks a frame
459 void ossl_quic_fifd_cleanup(QUIC_FIFD *fifd); /* (no-op) */
465 ------------------------------------
467 - TX Packetiser maintains flags for each REGEN-strategy frame type.
469 and clears it when transmitting a packet containing such a frame.
471 - TX Packetiser obtains a `QUIC_TXPIM_PKT` structure by calling
474 - TX Packetiser fills in the ACKM part of the `QUIC_TXPIM_PKT`
478 - TX Packetiser queries the ACK Manager to determine if an ACK frame
481 - TX Packetiser queries the CFQ to determine what control frames it places
483 all CFQ frames are considered of higher priority). For each such frame
486 - calls `ossl_quic_txpim_pkt_add_cfq_item()` on the TXPIM to log the CFQ item
490 - For each STREAM or CRYPTO frame included in a packet, the TX Packetiser:
492 - informs the QUIC Send Stream instance for that stream that a range of bytes
495 - also informs the QUIC Send Stream instance if FIN was set on a STREAM frame.
497 - calls `ossl_quic_txpim_pkt_append_chunk()` to log a logical range of
502 - TX Packetiser calls `ossl_quic_fifd_pkt_commit()`. The FIFD takes care