Skip to main content
  1. 2024/
  2. Posts from September/

ethtool hints

๐Ÿ˜ƒ๐Ÿ‘‹๐Ÿ“ž๐ŸŽฅ๐Ÿ“ก๐Ÿ›ฃ๏ธ๐ŸŽฅ๐Ÿ“ž ๐Ÿ˜•
Is this a good idea? Turns out ๐Ÿค”…
๐Ÿคท prolly not… ?

https://techdocs.broadcom.com/us/en/storage-and-ethernet-connectivity/ethernet-nic-controllers/bcm957xxx/adapters/software-installation/installing-the-linux-driver/linux-ethtool-commands.html

Linux Ethtool Commands Command Description ethtool -s ethX speed 25000 autoneg off Force the speed to 25G. If the link is up on one port, the driver does not allow the other port to be set to a different speed. ethtool -i ethX Output includes driver, firmware, and package version. ethtool -k ethX Show offload features. ethtool -K ethX tso off Turn off TSO. ethtool -K ethX gro off lro off Turn off GRO/LRO. ethtool -g ethX Show ring sizes. ethtool -G ethX rx N Set ring sizes. ethtool -S ethX Get statistics. ethtool -l ethX Show number of rings. ethtool -L ethX rx 0 tx 0 combined M Set number of rings. ethtool -C ethX rx-frames N Set interrupt coalescing. Other parameters supported are rx-usecs, rx-frames, rx-usecs-irq, rx-frames-irq, tx-usecs, tx-frames, tx-usecs- irq, tx-frames-irq. ethtool -x ethX Show RSS flow hash indirection table and RSS key. ethtool -s ethX autoneg on speed 10000 duplex full Enable Autoneg. ethtool –show-eee ethX Show EEE state. ethtool –set-eee ethX eee off Disable EEE. ethtool –set-eee ethX eee on tx-lpi off Enable EEE, but disable LPI. ethtool -L ethX combined 1 rx 0 tx 0 Disable RSS. Set the combined channels to 1. ethtool -K ethX ntuple off Disable Accelerated RFS by disabling ntuple filters. ethtool -K ethX ntuple on Enable Accelerated RFS. ethtool -t ethX Performs various diagnostic self-tests. ethtool -m ethX Query/Decode module EEPROM information and optical diagnostics if available. echo 32768 > /proc/sys/net/core/ rps_sock_flow_entries echo 2048 > /sys/class/net/ethX/queues/rx-X/ rps_flow_cnt Enable RFS for ring X. sysctl -w net.core.busy_read=50 This sets the time to read the device’s receive ring to 50 ฮผsecs. For socket applications waiting for data to arrive, using this method can decrease latency by 2 or 3 ฮผs typically at the expense of higher CPU utilization. echo 4 > /sys/class/net//device/sriov_numvfs Enable SR-IOV with four VFs on the named interface. ip link set ethX vf 0 mac 00:12:34:56:78:9a Set VF MAC address. ip link set ethX vf 0 state enable Set VF link state for VF 0. ip link set ethX vf 0 vlan 100 Set VF 0 modprobe 8021q; ip link add link name type vlan id Example: modprobe 8021q; ip link add link ens3 name ens3.2 type vlan id 2