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

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

2.4.3. OPAE Accelerator

The OPAE opae_accelerator uses the following data structures that $RTE_SDK/drivers/raw/ifpga_rawdev/base/opae_hw_api.h defines.
struct opae_accelerator {
	TAILQ_ENTRY(opae_accelerator) node;
	const char *name;
	int index;
	struct opae_bridge *br;
	struct opae_manager *mgr;
	struct opae_accelerator_ops *ops;
	void *data;
	};
Table 6.  opae_accelerator Struct Field Definitions
Data Structure Field Name Description
name A pointer to the name of the opae_accelerator.
index An index value specifying an Ethernet port.
br A pointer to the opae_bridge data structure:
struct opae_bridge {
	const char *name;
	int id;
	struct opae_accelerator *acc;
	struct opae_bridge_ops *ops;
	void *data;
	};
mgr A pointer to the opae_manager data structure:
struct opae_manager {
	const char *name;
	struct opae_adapter *adapter; 
	struct opae_manager_ops *ops;
	struct opae_manager_networking_ops *network_ops;
	void *data;
};
ops A pointer to the opae_accelerator_ops data structure which defines the operations that the OPAE accelerator provides:
struct opae_accelerator_ops {
	int (*read)(struct opae_accelerator *acc, unsigned 
		int region_idx, u64 offset, unsigned int byte, void *data);
	int (*write)(struct opae_accelerator *acc, 
		unsigned int region_idx, u64 offset, unsigned int byte, 
		void *data);
	int (*get_info)(struct opae_accelerator *acc,
		struct opae_acc_info *info);
	int (*get_region_info)(struct opae_accelerator *acc,
		struct opae_acc_region_info *info);
	int (*get_uuid)(struct opae_accelerator *acc,
		struct uuid *uuid);
};
data A pointer to private data of the opae_accelerator.

The opae_accelerator implements the following API functions: