From 8c4fa01d1360cd5315e671de96dfeff7dae246f5 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 6 Nov 2020 16:59:08 -0800 Subject: session: delegate fifo ooo lookup init to transports Fifo chunk ooo lookup data structures are private (not allocated on segment heap) and should only be initialized by transport protocols that require out-of-order enqueues/dequeues (like tcp). Type: improvement Signed-off-by: Florin Coras Change-Id: Iaa15d6850385bf903cc501c54c2752e8e811449e --- src/vnet/session/application_local.c | 4 ---- src/vnet/session/transport.c | 8 ++++++++ src/vnet/session/transport.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/vnet/session') diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c index 9b0136f95dc..6e0aee2aae3 100644 --- a/src/vnet/session/application_local.c +++ b/src/vnet/session/application_local.c @@ -217,10 +217,6 @@ ct_init_accepted_session (app_worker_t * server_wrk, ls->rx_fifo->segment_index = seg_index; ls->tx_fifo->segment_index = seg_index; - /* Disable ooo lookups on the cut-through fifos. TODO remove once init of - * chunk lookup rbtrees is delegated to transports */ - svm_fifo_free_chunk_lookup (ls->tx_fifo); - segment_handle = segment_manager_segment_handle (sm, seg); if ((rv = app_worker_add_segment_notify (server_wrk, segment_handle))) { diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c index 8e5df3f8418..967ff5d9cba 100644 --- a/src/vnet/session/transport.c +++ b/src/vnet/session/transport.c @@ -769,6 +769,14 @@ transport_connection_reschedule (transport_connection_t * tc) } } +void +transport_fifos_init_ooo (transport_connection_t * tc) +{ + session_t *s = session_get (tc->s_index, tc->thread_index); + svm_fifo_init_ooo_lookup (s->rx_fifo, 0 /* ooo enq */ ); + svm_fifo_init_ooo_lookup (s->tx_fifo, 1 /* ooo deq */ ); +} + void transport_update_time (clib_time_type_t time_now, u8 thread_index) { diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h index 9c873b12caf..c8d4e27be66 100644 --- a/src/vnet/session/transport.h +++ b/src/vnet/session/transport.h @@ -217,6 +217,7 @@ transport_connection_is_cless (transport_connection_t * tc) } void transport_connection_reschedule (transport_connection_t * tc); +void transport_fifos_init_ooo (transport_connection_t * tc); /** * Register transport virtual function table. -- cgit 1.2.3-korg