LinuxQuestions.org
Review your favorite Linux distribution.
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 09-14-2009, 07:23 AM   #1
LinuxMatt
LQ Newbie
 
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
tc qdisc - a prio problem


Hi, I need some help with TC and prio.

I got HTB to work, but since I have a wireless dynamic mesh network (the bandwidth can vary between 0.1 and 30 Mbit/s depending on setup and scenario) I never know the current rate and therefore need to use a dynamic prio queue instead.

Simple test network:

[CLIENT1 - eth0] -wired- [eth0 - PLATFORM1 - ath0/wifi0] ---wireless--- [ath0/wifi0 - PLATFORM2 - eth0] -wired- [eth0 - CLIENT2]

I have six video streams running simultaneously (using vlc and a constant bit rate video of 6 Mbit/s) from CLIENT1 to CLIENT2 on different ports. The bandwidth between CLIENT1 and CLIENT2 is ~30 Mbit/s, resulting in some what crappy quality on all six video streams.

My goal is to get one of the streams (port 1234, udp) to be prioritized, which I guess should result in this video stream getting the full 6Mbit/s.

tc rules (on PLATFORM1):
--------------------------------------------------
# Flush ath0
tc qdisc del dev ath0 root

# Root qdisc is prio with 3 bands
tc qdisc add dev ath0 root handle 1:0 prio bands 3

# Band 1 qdisc is sfq and filter is OLSR
tc qdisc add dev ath0 parent 1:1 sfq perturb 16
tc filter add dev ath0 protocol ip parent 1:0 prio 1 u32 match ip sport 698 0xffff flowid 1:1
tc filter add dev ath0 protocol ip parent 1:0 prio 1 u32 match ip dport 698 0xffff flowid 1:1

# Band 2 qdisc is sfq and filter is Video
tc qdisc add dev ath0 parent 1:2 sfq perturb 16
tc filter add dev ath0 protocol ip parent 1:0 prio 2 u32 match ip sport 1234 0xffff flowid 1:2
tc filter add dev ath0 protocol ip parent 1:0 prio 2 u32 match ip dport 1234 0xffff flowid 1:2

# Band 3 qdisc is sfq and filter is anything unfiltered
tc qdisc add dev ath0 parent 1:3 sfq perturb 16
tc filter add dev ath0 protocol ip parent 1:0 prio 3 u32 match u8 0 0 flowid 1:3
--------------------------------------------------


tc -s qdisc:

qdisc pfifo_fast 0: dev wifi0 root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 2429440795 bytes 1814437 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc pfifo_fast 0: dev wifi1 root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 4758007 bytes 12438 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc pfifo_fast 0: dev eth0 root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 201697 bytes 1742 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc prio 1: dev ath0 root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 1629824254 bytes 1201825 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 8007: dev ath0 parent 1:1 limit 127p quantum 1590b perturb 16sec
Sent 84408 bytes 1240 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 8008: dev ath0 parent 1:2 limit 127p quantum 1590b perturb 16sec
Sent 272423018 bytes 200639 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 8009: dev ath0 parent 1:3 limit 127p quantum 1590b perturb 16sec
Sent 1356481658 bytes 999331 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0

8008 has sent 272423018 bytes and 8009 1356481658 bytes. 1356481658 is five times 272423018, which is correct since I have one video stream on port 1234 and five streams on random ports.


PLATFORM info:

Linux kernel: 2.6.27.6
ARM - Big endian

Kernel config:

#
# Queueing/Scheduling
#
CONFIG_NET_SCH_CBQ=y
CONFIG_NET_SCH_HTB=y
# CONFIG_NET_SCH_HFSC is not set
CONFIG_NET_SCH_PRIO=y
# CONFIG_NET_SCH_RED is not set
CONFIG_NET_SCH_SFQ=y
# CONFIG_NET_SCH_ESFQ is not set
# CONFIG_NET_SCH_TEQL is not set
CONFIG_NET_SCH_TBF=y
# CONFIG_NET_SCH_GRED is not set
# CONFIG_NET_SCH_DSMARK is not set
# CONFIG_NET_SCH_NETEM is not set

#
# Classification
#
CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
# CONFIG_NET_CLS_TCINDEX is not set
# CONFIG_NET_CLS_ROUTE4 is not set
# CONFIG_NET_CLS_FW is not set
CONFIG_NET_CLS_U32=y
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
# CONFIG_NET_CLS_RSVP is not set
# CONFIG_NET_CLS_RSVP6 is not set
# CONFIG_NET_CLS_FLOW is not set
# CONFIG_NET_EMATCH is not set
# CONFIG_NET_CLS_ACT is not set
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_SCH_FIFO=y


The packets are apparently placed in the correct queue, but not dequeued correctly, since there is no difference in video quality on CLIENT2.

What am I doing wrong? Do I need to set iptables rules or modify the priomap? Or am I just stupid?


UPDATE:
I tried connecting the two platforms with cable and it worked perfectly!

I'm running MadWifi... I guess I could try ATH5K instead.

Last edited by LinuxMatt; 09-17-2009 at 06:49 AM.
 
Old 10-11-2009, 04:50 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by LinuxMatt View Post
I tried connecting the two platforms with cable and it worked perfectly!
Thanks for providing feedback yourself.

//NTLB: off the 0-reply list.
 
  


Reply



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
prio qdisc - does this really work? GSMD Linux - Networking 1 05-28-2008 05:51 PM
kernel: qdisc with PRIO map ohu Linux - Software 0 10-19-2007 09:06 PM
iproute2 ip rule prio question bartmanxxi Linux - Networking 0 10-18-2006 07:32 AM
help with tc qdisc ssoc80 Linux - Networking 0 05-16-2006 06:03 AM
tc qdisc Invalid argument problem 4mix Linux - Networking 1 09-09-2004 04:26 PM

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

All times are GMT -5. The time now is 09:46 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