s = session_alloc (thread_index);
s->session_type = session_type_from_proto_and_ip (tc->proto, tc->is_ip4);
s->session_state = SESSION_STATE_CONNECTING;
- s->thread_index = thread_index;
+ s->enqueue_epoch = ~0;
/* Attach transport to session and vice versa */
s->connection_index = tc->c_index;
if (alloc_fifos && (rv = session_alloc_fifos (sm, s)))
{
session_free (s);
+ *ret_s = 0;
return rv;
}
if (!is_fail)
{
sm = application_get_connect_segment_manager (app);
- alloc_fifos = application_is_proxy (app);
+ alloc_fifos = !application_is_builtin_proxy (app);
if (session_alloc_and_init (sm, tc, alloc_fifos, &new_s))
{
is_fail = 1;
_vec_len (smm->pending_event_vector[i]) = 0;
vec_validate (smm->pending_disconnects[i], 0);
_vec_len (smm->pending_disconnects[i]) = 0;
+ if (num_threads > 1)
+ {
+ clib_spinlock_init (&smm->peekers_readers_locks[i]);
+ clib_spinlock_init (&smm->peekers_write_locks[i]);
+ }
}
#if SESSION_DBG
tmp, tmp);
smm->configured_v6_halfopen_table_memory = tmp;
}
+ else if (unformat (input, "local-endpoints-table-memory %U",
+ unformat_memory_size, &tmp))
+ {
+ if (tmp >= 0x100000000)
+ return clib_error_return (0, "memory size %llx (%lld) too large",
+ tmp, tmp);
+ smm->local_endpoints_table_memory = tmp;
+ }
+ else if (unformat (input, "local-endpoints-table-buckets %d",
+ &smm->local_endpoints_table_buckets))
+ ;
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, input);