DPDK
17.11.10
|
#include <string.h>
#include <rte_common.h>
#include <rte_config.h>
#include <rte_dev.h>
#include <rte_log.h>
#include <rte_malloc.h>
#include "rte_eventdev.h"
Go to the source code of this file.
Data Structures | |
struct | rte_eventdev_global |
struct | rte_eventdev_ops |
Macros | |
#define | RTE_EVENT_ETH_RX_ADAPTER_SW_CAP |
Typedefs | |
typedef void(* | eventdev_info_get_t) (struct rte_eventdev *dev, struct rte_event_dev_info *dev_info) |
typedef int(* | eventdev_configure_t) (const struct rte_eventdev *dev) |
typedef int(* | eventdev_start_t) (struct rte_eventdev *dev) |
typedef void(* | eventdev_stop_t) (struct rte_eventdev *dev) |
typedef int(* | eventdev_close_t) (struct rte_eventdev *dev) |
typedef void(* | eventdev_queue_default_conf_get_t) (struct rte_eventdev *dev, uint8_t queue_id, struct rte_event_queue_conf *queue_conf) |
typedef int(* | eventdev_queue_setup_t) (struct rte_eventdev *dev, uint8_t queue_id, const struct rte_event_queue_conf *queue_conf) |
typedef void(* | eventdev_queue_release_t) (struct rte_eventdev *dev, uint8_t queue_id) |
typedef void(* | eventdev_port_default_conf_get_t) (struct rte_eventdev *dev, uint8_t port_id, struct rte_event_port_conf *port_conf) |
typedef int(* | eventdev_port_setup_t) (struct rte_eventdev *dev, uint8_t port_id, const struct rte_event_port_conf *port_conf) |
typedef void(* | eventdev_port_release_t) (void *port) |
typedef int(* | eventdev_port_link_t) (struct rte_eventdev *dev, void *port, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links) |
typedef int(* | eventdev_port_unlink_t) (struct rte_eventdev *dev, void *port, uint8_t queues[], uint16_t nb_unlinks) |
typedef int(* | eventdev_dequeue_timeout_ticks_t) (struct rte_eventdev *dev, uint64_t ns, uint64_t *timeout_ticks) |
typedef void(* | eventdev_dump_t) (struct rte_eventdev *dev, FILE *f) |
typedef int(* | eventdev_xstats_get_t) (const struct rte_eventdev *dev, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, const unsigned int ids[], uint64_t values[], unsigned int n) |
typedef int(* | eventdev_xstats_reset_t) (struct rte_eventdev *dev, enum rte_event_dev_xstats_mode mode, int16_t queue_port_id, const uint32_t ids[], uint32_t nb_ids) |
typedef int(* | eventdev_xstats_get_names_t) (const struct rte_eventdev *dev, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, struct rte_event_dev_xstats_name *xstats_names, unsigned int *ids, unsigned int size) |
typedef uint64_t(* | eventdev_xstats_get_by_name) (const struct rte_eventdev *dev, const char *name, unsigned int *id) |
typedef int(* | eventdev_eth_rx_adapter_caps_get_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, uint32_t *caps) |
typedef int(* | eventdev_eth_rx_adapter_queue_add_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t rx_queue_id, const struct rte_event_eth_rx_adapter_queue_conf *queue_conf) |
typedef int(* | eventdev_eth_rx_adapter_queue_del_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t rx_queue_id) |
typedef int(* | eventdev_eth_rx_adapter_start_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) |
typedef int(* | eventdev_eth_rx_adapter_stop_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) |
typedef int(* | eventdev_eth_rx_adapter_stats_get) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, struct rte_event_eth_rx_adapter_stats *stats) |
typedef int(* | eventdev_eth_rx_adapter_stats_reset) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) |
Functions | |
static struct rte_eventdev * | rte_event_pmd_get_named_dev (const char *name) |
static unsigned | rte_event_pmd_is_valid_dev (uint8_t dev_id) |
struct rte_eventdev * | rte_event_pmd_allocate (const char *name, int socket_id) |
int | rte_event_pmd_release (struct rte_eventdev *eventdev) |
Variables | |
struct rte_eventdev * | rte_eventdevs |
RTE Event PMD APIs
Definition in file rte_eventdev_pmd.h.
#define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP |
Ethernet Rx adapter cap to return If the packet transfers from the ethdev to eventdev use a SW service function
Definition at line 95 of file rte_eventdev_pmd.h.
typedef void(* eventdev_info_get_t) (struct rte_eventdev *dev, struct rte_event_dev_info *dev_info) |
Definitions of all functions exported by a driver through the the generic structure of type event_dev_ops supplied in the rte_eventdev structure associated with a device. Get device information of a device.
dev | Event device pointer |
dev_info | Event device information structure |
Definition at line 187 of file rte_eventdev_pmd.h.
typedef int(* eventdev_configure_t) (const struct rte_eventdev *dev) |
Configure a device.
dev | Event device pointer |
Definition at line 199 of file rte_eventdev_pmd.h.
typedef int(* eventdev_start_t) (struct rte_eventdev *dev) |
Start a configured device.
dev | Event device pointer |
Definition at line 210 of file rte_eventdev_pmd.h.
typedef void(* eventdev_stop_t) (struct rte_eventdev *dev) |
Stop a configured device.
dev | Event device pointer |
Definition at line 218 of file rte_eventdev_pmd.h.
typedef int(* eventdev_close_t) (struct rte_eventdev *dev) |
Close a configured device.
dev | Event device pointer |
Definition at line 230 of file rte_eventdev_pmd.h.
typedef void(* eventdev_queue_default_conf_get_t) (struct rte_eventdev *dev, uint8_t queue_id, struct rte_event_queue_conf *queue_conf) |
Retrieve the default event queue configuration.
dev | Event device pointer | |
queue_id | Event queue index | |
[out] | queue_conf | Event queue configuration structure |
Definition at line 243 of file rte_eventdev_pmd.h.
typedef int(* eventdev_queue_setup_t) (struct rte_eventdev *dev, uint8_t queue_id, const struct rte_event_queue_conf *queue_conf) |
Setup an event queue.
dev | Event device pointer |
queue_id | Event queue index |
queue_conf | Event queue configuration structure |
Definition at line 259 of file rte_eventdev_pmd.h.
typedef void(* eventdev_queue_release_t) (struct rte_eventdev *dev, uint8_t queue_id) |
Release resources allocated by given event queue.
dev | Event device pointer |
queue_id | Event queue index |
Definition at line 272 of file rte_eventdev_pmd.h.
typedef void(* eventdev_port_default_conf_get_t) (struct rte_eventdev *dev, uint8_t port_id, struct rte_event_port_conf *port_conf) |
Retrieve the default event port configuration.
dev | Event device pointer | |
port_id | Event port index | |
[out] | port_conf | Event port configuration structure |
Definition at line 286 of file rte_eventdev_pmd.h.
typedef int(* eventdev_port_setup_t) (struct rte_eventdev *dev, uint8_t port_id, const struct rte_event_port_conf *port_conf) |
Setup an event port.
dev | Event device pointer |
port_id | Event port index |
port_conf | Event port configuration structure |
Definition at line 302 of file rte_eventdev_pmd.h.
typedef void(* eventdev_port_release_t) (void *port) |
Release memory resources allocated by given event port.
port | Event port pointer |
Definition at line 313 of file rte_eventdev_pmd.h.
typedef int(* eventdev_port_link_t) (struct rte_eventdev *dev, void *port, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links) |
Link multiple source event queues to destination event port.
dev | Event device pointer |
port | Event port pointer |
link | Points to an array of nb_links event queues to be linked to the event port. |
priorities | Points to an array of nb_links service priorities associated with each event queue link to event port. |
nb_links | The number of links to establish |
Definition at line 335 of file rte_eventdev_pmd.h.
typedef int(* eventdev_port_unlink_t) (struct rte_eventdev *dev, void *port, uint8_t queues[], uint16_t nb_unlinks) |
Unlink multiple source event queues from destination event port.
dev | Event device pointer |
port | Event port pointer |
queues | An array of nb_unlinks event queues to be unlinked from the event port. |
nb_unlinks | The number of unlinks to establish |
Definition at line 355 of file rte_eventdev_pmd.h.
typedef int(* eventdev_dequeue_timeout_ticks_t) (struct rte_eventdev *dev, uint64_t ns, uint64_t *timeout_ticks) |
Converts nanoseconds to timeout_ticks value for rte_event_dequeue()
dev | Event device pointer | |
ns | Wait time in nanosecond | |
[out] | timeout_ticks | Value for the timeout_ticks parameter in rte_event_dequeue() function |
Definition at line 372 of file rte_eventdev_pmd.h.
typedef void(* eventdev_dump_t) (struct rte_eventdev *dev, FILE *f) |
Dump internal information
dev | Event device pointer |
f | A pointer to a file for output |
Definition at line 384 of file rte_eventdev_pmd.h.
typedef int(* eventdev_xstats_get_t) (const struct rte_eventdev *dev, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, const unsigned int ids[], uint64_t values[], unsigned int n) |
Retrieve a set of statistics from device
dev | Event device pointer |
ids | The stat ids to retrieve |
values | The returned stat values |
n | The number of id values and entries in the values array |
Definition at line 400 of file rte_eventdev_pmd.h.
typedef int(* eventdev_xstats_reset_t) (struct rte_eventdev *dev, enum rte_event_dev_xstats_mode mode, int16_t queue_port_id, const uint32_t ids[], uint32_t nb_ids) |
Resets the statistic values in xstats for the device, based on mode.
Definition at line 407 of file rte_eventdev_pmd.h.
typedef int(* eventdev_xstats_get_names_t) (const struct rte_eventdev *dev, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, struct rte_event_dev_xstats_name *xstats_names, unsigned int *ids, unsigned int size) |
Get names of extended stats of an event device
dev | Event device pointer |
xstats_names | Array of name values to be filled in |
size | Number of values in the xstats_names array |
Definition at line 428 of file rte_eventdev_pmd.h.
typedef uint64_t(* eventdev_xstats_get_by_name) (const struct rte_eventdev *dev, const char *name, unsigned int *id) |
Get value of one stats and optionally return its id
dev | Event device pointer |
name | The name of the stat to retrieve |
id | Pointer to an unsigned int where we store the stat-id for future reference. This pointer may be null if the id is not required. |
Definition at line 448 of file rte_eventdev_pmd.h.
typedef int(* eventdev_eth_rx_adapter_caps_get_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, uint32_t *caps) |
Retrieve the event device's ethdev Rx adapter capabilities for the specified ethernet port
dev | Event device pointer | |
eth_dev | Ethernet device pointer | |
[out] | caps | A pointer to memory filled with Rx event adapter capabilities. |
Definition at line 472 of file rte_eventdev_pmd.h.
typedef int(* eventdev_eth_rx_adapter_queue_add_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t rx_queue_id, const struct rte_event_eth_rx_adapter_queue_conf *queue_conf) |
Add ethernet Rx queues to event device. This callback is invoked if the caps returned from rte_eventdev_eth_rx_adapter_caps_get(, eth_port_id) has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
dev | Event device pointer |
eth_dev | Ethernet device pointer |
rx_queue_id | Ethernet device receive queue index |
queue_conf | Additional configuration structure |
Definition at line 500 of file rte_eventdev_pmd.h.
typedef int(* eventdev_eth_rx_adapter_queue_del_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t rx_queue_id) |
Delete ethernet Rx queues from event device. This callback is invoked if the caps returned from eventdev_eth_rx_adapter_caps_get(, eth_port_id) has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set.
dev | Event device pointer |
eth_dev | Ethernet device pointer |
rx_queue_id | Ethernet device receive queue index |
Definition at line 526 of file rte_eventdev_pmd.h.
typedef int(* eventdev_eth_rx_adapter_start_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) |
Start ethernet Rx adapter. This callback is invoked if the caps returned from eventdev_eth_rx_adapter_caps_get(.., eth_port_id) has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues from eth_port_id have been added to the event device.
dev | Event device pointer |
eth_dev | Ethernet device pointer |
Definition at line 547 of file rte_eventdev_pmd.h.
typedef int(* eventdev_eth_rx_adapter_stop_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) |
Stop ethernet Rx adapter. This callback is invoked if the caps returned from eventdev_eth_rx_adapter_caps_get(..,eth_port_id) has RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT set and Rx queues from eth_port_id have been added to the event device.
dev | Event device pointer |
eth_dev | Ethernet device pointer |
Definition at line 567 of file rte_eventdev_pmd.h.
typedef int(* eventdev_eth_rx_adapter_stats_get) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, struct rte_event_eth_rx_adapter_stats *stats) |
Retrieve ethernet Rx adapter statistics.
dev | Event device pointer | |
eth_dev | Ethernet device pointer | |
[out] | stats | Pointer to stats structure |
Definition at line 589 of file rte_eventdev_pmd.h.
typedef int(* eventdev_eth_rx_adapter_stats_reset) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev) |
Reset ethernet Rx adapter statistics.
dev | Event device pointer |
eth_dev | Ethernet device pointer |
Definition at line 605 of file rte_eventdev_pmd.h.
|
static |
The pool of rte_eventdev structures. Get the rte_eventdev structure device pointer for the named device.
name | device name to select the device structure. |
Definition at line 128 of file rte_eventdev_pmd.h.
|
inlinestatic |
Validate if the event device index is valid attached event device.
dev_id | Event device index. |
Definition at line 156 of file rte_eventdev_pmd.h.
struct rte_eventdev* rte_event_pmd_allocate | ( | const char * | name, |
int | socket_id | ||
) |
Allocates a new eventdev slot for an event device and returns the pointer to that slot for the driver to use.
name | Unique identifier name for each device |
socket_id | Socket to allocate resources on. |
int rte_event_pmd_release | ( | struct rte_eventdev * | eventdev | ) |
Release the specified eventdev device.
eventdev | The eventdev pointer is the address of the rte_eventdev structure. |
struct rte_eventdev* rte_eventdevs |
Pointer to global event devices data structure.