Dear reader, I'm not updating these pages anymore. If you have tc or ip related questions, you can post them on the LARTC mailing list.



Unclassified traffic which is not put in any class by a filter, will be handled by the root class. You can use defmap in the filter rule to put these unclassified traffic in a class. Defmap 0xFFFF at the end of the filter rules will hold all unclassified traffic of a class.

From Alex itself (thx to Ness):

Defmaps are intended to make fallback classification when a packet does not match to any stronger classifier or no classifiers are configured.

Algorithm is very simple: protocol layer assigns a logical priority numbered of 0 to 15 to any packet. For forwarded packets it is derived from tos, for locally originated ones it is controlled by SO_PRIORITY socket option (or derived from tos too).

If a class is ready to serve some logical priority, it has corresponding bit in its defmap.

If packet matches to any classifier, this priority is ignored. When it does not, CBQ searches for class which is ready to serve corresponding priority level. That's almost all. Note that, to make CBQ working properly, you should sweep at least all priorities 0..7, otherwise unclassified packets will fallback to root class, which is not intended to transmit anything at all.

For IPv4 mapping tos ->priority is established in route.c by array ip_tos2prio[]. It is not changeable from user level for now and complies to canonical ietf rules. You may change it to diffserv, if you want.

About "split". Normally, split is root.

You may set split to a node in hierarchy and use some simple and fast classifier, which understands only limited set of keys (sort of route), to point to this node. In this case, only classes with split==this node, will be matched. It means, that sk->priority and tos may live in peace with multi-agency link sharing with zero classification cost. Seems, it is the best my invention for last year 8)