This allows users to swap their PCI library from libpciaccess/dpdk to another mechanism using the standard method for swapping out the env library. Change-Id: Ib2248f8b43754a540de2ec01897e571f0302b667 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
50 lines
1.0 KiB
C
50 lines
1.0 KiB
C
#ifndef __IOAT_IMPL_H__
|
|
#define __IOAT_IMPL_H__
|
|
|
|
#include <pthread.h>
|
|
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
#include <string.h>
|
|
#include <rte_config.h>
|
|
#include <rte_malloc.h>
|
|
#include <rte_atomic.h>
|
|
#include <rte_cycles.h>
|
|
|
|
#include "spdk/assert.h"
|
|
#include "spdk/env.h"
|
|
|
|
#include <rte_pci.h>
|
|
|
|
/**
|
|
* \file
|
|
*
|
|
* This file describes the functions required to integrate
|
|
* the userspace IOAT driver for a specific implementation. This
|
|
* implementation is specific for DPDK. Users would revise it as
|
|
* necessary for their own particular environment if not using it
|
|
* within the SPDK framework.
|
|
*/
|
|
|
|
/**
|
|
* Allocate a pinned, physically contiguous memory buffer with the
|
|
* given size and alignment.
|
|
*/
|
|
#define ioat_zmalloc spdk_zmalloc
|
|
|
|
/**
|
|
* Free a memory buffer previously allocated with ioat_zmalloc.
|
|
*/
|
|
#define ioat_free spdk_free
|
|
|
|
/**
|
|
* Return the physical address for the specified virtual address.
|
|
*/
|
|
#define ioat_vtophys(buf) spdk_vtophys(buf)
|
|
|
|
/**
|
|
* Delay us.
|
|
*/
|
|
#define ioat_delay_us(us) rte_delay_us(us)
|
|
|
|
#endif /* __IOAT_IMPL_H__ */
|