netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: netdev@oss.sgi.com, Nguyen Dinh Nam <nguyendinhnam@gmail.com>,
	Remus <rmocius@auste.elnet.lt>, Andre Tomt <andre@tomt.net>,
	syrius.ml@no-log.org, Andy Furniss <andy.furniss@dsl.pipex.com>,
	Damion de Soto <damion@snapgear.com>
Subject: Re: dummy as IMQ replacement
Date: Tue, 1 Feb 2005 13:51:47 +0100	[thread overview]
Message-ID: <20050201125147.GK31837@postel.suug.ch> (raw)
In-Reply-To: <1107259361.1095.584.camel@jzny.localdomain>

> Why bother putting extra classifier functionality into a qdisc? 
> you should be able to rip off the classifier from sfq so you dont depend
> on it; you can then select one of n queues (eaction meta set class 1:X
> based on result of sfq classifier - or you can have it set the classids
> based on resulting hash index) 

Excellent idea, this would allow for various hash functions to be used
in a single sfq. We can use skb->tc_index for it so we can easly combine
it with a underlying dsmark. The hardest part is to find a intuitive
form to define the hash, it should be possible to for example define
a hash based on daddr + hproto only completely ignoring saddr. The
perutrbation must be made optional, sometimes the hash will not produce
any unwanted collisions (hash based on dscp for example) so modifying it
wouldn't make sense. We can fork sfq and make a gsfq which takes the
hash from tc_index and disabled perturbation if it is set to 0.
Thoughts?

> Well, even if it is just being able to describe in english the u32
> parameters and displaying them in english (by using a ID stored)
> its already huge progress.

True. I've some notes on paper describing a match definition db which
basically defines a u32 like match and assigns a name and id to it, it
is stored in a external database file so everyone can define their
own pre defined matches without recompiling.

I've put together some code printing a tc tree as a whole and added
it to netconfig. It's just a start and still contains redundant
information which can be removed but I think it's already a step
forward because it all gets down to one command. Currently it's only
possible to filter on the device but I'll extend this later so one
can extract a part of the tree. One pretty ugly thing is that cbq
creates a qdisc and class with the same handle which gets quite
confusing if one wants list the filters attached to a certain handle
because they will show up for both, the qdisc and the root class.

Full output for a default ethernet device:
lsx# tc tree full where device eth0 
eth0 ether 00:02:44:63:ed:53 mtu 1500 <BROADCAST,MULTICAST,UP>
    txqlen 1000 weight 64 qdisc pfifo_fast irq 19 index 4 brd ff:ff:ff:ff:ff:ff
  pfifo_fast qdisc dev eth0 handle none parent none bands 3
      refcnt 1 priomap [1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1]
            besteffort => 1                0x8 => 1
                filler => 2                0x9 => 1
                  bulk => 2                0xa => 1
                   0x3 => 2                0xb => 1
      interactive_bulk => 1                0xc => 1
                   0x5 => 2                0xd => 1
           interactive => 0                0xe => 1
               control => 0                0xf => 1

Brief output for some cbq classes:
lsx# tc tree where device eth0 
eth0 ether 00:02:44:63:ed:53 mtu 1500 <BROADCAST,MULTICAST,UP>
  cbq qdisc dev eth0 handle 10: parent none rate 11.92MiB/s (95Mbit) prio 8
    cbq class dev eth0 handle 10: parent root rate 11.92MiB/s (95Mbit) prio 8
      u32 cls dev eth0 handle none parent 10: prio 10 protocol ip
      u32 cls dev eth0 handle 8000: parent 10: prio 10 protocol ip divisor 1
      u32 cls dev eth0 handle 8000:800 parent 10: prio 10 protocol ip target 10:12
      cbq class dev eth0 handle 10:12 parent 10: rate 11.92MiB/s (95Mbit) prio 3
        sfq qdisc dev eth0 handle 8003: parent 10:12 quantum 1514 perturb 0us

Full output with stats for some cbq classes:
lsx# tc tree stats where device eth0 
eth0 ether 00:02:44:63:ed:53 mtu 1500 <BROADCAST,MULTICAST,UP>
    txqlen 1000 weight 64 qdisc cbq irq 19 index 4 brd ff:ff:ff:ff:ff:ff
    Stats:    bytes    packets     errors    dropped   fifo-err compressed
    RX    46.65 MiB      42211          0          0          0          0
    TX     1.91 MiB      16234          0          0          0          0
    Errors:  length       over        crc      frame     missed  multicast
    RX            0          0          0          0          0          0
    Errors: aborted    carrier  heartbeat     window  collision
    TX            0          0          0          0          0
  cbq qdisc dev eth0 handle 10: parent none rate 11.92MiB/s (95Mbit) prio 8
      refcnt 1 avgpkt 1400 mpu 64 cell 16 allot 1514 weight 95Mbit
      minidle 65535999us maxidle 2us offtime 0us level 1 ewma_log 5
      penalty 0us strategy classic split none defmap 0x00000000 police ok
      Stats:    bytes    packets      drops overlimits       qlen    backlog
            44.02 KiB        380          0          0          0          0
               0.00 B/s        0 pps
              borrows    overact    avgidle  undertime
                    0          0        114          0
    cbq class dev eth0 handle 10: parent root rate 11.92MiB/s (95Mbit) prio 8
        avgpkt 1400 mpu 64 cell 16 allot 1514 weight 95Mbit
        minidle 65535999us maxidle 2us offtime 0us level 1 ewma_log 5
        penalty 0us strategy classic split none defmap 0x00000000 police ok
        Stats:    bytes    packets      drops overlimits       qlen    backlog
              44.02 KiB        380          0          0          0          0
                 0.00 B/s        0 pps
                borrows    overact    avgidle  undertime
                      0          0        114          0
      u32 cls dev eth0 handle none parent 10: prio 10 protocol ip
          Stats:    bytes    packets      drops overlimits       qlen    backlog
                   0.00 B          0          0          0          0          0
                   0.00 B/s        0 pps
      u32 cls dev eth0 handle 8000: parent 10: prio 10 protocol ip divisor 1
          Stats:    bytes    packets      drops overlimits       qlen    backlog
                   0.00 B          0          0          0          0          0
                   0.00 B/s        0 pps
      u32 cls dev eth0 handle 8000:800 parent 10: prio 10 protocol ip target 10:12
          nkeys 1 ht key 0x800 hash 0x0 <TERMINAL>
              match u32 at 8 & 0x00ff0000 == 0x00010000 successful 34
          Stats:    bytes    packets      drops overlimits       qlen    backlog
                   0.00 B          0          0          0          0          0
                   0.00 B/s        0 pps
               successful       hits
                       34        379

      cbq class dev eth0 handle 10:12 parent 10: rate 11.92MiB/s (95Mbit) prio 3
          child-qdisc 8003: avgpkt 500 mpu 0 cell 8 allot 1514 weight 95Mbit
          minidle 65535999us maxidle 0us offtime 0us level 0 ewma_log 5
          penalty 0us strategy classic split none defmap 0x00000000 police ok
          Stats:    bytes    packets      drops overlimits       qlen    backlog
                 3.25 KiB         34          0          0          0          0
                   0.00 B/s        0 pps
                  borrows    overact    avgidle  undertime
                        0          0         40          0
        sfq qdisc dev eth0 handle 8003: parent 10:12 quantum 1514 perturb 0us
            refcnt 1 limit 128 divisor 1024 flows 128
            Stats:    bytes    packets      drops overlimits       qlen    backlog
                   3.25 KiB         34          0          0          0          0
                     0.00 B/s        0 pps

  reply	other threads:[~2005-02-01 12:51 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 22:12 dummy as IMQ replacement Jamal Hadi Salim
2005-01-31  8:20 ` Hasso Tepper
2005-01-31 12:25   ` jamal
2005-01-31 12:38     ` Hasso Tepper
2005-01-31 12:47       ` jamal
2005-01-31 13:02         ` Hasso Tepper
2005-01-31 13:28           ` Thomas Graf
2005-01-31 13:45             ` jamal
2005-01-31 14:06               ` Thomas Graf
2005-01-31 14:29                 ` jamal
2005-01-31 13:39           ` jamal
2005-01-31 14:14             ` Hasso Tepper
2005-01-31 14:25               ` jamal
2005-01-31 14:46                 ` Hasso Tepper
2005-01-31 15:34                   ` jamal
2005-01-31 18:00                   ` Lennert Buytenhek
2005-01-31 20:08                     ` jamal
2005-01-31 13:58 ` Thomas Graf
2005-01-31 14:19   ` jamal
2005-01-31 15:15     ` Thomas Graf
2005-01-31 15:40       ` jamal
2005-01-31 15:59         ` Thomas Graf
2005-01-31 16:40           ` jamal
2005-01-31 18:15             ` Thomas Graf
2005-01-31 20:18               ` jamal
2005-01-31 22:53                 ` Thomas Graf
2005-02-01 12:02                   ` jamal
2005-02-01 12:51                     ` Thomas Graf [this message]
2005-02-01 13:13                       ` jamal
2005-02-01 22:44                         ` Thomas Graf
2005-02-02 14:24                           ` jamal
2005-02-02 15:40                             ` Thomas Graf
2005-02-02 15:55                               ` Thomas Graf
2005-01-31 20:28         ` David S. Miller
2005-02-01  1:02       ` Andy Furniss
2005-02-01 13:31         ` Thomas Graf
2005-02-01 15:03           ` Andy Furniss
2005-02-02 13:28             ` Thomas Graf
2005-01-31 16:27 ` Andre Correa
2005-01-31 16:51   ` Jamal Hadi Salim
2005-01-31 22:39 ` Andy Furniss
2005-02-01 11:49   ` jamal
2005-02-01 14:53     ` Andy Furniss
2005-02-02 14:05       ` jamal
2005-02-04  0:33         ` Andy Furniss
2005-02-01 11:32 ` Andy Furniss
     [not found] ` <0fcf01c5077f$579e4b80$6e69690a@RIMAS>
     [not found]   ` <1107174142.8021.121.camel@jzny.localdomain>
2005-03-09 14:30     ` Remus
2005-03-09 14:38       ` jamal
2005-03-10  1:06         ` Jamal Hadi Salim
2005-03-10  9:18           ` Remus
2005-03-10 11:22             ` jamal
2005-03-19  1:09               ` Andy Furniss
2005-03-19  1:45                 ` jamal
2005-03-19 10:23                   ` Andy Furniss
2005-03-20 13:20                     ` jamal
2005-03-20 13:55                       ` jamal
2005-03-20 18:31                         ` jamal
2005-03-21 22:08                       ` Andy Furniss
2005-03-21 13:14                 ` iptables breakage WAS(Re: " jamal
2005-03-21 21:50                   ` Andy Furniss
2005-03-21 22:41                     ` jamal
2005-03-22  1:15                       ` Andy Furniss
2005-03-22  3:31                         ` jamal
2005-03-22 21:09                           ` Andy Furniss
2005-03-23  3:57                             ` jamal
2005-03-23 19:33                               ` Andy Furniss
2005-03-23 19:45                                 ` jamal
2005-03-23 20:53                                   ` Andy Furniss
2005-03-23 21:07                                     ` jamal
2005-03-23 22:46                                       ` Andy Furniss
2005-03-23 23:12                                         ` Andy Furniss
2005-03-24  0:34                                           ` jamal
2005-03-24  1:00                                             ` Andy Furniss
2005-03-24  0:53                                           ` jamal
2005-03-24  1:08                                             ` Andy Furniss
2005-03-24 11:32                                               ` jamal
2005-03-24 11:57                                                 ` jamal
2005-03-24 15:41                                                   ` Andy Furniss
2005-03-25 11:13                                                     ` jamal
2005-03-25 12:39                                                       ` jamal
2005-03-25 17:27                                                         ` Patrick McHardy
2005-03-25 18:34                                                           ` jamal
2005-03-25 19:01                                                             ` Patrick McHardy
2005-03-25 20:07                                                               ` Patrick McHardy
2005-03-25 20:31                                                                 ` jamal
2005-03-25 20:37                                                                   ` Patrick McHardy
2005-03-25 20:54                                                                     ` jamal
2005-03-25 21:23                                                                       ` Patrick McHardy
2005-03-25 19:08                                                             ` jamal
2005-03-25 19:22                                                               ` jamal
2005-03-25 19:59                                                       ` Andy Furniss
2005-03-25 20:09                                                         ` Patrick McHardy
2005-03-25 20:42                                                           ` Andy Furniss
2005-03-25 20:10                                                         ` jamal
2005-03-25 20:18                                                           ` Patrick McHardy
2005-03-25 20:45                                                             ` jamal
2005-03-25 21:10                                                               ` Patrick McHardy
2005-03-25 21:57                                                                 ` jamal
2005-03-25 20:20                                                           ` Thomas Graf
2005-03-25 20:48                                                             ` jamal
2005-03-25 21:01                                                               ` Thomas Graf
2005-03-25 21:48                                                                 ` jamal
2005-03-25 22:03                                                                   ` Thomas Graf
2005-03-25 22:20                                                                     ` jamal
2005-03-25 20:39                                                           ` Patrick McHardy
2005-03-25 20:55                                                             ` jamal
2005-03-25 21:00                                                               ` Patrick McHardy
2005-03-25 21:44                                                                 ` jamal
2005-03-25 21:18                                                           ` Andy Furniss
2005-03-25 22:12                                                             ` IMQ again WAS(Re: " jamal
2005-03-25 23:26                                                               ` Andy Furniss
2005-03-27 19:35                                                               ` Andy Furniss
2005-03-28 13:39                                                                 ` Andy Furniss
2005-03-28 13:45                                                                   ` jamal
2005-03-28 13:55                                                                     ` Andy Furniss
2005-03-28 14:08                                                                       ` jamal
2005-03-28 13:57                                                                     ` jamal
2005-03-28 14:12                                                                       ` Andy Furniss
2005-03-28 14:20                                                                         ` jamal
2005-03-28 14:28                                                                           ` Andy Furniss
2005-03-28 14:36                                                                             ` Andy Furniss
2005-03-28 15:24                                                                               ` Andy Furniss
2005-03-28 19:27                                                                                 ` jamal
2005-03-28 20:13                                                                                   ` Andy Furniss
2005-03-23  1:31                   ` Patrick McHardy
2005-03-23  4:01                     ` jamal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050201125147.GK31837@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=andre@tomt.net \
    --cc=andy.furniss@dsl.pipex.com \
    --cc=damion@snapgear.com \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.com \
    --cc=nguyendinhnam@gmail.com \
    --cc=rmocius@auste.elnet.lt \
    --cc=syrius.ml@no-log.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).