Blame view

include/linux/tfrc.h 1.68 KB
2874c5fd2   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-or-later */
65299d6c3   Arnaldo Carvalho de Melo   [CCID3]: Introduc...
2
3
4
  #ifndef _LINUX_TFRC_H_
  #define _LINUX_TFRC_H_
  /*
d61c167dd   Gerrit Renker   [NET]: Add docume...
5
6
   *  TFRC - Data Structures for the TCP-Friendly Rate Control congestion
   *         control mechanism as specified in RFC 3448.
65299d6c3   Arnaldo Carvalho de Melo   [CCID3]: Introduc...
7
8
9
10
11
   *
   *  Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand.
   *  Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz>
   *  Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
   *  Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon
65299d6c3   Arnaldo Carvalho de Melo   [CCID3]: Introduc...
12
   */
65299d6c3   Arnaldo Carvalho de Melo   [CCID3]: Introduc...
13
  #include <linux/types.h>
d61c167dd   Gerrit Renker   [NET]: Add docume...
14
15
16
17
18
19
  /** 	tfrc_rx_info    -    TFRC Receiver Data Structure
   *
   * 	@tfrcrx_x_recv:	receiver estimate of sending rate (3.2.2)
   * 	@tfrcrx_rtt:	round-trip-time (communicated by sender)
   * 	@tfrcrx_p:	current estimate of loss event rate (3.2.2)
   */
65299d6c3   Arnaldo Carvalho de Melo   [CCID3]: Introduc...
20
21
22
23
24
  struct tfrc_rx_info {
    	__u32 tfrcrx_x_recv;
  	__u32 tfrcrx_rtt;
    	__u32 tfrcrx_p;
  };
d61c167dd   Gerrit Renker   [NET]: Add docume...
25
26
27
28
29
30
31
32
33
  /** 	tfrc_tx_info    -    TFRC Sender Data Structure
   *
   * 	@tfrctx_x:	computed transmit rate (4.3 (4))
   * 	@tfrctx_x_recv: receiver estimate of send rate (4.3)
   * 	@tfrctx_x_calc:	return value of throughput equation (3.1)
   * 	@tfrctx_rtt:	(moving average) estimate of RTT (4.3)
   * 	@tfrctx_p:	current loss event rate (5.4)
   * 	@tfrctx_rto:	estimate of RTO, equals 4*RTT (4.3)
   * 	@tfrctx_ipi:	inter-packet interval (4.6)
1a21e49a8   Gerrit Renker   [DCCP] ccid3: Fin...
34
35
36
37
   *
   *  Note: X and X_recv are both maintained in units of 64 * bytes/second. This
   *        enables a finer resolution of sending rates and avoids problems with
   *        integer arithmetic; u32 is not sufficient as scaling consumes 6 bits.
d61c167dd   Gerrit Renker   [NET]: Add docume...
38
   */
65299d6c3   Arnaldo Carvalho de Melo   [CCID3]: Introduc...
39
  struct tfrc_tx_info {
1a21e49a8   Gerrit Renker   [DCCP] ccid3: Fin...
40
41
  	__u64 tfrctx_x;
  	__u64 tfrctx_x_recv;
65299d6c3   Arnaldo Carvalho de Melo   [CCID3]: Introduc...
42
43
44
45
46
47
48
49
  	__u32 tfrctx_x_calc;
  	__u32 tfrctx_rtt;
  	__u32 tfrctx_p;
  	__u32 tfrctx_rto;
  	__u32 tfrctx_ipi;
  };
  
  #endif /* _LINUX_TFRC_H_ */