Fix the fifo-size limitation in tcp_echo
Correct the size verification when send_test_chuck, tcp send process
will not be broken when avalable fifo queue size less then the
min_chuck.
Change-Id: Ide13169283c0311cf2fb18d2606bc869065a2a1b
Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
diff --git a/src/tests/vnet/session/tcp_echo.c b/src/tests/vnet/session/tcp_echo.c
index 6a5d8c4..f37a727 100644
--- a/src/tests/vnet/session/tcp_echo.c
+++ b/src/tests/vnet/session/tcp_echo.c
@@ -621,7 +621,7 @@
u64 test_buf_len, bytes_this_chunk, test_buf_offset;
svm_fifo_t *tx_fifo = s->server_tx_fifo;
u8 *test_data = em->connect_test_data;
- u32 enq_space, min_chunk = 16 << 10;
+ u32 enq_space = 16 << 10;
int written;
test_buf_len = vec_len (test_data);
@@ -629,8 +629,6 @@
bytes_this_chunk = clib_min (test_buf_len - test_buf_offset,
s->bytes_to_send);
enq_space = svm_fifo_max_enqueue (tx_fifo);
- if (enq_space < clib_min (bytes_this_chunk, min_chunk))
- return;
bytes_this_chunk = clib_min (bytes_this_chunk, enq_space);
written = svm_fifo_enqueue_nowait (tx_fifo, bytes_this_chunk,