On Fri, 7 Jun 2019 00:03:54 +0530 Vipin Varghese <vipin.vargh...@intel.com> wrote:
> 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. > > Signed-off-by: Vipin Varghese <vipin.vargh...@intel.com> > --- NAK What is the use case for this? Rings are one of the most used elements of DPDK and anything like this will have performance impact. And as DPDK goes to more of distribution model, all features have to be enabled. Also, this looks like a problem: +struct rte_ring_callback { + TAILQ_ENTRY(rte_ring_callback) next; /* Callbacks list */ + rte_ring_cb_fn cb_fn; /* Callback address */ + void *cb_arg; /* Parameter for callback */ + uint32_t active; /* Callback is executing */ The active element is likely updated in one thread and queried in another it needs to be volatile, or better yet an atomic to ensure memory ordering.