Data Accelerator Offload
|
#include <rte_common.h>
#include <stdint.h>
#include <rte_ethdev.h>
#include <rte_mempool.h>
Go to the source code of this file.
Data Structures | |
struct | dao_eth_trs_hdr |
struct | dao_eth_trs_pkt |
struct | dao_eth_trs_dev_config |
struct | dao_eth_trs_queue_config |
struct | dao_eth_trs_info |
Macros | |
#define | dao_eth_trs_tx rte_eth_tx_burst |
#define | dao_eth_trs_rx rte_eth_rx_burst |
Functions | |
int | dao_eth_trs_init (void) |
int | dao_eth_trs_fini (void) |
int | dao_eth_trs_info (struct dao_eth_trs_info *info) |
int | dao_eth_trs_dev_alloc (uint8_t dev_id, struct dao_eth_trs_dev_config *config) |
int | dao_eth_trs_dev_queue_configure (uint8_t dev_id, uint16_t queue_id, struct dao_eth_trs_queue_config *conf) |
int | dao_eth_trs_dev_queue_map (uint8_t dev_id, uint16_t dev_queue_id, uint16_t *port_id, uint16_t *queue_id) |
int | dao_eth_trs_dev_start (uint8_t dev_id) |
int | dao_eth_trs_dev_stop (uint8_t dev_id) |
int | dao_eth_trs_dev_free (uint8_t dev_id) |
This file contains the API for ethernet transport library.
Ethernet transport is a mechanism to transport data over ethernet devices using a common API. It is designed to be used by protocols that need to transport data over ethernet devices without having to deal with the configuration of the underlying devices. The ethernet transport device is an encapsulation of one or more ethernet devices. Mapping of the transport device to the underlying ethernet devices is done by the ethernet transport library.
The APIs can be invoked in the following order:
Definition in file dao_eth_trs.h.
#define dao_eth_trs_tx rte_eth_tx_burst |
Alias for rte_eth_tx_burst
Definition at line 105 of file dao_eth_trs.h.
#define dao_eth_trs_rx rte_eth_rx_burst |
Alias for rte_eth_rx_burst
Definition at line 106 of file dao_eth_trs.h.
enum dao_eth_trs_op_type |
DAO ethernet transport op type based on the class of operation.
Definition at line 49 of file dao_eth_trs.h.
int dao_eth_trs_init | ( | void | ) |
Initialize ethernet transport.
This function initializes the ethernet transport library and sets up the necessary resources. It must be called after EAL initialization and before any other ethernet transport API is invoked. If no supported ethernet devices are found, this function returns an error.
int dao_eth_trs_fini | ( | void | ) |
Finalize ethernet transport.
This function finalizes the ethernet transport library and frees the resources allocated during initialization.
int dao_eth_trs_info | ( | struct dao_eth_trs_info * | info | ) |
Get information about the ethernet transport devices.
This function retrieves information about the ethernet transport devices.
info | Pointer to the structure to store the information. |
int dao_eth_trs_dev_alloc | ( | uint8_t | dev_id, |
struct dao_eth_trs_dev_config * | config | ||
) |
Allocate an ethernet transport device.
This function initializes the necessary resources for the ethernet transport device for a given device ID and configuration. The device is an encapsulation of one or more ethernet devices.
dev_id | Device ID of the ethernet transport device to allocate. |
config | Configuration parameters for the ethernet transport device. |
int dao_eth_trs_dev_queue_configure | ( | uint8_t | dev_id, |
uint16_t | queue_id, | ||
struct dao_eth_trs_queue_config * | conf | ||
) |
Configure an ethernet transport device queue.
This function configures the RX/TX queue of the ethernet transport device with the configuration parameters provided by the caller.
dev_id | Device ID of the ethernet transport device. |
queue_id | Queue ID of the RX/TX queue. |
conf | Configuration parameters for the RX/TX queue. |
int dao_eth_trs_dev_queue_map | ( | uint8_t | dev_id, |
uint16_t | dev_queue_id, | ||
uint16_t * | port_id, | ||
uint16_t * | queue_id | ||
) |
Get ethernet port ID and queue ID for a transport device ID and queue ID.
This function retrieves the ethernet port ID and queue ID corresponding to the transport device ID and queue ID. It can be used to transmit/receive packets using the APIs dao_eth_trs_tx() and dao_eth_trs_rx().
dev_id | Device ID of the ethernet transport device. |
dev_queue_id | Queue ID of the ethernet transport device. |
port_id | [out] Pointer to store the ethernet port ID. |
queue_id | [out] Pointer to store the queue ID of the ethernet port. |
int dao_eth_trs_dev_start | ( | uint8_t | dev_id | ) |
Start ethernet transport device.
This function starts the ethernet transport device and sets it up for data transfer. The device must be configured before starting it using dao_eth_trs_dev_alloc() and dao_eth_trs_dev_queue_conf().
dev_id | Device ID of the ethernet transport device. |
int dao_eth_trs_dev_stop | ( | uint8_t | dev_id | ) |
Stop ethernet transport device.
This function stops the ethernet transport device and marks it as inactive.
dev_id | Device ID of the ethernet transport device. |
int dao_eth_trs_dev_free | ( | uint8_t | dev_id | ) |
Close the ethernet transport device.
This function closes the ethernet transport device and frees the resources allocated during allocation. The device must be stopped before closing it using dao_eth_trs_dev_stop().
dev_id | Device ID of the ethernet transport device. |