[dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue callabck
Varghese, Vipin
vipin.varghese at intel.com
Thu Jul 4 07:04:45 CEST 2019
Thanks Honnappa, will work on the changes suggested.
> -----Original Message-----
> From: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>
> Sent: Tuesday, June 11, 2019 9:48 AM
> To: Varghese, Vipin <vipin.varghese at intel.com>; olivier.matz at 6wind.com;
> Pattan, Reshma <reshma.pattan at intel.com>; Wiles, Keith
> <keith.wiles at intel.com>; dev at dpdk.org
> Cc: Padubidri, Sanjay A <sanjay.padubidri at intel.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>; nd <nd at arm.com>; nd <nd at arm.com>
> Subject: RE: [dpdk-dev] [PATCH v1 1/2] lib/ring: add enqueue-dequeue callabck
>
> >
> > 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?
> 'struct rte_ring' is exposed to the application. It is possible that the application has
> declared a variable of type 'struct rte_ring'. Any addition to this structure will
> increase the size of 'struct rte_ring'. Hence, it won't be compatible.
>
> >
> > 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