Re: [dpdk-dev] [PATCH v2 08/18] raw/ioat: create rawdev instances on idxd PCI probe
From: Laatz, Kevin <hidden>
Date: 2020-08-25 15:27:52
On 21/08/2020 17:29, Bruce Richardson wrote:
When a matching device is found via PCI probe create a rawdev instance for each queue on the hardware. Use empty self-test function for these devices so that the overall rawdev_autotest does not report failures. Signed-off-by: Bruce Richardson <redacted> --- drivers/raw/ioat/idxd_pci.c | 236 ++++++++++++++++++++++++- drivers/raw/ioat/ioat_common.c | 61 +++++++ drivers/raw/ioat/ioat_private.h | 31 ++++ drivers/raw/ioat/ioat_rawdev_test.c | 7 + drivers/raw/ioat/ioat_spec.h | 64 +++++++ drivers/raw/ioat/meson.build | 1 + drivers/raw/ioat/rte_ioat_rawdev_fns.h | 35 +++- 7 files changed, 432 insertions(+), 3 deletions(-) create mode 100644 drivers/raw/ioat/ioat_common.c
<snip>
quoted hunk ↗ jump to hunk
diff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h index d87d4d055e..32c824536d 100644 --- a/drivers/raw/ioat/ioat_private.h +++ b/drivers/raw/ioat/ioat_private.h@@ -14,6 +14,10 @@ * @b EXPERIMENTAL: these structures and APIs may change without prior notice */ +#include <rte_spinlock.h> +#include <rte_rawdev_pmd.h> +#include "rte_ioat_rawdev.h" + extern int ioat_pmd_logtype; #define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \@@ -24,4 +28,31 @@ extern int ioat_pmd_logtype; #define IOAT_PMD_ERR(fmt, args...) IOAT_PMD_LOG(ERR, fmt, ## args) #define IOAT_PMD_WARN(fmt, args...) IOAT_PMD_LOG(WARNING, fmt, ## args) +struct idxd_pci_common { + rte_spinlock_t lk; + volatile struct rte_idxd_bar0 *regs; + volatile struct rte_idxd_wqcfg *wq_regs; + volatile struct rte_idxd_grpcfg *grp_regs; + volatile void *portals; +}; + +struct idxd_rawdev { + struct rte_idxd_rawdev public; /* the public members, must be first */
For C++ compatibility, we cannot use "public" since it is a reserved word in C++. Suggest renaming to "pub". Thanks, Kevin