#include <rte_common.h>
#include "rte_ioat_rawdev_fns.h"
Go to the source code of this file.
|
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 void __rte_experimental | rte_ioat_perform_ops (int dev_id) |
|
static int __rte_experimental | rte_ioat_completed_ops (int dev_id, uint8_t max_copies, uintptr_t *src_hdls, uintptr_t *dst_hdls) |
|
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.
#define IOAT_PMD_RAWDEV_NAME rawdev_ioat |
#define IOAT_PMD_RAWDEV_NAME_STR "rawdev_ioat" |
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_id | The rawdev device id of the ioat instance |
pattern | The pattern to populate the destination buffer with |
dst | The physical address of the destination buffer |
length | The length of the destination buffer |
dst_hdl | An 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
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_id | The rawdev device id of the ioat instance |
src | The physical address of the source buffer |
dst | The physical address of the destination buffer |
length | The length of the data to be copied |
src_hdl | An 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_hdl | An 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
- Examples:
- examples/ioat/ioatfwd.c, and examples/vhost/ioat.c.
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_id | The rawdev device id of the ioat instance |
- Returns
- Number of fences enqueued, either 0 or 1
static void __rte_experimental rte_ioat_perform_ops |
( |
int |
dev_id | ) |
|
|
inlinestatic |
static int __rte_experimental rte_ioat_completed_ops |
( |
int |
dev_id, |
|
|
uint8_t |
max_copies, |
|
|
uintptr_t * |
src_hdls, |
|
|
uintptr_t * |
dst_hdls |
|
) |
| |
|
inlinestatic |
Returns details of operations that have been completed
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 max_copies, src_hdls and dst_hdls parameters will be ignored, and the function returns the number of newly-completed operations.
- Parameters
-
dev_id | The rawdev device id of the ioat instance |
max_copies | The number of entries which can fit in the 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 is ignored. |
src_hdls | Array 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. |
dst_hdls | Array 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. |
- Returns
- -1 on error, with rte_errno set appropriately. Otherwise number of completed operations i.e. number of entries written to the src_hdls and dst_hdls array parameters.
- Examples:
- examples/ioat/ioatfwd.c, and examples/vhost/ioat.c.