tfrc.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. #ifndef _LINUX_TFRC_H_
  3. #define _LINUX_TFRC_H_
  4. /*
  5. * TFRC - Data Structures for the TCP-Friendly Rate Control congestion
  6. * control mechanism as specified in RFC 3448.
  7. *
  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
  12. */
  13. #include <linux/types.h>
  14. /** tfrc_rx_info - TFRC Receiver Data Structure
  15. *
  16. * @tfrcrx_x_recv: receiver estimate of sending rate (3.2.2)
  17. * @tfrcrx_rtt: round-trip-time (communicated by sender)
  18. * @tfrcrx_p: current estimate of loss event rate (3.2.2)
  19. */
  20. struct tfrc_rx_info {
  21. __u32 tfrcrx_x_recv;
  22. __u32 tfrcrx_rtt;
  23. __u32 tfrcrx_p;
  24. };
  25. /** tfrc_tx_info - TFRC Sender Data Structure
  26. *
  27. * @tfrctx_x: computed transmit rate (4.3 (4))
  28. * @tfrctx_x_recv: receiver estimate of send rate (4.3)
  29. * @tfrctx_x_calc: return value of throughput equation (3.1)
  30. * @tfrctx_rtt: (moving average) estimate of RTT (4.3)
  31. * @tfrctx_p: current loss event rate (5.4)
  32. * @tfrctx_rto: estimate of RTO, equals 4*RTT (4.3)
  33. * @tfrctx_ipi: inter-packet interval (4.6)
  34. *
  35. * Note: X and X_recv are both maintained in units of 64 * bytes/second. This
  36. * enables a finer resolution of sending rates and avoids problems with
  37. * integer arithmetic; u32 is not sufficient as scaling consumes 6 bits.
  38. */
  39. struct tfrc_tx_info {
  40. __u64 tfrctx_x;
  41. __u64 tfrctx_x_recv;
  42. __u32 tfrctx_x_calc;
  43. __u32 tfrctx_rtt;
  44. __u32 tfrctx_p;
  45. __u32 tfrctx_rto;
  46. __u32 tfrctx_ipi;
  47. };
  48. #endif /* _LINUX_TFRC_H_ */