DPDK  22.03.0
Data Structures | Macros | Functions
rte_ioat_rawdev.h File Reference
#include <rte_common.h>
#include "rte_ioat_rawdev_fns.h"

Go to the source code of this file.

Data Structures

struct  rte_ioat_rawdev_config
 

Macros

#define IOAT_PMD_RAWDEV_NAME   rawdev_ioat
 
#define IOAT_PMD_RAWDEV_NAME_STR   "rawdev_ioat"
 
#define RTE_IOAT_OP_SUCCESS   0
 
#define RTE_IOAT_OP_SKIPPED   1
 
#define RTE_IOAT_OP_ADDRESS_ERR   0x03
 
#define RTE_IOAT_OP_INVALID_LEN   0x13
 
#define RTE_IOAT_OP_OVERLAPPING_BUFS   0x16
 

Functions

static int __rte_experimental rte_ioat_enqueue_fill (int dev_id, uint64_t pattern, phys_addr_t dst, unsigned int length, uintptr_t dst_hdl)
 
static int __rte_experimental rte_ioat_enqueue_copy (int dev_id, phys_addr_t src, phys_addr_t dst, unsigned int length, uintptr_t src_hdl, uintptr_t dst_hdl)
 
static int __rte_experimental rte_ioat_fence (int dev_id)
 
static int __rte_experimental rte_ioat_perform_ops (int dev_id)
 
static int __rte_experimental rte_ioat_completed_ops (int dev_id, uint8_t max_copies, uint32_t *status, uint8_t *num_unsuccessful, uintptr_t *src_hdls, uintptr_t *dst_hdls)
 

Detailed Description

Definitions for using the ioat rawdev device driver

Warning
EXPERIMENTAL: these structures and APIs may change without prior notice

Definition in file rte_ioat_rawdev.h.

Macro Definition Documentation

◆ IOAT_PMD_RAWDEV_NAME

#define IOAT_PMD_RAWDEV_NAME   rawdev_ioat

Name of the device driver

Definition at line 24 of file rte_ioat_rawdev.h.

◆ IOAT_PMD_RAWDEV_NAME_STR

#define IOAT_PMD_RAWDEV_NAME_STR   "rawdev_ioat"

String reported as the device driver name by rte_rawdev_info_get()

Definition at line 26 of file rte_ioat_rawdev.h.

◆ RTE_IOAT_OP_SUCCESS

#define RTE_IOAT_OP_SUCCESS   0

Operation completed successfully

Definition at line 141 of file rte_ioat_rawdev.h.

◆ RTE_IOAT_OP_SKIPPED

#define RTE_IOAT_OP_SKIPPED   1

Operation was not attempted (Earlier fenced op failed)

Definition at line 142 of file rte_ioat_rawdev.h.

◆ RTE_IOAT_OP_ADDRESS_ERR

#define RTE_IOAT_OP_ADDRESS_ERR   0x03

Page fault or invalid address

Definition at line 147 of file rte_ioat_rawdev.h.

◆ RTE_IOAT_OP_INVALID_LEN

#define RTE_IOAT_OP_INVALID_LEN   0x13

Invalid/too big length field passed

Definition at line 148 of file rte_ioat_rawdev.h.

◆ RTE_IOAT_OP_OVERLAPPING_BUFS

#define RTE_IOAT_OP_OVERLAPPING_BUFS   0x16

Overlapping buffers error

Definition at line 149 of file rte_ioat_rawdev.h.

Function Documentation

◆ rte_ioat_enqueue_fill()

static int __rte_experimental rte_ioat_enqueue_fill ( int  dev_id,
uint64_t  pattern,
phys_addr_t  dst,
unsigned int  length,
uintptr_t  dst_hdl 
)
inlinestatic

Enqueue a fill operation onto the ioat device

This queues up a fill operation to be performed by hardware, but does not trigger hardware to begin that operation.

Parameters
dev_idThe rawdev device id of the ioat instance
patternThe pattern to populate the destination buffer with
dstThe physical address of the destination buffer
lengthThe length of the destination buffer
dst_hdlAn opaque handle for the destination data, to be returned when this operation has been completed and the user polls for the completion details. NOTE: If hdls_disable configuration option for the device is set, this parameter is ignored.
Returns
Number of operations enqueued, either 0 or 1

◆ rte_ioat_enqueue_copy()

static int __rte_experimental rte_ioat_enqueue_copy ( int  dev_id,
phys_addr_t  src,
phys_addr_t  dst,
unsigned int  length,
uintptr_t  src_hdl,
uintptr_t  dst_hdl 
)
inlinestatic

Enqueue a copy operation onto the ioat device

This queues up a copy operation to be performed by hardware, but does not trigger hardware to begin that operation.

Parameters
dev_idThe rawdev device id of the ioat instance
srcThe physical address of the source buffer
dstThe physical address of the destination buffer
lengthThe length of the data to be copied
src_hdlAn opaque handle for the source data, to be returned when this operation has been completed and the user polls for the completion details. NOTE: If hdls_disable configuration option for the device is set, this parameter is ignored.
dst_hdlAn opaque handle for the destination data, to be returned when this operation has been completed and the user polls for the completion details. NOTE: If hdls_disable configuration option for the device is set, this parameter is ignored.
Returns
Number of operations enqueued, either 0 or 1

◆ rte_ioat_fence()

static int __rte_experimental rte_ioat_fence ( int  dev_id)
inlinestatic

Add a fence to force ordering between operations

This adds a fence to a sequence of operations to enforce ordering, such that all operations enqueued before the fence must be completed before operations after the fence. NOTE: Since this fence may be added as a flag to the last operation enqueued, this API may not function correctly when called immediately after an "rte_ioat_perform_ops" call i.e. before any new operations are enqueued.

Parameters
dev_idThe rawdev device id of the ioat instance
Returns
Number of fences enqueued, either 0 or 1

◆ rte_ioat_perform_ops()

static int __rte_experimental rte_ioat_perform_ops ( int  dev_id)
inlinestatic

Trigger hardware to begin performing enqueued operations

This API is used to write the "doorbell" to the hardware to trigger it to begin the operations previously enqueued by rte_ioat_enqueue_copy()

Parameters
dev_idThe rawdev device id of the ioat instance
Returns
0 on success. Non-zero return on error.

◆ rte_ioat_completed_ops()

static int __rte_experimental rte_ioat_completed_ops ( int  dev_id,
uint8_t  max_copies,
uint32_t *  status,
uint8_t *  num_unsuccessful,
uintptr_t *  src_hdls,
uintptr_t *  dst_hdls 
)
inlinestatic

Returns details of operations that have been completed

The status of each operation is returned in the status array parameter. If the hdls_disable option was not set when the device was configured, the function will return to the caller the user-provided "handles" for the copy operations which have been completed by the hardware, and not already returned by a previous call to this API. If the hdls_disable option for the device was set on configure, the src_hdls and dst_hdls parameters will be ignored, and the function returns the number of newly-completed operations. If status is also NULL, then max_copies parameter is also ignored and the function returns a count of the number of newly-completed operations.

Parameters
dev_idThe rawdev device id of the ioat instance
max_copiesThe number of entries which can fit in the status, src_hdls and dst_hdls arrays, i.e. max number of completed operations to report. NOTE: If hdls_disable configuration option for the device is set, this parameter applies only to the "status" array if specified
statusArray to hold the status of each completed operation. Array should be set to zeros on input, as the driver will only write error status values. A value of 1 implies an operation was not attempted, and any other non-zero value indicates operation failure. Parameter may be NULL if no status value checking is required.
num_unsuccessfulReturns the number of elements in status where the value is non-zero, i.e. the operation either failed or was not attempted due to an earlier failure. If this value is returned as zero (the expected case), the status array will not have been modified by the function and need not be checked by software
src_hdlsArray to hold the source handle parameters of the completed ops. NOTE: If hdls_disable configuration option for the device is set, this parameter is ignored, and may be NULL
dst_hdlsArray to hold the destination handle parameters of the completed ops. NOTE: If hdls_disable configuration option for the device is set, this parameter is ignored, and may be NULL
Returns
-1 on device error, with rte_errno set appropriately and parameters unmodified. Otherwise number of returned operations i.e. number of valid entries in the status, src_hdls and dst_hdls array parameters. If status is NULL, and the hdls_disable config option is set, this value may be greater than max_copies parameter.