Lines Matching +full:in +full:- +full:flight
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
22 --------------------------------------------------
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)
52 retransmission in the event of loss:
54 - **GCR** (Generic Control Frame Retransmission): The raw bytes of
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
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
93 can be informed of lost or acked ranges in the stream.
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
111 -----------------------------
113 
115 The CFQ (`QUIC_CFQ`) stores encoded frames which can be blindly retransmitted in
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.
131 - A state, which is either `NEW` or `TX`. Frames added to the CFQ have
133 to the `TX` state. If the packet it was sent in is subsequently lost,
136 Frames in the `NEW` state participate in a priority queue (the NEW queue)
137 according to their priority and the CFQ's NEW queue can be iterated in priority
162 * TXPIM in keeping a list of GCR control frames which were sent in a
179 /* Returns the length of the encoded buffer in bytes. */
199 * ----------
208 * priority determines the relative ordering of control frames in a packet.
209 * Higher numerical values for priority mean that a frame should come earlier in
215 * The frame is initially in the TX state, so there is no need to call
247 * Releases a CFQ item. The item may be in either state (NEW or TX) prior to the
254 * -----------
258 * Gets the highest priority CFQ item in the given PN space awaiting
264 * Given a CFQ item, gets the next CFQ item awaiting transmission in priority
265 * order in the given PN space. In other words, given the return value of
266 * ossl_quic_cfq_get_priority_head(), returns the next-lower priority item.
267 * Returns NULL if the given item is the last item in priority order.
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
288 in each packet, via a linked list of `QUIC_CFQ_ITEM`s.
290 - Keeping track of all REGEN-strategy control frame types, via a flag
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.
300 In order to avoid unnecessary allocations, the FIFM also incorporates the ACK
301 Manager's `QUIC_ACKM_TX_PKT` structure into its per-packet bookkeeping
304 a `QUIC_TXPIM_PKT` structure from the TXPIM, fill in the structure including
309 in the TXPIM is made by the FIFD.
321 /* ACKM-specific data. Caller should fill this. */
324 /* Linked list of CFQ items in this packet. */
330 /* Regenerate-strategy frames. */
340 /* Represents a range of bytes in an application or CRYPTO stream. */
345 * The inclusive range of bytes in the stream. Exceptionally, if end <
346 * start, designates a frame of zero length (used for FIN-only frames).
350 * Whether a FIN was sent for this stream in the packet. Not valid for
361 * failure. The returned structure is cleared of all data and is in a fresh
387 * The chunks are sorted by (stream_id, start) in ascending order.
392 * Returns the number of entries in the array returned by
404 The Frame-in-Flight Dispatcher (FIFD)
405 -------------------------------------
409 implementations for the on-loss, on-acked and on-discarded callbacks issued by
412 The FIFD is used by obtaining a packet structure from the TXPIM, filling it in,
418 made of the information in the `QUIC_TXPIM_PKT` and the `QUIC_TXPIM_PKT` is
423 subsystems in the event of a packet being acked, lost or discarded. In
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
434 to a given stream, in which case a stream ID is specified.
436 All of the state is in the dependencies referenced by the FIFD. The FIFD itself
459 void ossl_quic_fifd_cleanup(QUIC_FIFD *fifd); /* (no-op) */
465 ------------------------------------
467 - TX Packetiser maintains flags for each REGEN-strategy frame type.
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
482 in a packet. It does this before adding STREAM or CRYPTO frames (i.e.,
484 it places in a packet, it:
486 - calls `ossl_quic_txpim_pkt_add_cfq_item()` on the TXPIM to log the CFQ item
487 as having been transmitted in the given packet, so that the CFQ item can be
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
508 In the event of packet loss, ACK or discard, the appropriate QUIC Send Stream,