Skip to contentSkip to conversation

how to add my own traffic scheduler to TC

LARTC Kennedy Cheng 2 participants 3 messages Mar 3, 2004 – Mar 4, 2004

lore
Share & tools
lore
#0 lore raw

What are the steps needed to add my own traffic scheduler to TC?

My understanding is that I need to do something in the net/sched/
directory: add a schedular eg sch_blue.c, change the Makefile, config.in and sch_api.c; add the appropriate qopt, xstats struct... in the include/linux/pkt_sched.h. I've got it all compiled without warnings or error. When I typed "tc add dev eth0 root blue limit 1000kB......", it complained "Unknown qdisc "blue", hence option "limit" is unparsable". When I typed "tc add dev eth0 root red limit 1000kB.....", it worked fine (of course).

The code I wrote was a complete copy of the sch_red.c, with text changed to blue instead of red. TC is not happy with my blue scheduler. What have I done wrong? Have I missed something?

Linux Kernel version 2.4.20-8

Many Thanks,
Kennedy

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

TC is like iptables, you need to add suport to tc binary for your module, else you wont be able to configure it.
I dont know how to do this , but try to find some analogy with other modules you will need to modify tc makefile, and add aditional module.

----- Original Message -----
From: "Kennedy Cheng" <[email protected]>
To: <[email protected]>
Sent: Wednesday, March 03, 2004 5:17 PM
Subject: [LARTC] how to add my own traffic scheduler to TC

Quoted 19 lines

What are the steps needed to add my own traffic scheduler to TC?

My understanding is that I need to do something in the net/sched/
directory: add a schedular eg sch_blue.c, change the Makefile, config.in and sch_api.c; add the appropriate qopt, xstats struct... in the include/linux/pkt_sched.h. I've got it all compiled without warnings or error. When I typed '"'tc add dev eth0 root blue limit 1000kB......'"', it complained '"'Unknown qdisc '"'blue'"', hence option '"'limit'"' is unparsable'"'.
When I typed '"'tc add dev eth0 root red limit 1000kB.....'"', it worked fine (of course).

The code I wrote was a complete copy of the sch_red.c, with text changed to blue instead of red. TC is not happy with my blue scheduler. What have I done wrong? Have I missed something?

Linux Kernel version 2.4.20-8

Quoted 8 lines

Many Thanks,
Kennedy

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Kennedy Cheng

Thanks Roy, I found the answers. I didn't know I had to modify the kernel QoS library (which I did) as well as the iproute2 library (which I didn't). It is working now :)

Thanks,
Kennedy

Quoted 5 lines · Roy

TC is like iptables, you need to add suport to tc binary for your module, else you wont be able to configure it.
I dont know how to do this , but try to find some analogy with other modules you will need to modify tc makefile, and add aditional module.

Quoted 33 lines

----- Original Message -----
From: "Kennedy Cheng" <[email protected]>
To: <[email protected]>
Sent: Wednesday, March 03, 2004 5:17 PM
Subject: [LARTC] how to add my own traffic scheduler to TC

Quoted 27 lines

What are the steps needed to add my own traffic scheduler to TC?

My understanding is that I need to do something in the net/sched/
directory: add a schedular eg sch_blue.c, change the Makefile, config.in and sch_api.c; add the appropriate qopt, xstats struct... in the include/linux/pkt_sched.h. I've got it all compiled without warnings or error. When I typed '"'tc add dev eth0 root blue limit 1000kB......'"', it complained '"'Unknown qdisc '"'blue'"', hence option '"'limit'"' is unparsable'"'.
When I typed '"'tc add dev eth0 root red limit 1000kB.....'"', it worked fine (of course).

The code I wrote was a complete copy of the sch_red.c, with text changed to blue instead of red. TC is not happy with my blue scheduler. What have I done wrong? Have I missed something?

Linux Kernel version 2.4.20-8

Many Thanks,
Kennedy

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/