Skip to content
Nicola Bonelli edited this page Feb 4, 2015 · 16 revisions

pfq-omatic script

Pfq-omatic is a Haskell script that can be used to compile the source codes of network device drivers and obtain versions specialized for PFQ. By overloading various symbols at compile time, pfq-omatic enables drivers to:

  • achieve high performance (e.g. line-speed of Intel 10G adapters).
  • exploit the PFQ socket buffer allocator.
  • send to and capture packets directly from PFQ.

Additionally, the use of PFQ on top of pfq-omatic drivers interposes the kernel module between the device driver and the network stack of the Linux kernel. In this vein, the functional computations created with the PFQ/lang can process packets, dispatch them sockets, forward them to network devices or to the Linux kernel, on per-packet-basis.

With pfq-omatic drivers, functional computations can be used to implement a simple firewall, a switched node, a load balancer, or early stages computations for networking applications.

pfq-omatic session

root :: cd /opt/ixgbe-3.22.3/src
root :: pfq-omatic
[PFQ] pfq-omatic: v3.7
[PFQ] using /lib/modules/3.14-2-amd64/kernel/net/pfq/Module.symvers file (most recent)
[PFQ] patching ./ixgbe_main.c
[PFQ] compiling: make KBUILD_EXTRA_SYMBOLS=/lib/modules/3.14-2-amd64/kernel/net/pfq/Module.symvers -j6...
make -C /lib/modules/3.14-2-amd64/build SUBDIRS=/opt/ixgbe-3.22.3/src modules
make[1]: Entering directory '/usr/src/linux-headers-3.14-2-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_main.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_common.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_api.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_param.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_lib.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_ethtool.o
  CC [M]  /opt/ixgbe-3.22.3/src/kcompat.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_82598.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_82599.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_x540.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_sriov.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_mbx.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_dcb.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_dcb_82598.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_dcb_82599.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_sysfs.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_procfs.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_phy.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_dcb_nl.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_fcoe.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_debugfs.o
  CC [M]  /opt/ixgbe-3.22.3/src/ixgbe_ptp.o
  LD [M]  /opt/ixgbe-3.22.3/src/ixgbe.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /opt/ixgbe-3.22.3/src/ixgbe.mod.o
  LD [M]  /opt/ixgbe-3.22.3/src/ixgbe.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.14-2-amd64'
[PFQ] done.
Clone this wiki locally