Skip to content

aaronblohowiak/NetBricks

 
 

Repository files navigation

NetBricks is a Rust based framework for NFV development. Please refer to the paper for information about the architecture and design. Currently NetBricks requires a relatively modern Linux version.

Building

NetBricks can be built either using a Rust nightly build or using Rust built from the current Git head. In the later case we also build musl and statically link to things. Below we provide basic instructions for both.

Using Rust Nightly

First obtain Rust nightly. I use rustup, in which case the following works

curl https://sh.rustup.rs -sSf | sh  # Install rustup
rustup install nightly

Then clone this repository and run build.sh

./build.sh

This should download DPDK, and build all of NetBricks.

Using Rust from Git

The instructions for doing so are simple, however building takes significantly longer in this case (and consumes tons of memory), so do this only if you have lots of time and memory. Building is as simple as

export RUST_STATIC=1
./build.sh

Dependencies

Building NetBricks requires libcurl with support for gnutls. On Debian these dependencies can be installed using:

apt-get install libgnutls30 libgnutls-openssl-dev libcurl4-gnutls-dev

NetBricks also supports using SCTP as a control protocol. SCTP support requires the use of libsctp (this is an optional dependency) which can be installed on Debian using:

apt-get install libsctp-dev

Tuning

Changing some Linux parameters, including disabling C-State, and P-State; and isolating CPUs can greatly benefit NF performance. In addition to these boot-time settings, runtime settings (e.g., disabling uncore frequency scaling and setting the appropriate flags for Linux power management QoS) can greatly improve performance. The energy.sh in scripts/tuning will set these parameter appropriately, and it is recommended you run this before running the system.

Example NFs

This repository includes a set of example NFs under the test directory. A complete list of example can be found by running

./build.sh run

The build script can be used to run these examples as

./build.sh run <example name> <options>

Passing -h will provide a list of options. All of these examples accept one or more ports as input. Ports can be specified as one of:

  • PCI ID of a NIC
  • dpdk:<PMD spec> where PMD spec can be something like dpdk:eth_pcap0,rx_pcap=$HOME/tcpflow/tests/udp.pcap,tx_pcap=out.pcap which specifies a PCAP file should be used. See DPDK source for other PMD drivers that are available.
  • ovs:<integer> to connect to an OpenVSwitch DPDK ring port (dpdkr).
  • bess:<port name> to connect to a BESS ZeroCopyVPort

Future Work

Support for futures for control plane functionality.

About

NetBricks: A new network function framework based on Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 71.4%
  • LLVM 15.2%
  • C 6.7%
  • Shell 4.2%
  • Python 1.8%
  • Makefile 0.7%