NDN-DPDK is a set of high-speed Named Data Networking (NDN) programs developed with Data Plane Development Kit (DPDK). It includes a network forwarder and a traffic generator.
This software is developed at Advanced Network Technologies Division of National Institute of Standards and Technology. It is in pre-release stage and will continue to be updated.
Requirements:
- Ubuntu 16.04 or 18.04 on amd64 architecture
- Go 1.12.9
clang-6.0 clang-format-6.0 curl doxygen git go-bindata libc6-dev-i386 libelf-dev libnuma-dev libssl-dev liburcu-dev socat sudo yamllint
packages- DPDK 19.08 with
CONFIG_RTE_BUILD_SHARED_LIB
CONFIG_RTE_LIBRTE_BPF_ELF
CONFIG_RTE_LIBRTE_PMD_OPENSSL
enabled, and installed to/usr/local
- SPDK 19.07 shared libraries installed to
/usr/local
- ubpf library, installed to
/usr/local/include/ubpf.h
and/usr/local/lib/libubpf.a
- Node.js 12.x and
sudo npm install -g jayson
- Note: see Dockerfile on how to install dependencies.
Build steps:
- Clone repository into
$GOPATH/src/ndn-dpdk
. - Execute
npm install
to download NPM dependencies. - Execute
make godeps
to compile C code and generate certain Go/TypeScript source files. - Execute
go get -d -t ./...
to download Go dependencies. - Execute
make cmds
to install Go commands to$GOPATH/bin
. - Execute
make tsc
to build TypeScript modules and commands.
Other build targets and commands:
- Execute
sudo make install
to install commands to/usr/local
, andsudo make uninstall
to uninstall. You may prependDESTDIR=/opt
to choose a different location. - Execute
make gopkg
to build all Go packages. - Execute
make test
to run unit tests, ormk/gotest.sh PKG
to run tests for a package. - Execute
make doxygen
to build C documentation. You may omitdoxygen
dependencies if this is not needed. - Execute
make godoc
to start godoc server at port 6060. - Execute
make lint
to fix code style before committing. You may omitclang-format-6.0 yamllint
dependencies if this is not needed. - Prepend
RELEASE=1
to anymake
command to select release mode that disables asserts and verbose logging. - Prepend
CC=clang-6.0
to anymake
command to compile C code withclang-6.0
. The programs compiled with clang are currently not working, but this is a good way to find potential code errors.
Docker packaging:
- Build the image:
mk/build-docker.sh
- Launch a container in privileged mode:
docker run --rm -it --privileged -v /sys/bus/pci/devices:/sys/bus/pci/devices -v /sys/kernel/mm/hugepages:/sys/kernel/mm/hugepages -v /sys/devices/system/node:/sys/devices/system/node -v /dev:/dev --network host ndn-dpdk
- Setup environment inside the container:
mkdir /mnt/huge1G && mount -t hugetlbfs nodev /mnt/huge1G -o pagesize=1G && export PATH=$PATH:/usr/local/go/bin && export GOPATH=/root/go
- Only a subset of the programs would work in Docker container, unfortunately.
- mk: build helper scripts.
- core: common shared code.
- dpdk: DPDK bindings and extensions.
- spdk: SPDK bindings and extensions.
- ndn: NDN packet representations.
- iface: network interfaces.
- container: data structures.
- strategy: forwarding strategy BPF programs.
- app: applications, including the forwarder dataplane.
- mgmt: management interface.
- appinit: initialization procedures.
- cmd: executables.