diff options
author | Florin Coras <fcoras@cisco.com> | 2019-08-21 16:20:44 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-08-27 18:21:39 +0000 |
commit | 458089bbad9cf5bef6cf8119f23fc44e66b36ad3 (patch) | |
tree | 4ee7da1148172ca6f8a878746c8bd48c1e2dc95e /src/vcl/vcl_private.h | |
parent | 7adaa226eaa2401d6bb0dfd38a0d943c9645d7dc (diff) |
session: move ctrl messages from bapi to mq
Type:refactor
Moves connect, disconnect, bind, unbind and app detach to message
queue from binary api. Simplifies app/vcl interaction with the session
layer since all session control messages are now handled over the mq.
Add/del segment messages require internal C api changes which affect all
builtin applications. They'll be moved in a different patch and might
not be back portable to 19.08.
Change-Id: I93f6d18e551b024effa75d47f5ff25f23ba8aff5
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_private.h')
-rw-r--r-- | src/vcl/vcl_private.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h index 43c8ec304ef..cd2544c2559 100644 --- a/src/vcl/vcl_private.h +++ b/src/vcl/vcl_private.h @@ -57,6 +57,7 @@ typedef enum STATE_APP_ENABLED, STATE_APP_ATTACHED, STATE_APP_ADDING_WORKER, + STATE_APP_ADDING_TLS_DATA, STATE_APP_FAILED, STATE_APP_READY } app_state_t; @@ -251,6 +252,9 @@ typedef struct vcl_worker_ /** VPP binary api input queue */ svm_queue_t *vl_input_queue; + /** VPP mq to be used for exchanging control messages */ + svm_msg_q_t *ctrl_mq; + /** Message queues epoll fd. Initialized only if using mqs with eventfds */ int mqs_epfd; @@ -547,6 +551,7 @@ vcl_worker_t *vcl_worker_alloc_and_init (void); void vcl_worker_cleanup (vcl_worker_t * wrk, u8 notify_vpp); int vcl_worker_register_with_vpp (void); int vcl_worker_set_bapi (void); +svm_msg_q_t *vcl_worker_ctrl_mq (vcl_worker_t * wrk); void vcl_flush_mq_events (void); void vcl_cleanup_bapi (void); @@ -603,10 +608,8 @@ void vppcom_init_error_string_table (void); void vppcom_send_session_enable_disable (u8 is_enable); void vppcom_app_send_attach (void); void vppcom_app_send_detach (void); -void vppcom_send_connect_sock (vcl_session_t * session); +void vcl_send_session_unlisten (vcl_worker_t * wrk, vcl_session_t * s); void vppcom_send_disconnect_session (u64 vpp_handle); -void vppcom_send_bind_sock (vcl_session_t * session); -void vppcom_send_unbind_sock (vcl_worker_t * wrk, u64 vpp_handle); void vppcom_api_hookup (void); void vppcom_send_application_tls_cert_add (vcl_session_t * session, char *cert, u32 cert_len); |