summaryrefslogtreecommitdiffstats
path: root/src/tests/vnet
diff options
context:
space:
mode:
authorYalei Wang <william.wangyalei@huawei.com>2018-08-09 10:09:38 +0800
committerFlorin Coras <florin.coras@gmail.com>2018-08-09 15:17:54 +0000
commitf7f4e399e04774a6ca00b67006610f5b8f7a37c6 (patch)
tree5a80f0f6137c14b91855782dd87108c216b8f8cb /src/tests/vnet
parenteabd607d3a58b6c54aeedf8b98e97bc7cb580a0f (diff)
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>
Diffstat (limited to 'src/tests/vnet')
-rw-r--r--src/tests/vnet/session/tcp_echo.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tests/vnet/session/tcp_echo.c b/src/tests/vnet/session/tcp_echo.c
index 6a5d8c4b034..f37a7272b23 100644
--- a/src/tests/vnet/session/tcp_echo.c
+++ b/src/tests/vnet/session/tcp_echo.c
@@ -621,7 +621,7 @@ send_test_chunk (echo_main_t * em, session_t * s)
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 @@ send_test_chunk (echo_main_t * em, session_t * s)
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,