Lines Matching full:packet
63 Lower-level packet transport is implemented in the *packet transport layer
66 the packet transport logic and handles things like packet validation, packet
67 acknowledgment (ACKing), packet (retransmission) timeouts, and relaying
68 packet payloads to higher-level layers.
71 around command-type packet payloads, i.e. requests (sent from host to EC),
97 Packet Transport Layer
100 The packet transport layer is represented via |ssh_ptl| and is structured
107 managed by the packet transport layer, which is essentially the lowest layer
113 This structure contains the required fields to manage the packet inside the
118 counter reaches zero, the ``release()`` callback provided to the packet via
120 packet or its enclosing structure (e.g. |ssh_request|).
123 provides a ``complete()`` callback, which is run once the packet has been
125 or a negative errno value in case of an error. Once the packet has been
126 submitted to the packet transport layer, the ``complete()`` callback is
128 packet will always be completed, either successfully, with an error, or due
131 The state of a packet is managed via its ``state`` flags
132 (|ssh_packet_flags|), which also contains the packet type. In particular,
137 references of the packet should be taken and any existing references
139 responsible for removing any references to this packet from the packet
146 * ``SSH_PACKET_SF_QUEUED_BIT``: This bit is set when the packet is queued on
147 the packet queue and cleared when it is dequeued.
149 * ``SSH_PACKET_SF_PENDING_BIT``: This bit is set when the packet is added to
152 Packet Queue
155 The packet queue is the first of the two fundamental collections in the
156 packet transport layer. It is a priority queue, with priority of the
157 respective packets based on the packet type (major) and number of tries
169 packet transport layer. It stores references to packets that have already
171 packet) by the EC.
173 Note that a packet may both be pending and queued if it has been
174 re-submitted due to a packet acknowledgment timeout or NAK. On such a
181 packet transmission. In each iteration, it (waits for and) checks if the
182 next packet on the queue (if any) can be transmitted and, if so, removes it
184 attempts, i.e. tries. If the packet is sequenced, i.e. requires an ACK by
185 the EC, the packet is added to the pending set. Next, the packet's data is
187 this submission, the packet is completed by the transmitter thread with the
188 status value of the callback set accordingly. In case the packet is
189 unsequenced, i.e. does not require an ACK by the EC, the packet is completed
208 to the corresponding pending packet (via sequence ID) and completing it, as
212 the successful completion of a sequenced packet will always run on the
222 The packet acknowledgment timeout is a per-packet timeout for sequenced
223 packets, started when the respective packet begins (re-)transmission (i.e.
226 has been exceeded, cancellation of the packet in question.
229 work item (re-)scheduled to run when the next packet is set to time out. The
234 If a timeout has been detected by the reaper, the packet will either be
237 triggered by receival of a NAK, means that the packet is added to the queue
239 timeout for the packet will be disabled until the next transmission attempt
240 and the packet remains on the pending set.
242 Note that due to transmission and packet acknowledgment timeouts, the packet
249 There are two main locks in the packet transport layer: One guarding access
250 to the packet queue and one guarding access to the pending set. These
255 In addition to guarding the collections, after initial packet submission
256 certain packet fields may only be accessed under one of the locks.
257 Specifically, the packet priority must only be accessed while holding the
258 queue lock and the packet timestamp must only be accessed while holding the
261 Other parts of the packet transport layer are guarded independently. State
266 The reference of the packet to the packet transport layer (``ptl``) is
268 or, if there is none, when the packet is first submitted. After it is set,
274 Some packet fields may be read outside of the respective locks guarding
279 With respect to the interface for higher layers, packet submission
280 (|ssh_ptl_submit|), packet cancellation (|ssh_ptl_cancel|), data receival
282 executed concurrently with respect to each other. Note that packet
283 submission may not run concurrently with itself for the same packet.
292 of the packet transport layer. It deals with requests, i.e. SSH packets sent
311 reference counter inside the packet struct (which can be accessed via
326 completion will occur once the underlying packet has been successfully
327 transmitted by the packet transport layer (i.e. from within the packet
330 via its request ID (which happens on the packet layer's data-received
360 request transport layer. In contrast to the packet queue of the packet
377 pending set of the packet transport layer does for packets).
384 transmitted and, if so, submits its underlying packet to the packet
388 before its packet is submitted.
390 Packet Completion Callback
393 The packet completion callback is executed once the underlying packet of a
398 On successful packet completion, further processing depends on the request.
407 being received by the underlying packet transport layer via a data-type
422 on a response from the EC and is started after the underlying packet has
425 This timeout is, similar to the packet acknowledgment timeout on the packet
433 Note that this timeout, in combination with packet transmission and
440 Similar to the packet transport layer, there are two main locks in the
540 installed in the request layer (running on the receiver thread of the packet