Skip to contentSkip to conversation

New Qdisc - How to

LARTC Ricardo Leite 6 participants 8 messages May 20, 2004 – May 22, 2004

lore
Share & tools
lore
#0 lore raw

Hello Lartc's users,

This is my first contact.

I'm trying to implement a new queue discipline based on bfifo schedule. I search on internet but there are some problem(s) that I don't Know how to solve them and that's why I'm here asking for your help.

Well,
These were my steps for the implementation:

- Put the new qdisc routine "sch_ric.c" into the directory "/usr/src/linux/net/sched/" ,

- Insert a new line on the file "/net/sched/Makefile",

- Insert a new line on the file "/net/sched/Config.in",

- Insert a new line on the file "/include/linux/pkt_sched.h",

- Insert a new line on the file "/net/sched/sch_api.c"

Then I created a new kernel, which include the new qdisc:

- make menuconfig
- make dep
- make clean
- make bzImage
- make modules
- make modules_install
- Change the lilo.conf

Reboot

when I tried to program my qdisc with the tc command

tc qdisc add dev eth0 root bric limit 10

the kernel (or the tc command) couldn't find the the bric qdisc.

I think that I shoud change more files, but I don't know which they are. Do you know what am I doing wrong?

Cheers!
Para os Portistas...Saudações Dragonárias

Ricardo Leite

_________________________________________________________________
MSN Messenger: converse com os seus amigos online.
http://messenger.msn.com.br

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

#1 lore raw

Am Thursday 20 May 2004 19:04 schrieb Ricardo Leite:

Quoted 6 lines

- Put the new qdisc routine "sch_ric.c" into the directory "/usr/src/linux/net/sched/" ,
- Insert a new line on the file "/net/sched/Makefile",
- Insert a new line on the file "/net/sched/Config.in",
- Insert a new line on the file "/include/linux/pkt_sched.h",
- Insert a new line on the file "/net/sched/sch_api.c"

That's the kernel part.

Quoted 3 lines

tc qdisc add dev eth0 root bric limit 10

the kernel (or the tc command) couldn't find the the bric qdisc.

I haven't read the source, but I assume - seeing how tc needs to be patched in order to support HTB - that you need to add support for your scheduler to the tc program itself too.

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

#2 lore raw
In reply to Ricardo Leite

Ricardo,

you need to change the tc source too

ps: saudações :)

[]'s

x-arnie

Quoted 56 lines · Ricardo Leite

Hello Lartc's users,

This is my first contact.

I'm trying to implement a new queue discipline based on bfifo schedule. I search on internet but there are some problem(s) that I don't Know how to solve them and that's why I'm here asking for your help.

Well,
These were my steps for the implementation:

- Put the new qdisc routine "sch_ric.c" into the directory "/usr/src/linux/net/sched/" ,

- Insert a new line on the file "/net/sched/Makefile",

- Insert a new line on the file "/net/sched/Config.in",

- Insert a new line on the file "/include/linux/pkt_sched.h",

- Insert a new line on the file "/net/sched/sch_api.c"

Then I created a new kernel, which include the new qdisc:

- make menuconfig
- make dep
- make clean
- make bzImage
- make modules
- make modules_install
- Change the lilo.conf

Reboot

when I tried to program my qdisc with the tc command

tc qdisc add dev eth0 root bric limit 10

the kernel (or the tc command) couldn't find the the bric qdisc.

I think that I shoud change more files, but I don't know which they are. Do you know what am I doing wrong?

Cheers!
Para os Portistas...Saudações Dragonárias

Ricardo Leite

Quoted 9 lines

_________________________________________________________________
MSN Messenger: converse com os seus amigos online.
http://messenger.msn.com.br

_______________________________________________
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/

#3 lore raw
In reply to Ricardo Leite
Quoted 5 lines

when I tried to program my qdisc with the tc command

tc qdisc add dev eth0 root bric limit 10

the kernel (or the tc command) couldn't find the the bric qdisc.

unfortunatelly the TC userspace program needs to be patched also.

(and that really sucks, I bet there's a more elegant sollution but its not implemented ... maybe something like Radius Atribute-Value-Pairs so that you only need to update a dictionary in order for the TC utility to recognize the new features)

Signature · 5 lines
damjan | дамјан
This is my jabber ID --> [email protected] <-- not my mail address!!!
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#4 lore raw
In reply to Ricardo Leite

I already saw some messages...
And Thanks to all

Message from Andreas and completed by DamJan

I haven't read the source, but I assume - seeing how tc needs to be patched in order to support HTB - that you need to add support for your scheduler to the tc program itself too.

unfortunatelly the TC userspace program needs to be patched also

How can I do that?

******************

Message from X-Arnie

you need to change the tc source too

my tc source it's on /sbin/tc

I think this is the right place for the source, isn't it?

******************

I saw in the internet an example which someone change the file "tc_qdisc.c" on /iproute2/tc/
I've got /iproute2 but I can't find /iproute2/tc maybe this is the problem.

I don't know how to push tc into iproute2 and into the sbin/tc there isn't the file tc_qdisc.c

Hey,Ho! Ramones Let's Go...

Quoted 19 lines

From: Andreas Klauer <[email protected]>
To: [email protected]
Subject: Re: [LARTC] New Qdisc - How to
Date: Thu, 20 May 2004 20:08:31 +0200

Am Thursday 20 May 2004 19:04 schrieb Ricardo Leite:

Quoted 6 lines

- Put the new qdisc routine "sch_ric.c" into the directory "/usr/src/linux/net/sched/" ,
- Insert a new line on the file "/net/sched/Makefile",
- Insert a new line on the file "/net/sched/Config.in",
- Insert a new line on the file "/include/linux/pkt_sched.h",
- Insert a new line on the file "/net/sched/sch_api.c"

That's the kernel part.

Quoted 3 lines

tc qdisc add dev eth0 root bric limit 10

the kernel (or the tc command) couldn't find the the bric qdisc.

Quoted 8 lines

I haven't read the source, but I assume - seeing how tc needs to be patched in order to support HTB - that you need to add support for your scheduler to the tc program itself too.

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

_________________________________________________________________
MSN Messenger: converse com os seus amigos online.
http://messenger.msn.com.br

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

#5 lore raw
In reply to Ricardo Leite
Quoted 11 lines · Ricardo Leite

I already saw some messages...
And Thanks to all

Message from Andreas and completed by DamJan

I haven't read the source, but I assume - seeing how tc needs to be patched in order to support HTB - that you need to add support for your scheduler to the tc program itself too.

Quoted 5 lines

unfortunatelly the TC userspace program needs to be patched also

How can I do that?

******************

Have a look at how esfq does it

www.jessingale.dsl.pipex.com/iproute2-2.2.4-now-ss001007-esfq.diff

The source code for TC is part of iproute2 at
ftp://ftp.inr.ac.ru/ip-routing/ .

Andy.

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

#6 lore raw
In reply to Ricardo Leite
Quoted 10 lines · On Thu, 20 May 2004 20:08:31 +0200 Andreas Klauer…

Am Thursday 20 May 2004 19:04 schrieb Ricardo Leite:

Quoted 6 lines

- Put the new qdisc routine "sch_ric.c" into the directory "/usr/src/linux/net/sched/" ,
- Insert a new line on the file "/net/sched/Makefile",
- Insert a new line on the file "/net/sched/Config.in",
- Insert a new line on the file "/include/linux/pkt_sched.h",
- Insert a new line on the file "/net/sched/sch_api.c"

That's the kernel part.

Quoted 7 lines
Quoted 3 lines

tc qdisc add dev eth0 root bric limit 10

the kernel (or the tc command) couldn't find the the bric qdisc.

I haven't read the source, but I assume - seeing how tc needs to be patched in order to support HTB - that you need to add support for your scheduler to the tc program itself too.

Actually, the tc program supports adding disciplines w/o recompiling. Haven't tried it, but it looks for a shared library called q_XXX.so (where XXX is the new queue name). The shared object needs to define a struct qdisc_util that defines the new disciplines handles.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#7 lore raw
In reply to Ricardo Leite

Hello again,

The problem is almost solved (I thing)
I re-instaled the iproute2......this time with /tc into /iproute2 and modified three files:

- Makefile (modify)
- tc_qdisc.c (modify)
- q_bric.c (new)

Once more, the files are based on bfifo schedule

I compiled them with gcc and the only things I'd got were a lot of warnings and erros caused by others files.

the ggc line was:

gcc -c -O2 -fomit-frame-pointer -fno-strict-aliasing -I/usr/src/linux/include -DMODULE -DMODVERSION -D__KERNEL__ -Wall -Wstrict-prototypes -pipe -o file_out.o file_in.c

where file_in were tc_qdisc.c and q_bric.c

Do you have some idea where I failled?

Thanks on advance.
RIcardo Leite

Quoted 29 lines

From: Stephen Hemminger <[email protected]>
To: Andreas Klauer <[email protected]>
CC: [email protected]
Subject: Re: [LARTC] New Qdisc - How to
Date: Fri, 21 May 2004 08:55:08 -0700

Quoted 8 lines · On Thu, 20 May 2004 20:08:31 +0200 Andreas Klauer…

Am Thursday 20 May 2004 19:04 schrieb Ricardo Leite:

Quoted 6 lines

- Put the new qdisc routine "sch_ric.c" into the directory "/usr/src/linux/net/sched/" ,
- Insert a new line on the file "/net/sched/Makefile",
- Insert a new line on the file "/net/sched/Config.in",
- Insert a new line on the file "/include/linux/pkt_sched.h",
- Insert a new line on the file "/net/sched/sch_api.c"

Quoted 7 lines

That's the kernel part.

Quoted 3 lines

tc qdisc add dev eth0 root bric limit 10

the kernel (or the tc command) couldn't find the the bric qdisc.

I haven't read the source, but I assume - seeing how tc needs to be

patched

Quoted 1 line

in order to support HTB - that you need to add support for your

scheduler

Quoted 1 line

to the tc program itself too.

Quoted 7 lines

Actually, the tc program supports adding disciplines w/o recompiling. Haven't tried it, but it looks for a shared library called q_XXX.so (where XXX is the new queue name). The shared object needs to define a struct qdisc_util that defines the new disciplines handles.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_________________________________________________________________
MSN Messenger: converse com os seus amigos online.
http://messenger.msn.com.br

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