aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-22 13:11:38 -0800
committerDave Barach <openvpp@barachs.net>2019-02-27 21:05:11 +0000
commitd4295e61a0ca183f54e54696e9edc5c87d2d116c (patch)
treed134bd2fc1d71e6c4911c1cb208506ca06a75829 /src/vnet/session/session.c
parente869269121b61883d55f2469fabf3c751b525d0f (diff)
session: refactor local/cut-through listens
Introduce a cut-through transport as replacement to local sessions. This first patch removes the per app local listener pools and switches local listeners to sessions with cut-through transport. Change-Id: I98b20c25bc5df5f4110bf66f76c650a973032618 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 83c889c715a..110db2c2a4a 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1030,25 +1030,23 @@ session_open (u32 app_wrk_index, session_endpoint_t * rmt, u32 opaque)
int
session_listen (session_t * ls, session_endpoint_cfg_t * sep)
{
- transport_connection_t *tc;
transport_endpoint_t *tep;
u32 tc_index, s_index;
/* Transport bind/listen */
tep = session_endpoint_to_transport (sep);
s_index = ls->session_index;
- tc_index = transport_start_listen (sep->transport_proto, s_index, tep);
+ tc_index = transport_start_listen (session_get_transport_proto (ls),
+ s_index, tep);
if (tc_index == (u32) ~ 0)
return -1;
- /* Attach transport to session */
+ /* Attach transport to session. Lookup tables are populated by the app
+ * worker because local tables (for ct sessions) are not backed by a fib */
ls = listen_session_get (s_index);
ls->connection_index = tc_index;
- /* Add to the main lookup table after transport was initialized */
- tc = transport_get_listener (sep->transport_proto, tc_index);
- session_lookup_add_connection (tc, listen_session_get_handle (ls));
return 0;
}