# changing txqueuelen from /etc/conf.d/net

## piavlo

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"

----------

## piavlo

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

```
# 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}"
```

```
# 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}"
```

----------

