summaryrefslogtreecommitdiffstats
path: root/libtransport/src
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-12-02 12:49:15 +0000
committerGerrit Code Review <gerrit@fd.io>2019-12-02 12:49:15 +0000
commit8bda9d94b95bf32d930655398bfe7e160541afde (patch)
tree3f95668e1419533f95011b220f40ff878d398477 /libtransport/src
parent5822f2e2d52c3f471b91e526b9404146e038ef1b (diff)
parentb76d14df5b02b89fa4b96a6d8b91dbb7ea2f6c5a (diff)
Merge "[HICN-425] RTC min window"
Diffstat (limited to 'libtransport/src')
-rw-r--r--libtransport/src/hicn/transport/protocols/rtc.cc6
-rw-r--r--libtransport/src/hicn/transport/protocols/rtc.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/libtransport/src/hicn/transport/protocols/rtc.cc b/libtransport/src/hicn/transport/protocols/rtc.cc
index 4d8e4c514..c9993ac1c 100644
--- a/libtransport/src/hicn/transport/protocols/rtc.cc
+++ b/libtransport/src/hicn/transport/protocols/rtc.cc
@@ -356,6 +356,9 @@ void RTCTransportProtocol::computeMaxWindow(uint32_t productionRate,
} else {
maxCWin_ = min(maxWaintingInterest, maxCWin_);
}
+
+ if(maxCWin_ < HICN_MIN_CWIN)
+ maxCWin_ = HICN_MIN_CWIN;
}
void RTCTransportProtocol::updateWindow() {
@@ -368,6 +371,9 @@ void RTCTransportProtocol::updateWindow() {
currentCWin_ =
max((uint32_t)(currentCWin_ * HICN_WIN_DECREASE_FACTOR), HICN_MIN_CWIN);
}
+
+ if(currentCWin_ < HICN_MIN_CWIN)
+ currentCWin_ = HICN_MIN_CWIN;
}
void RTCTransportProtocol::decreaseWindow() {
diff --git a/libtransport/src/hicn/transport/protocols/rtc.h b/libtransport/src/hicn/transport/protocols/rtc.h
index 46063d041..697459bb7 100644
--- a/libtransport/src/hicn/transport/protocols/rtc.h
+++ b/libtransport/src/hicn/transport/protocols/rtc.h
@@ -54,12 +54,12 @@
// cwin
#define HICN_INITIAL_CWIN 1 // packets
#define HICN_INITIAL_CWIN_MAX 100000 // packets
-#define HICN_MIN_CWIN 5 // packets
+#define HICN_MIN_CWIN 10 // packets
#define HICN_WIN_INCREASE_FACTOR 1.1
#define HICN_WIN_DECREASE_FACTOR 0.8
// statistics constants
-#define HICN_BANDWIDTH_SLACK_FACTOR 1.5
+#define HICN_BANDWIDTH_SLACK_FACTOR 1.8
#define HICN_ESTIMATED_BW_ALPHA 0.7
#define HICN_ESTIMATED_PACKET_SIZE 0.7
#define HICN_ESTIMATED_LOSSES_ALPHA 0.8