* [LARTC] Question about htb class
@ 2004-08-22 8:11 Hideaki Nemoto
2004-08-23 22:58 ` Andy Furniss
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Hideaki Nemoto @ 2004-08-22 8:11 UTC (permalink / raw)
To: lartc
Hi everyone.
I'm new to this list and I have some questions
regarding HTB class.
I was trying to see how tc sets the parameters for
HTB, but really couldnt understand them.
So, I thought that I might ask the wizards.
It's mainly from the source code.
1. What is the cell_log ?
(its everywhere in the code)
2. Why does htb calculate its burst(buffer) with
tc_xmit_time() ? Is opt.rate.buffer supposed to
have the time it takes to transmit the packet ?
(in q_htb.c around 223 lines)
3. What does rtab and ctab arrays do ?
And what kind of value should be in there ?
(its set in tc_core.c tc_calc_rtable())
I'd really appreciate your help.
Thankyou very much in advance.
Eme
--
Eme
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Question about htb class
2004-08-22 8:11 [LARTC] Question about htb class Hideaki Nemoto
@ 2004-08-23 22:58 ` Andy Furniss
2004-08-24 2:02 ` eme
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andy Furniss @ 2004-08-23 22:58 UTC (permalink / raw)
To: lartc
Hideaki Nemoto wrote:
> Hi everyone.
>
> I'm new to this list and I have some questions
> regarding HTB class.
> I was trying to see how tc sets the parameters for
> HTB, but really couldnt understand them.
> So, I thought that I might ask the wizards.
> It's mainly from the source code.
>
> 1. What is the cell_log ?
> (its everywhere in the code)
>
> 2. Why does htb calculate its burst(buffer) with
> tc_xmit_time() ? Is opt.rate.buffer supposed to
> have the time it takes to transmit the packet ?
> (in q_htb.c around 223 lines)
> 3. What does rtab and ctab arrays do ?
> And what kind of value should be in there ?
> (its set in tc_core.c tc_calc_rtable())
>
> I'd really appreciate your help.
> Thankyou very much in advance.
I can't say about HTB, but I've been playing with Ed Wildgooses patch
for DSL users -
http://mailman.ds9a.nl/pipermail/lartc/2004q2/012752.html
cell_log is used to look up the delay for a packet to be transmitted at
a certain rate. A rate table is made using cell_log to give granularity
- for me using htb it gets calculated with MTU 1600 which means it's 3.
Three means the table has a dispatch time entry for every 8 bytes packet
size, as a counter gets shifted left by cell_log to generate the table.
HTB / whatever looks up the transmit time for a packet by shifting its'
length right by cell_log and using the result as an index for the table.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [LARTC] Question about htb class
2004-08-22 8:11 [LARTC] Question about htb class Hideaki Nemoto
2004-08-23 22:58 ` Andy Furniss
@ 2004-08-24 2:02 ` eme
2004-08-24 8:15 ` Andy Furniss
2004-08-25 12:25 ` Hideaki Nemoto
3 siblings, 0 replies; 5+ messages in thread
From: eme @ 2004-08-24 2:02 UTC (permalink / raw)
To: lartc
On Mon, 23 Aug 2004 23:58:51 +0100
Andy Furniss <andy.furniss@dsl.pipex.com> wrote:
> Hideaki Nemoto wrote:
> > Hi everyone.
> >
> > I'm new to this list and I have some questions
> > regarding HTB class.
> > I was trying to see how tc sets the parameters for
> > HTB, but really couldnt understand them.
> > So, I thought that I might ask the wizards.
> > It's mainly from the source code.
> >
> > 1. What is the cell_log ?
> > (its everywhere in the code)
> >
> > 2. Why does htb calculate its burst(buffer) with
> > tc_xmit_time() ? Is opt.rate.buffer supposed to
> > have the time it takes to transmit the packet ?
> > (in q_htb.c around 223 lines)
>
> > 3. What does rtab and ctab arrays do ?
> > And what kind of value should be in there ?
> > (its set in tc_core.c tc_calc_rtable())
> >
> > I'd really appreciate your help.
> > Thankyou very much in advance.
>
> I can't say about HTB, but I've been playing with Ed Wildgooses patch
> for DSL users -
>
> http://mailman.ds9a.nl/pipermail/lartc/2004q2/012752.html
>
> cell_log is used to look up the delay for a packet to be transmitted at
> a certain rate. A rate table is made using cell_log to give granularity
> - for me using htb it gets calculated with MTU 1600 which means it's 3.
>
> Three means the table has a dispatch time entry for every 8 bytes packet
> size, as a counter gets shifted left by cell_log to generate the table.
>
> HTB / whatever looks up the transmit time for a packet by shifting its'
> length right by cell_log and using the result as an index for the table.
Thanks for the answer, Andy.
I think I'm starting to understand.
Does the "transmit time" here, mean "time the kernel should take in
order to send out the packet" ?
OK, so here's how I understood. Please correct me if I'm wrong.
1. When the kernel receives a packet, it gets the transmit time
corresponding to the packet length.
xmit_time = rtab[pkt_len>>cell_log];
2. Then, the kernel sends that packet using xmit_time ?
(If xmit_time was like 10 milli sec, it consumes 10 milli sec to
sends the packet ? Or does it wait for xmit_time to send it)
Is my understanding correct ?
>
> Andy.
>
>
>
>
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Eme
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Question about htb class
2004-08-22 8:11 [LARTC] Question about htb class Hideaki Nemoto
2004-08-23 22:58 ` Andy Furniss
2004-08-24 2:02 ` eme
@ 2004-08-24 8:15 ` Andy Furniss
2004-08-25 12:25 ` Hideaki Nemoto
3 siblings, 0 replies; 5+ messages in thread
From: Andy Furniss @ 2004-08-24 8:15 UTC (permalink / raw)
To: lartc
eme@v003.vaio.ne.jp wrote:
> On Mon, 23 Aug 2004 23:58:51 +0100
> Andy Furniss <andy.furniss@dsl.pipex.com> wrote:
>
>
>>Hideaki Nemoto wrote:
>>
>>>Hi everyone.
>>>
>>>I'm new to this list and I have some questions
>>>regarding HTB class.
>>>I was trying to see how tc sets the parameters for
>>>HTB, but really couldnt understand them.
>>>So, I thought that I might ask the wizards.
>>>It's mainly from the source code.
>>>
>>>1. What is the cell_log ?
>>>(its everywhere in the code)
>>>
>>>2. Why does htb calculate its burst(buffer) with
>>>tc_xmit_time() ? Is opt.rate.buffer supposed to
>>>have the time it takes to transmit the packet ?
>>>(in q_htb.c around 223 lines)
>>
>>>3. What does rtab and ctab arrays do ?
>>>And what kind of value should be in there ?
>>>(its set in tc_core.c tc_calc_rtable())
>>>
>>>I'd really appreciate your help.
>>>Thankyou very much in advance.
>>
>>I can't say about HTB, but I've been playing with Ed Wildgooses patch
>>for DSL users -
>>
>>http://mailman.ds9a.nl/pipermail/lartc/2004q2/012752.html
>>
>>cell_log is used to look up the delay for a packet to be transmitted at
>>a certain rate. A rate table is made using cell_log to give granularity
>>- for me using htb it gets calculated with MTU 1600 which means it's 3.
>>
>>Three means the table has a dispatch time entry for every 8 bytes packet
>>size, as a counter gets shifted left by cell_log to generate the table.
>>
>>HTB / whatever looks up the transmit time for a packet by shifting its'
>>length right by cell_log and using the result as an index for the table.
>
>
> Thanks for the answer, Andy.
> I think I'm starting to understand.
>
> Does the "transmit time" here, mean "time the kernel should take in
> order to send out the packet" ?
>
> OK, so here's how I understood. Please correct me if I'm wrong.
>
> 1. When the kernel receives a packet, it gets the transmit time
> corresponding to the packet length.
>
> xmit_time = rtab[pkt_len>>cell_log];
>
> 2. Then, the kernel sends that packet using xmit_time ?
> (If xmit_time was like 10 milli sec, it consumes 10 milli sec to
> sends the packet ? Or does it wait for xmit_time to send it)
>
> Is my understanding correct ?
>
It's the qdisc that uses the rate table(s). On my setup with HTB a
table is generated for the rate and ceil of each class.
When HTB dequeues a packet it doesn't always know how long it is until
it's gone (eg. I use SFQ on leafs), so I guess it will look up the time
from the len of the skb that sfq returns and delay dequeueing the next
packet from that class until that time has passed.
I suppose burst an requeue complicate things - I don't really know how
HTB does things :-)
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Question about htb class
2004-08-22 8:11 [LARTC] Question about htb class Hideaki Nemoto
` (2 preceding siblings ...)
2004-08-24 8:15 ` Andy Furniss
@ 2004-08-25 12:25 ` Hideaki Nemoto
3 siblings, 0 replies; 5+ messages in thread
From: Hideaki Nemoto @ 2004-08-25 12:25 UTC (permalink / raw)
To: lartc
On Tue, 24 Aug 2004 09:15:56 +0100
Andy Furniss <andy.furniss@dsl.pipex.com> wrote:
> eme@v003.vaio.ne.jp wrote:
snip
> > On Mon, 23 Aug 2004 23:58:51 +0100
> > Andy Furniss <andy.furniss@dsl.pipex.com> wrote:
> >
> >
> > Thanks for the answer, Andy.
> > I think I'm starting to understand.
> >
> > Does the "transmit time" here, mean "time the kernel should take in
> > order to send out the packet" ?
> >
> > OK, so here's how I understood. Please correct me if I'm wrong.
> >
> > 1. When the kernel receives a packet, it gets the transmit time
> > corresponding to the packet length.
> >
> > xmit_time = rtab[pkt_len>>cell_log];
> >
> > 2. Then, the kernel sends that packet using xmit_time ?
> > (If xmit_time was like 10 milli sec, it consumes 10 milli sec to
> > sends the packet ? Or does it wait for xmit_time to send it)
> >
> > Is my understanding correct ?
> >
>
> It's the qdisc that uses the rate table(s). On my setup with HTB a
> table is generated for the rate and ceil of each class.
>
> When HTB dequeues a packet it doesn't always know how long it is until
> it's gone (eg. I use SFQ on leafs), so I guess it will look up the time
> from the len of the skb that sfq returns and delay dequeueing the next
> packet from that class until that time has passed.
>
> I suppose burst an requeue complicate things - I don't really know how
> HTB does things :-)
>
Thanks again Andy.
I still can't understand the burst stuff, but I think I got the point
about the rtable.
I'll try to see the burst. Thanks !!
> Andy.
>
--
Hideaki Nemoto <eme@v003.vaio.ne.jp>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-08-25 12:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-22 8:11 [LARTC] Question about htb class Hideaki Nemoto
2004-08-23 22:58 ` Andy Furniss
2004-08-24 2:02 ` eme
2004-08-24 8:15 ` Andy Furniss
2004-08-25 12:25 ` Hideaki Nemoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.