[dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue callabck
Varghese, Vipin
vipin.varghese at intel.com
Mon Jun 10 07:12:54 CEST 2019
Hi Honnappa,
snipped
> >
> > Add callback event handler for enqueue dequeue operation on ring.
> > The pre-enqueue and post-dequeue operation on ring is selected to
> > invoke user callback handler.
> Can you provide a use case for this to better understand the need?
Use cases:
- allow user to investigate the contents pre-enqueue.
- allow user to investigate the contents post-dequeue.
- modify pre-enqueue and post-dequeue stage content.
- investigate PMD meta data for debug in field nodes.
snipped
> > + struct rte_ring_enq_cb_list enq_cbs;
> > + struct rte_ring_deq_cb_list deq_cbs; };
> This breaks ABI compatibility
Can you help me understand this more clearly?
snipped
> > -rte_ring_enqueue_burst(struct rte_ring *r, void * const *obj_table,
> > +rte_ring_enqueue_burst(struct rte_ring *r, void **obj_table,
> > unsigned int n, unsigned int *free_space) {
> > +#ifdef RTE_RING_ENQDEQ_CALLBACKS
> > + struct rte_ring_callback *cb = NULL;
> > +
> > + TAILQ_FOREACH(cb, &(r->enq_cbs), next) {
> Need to take the TAILQ lock before this. For ex: what happens if a un-register is
> called concurrently?
Let me check this, using rx|tx callback as reference.
> Also, traversing a linked list for every enqueue call would be too costly. May be,
> understanding the use case will help.
Internal testing with SP-SC is 0.1% (with extra cost of user function). But I will try to explore other alternatives too.
Snipped
More information about the dev
mailing list