PIAS Software Prototype
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
pias4 Fix some indentation Mar 27, 2016
README.md Update README.md Mar 27, 2016



The kernel module of PIAS (Practical Information-Agnostic flow Scheduling). The kernel module matains the per-flow state (flow.h and flow.c) and marks packets with different priorities (DSCP) (network.h and network.c).


I have tested this kernel module with Linux kernel and 3.18.11. You need the kernel headers to compile it:

$ cd pias4
$ make

Then you can get a kernel module called pias.ko.


pias.ko hooks into the data path using Netfilter hooks. To install it:

$ insmod pias.ko
$ dmesg|tail
PIAS: start on any interface (TCP port 0)

By default, pias.ko filters all TCP packets (0=all) on all NICs. You can also specify the NIC and TCP port number. For exmaple, to make pias.ko only filters TCP packets whose (source or destination) port numbers are 5001 on eth1:

$ insmod pias.ko param_dev=eth1 param_port=5001
$ dmesg|tail
PIAS: start on eth1 (TCP port 5001)

To remove the packet tagging module:

$ rmmod pias
$ dmesg|tail
PIAS: stop working


PIAS packet tagging module exports two types of configurations interfaces: a sysfs file to control flow table and several sysctl interfaces to configure priority parameters (see params.h and params.c for their definitions).

To print the information of all flows in current flow table:

$ echo -n print > /sys/module/pias/parameters/param_table_operation
$ dmesg|tail
PIAS: current flow table
PIAS: flowlist 136
PIAS: flow record from to, bytes_sent=481926280, seq=2365093177, ACK=2364897698
PIAS: flowlist 160
PIAS: flow record from to, bytes_sent=578661368, seq=3795198569, ACK=3794930690
PIAS: flowlist 184
PIAS: flow record from to, bytes_sent=385470656, seq=3374872543, ACK=3374742224
PIAS: flowlist 208
PIAS: flow record from to, bytes_sent=433638376, seq=215506294, ACK=215310815
PIAS: there are 4 flows in total

To clear all the information in current flow table:

$ echo -n clear > /sys/module/pias/parameters/param_table_operation

To show the DSCP value of highest priority:

$ sysctl pias.prio_dscp_0
pias.prio_dscp_0 = 0

To set the first demoting threshold to 50KB:

$ sysctl -w pias.prio_thresh_0=51200