* 2.6: QoS scheduling not working with IP-over-IP
@ 2004-02-10 12:36 Dawid Kuroczko
2004-02-12 4:05 ` David S. Miller
0 siblings, 1 reply; 20+ messages in thread
From: Dawid Kuroczko @ 2004-02-10 12:36 UTC (permalink / raw)
To: linux-kernel
Hello.
There seems to be a bug in QoS scheduling code related to IP-over-IP
tunnels (ipip.ko). My setup is a bit unusual -- my default route
goes through tunl1, so I want it shaped. It worked fine with 2.4,
but it doesn't with 2.6 (2.6.1 and 2.6.2, I made a transition quite
recently).
The simplest example is:
tc qdisc add dev tunl1 root prio
...executing this line will effect in no packet entering or leaving
device (as if device was down). Just as soon as I do
tc qdisc del dev tunl1 root
...everything returns to normal. And same problem applies to
HTB scheduler, though adding a qdisc doesn't result in such
packet freeze. But as soon as some class is added, all packets
matching that class "freeze". A simple example would be:
# everything is OK here
tc qdisc add dev tunl1 handle 1: root htb default 9 r2q 1
# ...and so is here...
tc class add dev tunl1 parent 1:1 classid 1:9 htb rate 2mbit ceil 2mbit
# ...oops, packets are blocked, until you remove this class or qdisc.
If that is of any help, I set up the tunnel like this:
ip tunnel add tunl1 mode ipip local 192.168.4.55 remote 192.168.1.1
ip addr add 11.22.33.44/32 dev tunl1
ip link set tunl1 up
ip route add default src 11.22.33.44 dev tunl1
Also, SFQ and RED appear immune to this problem.
Regards,
Dawid
PS: 2.6.2 kernel on 2 x Pentium-III SMP system, unpatched, QoS
(prio, sfq, red) compiled as modules.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-10 12:36 2.6: QoS scheduling not working with IP-over-IP Dawid Kuroczko
@ 2004-02-12 4:05 ` David S. Miller
2004-02-12 4:51 ` jamal
0 siblings, 1 reply; 20+ messages in thread
From: David S. Miller @ 2004-02-12 4:05 UTC (permalink / raw)
To: Dawid Kuroczko; +Cc: netdev, shemminger
[ moving from linux-kernel to correct mailing list... ]
Czesc Dawid,
On Tue, 10 Feb 2004 13:36:32 +0100 (CET)
Dawid Kuroczko <qnex@atlantis.knm.org.pl> wrote:
> There seems to be a bug in QoS scheduling code related to IP-over-IP
> tunnels (ipip.ko). My setup is a bit unusual -- my default route
> goes through tunl1, so I want it shaped. It worked fine with 2.4,
> but it doesn't with 2.6 (2.6.1 and 2.6.2, I made a transition quite
> recently).
Can you assign QoS schedulers and classifiers successfully to eth0
or some other non ipip device?
Does it work with 'tunl0' instead of 'tunl1'?
Stephen, I bet this problem got introduced when we moved ipip.c over
to dynamic netdevice allocation, can you take a look?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 4:05 ` David S. Miller
@ 2004-02-12 4:51 ` jamal
2004-02-12 4:59 ` jamal
0 siblings, 1 reply; 20+ messages in thread
From: jamal @ 2004-02-12 4:51 UTC (permalink / raw)
To: David S. Miller; +Cc: Dawid Kuroczko, netdev, shemminger
Actually this may be a result of the recent tweak to
the scheduler code that seems to be in 2.6.2. The fix seems
to fix the off by one in pfifo.
cheers,
jamal
On Wed, 2004-02-11 at 23:05, David S. Miller wrote:
> [ moving from linux-kernel to correct mailing list... ]
>
> Czesc Dawid,
>
> On Tue, 10 Feb 2004 13:36:32 +0100 (CET)
> Dawid Kuroczko <qnex@atlantis.knm.org.pl> wrote:
>
> > There seems to be a bug in QoS scheduling code related to IP-over-IP
> > tunnels (ipip.ko). My setup is a bit unusual -- my default route
> > goes through tunl1, so I want it shaped. It worked fine with 2.4,
> > but it doesn't with 2.6 (2.6.1 and 2.6.2, I made a transition quite
> > recently).
>
> Can you assign QoS schedulers and classifiers successfully to eth0
> or some other non ipip device?
>
> Does it work with 'tunl0' instead of 'tunl1'?
>
> Stephen, I bet this problem got introduced when we moved ipip.c over
> to dynamic netdevice allocation, can you take a look?
>
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 4:51 ` jamal
@ 2004-02-12 4:59 ` jamal
2004-02-12 5:04 ` jamal
0 siblings, 1 reply; 20+ messages in thread
From: jamal @ 2004-02-12 4:59 UTC (permalink / raw)
To: David S. Miller; +Cc: Dawid Kuroczko, netdev, shemminger
What the heck, heres a patch (maybe it ll teach that poster to post to
netdev instead of lk ;->). Not tested not even compiled but looks fine.
ipip was always broken; the pfifo off by one fix in 2.6 seems to have
exposed the bug.
-----
--- 262/net/ipv4/ipip.c 2004-01-09 02:00:13.000000000 -0500
+++ 262-mod/net/ipv4/ipip.c 2004-02-11 23:35:18.000000000 -0500
@@ -247,6 +247,7 @@
SET_MODULE_OWNER(dev);
dev->init = ipip_tunnel_init;
dev->destructor = free_netdev;
+ dev->tx_queue_len = 100;
nt->parms = *parms;
if (register_netdevice(dev) < 0) {
-------
cheers,
jamal
On Wed, 2004-02-11 at 23:51, jamal wrote:
> Actually this may be a result of the recent tweak to
> the scheduler code that seems to be in 2.6.2. The fix seems
> to fix the off by one in pfifo.
>
> cheers,
> jamal
>
> On Wed, 2004-02-11 at 23:05, David S. Miller wrote:
> > [ moving from linux-kernel to correct mailing list... ]
> >
> > Czesc Dawid,
> >
> > On Tue, 10 Feb 2004 13:36:32 +0100 (CET)
> > Dawid Kuroczko <qnex@atlantis.knm.org.pl> wrote:
> >
> > > There seems to be a bug in QoS scheduling code related to IP-over-IP
> > > tunnels (ipip.ko). My setup is a bit unusual -- my default route
> > > goes through tunl1, so I want it shaped. It worked fine with 2.4,
> > > but it doesn't with 2.6 (2.6.1 and 2.6.2, I made a transition quite
> > > recently).
> >
> > Can you assign QoS schedulers and classifiers successfully to eth0
> > or some other non ipip device?
> >
> > Does it work with 'tunl0' instead of 'tunl1'?
> >
> > Stephen, I bet this problem got introduced when we moved ipip.c over
> > to dynamic netdevice allocation, can you take a look?
> >
> >
>
>
>
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 4:59 ` jamal
@ 2004-02-12 5:04 ` jamal
2004-02-12 5:15 ` David S. Miller
0 siblings, 1 reply; 20+ messages in thread
From: jamal @ 2004-02-12 5:04 UTC (permalink / raw)
To: David S. Miller; +Cc: Dawid Kuroczko, netdev, shemminger
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On Wed, 2004-02-11 at 23:59, jamal wrote:
> What the heck, heres a patch (maybe it ll teach that poster to post to
> netdev instead of lk ;->). Not tested not even compiled but looks fine.
> ipip was always broken; the pfifo off by one fix in 2.6 seems to have
> exposed the bug.
>
More complete patch attached for other broken tunnel devices.
Note the bug exists in 2.4 as well but is masquareded by a boundary bug
in pfifo.
cheers,
jamal
[-- Attachment #2: p1 --]
[-- Type: text/plain, Size: 874 bytes --]
--- 261/net/ipv4/ip_gre.c 2004-01-09 01:59:48.000000000 -0500
+++ 261-mod/net/ipv4/ip_gre.c 2004-02-11 23:57:30.000000000 -0500
@@ -276,6 +276,7 @@
return NULL;
dev->init = ipgre_tunnel_init;
+ dev->tx_queue_len = 100;
nt = dev->priv;
nt->parms = *parms;
--- 261/net/ipv4/ipip.c 2004-01-09 02:00:13.000000000 -0500
+++ 261-mod/net/ipv4/ipip.c 2004-02-11 23:35:18.000000000 -0500
@@ -247,6 +247,7 @@
SET_MODULE_OWNER(dev);
dev->init = ipip_tunnel_init;
dev->destructor = free_netdev;
+ dev->tx_queue_len = 100;
nt->parms = *parms;
if (register_netdevice(dev) < 0) {
--- 261/net/ipv6/sit.c 2004-01-09 02:00:03.000000000 -0500
+++ 261-mod/net/ipv6/sit.c 2004-02-11 23:58:00.000000000 -0500
@@ -184,6 +184,7 @@
nt = dev->priv;
dev->init = ipip6_tunnel_init;
+ dev->tx_queue_len = 100;
nt->parms = *parms;
if (register_netdevice(dev) < 0) {
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 5:04 ` jamal
@ 2004-02-12 5:15 ` David S. Miller
2004-02-12 5:25 ` jamal
0 siblings, 1 reply; 20+ messages in thread
From: David S. Miller @ 2004-02-12 5:15 UTC (permalink / raw)
To: hadi; +Cc: qnex, netdev, shemminger
On 12 Feb 2004 00:04:42 -0500
jamal <hadi@cyberus.ca> wrote:
> More complete patch attached for other broken tunnel devices.
> Note the bug exists in 2.4 as well but is masquareded by a boundary bug
> in pfifo.
OK, however, old behavior would be like setting tx_queue_len to '1'.
Do we wish to preserve this?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 5:15 ` David S. Miller
@ 2004-02-12 5:25 ` jamal
2004-02-12 5:43 ` jamal
0 siblings, 1 reply; 20+ messages in thread
From: jamal @ 2004-02-12 5:25 UTC (permalink / raw)
To: David S. Miller; +Cc: qnex, netdev, shemminger
On Thu, 2004-02-12 at 00:15, David S. Miller wrote:
> On 12 Feb 2004 00:04:42 -0500
> jamal <hadi@cyberus.ca> wrote:
>
> > More complete patch attached for other broken tunnel devices.
> > Note the bug exists in 2.4 as well but is masquareded by a boundary bug
> > in pfifo.
>
> OK, however, old behavior would be like setting tx_queue_len to '1'.
> Do we wish to preserve this?
All the alloc_netdev() types of calls dont set this - so default is
zero. Maybe we could move it there. 100 seems to be what a lot of
10/100 ether devices set things to be.
Note that ifconfig and ip can set this value as well at runtime
cheers,
jamal
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 5:25 ` jamal
@ 2004-02-12 5:43 ` jamal
2004-02-12 5:51 ` David S. Miller
0 siblings, 1 reply; 20+ messages in thread
From: jamal @ 2004-02-12 5:43 UTC (permalink / raw)
To: David S. Miller; +Cc: qnex, netdev, shemminger
On Thu, 2004-02-12 at 00:25, jamal wrote:
> > OK, however, old behavior would be like setting tx_queue_len to '1'.
> > Do we wish to preserve this?
I think i misunderstood you - you are saying maybe it was not a bug
after all in pfifo, right? i.e the off by one is ok.
I suppose you could look at it that way; i am just baffled that
tunnels worked fine though with that size of default.
Note the poster didnt seem to change the tx_queue_len
cheers,
jamal
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 5:43 ` jamal
@ 2004-02-12 5:51 ` David S. Miller
2004-02-12 6:09 ` jamal
0 siblings, 1 reply; 20+ messages in thread
From: David S. Miller @ 2004-02-12 5:51 UTC (permalink / raw)
To: hadi; +Cc: qnex, netdev, shemminger
On 12 Feb 2004 00:43:59 -0500
jamal <hadi@cyberus.ca> wrote:
> On Thu, 2004-02-12 at 00:25, jamal wrote:
>
> > > OK, however, old behavior would be like setting tx_queue_len to '1'.
> > > Do we wish to preserve this?
>
> I think i misunderstood you - you are saying maybe it was not a bug
> after all in pfifo, right? i.e the off by one is ok.
No, you understood me the first time.
I am saying, the PFIFO fix was correct. And therefore if we are to preserve
the tunnel device behavior precisely to what happened before the PFIFO fix
we must set the tx_queue_len to '1'.
What use is any other value? Show me a code path where more than one packet
can occupy the queue of one of these tunnel devices? :-)
Packets get headers added and straight to transmit to next device.
->hard_start_xmit() routines of these drivers always consume SKB and
return 0.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 5:51 ` David S. Miller
@ 2004-02-12 6:09 ` jamal
2004-02-12 6:22 ` David S. Miller
0 siblings, 1 reply; 20+ messages in thread
From: jamal @ 2004-02-12 6:09 UTC (permalink / raw)
To: David S. Miller; +Cc: qnex, netdev, shemminger
On Thu, 2004-02-12 at 00:51, David S. Miller wrote:
> Show me a code path where more than one packet
> can occupy the queue of one of these tunnel devices? :-)
ok, makes sense ;->
cheers,
jamal
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: 2.6: QoS scheduling not working with IP-over-IP
2004-02-12 6:09 ` jamal
@ 2004-02-12 6:22 ` David S. Miller
[not found] ` <402D54D6.5070708@trash.net>
0 siblings, 1 reply; 20+ messages in thread
From: David S. Miller @ 2004-02-12 6:22 UTC (permalink / raw)
To: hadi; +Cc: qnex, netdev, shemminger
On 12 Feb 2004 01:09:36 -0500
jamal <hadi@cyberus.ca> wrote:
> On Thu, 2004-02-12 at 00:51, David S. Miller wrote:
>
> > Show me a code path where more than one packet
> > can occupy the queue of one of these tunnel devices? :-)
>
> ok, makes sense ;->
Great, here is the patch I am testing now.
BTW, you missed fixing up the xxx0 device in each of these things.
===== net/ipv4/ip_gre.c 1.34 vs edited =====
--- 1.34/net/ipv4/ip_gre.c Tue Oct 28 01:13:14 2003
+++ edited/net/ipv4/ip_gre.c Wed Feb 11 22:17:28 2004
@@ -276,6 +276,7 @@
return NULL;
dev->init = ipgre_tunnel_init;
+ dev->tx_queue_len = 1;
nt = dev->priv;
nt->parms = *parms;
@@ -1269,6 +1270,7 @@
}
ipgre_fb_tunnel_dev->init = ipgre_fb_tunnel_init;
+ ipgre_fb_tunnel_dev->tx_queue_len = 1;
if ((err = register_netdev(ipgre_fb_tunnel_dev)))
goto fail;
===== net/ipv4/ipip.c 1.37 vs edited =====
--- 1.37/net/ipv4/ipip.c Sun Oct 19 00:12:04 2003
+++ edited/net/ipv4/ipip.c Wed Feb 11 22:17:46 2004
@@ -246,6 +246,7 @@
nt = dev->priv;
SET_MODULE_OWNER(dev);
dev->init = ipip_tunnel_init;
+ dev->tx_queue_len = 1;
dev->destructor = free_netdev;
nt->parms = *parms;
@@ -892,6 +893,7 @@
}
ipip_fb_tunnel_dev->init = ipip_fb_tunnel_init;
+ ipip_fb_tunnel_dev->tx_queue_len = 1;
if ((err = register_netdev(ipip_fb_tunnel_dev)))
goto fail;
===== net/ipv6/sit.c 1.33 vs edited =====
--- 1.33/net/ipv6/sit.c Mon Jan 19 21:23:19 2004
+++ edited/net/ipv6/sit.c Wed Feb 11 22:18:05 2004
@@ -184,6 +184,7 @@
nt = dev->priv;
dev->init = ipip6_tunnel_init;
+ dev->tx_queue_len = 1;
nt->parms = *parms;
if (register_netdevice(dev) < 0) {
@@ -832,6 +833,7 @@
}
ipip6_fb_tunnel_dev->init = ipip6_fb_tunnel_init;
+ ipip6_fb_tunnel_dev->tx_queue_len = 1;
if ((err = register_netdev(ipip6_fb_tunnel_dev)))
goto fail;
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2004-02-18 21:22 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10 12:36 2.6: QoS scheduling not working with IP-over-IP Dawid Kuroczko
2004-02-12 4:05 ` David S. Miller
2004-02-12 4:51 ` jamal
2004-02-12 4:59 ` jamal
2004-02-12 5:04 ` jamal
2004-02-12 5:15 ` David S. Miller
2004-02-12 5:25 ` jamal
2004-02-12 5:43 ` jamal
2004-02-12 5:51 ` David S. Miller
2004-02-12 6:09 ` jamal
2004-02-12 6:22 ` David S. Miller
[not found] ` <402D54D6.5070708@trash.net>
2004-02-14 5:36 ` David S. Miller
2004-02-14 12:45 ` jamal
2004-02-14 13:06 ` jamal
2004-02-14 13:56 ` jamal
2004-02-14 20:49 ` David S. Miller
2004-02-15 10:30 ` Patrick McHardy
2004-02-18 3:10 ` David S. Miller
2004-02-18 11:21 ` Patrick McHardy
2004-02-18 21:22 ` David S. Miller
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.