diff options
author | Florin Coras <fcoras@cisco.com> | 2020-12-08 17:50:45 -0800 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2020-12-24 23:08:43 -0800 |
commit | c547e91df7083007c87615ac1e37b6f223e575e9 (patch) | |
tree | 0677e843f5307becf326c14d43d57c0e4b8c3329 /src/vnet/session/session.c | |
parent | 8219f1f361083cc63022b70d11b08f52833d4789 (diff) |
svm: split fifo into private and shared structs
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id8e77e8b2623be719fd43a95e181eaa5b7df2b6e
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r-- | src/vnet/session/session.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index b0a17bbb214..962df556de9 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -78,7 +78,7 @@ session_send_evt_to_thread (void *data, void *args, u32 thread_index, int session_send_io_evt_to_thread (svm_fifo_t * f, session_evt_type_t evt_type) { - return session_send_evt_to_thread (&f->master_session_index, 0, + return session_send_evt_to_thread (&f->shr->master_session_index, 0, f->master_thread_index, evt_type); } @@ -436,8 +436,8 @@ session_fifo_tuning (session_t * s, svm_fifo_t * f, { segment_manager_t *sm; sm = segment_manager_get (f->segment_manager); - ASSERT (f->size >= 4096); - ASSERT (f->size <= sm->max_fifo_size); + ASSERT (f->shr->size >= 4096); + ASSERT (f->shr->size <= sm->max_fifo_size); } } } @@ -611,9 +611,9 @@ session_notify_subscribers (u32 app_index, session_t * s, if (!app) return -1; - for (i = 0; i < f->n_subscribers; i++) + for (i = 0; i < f->shr->n_subscribers; i++) { - app_wrk = application_get_worker (app, f->subscribers[i]); + app_wrk = application_get_worker (app, f->shr->subscribers[i]); if (!app_wrk) continue; if (app_worker_lock_and_send_event (app_wrk, s, evt_type)) @@ -723,7 +723,7 @@ session_dequeue_notify (session_t * s) SESSION_IO_EVT_TX))) return -1; - if (PREDICT_FALSE (s->tx_fifo->n_subscribers)) + if (PREDICT_FALSE (s->tx_fifo->shr->n_subscribers)) return session_notify_subscribers (app_wrk->app_index, s, s->tx_fifo, SESSION_IO_EVT_TX); |