2015-12-03 21:30:38 +00:00
|
|
|
#ifndef __IOAT_IMPL_H__
|
|
|
|
#define __IOAT_IMPL_H__
|
|
|
|
|
|
|
|
#include <pthread.h>
|
|
|
|
#include <stdio.h>
|
2016-02-03 19:57:51 +00:00
|
|
|
#include <stdbool.h>
|
2015-12-03 21:30:38 +00:00
|
|
|
|
2016-08-08 20:55:27 +00:00
|
|
|
#include "spdk/assert.h"
|
2016-08-10 17:21:45 +00:00
|
|
|
#include "spdk/env.h"
|
2016-02-03 19:57:51 +00:00
|
|
|
|
2015-12-03 21:30:38 +00:00
|
|
|
/**
|
|
|
|
* \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.
|
|
|
|
*/
|
2016-08-10 17:37:12 +00:00
|
|
|
#define ioat_zmalloc spdk_zmalloc
|
2015-12-03 21:30:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Free a memory buffer previously allocated with ioat_zmalloc.
|
|
|
|
*/
|
2016-08-10 17:37:12 +00:00
|
|
|
#define ioat_free spdk_free
|
2015-12-03 21:30:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the physical address for the specified virtual address.
|
|
|
|
*/
|
2016-02-08 21:17:04 +00:00
|
|
|
#define ioat_vtophys(buf) spdk_vtophys(buf)
|
2015-12-03 21:30:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Delay us.
|
|
|
|
*/
|
2016-08-10 20:12:33 +00:00
|
|
|
#define ioat_delay_us spdk_delay_us
|
2015-12-03 21:30:38 +00:00
|
|
|
|
|
|
|
#endif /* __IOAT_IMPL_H__ */
|