summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/tcp_test.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-07-29 23:03:39 -0700
committerDave Barach <openvpp@barachs.net>2020-08-20 16:58:33 +0000
commitcc4d6d022fb0d4b4f0ea9f63e9c6b1c0e8d95cca (patch)
tree502798f83b8cbfe1cd3c697960d2633c79d9bbfa /src/plugins/unittest/tcp_test.c
parentad1e455f4d27624f79ca441114932e274cda8ab1 (diff)
tcp: track reorder with sacks
Type: feature Change-Id: I041bff2e8d589c171661de286fa1503531dff891 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/plugins/unittest/tcp_test.c')
-rw-r--r--src/plugins/unittest/tcp_test.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/unittest/tcp_test.c b/src/plugins/unittest/tcp_test.c
index b98d360ca51..3db04050136 100644
--- a/src/plugins/unittest/tcp_test.c
+++ b/src/plugins/unittest/tcp_test.c
@@ -505,7 +505,9 @@ tcp_test_sack_rx (vlib_main_t * vm, unformat_input_t * input)
sb->last_sacked_bytes);
TCP_TEST ((sb->last_bytes_delivered == 0), "last bytes delivered %d",
sb->last_bytes_delivered);
+ /* Hole should be split in 2 lost holes that add up to 300 */
TCP_TEST ((sb->lost_bytes == 300), "lost bytes %u", sb->lost_bytes);
+ TCP_TEST ((sb->reorder == 7), "reorder %u", sb->reorder);
/*
* Ack [100 300] in two steps
@@ -590,7 +592,9 @@ tcp_test_sack_rx (vlib_main_t * vm, unformat_input_t * input)
sb->last_sacked_bytes);
TCP_TEST ((sb->last_bytes_delivered == 0), "last bytes delivered %d",
sb->last_bytes_delivered);
- TCP_TEST ((sb->lost_bytes == 200), "lost bytes %u", sb->lost_bytes);
+ /* No bytes lost because of reorder */
+ TCP_TEST ((sb->lost_bytes == 0), "lost bytes %u", sb->lost_bytes);
+ TCP_TEST ((sb->reorder == 7), "reorder %u", sb->reorder);
TCP_TEST ((!sb->is_reneging), "is not reneging");
/*