summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c8
-rw-r--r--src/vnet/session/session.h3
-rw-r--r--src/vnet/session/stream_session.h5
3 files changed, 10 insertions, 6 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 83b96d317dc..7b50950fe01 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -153,7 +153,7 @@ session_free (stream_session_t * s)
memset (s, 0xFA, sizeof (*s));
}
-static void
+void
session_free_w_fifos (stream_session_t * s)
{
segment_manager_dealloc_fifos (s->svm_segment_index, s->server_rx_fifo,
@@ -197,7 +197,7 @@ session_alloc_for_connection (transport_connection_t * tc)
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->enqueue_epoch = ~0;
+ s->enqueue_epoch = (u64) ~ 0;
/* Attach transport to session and vice versa */
s->connection_index = tc->c_index;
@@ -393,7 +393,7 @@ session_enqueue_stream_connection (transport_connection_t * tc,
* by calling stream_server_flush_enqueue_events () */
session_manager_main_t *smm = vnet_get_session_manager_main ();
u32 thread_index = s->thread_index;
- u32 enqueue_epoch = smm->current_enqueue_epoch[tc->proto][thread_index];
+ u64 enqueue_epoch = smm->current_enqueue_epoch[tc->proto][thread_index];
if (s->enqueue_epoch != enqueue_epoch)
{
@@ -434,7 +434,7 @@ session_enqueue_dgram_connection (stream_session_t * s,
* by calling stream_server_flush_enqueue_events () */
session_manager_main_t *smm = vnet_get_session_manager_main ();
u32 thread_index = s->thread_index;
- u32 enqueue_epoch = smm->current_enqueue_epoch[proto][thread_index];
+ u64 enqueue_epoch = smm->current_enqueue_epoch[proto][thread_index];
if (s->enqueue_epoch != enqueue_epoch)
{
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index 1e08cccb6f7..914e0581fec 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -195,7 +195,7 @@ struct _session_manager_main
clib_rwlock_t *peekers_rw_locks;
/** Per-proto, per-worker enqueue epoch counters */
- u32 *current_enqueue_epoch[TRANSPORT_N_PROTO];
+ u64 *current_enqueue_epoch[TRANSPORT_N_PROTO];
/** Per-proto, per-worker thread vector of sessions to enqueue */
u32 **session_to_enqueue[TRANSPORT_N_PROTO];
@@ -308,6 +308,7 @@ stream_session_is_valid (u32 si, u8 thread_index)
stream_session_t *session_alloc (u32 thread_index);
int session_alloc_fifos (segment_manager_t * sm, stream_session_t * s);
void session_free (stream_session_t * s);
+void session_free_w_fifos (stream_session_t * s);
always_inline stream_session_t *
session_get (u32 si, u32 thread_index)
diff --git a/src/vnet/session/stream_session.h b/src/vnet/session/stream_session.h
index 30178d7a453..287a8927339 100644
--- a/src/vnet/session/stream_session.h
+++ b/src/vnet/session/stream_session.h
@@ -67,7 +67,7 @@ typedef struct _stream_session_t
u8 thread_index;
/** To avoid n**2 "one event per frame" check */
- u8 enqueue_epoch;
+ u64 enqueue_epoch;
/** svm segment index where fifos were allocated */
u32 svm_segment_index;
@@ -120,6 +120,9 @@ typedef struct local_session_
/** Port for connection. Overlaps thread_index/enqueue_epoch */
u16 port;
+ /** Partly overlaps enqueue_epoch */
+ u8 pad_epoch[7];
+
/** Segment index where fifos were allocated */
u32 svm_segment_index;