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.1. opae_accelerator_alloc()

Prototype:

opae_accelerator_alloc(const char *name, struct opae_accelerator_ops *ops, void *data);

Arguments:

name: A pointer to the name of this accelerator.

opae_accelerator_ops: A pointer to the opae_accelerator_ops data structure which defines the operations that the OPAE 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.

Returns:

Void.

Description:

Initializes an OPAE manager instance.
Related Defines #define opae_accelerator_free(acc) opae_free(acc)