2017-01-17 23:23:28 +00:00
|
|
|
# SPDK Porting Guide {#porting}
|
2015-09-25 21:31:26 +00:00
|
|
|
|
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
|
2017-01-17 23:23:28 +00:00
|
|
|
defined in 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/)).
|
2016-11-09 23:12:00 +00:00
|
|
|
This DPDK implementation can be found in `lib/env_dpdk`.
|
2015-09-25 21:31:26 +00:00
|
|
|
|
2016-11-02 16:49:07 +00:00
|
|
|
DPDK is currently supported on Linux and FreeBSD only.
|
|
|
|
Users who want to use SPDK on other operating systems, or in
|
2015-09-25 21:31:26 +00:00
|
|
|
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:
|
|
|
|
|
2021-08-24 07:21:38 +00:00
|
|
|
```bash
|
|
|
|
CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env_dpdk
|
|
|
|
```
|