Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Getting Started Guide
Table of Contents
This guide covers the following topics:
- What is PFQ?
- HW and SW Requirements.
- Haskell and Linux Distributions.
- Obtaining source codes.
- Satisfy library dependencies.
- Build the software.
- Software components.
What is PFQ
PFQ is a multi-language network framework designed for the Linux Operating System and the Linux Kernel 3.x (or higher). It is highly optimized for multi-core processors,
as well as for network devices equipped with multiple hardware queues (i.e. Intel 82599 10G).
PFQ consists in a Linux Kernel module, user-space libraries, for the C, C++11/14, Haskell languages and native support for the accelerated libpcap library with programmable fanout.
HW and SW Requirements
- A 32/64-bit Linux operating system (Intel/AMD architectures are supported).
- Linux Kernel 3.5 or higher.
- Kernel headers, required to compile modules for your kernel.
- A gcc compiler, the one used to compile the kernel in use.
- A g++ compiler (g++-4.8/clang-3.4 or higher), for user-space tools and libraries.
- The Haskell stack tool haskell-stack
- CMake, make, autoconf.
- Flex and bison.
Haskell and Linux Distributions (PIE)
We recommend you to install the stack Haskell tool following the instructions at Stackage site.
However, if you plan to install the Haskell platform from Haskell-Platform, you may encounter compilation problems if you have a system with PIE (position independent executables) enabled by default (such as Ubuntu, Debian etc.).
If it is your case, you have to edit the GHC settings file at:
and change the
compiler supports -no-pie flag from "NO" to "YES".
Obtaining the Source Codes
Clone the source codes of PFQ from the GitHub repository with the following command:
git clone https://github.com/pfq/PFQ.git
Build the software
- To build and install the framework:
stack Build.hs --build-type=Release install
The command will configure, compile and install the framework satisfying the dependencies of the libraries and the correct order for building the various components.
- Alternatively, you can specify the list of components you want to build from the command line. The following command shows the targets available:
stack Build.hs show targets: pfq.ko pfq-clib pfq-cpplib pfq-haskell-lib pfq-pcap-1.8.1-fanout pfq-hcounters pfq-lang pfq-affinity pfq-omatic pfq-load pfq-stress pfqd regression h-regression tools
For example, to install pfq.ko and pfqd:
stack Build.hs -j3 --build-type=Release install pfq.ko pfqd
The following components are currently part of the framework: