DPDK  18.11.11
Data Structures | Macros | Typedefs | Functions
rte_eventdev_pmd.h File Reference
#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"
#include "rte_event_timer_adapter_pmd.h"

Go to the source code of this file.

Data Structures

struct  rte_eventdev_global
 
struct  rte_eventdev_ops
 

Macros

#define RTE_EVENT_CRYPTO_ADAPTER_SW_CAP   RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA
 

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_port_unlinks_in_progress_t) (struct rte_eventdev *dev, void *port)
 
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_timer_adapter_caps_get_t) (const struct rte_eventdev *dev, uint64_t flags, uint32_t *caps, const struct rte_event_timer_adapter_ops **ops)
 
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)
 
typedef int(* eventdev_selftest) (void)
 
typedef int(* eventdev_crypto_adapter_caps_get_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, uint32_t *caps)
 
typedef int(* eventdev_crypto_adapter_queue_pair_add_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, int32_t queue_pair_id, const struct rte_event *event)
 
typedef int(* eventdev_crypto_adapter_queue_pair_del_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, int32_t queue_pair_id)
 
typedef int(* eventdev_crypto_adapter_start_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev)
 
typedef int(* eventdev_crypto_adapter_stop_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev)
 
typedef int(* eventdev_crypto_adapter_stats_get) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, struct rte_event_crypto_adapter_stats *stats)
 
typedef int(* eventdev_crypto_adapter_stats_reset) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev)
 
typedef int(* eventdev_eth_tx_adapter_caps_get_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, uint32_t *caps)
 
typedef int(* eventdev_eth_tx_adapter_create_t) (uint8_t id, const struct rte_eventdev *dev)
 
typedef int(* eventdev_eth_tx_adapter_free_t) (uint8_t id, const struct rte_eventdev *dev)
 
typedef int(* eventdev_eth_tx_adapter_queue_add_t) (uint8_t id, const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t tx_queue_id)
 
typedef int(* eventdev_eth_tx_adapter_queue_del_t) (uint8_t id, const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t tx_queue_id)
 
typedef int(* eventdev_eth_tx_adapter_start_t) (uint8_t id, const struct rte_eventdev *dev)
 
typedef int(* eventdev_eth_tx_adapter_stop_t) (uint8_t id, const struct rte_eventdev *dev)
 
typedef int(* eventdev_eth_tx_adapter_stats_get_t) (uint8_t id, const struct rte_eventdev *dev, struct rte_event_eth_tx_adapter_stats *stats)
 
typedef int(* eventdev_eth_tx_adapter_stats_reset_t) (uint8_t id, const struct rte_eventdev *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)
 

Detailed Description

RTE Event PMD APIs

Note
These API are from event PMD only and user applications should not call them directly.

Definition in file rte_eventdev_pmd.h.

Macro Definition Documentation

#define RTE_EVENT_CRYPTO_ADAPTER_SW_CAP   RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA

Ethernet Rx adapter cap to return If the packet transfers from the ethdev to eventdev use a SW service function

Definition at line 73 of file rte_eventdev_pmd.h.

Typedef Documentation

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.

Parameters
devEvent device pointer
dev_infoEvent device information structure
Returns
Returns 0 on success

Definition at line 162 of file rte_eventdev_pmd.h.

typedef int(* eventdev_configure_t) (const struct rte_eventdev *dev)

Configure a device.

Parameters
devEvent device pointer
Returns
Returns 0 on success

Definition at line 174 of file rte_eventdev_pmd.h.

typedef int(* eventdev_start_t) (struct rte_eventdev *dev)

Start a configured device.

Parameters
devEvent device pointer
Returns
Returns 0 on success

Definition at line 185 of file rte_eventdev_pmd.h.

typedef void(* eventdev_stop_t) (struct rte_eventdev *dev)

Stop a configured device.

Parameters
devEvent device pointer

Definition at line 193 of file rte_eventdev_pmd.h.

typedef int(* eventdev_close_t) (struct rte_eventdev *dev)

Close a configured device.

Parameters
devEvent device pointer
Returns
  • 0 on success
  • (-EAGAIN) if can't close as device is busy

Definition at line 205 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.

Parameters
devEvent device pointer
queue_idEvent queue index
[out]queue_confEvent queue configuration structure

Definition at line 218 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.

Parameters
devEvent device pointer
queue_idEvent queue index
queue_confEvent queue configuration structure
Returns
Returns 0 on success.

Definition at line 234 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.

Parameters
devEvent device pointer
queue_idEvent queue index

Definition at line 247 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.

Parameters
devEvent device pointer
port_idEvent port index
[out]port_confEvent port configuration structure

Definition at line 261 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.

Parameters
devEvent device pointer
port_idEvent port index
port_confEvent port configuration structure
Returns
Returns 0 on success.

Definition at line 277 of file rte_eventdev_pmd.h.

typedef void(* eventdev_port_release_t) (void *port)

Release memory resources allocated by given event port.

Parameters
portEvent port pointer

Definition at line 288 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.

Parameters
devEvent device pointer
portEvent port pointer
linkPoints to an array of nb_links event queues to be linked to the event port.
prioritiesPoints to an array of nb_links service priorities associated with each event queue link to event port.
nb_linksThe number of links to establish
Returns
Returns 0 on success.

Definition at line 310 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.

Parameters
devEvent device pointer
portEvent port pointer
queuesAn array of nb_unlinks event queues to be unlinked from the event port.
nb_unlinksThe number of unlinks to establish
Returns
Returns 0 on success.

Definition at line 330 of file rte_eventdev_pmd.h.

typedef int(* eventdev_port_unlinks_in_progress_t) (struct rte_eventdev *dev, void *port)

Unlinks in progress. Returns number of unlinks that the PMD is currently performing, but have not yet been completed.

Parameters
devEvent device pointer
portEvent port pointer
Returns
Returns the number of in-progress unlinks. Zero is returned if none are in progress.

Definition at line 347 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()

Parameters
devEvent device pointer
nsWait time in nanosecond
[out]timeout_ticksValue for the timeout_ticks parameter in rte_event_dequeue() function
Returns
Returns 0 on success.

Definition at line 364 of file rte_eventdev_pmd.h.

typedef void(* eventdev_dump_t) (struct rte_eventdev *dev, FILE *f)

Dump internal information

Parameters
devEvent device pointer
fA pointer to a file for output

Definition at line 376 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

Parameters
devEvent device pointer
idsThe stat ids to retrieve
valuesThe returned stat values
nThe number of id values and entries in the values array
Returns
The number of stat values successfully filled into the values array

Definition at line 392 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 399 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

Parameters
devEvent device pointer
xstats_namesArray of name values to be filled in
sizeNumber of values in the xstats_names array
Returns
When size >= the number of stats, return the number of stat values filled into the array. When size < the number of available stats, return the number of stats values, and do not fill in any data into xstats_names.

Definition at line 420 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

Parameters
devEvent device pointer
nameThe name of the stat to retrieve
idPointer to an unsigned int where we store the stat-id for future reference. This pointer may be null if the id is not required.
Returns
The value of the stat, or (uint64_t)-1 if the stat is not found. If the stat is not found, the id value will be returned as (unsigned)-1, if id pointer is non-NULL

Definition at line 440 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

Parameters
devEvent device pointer
eth_devEthernet device pointer
[out]capsA pointer to memory filled with Rx event adapter capabilities.
Returns
  • 0: Success, driver provides Rx event adapter capabilities for the ethernet device.
  • <0: Error code returned by the driver function.

Definition at line 464 of file rte_eventdev_pmd.h.

typedef int(* eventdev_timer_adapter_caps_get_t) (const struct rte_eventdev *dev, uint64_t flags, uint32_t *caps, const struct rte_event_timer_adapter_ops **ops)

Retrieve the event device's timer adapter capabilities, as well as the ops structure that an event timer adapter should call through to enter the driver

Parameters
devEvent device pointer
flagsFlags that can be used to determine how to select an event timer adapter ops structure
[out]capsA pointer to memory filled with Rx event adapter capabilities.
[out]opsA pointer to the ops pointer to set with the address of the desired ops structure
Returns
  • 0: Success, driver provides Rx event adapter capabilities for the ethernet device.
  • <0: Error code returned by the driver function.

Definition at line 495 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.

Parameters
devEvent device pointer
eth_devEthernet device pointer
rx_queue_idEthernet device receive queue index
queue_confAdditional configuration structure
Returns
  • 0: Success, ethernet receive queue added successfully.
  • <0: Error code returned by the driver function.

Definition at line 523 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.

Parameters
devEvent device pointer
eth_devEthernet device pointer
rx_queue_idEthernet device receive queue index
Returns
  • 0: Success, ethernet receive queue deleted successfully.
  • <0: Error code returned by the driver function.

Definition at line 549 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.

Parameters
devEvent device pointer
eth_devEthernet device pointer
Returns
  • 0: Success, ethernet Rx adapter started successfully.
  • <0: Error code returned by the driver function.

Definition at line 570 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.

Parameters
devEvent device pointer
eth_devEthernet device pointer
Returns
  • 0: Success, ethernet Rx adapter stopped successfully.
  • <0: Error code returned by the driver function.

Definition at line 590 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.

Parameters
devEvent device pointer
eth_devEthernet device pointer
[out]statsPointer to stats structure
Returns
Return 0 on success.

Definition at line 612 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.

Parameters
devEvent device pointer
eth_devEthernet device pointer
Returns
Return 0 on success.

Definition at line 628 of file rte_eventdev_pmd.h.

typedef int(* eventdev_selftest) (void)

Start eventdev selftest.

Returns
Return 0 on success.

Definition at line 636 of file rte_eventdev_pmd.h.

typedef int(* eventdev_crypto_adapter_caps_get_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, uint32_t *caps)

This API may change without prior notice

Retrieve the event device's crypto adapter capabilities for the specified cryptodev

Parameters
devEvent device pointer
cdevcryptodev pointer
[out]capsA pointer to memory filled with event adapter capabilities. It is expected to be pre-allocated & initialized by caller.
Returns
  • 0: Success, driver provides event adapter capabilities for the cryptodev.
  • <0: Error code returned by the driver function.

Definition at line 664 of file rte_eventdev_pmd.h.

typedef int(* eventdev_crypto_adapter_queue_pair_add_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, int32_t queue_pair_id, const struct rte_event *event)

This API may change without prior notice

Add crypto queue pair to event device. This callback is invoked if the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id) has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.

Parameters
devEvent device pointer
cdevcryptodev pointer
queue_pair_idcryptodev queue pair identifier.
eventEvent information required for binding cryptodev queue pair to event queue. This structure will have a valid value for only those HW PMDs supporting
See also
RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND capability.
Returns
  • 0: Success, cryptodev queue pair added successfully.
  • <0: Error code returned by the driver function.

Definition at line 695 of file rte_eventdev_pmd.h.

typedef int(* eventdev_crypto_adapter_queue_pair_del_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, int32_t queue_pair_id)

This API may change without prior notice

Delete crypto queue pair to event device. This callback is invoked if the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id) has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set.

Parameters
devEvent device pointer
cdevcryptodev pointer
queue_pair_idcryptodev queue pair identifier.
Returns
  • 0: Success, cryptodev queue pair deleted successfully.
  • <0: Error code returned by the driver function.

Definition at line 723 of file rte_eventdev_pmd.h.

typedef int(* eventdev_crypto_adapter_start_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev)

Start crypto adapter. This callback is invoked if the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id) has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set and queue pairs from cdev_id have been added to the event device.

Parameters
devEvent device pointer
cdevCrypto device pointer
Returns
  • 0: Success, crypto adapter started successfully.
  • <0: Error code returned by the driver function.

Definition at line 744 of file rte_eventdev_pmd.h.

typedef int(* eventdev_crypto_adapter_stop_t) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev)

Stop crypto adapter. This callback is invoked if the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id) has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_* set and queue pairs from cdev_id have been added to the event device.

Parameters
devEvent device pointer
cdevCrypto device pointer
Returns
  • 0: Success, crypto adapter stopped successfully.
  • <0: Error code returned by the driver function.

Definition at line 764 of file rte_eventdev_pmd.h.

typedef int(* eventdev_crypto_adapter_stats_get) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev, struct rte_event_crypto_adapter_stats *stats)

Retrieve crypto adapter statistics.

Parameters
devEvent device pointer
cdevCrypto device pointer
[out]statsPointer to stats structure
Returns
Return 0 on success.

Definition at line 786 of file rte_eventdev_pmd.h.

typedef int(* eventdev_crypto_adapter_stats_reset) (const struct rte_eventdev *dev, const struct rte_cryptodev *cdev)

Reset crypto adapter statistics.

Parameters
devEvent device pointer
cdevCrypto device pointer
Returns
Return 0 on success.

Definition at line 804 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_caps_get_t) (const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, uint32_t *caps)

Retrieve the event device's eth Tx adapter capabilities.

Parameters
devEvent device pointer
eth_devEthernet device pointer
[out]capsA pointer to memory filled with eth Tx adapter capabilities.
Returns
  • 0: Success, driver provides eth Tx adapter capabilities
  • <0: Error code returned by the driver function.

Definition at line 825 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_create_t) (uint8_t id, const struct rte_eventdev *dev)

Create adapter callback.

Parameters
idAdapter identifier
devEvent device pointer
Returns
  • 0: Success.
  • <0: Error code on failure.

Definition at line 842 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_free_t) (uint8_t id, const struct rte_eventdev *dev)

Free adapter callback.

Parameters
idAdapter identifier
devEvent device pointer
Returns
  • 0: Success.
  • <0: Error code on failure.

Definition at line 858 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_queue_add_t) (uint8_t id, const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t tx_queue_id)

Add a Tx queue to the adapter. A queue value of -1 is used to indicate all queues within the device.

Parameters
idAdapter identifier
devEvent device pointer
eth_devEthernet device pointer
tx_queue_idTransmit queue index
Returns
  • 0: Success.
  • <0: Error code on failure.

Definition at line 882 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_queue_del_t) (uint8_t id, const struct rte_eventdev *dev, const struct rte_eth_dev *eth_dev, int32_t tx_queue_id)

Delete a Tx queue from the adapter. A queue value of -1 is used to indicate all queues within the device, that have been added to this adapter.

Parameters
idAdapter identifier
devEvent device pointer
eth_devEthernet device pointer
tx_queue_idTransmit queue index
Returns
  • 0: Success, Queues deleted successfully.
  • <0: Error code on failure.

Definition at line 910 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_start_t) (uint8_t id, const struct rte_eventdev *dev)

Start the adapter.

Parameters
idAdapter identifier
devEvent device pointer
Returns
  • 0: Success, Adapter started correctly.
  • <0: Error code on failure.

Definition at line 929 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_stop_t) (uint8_t id, const struct rte_eventdev *dev)

Stop the adapter.

Parameters
idAdapter identifier
devEvent device pointer
Returns
  • 0: Success.
  • <0: Error code on failure.

Definition at line 945 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_stats_get_t) (uint8_t id, const struct rte_eventdev *dev, struct rte_event_eth_tx_adapter_stats *stats)

Retrieve statistics for an adapter

Parameters
idAdapter identifier
devEvent device pointer
[out]statsA pointer to structure used to retrieve statistics for an adapter
Returns
  • 0: Success, statistics retrieved successfully.
  • <0: Error code on failure.

Definition at line 966 of file rte_eventdev_pmd.h.

typedef int(* eventdev_eth_tx_adapter_stats_reset_t) (uint8_t id, const struct rte_eventdev *dev)

Reset statistics for an adapter

Parameters
idAdapter identifier
devEvent device pointer
Returns
  • 0: Success, statistics retrieved successfully.
  • <0: Error code on failure.

Definition at line 984 of file rte_eventdev_pmd.h.

Function Documentation

static struct rte_eventdev* rte_event_pmd_get_named_dev ( const char *  name)
static

The pool of rte_eventdev structures. Get the rte_eventdev structure device pointer for the named device.

Parameters
namedevice name to select the device structure.
Returns
  • The rte_eventdev structure pointer for the given device ID.

Definition at line 103 of file rte_eventdev_pmd.h.

static unsigned rte_event_pmd_is_valid_dev ( uint8_t  dev_id)
inlinestatic

Validate if the event device index is valid attached event device.

Parameters
dev_idEvent device index.
Returns
  • If the device index is valid (1) or not (0).

Definition at line 131 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.

Parameters
nameUnique identifier name for each device
socket_idSocket to allocate resources on.
Returns
  • Slot in the rte_dev_devices array for a new device;
int rte_event_pmd_release ( struct rte_eventdev *  eventdev)

Release the specified eventdev device.

Parameters
eventdevThe eventdev pointer is the address of the rte_eventdev structure.
Returns
  • 0 on success, negative on error