aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/session/session.c14
-rw-r--r--src/vnet/session/session_types.h3
2 files changed, 13 insertions, 4 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 67652b5eb19..9ac9229d4db 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -705,7 +705,7 @@ session_main_flush_enqueue_events (transport_proto_t transport_proto,
session_worker_t *wrk = session_main_get_worker (thread_index);
session_handle_t *handles;
session_t *s;
- u32 i;
+ u32 i, is_cl;
handles = wrk->session_to_enqueue[transport_proto];
@@ -714,8 +714,12 @@ session_main_flush_enqueue_events (transport_proto_t transport_proto,
s = session_get_from_handle (handles[i]);
session_fifo_tuning (s, s->rx_fifo, SESSION_FT_ACTION_ENQUEUED,
0 /* TODO/not needed */);
- session_enqueue_notify_inline (s,
- s->thread_index != thread_index ? 1 : 0);
+ is_cl =
+ s->thread_index != thread_index || (s->flags & SESSION_F_IS_CLESS);
+ if (!is_cl)
+ session_enqueue_notify_inline (s, 0);
+ else
+ session_enqueue_notify_inline (s, 1);
}
vec_reset_length (handles);
@@ -1345,6 +1349,8 @@ session_open_cl (session_endpoint_cfg_t *rmt, session_handle_t *rsh)
s->app_wrk_index = app_wrk->wrk_index;
s->opaque = rmt->opaque;
session_set_state (s, SESSION_STATE_OPENED);
+ if (transport_connection_is_cless (tc))
+ s->flags |= SESSION_F_IS_CLESS;
if (app_worker_init_connected (app_wrk, s))
{
session_free (s);
@@ -1470,6 +1476,8 @@ session_listen (session_t * ls, session_endpoint_cfg_t * sep)
ls = listen_session_get (s_index);
ls->connection_index = tc_index;
ls->opaque = sep->opaque;
+ if (transport_connection_is_cless (session_get_transport (ls)))
+ ls->flags |= SESSION_F_IS_CLESS;
return 0;
}
diff --git a/src/vnet/session/session_types.h b/src/vnet/session/session_types.h
index 4fe0c7cf09a..be3f9ffc716 100644
--- a/src/vnet/session/session_types.h
+++ b/src/vnet/session/session_types.h
@@ -174,7 +174,8 @@ typedef enum
_ (UNIDIRECTIONAL, "unidirectional") \
_ (CUSTOM_FIFO_TUNING, "custom-fifo-tuning") \
_ (HALF_OPEN, "half-open") \
- _ (APP_CLOSED, "app-closed")
+ _ (APP_CLOSED, "app-closed") \
+ _ (IS_CLESS, "connectionless")
typedef enum session_flags_bits_
{