transport_ats_years.diff 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. Index: src/ats/ats_api_scheduling.c
  2. ===================================================================
  3. --- src/ats/ats_api_scheduling.c (revision 29617)
  4. +++ src/ats/ats_api_scheduling.c (working copy)
  5. @@ -28,7 +28,7 @@
  6. #include "ats.h"
  7. -#define INTERFACE_PROCESSING_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
  8. +#define INTERFACE_PROCESSING_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 1)
  9. #define NOT_FOUND 0
  10. Index: src/ats/gnunet-service-ats-solver_proportional.c
  11. ===================================================================
  12. --- src/ats/gnunet-service-ats-solver_proportional.c (revision 29617)
  13. +++ src/ats/gnunet-service-ats-solver_proportional.c (working copy)
  14. @@ -205,12 +205,12 @@
  15. *
  16. */
  17. -#define PREF_AGING_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
  18. +#define PREF_AGING_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 10)
  19. #define PREF_AGING_FACTOR 0.95
  20. #define DEFAULT_REL_PREFERENCE 1.0
  21. #define DEFAULT_ABS_PREFERENCE 0.0
  22. -#define MIN_UPDATE_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
  23. +#define MIN_UPDATE_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 10)
  24. /**
  25. * A handle for the proportional solver
  26. Index: src/ats/gnunet-service-ats_normalization.h
  27. ===================================================================
  28. --- src/ats/gnunet-service-ats_normalization.h (revision 29617)
  29. +++ src/ats/gnunet-service-ats_normalization.h (working copy)
  30. @@ -27,7 +27,7 @@
  31. #include "platform.h"
  32. #include "gnunet_ats_service.h"
  33. -#define PREF_AGING_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
  34. +#define PREF_AGING_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 10)
  35. #define PREF_AGING_FACTOR 0.95
  36. #define PREF_EPSILON 0.1
  37. Index: src/include/gnunet_constants.h
  38. ===================================================================
  39. --- src/include/gnunet_constants.h (revision 29617)
  40. +++ src/include/gnunet_constants.h (working copy)
  41. @@ -49,7 +49,7 @@
  42. * After how long do we consider a connection to a peer dead
  43. * if we don't receive messages from the peer?
  44. */
  45. -#define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
  46. +#define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 5)
  47. /**
  48. * How long do we delay reading more from a peer after a quota violation?
  49. @@ -61,7 +61,7 @@
  50. * even if we assume that the service commonly does not
  51. * respond instantly (DNS, Database, etc.).
  52. */
  53. -#define GNUNET_CONSTANTS_SERVICE_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 10)
  54. +#define GNUNET_CONSTANTS_SERVICE_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 10)
  55. /**
  56. * How long do we delay messages to get larger packet sizes (CORKing)?
  57. Index: src/transport/gnunet-service-transport_neighbours.c
  58. ===================================================================
  59. --- src/transport/gnunet-service-transport_neighbours.c (revision 29617)
  60. +++ src/transport/gnunet-service-transport_neighbours.c (working copy)
  61. @@ -65,7 +65,7 @@
  62. * send 3 keepalives in each interval, so 3 messages would need to be
  63. * lost in a row for a disconnect).
  64. */
  65. -#define KEEPALIVE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100)
  66. +#define KEEPALIVE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 100)
  67. /**
  68. * How long are we willing to wait for a response from ATS before timing out?
  69. Index: src/transport/gnunet-service-transport_validation.c
  70. ===================================================================
  71. --- src/transport/gnunet-service-transport_validation.c (revision 29617)
  72. +++ src/transport/gnunet-service-transport_validation.c (working copy)
  73. @@ -42,7 +42,7 @@
  74. * OTOH, we don't want to spend too much time generating PONG signatures,
  75. * so they must have some lifetime to reduce our CPU usage.
  76. */
  77. -#define PONG_SIGNATURE_LIFETIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1)
  78. +#define PONG_SIGNATURE_LIFETIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12)
  79. /**
  80. * After how long do we expire an address in a HELLO that we just
  81. @@ -57,7 +57,7 @@
  82. * we cannot validate (because after this time we can destroy the
  83. * validation record).
  84. */
  85. -#define UNVALIDATED_PING_KEEPALIVE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
  86. +#define UNVALIDATED_PING_KEEPALIVE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4)
  87. /**
  88. * How often do we PING an address that we have successfully validated
  89. @@ -64,17 +64,17 @@
  90. * in the past but are not actively using? Should be (significantly)
  91. * smaller than HELLO_ADDRESS_EXPIRATION.
  92. */
  93. -#define VALIDATED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15)
  94. +#define VALIDATED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 6)
  95. /**
  96. * How often do we PING an address that we are currently using?
  97. */
  98. -#define CONNECTED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2)
  99. +#define CONNECTED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 2)
  100. /**
  101. * How much delay is acceptable for sending the PING or PONG?
  102. */
  103. -#define ACCEPTABLE_PING_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
  104. +#define ACCEPTABLE_PING_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1)
  105. /**
  106. * Size of the validation map hashmap.
  107. @@ -807,7 +807,7 @@
  108. */
  109. validation_next = GNUNET_TIME_absolute_get();
  110. - validation_delay.rel_value_us = (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2);
  111. + validation_delay.rel_value_us = GNUNET_TIME_UNIT_MILLISECONDS.rel_value_us;
  112. validations_fast_start_threshold = (max_fds / 2);
  113. validations_running = 0;
  114. GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Validation uses a fast start threshold of %u connections and a delay between of %s\n ",