|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
38 #define _(sym, disp, type, str) \
42 vlib_cli_output (vm, "\t %25s : %12lu ", str, \
43 sdm->counters[SESS_Q_##sym].u64); \
45 vlib_cli_output (vm, "\t %25s : %12.3f ", str, \
46 sdm->counters[SESS_Q_##sym].f64); \
58 .path =
"show session dbg clock_cycles",
59 .short_help =
"show session dbg clock_cycles",
60 .function = show_session_dbg_clock_cycles_fn,
91 .path =
"clear session dbg clock_cycles",
92 .short_help =
"clear session dbg clock_cycles",
93 .function = clear_session_dbg_clock_cycles_fn,
125 session_event_t _e, *e = &_e;
143 switch (e->event_type)
152 fformat (stdout,
"[%04d] disconnect session %d\n",
i,
162 fformat (stdout,
"[%04d] RPC call %llx with %llx\n",
168 fformat (stdout,
"[%04d] unhandled event type %d\n",
184 switch (e->event_type)
191 if (e->session_index ==
f->shr->master_session_index)
252 found = session_node_cmp_event (&elt->evt, f);
255 clib_memcpy_fast (e, &elt->evt, sizeof (*e));
265 found = session_node_cmp_event (&elt->evt, f);
268 clib_memcpy_fast (e, &elt->evt, sizeof (*e));
void dump_thread_0_event_queue(void)
u32 session_index
Index in thread pool where session was allocated.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
svm_msg_q_ring_t * svm_msg_q_ring(svm_msg_q_t *mq, u32 ring_index)
Get message queue ring.
void * svm_msg_q_msg_data(svm_msg_q_t *mq, svm_msg_q_msg_t *msg)
Get data for message in queue.
#define clib_error_return(e, args...)
#define clib_llist_foreach(LP, name, H, E, body)
Walk list starting at head.
pthread_t thread[MAX_CONNS]
u8 session_node_lookup_fifo_event(svm_fifo_t *f, session_event_t *e)
session_dbg_main_t session_dbg_main
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
@ SESSION_IO_EVT_BUILTIN_TX
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
clib_llist_index_t new_head
Head of list of elements.
struct _svm_fifo svm_fifo_t
svm_fifo_t * rx_fifo
Pointers to rx/tx buffers.
@ SESSION_IO_EVT_BUILTIN_RX
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static svm_msg_q_t * session_main_get_vpp_event_queue(u32 thread_index)
svm_msg_q_shared_queue_t * shr
pointer to shared queue
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
u32 ring_index
ring index, could be u8
static u8 session_node_cmp_event(session_event_t *e, svm_fifo_t *f)
@ SESSION_IO_EVT_TX_FLUSH
sll srl srl sll sra u16x4 i
void session_debug_init(void)
static session_t * session_get_from_handle(session_handle_t handle)
#define VLIB_CLI_COMMAND(x,...)
#define CLIB_CACHE_LINE_BYTES
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
svm_msg_q_t * vpp_event_queue
vpp event message queue for worker
session_evt_elt_t * event_elts
Pool of session event list elements.
static session_t * session_get_if_valid(u64 si, u32 thread_index)
static vlib_main_t * vlib_get_first_main(void)
#define foreach_session_events
u32 elsize
size of an element
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
clib_llist_index_t old_head
Head of list of pending events.
#define clib_warning(format, args...)
static f64 vlib_time_now(vlib_main_t *vm)
static vlib_thread_main_t * vlib_get_thread_main()
static session_worker_t * session_main_get_worker(u32 thread_index)
svm_msg_q_queue_t q
queue for exchanging messages