+vcl_session_get_w_handle (vcl_worker_t * wrk, u32 session_handle)
+{
+ u32 session_index, wrk_index;
+ vcl_session_handle_parse (session_handle, &wrk_index, &session_index);
+ ASSERT (wrk_index == wrk->wrk_index);
+ return vcl_session_get (wrk, session_index);
+}
+
+static inline vcl_session_t *
+vcl_session_get_w_vpp_handle (vcl_worker_t * wrk, u64 vpp_handle)
+{
+ uword *p;
+ if ((p = hash_get (wrk->session_index_by_vpp_handles, vpp_handle)))
+ return vcl_session_get (wrk, (u32) p[0]);
+ return 0;
+}
+
+static inline u32
+vcl_session_index_from_vpp_handle (vcl_worker_t * wrk, u64 vpp_handle)
+{
+ uword *p;
+ if ((p = hash_get (wrk->session_index_by_vpp_handles, vpp_handle)))
+ return p[0];
+ return VCL_INVALID_SESSION_INDEX;
+}
+
+static inline void
+vcl_session_table_add_vpp_handle (vcl_worker_t * wrk, u64 handle, u32 value)
+{
+ hash_set (wrk->session_index_by_vpp_handles, handle, value);
+}
+
+static inline void
+vcl_session_table_del_vpp_handle (vcl_worker_t * wrk, u64 vpp_handle)
+{
+ hash_unset (wrk->session_index_by_vpp_handles, vpp_handle);
+}
+
+static inline uword *
+vcl_session_table_lookup_vpp_handle (vcl_worker_t * wrk, u64 handle)
+{
+ return hash_get (wrk->session_index_by_vpp_handles, handle);
+}
+
+static inline void
+vcl_session_table_add_listener (vcl_worker_t * wrk, u64 listener_handle,
+ u32 value)
+{
+ hash_set (wrk->session_index_by_vpp_handles, listener_handle, value);
+}
+
+static inline void
+vcl_session_table_del_listener (vcl_worker_t * wrk, u64 listener_handle)
+{
+ hash_unset (wrk->session_index_by_vpp_handles, listener_handle);
+}
+
+static inline int
+vcl_session_is_connectable_listener (vcl_worker_t * wrk,
+ vcl_session_t * session)
+{
+ /* Tell if we session_handle is a QUIC session.
+ * We can be in the following cases :
+ * Listen session <- QUIC session <- Stream session
+ * QUIC session <- Stream session
+ */
+ vcl_session_t *ls;
+ if (session->session_type != VPPCOM_PROTO_QUIC)
+ return 0;
+ if (session->listener_index == VCL_INVALID_SESSION_INDEX)
+ return !(session->session_state & STATE_LISTEN);
+ ls = vcl_session_get_w_handle (wrk, session->listener_index);
+ if (!ls)
+ return VPPCOM_EBADFD;
+ return ls->session_state & STATE_LISTEN;
+}
+
+static inline vcl_session_t *
+vcl_session_table_lookup_listener (vcl_worker_t * wrk, u64 handle)