Last active
November 12, 2015 16:36
-
-
Save dcode/069c7d0d99e3e200bc25 to your computer and use it in GitHub Desktop.
Interface tuning for capture interfaces on EL7 hosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Type=Ethernet | |
| BOOTPROTO=none | |
| IPV4_FAILURE_FATAL=no | |
| IPV6_AUTOCONF=no | |
| NAME=ens1f0 | |
| ONBOOT=yes | |
| NM_CONTROLLED=no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # File: /sbin/ifup-local | |
| # Description: Post ifup configuration for tuning capture interfaces | |
| # Author: dcode | |
| # | |
| # This script is run after normal sysconfig network-script configuration | |
| # is performed on RHEL/CentOS-based systems. | |
| # | |
| # Parameters: | |
| # $1: network interface name | |
| # | |
| # This is compatible with the ixgbe driver, YMMV | |
| # | |
| # | |
| # Change this to something like /tmp/ifup-local.log for troubleshooting | |
| LOG=/dev/null | |
| case $1 in | |
| ens1f0|ens1f1) | |
| for i in rx tx sg tso ufo gso gro lro rxvlan txvlan | |
| do | |
| ethtool -K $1 $i off &>$LOG | |
| done | |
| ethtool -N $1 rx-flow-hash udp4 sdfn &>$LOG | |
| ethtool -N $1 rx-flow-hash udp6 sdfn &>$LOG | |
| ethtool -n $1 rx-flow-hash udp6 &>$LOG | |
| ethtool -n $1 rx-flow-hash udp4 &>$LOG | |
| ethtool -C $1 rx-usecs 1000 &>$LOG | |
| ethtool -C $1 adaptive-rx off &>$LOG | |
| ethtool -G $1 rx 4096 &>$LOG | |
| ;; | |
| *) | |
| # No post commands needed for this interface | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment