X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fvcl_private.h;h=2ae4b72f6a4e93ede71f3b57ce2274786c3d0702;hb=30e79c2e388a98160a3660f4f03103890c9b1b7c;hp=9dce51821937264f0ef397f307a92354745ee98a;hpb=3c1cf2c1716f436e5da4a106dd2b9a3df5d3a4a3;p=vpp.git diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h index 9dce5182193..2ae4b72f6a4 100644 --- a/src/vcl/vcl_private.h +++ b/src/vcl/vcl_private.h @@ -69,7 +69,8 @@ typedef enum STATE_ACCEPT = 0x08, STATE_VPP_CLOSING = 0x10, STATE_DISCONNECT = 0x20, - STATE_FAILED = 0x40 + STATE_FAILED = 0x40, + STATE_UPDATED = 0x80, } session_state_t; #define SERVER_STATE_OPEN (STATE_ACCEPT|STATE_VPP_CLOSING) @@ -144,6 +145,7 @@ typedef struct vcl_shared_session_ { u32 ss_index; u32 *workers; + u32 session_index; } vcl_shared_session_t; typedef struct @@ -287,6 +289,8 @@ typedef struct vcl_worker_ /** Vector of unhandled events */ session_event_t *unhandled_evts_vector; + u32 *pending_session_wrk_updates; + /** Used also as a thread stop key buffer */ pthread_t thread_id; @@ -517,6 +521,7 @@ int vcl_worker_register_with_vpp (void); int vcl_worker_set_bapi (void); void vcl_worker_share_sessions (vcl_worker_t * parent_wrk); int vcl_worker_unshare_session (vcl_worker_t * wrk, vcl_session_t * s); +vcl_shared_session_t *vcl_shared_session_get (u32 ss_index); int vcl_session_get_refcnt (vcl_session_t * s); void vcl_segment_table_add (u64 segment_handle, u32 svm_segment_index); @@ -543,6 +548,17 @@ vcl_worker_get_current (void) return vcl_worker_get (vcl_get_worker_index ()); } +static inline svm_msg_q_t * +vcl_session_vpp_evt_q (vcl_worker_t * wrk, vcl_session_t * s) +{ + if (vcl_session_is_ct (s)) + return wrk->vpp_event_queues[0]; + else + return wrk->vpp_event_queues[s->vpp_thread_index]; +} + +void vcl_send_session_worker_update (vcl_worker_t * wrk, vcl_session_t * s, + u32 wrk_index); /* * VCL Binary API */ @@ -556,12 +572,10 @@ void vppcom_send_disconnect_session (u64 vpp_handle); void vppcom_send_bind_sock (vcl_session_t * session); void vppcom_send_unbind_sock (u64 vpp_handle); void vppcom_api_hookup (void); -void vppcom_send_accept_session_reply (u64 vpp_handle, u32 context, int rv); void vppcom_send_application_tls_cert_add (vcl_session_t * session, char *cert, u32 cert_len); -void -vppcom_send_application_tls_key_add (vcl_session_t * session, char *key, - u32 key_len); +void vppcom_send_application_tls_key_add (vcl_session_t * session, char *key, + u32 key_len); void vcl_send_app_worker_add_del (u8 is_add); void vcl_send_child_worker_del (vcl_worker_t * wrk);