session vcl: explit mq indices in ctrl messages
[vpp.git] / src / vcl / vcl_private.h
index 5b19f94..3233aec 100644 (file)
@@ -85,6 +85,8 @@ typedef struct
 #define VEP_DEFAULT_ET_MASK  (EPOLLIN|EPOLLOUT)
 #define VEP_UNSUPPORTED_EVENTS (EPOLLONESHOT|EPOLLEXCLUSIVE)
   u32 et_mask;
+  u32 lt_next;
+  u32 lt_prev;
 } vppcom_epoll_t;
 
 /* Select uses the vcl_si_set as if a clib_bitmap. Make sure they are the
@@ -253,6 +255,9 @@ typedef struct vcl_worker_
   /** Per worker buffer for receiving mq epoll events */
   struct epoll_event *mq_events;
 
+  /** Next session to be lt polled */
+  u32 ep_lt_current;
+
   /** Hash table for disconnect processing */
   uword *session_index_by_vpp_handles;
 
@@ -716,14 +721,16 @@ void vcl_segment_detach (u64 segment_handle);
 void vcl_send_session_unlisten (vcl_worker_t * wrk, vcl_session_t * s);
 
 int vcl_segment_attach_session (uword segment_handle, uword rxf_offset,
-                               uword txf_offset, uword mq_offset, u8 is_ct,
-                               vcl_session_t *s);
+                               uword txf_offset, uword mq_offset,
+                               u32 mq_index, u8 is_ct, vcl_session_t *s);
 int vcl_segment_attach_mq (uword segment_handle, uword mq_offset, u32 mq_index,
                           svm_msg_q_t **mq);
 int vcl_segment_discover_mqs (uword segment_handle, int *fds, u32 n_fds);
 svm_fifo_chunk_t *vcl_segment_alloc_chunk (uword segment_handle,
                                           u32 slice_index, u32 size,
                                           uword *offset);
+int vcl_session_share_fifos (vcl_session_t *s, svm_fifo_t *rxf,
+                            svm_fifo_t *txf);
 
 /*
  * VCL Binary API