New Network Configuration Architecture
-
Packet Classification and Scheduling

Netconf 2005, Montreal

Thomas Graf <tgraf@suug.ch>

Agenda

New Network Configuration Architecture

Ideas and Concept

WIP Report / Plans

Packet Classification and Scheduling

Conntracking Needs

Pseudo Machine Based Classification

WIP Report / Plans

The (Big) Idea

A set of tools to allow for completely distributive network configuration, layered to suit needs on all levels combining as many existing interfaces as possible.

Requirements

Stable configuration interface

IOS like configuration shell but better

Distribution independent way to save/load configurations

Easy enough to get along without documentation while still being powerful enough

Example 1

# Fetch the complete configuration of a remote node

$ config-fetch host_a

# Modify the configuration

$ route del 10.0.0.1/24 dev eth3

# Push the configuration back to the node

$ config-push

# Save it for backup purposes

$ config-save ~/host_a.conf

# Replace configuration of a remote node

$ config-push host_b

Example 2

# Change configuration of a remote node direclty

$ @host_a route del 10.0.0.1/24 dev eth3

# Fetch link statistics of a group of nodes

$ @group_a link list stats where dev eth1

Architectural Concept

Kernel

Netlink Library (possibly others)

Scripting Tools

C-API Users

XML Objects

Netconf Protocol

Netconfig

DBUS

Integration of ethtool and alike?

Option 1: Add netlink interface

Option 2: Use existing ethtool interface and export libnl objects

WIP Report - Kernel

Fix/extend existing netlink interfaces

Create new interfaces via netlink if needed

neighbour tables (might change)

generic stack settings (device specific or not)

ethtool?

Fix netlink alignment issues

generic netlink attributes interface

WIP Report – Netlink Library

Major API rework in progress

Beginning to write the API to stone

Time to 1.0, approx. 1-2 months

Currently covering:

Links, Neighbours, Neigbour Tables, Addresses

Routing, Routing Rules

TC (qdiscs, classifiers, ematches, actions)

TBD before 1.0: stack parameters (replacing /proc)

WIP Report – libnl Applications

Various libnl based applications in development mainly because of the few steps needed to add/remove routes.

WIP – Netconfig

Code at prototype Level

Needs work on the global architectural level to get the distributed behaviour right

Syntax grammar code stable but ugly

Do we need stateful classification?

Stateless tracking is often sufficient

Classification doesn't have to be 100% accurate

Performance over accuracy

Yes for stateful filtering (pattern matching over multiple skbs)

Couldn't netfilter cover it?

Stateless conntracking for TC

Classifier

em_ct_get

...

act_ct_put

if being-tracked then

return true

endif

/* ematches building the filter */

if not-being-tracked-yet then

track-this-flow()

endif

ip_version := offset(u8 at 0@1 rshift 4);

tcp_dport := offset(u16 at 2@2);

LOWER_THRESH := 1024;

UPPER_THRESH := 4096;

result default ip_version:40;

main() {

if (tcp_dport < LOWER_THRESH)

classify(ip_version:20);

else if (tcp_dport > UPPER_THRESH)

classify(ip_version:30);

return 1;

}

Programmable Classification

jgec _0007 _0009 _0010

cls _0013

jmp _0018

_0010:

jlec _0007 _000b _0018

cls _0017

_0018:

ret _001a

...where:

_0007 := offset, tcp_dport

_0009 := number, 0x400

_0013 := result

_000b := number, 0x1000

Instruction Types

Basics (movl, addl, shrl, etc.)

(Un)conditional jumps (jmp, je/jec, jne/jnec, etc.)

Return functions (ret, cls)

Execution of ematch trees (eval)

-> Probably possible to compile machine code.

Short Term TODO

Use zero copy sequential read api for cmp ematch

Adopt cls_u32 to use ematches

Get routing and netfilter attributes into meta ematch

Finish project “Consistent-changes”

Get the RED changes into mainline

Long Term TODO

Route Lookups based on Ematches

Cleanup locking scheme in net/sched/

Generic hashes via actions

In-kernel qdisc allocator

Extend SFQ to be more flexible (ESFQ ideas)

AQM? WRR? Adaptive RED?

2005-07-07T03:19:26