aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-03 14:29:10 -0700
committerDave Barach <openvpp@barachs.net>2018-10-04 17:51:30 +0000
commita44d6b133bfb7ee0fb11d6ae8d9f0f00e57f242c (patch)
tree50715befb88bf17faca354acbf75781b0b441cfd /src/vnet/session/application.c
parent3e42ebe6ab460ba3eb0a6e334c084c9a669fbc4f (diff)
udp_echo: fix cut-through server mode
Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r--src/vnet/session/application.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 260ae588209..61909660ad6 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -872,10 +872,10 @@ app_worker_get_connect_segment_manager (app_worker_t * app)
segment_manager_t *
app_worker_get_listen_segment_manager (app_worker_t * app,
- stream_session_t * s)
+ stream_session_t * listener)
{
uword *smp;
- smp = hash_get (app->listeners_table, listen_session_get_handle (s));
+ smp = hash_get (app->listeners_table, listen_session_get_handle (listener));
ASSERT (smp != 0);
return segment_manager_get (*smp);
}
@@ -1721,21 +1721,28 @@ application_local_session_cleanup (app_worker_t * client_wrk,
local_session_t * ls)
{
svm_fifo_segment_private_t *seg;
+ stream_session_t *listener;
segment_manager_t *sm;
uword client_key;
u8 has_transport;
- has_transport = session_has_transport ((stream_session_t *) ls);
- client_key = application_client_local_connect_key (ls);
+ /* Retrieve listener transport type as it is the one that decides where
+ * the fifos are allocated */
+ has_transport = application_local_session_listener_has_transport (ls);
if (!has_transport)
sm = application_get_local_segment_manager_w_session (server_wrk, ls);
else
- sm = app_worker_get_listen_segment_manager (server_wrk,
- (stream_session_t *) ls);
+ {
+ listener = listen_session_get (ls->listener_index);
+ sm = app_worker_get_listen_segment_manager (server_wrk, listener);
+ }
seg = segment_manager_get_segment (sm, ls->svm_segment_index);
if (client_wrk)
- hash_unset (client_wrk->local_connects, client_key);
+ {
+ client_key = application_client_local_connect_key (ls);
+ hash_unset (client_wrk->local_connects, client_key);
+ }
if (!has_transport)
{