LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-25-2009, 02:14 AM   #1
yftian
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
Unhappy tc problem:something wrong when rate-limit OSI-in-IP pkts, kernel 2.6.20


Hello, all:
When development our equipment(big chassis with many slots, optical equipment), we use TC to control traffic between system control card and line cards. And TC works for most kinds of traffic. It's very good.

But when control OSI-in-IP traffic, we meet some problems as following:
On our system control card(SC card), we run Linux(kernel version, 2.6.20), between SC card and line cards, there is ethernet connection(eth1). And on SC card, OSI packets flows into SC card through eth0, there is a user-space daemon to wrap-up OSI packets into IP packets then send to eth1 interface, which connected with a switch-chip will forward OSI-in-IP packets to destination line card. And on eth1 interface, tc configed for OSI-in-IP packets as following:

stream1 rule: OSI-in-IP from SC card to slot-13 at rate 960kbps;

stream2 rule: OSI-in-IP from SC card to slot-19 at rate 960kbps;

960kbps is about 267packets/s for 418bytes length packets.

We begin to test using N2X, when both stream1&stream2 are 150packts/s, packet length=418bytes, tc works well;
Then increase stream2 traffic to 400 packets, then problem happen: not only stream2 lost packets, but also stream1 lost packets too.

and we use "tc -s filter ls dev eth1" to see that traffic-classify works good.
And we use "tc -s class ls dev eth1", find that both streams are lost packets.

So my question is why stream1 lost packets?

Specific tc rules as following:

tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 200 cell 8

#slot 13 tc class entries
tc class add dev eth1 parent 1:0 classid 1:13 cbq bandwidth 100Mbit rate 2Mbit weight 0.2Mbit prio 8 allot 1514 cell 8 maxbur
st 20 avpkt 200 bounded
tc class add dev eth1 parent 1:13 classid 1:131 cbq bandwidth 100Mbit rate 960Kbit weight 96Kbit prio 6 allot 1514 cell 8 max
burst 20 avpkt 200 bounded
tc class add dev eth1 parent 1:131 classid 1:133 cbq bandwidth 100Mbit rate 960Kbit weight 96Kbit prio 5 allot 1514 cell 8 ma
xburst 20 avpkt 200

#slot 19 tc class entries
tc class add dev eth1 parent 1:0 classid 1:19 cbq bandwidth 100Mbit rate 2Mbit weight 0.2Mbit prio 8 allot 1514 cell 8 maxbur
st 20 avpkt 200 bounded
tc class add dev eth1 parent 1:19 classid 1:191 cbq bandwidth 100Mbit rate 960Kbit weight 96Kbit prio 6 allot 1514 cell 8 max
burst 20 avpkt 200 bounded
tc class add dev eth1 parent 1:191 classid 1:193 cbq bandwidth 100Mbit rate 960Kbit weight 96Kbit prio 5 allot 1514 cell 8 ma
xburst 20 avpkt 200

#config tc filter hash tables
tc filter add dev eth1 parent 1:0 prio 8 protocol ip u32
tc filter add dev eth1 parent 1:0 prio 5 handle 4: protocol ip u32 divisor 64

#slot 13 hashtable entries
tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 4:d: match ip dst 127.3.0.13 match ip protocol 47 0xff flowid 1:133
tc filter add dev eth1 protocol ip parent 1:0 prio 6 u32 ht 2:d: match ip dst 127.3.0.13 flowid 1:13

#slot 19 hashtable entries
tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 4:13: match ip dst 127.3.0.19 match ip protocol 47 0xff flowid 1:193
tc filter add dev eth1 protocol ip parent 1:0 prio 6 u32 ht 2:13: match ip dst 127.3.0.19 flowid 1:19

#config tc filter hash rules
tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 800:: match ip dst 127.3.0.0/26 hashkey mask 0x0000003f at 16 mat
ch ip protocol 47 0xff link 4:
tc filter add dev eth1 protocol ip parent 1:0 prio 6 u32 ht 800:: match ip dst 127.3.0.0/26 hashkey mask 0x0000003f at 16 lin
k 2:


Thanks
Tian, YuFeng

Last edited by yftian; 03-25-2009 at 02:15 AM.
 
Old 03-31-2011, 09:07 AM   #2
gda2004
LQ Newbie
 
Registered: Feb 2010
Posts: 10

Rep: Reputation: 0
Hi There ,

Have you looked at the burst rate and cburst rate ?

Cheers,

GDA2004
 
  


Reply

Tags
kernel, tc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tripping firewall rate limit, false positive? scattered Linux - Networking 1 09-19-2008 04:23 AM
Rate limit a nic to 1mbit stefaandk Linux - Networking 2 05-25-2007 10:40 PM
Limit the bit-rate and add a fixed buffer to a network interface ssoc80 Linux - Networking 0 05-12-2006 07:38 AM
How do ISPs limit download rate per user? ganninu Linux - Networking 2 10-22-2003 12:13 PM
wrong refresh rate egoadk Linux - Hardware 5 10-09-2002 04:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration