2015-09-25 21:31:26 +00:00
|
|
|
SPDK Porting Guide
|
|
|
|
==================
|
|
|
|
|
2016-11-01 21:17:23 +00:00
|
|
|
SPDK is ported to new environments by implementing the *env*
|
|
|
|
library interface. The *env* interface provides APIs for drivers
|
2015-09-25 21:31:26 +00:00
|
|
|
to allocate physically contiguous and pinned memory, perform PCI
|
|
|
|
operations (config cycles and mapping BARs), virtual to physical
|
2016-11-01 21:17:23 +00:00
|
|
|
address translation and managing memory pools. The *env* API is
|
|
|
|
defined in `[include/spdk/env.h](include/spdk/env.h)`.
|
2015-09-25 21:31:26 +00:00
|
|
|
|
2016-11-01 21:17:23 +00:00
|
|
|
SPDK includes a default implementation of the *env* library based
|
|
|
|
on the Data Plane Development Kit ([DPDK](http://dpdk.org/)).
|
|
|
|
This DPDK implementation can be found in `lib/env`. DPDK is
|
2016-08-08 22:57:49 +00:00
|
|
|
currently supported on Linux and FreeBSD only.
|
2015-09-25 21:31:26 +00:00
|
|
|
|
|
|
|
Users who want to use SPDK on other operating system, or in
|
|
|
|
userspace driver frameworks other than DPDK, will need to implement
|
2016-11-01 21:17:23 +00:00
|
|
|
a new version of the *env* library. The new implementation can be
|
2015-09-25 21:31:26 +00:00
|
|
|
integrated into the SPDK build by updating the following line
|
|
|
|
in CONFIG:
|
|
|
|
|
2016-11-01 21:17:23 +00:00
|
|
|
CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env
|