[dpdk-dev] [PATCH v2 07/15] event/sw: add support for event queues

Van Haaren, Harry harry.van.haaren at intel.com
Mon Feb 6 11:25:18 CET 2017


> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com]
> Sent: Monday, February 6, 2017 9:25 AM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>
> Cc: dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>
> Subject: Re: [PATCH v2 07/15] event/sw: add support for event queues
> 
> On Tue, Jan 31, 2017 at 04:14:25PM +0000, Harry van Haaren wrote:
> > From: Bruce Richardson <bruce.richardson at intel.com>
> >
> > Add in the data structures for the event queues, and the eventdev
> > functions to create and destroy those queues.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> > Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
> > ---
> >  drivers/event/sw/iq_ring.h  | 176 ++++++++++++++++++++++++++++++++++++++++++++
> >  drivers/event/sw/sw_evdev.c | 158 +++++++++++++++++++++++++++++++++++++++
> >  drivers/event/sw/sw_evdev.h |  75 +++++++++++++++++++
> >  3 files changed, 409 insertions(+)
> >  create mode 100644 drivers/event/sw/iq_ring.h
> >
> > + */
> > +
> > +/*
> > + * Ring structure definitions used for the internal ring buffers of the
> > + * SW eventdev implementation. These are designed for single-core use only.
> > + */
> 
> If I understand it correctly, IQ and QE rings are single producer and
> single consumer rings. By the specification, multiple producers through
> multiple ports can enqueue to the event queues at a time.Does SW implementation
> support that? or am I missing something here?

You're right that the IQ and QE rings are Single Producer, Single Consumer rings. More specifically, the QE is a ring for sending rte_event structs between cores, while the IQ ring is optimized for internal use in the scheduler core - and should not be used to send events between cores. Note that the design of the SW scheduler includes a central core for performing scheduling.

In other works, the QE rings transfer events from the worker core to the scheduler - and the scheduler pushes the events into what you call the "event queues" (aka, the atomic/ordered queue itself). These "event queues" are IQ instances. On egress from the scheduler, the event passes through a QE ring to the worker.

The result is that despite that only SP/SC rings are used, multiple workers can enqueue to any event queue.


More information about the dev mailing list