diff options
author | Florin Coras <fcoras@cisco.com> | 2021-05-06 15:32:14 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-05-07 10:46:20 +0000 |
commit | 94a6df005d9e94f3b836ad3c93d1464b4a840499 (patch) | |
tree | c55259ac6ce0e373abf7633353c29ad74e305b26 /src/vnet/session/application.h | |
parent | bd376a8ce8425f45b23074398949e8055de29280 (diff) |
session: connects seg manager is always first
By convention, connects segment manager will be first. Therefore it will
be the one with the first segment wherein lies the app's message queue.
Saves us the trouble of allocating it on first connect, if app started
by listening, and we no longer need to track if it's assignable to a
listener or if it can be removed.
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba9a8ffaab618eeb41ec2144dcfee62d006dc7a2
Diffstat (limited to 'src/vnet/session/application.h')
-rw-r--r-- | src/vnet/session/application.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h index 0bfd4d1d813..a8ddfec07f5 100644 --- a/src/vnet/session/application.h +++ b/src/vnet/session/application.h @@ -45,20 +45,17 @@ typedef struct app_worker_ /** Application listens for events on this svm queue */ svm_msg_q_t *event_queue; - /** Segment manager used for outgoing connects issued by the app */ + /** + * Segment manager used for outgoing connects issued by the app. By + * convention this is the first segment manager allocated by the worker + * so it's also the one that holds the first segment with the app's + * message queue in it. + */ u32 connects_seg_manager; /** Lookup tables for listeners. Value is segment manager index */ uword *listeners_table; - /** - * First segment manager has in the the first segment the application's - * event fifo. Depending on what the app does, it may be either used for - * a listener or for connects. - */ - u32 first_segment_manager; - u8 first_segment_manager_in_use; - /** API index for the worker. Needed for multi-process apps */ u32 api_client_index; @@ -339,9 +336,6 @@ int app_worker_session_fifo_tuning (app_worker_t * app_wrk, session_t * s, segment_manager_t *app_worker_get_listen_segment_manager (app_worker_t *, session_t *); segment_manager_t *app_worker_get_connect_segment_manager (app_worker_t *); -segment_manager_t - * app_worker_get_or_alloc_connect_segment_manager (app_worker_t *); -int app_worker_alloc_connects_segment_manager (app_worker_t * app); int app_worker_add_segment_notify (app_worker_t * app_wrk, u64 segment_handle); int app_worker_del_segment_notify (app_worker_t * app_wrk, |