diff options
author | Florin Coras <fcoras@cisco.com> | 2020-12-07 14:33:58 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-12-23 02:27:52 +0000 |
commit | 213b1bb3b9652ce2937e3b47573cc54ee3008387 (patch) | |
tree | 0445b51256183db2c8593390a1f95e0234dbffc6 /src/vnet | |
parent | 0da8168423349dfb1852d4708d67014de36748b8 (diff) |
svm: remove fifo segment heap
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I518e096fe13847759806ff62009e73fd8f7451b7
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/session/segment_manager.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c index 8441d54e92c..bb3d7adc379 100644 --- a/src/vnet/session/segment_manager.c +++ b/src/vnet/session/segment_manager.c @@ -874,7 +874,7 @@ segment_manager_alloc_queue (fifo_segment_t * segment, u32 fifo_evt_size, session_evt_size = 256, notif_q_size; svm_msg_q_cfg_t _cfg, *cfg = &_cfg; svm_msg_q_t *q; - void *oldheap; + void *base; fifo_evt_size = sizeof (session_event_t); notif_q_size = clib_max (16, props->evt_q_size >> 4); @@ -889,10 +889,8 @@ segment_manager_alloc_queue (fifo_segment_t * segment, cfg->q_nitems = props->evt_q_size; cfg->ring_cfgs = rc; - oldheap = ssvm_push_heap (segment->ssvm.sh); - q = svm_msg_q_alloc (cfg); - fifo_segment_update_free_bytes (segment); - ssvm_pop_heap (oldheap); + base = fifo_segment_alloc (segment, svm_msg_q_size_to_alloc (cfg)); + q = svm_msg_q_init (base, cfg); if (props->use_mq_eventfd) { |