Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217948 - sys-apps/openrc-0.2.2 net txqueuelen does not get set
Summary: sys-apps/openrc-0.2.2 net txqueuelen does not get set
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-16 13:27 UTC by Chris Smith
Modified: 2010-12-02 19:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
txqueuelen -> qlen (d76a7017560a0b3cf58b06d416397dbf1515a5dc.diff,419 bytes, patch)
2008-04-16 15:20 UTC, Doug Goldstein (RETIRED)
Details | Diff
/tmp/start-net.eth0 (start-net.eth0,35.57 KB, text/plain)
2008-04-16 16:55 UTC, Chris Smith
Details
debug of net start (start-net.eth0,40.06 KB, text/plain)
2009-06-22 16:56 UTC, Chris Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2008-04-16 13:27:18 UTC
trying to set txqueulen of nic during startup fails, it remains at the default value

setting it manually after boot works fine

Reproducible: Always

Steps to Reproduce:
1.place non-default txqueuelen value in /etc/conf.d/net 
2.txqueuelen_eth0="30000"
3.boot

Actual Results:  
txqueuelen is not changed - remains at default value

Expected Results:  
the nics txqueuelen should have been changed to the requested value

from a terminal after boot
"ip link set eth0 txqueuelen 30000" works fine

modules="iproute2"
config_eth0="192.168.107.4/24"
routes_eth0="default via 192.168.107.1"
mtu_eth0="9000"
txqueuelen_eth0="30000"
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2008-04-16 15:18:38 UTC
My guess is that you're using busybox's ip during boot since it appears to not support "txqueuelen". However qlen is supported by both (but undocumented in iproute2).
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2008-04-16 15:20:42 UTC
Created attachment 149946 [details, diff]
txqueuelen -> qlen

Applying this to the openrc-0.2.2 ebuild should fix the issue for you
Comment 3 Chris Smith 2008-04-16 15:48:16 UTC
(In reply to comment #2)
> Applying this to the openrc-0.2.2 ebuild should fix the issue for you

Sorry, did not help at all. 

Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-04-16 15:59:25 UTC
/etc/init.d/net.eth0 stop
/etc/init.d/net.eth0 --debug start &>/tmp/start-net.eth0

then post /tmp/start-net.eth0 here
Comment 5 Chris Smith 2008-04-16 16:55:09 UTC
(In reply to comment #4)
> /etc/init.d/net.eth0 stop
> /etc/init.d/net.eth0 --debug start &>/tmp/start-net.eth0
> 
> then post /tmp/start-net.eth0 here
> 
Attached.
Briefly looks like the qlen is set before the device is added.

Comment 6 Chris Smith 2008-04-16 16:55:42 UTC
Created attachment 149960 [details]
/tmp/start-net.eth0
Comment 7 Chris Smith 2008-04-16 17:11:43 UTC
(In reply to comment #5)
> Briefly looks like the qlen is set before the device is added.

Actually it appears that that shouldn't matter. 

Comment 8 Chris Smith 2008-04-29 14:24:23 UTC
Adding that this bug exhibits on both x86 and x86_64 platforms.
Comment 9 Chris Smith 2008-04-29 14:26:17 UTC
Also exists with the following git version:

# rc --version
rc (OpenRC) git-82ea5713 (Gentoo Linux)
Comment 10 Roy Marples 2008-04-30 09:10:51 UTC
I cannot replicate this at all - txqueuelen is correctly set provided you're not using busybox as the shell.

Please report the version of iproute2 you have installed.
Also, edit /lib/rc/net/iproute2.sh and goto line 189
Then put this before and after the txqueuelen block so we can see if it's being set or not

ip link show $IFACE

Then post the output of the script starting.
Comment 11 Doug Goldstein (RETIRED) gentoo-dev 2008-04-30 13:50:12 UTC
I've also provided a patch to Mike (that I need to send upstream) that fixes it for busybox. It's implemented in busy box but someone forgot to connect the command line option to the right variable.
Comment 12 Chris Smith 2008-04-30 16:17:10 UTC
(In reply to comment #10)
> Please report the version of iproute2 you have installed.

iproute2-2.6.24.20080108

but the problem exists if I use modules="ifconfig" as well, it's not just with iproute2

> Also, edit /lib/rc/net/iproute2.sh and goto line 189
> Then put this before and after the txqueuelen block so we can see if it's being
> set or not
> 
> ip link show $IFACE
> 
> Then post the output of the script starting.

Did this and during boot it does show that qlen gets set. However, after I log in (text based, no X), qlen is back to 1000. Something is resetting qlen after it gets set.

Also I longer get /var/log/boot.msg since moving to openrc. Anyway to fix this?
Comment 13 Chris Smith 2008-04-30 16:18:46 UTC
(In reply to comment #10)
> I cannot replicate this at all - txqueuelen is correctly set provided you're
> not using busybox as the shell.

Standard ~ setups here no particular shell changes.
Comment 14 Roy Marples 2008-04-30 16:23:34 UTC
(In reply to comment #12)
> but the problem exists if I use modules="ifconfig" as well, it's not just with
> iproute2

> Did this and during boot it does show that qlen gets set. However, after I log
> in (text based, no X), qlen is back to 1000. Something is resetting qlen after
> it gets set.

Which also means it's not an OpenRC bug.
If you restart the interface does it stay set, even if for a few seconds.

> 
> Also I longer get /var/log/boot.msg since moving to openrc. Anyway to fix this?
> 

Enable rc_logger in /etc/rc.conf and you'll find /var/log/rc.log instead.
Comment 15 Chris Smith 2008-04-30 16:40:25 UTC
(In reply to comment #14)
> Which also means it's not an OpenRC bug.
> If you restart the interface does it stay set, even if for a few seconds.

First I set to a non-default value not equal to conf.d/net value:

# ip link set eth0 qlen 2000 && ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast qlen 2000
    link/ether 00:16:76:aa:bf:70 brd ff:ff:ff:ff:ff:ff

Then restart the interface followed immediately by the show:

# /etc/init.d/net.eth0 restart && ip link show eth0
 * Bringing down interface eth0
 *   Caching network module dependencies
 *   Stopping dhcpcd on eth0 ...                                                               [ ok ]
 * Bringing up interface eth0
 *   Caching network module dependencies
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 9000 qdisc pfifo_fast qlen 1000
    link/ether 00:16:76:aa:bf:70 brd ff:ff:ff:ff:ff:ff
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 9000 qdisc pfifo_fast qlen 30000
    link/ether 00:16:76:aa:bf:70 brd ff:ff:ff:ff:ff:ff
 *   dhcp ...
 *     Running dhcpcd ...                                                                      [ ok ]
 *     received address 192.168.107.6/24                                                       [ ok ]
 *   Waiting for IPv6 addresses ...                                                            [ ok ]
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast qlen 1000
    link/ether 00:16:76:aa:bf:70 brd ff:ff:ff:ff:ff:ff

Just to add that my x86 system that has the same problem uses a fixed IP address and not dhcp.

> Enable rc_logger in /etc/rc.conf and you'll find /var/log/rc.log instead.
Thanks. 

Comment 16 Doug Goldstein (RETIRED) gentoo-dev 2008-10-07 15:55:40 UTC
Is this still an issue for you?
Comment 17 Chris Smith 2008-10-07 20:58:20 UTC
(In reply to comment #16)
> Is this still an issue for you?

Yes. And now running openrc-0.3.0.

Additional info:

If I don't set the MTU, then txqueulen gets set. If I set the MTU then txqueulen resets to default.
This works:
=============================
config_eth0="192.168.107.4/24"
routes_eth0="default via 192.168.107.1"
txqueuelen_eth0="10000"
=============================
qlen ends up at 10000, and MTU is default of 1500
=============================

This doesn't work:
=============================
config_eth0="192.168.107.4/24"
routes_eth0="default via 192.168.107.1"
txqueuelen_eth0="10000"
mtu_eth0="9000"
=============================
The MTU properly gets set to 9000, but qlen resets to the default of 1000.
Although I can manually bump the qlen after booting.
=============================

Chris
Comment 18 Chris Smith 2008-10-23 17:58:38 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Is this still an issue for you?
> 
> Yes. And now running openrc-0.3.0.
> 
> Additional info:
> 
> If I don't set the MTU, then txqueulen gets set. If I set the MTU then
> txqueulen resets to default.
> This works:
> =============================
> config_eth0="192.168.107.4/24"
> routes_eth0="default via 192.168.107.1"
> txqueuelen_eth0="10000"
> =============================
> qlen ends up at 10000, and MTU is default of 1500
> =============================

Actually the above doesn't always work. Sometimes it works but usually it doesn't.
Comment 19 Zeno Davatz 2008-12-04 09:51:49 UTC
Same problem here. I am on openrc Version: 0.3.0.20081113-r2 (with baselayout 2.0.0-r1).

and when I reboot my machine my Network card does not come up. I have to start it manually with

/etc/init.d/net.eth0 start

then I also need to start my ntp-client again.

A bit annoying because it would be nice if this would just work. Networking is something very important out there.

Best
Zeno
Comment 20 Chris Smith 2009-06-22 16:56:03 UTC
Created attachment 195468 [details]
debug of net start

This still doesn't work!

/etc/conf.d/net = 

modules="iproute2"
config_eth0="dhcp 192.168.107.66/24"
txqueuelen_eth0="10000"

versions:
sys-apps/net-tools-1.60_p20071202044231-r1
sys-apps/iproute2-2.6.29.1
sys-apps/openrc-0.4.3-r3
Comment 21 Trevor Summers Smith 2010-01-27 23:52:34 UTC
With current versions:

sys-apps/net-tools-1.60_p20090728014017-r1
sys-apps/iproute2-2.6.29.1
sys-apps/openrc-0.6.0-r1

txqueuelen is correctly set. I made my /etc/conf.d/net exactly the same (modulo ip address)

modules="iproute2"
config_eth0="dhcp 192.168.0.66/24"
txqueuelen_eth0="10000"

I also tested using ifconfig instead of iproute2, and that also correctly sets txqueuelen.

Comment 22 William Hubbs gentoo-dev 2010-01-28 22:00:57 UTC
Chris,

can you verify that this works for you as well?

Thanks,

William
Comment 23 Chris Smith 2010-01-28 22:24:07 UTC
(In reply to comment #22)
> Chris,
> 
> can you verify that this works for you as well?

Last couple of boots on my x86 server (static address) it has worked although previously I have seen it fail on occasion.

Still does not work on my x86_64 desktop!

Server loads the e1000 modules, desktop loads the e1000e module.



Comment 24 Trevor Summers Smith 2010-01-29 00:21:59 UTC
Forgot to mention: I tested on x86. 

> (In reply to comment #22)
> > Chris,
> > 
> > can you verify that this works for you as well?
> 
> Last couple of boots on my x86 server (static address) it has worked although
> previously I have seen it fail on occasion.
> 
> Still does not work on my x86_64 desktop!
> 
> Server loads the e1000 modules, desktop loads the e1000e module.
> 

Comment 25 Chris Smith 2010-01-30 15:52:56 UTC
And to reiterate, even on x86, if I set the MTU then the txqueuelen does not get set. See my comment #17 which holds for x86 - on x86_64 txqueuelen does not get set regardless of whether I attempt to set the MTU or not.
Comment 26 Chris Smith 2010-01-30 17:10:20 UTC
This bug is now about 9 months old. What else can I do to assist? Standard hardware here - genuine Intel branded mainboards and genuine Intel branded NICs - does it get any more generic?
Comment 27 Trevor Summers Smith 2010-01-31 12:56:34 UTC
(In reply to comment #26)
I tested with the following configuration: 

config_eth0="192.168.107.4/24"
routes_eth0="default via 192.168.107.1"
txqueuelen_eth0="10000"
mtu_eth0="9000"

I tried restarting it five times, because Chris seemed to suggest in comment #17 that it seemed a little racy. Each time I got the same result: MTU got correctly set, but txqueulen got set to "100" (strange...). I tried various other combinations for MTU and txqueuelen and also saw the same result. Will do some digging during the next couple of days.

> This bug is now about 9 months old. What else can I do to assist? Standard
> hardware here - genuine Intel branded mainboards and genuine Intel branded NICs
> - does it get any more generic?
> 

Comment 28 Chris Smith 2010-01-31 15:09:45 UTC
Here's some odd findings.

Here's the default state:
# ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000

I'll change the qlen:
# ip link set eth0 qlen 10000
# ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 10000

Now I'll change the mtu:
# ip link set eth0 mtu 9000
# ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP qlen 1000

Note that the qlen has been reset.

# ip link set eth0 mtu 1500
# ip link show eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000

Notice the state of the link is now DOWN (and I also lost my secondary address as 'ip addr' would show).

# ip link set eth0 up mtu 9000 qlen 10000
# ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP qlen 1000

Sometimes the above works (the qlen and mtu get set properly), this time it didn't, the mtu was set, the link is up, but the qlen didn't survive.

Seems like the qlen must be specified after the mtu is set and that the mtu must be specified along with an up to insure the link remains up.





Comment 29 Chris Smith 2010-01-31 15:24:06 UTC
(In reply to comment #28)
> Seems like the qlen must be specified after the mtu is set and that the mtu
> must be specified along with an up to insure the link remains up.

What I mean by this is that the order may need to be something like:
1) ip link set eth0 up mtu 9000
2) ip link set eth0 up qlen 10000

Not sure if (1) needs the "up" or not - but changing the mtu without it will (or so it seems) at times take the interface down.

Comment 30 Chris Smith 2010-01-31 15:28:12 UTC
> (In reply to comment #28)
> 1) ip link set eth0 up mtu 9000
> 
> Not sure if (1) needs the "up" or not - but changing the mtu without it will
> (or so it seems) at times take the interface down.

Actually the "up" seems to be worthless here as multiple trials of changing the mtu seem to randomly take the interface down.

So maybe an order more like:
1) ip link set eth0 mtu 9000
2) ip link set eth0 up qlen 10000

Or:
1) ip link set eth0 mtu 9000
2) ip link set eth0 qlen 10000
3) ip link set eth0 up

Comment 31 Trevor Summers Smith 2010-02-01 22:37:34 UTC
More testing on x86 reveals:

Using both ip and ifconfig I find that setting (on command line) the MTU to any value takes a second or two to take, and (automatically) sets the txqueuelen to 100 (which some quick searching appears to suggest is a kernel/NIC default... need to confirm). 

Which means that on x86 I cannot find any bug that has to do with OpenRC.

I do not have access to x86_64. Chris, can you confirm the behavior that I describe, but on x86_64? Or does it still appear to only occur on boot? Also (obviously a pain) have you tried reproducing this with baselayout 1?
Comment 32 Chris Smith 2010-02-01 23:09:22 UTC
(In reply to comment #31)
> Which means that on x86 I cannot find any bug that has to do with OpenRC.
> 
> I do not have access to x86_64. Chris, can you confirm the behavior that I
> describe, but on x86_64? Or does it still appear to only occur on boot? Also
> (obviously a pain) have you tried reproducing this with baselayout 1?

See my comments #'s 28, 29 & 30. Sorry, don't know exactly what part of the OS it has to do with (maybe it's baselayout and not openrc, or even some other subsystem or sys app) but one is supposed to be able (according to current documentation) to set the MTU and the QLEN on net start via statements in /etc/conf.d/net - I can only suggest to either make it possible (fix the timing, order, or whatever) or document that Gentoo can not accomplish this. If it has nothing to do with OpenRC than please properly reassign the bug.

Sorry, I will not be testing this with baselayout-1.

Comment 33 William Hubbs gentoo-dev 2010-11-22 16:22:00 UTC
I think this bug got lost in the shuffel somewhere.

Chris, is it still happening?

Trevor, is there any more information from your side?

Also, I am re-assigning to openrc for now.
Thanks,

William
Comment 34 Chris Smith 2010-12-02 17:41:20 UTC
(In reply to comment #33)
> I think this bug got lost in the shuffel somewhere.
> 
> Chris, is it still happening?

Just tested this and it is now working on my end. Thank you.
Comment 35 William Hubbs gentoo-dev 2010-12-02 19:39:27 UTC
Thanks Chris,

I am going to go ahead and close this bug since you are saying this is
resolved.

William