Skip to content

HKUST-SING/PIAS-Software

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Description

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).

Compiling

I have tested this kernel module with Linux kernel 2.6.38.3 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.

Installing

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

Usage

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 192.168.101.11:60410 to 192.168.101.12:5001, bytes_sent=481926280, seq=2365093177, ACK=2364897698
PIAS: flowlist 160
PIAS: flow record from 192.168.101.11:60411 to 192.168.101.12:5001, bytes_sent=578661368, seq=3795198569, ACK=3794930690
PIAS: flowlist 184
PIAS: flow record from 192.168.101.11:60412 to 192.168.101.12:5001, bytes_sent=385470656, seq=3374872543, ACK=3374742224
PIAS: flowlist 208
PIAS: flow record from 192.168.101.11:60413 to 192.168.101.12:5001, 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

Releases

No releases published

Packages

No packages published