How to mark a device not to be used with IMQ?
Hello ML!
How to mark a device not to be used with IMQ?
And how can I get a list of devices (not) used with IMQ?
Is by default every device unmarked for non IMQ use, even the dial up ones (pppo/ippp0) ?
Thank you!
Greetings Nils
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
all are used everytime.
you have to use filters to direct unneeded packets into fake queue (X:0 in case on HTB, some hiprio band in case of prio ...).
devik
Quoted 9 lines · Nils Lichtenfeld
Hello ML!
How to mark a device not to be used with IMQ?
And how can I get a list of devices (not) used with IMQ?
Is by default every device unmarked for non IMQ use, even the dial up ones (pppo/ippp0) ?
Quoted 8 lines
Thank you!
Greetings Nils_______________________________________________
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/
Hello Martin!
Quoted 4 lines
all are used everytime.
you have to use filters to direct unneeded packets into fake queue (X:0 in case on HTB, some hiprio band in case of prio ...).
I understand what you mean... but i thought there has to be a way from what I read on the IMQ-site (http://luxik.cdi.cz/~devik/qos/imq.htm):
--- snipp ---
Each non-marked skb is intercepted in dev_queue_xmit and queued to IMQ if it is up. Immediately it tries to dequeue it (software pump).
--- snapp ---
"Each non-marked skb" <-- Thats what made me think that there is a way to "mark" a device...
Thanks!
Greetings Nils
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines
I understand what you mean... but i thought there has to be a way from what I read on the IMQ-site (http://luxik.cdi.cz/~devik/qos/imq.htm):
--- snipp ---
Quoted 7 lines
Each non-marked skb is intercepted in
dev_queue_xmitand queued to IMQ if it is up. Immediately it tries to dequeue it (software pump).--- snapp ---
"Each non-marked skb" <-- Thats what made me think that there is a way to "mark" a device...
this is only internal mark to know whether the skb was already in IMQ. You could use it but you would have to add new user parameter to the interface structure. I didn't want to do it as I want the pach to be as simple as possible.
devik
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 14 lines · Martin Devera
Quoted 6 lines
I understand what you mean... but i thought there has to be a way from what I read on the IMQ-site (http://luxik.cdi.cz/~devik/qos/imq.htm):
--- snipp ---
Quoted 7 lines
Each non-marked skb is intercepted in
dev_queue_xmitand queued to IMQ if it is up. Immediately it tries to dequeue it (software pump).--- snapp ---
"Each non-marked skb" <-- Thats what made me think that there is a way to "mark" a device...
Quoted 6 lines
this is only internal mark to know whether the skb was already in IMQ. You could use it but you would have to add new user parameter to the interface structure. I didn't want to do it as I want the pach to be as simple as possible.
devik
Hi.
The same problem was bugging me a couple of days ago so i wrote an iptables target which
allows you to exclude packets from beeing enqueued to the imq device. The patch is tested with iptables-1.2.6a but should work with almost any recent version.
After applying it you have to execute a "chmod +x extensions/.IMQX-test", then
make patch-o-matic as usual.
Martin, maybe you want to put it on your imq page ?
Bye,
Patrick
extensions/.IMQX-test +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh +# True if IMQX target patch is applied. +[ -f $KERNEL_DIR/net/ipv4/netfilter/ipt_IMQX.c ] && echo IMQX
extensions/libipt_IMQX.c +81 -0
81 lines not on this page · raw message
patch-o-matic/extra/IMQX.patch +60 -0
60 lines not on this page · raw message
patch-o-matic/extra/IMQX.patch.config.in +4 -0
@@ -0,0 +1,4 @@ + dep_tristate ' MARK target support' CONFIG_IP_NF_TARGET_MARK $CONFIG_IP_NF_MANGLE + if [ "$CONFIG_IMQ" == "y" ]; then + dep_tristate ' IMQX target support' CONFIG_IP_NF_TARGET_IMQX $CONFIG_IP_NF_MANGLE + fi
patch-o-matic/extra/IMQX.patch.configure.help +8 -0
@@ -0,0 +1,8 @@ +CONFIG_IP_NF_TARGET_MARK +IMQX target support +CONFIG_IP_NF_TARGET_IMQX + IMQX allows you to exclude packets from beeing enqueued + to the IMQ device + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'.
patch-o-matic/extra/IMQX.patch.help +14 -0
@@ -0,0 +1,14 @@ +Author: Patrick McHardy <[email protected]> +Status: working + +This patch adds IMQX (IMQ eXclude) target for excluding +traffic from beeing enqueued to the IMQ device. + +Usage: + + IMQX + This target excludes traffic from beeing enqueued + to the IMQ device. + +Example: + iptables -t mangle -A POSTROUTING -o eth0 -j IMQX
patch-o-matic/extra/IMQX.patch.makefile +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_IP_NF_TARGET_MARK) += ipt_MARK.o +obj-$(CONFIG_IP_NF_TARGET_IMQX) += ipt_IMQX.o
Ahh stupid netscape fucked up the attachment :)
Hope this works ..
Bye Patrick
extensions/.IMQX-test +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh +# True if IMQX target patch is applied. +[ -f $KERNEL_DIR/net/ipv4/netfilter/ipt_IMQX.c ] && echo IMQX
extensions/libipt_IMQX.c +81 -0
81 lines not on this page · raw message
patch-o-matic/extra/IMQX.patch +60 -0
60 lines not on this page · raw message
patch-o-matic/extra/IMQX.patch.config.in +4 -0
@@ -0,0 +1,4 @@ + dep_tristate ' MARK target support' CONFIG_IP_NF_TARGET_MARK $CONFIG_IP_NF_MANGLE + if [ "$CONFIG_IMQ" == "y" ]; then + dep_tristate ' IMQX target support' CONFIG_IP_NF_TARGET_IMQX $CONFIG_IP_NF_MANGLE + fi
patch-o-matic/extra/IMQX.patch.configure.help +8 -0
@@ -0,0 +1,8 @@ +CONFIG_IP_NF_TARGET_MARK +IMQX target support +CONFIG_IP_NF_TARGET_IMQX + IMQX allows you to exclude packets from beeing enqueued + to the IMQ device + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'.
patch-o-matic/extra/IMQX.patch.help +14 -0
@@ -0,0 +1,14 @@ +Author: Patrick McHardy <[email protected]> +Status: working + +This patch adds IMQX (IMQ eXclude) target for excluding +traffic from beeing enqueued to the IMQ device. + +Usage: + + IMQX + This target excludes traffic from beeing enqueued + to the IMQ device. + +Example: + iptables -t mangle -A POSTROUTING -o eth0 -j IMQX
patch-o-matic/extra/IMQX.patch.makefile +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_IP_NF_TARGET_MARK) += ipt_MARK.o +obj-$(CONFIG_IP_NF_TARGET_IMQX) += ipt_IMQX.o
Hello Patrick!
From: "Patrick McHardy" <[email protected]>
Quoted 7 lines
Quoted 6 lines
this is only internal mark to know whether the skb was already in IMQ. You could use it but you would have to add new user parameter to the interface structure. I didn't want to do it as I want the pach to be as simple as possible.
devik
Quoted 8 lines
The same problem was bugging me a couple of days ago so i wrote an iptables target which
allows you to exclude packets from beeing enqueued to the imq device. The patch is tested with iptables-1.2.6a but should work with almost any recent version.
After applying it you have to execute a "chmod +x extensions/.IMQX-test", then
make patch-o-matic as usual.
This sounds great and might be usefull in the future. We are still using 2.2.19 here so no iptables atm.
By the way: Imagine the IMQ-device is allready up and a new ISDN-device is comming up, will the packages of the new ISDN-device automatically be send to IMQ or do I have to take the IMQ-device down and up again?
Thanks!
Greetings Nils
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 1 line · Nils Lichtenfeld
Hello Patrick!
Hi Nils,
Quoted 17 lines
From: "Patrick McHardy" <[email protected]>
Quoted 7 lines
Quoted 6 lines
this is only internal mark to know whether the skb was already in IMQ. You could use it but you would have to add new user parameter to the interface structure. I didn't want to do it as I want the pach to be as simple as possible.
devikQuoted 8 lines
The same problem was bugging me a couple of days ago so i wrote an iptables target which
allows you to exclude packets from beeing enqueued to the imq device. The patch is tested with iptables-1.2.6a but should work with almost any recent version.
After applying it you have to execute a "chmod +x extensions/.IMQX-test", then
make patch-o-matic as usual.
Quoted 2 lines
This sounds great and might be usefull in the future. We are still using 2.2.19 here so no iptables atm.
I think you can easily write an ipchains modul which accomplishes the same,
all you have to do is to set 'from_imq" to 1 in the skb.
A good start might be the MARK target, modifying (the iptables one) for imq
took only a couple of minutes.
Quoted 3 lines
By the way: Imagine the IMQ-device is allready up and a new ISDN-device is comming up, will the packages of the new ISDN-device automatically be send to IMQ or do I have to take the IMQ-device down and up again?
From net/core/core.c:
int dev_queue_xmit(struct sk_buff *skb)
...
#ifdef CONFIG_IMQ
/* special intermediate queue up ? */
if (imq_dev.flags&IFF_UP && !skb->from_imq) {
spin_lock_bh(&imq_dev.queue_lock);
q = imq_dev.qdisc;
if (q->enqueue) {
int ret = q->enqueue(skb, q);
qdisc_run(&imq_dev);
spin_unlock_bh(&imq_dev.queue_lock);
return ret = NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : ret;
}
spin_unlock_bh(&imq_dev.queue_lock);
}#endif
...
So i would say everything will be going to the IMQ device automatically.
Bye,
Patrick
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 3 lines
By the way: Imagine the IMQ-device is allready up and a new ISDN-device is comming up, will the packages of the new ISDN-device automatically be send to IMQ or do I have to take the IMQ-device down and up again?
automatically.
devik
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 3 lines
The same problem was bugging me a couple of days ago so i wrote an iptables target which
allows you to exclude packets from beeing enqueued to the imq device.
Hi Patrick,
good work ! It never came to my mind to use iptables for it but it is elegant solution :)
Quoted 1 line
Martin, maybe you want to put it on your imq page ?
sure. Only thing is that it could be better if I give you account here so that you can edit this part yourself. It's because I don't know iptables much and don't want to mess something :)
By the way because there is growing demand it could be interesting to put all incoming packets into IMQ device too. It can be selectable by iptables. But first I have to finish new htb.
If you would like to implement it I can dump my ideas to you ;)
devik
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi Martin,
Quoted 2 lines
good work ! It never came to my mind to use iptables for it but it is elegant solution :)
Thanks :)
Quoted 6 lines
Quoted 1 line
Martin, maybe you want to put it on your imq page ?
sure. Only thing is that it could be better if I give you account here so that you can edit this part yourself. It's because I don't know iptables much and don't want to mess something :)
Sure, although there's little to mess with :)
Quoted 4 lines
By the way because there is growing demand it could be interesting to put all incoming packets into IMQ device too. It can be selectable by iptables. But first I have to finish new htb.
New htb is coming ? I'm looking forward to it ..
I tought it might be a good idea instead of using a from_imq flag a to_imq flag would be more useful in combination with an iptables target .. of course an ipchains target would have to be provided too.
Quoted 2 lines
If you would like to implement it I can dump my ideas to you ;)
Sure, sounds interesting.
Is your goal beeing able to do global ingress traffic control ?
Bye,
Patrick
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/