DPDK 22.11.7
|
Go to the source code of this file.
Data Structures | |
struct | rte_param_log2_range |
struct | rte_compressdev_capabilities |
struct | rte_compressdev_info |
struct | rte_compressdev_stats |
struct | rte_compressdev_config |
Macros | |
#define | RTE_COMP_END_OF_CAPABILITIES_LIST() { RTE_COMP_ALGO_UNSPECIFIED } |
#define | RTE_COMPDEV_FF_HW_ACCELERATED (1ULL << 0) |
#define | RTE_COMPDEV_FF_CPU_SSE (1ULL << 1) |
#define | RTE_COMPDEV_FF_CPU_AVX (1ULL << 2) |
#define | RTE_COMPDEV_FF_CPU_AVX2 (1ULL << 3) |
#define | RTE_COMPDEV_FF_CPU_AVX512 (1ULL << 4) |
#define | RTE_COMPDEV_FF_CPU_NEON (1ULL << 5) |
#define | RTE_COMPDEV_FF_OP_DONE_IN_DEQUEUE (1ULL << 6) |
Functions | |
__rte_experimental const char * | rte_compressdev_get_feature_name (uint64_t flag) |
__rte_experimental int | rte_compressdev_get_dev_id (const char *name) |
__rte_experimental const char * | rte_compressdev_name_get (uint8_t dev_id) |
__rte_experimental uint8_t | rte_compressdev_count (void) |
__rte_experimental uint8_t | rte_compressdev_devices_get (const char *driver_name, uint8_t *devices, uint8_t nb_devices) |
__rte_experimental int | rte_compressdev_configure (uint8_t dev_id, struct rte_compressdev_config *config) |
__rte_experimental int | rte_compressdev_start (uint8_t dev_id) |
__rte_experimental void | rte_compressdev_stop (uint8_t dev_id) |
__rte_experimental int | rte_compressdev_close (uint8_t dev_id) |
__rte_experimental int | rte_compressdev_queue_pair_setup (uint8_t dev_id, uint16_t queue_pair_id, uint32_t max_inflight_ops, int socket_id) |
__rte_experimental uint16_t | rte_compressdev_queue_pair_count (uint8_t dev_id) |
__rte_experimental int | rte_compressdev_stats_get (uint8_t dev_id, struct rte_compressdev_stats *stats) |
__rte_experimental void | rte_compressdev_stats_reset (uint8_t dev_id) |
__rte_experimental void | rte_compressdev_info_get (uint8_t dev_id, struct rte_compressdev_info *dev_info) |
__rte_experimental uint16_t | rte_compressdev_dequeue_burst (uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops) |
__rte_experimental uint16_t | rte_compressdev_enqueue_burst (uint8_t dev_id, uint16_t qp_id, struct rte_comp_op **ops, uint16_t nb_ops) |
__rte_experimental int | rte_compressdev_stream_create (uint8_t dev_id, const struct rte_comp_xform *xform, void **stream) |
__rte_experimental int | rte_compressdev_stream_free (uint8_t dev_id, void *stream) |
__rte_experimental int | rte_compressdev_private_xform_create (uint8_t dev_id, const struct rte_comp_xform *xform, void **private_xform) |
__rte_experimental int | rte_compressdev_private_xform_free (uint8_t dev_id, void *private_xform) |
RTE Compression Device APIs.
Defines comp device APIs for the provisioning of compression operations.
Definition in file rte_compressdev.h.
#define RTE_COMP_END_OF_CAPABILITIES_LIST | ( | ) | { RTE_COMP_ALGO_UNSPECIFIED } |
Macro used at end of comp PMD list
Definition at line 54 of file rte_compressdev.h.
#define RTE_COMPDEV_FF_HW_ACCELERATED (1ULL << 0) |
compression device supported feature flags
Keep these flags synchronised with rte_compressdev_get_feature_name() Operations are off-loaded to an external hardware accelerator
Definition at line 70 of file rte_compressdev.h.
#define RTE_COMPDEV_FF_CPU_SSE (1ULL << 1) |
Utilises CPU SIMD SSE instructions
Definition at line 72 of file rte_compressdev.h.
#define RTE_COMPDEV_FF_CPU_AVX (1ULL << 2) |
Utilises CPU SIMD AVX instructions
Definition at line 74 of file rte_compressdev.h.
#define RTE_COMPDEV_FF_CPU_AVX2 (1ULL << 3) |
Utilises CPU SIMD AVX2 instructions
Definition at line 76 of file rte_compressdev.h.
#define RTE_COMPDEV_FF_CPU_AVX512 (1ULL << 4) |
Utilises CPU SIMD AVX512 instructions
Definition at line 78 of file rte_compressdev.h.
#define RTE_COMPDEV_FF_CPU_NEON (1ULL << 5) |
Utilises CPU NEON instructions
Definition at line 80 of file rte_compressdev.h.
#define RTE_COMPDEV_FF_OP_DONE_IN_DEQUEUE (1ULL << 6) |
A PMD should set this if the bulk of the processing is done during the dequeue. It should leave it cleared if the processing is done during the enqueue (default). Applications can use this as a hint for tuning.
Definition at line 86 of file rte_compressdev.h.
__rte_experimental const char * rte_compressdev_get_feature_name | ( | uint64_t | flag | ) |
Get the name of a compress device feature flag.
flag | The mask describing the flag |
__rte_experimental int rte_compressdev_get_dev_id | ( | const char * | name | ) |
Get the device identifier for the named compress device.
name | Device name to select the device structure |
__rte_experimental const char * rte_compressdev_name_get | ( | uint8_t | dev_id | ) |
Get the compress device name given a device identifier.
dev_id | Compress device identifier |
__rte_experimental uint8_t rte_compressdev_count | ( | void | ) |
Get the total number of compress devices that have been successfully initialised.
__rte_experimental uint8_t rte_compressdev_devices_get | ( | const char * | driver_name, |
uint8_t * | devices, | ||
uint8_t | nb_devices | ||
) |
Get number and identifiers of attached comp devices that use the same compress driver.
driver_name | Driver name |
devices | Output devices identifiers |
nb_devices | Maximal number of devices |
__rte_experimental int rte_compressdev_configure | ( | uint8_t | dev_id, |
struct rte_compressdev_config * | config | ||
) |
Configure a device.
This function must be invoked first before any other function in the API. This function can also be re-invoked when a device is in the stopped state.
dev_id | Compress device identifier |
config | The compress device configuration |
__rte_experimental int rte_compressdev_start | ( | uint8_t | dev_id | ) |
Start a device.
The device start step is called after configuring the device and setting up its queue pairs. On success, data-path functions exported by the API (enqueue/dequeue, etc) can be invoked.
dev_id | Compress device identifier |
__rte_experimental void rte_compressdev_stop | ( | uint8_t | dev_id | ) |
Stop a device. The device can be restarted with a call to rte_compressdev_start()
dev_id | Compress device identifier |
__rte_experimental int rte_compressdev_close | ( | uint8_t | dev_id | ) |
Close an device. The memory allocated in the device gets freed. After calling this function, in order to use the device again, it is required to configure the device again.
dev_id | Compress device identifier |
__rte_experimental int rte_compressdev_queue_pair_setup | ( | uint8_t | dev_id, |
uint16_t | queue_pair_id, | ||
uint32_t | max_inflight_ops, | ||
int | socket_id | ||
) |
Allocate and set up a receive queue pair for a device. This should only be called when the device is stopped.
dev_id | Compress device identifier |
queue_pair_id | The index of the queue pairs to set up. The value must be in the range [0, nb_queue_pair - 1] previously supplied to rte_compressdev_configure() |
max_inflight_ops | Max number of ops which the qp will have to accommodate simultaneously |
socket_id | The socket_id argument is the socket identifier in case of NUMA. The value can be SOCKET_ID_ANY if there is no NUMA constraint for the DMA memory allocated for the receive queue pair |
__rte_experimental uint16_t rte_compressdev_queue_pair_count | ( | uint8_t | dev_id | ) |
Get the number of queue pairs on a specific comp device
dev_id | Compress device identifier |
__rte_experimental int rte_compressdev_stats_get | ( | uint8_t | dev_id, |
struct rte_compressdev_stats * | stats | ||
) |
Retrieve the general I/O statistics of a device.
dev_id | The identifier of the device |
stats | A pointer to a structure of type rte_compressdev_stats to be filled with the values of device counters |
__rte_experimental void rte_compressdev_stats_reset | ( | uint8_t | dev_id | ) |
Reset the general I/O statistics of a device.
dev_id | The identifier of the device. |
__rte_experimental void rte_compressdev_info_get | ( | uint8_t | dev_id, |
struct rte_compressdev_info * | dev_info | ||
) |
Retrieve the contextual information of a device.
dev_id | Compress device identifier |
dev_info | A pointer to a structure of type rte_compressdev_info to be filled with the contextual information of the device |
__rte_experimental uint16_t rte_compressdev_dequeue_burst | ( | uint8_t | dev_id, |
uint16_t | qp_id, | ||
struct rte_comp_op ** | ops, | ||
uint16_t | nb_ops | ||
) |
Dequeue a burst of processed compression operations from a queue on the comp device. The dequeued operation are stored in rte_comp_op structures whose pointers are supplied in the ops array.
The rte_compressdev_dequeue_burst() function returns the number of ops actually dequeued, which is the number of rte_comp_op data structures effectively supplied into the ops array.
A return value equal to nb_ops indicates that the queue contained at least nb_ops operations, and this is likely to signify that other processed operations remain in the devices output queue. Applications implementing a "retrieve as many processed operations as possible" policy can check this specific case and keep invoking the rte_compressdev_dequeue_burst() function until a value less than nb_ops is returned.
The rte_compressdev_dequeue_burst() function does not provide any error notification to avoid the corresponding overhead.
dev_id | Compress device identifier |
qp_id | The index of the queue pair from which to retrieve processed operations. The value must be in the range [0, nb_queue_pair - 1] previously supplied to rte_compressdev_configure() |
ops | The address of an array of pointers to rte_comp_op structures that must be large enough to store nb_ops pointers in it |
nb_ops | The maximum number of operations to dequeue |
__rte_experimental uint16_t rte_compressdev_enqueue_burst | ( | uint8_t | dev_id, |
uint16_t | qp_id, | ||
struct rte_comp_op ** | ops, | ||
uint16_t | nb_ops | ||
) |
Enqueue a burst of operations for processing on a compression device.
The rte_compressdev_enqueue_burst() function is invoked to place comp operations on the queue qp_id of the device designated by its dev_id.
The nb_ops parameter is the number of operations to process which are supplied in the ops array of rte_comp_op structures.
The rte_compressdev_enqueue_burst() function returns the number of operations it actually enqueued for processing. A return value equal to nb_ops means that all packets have been enqueued.
dev_id | Compress device identifier |
qp_id | The index of the queue pair on which operations are to be enqueued for processing. The value must be in the range [0, nb_queue_pairs - 1] previously supplied to rte_compressdev_configure |
ops | The address of an array of nb_ops pointers to rte_comp_op structures which contain the operations to be processed |
nb_ops | The number of operations to process |
__rte_experimental int rte_compressdev_stream_create | ( | uint8_t | dev_id, |
const struct rte_comp_xform * | xform, | ||
void ** | stream | ||
) |
This should alloc a stream from the device's mempool and initialise it. The application should call this API when setting up for the stateful processing of a set of data on a device. The API can be called multiple times to set up a stream for each data set. The handle returned is only for use with ops of op_type STATEFUL and must be passed to the PMD with every op in the data stream
dev_id | Compress device identifier |
xform | xform data |
stream | Pointer to where PMD's private stream handle should be stored |
__rte_experimental int rte_compressdev_stream_free | ( | uint8_t | dev_id, |
void * | stream | ||
) |
This should clear the stream and return it to the device's mempool.
dev_id | Compress device identifier |
stream | PMD's private stream data |
__rte_experimental int rte_compressdev_private_xform_create | ( | uint8_t | dev_id, |
const struct rte_comp_xform * | xform, | ||
void ** | private_xform | ||
) |
This should alloc a private_xform from the device's mempool and initialise it. The application should call this API when setting up for stateless processing on a device. If it returns non-shareable, then the appl cannot share this handle with multiple in-flight ops and should call this API again to get a separate handle for every in-flight op. The handle returned is only valid for use with ops of op_type STATELESS.
dev_id | Compress device identifier |
xform | xform data |
private_xform | Pointer to where PMD's private_xform handle should be stored |
__rte_experimental int rte_compressdev_private_xform_free | ( | uint8_t | dev_id, |
void * | private_xform | ||
) |
This should clear the private_xform and return it to the device's mempool. It is the application's responsibility to ensure that private_xform data is not cleared while there are still in-flight operations using it.
dev_id | Compress device identifier |
private_xform | PMD's private_xform data |