alonrs / classbench-mapper

A tool for analyzing ClassBench rule-set files for packet classification benchmarks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

Ruleset Analyzer

This tool reads ClassBench rule-set files and generates either one of the following:

  • A textual file with 5-tuples that match each rule. The output is saved in the following format:
[#rule]: [ip-protocol] [src-ip] [dst-ip] [src-port] [dst-port]

This format can be easily read and used in packet classification benchmarks.

  • A textual file with Open vSwitch (OVS) flows equivalent to the ClassBench rules. The flows' priorities are set such that overlapping flows would keep their predecence according to their position within the ClassBench rule-set file.

  • A binary file that contains a compressed representation of the rules and the generated 5-tuples. This file can be later read using the Ruleset Manager library.

Ruleset Manager Library

A library for reading the binary files generated by the Ruleset Analyzer tool. The library supports the following features:

  • Read the saved rules and 5-tuples generated by the Ruleset Analyzer tool.

  • Simulate real-world scenarios in which a single writer thread inserts new rules to the system while several other concurrent threads read 5-tuples from the most recent rules. The returned 5-tuples return the rule index that should match them.

This library can be used in your projects for testing the correctness of new packet classifiers when facing updates.

Prerequisites

  • A Linux operating system (also WSL)
  • CMake, G++

How to use

./build.sh
# Run ruleset analyzer, show help message
./build/util.exe --help

The ruleset manager library will be generated in ./build/libcbreader.so. The library API header file is here

Others

If you happen to use this tool for an academic paper, please cite Scaling Open vSwitch with a Computational Cache (USENIX, NSDI 2022).

MIT License.

Code contributions and bug fixes are welcome.

About

A tool for analyzing ClassBench rule-set files for packet classification benchmarks.

License:MIT License


Languages

Language:C++ 88.7%Language:C 10.0%Language:CMake 1.1%Language:Shell 0.1%