[LARTC] New qdisc path, try it (what is the problem)
hello, this is my new qdisc patch, when i recompile the kernel with this patch i dn'nt succeed please look at it and if there are any mistakes plesease send me a mail thanks in advance ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] New qdisc patch,(final code) please try it (what is the problem)
hello, this is my new qdisc patch, when i recompile the kernel with this patch i dn'nt succeed please look at it and if there are any mistakes plesease send me a mail thanks in advance --- linux-2.4.7-10orig/net/sched/Config.in +++ linux-2.4.4-10/net/sched/Config.in # Traffic control configuration. # tristate ' CBQ packet scheduler' CONFIG_NET_SCH_CBQ +tristate ' EPD packet scheduler' CONFIG_NET_SCH_EPD tristate ' CSZ packet scheduler' CONFIG_NET_SCH_CSZ --- linux-2.4.7-10orig/net/sched/Makefile +++ linux-2.4.7-10/net/sched/Makefile obj-$(CONFIG_NET_SCH_CSZ) += sch_csz.o obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o obj-$(CONFIG_NET_SCH_HFSC) += sch_hfsc.o +obj-$(CONFIG_NET_SCH_EPD) += sch_epd.o obj-$(CONFIG_NET_SCH_SFQ) += sch_sfq.o obj-$(CONFIG_NET_SCH_RED) += sch_red.o obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o --- linux-2.4.7-10orig/include/linux/pkt_sched.h +++ linux-2.4.7-10/include/linux/pkt_sched.h __u8grio; }; +/* EPD section*/ +struct tc_epd_qopt +{ + __u32 limit; + __u32 threshold; +}; --- linux-2.4.7-10orig/net/sched/sch_api.c +++ linux-2.4.7-10/net/sched/sch_api.c #ifdef CONFIG_NET_SCH_CBQ INIT_QDISC(cbq); #endif +#ifdef CONFIG_NET_SCH_EPD + INIT_QDISC(epd); +#endif #ifdef CONFIG_NET_SCH_CSZ INIT_QDISC(csz); #endif --- linux-2.4.7-10orig/net/sched/sch_htb.c +++ linux-2.4.7-10/net/sched/sch_htb.c +/* + * net/sched/sch_epd.c Early packet discart + *(adaptation for multimedia stream.) + * + *This program is free software; you can redistribute +* it and/or modify it + * Authors:Alouini khalifa [EMAIL PROTECTED] + * [EMAIL PROTECTED] + */ +#include linux/config.h +#include linux/module.h +#include asm/uaccess.h +#include asm/system.h +#include asm/bitops.h +#include linux/types.h +#include linux/kernel.h +#include linux/sched.h +#include linux/string.h +#include linux/mm.h +#include linux/socket.h +#include linux/sockios.h +#include linux/in.h +#include linux/errno.h +#include linux/interrupt.h +#include linux/if_ether.h +#include linux/inet.h +#include linux/netdevice.h +#include linux/etherdevice.h +#include linux/notifier.h +#include net/ip.h +#include net/route.h +#include linux/skbuff.h +#include net/sock.h +#include net/pkt_sched.h +#include net/inet_ecn.h + + +/*Early packet discart (EPD) algorithm. Version 1.0 + === +This discipline is taken from ATM world,this version + is the simplest mode of EPD +In ATM, a packet is divided in many cells,if a new + packet arrive and we reach a threshold then we have + to drop all new data unit (witch may be divided into +many cells) for the reason that one packet has no + signification if some of its data(cells) are dropped + so if we have to reject one cell of a packet we have +to reject all sells that belongs to this packet (a + packet=data unit) +To adaptate this discipline for multimedia stream, we + market the IP packet into the IP-OPION field (or TOS + field) the number of data unit at which it belongs + then we only have to extract this information +from the IP_OPTION field (or from TOS fields) + +Short description. +-- + +When a new packet arrives we look at the queue + length: + + +if (length threshold) - packet passed. +if (length threshold) -tow possibilitties +1 if (it is a new data unit) - packet dropped +2 if( it is an old data unit) -packet accepted +if (length =limit) -packet dropped + + Parameters, settable by user: + - + + limit - bytes + threshold -bytes +*/ +#define NET_XMIT_DROP 0 +#define NET_XMIT_SUCCESS 1 +struct epd_sched_data +{ +/* Parameters */ +unsigned limit;/* HARD maximal queue length*/ +unsigned threshold;/* limit under witch, we drop a new + data unit*/ + +/* Variables */ +unsigned current_unit ; + /* the last unit passed into the queue */ +unsigned dropped_unit; +/*the unit that must be dropped because one + packet of this unit was dropped (it is the number of + the last dropped unit) */ +}; + + +static int +epd_enqueue(struct sk_buff *skb, struct Qdisc* sch) +{ +struct epd_sched_data *q = (struct epd_sched_data/ +*)sch-data; +int test =verify_data_unit(skb,sch); +/*verify if this packet belongs to data unit that is + marked dropped then we have to drop this packet*/ + if (test==0) + goto drop; + if (sch-stats.backlog = q-threshold) + { + update_data_unit (skb,sch) +/*if it is a new data unit we have to update the + current_unit value*/ + goto enqueue; + } + else +{ + u8 unit=skb-nh.iph-tos; + if (unit ==/ + q-current_unit) +/*if it is a segment of a data unit that is already +
[LARTC] New disc Problem of compilation(for Martin Devera)
I trying to modify the files as it is writen into the htb pach (htb2_2.4.17.diff) then i tryied to recompile my kernel(2.4.17) - make xconfig make dep make clean make bzImage i find an error message: Id:cannot open sch_epd.o :aucun fichier ou repertoire de ce type what is the problem here? thans you in advance ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] (no subject)
hello ok,i wrote the EDP algorithm code as you can see in the attached file please, look at it, and if there is any mistake, would you like to indicate it to me if is ok, how can i write my pacth, i'm using red hat 7.2(kernel2.4.7-10) is it necessairely to write this pacth and also the pacth for tc . can i change the files indicated in the htb pacth or not thank you in advance ___ Do You Yahoo!? -- Une adresse yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com sch_edp.c Description: sch_edp.c
[LARTC] New qdisc EPD code
hello ok,i wrote the EDP algorithm code as you can see in the attached file please, look at it, and if there is any mistake, would you like to indicate it to me if is ok, how can i write my pacth, i'm using red hat 7.2(kernel2.4.7-10) is it necessairely to write this pacth and also the pacth for tc . can i change the files indicated in the htb pacth or not thank you in advance ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] New qdisc EPD code (final code)
hello ok,i wrote the EDP algorithm code as you can see in the code bellow please, look at it, and if there is any mistake, would you like to indicate it to me if is ok, how can i write my pacth, i'm using red hat 7.2(kernel2.4.7-10) is it necessairely to write this pacth and also the pacth for tc . can i change the files indicated in the htb pacth or not thank you in advance - /* * net/sched/sch_epd.c Early packet discart for multimedia stream. * * This program is free software; you can redistribute it and/or * modify it * * Authors: Alouini khalifa [EMAIL PROTECTED] [EMAIL PROTECTED] Mrabet cyrine */ #include linux/config.h #include linux/module.h #include asm/uaccess.h #include asm/system.h #include asm/bitops.h #include linux/types.h #include linux/kernel.h #include linux/sched.h #include linux/string.h #include linux/mm.h #include linux/socket.h #include linux/sockios.h #include linux/in.h #include linux/errno.h #include linux/interrupt.h #include linux/if_ether.h #include linux/inet.h #include linux/netdevice.h #include linux/etherdevice.h #include linux/notifier.h #include net/ip.h #include net/route.h #include linux/skbuff.h #include net/sock.h #include net/pkt_sched.h #include net/inet_ecn.h /* Early packet discart (RED) algorithm. Version 1.0 === this dsicipline is taken from ATM world,this version is the simplest mode of EPD In ATM, a packet is divided in many cells,if a new packet arrive and we reach a seuil then we have to drop all new data unit (witch may be divided into many cells) for the reason that the packet has no signification if some of its data is dropped so if we have to reject one cell of apacket we have to reject all sells that belongs to this packet (a packet=data unit) To adaptate this discipline for multimedia stream, we market the IP packet into the IP-OPION field the number of data unit at which it belongs then we only have to extract this informationfrom the IP_OPTION field (or from TOS fields) Short description. -- When a new packet arrives we look at the queue length: if (length seuil) - packet passed. if (length seuil) -tow possibilitties if (it is a new data unit) - packet dropped if( it is an old data unit) -packet accepted if (length =limit) -packet dropped Parameters, settable by user: - limit - bytes seuil-bytes */ struct epd_sched_data { /* Parameters */ unsignedlimit; /* HARD maximal queue length*/ unsignedseuil ; /* limit under it, we drop a new data unit*/ /* Variables */ unsigned current_unit ; /* the last unit that is passed into the queue */ unsigned dropped_unit; /*the unit that must be dropped because one packet of this unit was dropped (it is the number of the last dropped unit) */ }; static int epd_enqueue(struct sk_buff *skb, struct Qdisc* sch) { struct epd_sched_data *q = (struct epd_sched_data *)sch-data; int test =verify_data_unit(skb,sch); if (test==0) goto drop; if (sch-stats.backlog = q-seuil) { MAJ_data_unit (skb,sch) goto enqueue; } else { unsigned unit=u8 tos = skb-nh.iph-tos; if (unit == q-current_unit) goto enqueue; else { MAJ_reject_unit(skb,sch); goto drop; } } drop: kfree_skb(skb); sch-stats.drops++; return NET_XMIT_DROP; enqueue: __skb_queue_tail(sch-q, skb); sch-stats.backlog += skb-len; sch-stats.bytes += skb-len; sch-stats.packets++; return NET_XMIT_SUCCESS; } static int epd_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(sch-q, skb); sch-stats.backlog += skb-len; return 0; } static struct sk_buff * epd_dequeue(struct Qdisc* sch) { struct sk_buff *skb; skb = __skb_dequeue(sch-q); if (skb) sch-stats.backlog -= skb-len; return skb; static int epd_drop(struct Qdisc* sch) { struct sk_buff *skb; skb = __skb_dequeue_tail(sch-q); if (skb) { sch-stats.backlog -= skb-len; sch-stats.drops++; kfree_skb(skb);
[LARTC] New qdisc EPD code (final code)
hello ok,i wrote the EDP algorithm code as you can see in the code bellow please, look at it, and if there is any mistake, would you like to indicate it to me if is ok, how can i write my pacth, i'm using red hat 7.2(kernel2.4.7-10) is it necessairely to write this pacth and also the pacth for tc . can i change the files indicated in the htb pacth or not thank you in advance - /* * net/sched/sch_epd.c Early packet discart for multimedia stream. * * This program is free software; you can redistribute it and/or * modify it * * Authors: Alouini khalifa [EMAIL PROTECTED] [EMAIL PROTECTED] Mrabet cyrine */ #include linux/config.h #include linux/module.h #include asm/uaccess.h #include asm/system.h #include asm/bitops.h #include linux/types.h #include linux/kernel.h #include linux/sched.h #include linux/string.h #include linux/mm.h #include linux/socket.h #include linux/sockios.h #include linux/in.h #include linux/errno.h #include linux/interrupt.h #include linux/if_ether.h #include linux/inet.h #include linux/netdevice.h #include linux/etherdevice.h #include linux/notifier.h #include net/ip.h #include net/route.h #include linux/skbuff.h #include net/sock.h #include net/pkt_sched.h #include net/inet_ecn.h /* Early packet discart (RED) algorithm. Version 1.0 === this dsicipline is taken from ATM world,this version is the simplest mode of EPD In ATM, a packet is divided in many cells,if a new packet arrive and we reach a seuil then we have to drop all new data unit (witch may be divided into many cells) for the reason that the packet has no signification if some of its data is dropped so if we have to reject one cell of apacket we have to reject all sells that belongs to this packet (a packet=data unit) To adaptate this discipline for multimedia stream, we market the IP packet into the IP-OPION field the number of data unit at which it belongs then we only have to extract this informationfrom the IP_OPTION field (or from TOS fields) Short description. -- When a new packet arrives we look at the queue length: if (length seuil) - packet passed. if (length seuil) -tow possibilitties if (it is a new data unit) - packet dropped if( it is an old data unit) -packet accepted if (length =limit) -packet dropped Parameters, settable by user: - limit - bytes seuil-bytes */ struct epd_sched_data { /* Parameters */ unsignedlimit; /* HARD maximal queue length*/ unsignedseuil ; /* limit under it, we drop a new data unit*/ /* Variables */ unsigned current_unit ; /* the last unit that is passed into the queue */ unsigned dropped_unit; /*the unit that must be dropped because one packet of this unit was dropped (it is the number of the last dropped unit) */ }; static int epd_enqueue(struct sk_buff *skb, struct Qdisc* sch) { struct epd_sched_data *q = (struct epd_sched_data *)sch-data; int test =verify_data_unit(skb,sch); if (test==0) goto drop; if (sch-stats.backlog = q-seuil) { MAJ_data_unit (skb,sch) goto enqueue; } else { unsigned unit=u8 tos = skb-nh.iph-tos; if (unit == q-current_unit) goto enqueue; else { MAJ_reject_unit(skb,sch); goto drop; } } drop: kfree_skb(skb); sch-stats.drops++; return NET_XMIT_DROP; enqueue: __skb_queue_tail(sch-q, skb); sch-stats.backlog += skb-len; sch-stats.bytes += skb-len; sch-stats.packets++; return NET_XMIT_SUCCESS; } static int epd_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(sch-q, skb); sch-stats.backlog += skb-len; return 0; } static struct sk_buff * epd_dequeue(struct Qdisc* sch) { struct sk_buff *skb; skb = __skb_dequeue(sch-q); if (skb) sch-stats.backlog -= skb-len; return skb; static int epd_drop(struct Qdisc* sch) { struct sk_buff *skb; skb = __skb_dequeue_tail(sch-q); if (skb) { sch-stats.backlog -= skb-len; sch-stats.drops++; kfree_skb(skb);
[LARTC] New qdisc EPD code (final code)
hello ok,i wrote the EDP algorithm code as you can see in the code bellow please, look at it, and if there is any mistake, would you like to indicate it to me if is ok, how can i write my pacth, i'm using red hat 7.2(kernel2.4.7-10) is it necessairely to write this pacth and also the pacth for tc . can i change the files indicated in the htb pacth or not thank you in advance - /* * net/sched/sch_epd.c Early packet discart for multimedia stream. * * This program is free software; you can redistribute it and/or * modify it * * Authors: Alouini khalifa [EMAIL PROTECTED] [EMAIL PROTECTED] Mrabet cyrine */ #include linux/config.h #include linux/module.h #include asm/uaccess.h #include asm/system.h #include asm/bitops.h #include linux/types.h #include linux/kernel.h #include linux/sched.h #include linux/string.h #include linux/mm.h #include linux/socket.h #include linux/sockios.h #include linux/in.h #include linux/errno.h #include linux/interrupt.h #include linux/if_ether.h #include linux/inet.h #include linux/netdevice.h #include linux/etherdevice.h #include linux/notifier.h #include net/ip.h #include net/route.h #include linux/skbuff.h #include net/sock.h #include net/pkt_sched.h #include net/inet_ecn.h /* Early packet discart (RED) algorithm. Version 1.0 === this dsicipline is taken from ATM world,this version is the simplest mode of EPD In ATM, a packet is divided in many cells,if a new packet arrive and we reach a seuil then we have to drop all new data unit (witch may be divided into many cells) for the reason that the packet has no signification if some of its data is dropped so if we have to reject one cell of apacket we have to reject all sells that belongs to this packet (a packet=data unit) To adaptate this discipline for multimedia stream, we market the IP packet into the IP-OPION field the number of data unit at which it belongs then we only have to extract this informationfrom the IP_OPTION field (or from TOS fields) Short description. -- When a new packet arrives we look at the queue length: if (length seuil) - packet passed. if (length seuil) -tow possibilitties if (it is a new data unit) - packet dropped if( it is an old data unit) -packet accepted if (length =limit) -packet dropped Parameters, settable by user: - limit - bytes seuil-bytes */ struct epd_sched_data { /* Parameters */ unsignedlimit; /* HARD maximal queue length*/ unsignedseuil ; /* limit under it, we drop a new data unit*/ /* Variables */ unsigned current_unit ; /* the last unit that is passed into the queue */ unsigned dropped_unit; /*the unit that must be dropped because one packet of this unit was dropped (it is the number of the last dropped unit) */ }; static int epd_enqueue(struct sk_buff *skb, struct Qdisc* sch) { struct epd_sched_data *q = (struct epd_sched_data *)sch-data; int test =verify_data_unit(skb,sch); if (test==0) goto drop; if (sch-stats.backlog = q-seuil) { MAJ_data_unit (skb,sch) goto enqueue; } else { unsigned unit=u8 tos = skb-nh.iph-tos; if (unit == q-current_unit) goto enqueue; else { MAJ_reject_unit(skb,sch); goto drop; } } drop: kfree_skb(skb); sch-stats.drops++; return NET_XMIT_DROP; enqueue: __skb_queue_tail(sch-q, skb); sch-stats.backlog += skb-len; sch-stats.bytes += skb-len; sch-stats.packets++; return NET_XMIT_SUCCESS; } static int epd_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(sch-q, skb); sch-stats.backlog += skb-len; return 0; } static struct sk_buff * epd_dequeue(struct Qdisc* sch) { struct sk_buff *skb; skb = __skb_dequeue(sch-q); if (skb) sch-stats.backlog -= skb-len; return skb; static int epd_drop(struct Qdisc* sch) { struct sk_buff *skb; skb = __skb_dequeue_tail(sch-q); if (skb) { sch-stats.backlog -= skb-len; sch-stats.drops++; kfree_skb(skb);
[LARTC] New Qdisc
I want to creat a new qdisc ,i'm using red hat 7.2 if i do this (new qdisc) i think that i have to write only the function that are related with qdisc as enqueue,dequeue,drop,requeue? in addition, how can i integreted this new qdisc in the Iproute2, how can i do this link? and whitch file i have to change or to update??? ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] need a help
I 'm working in project that consists in implementation of a multimedia extension over IP. I set up informations about MPEG Video on the IP option fields. I want to use this information , in the router side, to implemente a EPD (early packet discart) approche. The EPD approche consists in the following : -it is based on the data unit information, a data unit may be fragmentated into many IP packet (number of packet per data unit is varaible) - when we reatch a limit in the queue,we will reject a packet that belongs to a new unit and we accept only a packet that belong to an old unit (with is already enqueued) this approche, is taked from ATM world, : ip packet is fragmentated into many cell, then if we have to reject one cell we must do this for all cells that belong to the same packet (a unit here is a packet) my question is how can i used the traffic control implemented on linux to do that, i'm working with red hat 7.2 . if you have any idea, or you dindn't understand me please send me a mail thanks in advance ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] need a help:EDP discipline implementation
I 'm working in project that consists in implementation of a multimedia extension over IP. I set up informations about MPEG Video on the IP option fields. I want to use this information , in the router side, to implemente a EPD (early packet discart) approche. The EPD approche consists in the following : -it is based on the data unit information, a data unit may be fragmentated into many IP packet (number of packet per data unit is varaible) - when we reatch a limit in the queue,we will reject a packet that belongs to a new unit and we accept only a packet that belong to an old unit (with is already enqueued) this approche, is taked from ATM world, : ip packet is fragmentated into many cell, then if we have to reject one cell we must do this for all cells that belong to the same packet (a unit here is a packet) my question is how can i used the traffic control implemented on linux to do that, i'm working with red hat 7.2 . if you have any idea, or you dindn't understand me please send me a mail thanks in advance ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/