Data Plane Development Kit Reference Manual: Intel FPGA Programmable Acceleration Card N3000

ID 683512
Date 12/06/2019
Document Table of Contents

2.4.1. OPAE FPGA Adapter

The opae_fpga_adapter uses the following data structures and defines the function calls described below.

The $RTE_SDK/drivers/raw/ifpga_rawdev/base/opae_hw_api.h header file defines the following data structures.

struct opae_adapter {
   const char *name;
   struct opae_manager *mgr;
   struct opae_accelerator_list acc_list;
   struct opae_adapter_ops *ops;
   void *data;
Table 2.  opae_adapter Struct Field Definitions
Data Structure Field Name Description
name A pointer to the name of the opae_adapter.
mgr Pointer to the opae_manager data structure.
acc_list A list of AFs.
ops A pointer to struct opae_adapter_ops which defines operations that the OPAE adapter provides. The list of operations is dynamic.
struct opae_adapter_ops {
	int (*enumerate)(struct opae_adapter *adapter);
	void (*destroy)(struct opae_adapter *adapter);
data A pointer to private data of the opae_adapter.

The OPAE PCIe* adapter defines the following data structure.

struct opae_adapter_data_pci {
	enum opae_adapter_type type;
	u16 device_id;
	u16 vendor_id;
	struct opae_reg_region region[PCI_MAX_RESOURCE];
	int vfio_dev_fd; /* VFIO device file descriptor */

The opae_fpga_adapter implements the following API functions: