Functional Networking Framework for Multi-core Architectures

View the Project on GitHub pfq/PFQ


What is PFQ?

PFQ is a functional networking framework designed for the Linux operating system that allows efficient packets capture/transmission (10G, 40G and beyond), in-kernel functional processing and packets steering across sockets/end-points.

PFQ is highly optimized for multi-core architecture, as well as for network devices equipped with multiple hardware queues. It works with any NIC and provides a script to make accelerated network device drivers starting from the source code.

PFQ enables the development of high-performance network applications in C, C++ and Haskell language. In addition, a pure functional language designed for early stages in-kernel packet processing is included: pfq-lang.

pfq-lang is inspired by Haskell and allows to run small applications on top of network device drivers. Through pfq-lang it is possible to build efficient bridges, port mirrors, simple firewalls, network balancers and so forth.

The package includes the source code of the PFQ kernel module, user-space libraries for C, C++11-14 and Haskell language, an implementation of pfq-lang as eDSL for C++11-14 and Haskell, an experimental pfq-lang compiler and a set of diagnostic tools.



PFQ performance highly depends on the hardware used.

Running on top of a Xeon processor equipped and the Intel 82599 10G controller, PFQ can process, steer to user-space and transmit the line speed (~14,8 Million packets per second) using 2 or 3 kernel threads.

The following link shows the configuration file and the performance measured running PFQ on top of Intel 82599 10/20G NICs.


The current stable release is the master branch (v5.2).

The upcoming major release (v6.0) is expected to be released in the second quarter of 2017.

Source code

The package provides the source code of the PFQ kernel module, user-space libraries for the C, C++11 and Haskell language, utilities, scripts a set of diagnostic tools.


Linux kernel headers (3.x/4.x), gcc/g++ 4.7 (or higher), GHC 7.8 (or 7.10), alex, happy, CMake and make tool are required for the compilation.

The guideline covers the principal problems of compilation and installation.


New to PFQ programming? The wiki pages can get you started quickly.


Interested in daily-based tweets about pfq and pfq-lang facts, updates and tricks? Follow me on Twitter.


  • "PFQ: a Novel Engine for Multi-Gigabit Packet Capturing With Multi-Core Commodity Hardware" Best-Paper-Award at PAM2012
  • "A Purely Functional Approach to Packet Processing" ANCS 2014 Conference - Marina del Rey (LA)
  • "Network Traffic Processing with PFQ" JSAC-SI-MT/IEEE journal Special Issue on Measuring and Troubleshooting the Internet (April 2016)
  • "Enabling Packet Fan--Out in the libpcap Library for Parallel Traffic Processing" Network Traffic Measurement and Analysis Conference (TMA 2017)
  • "A Pipeline Functional Language for Stateful Packet Processing" IEEE International Workshop on NEtwork Accelerated FunctIOns (NEAF-IO '17)

  • Invited Talks

  • "Functional Network Programming" at Tyrrhenian International Workshop on Digital Communication - (Sep. 2016)
  • "Software Accelerations for Network Applications" at NetV IRISA / Technicolor Workshop on Network Virtualization (Feb. 2017)

  • Licenses

    The PFQ kernel module and user-space libraries are distributed under the GPL license.


    Nicola Bonelli