* [LARTC] Help:how to generate different packets?souce code explanation?
@ 2004-06-18 2:20 swcims
2004-06-18 9:41 ` Ed Wildgoose
0 siblings, 1 reply; 2+ messages in thread
From: swcims @ 2004-06-18 2:20 UTC (permalink / raw)
To: lartc
Hi,All
I setup traffic control configuration with HTB this way:
1: root HTB qdisc
|
1:1 HTB class rate 1024kbit
|
/-----+-----+-----+------+-----\
1:10 1:20 1:30 1:40 1:50 1:60
EF AF41 AF31 AF21 AF11 BE
and alloct different bandwidth to these PHBs(queues).So which tool would I use to generate these packets at the same to for testing?Thank you!
Another question:I am studying sch_htb.c,but it's so tough for to understand,especially htb_dequeue().Would anyone please supply some adivse?
Thank you very much!
¡¡¡¡Best regards.
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡swcims
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡swcims@163.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-06-18
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿË\x01\x14™¨¥Šx%ŠË\x7f,\x04S\vùšŠYšŸ÷lõ¯ç–^[m§ÿÿ™¨¥™©ÿvÏZþy\x7f™¨¥™©ÿ–+-ŠwèþV«µÁÎY3ÿ†Ûiÿÿåj»\þŠà
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] Help:how to generate different packets?souce code explanation?
2004-06-18 2:20 [LARTC] Help:how to generate different packets?souce code explanation? swcims
@ 2004-06-18 9:41 ` Ed Wildgoose
0 siblings, 0 replies; 2+ messages in thread
From: Ed Wildgoose @ 2004-06-18 9:41 UTC (permalink / raw)
To: lartc
> Another question:I am studying sch_htb.c,but it's so tough for to understand,especially htb_dequeue().Would anyone please supply some adivse?
>
>
Hmm, well I will set you a problem. I have been looking at sch_htb.c as
well, but I don't understand the marked line below (won't it mean that
we double count the stats for this packet?):
static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
{
struct htb_sched *q = (struct htb_sched *)sch->data;
struct htb_class *cl = htb_classify(skb,sch);
if (cl = HTB_DIRECT || !cl) {
/* enqueue to helper queue */
if (q->direct_queue.qlen < q->direct_qlen && cl) {
__skb_queue_tail(&q->direct_queue, skb);
q->direct_pkts++;
} else {
kfree_skb (skb);
sch->stats.drops++;
return NET_XMIT_DROP;
}
} else if (cl->un.leaf.q->enqueue(skb, cl->un.leaf.q) != NET_XMIT_SUCCESS) {
sch->stats.drops++;
cl->stats.drops++;
return NET_XMIT_DROP;
} else {
->> cl->stats.packets++; cl->stats.bytes += skb->len;
htb_activate (q,cl);
}
sch->q.qlen++;
sch->stats.packets++; sch->stats.bytes += skb->len;
HTB_DBG(1,1,"htb_enq_ok cl=%X skb=%p\n",(cl && cl !HTB_DIRECT)?cl->classid:0,skb);
return NET_XMIT_SUCCESS;
}
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-18 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-18 2:20 [LARTC] Help:how to generate different packets?souce code explanation? swcims
2004-06-18 9:41 ` Ed Wildgoose
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.