aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-06-26 09:12:34 -0700
committerJohn Lo <loj@cisco.com>2019-07-10 22:17:36 +0000
commit85fc13004df7f67012a04e73564ecef1b3641ef3 (patch)
treecc50b441d83b6c86ebeb1db51ff66dee83e9e2a4 /src/plugins
parentadbaf7bc2e301e591d63fae47f0a9bbb1577494e (diff)
tcp: improve rate estimate
Type:feature - sample rtt estimation - report acked+sacked - report last lost bytes - use snd_una == snd_nxt to detect 0 bytes in flight Change-Id: I83181261fdb375c7e33d24b7a82343561e6a905f Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/unittest/tcp_test.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/plugins/unittest/tcp_test.c b/src/plugins/unittest/tcp_test.c
index 7d0d229f3ca..6f765e7a4fc 100644
--- a/src/plugins/unittest/tcp_test.c
+++ b/src/plugins/unittest/tcp_test.c
@@ -857,9 +857,9 @@ tcp_test_delivery (vlib_main_t * vm, unformat_input_t * input)
TCP_TEST (pool_elts (bt->samples) == 0, "sample should've been consumed");
TCP_TEST (tc->delivered_time == 2, "delivered time should be 2");
TCP_TEST (tc->delivered == burst, "delivered should be 100");
- TCP_TEST (rs->ack_time == 1, "ack time should be 1");
+ TCP_TEST (rs->interval_time == 1, "ack time should be 1");
TCP_TEST (rs->delivered == burst, "delivered should be 100");
- TCP_TEST (rs->sample_delivered == 0, "sample delivered should be 0");
+ TCP_TEST (rs->prior_delivered == 0, "sample delivered should be 0");
TCP_TEST (approx_equal (rate, rs->tx_rate), "rate should be %u is %u", rate,
rs->tx_rate);
TCP_TEST (!(rs->flags & TCP_BTS_IS_RXT), "not retransmitted");
@@ -897,9 +897,9 @@ tcp_test_delivery (vlib_main_t * vm, unformat_input_t * input)
TCP_TEST (tc->delivered_time == 4, "delivered time should be 4");
TCP_TEST (tc->delivered == 3 * burst, "delivered should be 300 is %u",
tc->delivered);
- TCP_TEST (rs->ack_time == 2, "ack time should be 2");
+ TCP_TEST (rs->interval_time == 2, "ack time should be 2");
TCP_TEST (rs->delivered == 2 * burst, "delivered should be 200");
- TCP_TEST (rs->sample_delivered == burst, "delivered should be 100");
+ TCP_TEST (rs->prior_delivered == burst, "delivered should be 100");
TCP_TEST (approx_equal (rate, rs->tx_rate), "rate should be %u is %u", rate,
rs->tx_rate);
TCP_TEST (!(rs->flags & TCP_BTS_IS_RXT), "not retransmitted");
@@ -964,9 +964,10 @@ tcp_test_delivery (vlib_main_t * vm, unformat_input_t * input)
3 * burst + 30, tc->delivered);
/* All 3 samples have the same delivered number of bytes. So the first is
* the reference for delivery estimate. */
- TCP_TEST (rs->ack_time == 4, "ack time should be 4 is %.2f", rs->ack_time);
+ TCP_TEST (rs->interval_time == 4, "ack time should be 4 is %.2f",
+ rs->interval_time);
TCP_TEST (rs->delivered == 30, "delivered should be 30");
- TCP_TEST (rs->sample_delivered == 3 * burst,
+ TCP_TEST (rs->prior_delivered == 3 * burst,
"sample delivered should be %u", 3 * burst);
TCP_TEST (approx_equal (rate, rs->tx_rate), "rate should be %u is %u", rate,
rs->tx_rate);
@@ -1045,11 +1046,12 @@ tcp_test_delivery (vlib_main_t * vm, unformat_input_t * input)
TCP_TEST (tc->delivered == 5 * burst + 40, "delivered should be %u is %u",
5 * burst + 40, tc->delivered);
/* A rxt was acked and delivered time for it is 8 (last ack time) */
- TCP_TEST (rs->ack_time == 2, "ack time should be 2 is %.2f", rs->ack_time);
+ TCP_TEST (rs->interval_time == 2, "ack time should be 2 is %.2f",
+ rs->interval_time);
/* delivered_now - delivered_rxt ~ 5 * burst + 40 - 3 * burst - 30 */
TCP_TEST (rs->delivered == 2 * burst + 10, "delivered should be 210 is %u",
rs->delivered);
- TCP_TEST (rs->sample_delivered == 3 * burst + 30,
+ TCP_TEST (rs->prior_delivered == 3 * burst + 30,
"sample delivered should be %u", 3 * burst + 30);
TCP_TEST (approx_equal (rate, rs->tx_rate), "rate should be %u is %u", rate,
rs->tx_rate);
@@ -1077,12 +1079,13 @@ tcp_test_delivery (vlib_main_t * vm, unformat_input_t * input)
TCP_TEST (tc->delivered == 7 * burst, "delivered should be %u is %u",
7 * burst, tc->delivered);
/* Last rxt was at time 8 */
- TCP_TEST (rs->ack_time == 3, "ack time should be 3 is %.2f", rs->ack_time);
+ TCP_TEST (rs->interval_time == 3, "ack time should be 3 is %.2f",
+ rs->interval_time);
/* delivered_now - delivered_rxt ~ 7 * burst - 3 * burst - 30.
* That's because we didn't retransmit any new segment. */
TCP_TEST (rs->delivered == 4 * burst - 30, "delivered should be 160 is %u",
rs->delivered);
- TCP_TEST (rs->sample_delivered == 3 * burst + 30,
+ TCP_TEST (rs->prior_delivered == 3 * burst + 30,
"sample delivered should be %u", 3 * burst + 30);
TCP_TEST (approx_equal (rate, rs->tx_rate), "rate should be %u is %u", rate,
rs->tx_rate);