summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-09-12 16:08:01 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-09-14 07:59:41 +0000
commit86f04500ae027dc66e91519a006388e56df4ceff (patch)
tree7dfb1c7b6546637119596e845eee6a33d7fc3782 /src/vnet
parent958192dc2abf427118a227d142f5b03807098cb2 (diff)
vcl: keep track of unexpected events
If sessions are marked as blocking, events for other sessions received while waiting for the blocking sessions, are added to a pending list and processed later. Change-Id: Ia6c71006b1c2bcb78af708390da0cd436af397cc Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/segment_manager.c5
-rw-r--r--src/vnet/session/session.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 83d196358f3..0c19293ce3b 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -193,7 +193,7 @@ segment_manager_add_segment (segment_manager_t * sm, u32 segment_size)
if (props->segment_type != SSVM_SEGMENT_PRIVATE)
{
seg_name = format (0, "%d-%d%c", getpid (), segment_name_counter++, 0);
- alloc_size = segment_size + rnd_margin;
+ alloc_size = (uword) segment_size + rnd_margin;
baseva = clib_valloc_alloc (&smm->va_allocator, alloc_size, 0);
if (!baseva)
{
@@ -253,8 +253,7 @@ segment_manager_init (segment_manager_t * sm, u32 first_seg_size,
{
u32 rx_fifo_size, tx_fifo_size, pair_size;
u32 rx_rounded_data_size, tx_rounded_data_size;
- u64 approx_total_size, max_seg_size =
- ((u64) 1 << 32) - clib_mem_get_page_size ();
+ u64 approx_total_size, max_seg_size = ((u64) 1 << 32) - (128 << 10);
segment_manager_properties_t *props;
svm_fifo_segment_private_t *segment;
u32 approx_segment_count;
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 472b38baae1..133c91ca198 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -390,7 +390,7 @@ session_enqueue_stream_connection (transport_connection_t * tc,
{
s->enqueue_epoch = enqueue_epoch;
vec_add1 (smm->session_to_enqueue[tc->proto][thread_index],
- s - smm->sessions[thread_index]);
+ s->session_index);
}
}
@@ -431,7 +431,7 @@ session_enqueue_dgram_connection (stream_session_t * s,
{
s->enqueue_epoch = enqueue_epoch;
vec_add1 (smm->session_to_enqueue[proto][thread_index],
- s - smm->sessions[thread_index]);
+ s->session_index);
}
}
return enqueued;