summaryrefslogtreecommitdiffstats
path: root/src/uri
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-03-04 05:37:52 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-10 19:24:57 +0000
commitd79b41e993981df80245b0e6d90eb691bdaae648 (patch)
tree44f9a96c04dfab309fbf8a06369446620da35188 /src/uri
parent8d55247297a335241097cc503a99854bbc79d4cd (diff)
VPP-659 TCP improvements
- builtin test echo server - fix SYN-ACK retransmit canceling - avoid sending spurious ACK if in LAST_ACK - improved client dummy test app - renamed tx fifo dequeuing and sending functions to avoid confusion - improved RST handling Change-Id: Ia14aad3df319540dcf6e6a4e18a9f8d423a4b83b Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/uri')
-rw-r--r--src/uri/uri_tcp_test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/uri/uri_tcp_test.c b/src/uri/uri_tcp_test.c
index 6c9cf1dbac9..261fd2889d6 100644
--- a/src/uri/uri_tcp_test.c
+++ b/src/uri/uri_tcp_test.c
@@ -287,6 +287,7 @@ vl_api_reset_session_t_handler (vl_api_reset_session_t * mp)
session = pool_elt_at_index (utm->sessions, p[0]);
hash_unset (utm->session_index_by_vpp_handles, key);
pool_put (utm->sessions, session);
+ utm->time_to_stop = 1;
}
else
{
@@ -296,7 +297,7 @@ vl_api_reset_session_t_handler (vl_api_reset_session_t * mp)
rmp = vl_msg_api_alloc (sizeof (*rmp));
memset (rmp, 0, sizeof (*rmp));
- rmp->_vl_msg_id = ntohs (VL_API_DISCONNECT_SESSION_REPLY);
+ rmp->_vl_msg_id = ntohs (VL_API_RESET_SESSION_REPLY);
rmp->retval = rv;
rmp->session_index = mp->session_index;
rmp->session_thread_index = mp->session_thread_index;
@@ -734,7 +735,7 @@ server_handle_fifo_event_rx (uri_tcp_test_main_t * utm,
{
rv = svm_fifo_enqueue_nowait (tx_fifo, 0, n_read, utm->rx_buf);
}
- while (rv == -2);
+ while (rv == -2 && !utm->time_to_stop);
/* Fabricate TX event, send to vpp */
evt.fifo = tx_fifo;
@@ -750,7 +751,7 @@ server_handle_fifo_event_rx (uri_tcp_test_main_t * utm,
if (n_read > 0)
bytes -= n_read;
}
- while (n_read < 0 || bytes > 0);
+ while ((n_read < 0 || bytes > 0) && !utm->time_to_stop);
}
void