[LARTC] new perflow rate control queue

Wang Jian lark at linux.net.cn
Mon Apr 4 09:21:17 CEST 2005


Hi,

One of my customer needs per flow rate control, so I write one.

The code I post here is not finished, but it seems to work as expected.

The kernel patch is agains kernel 2.6.11, the iproute2 patch is against
iproute2-2.6.11-050314. 

I write the code in a hurry to meet deadline. There are many other things
to do ahead for me. The code is written in 2 days (including read other
queue's code) and tested for a while to find obvious mistake. Don't be
suprised when you find many many bugs.

The test scenario is like this

      www server <- [ eth0   eth1 ] -> www clients

The attached t.sh is used to generate test rules. Clients download a
big ISO file from www server, so flows' rate can be estimated by view
progress. However I use wget to test the speed, so the speed is
accumulated, not current.

The problems I know:

1. The rtnetlink related code is quick hack. I am not familiar with
rtnetlink, so I look at other queue's code and use the simplest one.

2. perflow queue has no stats code. It will be added later.

3. I don't know what is the dump() method 's purpose, so I didn't write
dump() method. I will add it later when I know what it is for and how to
write rtnetlink code.

Any feedback is welcome. And test it if you can :)

PS: the code is licensed under GPL. If it is acceptable by upstream, it
will be submitted.

--
  lark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iproute2-2.6.11-050314-perflow.diff
Type: application/octet-stream
Size: 4842 bytes
Desc: not available
Url : http://mailman.ds9a.nl/pipermail/lartc/attachments/20050404/c9067f40/iproute2-2.6.11-050314-perflow-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.6.11-perflow.diff
Type: application/octet-stream
Size: 15639 bytes
Desc: not available
Url : http://mailman.ds9a.nl/pipermail/lartc/attachments/20050404/c9067f40/linux-2.6.11-perflow-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.sh
Type: application/x-sh
Size: 489 bytes
Desc: not available
Url : http://mailman.ds9a.nl/pipermail/lartc/attachments/20050404/c9067f40/t-0001.sh


More information about the LARTC mailing list