Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -n "$1" ]; then
- /sbin/ethtool -G $1 rx 4096 tx 4096
- /sbin/ethtool -K $1 tso on gso on
- fi
- #!/bin/bash
- case "$1" in
- eth0)
- /sbin/ethtool -G $1 rx 16384 tx 16384
- /sbin/ethtool -K $1 gso on gro on
- ;;
- eth1)
- /sbin/ethtool -G $1 rx 64 tx 64
- /sbin/ethtool -K $1 tso on gso on
- /sbin/ip link set $1 txqueuelen 0
- ;;
- esac
- exit 0
- #!/bin/bash
- if [ -n "$1" ]
- then
- IFACE="$1"
- # If interface is physical
- if [[ $IFACE =~ ^eth[0-9]+$ ]]
- then
- # Do whatever you need for a physical interface here
- # example below
- /sbin/ethtool -K $IFACE rx off
- # Else if it's a bond
- elif [[ $IFACE =~ ^bond[0-9]+$ ]]
- then
- # Do whatever you need for the bond here
- # example below
- /sbin/ethtool -K $IFACE gso off
- # Now deal with slaves
- # Pull out slave interface names from /proc/net/bonding/bondX
- SLAVES=$(/bin/grep -oP "Slave Interface: K(eth[0-9]+)" /proc/net/bonding/$IFACE)
- for SLAVE in $SLAVES
- do
- # Do whatever you need with the slave here
- # example below
- /sbin/ethtool -K $SLAVE tso off gso off
- done
- fi
- fi
- auto eth0
- iface eth0 inet static
- pre-up /sbin/ethtool -s eth0 speed 10 duplex full
- systemctl enable NetworkManager-dispatcher
- systemctl enable NetworkManager-dispatcher
- Active: inactive (dead)
- #!/bin/bash
- if [ "$1" = "eth0" && "$2" = "up" ]; then
- /sbin/ethtool --offload eth0 tso off
- fi
Add Comment
Please, Sign In to add comment