tcp_echo: fix server rx buffer 27/14027/3
authorFlorin Coras <fcoras@cisco.com>
Tue, 7 Aug 2018 07:51:33 +0000 (00:51 -0700)
committerDave Barach <openvpp@barachs.net>
Mon, 13 Aug 2018 15:21:02 +0000 (15:21 +0000)
Change-Id: I7bb81259008f5d2da6e26405fd0774294181dc6b
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/tests/vnet/session/tcp_echo.c

index 59314f9..de17dca 100644 (file)
@@ -1386,8 +1386,6 @@ main (int argc, char **argv)
   /* make the main heap thread-safe */
   h->flags |= MHEAP_FLAG_THREAD_SAFE;
 
-  vec_validate (em->rx_buf, 128 << 10);
-
   memset (em, 0, sizeof (*em));
   em->session_index_by_vpp_handles = hash_create (0, sizeof (uword));
   em->my_pid = getpid ();
@@ -1396,6 +1394,7 @@ main (int argc, char **argv)
   em->use_sock_api = 1;
   em->fifo_size = 64 << 10;
   em->n_clients = 1;
+  vec_validate (em->rx_buf, 128 << 10);
 
   clib_time_init (&em->clib_time);
   init_error_string_table (em);