summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_local.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-04-17 09:57:46 -0700
committerDave Barach <openvpp@barachs.net>2019-04-17 18:26:42 +0000
commit317b8e08367c769b90463613231b9fcfad486098 (patch)
tree9780a58b12e287e969ef342d4f39c121e1c8c2c1 /src/vnet/session/application_local.c
parent6407ba56a392f37322001d0ffdca002223b095c0 (diff)
vcl/session: tx notifications for cut-thru sessions
Change-Id: I076c753e419bbb177d2d28609190715e9895b398 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_local.c')
-rw-r--r--src/vnet/session/application_local.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c
index 856f7489f38..d2edd54512a 100644
--- a/src/vnet/session/application_local.c
+++ b/src/vnet/session/application_local.c
@@ -475,6 +475,19 @@ ct_custom_tx (void *session)
return ct_session_tx (s);
}
+static int
+ct_app_rx_evt (transport_connection_t * tc)
+{
+ ct_connection_t *ct = (ct_connection_t *) tc, *peer_ct;
+ session_t *ps;
+
+ peer_ct = ct_connection_get (ct->peer_index);
+ if (!peer_ct)
+ return -1;
+ ps = session_get (peer_ct->c_s_index, peer_ct->c_thread_index);
+ return session_dequeue_notify (ps);
+}
+
static u8 *
format_ct_listener (u8 * s, va_list * args)
{
@@ -535,6 +548,7 @@ const static transport_proto_vft_t cut_thru_proto = {
.close = ct_session_close,
.get_connection = ct_session_get,
.custom_tx = ct_custom_tx,
+ .app_rx_evt = ct_app_rx_evt,
.tx_type = TRANSPORT_TX_INTERNAL,
.service_type = TRANSPORT_SERVICE_APP,
.format_listener = format_ct_listener,