tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: packet-classifier Summer of Code RFQ



Andy Pyles wrote:

> ---------
> In kernel API for registering packet classes
> --------

Hi Andy,

The main issue is how to map between classes registered by different
interfaces. Think that you have two interfaces, one (let's call it input)
have M priority classes and other (let's call it output) has N priority
classes and you have to forward packets from input to output, keeping in
mind that higher priority should be put on wire first, no matter what. For
example think that pf is registering 4 classes (realtime, high, medium,
low) and you have to map those on 2 hi-lo ethernet rings. In order to
achieve this you have to design solutions (and finally code common
interfaces) for at least these issues:

- how can you parse queues (and rings in ethernet case) in order to see what
packets/frames are there ?
- how can you insert priority packets into queues ?
- what should you do if queues are full and you need to insert a high
priority packet ?
- how can you flush packets from rings and refeed them to driver queue ?

Also pseudo-interfaces like gre should have a mechanism in order to
automatically map to "parent" interface. Keep in mind that a
pseudo-interface can have a different number of classes than its parent.

Moreover, think that other kernel interfaces like INET can register classes.
In this case an interface should be presented to userspace - probably via
setsockopt (if we're thinking only about pre-defined classes).

-- 
Mihai



Home | Main Index | Thread Index | Old Index