Lines Matching +full:packet +full:- +full:based
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Packet RX/TX history data structures and routines for TFRC-based protocols.
6 * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand.
10 * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz
14 * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon
31 * tfrc_tx_hist_entry - Simple singly-linked TX history list
34 * @stamp: send time of packet with sequence number @seqno
45 while (head != NULL && head->seqno != seqno) in tfrc_tx_hist_find_entry()
46 head = head->next; in tfrc_tx_hist_find_entry()
53 /* Subtraction a-b modulo-16, respects circular wrap-around */
54 #define SUB16(a, b) (((a) + 16 - (b)) & 0xF)
56 /* Number of packets to wait after a missing packet (RFC 4342, 6.1) */
60 * tfrc_rx_hist_entry - Store information about a single received packet
61 * @tfrchrx_seqno: DCCP packet sequence number
62 * @tfrchrx_ccval: window counter value of packet (RFC 4342, 8.1)
63 * @tfrchrx_ndp: the NDP count (if any) of the packet
64 * @tfrchrx_tstamp: actual receive time of packet
75 * tfrc_rx_hist - RX history structure for TFRC-based protocols
76 * @ring: Packet history for RTT sampling and loss detection
89 * tfrc_rx_hist_index - index to reach n-th entry after loss_start
93 return (h->loss_start + n) & TFRC_NDUPACK; in tfrc_rx_hist_index()
97 * tfrc_rx_hist_last_rcv - entry with highest-received-seqno so far
102 return h->ring[tfrc_rx_hist_index(h, h->loss_count)]; in tfrc_rx_hist_last_rcv()
106 * tfrc_rx_hist_entry - return the n-th history entry after loss_start
111 return h->ring[tfrc_rx_hist_index(h, n)]; in tfrc_rx_hist_entry()
115 * tfrc_rx_hist_loss_prev - entry with highest-received-seqno before loss was detected
120 return h->ring[h->loss_start]; in tfrc_rx_hist_loss_prev()
123 /* indicate whether previously a packet was detected missing */
126 return h->loss_count > 0; in tfrc_rx_hist_loss_pending()