tbarbette / fastclick

FastClick - A faster version of the Click Modular Router featuring batching, advanced multi-processing and improved Netmap and DPDK support (ANCS'15). Check the metron branch for Metron specificities (NSDI'18). PacketMill modifications (ASPLOS'21) as well as MiddleClick(ToN, 2021) are merged in main.
Other
279 stars 81 forks source link
batch-mode click dpdk fastclick high-speed netmap networking nfv sdn

FastClick CI

FastClick is an extended version of the Click Modular Router featuring an improved Netmap support and a new DPDK support. It was the result of our ANCS paper available at http://hdl.handle.net/2268/181954, but received multiple contributions and improvements since then, such as flow support with MiddleClick, specialized binaries with PacketMill, precise intra-server load-balancing with RSS++ and many more individual contributions over the years. More details below.

The Wiki provides documentation about the elements and how to use some FastClick features such as batching.

Announcements

Be sure to watch the repository and check out the GitHub Discussions to stay up to date!

Quick start (using DPDK for I/O)

./configure CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3" --enable-dpdk --enable-intel-cpu --disable-dynamic-linking --enable-bound-port-transfer --enable-flow --disable-task-stats --disable-cpu-load
make

You will find more information in the High-Speed I/O wiki page.

FastClick "Light"

FastClick, like Click comes with a lot of features that you may not use. The following options will improve performance further :

./configure  CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3" --enable-dpdk --enable-intel-cpu --disable-dynamic-linking --enable-bound-port-transfer --enable-flow --disable-task-stats --disable-cpu-load --enable-dpdk-packet --disable-clone --disable-dpdk-softqueue
make

Ultimately, FastClick will still be impacted by its high flexibility and the many options it supports in each elements. This is adressed by PacketMill by embedding constant parameters, and other stuffs to produce one efficient binary.

Docker

We provide a Dockerfile to build FastClick with DPDK. Public images are available too in docker hub.

The docker container must run in priviledged mode, and most often in network host mode.

sudo docker run -v /mnt/huge:/dev/hugepages -it --privileged --network host tbarbette/fastclick-dpdk:generic --dpdk -- -e "FromDPDKDevice(0) -> Discard;"

Note: the default image is build for the "default" arch, it will be suboptimal in term of performances. Check the Docker wiki page for more information.

Contribution

FastClick also aims at keeping a more up-to-date fork and welcomes contributions from anyone.

Regular contributors will be given direct access to the repository. The general rule of thumb to accept a pull request is to involve two different entities. I.e. someone for company A make a PR and someone from another company/research unit merges it.

You will find more information about contributions in the Community Contributions wiki page.

Examples

See conf/fastclick/README.md The wiki provides more information about the I/O frameworks you should use for high speed, such as DPDK and Netmap, and how to configure them.

Differences with the mainline Click (kohler/click)

In a nutshell:

You will find more information about the differences with Click in the related wiki page

Merged work

This section references projects that have been merged in.

RSS++

RSS++ is a NIC-driven scheduler. It is compatible with DPDK (and of course FastClick) application and Kernel applications. The part relevent for FastClick are fully merged in this branch. It provides a solution to automatically scale the number of cores to be used by FromDPDKDevice. Except for its integration of a simulated Metron, RSS++ has been completely merged in.

PacketMill

PacketMill is a serie of optimization to accelerate high-speed packet processing, by building a specialized binary. It has been mostly merged-in. See [README.packetmill.md] for more details.

MiddleClick

MiddleClick) brought in (Fast)Click the ability to understand flows and sessions on top of packets. See [README.middleclick.md] for more details.

Differences with the FastClick ANCS paper

This section states the differences between FastClick as in this repository and the original ANCS paper. For simplicity, we reference all input element as "FromDevice" and output element as "ToDevice". However in practice our I/O elements are FromNetmapDevice/ToNetmapDevice and FromDPDKDevice/ToDPDKDevice. They both inherit from QueueDevice, which is a generic abstract element to implement a device which supports multiple queues (or in a more generic way I/O through multiple different threads).

Thread vector and bit vector designate the same thing.

Citing

If you use FastClick, please cite as follow:

@inproceedings{barbette2015fast,
  title={Fast userspace packet processing},
  author={Barbette Tom, Cyril Soldani and Mathy Laurent},
  booktitle={2015 ACM/IEEE Symposium on Architectures for Networking and Communications Systems (ANCS)},
  pages={5--16},
  year={2015},
  organization={IEEE},
  doi={10.1109/ANCS.2015.7110116}
}

Note that if you use technologies built on top of FastClick, it is relevant to cite the related paper too. I.e. if you use/improve the DeviceBalancer element, you should cite RSS++ instead (or on top of FastClick if FastClick is also a base to your own development), and if using the packetmill command to produce a specialized binary, cite PacketMill.

Getting help

Use the github issue tracker (https://github.com/tbarbette/fastclick/issues) or contact barbette at kth.se if you encounter any problem.

Please do not ask FastClick-related problems on the vanilla Click mailing list. If you are sure that your problem is Click related, post it on vanilla Click's issue tracker (https://github.com/kohler/click/issues).

The original Click readme is available in the README.original file.