summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.h
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/transport.h
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/transport.h')
-rw-r--r--src/vnet/session/transport.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index e446a3934d1..993b8bd7354 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -46,6 +46,7 @@ typedef struct _transport_proto_vft
void (*update_time) (f64 time_now, u8 thread_index);
void (*flush_data) (transport_connection_t *tconn);
int (*custom_tx) (void *session);
+ int (*app_rx_evt) (transport_connection_t *tconn);
/*
* Connection retrieval
@@ -111,6 +112,16 @@ transport_custom_tx (transport_proto_t tp, void *s)
return tp_vfts[tp].custom_tx (s);
}
+static inline int
+transport_app_rx_evt (transport_proto_t tp, u32 conn_index, u32 thread_index)
+{
+ transport_connection_t *tc;
+ if (!tp_vfts[tp].app_rx_evt)
+ return 0;
+ tc = transport_get_connection (tp, conn_index, thread_index);
+ return tp_vfts[tp].app_rx_evt (tc);
+}
+
void transport_register_protocol (transport_proto_t transport_proto,
const transport_proto_vft_t * vft,
fib_protocol_t fib_proto, u32 output_node);