summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/session_debug.c')
-rw-r--r--src/vnet/session/session_debug.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/vnet/session/session_debug.c b/src/vnet/session/session_debug.c
index cd4198c5da8..c042e9e53db 100644
--- a/src/vnet/session/session_debug.c
+++ b/src/vnet/session/session_debug.c
@@ -123,6 +123,7 @@ dump_thread_0_event_queue (void)
vlib_main_t *vm = &vlib_global_main;
u32 my_thread_index = vm->thread_index;
session_event_t _e, *e = &_e;
+ svm_msg_q_shared_queue_t *sq;
svm_msg_q_ring_t *ring;
session_t *s0;
svm_msg_q_msg_t *msg;
@@ -130,11 +131,12 @@ dump_thread_0_event_queue (void)
int i, index;
mq = session_main_get_vpp_event_queue (my_thread_index);
- index = mq->q->head;
+ sq = mq->q.shr;
+ index = sq->head;
- for (i = 0; i < mq->q->cursize; i++)
+ for (i = 0; i < sq->cursize; i++)
{
- msg = (svm_msg_q_msg_t *) (&mq->q->data[0] + mq->q->elsize * index);
+ msg = (svm_msg_q_msg_t *) (&sq->data[0] + sq->elsize * index);
ring = svm_msg_q_ring (mq, msg->ring_index);
clib_memcpy_fast (e, svm_msg_q_msg_data (mq, msg), ring->elsize);
@@ -170,7 +172,7 @@ dump_thread_0_event_queue (void)
index++;
- if (index == mq->q->maxsize)
+ if (index == sq->maxsize)
index = 0;
}
}
@@ -210,6 +212,7 @@ session_node_cmp_event (session_event_t * e, svm_fifo_t * f)
u8
session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e)
{
+ svm_msg_q_shared_queue_t *sq;
session_evt_elt_t *elt;
session_worker_t *wrk;
int i, index, found = 0;
@@ -226,16 +229,17 @@ session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e)
* Search evt queue
*/
mq = wrk->vpp_event_queue;
- index = mq->q->head;
- for (i = 0; i < mq->q->cursize; i++)
+ sq = mq->q.shr;
+ index = sq->head;
+ for (i = 0; i < sq->cursize; i++)
{
- msg = (svm_msg_q_msg_t *) (&mq->q->data[0] + mq->q->elsize * index);
+ msg = (svm_msg_q_msg_t *) (&sq->data[0] + sq->elsize * index);
ring = svm_msg_q_ring (mq, msg->ring_index);
clib_memcpy_fast (e, svm_msg_q_msg_data (mq, msg), ring->elsize);
found = session_node_cmp_event (e, f);
if (found)
return 1;
- index = (index + 1) % mq->q->maxsize;
+ index = (index + 1) % sq->maxsize;
}
/*
* Search pending events vector