All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mindaugas Riauba" <mind@bi.lt>
To: lartc@vger.kernel.org
Subject: [LARTC] Problems with HTB shaping
Date: Tue, 09 Dec 2003 11:24:41 +0000	[thread overview]
Message-ID: <marc-lartc-107096971302455@msgid-missing> (raw)


  Hello,

  I have some strange problems with shaping. Now I'm testing Linux as
shaping bridge. Redhat Linux 7.3, kernel plain 2.4.23 with latest HTB patch
from devik and PSCHED_CLOCK_SOURCE changed to PSCHED_CPU.

  Some output is at the end of the message. What is strange that according
to interface statistics traffic is shaped more or less OK.
  48431590 - 48079196 = 352394 (~275kbps)
  But byte count reported by tc is lower.
  39061384 - 38778938 = 282446 (~220kbps)

  But when I try to look into packets with tcpdump:
# tcpdump -c 10000 | fgrep -v $ip | wc -l
tcpdump: listening on br0
      5

  So only 5 packets should go not through filter.

  What I'm doing wrong?

  Mindaugas

----------------------------------------------------------------------------
-
# for w in "qdisc" "class" "filter"; do ./tc -s -d $w show dev eth0; echo;
done
qdisc sfq 200: limit 128p quantum 1514b flows 128/1024 perturb 10sec
 Sent 59048002 bytes 942023 pkts (dropped 52103102, overlimits 0)
 backlog 126p
qdisc htb 1: r2q 10 default 1 direct_packets_stat 756 ver 3.14
 Sent 59211007 bytes 942778 pkts (dropped 52103102, overlimits 53038514)
 backlog 126p

class htb 1:200 root leaf 200: prio 0 quantum 3276 rate 256Kbit ceil 256Kbit
burst 1926b/8 mpu 0b overhead 0b cburst 1926b/8 mpu 0b overhead 0b level 0
 Sent 59049862 bytes 942054 pkts (dropped 52103123, overlimits 0)
 rate 30227bps 394pps backlog 126p
 lended: 941933 borrowed: 0 giants: 0
 tokens: -81030 ctokens: -81030


filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800
bkt 0 flowid 1:200
  match d5e2a020/fffffffc at 12
----------------------------------------------------------------------------
-
  $TC qdisc del dev eth0 root
  $TC qdisc del dev eth1 root

  $TC qdisc add dev eth0 root handle 1: htb default 1
  $TC qdisc add dev eth1 root handle 1: htb default 1

  $TC filter add dev eth0 parent 1: protocol ip prio 1 u32 match u32
0x${ip_hex} 0x${netmask_hex} at 12 flowid 1:$num
  $TC filter add dev eth1 parent 1: protocol ip prio 1 u32 match u32
0x${ip_hex} 0x${netmask_hex} at 16 flowid 1:$num
----------------------------------------------------------------------------
-
export E=eth0;./tc -s qdisc show dev $E;cat /proc/net/dev | fgrep $E;sleep
10;./tc -s qdisc show dev $E;cat /proc/net/dev | fgrep $E
qdisc sfq 200: limit 128p quantum 1514b perturb 10sec
 Sent 38778938 bytes 621714 pkts (dropped 34927008, overlimits 0)
 backlog 126p
qdisc htb 1: r2q 10 default 1 direct_packets_stat 465
 Sent 38904418 bytes 622179 pkts (dropped 34927008, overlimits 35550074)
 backlog 126p
  eth0:1374508678 12363563    0    0    0     0          0       139
48079196  619053   37    0    0 42449       0          0
qdisc sfq 200: limit 128p quantum 1514b perturb 10sec
 Sent 39061384 bytes 626322 pkts (dropped 35202131, overlimits 0)
 backlog 126p
qdisc htb 1: r2q 10 default 1 direct_packets_stat 467
 Sent 39187428 bytes 626789 pkts (dropped 35202131, overlimits 35829953)
 backlog 126p
  eth0:1382616092 12439928    0    0    0     0          0       140
48431590  623540   37    0    0 42721       0          0

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

             reply	other threads:[~2003-12-09 11:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-09 11:24 Mindaugas Riauba [this message]
2003-12-09 20:11 ` [LARTC] Problems with HTB shaping Stef Coene
2003-12-10  5:49 ` Mindaugas Riauba
2003-12-11  6:52 ` Mindaugas Riauba
2003-12-11  9:44 ` devik
2003-12-11 11:51 ` Mindaugas Riauba
2003-12-11 14:04 ` devik
2003-12-11 14:10 ` Mindaugas Riauba
2003-12-11 14:19 ` devik
2003-12-11 18:49 ` Kabelweb
2003-12-12 14:06 ` Mindaugas Riauba

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=marc-lartc-107096971302455@msgid-missing \
    --to=mind@bi.lt \
    --cc=lartc@vger.kernel.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 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.