All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] error making htb example
@ 2004-10-23 22:29 Michael
  0 siblings, 0 replies; only message in thread
From: Michael @ 2004-10-23 22:29 UTC (permalink / raw)
  To: lartc

Newbie here... 
tcng version 10b

I'm just learning about htb and using tcng. I am trying to make the 
example in 
Martin A. Brown's Traffic Control with tcng and HTB HOWTO v0.5
example 2

/*
 * Simply commented example of a tcng traffic control file.
 *
 *   Martin A. Brown <mabrown@securepipe.com>
 *
 * Example:  Using class selection path.
 *
 * (If you are reading the processed output in HTML, the callouts are
 *  clickable links to the description text.)
 *
 */

#include "fields.tc"
#include "ports.tc"

#define INTERFACE  eth0

dev INTERFACE {
    egress {

        /* In class selection path, the filters come first!  DSmark */

        class ( <$ssh> )    if tcp_sport =  22 && ip_tos_delay = 1 ;
        class ( <$audio> )  if tcp_sport = 554 || tcp_dport = 7070 ;
        class ( <$bulk> ) \
            if tcp_sport = PORT_SSH || tcp_dport = PORT_HTTP ;
        class ( <$other> )  if 1 ;

        /* section in which we configure the qdiscs and classes */

        htb () {
            class ( rate 600kbps, ceil 600kbps ) {
                $ssh   = class ( rate  64kbps, ceil 128kbps ) { sfq; } ;
                $audio = class ( rate 128kbps, ceil 128kbps ) { sfq; } ;
                $bulk  = class ( rate 256kbps, ceil 512kbps ) { sfq; } ;
                $other = class ( rate 128kbps, ceil 384kbps ) { sfq; } ;
            }
        }
    }
}

The results indicate an error which does not mean much to me. Could 
someone explain what I might have done wrong.

# ================ Device eth0 
================

tc qdisc add dev eth0 handle 1:0 root dsmark indices 8 default_index 0
tc qdisc add dev eth0 handle 2:0 parent 1:0 htb
tc class add dev eth0 parent 2:0 classid 2:1 htb rate 75000bps ceil 
75000bps
tc class add dev eth0 parent 2:1 classid 2:2 htb rate 8000bps ceil 
16000bps
tc qdisc add dev eth0 handle 3:0 parent 2:2 sfq
tc class add dev eth0 parent 2:1 classid 2:3 htb rate 16000bps ceil 
16000bps
tc qdisc add dev eth0 handle 4:0 parent 2:3 sfq
tc class add dev eth0 parent 2:1 classid 2:4 htb rate 32000bps ceil 
64000bps
tc qdisc add dev eth0 handle 5:0 parent 2:4 sfq
tc class add dev eth0 parent 2:1 classid 2:5 htb rate 16000bps ceil 
48000bps
tc qdisc add dev eth0 handle 6:0 parent 2:5 sfq
tc filter add dev eth0 parent 2:0 protocol all prio 1 tcindex mask 0x7 
shift 0
tc filter add dev eth0 parent 2:0 protocol all prio 1 handle 4 tcindex 
classid 2:5
tc filter add dev eth0 parent 2:0 protocol all prio 1 handle 3 tcindex 
classid 2:4
tc filter add dev eth0 parent 2:0 protocol all prio 1 handle 2 tcindex 
classid 2:3
tc filter add dev eth0 parent 2:0 protocol all prio 1 handle 1 tcindex 
classid 2:2

can't dump subexpression (if_u32.c, unsupported offset sequence - please 
try to reorder matches)
[&&]--[offset]--[=]--[&]--[access]-- (none)
 |     |         |     |    +-------- 0
 |     |         |     |    `-------- 16
 |     |         |     `--- 65535
 |     |         `---- 22
 |     `--------[<<]--[&]--[access]-- (none)
 |               |     |    +-------- 0
 |               |     |    `-------- 8
 |               |     `--- 15
 |               `---- 2
 `----[&&]--[=]--[&]--[access]-- (none)
       |     |     |    +-------- 1
       |     |     |    `-------- 8
       |     |     `--- 16
       |     `---- 16
       `---- <class 1:1>

Thanks,
Michael
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-23 22:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-23 22:29 [LARTC] error making htb example Michael

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.