| View previous topic :: View next topic |
| Author |
Message |
piavlo Tux's lil' helper

Joined: 21 Jun 2005 Posts: 141
|
Posted: Sun Aug 03, 2008 7:42 am Post subject: changing txqueuelen from /etc/conf.d/net |
|
|
Hi , i'd like to adjust interface transmit and receive queue lengths
from /etc/conf.d/net ,I know i can run ifconfig eth0 txqueuelen 2000
using postup() function, but i was looking for something more attractive like
txqueuelen_eth0="2000" similarly to mtu_eth0="1500" |
|
| Back to top |
|
 |
piavlo Tux's lil' helper

Joined: 21 Jun 2005 Posts: 141
|
Posted: Sun Aug 03, 2008 8:48 am Post subject: |
|
|
It looks like txqueuelen_eth* is already supported in openrc & baselayout-2*
Also i wrote a couple of patches to support txqueuelen_eth* in baselayout-1*
maybe i'll ask for them to be included officially
| Code: | # diff -Nru /lib/rcscripts/net/ifconfig.sh.orig /lib/rcscripts/net/ifconfig.sh
--- /lib/rcscripts/net/ifconfig.sh.orig 2008-08-03 11:12:25.000000000 +0300
+++ /lib/rcscripts/net/ifconfig.sh 2008-08-03 11:14:10.000000000 +0300
@@ -338,6 +338,10 @@
# Make sure interface is marked UP
ifconfig_up "${iface}"
+ # Interface queue lengths
+ local txqueuelen="txqueuelen_${ifvar}"
+ [[ -n ${!txqueuelen} ]] && ifconfig "${iface}" txqueuelen "${!txqueuelen}"
+
# MTU support
mtu="mtu_${ifvar}"
[[ -n ${!mtu} ]] && ifconfig "${iface}" mtu "${!mtu}" |
| Code: | # diff -Nru /lib/rcscripts/net/iproute2.sh.orig /lib/rcscripts/net/iproute2.sh
--- /lib/rcscripts/net/iproute2.sh.orig 2008-08-03 11:03:38.000000000 +0300
+++ /lib/rcscripts/net/iproute2.sh 2008-08-03 11:09:37.000000000 +0300
@@ -277,6 +277,10 @@
# Make sure interface is marked UP
iproute2_up "${iface}"
+ # Interface queue lengths
+ local txqueuelen="txqueuelen_${ifvar}"
+ [[ -n ${!txqueuelen} ]] && ip link set qlen "${!txqueuelen}" dev "${iface}"
+
# MTU support
local mtu="mtu_${ifvar}"
[[ -n ${!mtu} ]] && ip link set mtu "${!mtu}" dev "${iface}" |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|