[LARTC] Re: iproute 2010-2011 - tree problem (udp, quid, action police + action mirred)

2011-05-03 Thread Stephen Hemminger
On Tue, 22 Feb 2011 11:15:39 +0100
PIOTREK H. komare...@tlen.pl wrote:

 Welcome
 
 I have a problem with the new iproute iproute2-2.6.37.tar.bz2 07-Jan-2011 
 9:18 (the problem from version 2010 to 2011).
 Three problems:
 a) with filters for UDP traffic
 problem affects only the queuing traffic to the machine on which you work qos
 In the case of UDP traffic filter does not detect movement.
 The filter works for udp traffic through the router.
 Example:
 qos router has the IP 20.0.0.1
 $ TC filter add dev $ dev parent 1:0 protocol ip prio 5 u32 \
 match ip protocol 0x11 0xff \
 match u32 0 0 flowid 1: A4f
 or
 $ TC filter add dev $ dev parent 1:0 protocol ip prio 5 u32 \
 match ip sport 67 0x \
 match u32 0 0 flowid 1: a1 \
 action mirred egress redirect dev ifb4
   

 $ TC filter add dev $ dev parent 1:0 protocol ip prio 5 u32 \
 match ip dport 68 0x \
 match u32 0 0 flowid 1: a1 \
 action mirred egress redirect dev ifb4
 
 or
 $ TC filter add dev $ dev parent 1:0 protocol ip prio 5 u32 \
 match ip protocol 0x11 0xff \
 match ip src 20.0.0.1/32 flowid 1: A4f
 
  These filters do not work for traffic to or from the router.
 In the old versions of these filters work iproute
 
 
 b) squid (only egrees)
 In the case of traffic from squid filter captures traffic diversion, but the 
 interface is killed ifb movement (2-6kbit)
 
 Traffic is routed to squid with iptables. After downloading the redirect to 
 squid qos works well.
 I noticed that this problem occurs on the cards gigabyte (for Intel 100Pro is 
 ok)
 
 c) the police action + action mirror
 This problem was resolved for the 2010 version of the patch.
 
 action police rate 1024 kbit burst conform-exceed 90kB drop / pipe \
 action mirred egress redirect dev $ qdev2
 
 such action is working ok in iproute iproute2-ss100224 with the patch. Does 
 not work in the new iproute (without the patch, the patch does not have).
 How should this action? I need to trim one filter and redirect traffic to the 
 interface.
 At the ingress use police action + action mirred, I use the egress flowid + 
 action mirred
 
 My router:
 tc utility, iproute2-ss110107
 Linux shaper 2.6.26-2
 problem on several routers (in different versions kernel and iproute)
 
 Work ok:
 tc -V
 tc utility, iproute2-ss070710
 Linux traktor 2.6.23.17-imq #1 SMP Fri Oct 10 00:12:20 CEST 2008 i686 
 GNU/Linux
 
 Linux rtr-58.core 2.6.17.13 #1 Mon Mar 10 09:48:28 CET 2008 i686 GNU/Linux
 tc utility, iproute2-ss061214
 
 with the new iproute have a problem. 
 I will be grateful for any hint or help.
 Thank you for your time.
 
 If the message sent in breach of procedures sorry.
 
 
 Piotr Homa (Poland) 

Could you post these to net...@vger.kernel.org
-- 
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2-2.6.24-rc7

2008-02-05 Thread Stephen Hemminger
This is a preliminary release that includes all the changes for new
features in 2.6.24.  It should be backward compatible with older kernels.

   
http://devresources.linux-foundation.org/dev/iproute2/download/iproute2-2.6.24-rc7.tar.bz2

Note: This release is for validation (don't put it in your distros), therefore
I didn't bother signing it.

Changelog since v2.6.23 release (edited).

Alexander Wirt (2):
  Fix various typos and nitpicks
  Add parameters to usage help text.

Andreas Barth (1):
  Remove bogus reference to tc-filters(8) from tc(8) manpage.

Andreas Henriksson (4):
  Fix corruption when using batch files with comments and broken lines.
  iproute2: support dotted-quad netmask notation.
  iproute2: revert syntax help text mistake.
  iproute2: add synonyms for ip rule options to ip(8) manpage.

Denys Fedoryshchenko (1):
  iptables compatiablity

François Delawarde (1):
  tc mask patch

Herbert Xu:
  Fix typo in tunnel code (o_key vs. i_key).
  Add NAT action

Jesper Dangaard Brouer (3):
  Overhead calculation is now done in the kernel.
  Cleanup: tc_calc_rtable().
  Change the rate table calc of transmit cost to use upper bound value.

Patrick McHardy (1):
  iproute 2.6.23 incompatibility

Pavel Emelyanov (1):
  iplink_parse() routine

Stephen Hemminger
  2.6.24-rc3 headers
  Fix off by one in nested attribute management.
  Fix dotted quad for bit order
  veth: use kernel header file
  snapshot target for makefile
  veth.h move to linux/
  Manual page fixes
  add decode of match rules
  Use netinet/tcp.h (with correction) rather than kernel headers
  add include/netinet/tcp.h
  Revert TC action parsing bug fix

Tomas Janousek (1):
  Correct documentation regarding PROMISC and ALLMULTI.

Vitaliy Gusev (2):
  Fix lost export-dynamic
  veth device link management

YOSHIFUJI Hideaki / 吉藤英明 (1):
  rto_min value display overflow

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] doubt about bridge qdisc

2007-09-18 Thread Stephen Hemminger
On Tue, 18 Sep 2007 00:33:11 -0300
Marco Aurelio [EMAIL PROTECTED] wrote:

 On 9/16/07, Salatiel Filho [EMAIL PROTECTED] wrote:
  Hi guys,  i have a little doubt ;
  I have eth0 ethernet and eth1 wireless , and they are bridged in br0
 
  Is there any difference in the behavior between do
 
  tc qdisc add dev br0 root sfq
 
  OR
 
  tc qdisc add dev eth0 root sfq  tc qdisc add dev eth1 root sfq
 
 
 
 Yes. Only local traffic is passed trough br0 and only all interface
 traffic is passed trough each interface.
 

Also since bridge is a pseudo device it has no transmit queue so there
is no qdisc involved.


-- 
Stephen Hemminger [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] make tc stop!

2007-09-14 Thread Stephen Hemminger
On Fri, 14 Sep 2007 15:06:04 +0100
Jonathan Gazeley [EMAIL PROTECTED] wrote:

 I want to stop shaping from running on my box, without rebooting it. 
 What's the best way to get rid of any tc rules?
 I have tried tc qdisc del dev eth0 root which appeared to be 
 successful but traffic through my box is still very slow.
 
 Cheers,
 Jonathan

tc qdisc del dev eth0 root
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: iproute2 2.6.22-070710 , mp_ematch.y:11: unrecognized: %error-verbose , ...

2007-07-11 Thread Stephen Hemminger
On Wed, 11 Jul 2007 20:38:43 -0700 (PDT)
Mr. James W. Laferriere [EMAIL PROTECTED] wrote:

   Hello Stephen ( All) ,  Maybe next build of the tarball one could tar 
 up the base directory name as well .  ie: iproute2-2.6.22-070710/ .
   The error below while being (quite probably) manually correctable isn't 
 something I'd expect to see in a release .
   Twyl ,  JimL
 
 ps: I am not subscribed to netdev (I am quite sure) .
 
 $ ./configure
 TC schedulers
   ATMno
 
 $ make
 make[1]: Entering directory `/home/archive/iproute2-2_6_22-070710/lib'
 ...snip...
 gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include 
 -DRESOLVE_HOSTNAMES -DCONFIG_GACT -DCONFIG_GACT_PROB   -c -o m_ematch.o 
 m_ematch.c
 bison -d -t -v -o emp_ematch.yacc.c emp_ematch.y
 emp_ematch.y:11: unrecognized: %error-verbose
 emp_ematch.y:11:Skipping to next %
 make[1]: *** [emp_ematch.yacc.c] Error 1
 make[1]: Leaving directory `/home/archive/iproute2-2_6_22-070710/tc'
 make: *** [all] Error 2
 [EMAIL PROTECTED]:/home/archive

Which version of bison. There have been issues where bison / flex don't
always stay source compatible across releases.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2 2.6.22-070710

2007-07-10 Thread Stephen Hemminger
This is an update to iproute2 utilities including bug fixes and features
related to 2.6.22 kernel.

This package tries to be source compatible across releases.
The same source should build on older systems, but obviously the
newer kernel features won't be available.

It can be downloaded from:
  http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.22-070710.tar.gz

Repository:
  git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git

For more info on iproute2 see:
  http://linux-net.osdl.org/index.php/Iproute2

Changelog

David Lamparter (1):
  iproute2: Format IPv6 tunnels endpoints nicely.

Mike Frysinger (1):
  ip/routef lifesaver

Patrick McHardy (1):
  Fwd: Re: more iproute2 issues (not critical)

Pavel Roskin (1):
  ip: add support for displaying link types 802 and 803

Stephen Hemminger (11):
  Revert Increase internal clock resolution to nsec
  Add xt_tcpudp.h
  incorrect initialization
  headers update to 2.6.22
  fix last change
  fix build warnings
  netem: static
  Add TC_LIB_DIR environment variable.
  ss: fix issues with signed inodes

Thomas Graf (2):
  iproute2: support for goto/nop action and detached flag
  iproute2: Support IFF_LOWER_UP and IFF_DORMANT

Yasuyuki KOZAKAI (1):
  Fix symbolic link to tc-bfifo.8

jamal (2):
  SAD info
  SPD info



-- 
Stephen Hemminger [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Re: vlan interfaces and tc

2007-06-11 Thread Stephen Hemminger
On Mon, 11 Jun 2007 22:11:09 +0200
Michal Soltys [EMAIL PROTECTED] wrote:

 Christian Benvenuti wrote:
  
  This is one important detail you probably missed:
  
  (Note that in this case the VLAN interface is a L3 interface)
  
  If you assign an IP address to the VLAN interface and you transmit
  IP traffic on that interface, than the traffic goes through the VLAN
  qdisc config and classification works (*).
  
   [config cut]
  
 
 When I was doing testing with some trivial setup, I did pretty much the same 
 thing as in your config (forward note - also checked htb, smaller mtu, vlan 
 if up and down).
 
 In order:
 
 #vconfig add eth0 11
 #ip add add 192.168.20.10/24 dev eth0.11 broad +
 #ip li set eth0.11 up
 
 #tc qdisc add dev eth0.11 root handle 1:0 hfsc default 1
 #tc class add dev eth0.11 parent 1:0 classid 1:1  hfsc sc rate 10mbit
 #tc class add dev eth0.11 parent 1:0 classid 1:21 hfsc sc rate 10mbit
 
 #tc filter add dev eth0.11 parent 1:0 proto ip prio 10 u32 flowid 1:21 \
   match ip dst 192.168.20.1
 
 #ip add sh dev eth0.11
 
 12: [EMAIL PROTECTED]: BROADCAST,MULTICAST,SLAVE,UP,1 mtu 1500 qdisc 
 hfsc
  link/ether 00:0c:f1:da:e9:46 brd ff:ff:ff:ff:ff:ff
  inet 192.168.20.10/24 brd 192.168.20.255 scope global eth0.11
 
 #tc -d filter sh dev eth0.11
 
 filter parent 1: protocol ip pref 10 u32
 filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht 800
  bkt 0 flowid 1:21 match c0a81401/ at 16
 
 #tc -d class sh dev eth0.11
 
 class hfsc 1: root
 class hfsc 1:1 parent 1: sc m1 0bit d 0ns m2 1Kbit
 class hfsc 1:21 parent 1: sc m1 0bit d 0ns m2 1Kbit
 
 ... then I did
 
 ping 192.168.20.1
 
 ... and ended with
 
 #tc -d -s class sh dev eth0.11
 
 class hfsc 1: root
   Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
   rate 0bit 0pps backlog 0b 0p requeues 0
   period 0 level 1
 
 class hfsc 1:1 parent 1: sc m1 0bit d 0ns m2 1Kbit
   Sent 348 bytes 9 pkt (dropped 0, overlimits 0 requeues 0)
   rate 0bit 0pps backlog 0b 0p requeues 0
   period 9 work 348 bytes rtwork 348 bytes level 0
 
 class hfsc 1:21 parent 1: sc m1 0bit d 0ns m2 1Kbit
   Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
   rate 0bit 0pps backlog 0b 0p requeues 0
   period 0 level 0
 
 #tc -d -s filter sh dev eth0.11
 
 filter parent 1: protocol ip pref 10 u32
 filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht 800 
 bkt 0 flowid 1:21  (rule hit 0 success 0)
match c0a81401/ at 16 (success 0 )
 
 
 ... so I'm probably missing / not seeing something simple, or I don't know. 
 This setup works for real interface, as well as for bonding. During testing, 
 real interface is normally working in 192.168.100/24 subnet.
 
 Moving from OBSD I'm checking what I can and cannot do under linux, so my 
 kernel is a bit full atm, with majority of stuff compiled into it.
 
 I'm using clean  patched gentoo here.

Doing traffic control on vlan's may work as expected because
the vlan pseudo-device does not have any transmit queue.

-- 
Stephen Hemminger [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Interesting article about punching holes in firewalls...

2006-12-21 Thread Stephen Hemminger
On Sun, 17 Dec 2006 20:51:44 -0600
Grant Taylor [EMAIL PROTECTED] wrote:

 I ran across an interesting article 
 (http://www.heise-security.co.uk/articles/print/82481) (1) that I think 
 any and all firewall administrators should take a few moments to read.
 
 I personally have known that using -m state --state 
 ESTABLISHED,RELATED was not the most secure thing to use for returning 
 traffic.  Namely this will allow you to make a valid connection to a web 
 server, say to retrieve a picture.  Then said web server could send 
 malicious traffic back to your computer and pass through your firewall. 
   This is because the traffic coming from the web server to your 
 computer is now deemed as RELATED.  Previously I have written this off 
 as not needing to worry about this (much) YET.  Yet being the operative 
 word.  I have long known that I would, especially on more secure 
 installs (read not SOHO) need to filter inbound traffic based on source 
 / destination port.  I just have not thought that it was important 
 enough to do presently for my clientele.  Unfortunately, the day where 
 we do as much filtering on related traffic as we do on non related 
 traffic may be closer at hand than we all would like to admit.  :(
 
 
 
 Grant. . . .
 
 
 (1) Is a /. article How Skype Punches Holes in Firewalls 
 (http://it.slashdot.org/article.pl?sid=06/12/15/191205)
 ___
 LARTC mailing list
 LARTC@mailman.ds9a.nl
 http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

This isn't new, it STUNT (Simple Traversal of UDP through NAT
and TCP).  See:
http://nutss.gforge.cis.cornell.edu/stunt.php

It has been studied by Internet researchers for a while. But for most
users, NAT is an impediment to connectivity, and STUNT is a good thing.

You should be able to block it with netfilter connection tracking.

-- 
Stephen Hemminger [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [announce] iproute2 2.6.19-061214

2006-12-14 Thread Stephen Hemminger
This is an update to the iproute2 command set.
It can be downloaded from:
  http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.18-061214.tar.gz

Repository:
  git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git

For more info on iproute2 see:
  http://linux-net.osdl.org/index.php/Iproute2

The version number includes the kernel version to denote what features are
supported. The same source should build on older systems, but obviously the
newer kernel features won't be available. As much as possible, this package
tries to be source compatible across releases.

Changes from 2.6.18-061002 to 2.6.19-061214:

Boian Bonev:
  Display local route table name correctly in output of:

Hasso Tepper:
  Fixes for tc help commands

jamal:
  Multicast computation off by one
  Update generic netlink header
  Add controller support for new features exposed
  clarify ok and pass
  Fix missing class/flowid oddity
  Mention need for db dev package
  update xfrm async events
  make muticast group to bitmask conversion generic
  update xfrm monitoring to use nl_mgrp

Masahide NAKAMURA:
  ADDR: Fix print format for lifetimes.
  ADDR: Enable to add IPv6 address with valid/preferred lifetime.
  ADDR: Define 0xU as INFINITY_LIFE_TIME regarding to the kernel.
  TUNNEL: Split common functions to export them.
  TUNNEL: Import ip6tunnel.c.
  TUNNEL: IPv6-over-IPv6 tunnel support.
  XFRM: sub policy support.
  XFRM: Mobile IPv6 route optimization support.
  XFRM: support report message by monitor.
  XFRM: Mobility header support.

Noriaki TAKAMIYA:
  ADDR: Add the 'change' and 'replace' commands to the IPv6 address 
manipulation context.

Patrick McHardy:
  [IPROUTE]: Add support for routing rule fwmark masks

Stephen Hemminger:
  Man page for ss submitted by Alex Wirt
  Typo in man page
  Trap possible overflow in usec values to netem
  genl Makefile LDFLAGS
  SA and SP in IPSec BEET mode.
  Route metrics decode bug.
  lnstat man page
  Man page for rtmon
  Update to 2.6.19 headers
  Add more includes
  Change to post 2.6.19 sanitized headers
  Eliminate trailing whitespace


Thomas Graf:
  Add support for inverted selectors
  Add rule notification support to ip monitor

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Strategy for penalising IPs with too many simultaneous sessions

2006-11-03 Thread Stephen Hemminger
On Sat, 04 Nov 2006 02:09:03 +0200
Graham Leggett [EMAIL PROTECTED] wrote:

 Hi all,
 
 I have been trying to investigate traffic shaping in an effort to solve 
 the unfriendly network apps problem on a test network.
 
 I have a basis by which I'd like to shape traffic, but studying the 
 howto doesn't uncover and existing qdisc that seems to fit what I would 
 like to do.
 
 The problem I would like to address is to prevent an IP address opening 
 10 simultaneous streams from drowning out another IP address that opened 
 1 stream.
 
 I would like to penalise IP addresses where two or more simultaneous 
 sessions are in effect, by adding a delay to the streams such that the 
 total bandwidth used by the IP address is capped at a declining curve.
 
 In other words, assuming that the data you are sending is constrained 
 behind you by a 1mbps bottleneck.
 
 When an IP has one session detected, their traffic is passed through, 
 and normal rules apply.
 
 When an IP has two sessions detected, their combined sent traffic 
 towards the IP is delayed and shaped down to say 800kbps.
 
 When an IP has three sessions detected, their combined sent traffic 
 towards the IP is delayed and shaped down to say 600kbps.
 
 The starting point of how many sessions can be open before penalising 
 takes effect, the starting point of the curve and the gradient of the 
 curve would obviously be subject to lots of experimentation and would be 
 set by the admin.
 
 The nett effect I am looking for, is that a user who chooses to open 
 multiple simultaneous streams, should see a noticable decrease in 
 maximum throughput, in an effort to discourage them from swamping the 
 network with sessions.
 
 My question is, does a qdisc exist that implements something like this?
 
 Is this a reasonable thing to do, or will a strategy like this not work, 
 and if not, why not? (for the purposes of me better understanding the 
 issues).
 
 Regards,

How about making a modified version of RED that works by doing:

enqueue(skb) {
  if (qlen  min) {
skb_queue(q, skb);
return;
  }

  if (qlen  threshold) {
drop(skb);
return;
  }

   skb1 = queue[random() % qlen];
   if (skb-protocol == IP  skb1-protocol == IP 
  skb-src.ip == skb1-src.ip) {
drop(skb);
drop(skb1);
return;
}

skb_enqueue(q, skb);
}

There will be issues since the queue is no longer work conserving.
But it will penalize overloaders.



   
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Ethernet packet loss - frame errors

2006-11-01 Thread Stephen Hemminger
On Sat, 14 Oct 2006 15:18:32 +0200
Justin Schoeman [EMAIL PROTECTED] wrote:

 Stephen Hemminger wrote:
  On Fri, 13 Oct 2006 10:26:14 +0200
  Justin Schoeman [EMAIL PROTECTED] wrote:
  
  Hi all,
 
  I have the following problem. A Linux box configured as a bridge. One 
  interface connects to the router via a crossover cable, the other 
  connects to a switch via the cable that used to go to the router.
 
  Now I get the following:
 
  [EMAIL PROTECTED] net]# ifconfig eth3
  eth3  Link encap:Ethernet  HWaddr 00:03:2D:07:61:5D
 UP BROADCAST MULTICAST  MTU:1500  Metric:1
 RX packets:1969134 errors:0 dropped:0 overruns:0 frame:176459
 TX packets:2186662 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:492595115 (469.7 Mb)  TX bytes:579725462 (552.8 Mb)
 Interrupt:17
 
  eth3 is the interface that connects to the switch.  As you can see, 1 in 
  10 rx packets are framing errors.
 
  What are possible causes for this? The cable is a constant, so is not 
  likely to cause problems, so what else can possibly cause such a high 
  number of frame errors?
 
  Any help appreciated.
 
  Thanks,
 
  Justin
 
  
  What speed and driver?
 
 sky 2 driver, hardcoded for 100Mbps full duplex.
 

In that driver, frame errors come from receiving fragments. Fragments
are any packet shorter 64 bytes and has an invalid CRC.

These might occur if you have got a duplex mismatch.

-- 
Stephen Hemminger [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Ethernet packet loss - frame errors

2006-11-01 Thread Stephen Hemminger
On Mon, 16 Oct 2006 16:09:50 +0200
Justin Schoeman [EMAIL PROTECTED] wrote:

 OK - Just finished more testing, and it seems to be a bug in the sky2 
 driver...
 
 ping -s 1450 -f xxx.xxx.xxx.xxx
 
 works perfectly, but
 
 ping -s 1500 -f xxx.xxx.xxx.xxx
 
 fails 100% with all packets being logged as frame errors.
 
 -justin


Do you have an MTU mismatch?  If the sender assumes it can send
large packets, and the receiver doesn't expect them it might cause it.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Ethernet packet loss - frame errors

2006-10-13 Thread Stephen Hemminger
On Fri, 13 Oct 2006 10:26:14 +0200
Justin Schoeman [EMAIL PROTECTED] wrote:

 Hi all,
 
 I have the following problem. A Linux box configured as a bridge. One 
 interface connects to the router via a crossover cable, the other 
 connects to a switch via the cable that used to go to the router.
 
 Now I get the following:
 
 [EMAIL PROTECTED] net]# ifconfig eth3
 eth3  Link encap:Ethernet  HWaddr 00:03:2D:07:61:5D
UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:1969134 errors:0 dropped:0 overruns:0 frame:176459
TX packets:2186662 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:492595115 (469.7 Mb)  TX bytes:579725462 (552.8 Mb)
Interrupt:17
 
 eth3 is the interface that connects to the switch.  As you can see, 1 in 
 10 rx packets are framing errors.
 
 What are possible causes for this? The cable is a constant, so is not 
 likely to cause problems, so what else can possibly cause such a high 
 number of frame errors?
 
 Any help appreciated.
 
 Thanks,
 
 Justin
 

What speed and driver?
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] [ANNOUNCE] iproute2-2.6.18-061002

2006-10-04 Thread Stephen Hemminger
On Wed, 04 Oct 2006 23:34:24 +0200
Carl-Daniel Hailfinger [EMAIL PROTECTED] wrote:

 Stephen Hemminger wrote:
  This is a much delayed update to the iproute2 command set.
  It can be downloaded from:

  http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.18-061002.tar.gz
 
 Thanks!
 
 Are there any plans to merge the ip arp patches at
 http://www.ssi.bg/~ja/#iparp ? Apologies if this has already
 been rejected before. Searching the archives I couldn't find
 such a discussion.
 
 
 Regards,
 Carl-Daniel
 
 


When the kernel patches were accepted by the mainline kernel, then
I'll update iproute2.

-- 
Stephen Hemminger [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2-2.6.18-061002

2006-10-02 Thread Stephen Hemminger
This is a much delayed update to the iproute2 command set.
It can be downloaded from:
  http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.18-061002.tar.gz

Repository:
  git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git

For more info on iproute2 see:
  http://linux-net.osdl.org/index.php/Iproute2

The version number includes the kernel version to denote what features are
supported. The same source should build on older systems, but obviously the
newer kernel features won't be available. As much as possible, this package
tries to be source compatible across releases.

Summary of changes:
- converted to git
- build fixes for some distributions
- bug fix for xfrm monitor
- alignment fixes for cris
- documentation corrections
- many small bug fixes
- new tc monitor mode

Contributors to this release
Jamal Hadi Salim
Patrick McHardy
Andy Gay
Jesper Dangaard Brouer
Vince Worthington 

Git changelog is a bit of a mess, so if I missed your name sorry.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] multiple IFBs

2006-09-01 Thread Stephen Hemminger
On Fri, 1 Sep 2006 16:23:37 +1000
Leigh Sharpe [EMAIL PROTECTED] wrote:

 Hi all,
 Further to my previous questions, I need lots of IFBs on this thing.
  I have configured IFB as a module, and issuing a modprobe ifb loads it,
 but only gives me 2 IFBs (ifb0 and ifb1). How can I get more? I'm
 probably looking at needing about 20 on this project.
  

Read the source Leigh

modprobe ifb numifbs=20


-- 
Stephen Hemminger [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [PATCH 0/6] htb: cleanup

2006-08-02 Thread Stephen Hemminger
The HTB scheduler code is a mess, this patch set does some basic
house cleaning.  The first four should cause no code change, but the
last two need more testing.

-- 
Stephen Hemminger [EMAIL PROTECTED]
And in the Packet there writ down that doome
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [PATCH 5/6] htb: use hlist for hash lists.

2006-08-02 Thread Stephen Hemminger
Use hlist instead of list for the hash list. This saves
space, and we can check for double delete better.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/sched/sch_htb.c |   49 +++--
 1 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 528d5c5..7853c6f 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -104,7 +104,7 @@ #endif
/* topology */
int level;  /* our level (see above) */
struct htb_class *parent;   /* parent class */
-   struct list_head hlist; /* classid hash list item */
+   struct hlist_node hlist;/* classid hash list item */
struct list_head sibling;   /* sibling list item */
struct list_head children;  /* children list */
 
@@ -163,8 +163,8 @@ static inline long L2T(struct htb_class 
 
 struct htb_sched {
struct list_head root;  /* root classes list */
-   struct list_head hash[HTB_HSIZE];   /* hashed by classid */
-   struct list_head drops[TC_HTB_NUMPRIO]; /* active leaves (for drops) */
+   struct hlist_head hash[HTB_HSIZE];  /* hashed by classid */
+   struct list_head drops[TC_HTB_NUMPRIO];/* active leaves (for drops) */
 
/* self list - roots of self generating tree */
struct rb_root row[TC_HTB_MAXDEPTH][TC_HTB_NUMPRIO];
@@ -220,12 +220,13 @@ #endif
 static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch)
 {
struct htb_sched *q = qdisc_priv(sch);
-   struct list_head *p;
+   struct hlist_node *p;
+   struct htb_class *cl;
+
if (TC_H_MAJ(handle) != sch-handle)
return NULL;
 
-   list_for_each(p, q-hash + htb_hash(handle)) {
-   struct htb_class *cl = list_entry(p, struct htb_class, hlist);
+   hlist_for_each_entry(cl, p, q-hash + htb_hash(handle), hlist) {
if (cl-classid == handle)
return cl;
}
@@ -675,7 +676,9 @@ static void htb_rate_timer(unsigned long
 {
struct Qdisc *sch = (struct Qdisc *)arg;
struct htb_sched *q = qdisc_priv(sch);
-   struct list_head *p;
+   struct hlist_node *p;
+   struct htb_class *cl;
+
 
/* lock queue so that we can muck with it */
spin_lock_bh(sch-dev-queue_lock);
@@ -686,9 +689,8 @@ static void htb_rate_timer(unsigned long
/* scan and recompute one bucket at time */
if (++q-recmp_bucket = HTB_HSIZE)
q-recmp_bucket = 0;
-   list_for_each(p, q-hash + q-recmp_bucket) {
-   struct htb_class *cl = list_entry(p, struct htb_class, hlist);
 
+   hlist_for_each_entry(cl,p, q-hash + q-recmp_bucket, hlist) {
RT_GEN(cl-sum_bytes, cl-rate_bytes);
RT_GEN(cl-sum_packets, cl-rate_packets);
}
@@ -1041,10 +1043,10 @@ static void htb_reset(struct Qdisc *sch)
int i;
 
for (i = 0; i  HTB_HSIZE; i++) {
-   struct list_head *p;
-   list_for_each(p, q-hash + i) {
-   struct htb_class *cl =
-   list_entry(p, struct htb_class, hlist);
+   struct hlist_node *p;
+   struct htb_class *cl;
+
+   hlist_for_each_entry(cl, p, q-hash + i, hlist) {
if (cl-level)
memset(cl-un.inner, 0, sizeof(cl-un.inner));
else {
@@ -1091,7 +1093,7 @@ static int htb_init(struct Qdisc *sch, s
 
INIT_LIST_HEAD(q-root);
for (i = 0; i  HTB_HSIZE; i++)
-   INIT_LIST_HEAD(q-hash + i);
+   INIT_HLIST_HEAD(q-hash + i);
for (i = 0; i  TC_HTB_NUMPRIO; i++)
INIT_LIST_HEAD(q-drops + i);
 
@@ -1269,7 +1271,8 @@ static void htb_destroy_class(struct Qdi
  struct htb_class, sibling));
 
/* note: this delete may happen twice (see htb_delete) */
-   list_del(cl-hlist);
+   if (!hlist_unhashed(cl-hlist))
+   hlist_del(cl-hlist);
list_del(cl-sibling);
 
if (cl-prio_activity)
@@ -1317,7 +1320,9 @@ static int htb_delete(struct Qdisc *sch,
sch_tree_lock(sch);
 
/* delete from hash and active; remainder in destroy_class */
-   list_del_init(cl-hlist);
+   if (!hlist_unhashed(cl-hlist))
+   hlist_del(cl-hlist);
+
if (cl-prio_activity)
htb_deactivate(q, cl);
 
@@ -1381,7 +1386,7 @@ static int htb_change_class(struct Qdisc
 
cl-refcnt = 1;
INIT_LIST_HEAD(cl-sibling);
-   INIT_LIST_HEAD(cl-hlist);
+   INIT_HLIST_NODE(cl-hlist);
INIT_LIST_HEAD(cl-children);
INIT_LIST_HEAD(cl-un.leaf.drop_list);
 
@@ -1420,7 +1425,7 @@ static int htb_change_class(struct Qdisc
cl-cmode = HTB_CAN_SEND;
 
/* attach

[LARTC] [PATCH 6/6] htb: rbtree cleanup

2006-08-02 Thread Stephen Hemminger
Add code to initialize rb tree nodes, and check for double deletion.
This is not a real fix, but I can make it trap sometimes and may
be a bandaid for: http://bugzilla.kernel.org/show_bug.cgi?id=6681

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/sched/sch_htb.c |   34 +++---
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 7853c6f..3f3e9df 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -366,7 +366,7 @@ static void htb_add_to_wait_tree(struct 
  * When we are past last key we return NULL.
  * Average complexity is 2 steps per call.
  */
-static void htb_next_rb_node(struct rb_node **n)
+static inline void htb_next_rb_node(struct rb_node **n)
 {
*n = rb_next(*n);
 }
@@ -388,6 +388,18 @@ static inline void htb_add_class_to_row(
}
 }
 
+/* If this triggers, it is a bug in this code, but it need not be fatal */
+static void htb_safe_rb_erase(struct rb_node *rb, struct rb_root *root)
+{
+   if (RB_EMPTY_NODE(rb)) {
+   WARN_ON(1);
+   } else {
+   rb_erase(rb, root);
+   RB_CLEAR_NODE(rb);
+   }
+}
+
+
 /**
  * htb_remove_class_from_row - removes class from its row
  *
@@ -401,10 +413,12 @@ static inline void htb_remove_class_from
 
while (mask) {
int prio = ffz(~mask);
+
mask = ~(1  prio);
if (q-ptr[cl-level][prio] == cl-node + prio)
htb_next_rb_node(q-ptr[cl-level] + prio);
-   rb_erase(cl-node + prio, q-row[cl-level] + prio);
+
+   htb_safe_rb_erase(cl-node + prio, q-row[cl-level] + prio);
if (!q-row[cl-level][prio].rb_node)
m |= 1  prio;
}
@@ -472,7 +486,7 @@ static void htb_deactivate_prios(struct 
p-un.inner.ptr[prio] = NULL;
}
 
-   rb_erase(cl-node + prio, p-un.inner.feed + prio);
+   htb_safe_rb_erase(cl-node + prio, p-un.inner.feed + 
prio);
 
if (!p-un.inner.feed[prio].rb_node)
mask |= 1  prio;
@@ -739,7 +753,7 @@ #define HTB_ACCNT(T,B,R) toks = diff + c
htb_change_class_mode(q, cl, diff);
if (old_mode != cl-cmode) {
if (old_mode != HTB_CAN_SEND)
-   rb_erase(cl-pq_node, q-wait_pq + cl-level);
+   htb_safe_rb_erase(cl-pq_node, q-wait_pq + 
cl-level);
if (cl-cmode != HTB_CAN_SEND)
htb_add_to_wait_tree(q, cl, diff);
}
@@ -782,7 +796,7 @@ static long htb_do_events(struct htb_sch
if (time_after(cl-pq_key, q-jiffies)) {
return cl-pq_key - q-jiffies;
}
-   rb_erase(p, q-wait_pq + level);
+   htb_safe_rb_erase(p, q-wait_pq + level);
diff = PSCHED_TDIFF_SAFE(q-now, cl-t_c, (u32) cl-mbuffer);
htb_change_class_mode(q, cl, diff);
if (cl-cmode != HTB_CAN_SEND)
@@ -1279,7 +1293,7 @@ static void htb_destroy_class(struct Qdi
htb_deactivate(q, cl);
 
if (cl-cmode != HTB_CAN_SEND)
-   rb_erase(cl-pq_node, q-wait_pq + cl-level);
+   htb_safe_rb_erase(cl-pq_node, q-wait_pq + cl-level);
 
kfree(cl);
 }
@@ -1370,6 +1384,8 @@ static int htb_change_class(struct Qdisc
 
if (!cl) {  /* new class */
struct Qdisc *new_q;
+   int prio;
+
/* check for valid classid */
if (!classid || TC_H_MAJ(classid ^ sch-handle)
|| htb_find(classid, sch))
@@ -1389,6 +1405,10 @@ static int htb_change_class(struct Qdisc
INIT_HLIST_NODE(cl-hlist);
INIT_LIST_HEAD(cl-children);
INIT_LIST_HEAD(cl-un.leaf.drop_list);
+   RB_CLEAR_NODE(cl-pq_node);
+
+   for (prio = 0; prio  TC_HTB_NUMPRIO; prio++)
+   RB_CLEAR_NODE(cl-node[prio]);
 
/* create leaf qdisc early because it uses kmalloc(GFP_KERNEL)
   so that can't be used inside of sch_tree_lock
@@ -1404,7 +1424,7 @@ static int htb_change_class(struct Qdisc
 
/* remove from evt list because of level change */
if (parent-cmode != HTB_CAN_SEND) {
-   rb_erase(parent-pq_node, q-wait_pq);
+   htb_safe_rb_erase(parent-pq_node, q-wait_pq);
parent-cmode = HTB_CAN_SEND;
}
parent-level = (parent-parent ? parent-parent-level
-- 
1.4.0

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo

[LARTC] [PATCH 3/6] htb: if HTB_HYSTERIS cleanup

2006-08-02 Thread Stephen Hemminger
Change the conditional compilation around HTB_HYSTERSIS
since code was splitting mid expression.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/sched/sch_htb.c |   27 +--
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index c0b80b7..d8c1a6b 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -483,6 +483,20 @@ static void htb_deactivate_prios(struct 
htb_remove_class_from_row(q,cl,mask);
 }
 
+#if HTB_HYSTERESIS
+static inline long htb_lowater(const struct htb_class *cl)
+{
+   return cl-cmode != HTB_CANT_SEND ? -cl-cbuffer : 0;
+}
+static inline long htb_hiwater(const struct htb_class *cl)
+{
+   return cl-cmode == HTB_CAN_SEND ? -cl-buffer : 0;
+}
+#else
+#define htb_lowater(cl)(0)
+#define htb_hiwater(cl)(0)
+#endif
+
 /**
  * htb_class_mode - computes and returns current class mode
  *
@@ -499,19 +513,12 @@ htb_class_mode(struct htb_class *cl,long
 {
 long toks;
 
-if ((toks = (cl-ctokens + *diff))  (
-#if HTB_HYSTERESIS
-   cl-cmode != HTB_CANT_SEND ? -cl-cbuffer :
-#endif
-   0)) {
+if ((toks = (cl-ctokens + *diff))  htb_lowater(cl)) {
*diff = -toks;
return HTB_CANT_SEND;
 }
-if ((toks = (cl-tokens + *diff)) = (
-#if HTB_HYSTERESIS
-   cl-cmode == HTB_CAN_SEND ? -cl-buffer :
-#endif
-   0))
+
+if ((toks = (cl-tokens + *diff)) = htb_hiwater(cl))
return HTB_CAN_SEND;
 
 *diff = -toks;
-- 
1.4.0

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [PATCH 1/6] htb: remove broken debug code

2006-08-02 Thread Stephen Hemminger

The HTB network scheduler had debug code that wouldn't compile
and confused and obfuscated the code, remove it.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/sched/sch_htb.c |  302 ++-
 1 files changed, 34 insertions(+), 268 deletions(-)

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 880a339..73094e7 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -70,7 +70,6 @@ #include linux/rbtree.h
 
 #define HTB_HSIZE 16   /* classid hash size */
 #define HTB_EWMAC 2/* rate average over HTB_EWMAC*HTB_HSIZE sec */
-#undef HTB_DEBUG   /* compile debugging support (activated by tc tool) */
 #define HTB_RATECM 1/* whether to use rate computer */
 #define HTB_HYSTERESIS 1/* whether to use mode hysteresis for speedup */
 #define HTB_QLOCK(S) spin_lock_bh((S)-dev-queue_lock)
@@ -81,51 +80,6 @@ #if HTB_VER  16 != TC_HTB_PROTOVER
 #error Mismatched sch_htb.c and pkt_sch.h
 #endif
 
-/* debugging support; S is subsystem, these are defined:
-  0 - netlink messages
-  1 - enqueue
-  2 - drop  requeue
-  3 - dequeue main
-  4 - dequeue one prio DRR part
-  5 - dequeue class accounting
-  6 - class overlimit status computation
-  7 - hint tree
-  8 - event queue
- 10 - rate estimator
- 11 - classifier 
- 12 - fast dequeue cache
-
- L is level; 0 = none, 1 = basic info, 2 = detailed, 3 = full
- q-debug uint32 contains 16 2-bit fields one for subsystem starting
- from LSB
- */
-#ifdef HTB_DEBUG
-#define HTB_DBG_COND(S,L) (((q-debug(2*S))3) = L)
-#define HTB_DBG(S,L,FMT,ARG...) if (HTB_DBG_COND(S,L)) \
-   printk(KERN_DEBUG FMT,##ARG)
-#define HTB_CHCL(cl) BUG_TRAP((cl)-magic == HTB_CMAGIC)
-#define HTB_PASSQ q,
-#define HTB_ARGQ struct htb_sched *q,
-#define static
-#undef __inline__
-#define __inline__
-#undef inline
-#define inline
-#define HTB_CMAGIC 0xFEFAFEF1
-#define htb_safe_rb_erase(N,R) do { BUG_TRAP((N)-rb_color != -1); \
-   if ((N)-rb_color == -1) break; \
-   rb_erase(N,R); \
-   (N)-rb_color = -1; } while (0)
-#else
-#define HTB_DBG_COND(S,L) (0)
-#define HTB_DBG(S,L,FMT,ARG...)
-#define HTB_PASSQ
-#define HTB_ARGQ
-#define HTB_CHCL(cl)
-#define htb_safe_rb_erase(N,R) rb_erase(N,R)
-#endif
-
-
 /* used internaly to keep status of single class */
 enum htb_cmode {
 HTB_CANT_SEND, /* class can't send and can't borrow */
@@ -136,9 +90,6 @@ enum htb_cmode {
 /* interior  leaf nodes; props specific to leaves are marked L: */
 struct htb_class
 {
-#ifdef HTB_DEBUG
-   unsigned magic;
-#endif
 /* general class parameters */
 u32 classid;
 struct gnet_stats_basic bstats;
@@ -238,7 +189,6 @@ struct htb_sched
 int nwc_hit;   /* this to disable mindelay complaint in dequeue */
 
 int defcls;/* class where unclassified flows go to */
-u32 debug; /* subsystem debug levels */
 
 /* filters for qdisc itself */
 struct tcf_proto *filter_list;
@@ -354,75 +304,21 @@ #endif
return cl;
 }
 
-#ifdef HTB_DEBUG
-static void htb_next_rb_node(struct rb_node **n);
-#define HTB_DUMTREE(root,memb) if(root) { \
-   struct rb_node *n = (root)-rb_node; \
-   while (n-rb_left) n = n-rb_left; \
-   while (n) { \
-   struct htb_class *cl = rb_entry(n, struct htb_class, memb); \
-   printk( %x,cl-classid); htb_next_rb_node (n); \
-   } }
-
-static void htb_debug_dump (struct htb_sched *q)
-{
-   int i,p;
-   printk(KERN_DEBUG htb*g j=%lu lj=%lu\n,jiffies,q-jiffies);
-   /* rows */
-   for (i=TC_HTB_MAXDEPTH-1;i=0;i--) {
-   printk(KERN_DEBUG htb*r%d m=%x,i,q-row_mask[i]);
-   for (p=0;pTC_HTB_NUMPRIO;p++) {
-   if (!q-row[i][p].rb_node) continue;
-   printk( p%d:,p);
-   HTB_DUMTREE(q-row[i]+p,node[p]);
-   }
-   printk(\n);
-   }
-   /* classes */
-   for (i = 0; i  HTB_HSIZE; i++) {
-   struct list_head *l;
-   list_for_each (l,q-hash+i) {
-   struct htb_class *cl = list_entry(l,struct 
htb_class,hlist);
-   long diff = PSCHED_TDIFF_SAFE(q-now, cl-t_c, 
(u32)cl-mbuffer);
-   printk(KERN_DEBUG htb*c%x m=%d t=%ld c=%ld pq=%lu 
df=%ld ql=%d 
-   pa=%x f:,
-   cl-classid,cl-cmode,cl-tokens,cl-ctokens,
-   cl-pq_node.rb_color==-1?0:cl-pq_key,diff,
-   
cl-level?0:cl-un.leaf.q-q.qlen,cl-prio_activity);
-   if (cl-level)
-   for (p=0;pTC_HTB_NUMPRIO;p++) {
-   if (!cl-un.inner.feed[p].rb_node) continue;
-   printk( p%d 
a=%x:,p,cl-un.inner.ptr[p]?rb_entry(cl-un.inner.ptr[p], struct 
htb_class,node[p])-classid:0);
-   HTB_DUMTREE(cl

[LARTC] [PATCH 6/6] htb: rbtree cleanup

2006-08-02 Thread Stephen Hemminger
Add code to initialize rb tree nodes, and check for double deletion.
This is not a real fix, but I can make it trap sometimes and may
be a bandaid for: http://bugzilla.kernel.org/show_bug.cgi?id=6681

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
---
 net/sched/sch_htb.c |   34 +++---
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 7853c6f..3f3e9df 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -366,7 +366,7 @@ static void htb_add_to_wait_tree(struct 
  * When we are past last key we return NULL.
  * Average complexity is 2 steps per call.
  */
-static void htb_next_rb_node(struct rb_node **n)
+static inline void htb_next_rb_node(struct rb_node **n)
 {
*n = rb_next(*n);
 }
@@ -388,6 +388,18 @@ static inline void htb_add_class_to_row(
}
 }
 
+/* If this triggers, it is a bug in this code, but it need not be fatal */
+static void htb_safe_rb_erase(struct rb_node *rb, struct rb_root *root)
+{
+   if (RB_EMPTY_NODE(rb)) {
+   WARN_ON(1);
+   } else {
+   rb_erase(rb, root);
+   RB_CLEAR_NODE(rb);
+   }
+}
+
+
 /**
  * htb_remove_class_from_row - removes class from its row
  *
@@ -401,10 +413,12 @@ static inline void htb_remove_class_from
 
while (mask) {
int prio = ffz(~mask);
+
mask = ~(1  prio);
if (q-ptr[cl-level][prio] == cl-node + prio)
htb_next_rb_node(q-ptr[cl-level] + prio);
-   rb_erase(cl-node + prio, q-row[cl-level] + prio);
+
+   htb_safe_rb_erase(cl-node + prio, q-row[cl-level] + prio);
if (!q-row[cl-level][prio].rb_node)
m |= 1  prio;
}
@@ -472,7 +486,7 @@ static void htb_deactivate_prios(struct 
p-un.inner.ptr[prio] = NULL;
}
 
-   rb_erase(cl-node + prio, p-un.inner.feed + prio);
+   htb_safe_rb_erase(cl-node + prio, p-un.inner.feed + 
prio);
 
if (!p-un.inner.feed[prio].rb_node)
mask |= 1  prio;
@@ -739,7 +753,7 @@ #define HTB_ACCNT(T,B,R) toks = diff + c
htb_change_class_mode(q, cl, diff);
if (old_mode != cl-cmode) {
if (old_mode != HTB_CAN_SEND)
-   rb_erase(cl-pq_node, q-wait_pq + cl-level);
+   htb_safe_rb_erase(cl-pq_node, q-wait_pq + 
cl-level);
if (cl-cmode != HTB_CAN_SEND)
htb_add_to_wait_tree(q, cl, diff);
}
@@ -782,7 +796,7 @@ static long htb_do_events(struct htb_sch
if (time_after(cl-pq_key, q-jiffies)) {
return cl-pq_key - q-jiffies;
}
-   rb_erase(p, q-wait_pq + level);
+   htb_safe_rb_erase(p, q-wait_pq + level);
diff = PSCHED_TDIFF_SAFE(q-now, cl-t_c, (u32) cl-mbuffer);
htb_change_class_mode(q, cl, diff);
if (cl-cmode != HTB_CAN_SEND)
@@ -1279,7 +1293,7 @@ static void htb_destroy_class(struct Qdi
htb_deactivate(q, cl);
 
if (cl-cmode != HTB_CAN_SEND)
-   rb_erase(cl-pq_node, q-wait_pq + cl-level);
+   htb_safe_rb_erase(cl-pq_node, q-wait_pq + cl-level);
 
kfree(cl);
 }
@@ -1370,6 +1384,8 @@ static int htb_change_class(struct Qdisc
 
if (!cl) {  /* new class */
struct Qdisc *new_q;
+   int prio;
+
/* check for valid classid */
if (!classid || TC_H_MAJ(classid ^ sch-handle)
|| htb_find(classid, sch))
@@ -1389,6 +1405,10 @@ static int htb_change_class(struct Qdisc
INIT_HLIST_NODE(cl-hlist);
INIT_LIST_HEAD(cl-children);
INIT_LIST_HEAD(cl-un.leaf.drop_list);
+   RB_CLEAR_NODE(cl-pq_node);
+
+   for (prio = 0; prio  TC_HTB_NUMPRIO; prio++)
+   RB_CLEAR_NODE(cl-node[prio]);
 
/* create leaf qdisc early because it uses kmalloc(GFP_KERNEL)
   so that can't be used inside of sch_tree_lock
@@ -1404,7 +1424,7 @@ static int htb_change_class(struct Qdisc
 
/* remove from evt list because of level change */
if (parent-cmode != HTB_CAN_SEND) {
-   rb_erase(parent-pq_node, q-wait_pq);
+   htb_safe_rb_erase(parent-pq_node, q-wait_pq);
parent-cmode = HTB_CAN_SEND;
}
parent-level = (parent-parent ? parent-parent-level
-- 
1.4.0

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo

[LARTC] HTB is buggy?

2006-07-28 Thread Stephen Hemminger
I believe there are some unresolved memory management issues with HTB.
It looks like deleting the qdisc is causing some use after free or
memory corruption problems.

See:
http://bugzilla.kernel.org/show_bug.cgi?id=6681

I don't use HTB so I have no idea if this a new or old problem.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] static linking of /usr/sbin/tc?

2006-07-26 Thread Stephen Hemminger
On Wed, 26 Jul 2006 19:25:00 +0200
Matthias Ferdinand [EMAIL PROTECTED] wrote:

 Hello,
 
 I am trying to revive an old linux server installation, which still has 
 libc5. Sadly, most current software does not compile anymore on this 
 system, including the tc utility. As with other tools (net-tools, 
 coreutils, procps etc.) I tried to compile and statically link 
 (LDFLAGS=-static) on a more recent linux machine and copy the static 
 binaries over to the old machine.
 
 But no luck with tc. Even on the host where I compiled it (Debian Sarge 
 3.1), the static binary (/usr/local/iproute2-2.6.16-060323/usr/sbin/tc) 
 does not see any qdisc:
 
 xoff:~# /sbin/tc qdisc ls dev eth0
 qdisc pfifo_fast 0: bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 
 xoff:~# /usr/local/iproute2-2.6.16-060323/usr/sbin/tc qdisc ls dev eth0
 qdisc pfifo_fast 0: [Unknown qdisc, optlen=20]
 
 The source code makes use of dlopen() / dlsym() functions, which may be the 
 reason for the failure. Does anybody know a way to make it work in a static 
 binary?


The dlopen() stuff is just to allow adding support for new qdisc's later.
It also is introspective, it is used to find the qdisc's that are statically
linked in.  Why bother updating it?

You could with some effort change tc to have a list of qdisc structure
pointers and change get_qdisc_kind to walk the list.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] how to debug RTNETLINK invalid argument?

2006-05-23 Thread Stephen Hemminger



the tc I am using is the standard tc, i didn't change anything about tc,
only trying to use a new custom qdisc with it... i'm not sure honestly,
theres no way to figure out why i'm getting the invalid argument?
  


A common problem is that some distro's put tc in /sbin and other's in 
/usr/sbin.

You may have the old version in you path.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] access control list equivalent on lunix

2006-05-18 Thread Stephen Hemminger
On Thu, 18 May 2006 04:03:33 +0530
Abhishek Misra [EMAIL PROTECTED] wrote:

 Hello,
 
 Please let me know if there is any thing equivalent to access control list
 for linux routers
 

Iptables
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [Netem] where i can find this netem patch?

2006-05-05 Thread Stephen Hemminger
On Fri, 05 May 2006 11:08:23 -0400
George Nychis [EMAIL PROTECTED] wrote:

 Hi,
 
 I need help finding this patch that Stephen made.
 
 He sent me a patch, but i do not think its related to the patch that
 solved this problem.  I will include the patch he did forward to me at
 the bottom.

 
 However here is the problem, i even rtied his misspelling of change :)

 thorium-ini 15849-tests # tc qdisc add dev ath0 root handle 1:0 netem
 drop 0%
 thorium-ini 15849-tests # tc qdisc add dev ath0 parent 1:1 handle 10:
 xcp capacity 54Mbit limit 500
 thorium-ini 15849-tests # tc qdisc change dev ath0 root handle 1:0 netem
 drop 1%
 RTNETLINK answers: Invalid argument


The problem was you are giving handle 1:0 so the change request was
going to xcp. And xcp doesn't understand netem rtnetlink message.

You want to do:
# tc qdisc change dev ath0 root netem drop 1%

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] how to change classful netem loss probability?

2006-04-28 Thread Stephen Hemminger
Loss was broken, patch sent.

The following works now:

# tc qdisc add dev eth1 root handle 1:0 netem loss 20%

# tc qdisc add dev eth1 parent 1:1 handle 10: tbf \
  rate 256kbit buffer 1600 limit 3000
# ping -f -c 1000 shell

1000 packets transmitted, 781 received, 21% packet loss, time 3214ms
rtt min/avg/max/mdev = 0.187/0.398/3.763/0.730 ms, ipg/ewma 3.217/0.538 ms

# tc qdisc chang dev eth1 handle 1: netem loss 1%
# ping -f -c 1000 shell

1000 packets transmitted, 990 received, 1% packet loss, time 2922ms
rtt min/avg/max/mdev = 0.187/2.739/3.298/0.789 ms, ipg/ewma 2.924/2.084 ms


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: created new q_disc, inserted module, tc tells me unknown qdisc

2006-04-11 Thread Stephen Hemminger
On Mon, 10 Apr 2006 21:41:39 -0400 (EDT)
George P Nychis [EMAIL PROTECTED] wrote:

 Hi,
 
 I am trying to install a proprietary qdisc made for research, it is not 
 publically released yet, however its been used several times so i know it 
 works.
 
 The files included are:
 q_xcp.c:
static int xcp_parse_opt()
static int xcp_print_opt()
static int xcp_print_xstats()
struct qdisc_util xcp_util = { NULL, xcp . };
 
 sch_xcp.c:
static int xcp_enqueue()
static int xcp_requeue()
static struct sk_buff * xcp_dequeue()


struct Qdisc_ops xcp_qdisc_ops ={ NULL,NULL,xcp, };
 
printk(KERN_INFO XCP qdisc module loaded.\n);
return register_qdisc(xcp_qdisc_ops);
 
 
 So, i make everything successfully, it creates q_xcp.so and copies it to 
 /usr/lib and sch_xcp.o which it copies to /lib/modules/... so then I insmod 
 sch_xcp and i see in dmesg:
 XCP qdisc module loaded.
 
 I then try:
 tc qdisc add dev eth0 root xcp capacity 10Mbit limit 500 and get:
 Unknown qdisc xcp, hence option capacity is unparsable
 
 So then I read the INSTALL further to find some sort of solution and it 
 mentions:
 This again assumes tc version is 2.4.7.  If your tc is a different
 version, download the iproute2 source code, and edit Makefile to
 point TC_INCLUDE to -I/iproute2/include -I/iproute2/tc
 
 So, i did that, and i recompiled the q_xcp.so:
 lanthanum-ini src-1.0.1 # make q_xcp.so
 cc -O2 -fPIC 
 -I/var/tmp/portage/iproute2-2.6.11.20050310-r1/work/iproute2-2.6.11/include/ 
 -I/var/tmp/portage/iproute2-2.6.11.20050310-r1/work/iproute2-2.6.11/tc_include
  -o q_xcp.o -c q_xcp.c
 ld -shared -o q_xcp.so q_xcp.o
 rm -f q_xcp.o
 
 But i still get the same error so then my very final last effort was to 
 move q_xcp.c to my iproute2 source code tc/ directory and added this to the 
 makefile:
 TCMODULES += q_xcp.o
 
 Then I compiled tc, and i check tc to see if the xcp qdisc functions were 
 loaded:
 lanthanum-ini tc # nm tc | grep xcp
 080531ec t xcp_parse_opt
 080533e0 t xcp_print_opt
 08053426 t xcp_print_xstats
 08070cc0 D xcp_util
 
 And finally:
 lanthanum-ini tc # ./tc qdisc add dev ath0 root xcp capacity 54Mbit limit 500
 Unknown qdisc xcp, hence option capacity is unparsable
 
 
 I have no clue :(  I figured that putting the .so into /usr/lib would have 
 been enough.  Sorry for the long e-mail, I hope someone can help, and thank 
 you for your time even if you don't know the solution but read this :)
 
 - George
 

The .so needs to go in /usr/lib/tc (assuming you are running relatively recent 
version
of iproute2 tools).

Read source to tc.c where it calls dlopen.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] tc patched doesn't work with WFQ

2006-04-03 Thread Stephen Hemminger
On Mon, 03 Apr 2006 09:25:04 +0200
Julien Bisconti [EMAIL PROTECTED] wrote:

 
 
 gypsy wrote:
  Julien Bisconti wrote:
  Hi,
 
  I was searching for few days in this mailing list but I didn't find how to 
  solve my tc problem.
  Feel free to ask me more details if you think there are relevant.
 
  I'm using a Gentoo 2.4.32-gentoo-r2 and I'm trying to test a *weighted 
  fair queuing* (WFQ)
  implementation. See http://home.sch.bme.hu/~tusi/wfq/
 
  I patched the kernel and loaded the sch_wfq module, I patched iproute2/tc 
  and compile everything.
  
  I think you will find that the patch to iproute2 is too old.  The
  iproute used to create it has a date in year 2000 and iproute2 has
  changed substantially since then.
 
 Thank you so MUCH!!!
 
  
  I suggest you contact the author and request a new patch.
 
 I sent him email but no reply so far. I think I'm going to do it by myself.
 
 Thank you again.
 
 Julien

Also, since tc supports shared libraries for additional queue disciplines. You 
could
set it up to build a .so and put in /usr/lib/tc. Then you wouldn't need to 
rebuild
all of iproute2.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2 2.6.16-060323

2006-03-23 Thread Stephen Hemminger
New version of iproute2 is available. No major changes, mostly just
small bug fixes.

http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.16-060323.tar.gz

James Lentini
   Increase size of hw address allowed for ip neigh to allow for IB.

Russell Stuart
   Fix missing memset in tc sample
   Add sample divisor

Alpt
   Add more rt_proto values

Dale Sedivec
   Warn when using handle instead of classid with tc class

Jean Tourrilhes
   Fix endless loop in netlink error handling

Stephen Hemminger
   Change default lnstat count to 1
   Update to 2.6.16 headers
   Add fake version of include/linux/socket.h to fix warnings


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [iproute2] IPoIB link layer address bug

2006-03-21 Thread Stephen Hemminger
On Thu, 16 Mar 2006 17:24:41 -0500 (EST)
James Lentini [EMAIL PROTECTED] wrote:

 
 The ip(8) command has a bug when dealing with IPoIB link layer 
 addresses. Specifically it does not correctly handle the addition of 
 new entries in the neighbor/arp table. For example, this command will 
 fail:
 
 ip neigh add 192.168.0.138 lladdr 
 00:00:04:04:fe:80:00:00:00:00:00:00:00:01:73:00:00:00:8a:91 nud permanent dev 
 ib0
 
 An IPoIB link layer address is 20-bytes (see 
 http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-09.txt,
  
 section 9.1.1).
 
 The command line parsing code expects link layer addresses to be a 
 maximum of 16-bytes. Addresses over 16-bytes are truncated.
 
 This patch (against the iproute2 cvs repository) fixes the problem:
 

Okay, but there are number of other places in iproute2 that call ll_addr_a2n()
with ifr.ifr_hwaddr.sa_data. And that is 14 bytes.  If you want to fix those
it will be harder since it would increase the sizeof(struct sockaddr) and 
potentially
break compatibility.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [PATCH] TC: bug fixes to the sample clause

2006-03-13 Thread Stephen Hemminger
On Mon, 13 Mar 2006 18:55:35 +0100
Patrick McHardy [EMAIL PROTECTED] wrote:

 jamal wrote:
  On Mon, 2006-13-03 at 14:44 +1000, Russell Stuart wrote: 
  
 You are wrong on both counts.
  
  
  I am wrong on why it is being rejected - but what you are seeing is
  worse than i thought initially. 
  
  Lets put it this way:
  The only you will _ever_ get that message is if you had made a syntax
  error (which you did not). Please look at the code on where that message
  appears and:
  
  a) tell me how you would have got that message to begin with using
  perfectly legal syntax.
  a) tell me how a memset would have fixed that.
 
 He already told you, pack_key expects the selector to be initialized,
 otherwise nkeys might contain a value = 128, which would cause
 exactly this error, if a matching key is not found within the
 uninitialized memory by accident.
 
  Just send the memset fix to Stephen with a different reason. Your
  current reason is _wrong_ and i really dont have much time to have this
  kind of discussion.  
  If you had said I added that memset there because it looks like the
  right thing to do then we would not have had this discussion.
  
  You made claims you fixed a bug. It cant possibly be the bug you fixed.
  Was it some other bug perhaps and you mixed up the two?

The memset fix is in current CVS. I just wasn't going to take the
patch that looked at utsname to decide what hash to use.

 The patch as well as the description are perfectly fine.
 
 BTW, running valgrind on tc shows lots of uses of uninitialized values,
 it seems like a good idea if someone would go over these and fix them
 up.

If we had a test script of commands (code coverage), that would help.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [PATCH] TC: bug fixes to the sample clause

2006-03-13 Thread Stephen Hemminger
On Tue, 14 Mar 2006 07:43:57 +1000
Russell Stuart [EMAIL PROTECTED] wrote:

 On Mon, 2006-03-13 at 10:04 -0800, Stephen Hemminger wrote:
  The memset fix is in current CVS. I just wasn't going to take the
  patch that looked at utsname to decide what hash to use.
 
 Stephen, could you describe your objections to it please?
 

Because it means that the API for netlink isn't being used properly.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Patch to allow for the ATM cell tax

2006-03-02 Thread Stephen Hemminger
On Fri, 03 Mar 2006 08:18:52 +1000
Russell Stuart [EMAIL PROTECTED] wrote:

 On Thu, 2006-03-02 at 14:51 +0100, Markus Schulz wrote:
   Why you don't use the existing overhead parameter? It's useless to
   have two parameters which do the exact same thing (existing overhead
   and your atm).
   Only ATM Cell alignment must be added to rate table calculation.
 
 The overhead and atm options don't do the exact same 
 thing.  If the atm option is present, tc includes the
 atm cell alignment overheads in the rate table
 calculation.  Otherwise it doesn't.
 
 As atm cell overheads aren't a fixed amount (they vary
 in a non-linear fashion between 6 and 202 bytes), you
 can't use the overhead option to calculate them.
 
  But it would be nice if this would be patched into upstream iproute 
  source. Then there is no need of patching for qos at adsl links.
 


I will put it in iproute2 commands when a definitive set of patches
is sent to me. So far, it still looks like it needs some fine tuning.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] LARTC wiki site?

2005-12-07 Thread Stephen Hemminger
On Wed, 07 Dec 2005 16:38:11 +0100
Sophana Kok [EMAIL PROTECTED] wrote:

 Hi
 
 What about a wiki site on the lartc.org website?
 Or a faq manager?
 There are a lot of applications that should be out of the lartc document 
 and that can be in a wiki.
 

Or add to existing wiki at http://linux-net.osdl.org
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Pfifo_fast Unknown qdisc and asking for basic design advice

2005-11-21 Thread Stephen Hemminger
On Fri, 11 Nov 2005 09:50:03 -
Mark Lidstone [EMAIL PROTECTED] wrote:

 Hi all,
 
 I've done a search through the archives but I can't find a
 cause/solution to this.
 
 I'm running a FC4 box with the stock 2.6.12 kernel and a FC2 box with a
 stock 2.6.9 kernel.  I'm obviously using
 iproute2 and the patched tc.
 
 When I clear down the qdiscs with tc qdisc del dev DEV root I get
 the following in response to tc qdisc:
 
   qdisc pfifo_fast 0: dev eth0 [Unknown qdisc, optlen=20]
   qdisc pfifo_fast 0: dev eth1 [Unknown qdisc, optlen=20]
 

Current versions of iproute2 know about pfifo_fast.

 Unfortunately I cannot add pfifo_fast as a queue type (I was hoping to
 use one - see below).  Have I missed something?

pfifo_fast is only suitable as a baseline with no other qdisc's
involved. It can only sit directly on the device (at the bottom).
It shouldn't be that much faster than doing it with prio and fifo for
most things. The additional overhead of prio and fifo are mostly because
they are in separate modules and that adds some memory locality penalty.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] HTB classid problem

2005-11-21 Thread Stephen Hemminger
On Mon, 21 Nov 2005 16:22:17 -0800 (PST)
weihua zhang [EMAIL PROTECTED] wrote:

 Hey, everyone, I am kindda newbie to this subject, so I just post my problem 
 directly, please let me know if anything is wrong.

   in my config file
   when I use 
   tc class add dev eth1 parent 1:11 classid 1:11016 htb rate 512kbit burst 10k

   everything works correctly

   but...when classid goes larger than 1:1, eg:
   tc class add dev eth1 parent 1:21 classid 1:21006 htb rate 256kbit burst 10k
   it thows out RTNETLINK answers: Invalid argument

   I am using Fedora core 3 and what I am trying to do here is regulating each 
 mac's
   packets attached under access point. so basiclly parent 1:21 stands for an 
 access point, and 1:21xxx stands for one device id attached to it. originally 
 we had no more 
   than 50 macs per AP, eg:  1:2101 for upload, 1:2102 for download per mac 
 address.
   so 1:21xx can cover 50 macs. 

   now when I want to add more than 50 macs under one AP, the classid pattern 
 needs to be updated. it's very strange to me that when I updated all classid 
 to cover 500 macs per AP,  eg: 1:21xxx, it throws out invalid argument error, 
 but it works fine when classid was below 1:1.

   hope I stated this problem clearly.
   thanks ahead for the help.


Some non-obvious things about classid's.
* Tc parses classid's in hex (base 16) by default.
* Classid's are usually split into a major and minor part by the colon(:)
* The maximum value (hard coded into the the packet scheduler API) is 16 bits 
for each; ie.
  16 bits for minor number.

Why not just use some shell functions to encode the access point to class id 
mapping
more densely?
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [ANNOUNCE] iproute2 version (050929)

2005-10-12 Thread Stephen Hemminger
On Mon, 10 Oct 2005 20:31:31 -0400
jamal [EMAIL PROTECTED] wrote:

 On Mon, 2005-10-10 at 16:16 -0700, Stephen Hemminger wrote:
 
  Look like the -batch code that keeps the RTNL handle open was
  breaking this.  The patch shows the general idea, but it still has
  problems because I think it would still not work if used in
  -batch situation.
 
 I see what you mean.
 You definitely need at least one extra socket for deleting
 in the flush_rule(). Something like the attached, untested,
 uncompiled.
 
 
 Krzysztof, if you have time please try the attached patch?
 
 cheers,
 jamal

applied to iproute2 cvs

-- 
Stephen Hemminger [EMAIL PROTECTED]
OSDL http://developer.osdl.org/~shemminger
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [ANNOUNCE] iproute2 version (050929)

2005-10-10 Thread Stephen Hemminger
On Mon, 10 Oct 2005 12:34:51 +0200 (CEST)
Krzysztof Oledzki [EMAIL PROTECTED] wrote:

 
 
 On Wed, 5 Oct 2005, Stephen Hemminger wrote:
 
  On Sat, 1 Oct 2005 23:34:25 +0200 (CEST)
  Krzysztof Oledzki [EMAIL PROTECTED] wrote:
 
 
 
  On Fri, 30 Sep 2005, Stephen Hemminger wrote:
 
  There is an new minor update to iproute2 utilities available:
http://developer.osdl.org/dev/iproute2/download/iproute2-050929.tar.gz
 
 
  It hangs on ip rule flush. Tested on 2.6.13.2.
 
 
  Best regards,
 
 
 Krzysztof Olędzki
 
  Fixed by this patch (in next release)
 
 Not sure... Just checked iproute2-ss051007 and it still hangs on ip rule 
 flush with ~100% cpu load.
 

Are you running as root? If not it will loop forever.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [ANNOUNCE] iproute2 version (050929)

2005-10-10 Thread Stephen Hemminger
On Mon, 10 Oct 2005 16:37:00 -0400
jamal [EMAIL PROTECTED] wrote:

 On Mon, 2005-10-10 at 22:08 +0200, Krzysztof Oledzki wrote:
  
 
  
   Why are you trying to flush those tables?
  To install a new set of rules.
  
 
 
 flush should kill everything if i am not mistaken. 
 Are you replacing the main table etc as well?
 
   Try to downgrade the kernel and see what happens - go as far as 2.6.12
  But why? It works with older (ss050330) version of iproute2 even on 
  2.6.13.3.
  
 
 Ok, sorry i wasnt aware of that. Try the attached patch.
 
 cheers,
 jamal

Look like the -batch code that keeps the RTNL handle open was
breaking this.  The patch shows the general idea, but it still has
problems because I think it would still not work if used in
-batch situation.

-- 
Stephen Hemminger [EMAIL PROTECTED]
OSDL http://developer.osdl.org/~shemminger
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2 (051007)

2005-10-07 Thread Stephen Hemminger
Fix one serious bug (in libnetlink), and a couple of other minor
patches.

http://developer.osdl.org/dev/iproute2/download/iproute2-051007.tar.gz

Stephen Hemminger
 Reenable ip mroute

Mike Frysinger
Handle pfifo_fast that has no qopt without segfaulting

Mads Martin Joergensen
Trivial netem ccopts

Jerome Borsboom
Fix regression in ip addr (libnetlink) handling


-- 
Stephen Hemminger [EMAIL PROTECTED]
OSDL http://developer.osdl.org/~shemminger
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] iproute2-050929 ERORR compiling

2005-10-05 Thread Stephen Hemminger
On 05 Oct 2005 09:47:43 +0200
Krzysiek [EMAIL PROTECTED] wrote:

  There are two different problems. The first is arpd needs the dbm library
  (usually dbm-devel on most distros). Or you can just ignore the problem
  if you don't run arpd
  
  The second is problems with building the new ematch grammar stuff. I
  don't
  have an easy fix for this, but you could try a newer version of
  bison/flex.
 
 There is easy workaround regarding flex. The newest version doesn't work. I 
 had the same problem - and i had recent versions of flex, bison etc. It works 
 if you remove recent flex and install older vesion: 
 http://prdownloads.sourceforge.net/lex/flex-2.5.27.tar.bz2?download

There was some discussion with the Redhat and Suse maintainers when
Thomas added the ematch stuff. The problem is that the new flex is not
backwards compatible, so the distro's aren't switching yet.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [ANNOUNCE] iproute2 version (050929)

2005-10-05 Thread Stephen Hemminger
On Sat, 1 Oct 2005 23:34:25 +0200 (CEST)
Krzysztof Oledzki [EMAIL PROTECTED] wrote:

 
 
 On Fri, 30 Sep 2005, Stephen Hemminger wrote:
 
  There is an new minor update to iproute2 utilities available:
  http://developer.osdl.org/dev/iproute2/download/iproute2-050929.tar.gz
 
 
 It hangs on ip rule flush. Tested on 2.6.13.2.
 
 
 Best regards,
 
 
   Krzysztof Olędzki

Fixed by this patch (in next release)

==

When assigning an ip address to an ethernet adapter, the newest 
(050929) version of 'ip addr' hangs while older versions worked. 
The problem was traced to be a removed initialisation. The patch 
below corrects this problem.

Regards,
Jerome Borsboom

--- iproute2-050929/lib/libnetlink.c2005-09-21 21:33:18.0 +0200
+++ iproute2-050929/lib/libnetlink.c2005-10-04 13:42:30.0 +0200
@@ -235,7 +235,10 @@
unsigned seq;
struct nlmsghdr *h;
struct sockaddr_nl nladdr;
-   struct iovec iov;
+   struct iovec iov = {
+   .iov_base = (void*)n,
+   .iov_len = n-nlmsg_len
+   };
struct msghdr msg = {
.msg_name = nladdr,
.msg_namelen = sizeof(nladdr),

-- 
Stephen Hemminger [EMAIL PROTECTED]
OSDL http://developer.osdl.org/~shemminger
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] HOWTO unmaintained?

2005-10-05 Thread Stephen Hemminger
On Wed, 05 Oct 2005 16:18:24 -0700
noc ops [EMAIL PROTECTED] wrote:

 Does anyone know where we stand with lartc howto?
 
 
 regards,
 /virendra
 
 Stephen Hemminger wrote:

The new wiki 
http://linux-net.osdl.org
is available and you are welcome to put it there.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] iproute2-050929 ERORR compiling

2005-10-04 Thread Stephen Hemminger
There are two different problems. The first is arpd needs the dbm library
(usually dbm-devel on most distros). Or you can just ignore the problem
if you don't run arpd

The second is problems with building the new ematch grammar stuff. I don't
have an easy fix for this, but you could try a newer version of bison/flex.

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] ip address delete bug?

2005-10-04 Thread Stephen Hemminger
Current versions of iproute2 display the following:

Warning: Executing wildcard deletion to stay compatible with old scripts.
 Explicitly specify the prefix length (192.168.a.b/32) to avoid this 
warning.
 This special behaviour is likely to disappear in further releases,
 fix your scripts!
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2 version (050929)

2005-09-30 Thread Stephen Hemminger
There is an new minor update to iproute2 utilities available:
http://developer.osdl.org/dev/iproute2/download/iproute2-050929.tar.gz

Also, this (and future) releases are now signed, for key info read:
http://developer.osdl.org/dev/iproute2/signature.html

[Stephen Hemminger]
Fix uninitialized memory and leaks
Add -batch option to ip.
Update to 2.6.14 headers

[Arnaldo]
Integrate support for DCCP into 'ss'

[Mike Frysinger]
Fix build issues with netem tables (parallel make and HOSTCC)

[Eric Dumazet]
Fix lnstat : First column should not be summed


-- 
Stephen Hemminger [EMAIL PROTECTED]
OSDL http://developer.osdl.org/~shemminger
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] HOWTO unmaintained?

2005-08-19 Thread Stephen Hemminger
On Thu, 18 Aug 2005 14:00:30 +0100
Ed W [EMAIL PROTECTED] wrote:

 
 I wonder if someone would host a mediawiki and consider uploading the 
 documentation there.  This would make it easier for people to 
 contribute, and I think it shold be fairly easy to convert from it's 
 current format to a wiki
 
 
 
 
 Good idea, I'll see if the OSDL will put up a wiki for it
 on developer.osdl.org, stay tuned.
   
 
 
 Can I suggest that you look very hard at Mediawiki (ie as per 
 wikipedia).  It's built for scalability, is really easy to edit, very 
 actively maintained, and has all the distributed stuff built in if you 
 really needed to spread the load over several machines.  All in all a 
 very grown up documentation tool.  Oh and it's also multi-lingual so it 
 might also be possible to use it to help with the translation issues
 
 I mainly mentioned it because I'm sure there are some tools for 
 converting the current lartc faq up to the wiki format and obviously 
 that's the first main step.
 
 If someone will host it then I have some experience maintaining a 
 mediawiki site and could probably help out some

Okay, if the lartc.org guys don't pick it up, I'll setup a mediawiki
when I get back from holiday.  For an example see:
http://wiki.linux-nfs.org


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] HOWTO unmaintained?

2005-08-17 Thread Stephen Hemminger
On Wed, 17 Aug 2005 12:28:10 +0100
Ed W [EMAIL PROTECTED] wrote:

 
 I guess the obvious question then is: How do we get it maintained?
 
 Does anyone know where the current maintainers have disappeared?
 
 Is anyone willing to take over that job?
   
 
 
 I wonder if someone would host a mediawiki and consider uploading the 
 documentation there.  This would make it easier for people to 
 contribute, and I think it shold be fairly easy to convert from it's 
 current format to a wiki
 

Good idea, I'll see if the OSDL will put up a wiki for it
on developer.osdl.org, stay tuned.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2 util update

2005-08-16 Thread Stephen Hemminger
http://developer.osdl.org/dev/iproute2/download/iproute2-050816.tar.gz

Update to iproute2 to include:
* Limit ip neigh flush to 10 rounds
* tc ematch support (thomas)
* build cleanups (thomas, et al)
* Fix for options process with ipt (jamal)
* Fix array overflow in paretonormal distribution build
* Update include files to 2.6.13
* Decnet doc update (Steven Whithouse)

Note: the ematch support won't build on really old versions of bison (1.28),
  but the kernel on those systems wouldn't support it anyway.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Latency of Linux Bridge

2005-07-22 Thread Stephen Hemminger
On Fri, 22 Jul 2005 09:55:25 +0200
Christian Konecny (VI/SEA) [EMAIL PROTECTED] wrote:

 Hi there!
 
 I am working a lot with VoIP in my company, so I thought to use linux
 bridge functionality together with tc to emulate delay, jitter,
 packet loss, duplication, reordering etc. for testing purposes in our
 lab against our VoIP products. I just recognized, that a basic bridge
 just with it's minumum configuration of 2 network interfaces creates
 latency of approx. 5ms on very low traffic. This seems to be
 independent on CPU speed. I tried on 2 GHz PC while having just
 64kBit traffic with packet size of about 300bytes. I am using Knoppix
 3.82 which is actually a debian Live-CD Linux, Kernel 2.6.11. For
 some reason they put iproute2 041019 on this distro, which is
 intended to be used for kernel 2.6.9. I am aware of remastering the
 CD, but have to check if it is possible to recompile the kernel for
 the remaster.
 
 back to my question: where does this latency come from?
 top shows almost no load while the bridge is handling traffic, so
 how come? is there some timer-granularity which can be set in the
 kernel, is the latency normal, or what could cause it else?
 
 Thank you very much in advance!
 
 /Christian

What hardware, and setup scripts?
If you are using netem then it can add latency.  The amount depends
on the requested delay and the HZ value of the kernel and the choice
of PSCHED_CLOCK_SOURCE in the kernel configuration. 
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] linux bridging problem: how to emulate 2 separate interfaces on a single one?

2005-07-01 Thread Stephen Hemminger
On Fri, 01 Jul 2005 11:59:08 +0200
Antonio Pinizzotto [EMAIL PROTECTED] wrote:

 
 Hi all.
 
 I would need to use a single physical interface on a Linux box to manage 
 two different IP addresses (belonging to two separate logical subnets) 
 with two different MAC address. (I need to emulate te presence of two 
 separate physical interfaceses for a PC on the same LAN, at layer 2 and 
 layer 3).
 
 Is it possible to use the linux ethernet bridging code and two tap 
 interfaces for this purpose?
 
 
 Here is a picture of what I need to do.
 
 
   LAN__
  |
  | eth0 (no IP)
  |
 | |
 |   br0   |
 | (no IP) |
 |_|
tap0  || tap1
 192.168.40.1/24 || 192.168.30.1/24
MAC_0 || MAC_1
__||__
   |  |
   |  PC  |
   |  |
   |__|
 
 
 I would need this picture to be equivalent to this one:
 
 
   LAN__
eth0  || eth1
 192.168.40.1/24 || 192.168.30.1/24
MAC_0 || MAC_1
__||__
   |  |
   |  PC  |
   |  |
   |__|
 
 
 I tried but it doens't work. I don't know if it's not contemplate or if 
 I did a wrong configuration.
 For example, on tap0, using tcpdump, I see all the L2 broadcast frames 
 going on the LAN; but on the counters of ifconfig tap0 all of them are 
 considered dropped. No packet is counted as transmitted or received, 
 also if I try to ping from or to tap0.
 The tap interface starts to transmit/receive pachets only if it is 
 connected to some process like qemu or openvpn.
 Maybe, it is not possibile for tap interface to be used directly by the 
 linux os?



Stop abusing bridging.  People keep trying these wacky multiple
network things and they won't work. Bridging really can't handle anything
with multiple interfaces that could possibly create a forwarding loop.


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [PATCH] Support module autoloading in iproute2

2005-06-07 Thread Stephen Hemminger
Okay, I added the same effective hook but using if_nametoindex()
and without the vanity comment.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2-ss050607

2005-06-07 Thread Stephen Hemminger
Small update to iproute2, I have been waiting to get a CVS conversion
completed and working on other things so changes are small.
http://developer.osdl.org/dev/iproute2/download/iproute2-ss050607.tar.gz

Stephen Hemminger 
* Fix 'ip link' map to handle case where device gets autoloaded
  by using if_nametoindex as fallback
* Device indices are unsigned not int.

Masahide NAKAMURA 

* [ip] show timestamp when using '-t' option.
* [ip] remove duplicated code for expired message of xfrm.
* [ip] add deleteall command for xfrm;
  flush uses kernel's flush interface and
  deleteall uses legacy iproute2's flush feature like
   getting-and-deleting-for-each.

This is the first export from the CVS repo, so let me know if there
are any quirks.
If you have something you want to see in the next release and it isn't
there please resend.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [PATCH] Support module autoloading in iproute2

2005-06-02 Thread Stephen Hemminger

Use module aliases and the kernel will do the autoloading.
Most distros add something like:
alias eth0 e100
to /etc/modprobe.conf

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] compile error while patching iproute2 with esfq

2005-05-27 Thread Stephen Hemminger

  Does anybody know what this mean?

 Yeah, I know what it means.

You need to make the rtnetlink.h file that is included from the build (usually 
include/linux/rnetlink.h)
include the esfq stuff.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Qdisc requeue should be void?

2005-05-13 Thread Stephen Hemminger
There is an design problem with the qdisc interface that causes qlen related 
bugs
in netem, tbf, and other qdisc's that peek at the top of the queue. The problem 
is
that requeue needs to be called from the dequeue function but requeue can fail.
If requeue fails, then the calling qdisc can not properly handle the error.  If 
it
returns NULL, then the parent's expectation about qlen gets messed up.

Example:

prio (qlen = 1)
skb = netem dequeue 
skb = htb dequeue 
... decides not to send this skb now
htp requeue(skb) fails
?? what now 
--netem.qlen // := 0
return NULL
 skb is NULL

at this point prio qlen is 1 but underlying queue's are empty.

My proposal is to require requeue to always succeed and change it to be
void instead of returning int.


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] pfifo_fast error message

2005-05-10 Thread Stephen Hemminger
gypsy wrote:

Victor Yeo wrote:
  

the problem is after i delete the qdisc, and check again, there is nothing
being displayed. Is this correct?

#tc qdisc del root dev eth0

#tc qdisc show dev eth0



tc qdisc show dev eth0 returns:

qdisc pfifo_fast 0: bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

If you see anything else, then I'd say you have a problem.
--
gypsy

  

 Older versions of the iproute2 tools didn't know anything about pfifo_fast,
it would even core dump sometimes. This was one of the first bugs I fixed
about a year ago
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] How to read the TCP congestion window (cwnd) on Linux?

2005-05-04 Thread Stephen Hemminger
On Wed, 4 May 2005 00:54:23 -0700 (PDT)
Sorin S. [EMAIL PROTECTED] wrote:

 Hi Stephen, 
 Is this tcpprobe intended for 2.4 kernel?

no, it was built for 2.6.  It could work in 2.4, but you would need
to dig up an old kprobes patch for 2.4 (from ibm), and do some simple
tweaks to the socket to tcp cb mapping.

 
 This is what I get against a 2.6.8-24 kernel: 

some internal changes to data structures happened about 2.6.10, no big
deal look at tcp_input.c you'll see how the macros are different

Does that kernel have kprobes?
 
 
 /home/ssuciu/tcpprobe/tcpprobe.c: In function
 `jtcp_sendmsg':
 /home/ssuciu/tcpprobe/tcpprobe.c:81: warning:
 initialization from incompatible pointer type
 /home/ssuciu/tcpprobe/tcpprobe.c:83: error: structure
 has no member named `snd_nxt'
 /home/ssuciu/tcpprobe/tcpprobe.c:83: error: structure
 has no member named `snd_una'
 /home/ssuciu/tcpprobe/tcpprobe.c:84: error: structure
 has no member named `snd_cwnd'
 /home/ssuciu/tcpprobe/tcpprobe.c:84: warning: passing
 arg 1 of `tcp_current_ssthresh' from incompatible
 pointer type
 /home/ssuciu/tcpprobe/tcpprobe.c:85: error: structure
 has no member named `snd_wnd'
 /home/ssuciu/tcpprobe/tcpprobe.c: In function
 `jtcp_recvmsg':
 /home/ssuciu/tcpprobe/tcpprobe.c:100: warning:
 initialization from incompatible pointer type
 /home/ssuciu/tcpprobe/tcpprobe.c:104: error: structure
 has no member named `rcv_nxt'
 /home/ssuciu/tcpprobe/tcpprobe.c:104: warning: passing
 arg 1 of `tcp_receive_window' from incompatible
 pointer type
 make[2]: *** [/home/ssuciu/tcpprobe/tcpprobe.o] Error
 1
 make[1]: *** [_module_/home/ssuciu/tcpprobe] Error 2
 make[1]: Leaving directory `/usr/src/linux-2.6.8-24'
 
 Cheers,
 Sorin
 
 
 --- Stephen Hemminger [EMAIL PROTECTED] wrote:
  On Mon, 02 May 2005 19:22:17 +0200
  Antonio Pinizzotto [EMAIL PROTECTED]
  wrote:
  
   
   Hi everybody.
   Do you know about any way to read the TCP cwnd
  value (congestion window) 
   on Linux?
   
   I have read that on Linux it is not possible to
  enable a socket option 
   (to read to cwnd using the program trpt).
   
   Any way to read the cwnd would be good for me.
   
   thanks
   
   Antonio
  
  I whipped together a hack using kprobe's to get
  graphs for TCP testing.
  You can download it from
 
 http://developer.osdl.org/shemminger/prototypes/tcpprobe.tar.gz
  ___
  LARTC mailing list
  LARTC@mailman.ds9a.nl
 
 http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
  
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [Netem] using tc as a function call

2005-05-03 Thread Stephen Hemminger
On Mon, 2 May 2005 19:37:42 -0700 (PDT)
js si [EMAIL PROTECTED] wrote:

 i wrote a C++ program that executes tc using the
 std::system call. this fairly reduces the performance
 if many tc calls are required. 
 i want to be able to rename tc's main function to
 tc_main and pass argv and argc. has someone done
 something like this? please let me know how i can
 compile for netem. 

You might want to look into libipq as a simpler programmatic interface to
iproute
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] LOADBALANCING+BRIDGING---is it possible on the same machine??

2005-05-03 Thread Stephen Hemminger
On Thu, 14 Apr 2005 20:16:55 +0100 (BST)
KartheeK [EMAIL PROTECTED] wrote:

 
 Hello All,
 I have a linux box running with three NIC's, I have used brctl tool to 
 configure this box as a bridge, i have given it ONE logical ipaddres, Every 
 thing is working fine, but now i am required to configure the same bridge as 
 a LOAD BALANCER
 On some googling i found the following link
 
 http://lartc.org/howto/lartc.rpdb.multiple-links.html
 
 This HOWTO requires me to have one ip address for each NIC, while i dont in 
 my case...
 Now, is BRIDGING+LOAD BALANCING possibe on the same machine???
 
 Any sort of inputs regarding the matter is most welcome
 
 Thanx in advance
 KARTHEEK

It is not possible to load balance with a bridge because bridging constructs a 
spanning tree. If you are doing load balancing you want bonding not bridging.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] How to read the TCP congestion window (cwnd) on Linux?

2005-05-03 Thread Stephen Hemminger
On Mon, 02 May 2005 19:22:17 +0200
Antonio Pinizzotto [EMAIL PROTECTED] wrote:

 
 Hi everybody.
 Do you know about any way to read the TCP cwnd value (congestion window) 
 on Linux?
 
 I have read that on Linux it is not possible to enable a socket option 
 (to read to cwnd using the program trpt).
 
 Any way to read the cwnd would be good for me.
 
 thanks
 
 Antonio

I whipped together a hack using kprobe's to get graphs for TCP testing.
You can download it from 
http://developer.osdl.org/shemminger/prototypes/tcpprobe.tar.gz
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] [ANNOUNCE] ESFQ for Linux 2.6.12-rc1

2005-04-06 Thread Stephen Hemminger
On Wed, 06 Apr 2005 09:22:13 +0100
Andy Furniss [EMAIL PROTECTED] wrote:

 Corey Hickey wrote:
  http://fatooh.org/esfq-2.6/
  http://fatooh.org/esfq-2.6/esfq-2.6.12-rc1.tar.gz
  
  This version no longer interferes with the original SFQ; unlike previous
  versions, you can still use an unpatched tc with SFQ. Patching tc is
  still needed for ESFQ, though. I've tested this patch with Linux 2.6.11
  as well.
  
  Please tell me if you have any problems. I'm subscribed to lartc again.
 
 Thanks Corey - maybe this version will get in kernel one day.

It will if someone submits it for review to [EMAIL PROTECTED]
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: [Netem] netem with prio hangs on duplicate

2005-04-06 Thread Stephen Hemminger
Try this alternative, it changes where netem does the delaying and doesn't
do queuing in the timer routine.  It is stable for the basic tests, but I still 
consider
it experimental and needs more testing.

Patch against the version of sch_netem.c in 2.6.12-rc2

--- linux-2.6.12-rc2/net/sched/sch_netem.c  2005-04-04 09:39:41.0 
-0700
+++ netem-2.6.12-rc2/net/sched/sch_netem.c  2005-04-06 15:39:16.0 
-0700
@@ -138,38 +138,78 @@ static long tabledist(unsigned long mu, 
 }
 
 /* Put skb in the private delayed queue. */
-static int delay_skb(struct Qdisc *sch, struct sk_buff *skb)
+static int netem_delay(struct Qdisc *sch, struct sk_buff *skb)
 {
struct netem_sched_data *q = qdisc_priv(sch);
-   struct netem_skb_cb *cb = (struct netem_skb_cb *)skb-cb;
psched_tdiff_t td;
psched_time_t now;

PSCHED_GET_TIME(now);
td = tabledist(q-latency, q-jitter, q-delay_cor, q-delay_dist);
-   PSCHED_TADD2(now, td, cb-time_to_send);

/* Always queue at tail to keep packets in order */
if (likely(q-delayed.qlen  q-limit)) {
+   struct netem_skb_cb *cb = (struct netem_skb_cb *)skb-cb;
+   
+   PSCHED_TADD2(now, td, cb-time_to_send);
+
+   pr_debug(netem_delay: skb=%p now=%llu tosend=%llu\n, skb, 
+now, cb-time_to_send);
+   
__skb_queue_tail(q-delayed, skb);
-   if (!timer_pending(q-timer)) {
-   q-timer.expires = jiffies + PSCHED_US2JIFFIE(td);
-   add_timer(q-timer);
-   }
return NET_XMIT_SUCCESS;
}
 
+   pr_debug(netem_delay: queue over limit %d\n, q-limit);
+   sch-qstats.overlimits++;
kfree_skb(skb);
return NET_XMIT_DROP;
 }
 
+/*
+ *  Move a packet that is ready to send from the delay holding
+ *  list to the underlying qdisc.
+ */
+static int netem_run(struct Qdisc *sch)
+{
+   struct netem_sched_data *q = qdisc_priv(sch);
+   struct sk_buff *skb;
+   psched_time_t now;
+
+   PSCHED_GET_TIME(now);
+
+   skb = skb_peek(q-delayed);
+   if (skb) {
+   const struct netem_skb_cb *cb
+   = (const struct netem_skb_cb *)skb-cb;
+   long delay 
+   = PSCHED_US2JIFFIE(PSCHED_TDIFF(cb-time_to_send, now));
+   pr_debug(netem_run: skb=%p delay=%ld\n, skb, delay);
+
+   /* if more time remaining? */
+   if (delay  0) {
+   mod_timer(q-timer, jiffies + delay);
+   return 1;
+   }
+
+   __skb_unlink(skb, q-delayed);
+   
+   if (q-qdisc-enqueue(skb, q-qdisc)) {
+   sch-q.qlen--;
+   sch-qstats.drops++;
+   } 
+   }
+
+   return 0;
+}
+
 static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 {
struct netem_sched_data *q = qdisc_priv(sch);
struct sk_buff *skb2;
int ret;
 
-   pr_debug(netem_enqueue skb=%p @%lu\n, skb, jiffies);
+   pr_debug(netem_enqueue skb=%p\n, skb);
 
/* Random packet drop 0 = none, ~0 = all */
if (q-loss  q-loss = get_crandom(q-loss_cor)) {
@@ -184,7 +224,7 @@ static int netem_enqueue(struct sk_buff 
 (skb2 = skb_clone(skb, GFP_ATOMIC)) != NULL) {
pr_debug(netem_enqueue: dup %p\n, skb2);
 
-   if (delay_skb(sch, skb2)) {
+   if (netem_delay(sch, skb2)) {
sch-q.qlen++;
sch-bstats.bytes += skb2-len;
sch-bstats.packets++;
@@ -202,7 +242,8 @@ static int netem_enqueue(struct sk_buff 
ret = q-qdisc-enqueue(skb, q-qdisc);
} else {
q-counter = 0;
-   ret = delay_skb(sch, skb);
+   ret = netem_delay(sch, skb);
+   netem_run(sch);
}
 
if (likely(ret == NET_XMIT_SUCCESS)) {
@@ -241,56 +282,35 @@ static unsigned int netem_drop(struct Qd
return len;
 }
 
-/* Dequeue packet.
- *  Move all packets that are ready to send from the delay holding
- *  list to the underlying qdisc, then just call dequeue
- */
 static struct sk_buff *netem_dequeue(struct Qdisc *sch)
 {
struct netem_sched_data *q = qdisc_priv(sch);
struct sk_buff *skb;
+   int pending;
+
+   pending = netem_run(sch);
 
skb = q-qdisc-dequeue(q-qdisc);
-   if (skb) 
+   if (skb) {
+   pr_debug(netem_dequeue: return skb=%p\n, skb);
sch-q.qlen--;
+   sch-flags = ~TCQ_F_THROTTLED;
+   }
+   else if (pending) {
+   pr_debug(netem_dequeue: throttling\n);
+   sch-flags |= TCQ_F_THROTTLED;
+   } 
+
return skb;
 }
 
 static void netem_watchdog(unsigned long arg)
 {
struct Qdisc *sch = (struct Qdisc *)arg;
-   

[LARTC] Re: [Netem] netem with prio hangs on duplicate

2005-04-05 Thread Stephen Hemminger
On Wed, 30 Mar 2005 10:05:04 -0800 (PST)
js si [EMAIL PROTECTED] wrote:

 hi
 
 i tried the example given on the examples page to
 duplicate selected traffic like
 
 tc qdisc add dev eth0 root handle 1: prio
 tc qdisc add dev eth0 parent 1:3 handle 3: netem
 duplicate 40% 
 tc filter add dev eth0 protocol ip parent 1:0 prio 3
 u32 match ip dst 11.0.2.2 flowid 1:3
 
 when i ping from 11.0.2.2 to this interface my machine
 hangs. the same thing works for drop or delay. 
 
 i would appreciate if someone can tell me what i am
 doing wrong. 

I can't reproduce this on my SMP box, will try UP.

Could you get a backtrace with sysrq-P and sysrq-T?

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] netem with prio hangs on duplicate

2005-04-04 Thread Stephen Hemminger
On Wed, 30 Mar 2005 10:05:04 -0800 (PST)
js si [EMAIL PROTECTED] wrote:

 hi
 
 i tried the example given on the examples page to
 duplicate selected traffic like
 
 tc qdisc add dev eth0 root handle 1: prio
 tc qdisc add dev eth0 parent 1:3 handle 3: netem
 duplicate 40% 
 tc filter add dev eth0 protocol ip parent 1:0 prio 3
 u32 match ip dst 11.0.2.2 flowid 1:3
 

Try this. qdisc_restart() has a bug. It will spin until packet becomes 
available, which
is wrong.  This effects both netem and tbf, maybe other qdisc as well.

--- linux-2.6/net/sched/sch_generic.c   2005-03-14 14:30:52.0 -0800
+++ tcp-2.6/net/sched/sch_generic.c 2005-04-04 10:28:31.0 -0700
@@ -176,10 +176,10 @@ int qdisc_restart(struct net_device *dev
 
 requeue:
q-ops-requeue(skb, q);
-   netif_schedule(dev);
-   return 1;
+   netif_schedule(dev);
+   return q-q.qlen;
}
-   return q-q.qlen;
+   return 0;
 }
 
 static void dev_watchdog(unsigned long arg)
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [Netem] Re: [LARTC] netem with prio hangs on duplicate

2005-04-04 Thread Stephen Hemminger
On Mon, 4 Apr 2005 11:00:36 -0700
Stephen Hemminger [EMAIL PROTECTED] wrote:

 On Wed, 30 Mar 2005 10:05:04 -0800 (PST)
 js si [EMAIL PROTECTED] wrote:
 
  hi
  
  i tried the example given on the examples page to
  duplicate selected traffic like
  
  tc qdisc add dev eth0 root handle 1: prio
  tc qdisc add dev eth0 parent 1:3 handle 3: netem
  duplicate 40% 
  tc filter add dev eth0 protocol ip parent 1:0 prio 3
  u32 match ip dst 11.0.2.2 flowid 1:3
  
 
 Try this. qdisc_restart() has a bug. It will spin until packet becomes 
 available, which
 is wrong.  This effects both netem and tbf, maybe other qdisc as well.


Never mind, that patch is crap...
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] [ANNOUNCE] iproute2 2.6.11-050330

2005-04-03 Thread Stephen Hemminger
An updated version of the iproute2 utilities is available at:
http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.11-050330.tar.gz

It supports the latest features from 2.6, but is backwards compatiable
with 2.4.

This update includes several bugfixes and build clean from
the previous version (2.6.11-050314):

[Jamal Hadi Salim]
* Proper verison of iptables headers (from 1.3.1)
* Set revision file in m_ipt
* Fix action_util naming in mirred
* don't call ll_init_map in mirred

[Thomas Graf]

* Warn about wildcard deletions and provide IFA_ADDRESS upon
  deletions to enforce prefix length validation for IPv4.
* Fix netlink message alignment when the last routing attribute added
  has a data length not aligned to RTA_ALIGNTO.

[Masahide NAKAMURA]

* ipv6 xfrm allocspi and monitor support.

[Stephen Hemminger]
* include/linux/netfilter_ipv4/ip_tables.h dont include compiler.h
  because it isn't needed and not on all systems
* Update rtnetlink.h and pkt_cls.h to be stripped versions
  of headers from 2.6.12-rc1
* switch to stack for netem tables
* add -force option to batch mode
* handle midline comments in batch mode
* sum per cpu fields in lnstat correctly
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] lartc on bridge, help

2005-02-18 Thread Stephen Hemminger
On Fri, 18 Feb 2005 18:05:22 +0100
hiphin [EMAIL PROTECTED] wrote:

 I'm new on this mailing list, reading it for last 4 weeks, ...
 
 Need help please...
 
 I want to implement tc rules on br0 witch is build of wlan0, wlan0wds0,
br0 is only used for local traffic, not bridged traffic and doesn't
have a queue (normally).

Traffic that goes through the bridge needs to be controlled on the
output bound device (wlan0) not the local bridge device (br0).  If you
want to get advanced you can also control it on the inbound side but
it is harder.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] IPROUTE2: How to verify installation?

2005-02-18 Thread Stephen Hemminger
On Fri, 18 Feb 2005 00:26:47 +
Andy Furniss [EMAIL PROTECTED] wrote:

 Samuel Díaz García wrote:
  Hi guys,
 I download and install the last iproute2 package.
  
  I done:
  1) ./configure
  2) make
  3) make install
  
  When I do ip -V, it return:
  ip utility, iproute2-ss020116
  
  ¿Is IPROUTE2 correctly installed on my system?
  
  Thanks
  
 You may have an older one installed as well.
 
 Do a whereis tc or ip - It may say /sbin/tc /usr/sbin/tc the latter is 
 likely to be the new one, but the one in sbin will be used unless you 
 get rid of it or give full paths.

I integrated a patch from one of the distro's that put the iproute2
utilities in /usr/sbin. Now I regret it now because of the possibility
for error the change introduced, but moving it back would be worse.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] [ANNOUNCE] iproute2 - 2.6.10-050207

2005-02-07 Thread Stephen Hemminger
Update to iproute2 utilities, mostly bug fixes. Only new functionality is
integration of the ability to derive netem distribution table from experimental
data; simple port from NISTnet.

Download from 
http://developer.osdl.org/dev/iproute2/download/iproute2-050207.tar.gz

[Mads Martin Joergensen]
Don't mix address families when flushing

[Jean-Marc Ranger]
Need to call getline() with null for first usage
Don't overwrite const arg

[Stephen Hemminger]
Add experimental distribution
Validate classid is not too large to cause loss of bits.

-- 
Stephen Hemminger   [EMAIL PROTECTED]
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Issue with using using tc api

2005-02-03 Thread Stephen Hemminger
On Thu, 03 Feb 2005 11:43:40 +0800
sanjeev ravindran [EMAIL PROTECTED] wrote:

 Thank you so much for ur response Stephen,
 
 Ya, I found that dlopen tries to load q_htb.so.. and it fails.. 
 I tried to locate q_htb.so in my rh9 machiene.. but i couldnt locate it..
 Could you let me know how build q_htb.so standalone ??
 Thanks in advance,
 With best regards,
 Sanjeev Ravindran

Something like:
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include \
 -DRESOLVE_HOSTNAMES -DCONFIG_GACT -DCONFIG_GACT_PROB -shared -fpic q_htb.c -o 
q_htb.so

The tc/Makefile shows how it is done for q_netem.so

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


Re: [LARTC] doubts: cross compiling iproute2

2005-02-02 Thread Stephen Hemminger
On Wed, 2 Feb 2005 09:48:02 -0800 (PST)
js si [EMAIL PROTECTED] wrote:

 i tried to cross compile iproute2 on a linux machine using a cross compiler 
 for ppc750. i have some questions: 
  
 1) make tries to execute tc/normal, tc/paretonormal, tc/pareto to make 
 distribution files like normal.dist 
 because i am cross compiling the object files can't be executed. will it 
 suffice if i copy the distribution files from my linux iproute2 compilation 
 to the /usr/lib/tc directory on the ppc? 

Format of these files is text, intentionally to make them portable

 2)i can't locate db_185.h for the ppc. so i don't specify DBM_INCLUDE in the 
 make file. i get compilation errors in the misc directory. the thing is that 
 i want to only use the tc command from the iproute2 package. is tc 
 independent from whatever is compiled in the misc directory? actually tc 
 worked on the ppc, but i just had a doubt. 


Only needed for arpd, which you probably don't need
 thanks. 
 
   
 -
 Do you Yahoo!?
  Yahoo! Search presents - Jib Jab's 'Second Term'
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Issue with using using tc api

2005-02-02 Thread Stephen Hemminger
On Thu, 03 Feb 2005 00:42:52 +0800
sanjeev ravindran [EMAIL PROTECTED] wrote:

 Hi ,
 
 I'm trying to call the tc_qdisc_modify function of tc in iproute2/tc. I could 
 compile it with my stub program and got the executable. However, when i try 
 to create an htb qdisc i get the following error : Unknown qdisc htb, hence 
 option default is unparsable
 
 However, if i use the tc tool, it works fine.. When I tried to understand the 
 problem, it appeared to be failing of dlopen to load the module.. But when i 
 use tc tool, it loads this module..

Tc command is hard to understand because it supports using dynamic libraries to 
add new queue disciplines.
To find a queue discipline it first looks for q_XXX.so then opens it's own text 
with dlopen() and finds the
necessary table hooks.  This kind of dynamic binding is uncommon in C code, but 
allows for extensibility.

Normally tc has most queue discipline support (ie q_htb) linked into the 
command directly, but
you could build q_htb.so standalone as well.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] network emulation

2005-01-24 Thread Stephen Hemminger
On Sat, 22 Jan 2005 05:46:19 -0800 (PST)
vinay mathew [EMAIL PROTECTED] wrote:

 hi,
 I am really a newbie in linux traffic control.But i have task to implement a 
 tool similar to 
 the nistnet tool used for netwok emulation tests but which emulates a 
 wireless environment. 
 I was exploring the use of the traffic control subsystem for this task.In 
 this regard i have 
 a few questions i need to post in order to clarify my thoughts on how to do 
 this.I am using 
 tcng to classify traffic and generate the commands necessary to set up the 
 traffic control 
 structures.
  
 1. A simple task to add say a delay of 10ms to packets goin to a particular 
 destination.I 
 tried this using a simple fifo queue and a tbf queue but was not able to 
 obtain the required 
 results.The queue parameters dont have an explicit delay/latency parameter so 
 basically i 
 want to know how to add a delay/latency to packets goin out thro a particular 
 interface.
 A simple script that i tried


Use netem (http://developer.osdl.org/shemminger/netem)
it is already in 2.6.8

  
 2.The second part is similar to the first but involves dropping a percentage 
 of packets 
 instead of adding a delay to them.Example i need a 10% packet drop for 
 packets coming from 
 source 1 and heading to dest 2. Example i use a simple fifo queue with a 
 limit of 2 kB in 
 order to just test random drop capability.When i use the ping utility with a 
 packet size 
 greater than 2kB i get the message that 0 packets sent and 0 packets received 
 and when the 
 packet sizes are  2048 bytes then there is no drop or delay at all.Ne ideas 
 on this one.

ditto

 3.To implement bandwidth sharing among different hosts.Example 4 hosts are 
 communicating to each other and all traffic between them is routed through a 
 router which is like the 
 bottleneck and acts as the wireless network environment with the bottleneck 
 capacity as the 
 known wireless link capacity.I was thinking and am currently trying this 
 using the HTB 
 queuing discipline.I wanted to know if this idea can be effectively 
 implemented using the 
 HTB queuing discipline.
 
 Also im having some problems with installation and working of tcng on my Suse 
 9.2 system 
 which is running with a 2.6.8 kernel version.Ok the simulator could not be 
 compiled. But 
 when i tried using the commands generated by the tcng compiler i get the 
 error that dsmark 
 queuing discipline is not supported.However when i use the root keyword using 
 the tc tool there seems to be no problem.I read that root and dsmark are the 
 same ...or am i wrong about this. Also my kernel has all the parameters 
 enabled for QoS support.I tried compiling iproute2 from source but im not 
 able to since im getting errors while compiling.Can neone throw some light on 
 this.Or is it that there are some compatibility problems with the newer 2.6 
 kernels.
 Im sorry for the long content of the mail.But im a newbie and want to get my 
 thoughts rite 
 on this and whether its possible.Thanx a million in advance.
 regards
 vinay


Tcng depends on tclsim as part of the build process but it doesn't seem to 
build on 2.6.

 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 

-- 
Stephen Hemminger   [EMAIL PROTECTED]
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] [ANNOUNCE] iproute2 (050124) release

2005-01-24 Thread Stephen Hemminger
Thanks to the work of Jamal and Thomas; here is an update to iproute2.

http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.10-ss050124.tar.gz

Changes since last version:
[Yun Mao]
 fix typo in ss

[Thomas Graf]
tc pedit/action cleanups
add addraw_l
rtattr_parse cleanups

[Jamal Hadi Salim]
typo in m_mirred
add support for pedit

[Jim Gifford]
 Fix allocation size error in nomal and paretonormal generation
 programs.

-- 
Stephen Hemminger   [EMAIL PROTECTED]
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] tc class ls dev (device) ... segfault.

2005-01-13 Thread Stephen Hemminger
On Thu, 13 Jan 2005 16:17:21 +0100 (CET)
[EMAIL PROTECTED] wrote:

 Hello.
 I have got strange problem with tc utility (iproute2-ss001007) on linux
 2.4.18.
 No matter what rules i am going to test, the resul of 'tc class ls/show'
 is always the same :
 ATSLite ()# tc -s class ls dev eth1
 do_page_fault() #2: sending SIGSEGV to tc for illegal read access from
  (epc == , ra == 00408750)
 Segmentation fault
 
 tc -s qdisc ls , tc -s filter ls ... works well.
 shaping, qos works well too.
 
 Does anybody can help me with solving this problem?
 Thx in advance.
 
 ps.
 I can't change kernel etc .. coz it's the only one kernel i can run on AP
 based on rtl8181 - planet wap-1963a

Are you using a current version of the iproute2 utilities?
One of the bugs I fixed about 6 months ago when I took over maintance
was teaching tc about the builtin pfifo_fast qdisc.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Test version of iproute2

2005-01-12 Thread Stephen Hemminger
There is an new version of iproute2 for testing.
http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.10-ss050112.tar.gz 

Mostly simple merges, but could have some issues.
Jamal did I get everything you sent?

[Masahide Nakamura]
ipmonitor shows IPv6 prefix list notification
update to iproute2 xfrm for ipv6

[Stephen Hemminger]
fix compile warnings when building 64bit system
don't include asm/byteorder.h
warning about ip route nat no longer supported

[Catalin(ux aka Dino) BOIE]
fwmark in u32 filters

[Andi Kleen]
netlink manual page

[Thomas Graf]
tc testsuite

[Jamal Hadi Salim]
iptables tc support
mirror and redirect actions


-- 
Stephen Hemminger   [EMAIL PROTECTED]
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] [PATCH] mark in u32

2005-01-05 Thread Stephen Hemminger
On Wed, 05 Jan 2005 14:59:44 +
Andy Furniss [EMAIL PROTECTED] wrote:

 Catalin(ux aka Dino) BOIE wrote:
  Hello, Stephen, List!
  
  Attached is the patch for iproute2 to add the possibility to use fwmark 
  in u32 filters.
  The kernel part was included in 2.6.10.
  
  Please apply!
  Thank you!
  
  For more info:
  - Kernel patch (not needed for 2.6.10): 
  http://kernel.umbrella.ro/net/mark_in_u32/net-match-nfmark-in-u32.patch
  
  - Examples:
  http://kernel.umbrella.ro/net/mark_in_u32/examples.txt
  
  ---
  Catalin(ux aka Dino) BOIE
  catab at deuroconsult.ro
  http://kernel.umbrella.ro/
 
 That looks handy :-) Do you know why fw mark doesn't work with policers 
 in 2.6 (assuming it's not just me)
 
 To stephen - I may be wrong here but in the readme it says that default 
 kernel include is /usr/src/linux/include but if I grep for 
 KERNEL_INCLUDE I see :-
 
 ./Makefile:KERNEL_INCLUDE:=/usr/include
 ./Makefile:CFLAGS = $(CCOPTS) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
 ./Makefile: ./configure $(KERNEL_INCLUDE)
 ./README:KERNEL_INCLUDE should point to correct linux kernel include 
 directory.

I changed away from Alexey's old KERNEL_INCLUDE, because it was necessary
for the package to be able to be compiled without depending on the kernel
header files. There were cases where new features needed to be compiled on
old systems where the definition was missing.  Think about building current
iproute2 util's with 2.4.20 includes.

The current solution (though less than ideal) was to put stripped down
version of the routing specific includes into the iproute2 package.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] simulate

2004-11-03 Thread Stephen Hemminger
On Wed, 03 Nov 2004 18:22:43 -0300
Patricio Bruna V. [EMAIL PROTECTED] wrote:

 are any tool, script, software, that let me simulate network traffic,
 like trasmit for 2 hours at 100Mbs?

packet generator (see Documentation/networking/pktgen.txt)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [ANNOUNCE] iproute2 2.6.9-041019

2004-10-20 Thread Stephen Hemminger
Try this, ss was dragging in byteorder.h and it didn't need to.

diff -Nru a/misc/ss.c b/misc/ss.c
--- a/misc/ss.c 2004-10-20 09:13:56 -07:00
+++ b/misc/ss.c 2004-10-20 09:13:56 -07:00
@@ -33,7 +33,6 @@
 #include libnetlink.h
 #include SNAPSHOT.h
 
-#include asm/byteorder.h
 #include linux/tcp.h
 #include linux/tcp_diag.h
 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [ANNOUNCE] iproute2 2.6.9-041019

2004-10-20 Thread Stephen Hemminger
Similar problem to ss in iptunnel. It was including asm/byteorder.h
a kernel header that it didn't need to.

diff -Nru a/ip/iptunnel.c b/ip/iptunnel.c
--- a/ip/iptunnel.c 2004-10-20 09:18:36 -07:00
+++ b/ip/iptunnel.c 2004-10-20 09:18:36 -07:00
@@ -26,7 +26,6 @@
 #include netinet/in.h
 #include arpa/inet.h
 #include sys/ioctl.h
-#include asm/byteorder.h
 #include linux/if.h
 #include linux/if_arp.h
 #include linux/ip.h
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] iproute2-2.6.9-041019 compiling error

2004-10-20 Thread Stephen Hemminger
This should fix it.

diff -Nru a/ip/xfrm.h b/ip/xfrm.h
--- a/ip/xfrm.h 2004-10-20 16:40:09 -07:00
+++ b/ip/xfrm.h 2004-10-20 16:40:09 -07:00
@@ -28,7 +28,10 @@
 #include stdio.h
 #include sys/socket.h
 #include linux/xfrm.h
-#include utils.h
+
+#ifndef IPPROTO_SCTP
+# define IPPROTO_SCTP  132
+#endif
 
 #define XFRM_MAX_DEPTH 6
 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] [ANNOUNCE] iproute2 2.6.9-041019

2004-10-19 Thread Stephen Hemminger
Now that 2.6.9 is final. Here is an update of the iproute2 utilities 
that contains
all the patches in my queue. 

   * lnstat to replace rtstat and ctstat (from Harald Welte)
   * latest xfrm related changes
   * several small typo's and build fixes for older systems
http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.9-041019.tar.gz
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Qdisc statistics project

2004-10-14 Thread Stephen Hemminger
Thomas Graf wrote:
netlink errors
 Effort has gone into improving error codes/messages returned
 from netlink users in the kernel. The idea is currently on hold
 as all acceptable solutions would break APIs. Planned for 2.7
 as of now.
 

You probably need to come with another alternative since 2.7 probably
won't start for a long time
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Delay packets by 50ms

2004-10-08 Thread Stephen Hemminger
On Fri, 2004-10-08 at 15:38 -0700, Anshuman Kanwar wrote:
 Hi all,
 
 I am trying to solve a tiny problem that is trivial to
 solve using dummynet (FreeBSD). 
 
 I just want to add a delay of 50ms to each outgoing
 packet from an interface. This is to simulate a large
 pool of multiple modem users so I also need to add b/w
 limits etc (which seems to be easy to do).
 
 From the mailing list I could fine 2 qdiscs that can
 simulate latency : delay  netem. Neither of them is
 working on my setup though ( Fedora core2 [2.6.5] or RHEL
 3.0 update 2 or gentoo [2.6.8] ). Is something special
 needed to enable these qdiscs ?

delay was my earlier name, netem is the current one.

Netem went in to mainline kernel 2.6.8 (also 2.4.27)



 I tried applying the patch
 (http://www.uwsg.iu.edu/hypermail/linux/net/0403.2/0019.h
 tml) and recompiled the kernel but the tc command returns
 RTNETLINK answers: Invalid argument.

You probably need to build/run newer version of tc 
see http://developer.osdl.org/dev/iproute2

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] iproute2 tool compiling problems.

2004-09-24 Thread Stephen Hemminger
On Fri, 2004-09-24 at 09:11 +0200, Sergio Hormaetxe Gallego wrote:
 hi,
 
 when i put the iproute2 i only did the next:
 
 apt-get install iproute
 
 because in debian the name of the package is without the 2, and i 
 didn´t have any problem to install it (other things...).
 
 only a question: are u trying to run cbq.init?
 
 
 Sergio
 
 
 
 
 - Mensaje Original -
 De: Nathan Levy [EMAIL PROTECTED]
 Fecha: Jueves, Septiembre 23, 2004 2:32 pm
 Asunto: [LARTC] iproute2 tool compiling problems.
 
  
Hi all.
  
This is my first msg in this list, and I´d
  appreciate any help you could give me.
I already compiled the kernel with the options to
  run iproute2 tools. But, when I download the 
  iproute2-2.4.7-now-ss010824.tar.gz file from
  ftp://ftp.inr.ac.ru/ip-routing/ and try to compile it,
  I got too many errors. Here goes the output:

The latest version of iproute2 is at
http://developer.osdl.org/dev/iproute2


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] multiprocesor : bridge/router ?

2004-09-17 Thread Stephen Hemminger
On Fri, 17 Sep 2004 20:04:09 +0300
raptor [EMAIL PROTECTED] wrote:

 |On Fri, 17 Sep 2004 02:26:51 +0300
 |raptor [EMAIL PROTECTED] wrote:
 |
 | hi,
 | 
 | does someone tried bridge and or router functionality of linux kernel on
 | multiprocessor system.
 | Does multiprocessor system increase network performance or give
 | ability to process higher traffic..
 | 
 | What about highest possible troughput someone have achieved ?
 |
 |Your performance is going depend more on the bus speed and type of
 |NIC used. SMP might help but only if you assign the IRQ for each
 |NIC to a different processor. Network performance is more dependant
 |on memory and bus bandwidth than processor (at least with current hardware).
 
 ]- hmm. you are probably right, I'll have to concentrate on PCI-bus and quality 
 eth-cards . 
 Any recomendation ? what about a combo ethernet cards ?
 . On a SMP machine how is IRQ assigned 
 so that every diiferent netcard is assigned to different CPU.
 
 
 PS. It seems that nobody had test the troughput of linux networking..
 If u have a link to such test pls give me a link..
 Some info on which network cards offloads CPU more..
 or any info u can give me on the possible max and sustained 
 throughput on modern x86 computer.

You want to look at Robert Olssen's work http://robur.slu.se/Linux/net-development/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] multiprocesor : bridge/router ?

2004-09-16 Thread Stephen Hemminger
On Fri, 17 Sep 2004 02:26:51 +0300
raptor [EMAIL PROTECTED] wrote:

 hi,
 
 does someone tried bridge and or router functionality of linux kernel on
 multiprocessor system.
 Does multiprocessor system increase network performance or give
 ability to process higher traffic..
 
 What about highest possible troughput someone have achieved ?

Your performance is going depend more on the bus speed and type of
NIC used. SMP might help but only if you assign the IRQ for each
NIC to a different processor. Network performance is more dependant
on memory and bus bandwidth than processor (at least with current hardware).
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] netem usage example

2004-08-31 Thread Stephen Hemminger
On Tue, 31 Aug 2004 17:49:06 +0200
[EMAIL PROTECTED] wrote:

 I'm trying to setup a netem delay with no luck (using iproute2-2.6.8,
 compilation broke during arpd compile, so I use the
 tc binary in the tc/ subdir, there's also a q_netem.so there).

Just take arpd out of the Makfile if you don't need it.

 kernel is 2.6.8.1, compile with CPU cycle counter as time reference.
 I was using sch_delay of 2.6.7 happily with something like:
 tc qdisc add dev eth0 root 1: delay latency 1ms rate 35M
 now I use:
 tc qdisc add dev eth0 root netem latency 1ms
 and it complain about unknown qdisc netem

Netem is built as separate shared library, it expects to
be in /usr/lib/tc/q_netem.so

 
 do you have usage example with the new netem scheduler?

See new website:
http://developer.osdl.org/shemminger/netem
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] [announce] iproute2 update

2004-07-30 Thread Stephen Hemminger
This version supports:
* changes 'tc' for latest netem queuing discipline 
* additions to 'ip' to support xfrm
* more robust configuration (works with older 2.4 systems) to detect
  xfrm, hfsc, htb, etc.

The versioning scheme is to label the highest version of kernel used.
It should build and run on older systems as well, but obviously can't support stuff 
your
kernel doesn't have. So if a new feature (like netem scheduler) got added in 2.6.8 
kernel,
then you would need the corresponding iproute2 to use it.

Available at:
http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.8-ss040730.tar.gz
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] error: structure has no member named `rate'

2004-07-29 Thread Stephen Hemminger
On Thu, 29 Jul 2004 16:16:36 -0400
Tim Shepard [EMAIL PROTECTED] wrote:

 
 I want to take the functionality that I found sitting in
 linux-2.6.8-rc2/net/sched/sch_netem.c for a test drive but I found
 that the /sbin/tc that I have does not have the necessary knobs.
 
 So I grabbed iproute2-2.6.X-ss040702.tar.gz and tried to build it,
 but I got this:
 
q_netem.c: In function `netem_parse_opt':
q_netem.c:90: error: structure has no member named `rate'

The rate option was not accepted, and instead the new one is jitter.
I'll make a new package today.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: Please document this

2004-07-23 Thread Stephen Hemminger
On Fri, 23 Jul 2004 07:06:45 -0700
gypsy [EMAIL PROTECTED] wrote:

 Stephen,
 
 This REALLY needs to be fixed in the code; tc should reject as a syntax
 error any add filter command that does not include a prio
 parameter.  It also needs to be documented.
 
 === From LARTC mailing list ===
  Dear list,
  After much code crunching and beating my head against the wall
  (literally), I discovered the faulty code. Thanks mostly to gypsy who
  played a huge role in helping me discover the problem. My tc filter line
  had an error in it which completely baffles me because it worked up
  until 2045 lines were entered.
  
  Old command:
  tc filter add dev $dev protocol ip parent 12: u32 ht 2:$table1: ht
  3:$table2: match ip dst $ip/32 flowid 12:$classid
  
  New command:
  tc filter add dev $dev protocol ip parent 12: prio 5 u32 ht 2:$table1:
  ht 3:$table2: match ip dst $ip/32 flowid 12:$classid
  
  Who would have thought that a prio would cause that much trouble?
 
 Thanks,
 gypsy


I'll get to it but not right away. If you want something fixed sooner
submit your patch.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [PATCH 2.6] update to network emulation QOS scheduler

2004-07-07 Thread Stephen Hemminger
Ok, I'll bite how would you do:

Rate limit packet egress on a ethernet device (eth0) so it looks like a slow DSL link 
(25 Kbps)
by not dropping packets but by pacing the data.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [PATCH 2.6] update to network emulation QOS scheduler

2004-07-07 Thread Stephen Hemminger
On 07 Jul 2004 14:57:48 -0400
jamal [EMAIL PROTECTED] wrote:

 I seem to have hit the jackpot - all my emails to netdev are showing
 up and on time too.
 
 On Wed, 2004-07-07 at 14:10, Stephen Hemminger wrote:
  Ok, I'll bite how would you do:
  
  Rate limit packet egress on a ethernet device (eth0) so it looks like a slow DSL 
  link (25 Kbps)
  by not dropping packets but by pacing the data.
 
 Doesnt TBF work? 
 rate 25kbit burst 90k should probably do it.  Maybe i misunderstood the
 question.

TBF works but since the sender (on the same local machine) may go over it's allocation,
it will drop packets.

For example, if I use tbf to simulate a slow 33k bits/sec link then TCP test never
completes, it just hangs!  TBF does work for intermediate sizes.

But if I use the pacing simulation it works.

 
 You may be able to avoid dropping but dont think you can guarantee it
 simply because you have finite buffers. At some point you will congest
 that queue and packets will be dropped; and if you dont limit your queue
 buffer size, sooner than later you are bound to hog all the system
 memory.

I understand that, every queue has to have a limit.

 Having said that, i have never seen a good arguement for why pacing
 traffic vs dropping to initiate a slowdown is better than the other.
 So in that case, a policer/meter should suffice.


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [PATCH 2.6] update to network emulation QOS scheduler

2004-07-07 Thread Stephen Hemminger
On 07 Jul 2004 17:11:39 -0400
jamal [EMAIL PROTECTED] wrote:

 On Wed, 2004-07-07 at 16:58, Stephen Hemminger wrote:
 
  TBF works but since the sender (on the same local machine) may go over 
  it's allocation, it will drop packets.
 
 As should any queue that gets congested.

  For example, if I use tbf to simulate a slow 33k bits/sec link then 
  TCP test never
  completes, it just hangs!  TBF does work for intermediate sizes.
  
  But if I use the pacing simulation it works.
 
 I am not sure i follow; is this because of the return code from the
 enqueue?

Actually, the problem only occurs if burst is set large (like 2mb).
I think it gets stuck waiting for that much data.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [PATCH 2.6] update to network emulation QOS scheduler

2004-07-06 Thread Stephen Hemminger
On 02 Jul 2004 23:13:52 -0400
jamal [EMAIL PROTECTED] wrote:

 On Fri, 2004-07-02 at 16:44, Stephen Hemminger wrote:
  Here is an enhancement to netem to do allow emulating lower speed 
  networks.  The resolution is close, but obviously limited by the
  granularity of timers and size of packets.
  
  Also, fixes a rtnetlink dependency which showed up in some configurations
  and optimizes for the non-loss case by avoiding net_random call.
  
 
 I think its time i illustrate my comments earlier with some example
 hopefully this will curb the amount of features on this qdisc.
 I do think theres value in having this thing do delay and jitter, but
 you have gone waay beyond that now; 
 Let illustrate things which apply to what you are trying to do in
 network condituions emulation. Although i show ingress qdisc , this
 applies to egress just the same.
 
 #drop 1 out 10 packets randomly using the netrand generator
 tc filter add dev eth0 parent : protocol ip prio 6 u32 \
 match ip src 10.0.0.21/32 flowid 1:16 \
 action drop random netrand ok 0xa

Your examples made me think about this more.  The netfilter seem best
suited to things that effect the flow of packets (dropping, reordering,
even corrupting), and the qdisc seems best when the timing needs to change.

The limit match in netfilter is not the same as the rate in the qdisc.
The netem scheduler acts as if the link is a slow fixed rate.  The netfilter
limit is usually targeted to drop packets over the rate which is not the same.
Reordering is also hard without going out to a user log or building a custom
target.

So, you have convinced me that loss is unnecessary but not the rate, or delay.
If we can figure out how to re-ordering with netfilter then that could go too,
which would make it possible to use a layered qdisc again.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] [ANNOUNCE] Another version of iproute2 snapshot version

2004-07-02 Thread Stephen Hemminger
Minor tweaks to yesterday's version:
- ATM detection in configure is now by compiling not just
  looking for header.

- TC command already supports extension via shared library, but
  changed the search from the usual LD_LIBRARY_PATH to /usr/lib/tc.
  Made more sense to put q_ffoo.so in separate directory.

- ATM (and netem) are built as shared libraries, both as an example
  and for ATM to handle package dependency issues where a distribution would
  like to build support for all schedulers, but libatm.so may not be present
  on end user system (unless atm is installed).

Available at:
http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.X-ss040702.tar.gz

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [PATCH 2.6] update to network emulation QOS scheduler

2004-07-02 Thread Stephen Hemminger
Here is an enhancement to netem to do allow emulating lower speed 
networks.  The resolution is close, but obviously limited by the
granularity of timers and size of packets.

Also, fixes a rtnetlink dependency which showed up in some configurations
and optimizes for the non-loss case by avoiding net_random call.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
 
diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c
--- a/net/sched/sch_netem.c 2004-07-02 13:40:11 -07:00
+++ b/net/sched/sch_netem.c 2004-07-02 13:40:11 -07:00
@@ -18,6 +18,7 @@
 #include linux/errno.h
 #include linux/netdevice.h
 #include linux/skbuff.h
+#include linux/rtnetlink.h
 
 #include net/pkt_sched.h
 
@@ -31,11 +32,13 @@
struct sk_buff_head qnormal;
struct sk_buff_head qdelay;
struct timer_list timer;
+   psched_time_t last;
 
u32 latency;
u32 loss;
u32 counter;
u32 gap;
+   u32 rate;
 };
 
 /* Time stamp put into socket buffer control block */
@@ -54,13 +57,23 @@
pr_debug(netem_enqueue skb=%p @%lu\n, skb, jiffies);
 
/* Random packet drop 0 = none, ~0 = all */
-   if (q-loss = net_random()) {
+   if (q-loss  q-loss = net_random()) {
sch-stats.drops++;
return 0;   /* lie about loss so TCP doesn't know */
}
 
if (q-qnormal.qlen  sch-dev-tx_queue_len) {
PSCHED_GET_TIME(cb-time_to_send);
+   if (q-rate) {
+   if (!PSCHED_IS_PASTPERFECT(q-last) 
+   PSCHED_TLESS(cb-time_to_send, q-last))
+   cb-time_to_send = q-last;
+
+   PSCHED_TADD(cb-time_to_send, 
+   (USEC_PER_SEC * skb-len) / q-rate);
+   q-last = cb-time_to_send;
+   }
+
PSCHED_TADD(cb-time_to_send, q-latency);
 
__skb_queue_tail(q-qnormal, skb);
@@ -179,6 +192,7 @@
q-gap = qopt-gap;
q-loss = qopt-loss;
q-latency = qopt-latency;
+   q-rate = qopt-rate;
 
return 0;
 }
@@ -196,6 +210,7 @@
q-timer.function = netem_timer;
q-timer.data = (unsigned long) sch;
q-counter = 0;
+   PSCHED_SET_PASTPERFECT(q-last);
 
return netem_change(sch, opt);
 }
@@ -217,6 +232,7 @@
qopt.limit = sch-dev-tx_queue_len;
qopt.loss = q-loss;
qopt.gap = q-gap;
+   qopt.rate = q-rate;
 
RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), qopt);
 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


  1   2   >