diff options
Diffstat (limited to 'src/transport/gnunet-service-tng.c')
-rw-r--r-- | src/transport/gnunet-service-tng.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index bb477fc1e..ce16c1541 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c | |||
@@ -73,6 +73,9 @@ | |||
73 | * and high-latency links *if* we have the RAM [GOODPUT / utilization / stalls] | 73 | * and high-latency links *if* we have the RAM [GOODPUT / utilization / stalls] |
74 | * - Set last_window_consum_limit promise properly based on | 74 | * - Set last_window_consum_limit promise properly based on |
75 | * latency and bandwidth of the respective connection [GOODPUT / utilization / stalls] | 75 | * latency and bandwidth of the respective connection [GOODPUT / utilization / stalls] |
76 | * - Need to track total bandwidth per VirtualLink and adjust how frequently | ||
77 | * we send FC messages based on bandwidth-delay-product (and relation | ||
78 | * to the window size!). See OPTIMIZE-FC-BDP. | ||
76 | * | 79 | * |
77 | * Design realizations / discussion: | 80 | * Design realizations / discussion: |
78 | * - communicators do flow control by calling MQ "notify sent" | 81 | * - communicators do flow control by calling MQ "notify sent" |
@@ -4794,11 +4797,14 @@ consider_sending_fc (void *cls) | |||
4794 | struct GNUNET_TIME_Relative rtt; | 4797 | struct GNUNET_TIME_Relative rtt; |
4795 | 4798 | ||
4796 | duration = GNUNET_TIME_absolute_get_duration (vl->last_fc_transmission); | 4799 | duration = GNUNET_TIME_absolute_get_duration (vl->last_fc_transmission); |
4797 | /* FIXME: decide sane criteria on when to do this, instead of doing | 4800 | /* OPTIMIZE-FC-BDP: decide sane criteria on when to do this, instead of doing |
4798 | it always! */ | 4801 | it always! */ |
4799 | /* For example, we should probably ONLY do this if a bit more than | 4802 | /* For example, we should probably ONLY do this if a bit more than |
4800 | an RTT has passed, or if the window changed "significantly" since | 4803 | an RTT has passed, or if the window changed "significantly" since |
4801 | then. See vl->last_fc_rtt! */ | 4804 | then. See vl->last_fc_rtt! NOTE: to do this properly, we also |
4805 | need an estimate for the bandwidth-delay-product for the entire | ||
4806 | VL, as that determines "significantly". We have the delay, but | ||
4807 | the bandwidth statistics need to be added for the VL!*/ | ||
4802 | (void) duration; | 4808 | (void) duration; |
4803 | 4809 | ||
4804 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 4810 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -4827,6 +4833,7 @@ consider_sending_fc (void *cls) | |||
4827 | } | 4833 | } |
4828 | else | 4834 | else |
4829 | { | 4835 | { |
4836 | /* OPTIMIZE-FC-BDP: rtt is not ideal, we can do better! */ | ||
4830 | vl->last_fc_rtt = rtt; | 4837 | vl->last_fc_rtt = rtt; |
4831 | } | 4838 | } |
4832 | if (NULL != vl->fc_retransmit_task) | 4839 | if (NULL != vl->fc_retransmit_task) |