X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fapplication_local.c;h=cc02026e3bb8c3b74db6008d01443ee804a3e7b6;hb=2de9c0f92;hp=4a268c7d30b01f638cd2a634e49b69b1432f9cb0;hpb=a0abbff4849e8b8721b70769ae1f3ef27dd6733c;p=vpp.git diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c index 4a268c7d30b..cc02026e3bb 100644 --- a/src/vnet/session/application_local.c +++ b/src/vnet/session/application_local.c @@ -180,7 +180,11 @@ ct_init_local_session (app_worker_t * client_wrk, app_worker_t * server_wrk, props = application_segment_manager_properties (server); round_rx_fifo_sz = 1 << max_log2 (props->rx_fifo_size); round_tx_fifo_sz = 1 << max_log2 (props->tx_fifo_size); - seg_size = round_rx_fifo_sz + round_tx_fifo_sz + margin; + /* Increase size because of inefficient chunk allocations. Depending on + * how data is consumed, it may happen that more chunks than needed are + * allocated. + * TODO should remove once allocations are done more efficiently */ + seg_size = 4 * (round_rx_fifo_sz + round_tx_fifo_sz + margin); sm = app_worker_get_listen_segment_manager (server_wrk, ll); seg_index = segment_manager_add_segment (sm, seg_size); @@ -191,7 +195,8 @@ ct_init_local_session (app_worker_t * client_wrk, app_worker_t * server_wrk, } seg = segment_manager_get_segment_w_lock (sm, seg_index); - rv = segment_manager_try_alloc_fifos (seg, props->rx_fifo_size, + rv = segment_manager_try_alloc_fifos (seg, ls->thread_index, + props->rx_fifo_size, props->tx_fifo_size, &ls->rx_fifo, &ls->tx_fifo); if (rv) @@ -397,7 +402,7 @@ global_scope: return VNET_API_ERROR_APP_CONNECT_SCOPE; fib_proto = session_endpoint_fib_proto (sep); - table_index = application_session_table (app, fib_proto); + table_index = session_lookup_get_index_for_fib (fib_proto, sep->fib_index); ll = session_lookup_listener_wildcard (table_index, sep); if (ll) @@ -467,7 +472,7 @@ format_ct_connection_id (u8 * s, va_list * args) } static int -ct_custom_tx (void *session) +ct_custom_tx (void *session, u32 max_burst_size) { session_t *s = (session_t *) session; if (session_has_transport (s))