summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/tcp_test.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-12 18:58:54 -0700
committerDamjan Marion <dmarion@me.com>2019-03-22 17:30:29 +0000
commit4759683744d079f868a6bcca8084eba8466620d7 (patch)
tree6795035edf69463107dfbaa54eae3183cdc62356 /src/plugins/unittest/tcp_test.c
parent881d13ede7336e5b16601033e5dd9aeb94c795e3 (diff)
tcp: improve handling of snd_nxt
- avoid changing snd_nxt when doing fast retransmits - use snd_una_max only to keep track of the max seq number sent - simplify future ack testing Change-Id: I3580ad3aefe30128486c3375d0ac3f3f62c04c5e 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/unittest/tcp_test.c b/src/plugins/unittest/tcp_test.c
index c144de4398d..fb01adb6c1f 100644
--- a/src/plugins/unittest/tcp_test.c
+++ b/src/plugins/unittest/tcp_test.c
@@ -239,7 +239,7 @@ tcp_test_sack_rx (vlib_main_t * vm, unformat_input_t * input)
*/
vec_reset_length (tc->rcv_opts.sacks);
tc->snd_una += sb->snd_una_adv;
- tc->snd_una_max = 1900;
+ tc->snd_nxt = tc->snd_una_max = 1900;
for (i = 0; i < 5; i++)
{
block.start = i * 100 + 1200;
@@ -416,7 +416,7 @@ tcp_test_sack_rx (vlib_main_t * vm, unformat_input_t * input)
* snd_una = 1000 and snd_una_max = 1600
*/
tc->snd_una = 1000;
- tc->snd_una_max = 1600;
+ tc->snd_nxt = tc->snd_una_max = 1600;
vec_reset_length (tc->rcv_opts.sacks);
block.start = 1200;
block.end = 1500;