blob: a5acc768085da771e8815042a719f4a6b60f6206 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Arnaldo Carvalho de Melo65299d62005-09-18 00:18:32 -07002#ifndef _LINUX_TFRC_H_
3#define _LINUX_TFRC_H_
4/*
Gerrit Renkerd61c1672006-11-27 12:31:45 -02005 * TFRC - Data Structures for the TCP-Friendly Rate Control congestion
6 * control mechanism as specified in RFC 3448.
Arnaldo Carvalho de Melo65299d62005-09-18 00:18:32 -07007 *
8 * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand.
9 * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz>
10 * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
11 * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon
Arnaldo Carvalho de Melo65299d62005-09-18 00:18:32 -070012 */
Arnaldo Carvalho de Melo65299d62005-09-18 00:18:32 -070013#include <linux/types.h>
14
Gerrit Renkerd61c1672006-11-27 12:31:45 -020015/** tfrc_rx_info - TFRC Receiver Data Structure
16 *
17 * @tfrcrx_x_recv: receiver estimate of sending rate (3.2.2)
18 * @tfrcrx_rtt: round-trip-time (communicated by sender)
19 * @tfrcrx_p: current estimate of loss event rate (3.2.2)
20 */
Arnaldo Carvalho de Melo65299d62005-09-18 00:18:32 -070021struct tfrc_rx_info {
22 __u32 tfrcrx_x_recv;
23 __u32 tfrcrx_rtt;
24 __u32 tfrcrx_p;
25};
26
Gerrit Renkerd61c1672006-11-27 12:31:45 -020027/** tfrc_tx_info - TFRC Sender Data Structure
28 *
29 * @tfrctx_x: computed transmit rate (4.3 (4))
30 * @tfrctx_x_recv: receiver estimate of send rate (4.3)
31 * @tfrctx_x_calc: return value of throughput equation (3.1)
32 * @tfrctx_rtt: (moving average) estimate of RTT (4.3)
33 * @tfrctx_p: current loss event rate (5.4)
34 * @tfrctx_rto: estimate of RTO, equals 4*RTT (4.3)
35 * @tfrctx_ipi: inter-packet interval (4.6)
Gerrit Renker1a21e492006-12-10 00:02:12 -020036 *
37 * Note: X and X_recv are both maintained in units of 64 * bytes/second. This
38 * enables a finer resolution of sending rates and avoids problems with
39 * integer arithmetic; u32 is not sufficient as scaling consumes 6 bits.
Gerrit Renkerd61c1672006-11-27 12:31:45 -020040 */
Arnaldo Carvalho de Melo65299d62005-09-18 00:18:32 -070041struct tfrc_tx_info {
Gerrit Renker1a21e492006-12-10 00:02:12 -020042 __u64 tfrctx_x;
43 __u64 tfrctx_x_recv;
Arnaldo Carvalho de Melo65299d62005-09-18 00:18:32 -070044 __u32 tfrctx_x_calc;
45 __u32 tfrctx_rtt;
46 __u32 tfrctx_p;
47 __u32 tfrctx_rto;
48 __u32 tfrctx_ipi;
49};
50
51#endif /* _LINUX_TFRC_H_ */