1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019 Intel Corporation
5 #ifndef _RTE_IOAT_RAWDEV_H_
6 #define _RTE_IOAT_RAWDEV_H_
9 * @file rte_ioat_rawdev.h
11 * Definitions for using the ioat rawdev device driver
14 * @b EXPERIMENTAL: these structures and APIs may change without prior notice
17 #include <x86intrin.h>
18 #include <rte_memory.h>
19 #include <rte_memzone.h>
20 #include <rte_ioat_spec.h>
22 /** Name of the device driver */
23 #define IOAT_PMD_RAWDEV_NAME rawdev_ioat
24 /** String reported as the device driver name by rte_rawdev_info_get() */
25 #define IOAT_PMD_RAWDEV_NAME_STR "rawdev_ioat"
26 /** Name used to adjust the log level for this driver */
27 #define IOAT_PMD_LOG_NAME "rawdev.ioat"
30 * Configuration structure for an ioat rawdev instance
32 * This structure is to be passed as the ".dev_private" parameter when
33 * calling the rte_rawdev_get_info() and rte_rawdev_configure() APIs on
34 * an ioat rawdev instance.
36 struct rte_ioat_rawdev_config {
37 unsigned short ring_size;
42 * Structure representing a device instance
44 struct rte_ioat_rawdev {
45 struct rte_rawdev *rawdev;
46 const struct rte_memzone *mz;
47 const struct rte_memzone *desc_mz;
49 volatile struct rte_ioat_registers *regs;
50 phys_addr_t status_addr;
51 phys_addr_t ring_addr;
53 unsigned short ring_size;
54 struct rte_ioat_generic_hw_desc *desc_ring;
55 __m128i *hdls; /* completion handles for returning to user */
57 /* some statistics for tracking, if added/changed update xstats fns*/
58 uint64_t enqueue_failed __rte_cache_aligned;
63 /* to report completions, the device will write status back here */
64 volatile uint64_t status __rte_cache_aligned;