svm_fifo rework to avoid contention on cursize
[vpp.git] / src / plugins / unittest / tcp_test.c
index 842f28a..c8d9d5f 100644 (file)
@@ -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;
@@ -1221,8 +1221,7 @@ tcp_test_fifo3 (vlib_main_t * vm, unformat_input_t * input)
 
   /* manually set head and tail pointers to validate modular arithmetic */
   fifo_initial_offset = fifo_initial_offset % fifo_size;
-  f->head = fifo_initial_offset;
-  f->tail = fifo_initial_offset;
+  svm_fifo_init_pointers (f, fifo_initial_offset);
 
   for (i = !randomize; i < vec_len (generate); i++)
     {
@@ -1635,7 +1634,7 @@ tcp_test_fifo (vlib_main_t * vm, unformat_input_t * input)
 static int
 tcp_test_lookup (vlib_main_t * vm, unformat_input_t * input)
 {
-  session_manager_main_t *smm = &session_manager_main;
+  session_main_t *smm = &session_main;
   tcp_main_t *tm = &tcp_main;
   transport_connection_t _tc1, *tc1 = &_tc1, _tc2, *tc2 = &_tc2, *tconn;
   tcp_connection_t *tc;