DPDK
19.11.14
|
#include <stdint.h>
#include <rte_common.h>
#include <rte_memory.h>
#include <rte_malloc.h>
#include <rte_ring.h>
#include "rte_eventdev.h"
Go to the source code of this file.
Data Structures | |
struct | rte_event_ring |
Functions | |
static __rte_always_inline unsigned int | rte_event_ring_count (const struct rte_event_ring *r) |
static __rte_always_inline unsigned int | rte_event_ring_free_count (const struct rte_event_ring *r) |
static __rte_always_inline unsigned int | rte_event_ring_enqueue_burst (struct rte_event_ring *r, const struct rte_event *events, unsigned int n, uint16_t *free_space) |
static __rte_always_inline unsigned int | rte_event_ring_dequeue_burst (struct rte_event_ring *r, struct rte_event *events, unsigned int n, uint16_t *available) |
struct rte_event_ring * | rte_event_ring_lookup (const char *name) |
void | rte_event_ring_free (struct rte_event_ring *r) |
static unsigned int | rte_event_ring_get_size (const struct rte_event_ring *r) |
static unsigned int | rte_event_ring_get_capacity (const struct rte_event_ring *r) |
RTE Event Ring
This provides a ring implementation for passing rte_event structures from one core to another.
Definition in file rte_event_ring.h.
|
static |
Returns the number of events in the ring
r | pointer to the event ring |
Definition at line 50 of file rte_event_ring.h.
|
static |
Returns the amount of free space in the ring
r | pointer to the event ring |
Definition at line 65 of file rte_event_ring.h.
|
static |
Enqueue a set of events onto a ring
Note: this API enqueues by copying the events themselves onto the ring, rather than just placing a pointer to each event onto the ring. This means that statically-allocated events can safely be enqueued by this API.
r | pointer to the event ring |
events | pointer to an array of struct rte_event objects |
n | number of events in the array to enqueue |
free_space | if non-null, is updated to indicate the amount of free space in the ring once the enqueue has completed. |
Definition at line 91 of file rte_event_ring.h.
|
static |
Dequeue a set of events from a ring
Note: this API does not work with pointers to events, rather it copies the events themselves to the destination events
buffer.
r | pointer to the event ring |
events | pointer to an array to hold the struct rte_event objects |
n | number of events that can be held in the events array |
available | if non-null, is updated to indicate the number of events remaining in the ring once the dequeue has completed |
Definition at line 132 of file rte_event_ring.h.
struct rte_event_ring* rte_event_ring_lookup | ( | const char * | name | ) |
Search for an event ring based on its name
name | The name of the ring. |
void rte_event_ring_free | ( | struct rte_event_ring * | r | ) |
De-allocate all memory used by the ring.
r | Ring to free |
|
inlinestatic |
Return the size of the event ring.
r | A pointer to the ring structure. |
rte_ring_get_capacity()
. Definition at line 264 of file rte_event_ring.h.
|
inlinestatic |
Return the number of elements which can be stored in the event ring.
r | A pointer to the ring structure. |
Definition at line 278 of file rte_event_ring.h.