root@OpenWrt:~# ethtool --show-offload eth1
Features for eth1:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: on
tx-tcp6-segmentation: on
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
root@OpenWrt:~# ethtool -K eth1 tx off rx off
Actual changes:
rx-checksumming: off
tx-checksumming: off
tx-checksum-ip-generic: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp-mangleid-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]
root@OpenWrt:~# ethtool --show-offload eth1
Features for eth1:
rx-checksumming: off
tx-checksumming: off
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: off
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
root@OpenWrt:~# ethtool --show-offload eth1
Features for eth1:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: on
tx-tcp6-segmentation: on
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
root@OpenWrt:~# ethtool -K eth1 gso off gro off tso off
root@OpenWrt:~# ethtool --show-offload eth1
Features for eth1:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: off
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
修复EEPROM尝试1
这个方法首先是在这里看到的(https://forum.openwrt.org/t/network-issues-on-new-openwrt-install-on-x86/74678/9)。在翻看Intel官网下载的驱动的README中,也看到Known Issues/Troubleshooting中,有一节叫做82573(V/L/E) TX Unit Hang Messages,看症状很像,网卡型号也很接近,原文如下:
82573(V/L/E) TX Unit Hang Messages Several adapters with the 82573 chipset display “TX unit hang” messages during normal operation with the e1000edriver. The issue appears both with TSO enabled and disabled and is caused by a power management function that is enabled in the EEPROM. Early releases of the chipsets to vendors had the EEPROM bit that enabled the feature. After the issue was discovered newer adapters were released with the feature disabled in the EEPROM. If you encounter the problem in an adapter, and the chipset is an 82573-based one, you can verify that your adapter needs the fix by using ethtool: # ethtool -e eth0 Offset Values —— —— 0x0000 00 12 34 56 fe dc 30 0d 46 f7 f4 00 ff ff ff ff 0x0010 ff ff ff ff 6b 02 8c 10 d9 15 8c 10 86 80 de 83 ^^ The value at offset 0x001e (de) has bit 0 unset. This enables the problematic power saving feature. In this case, the EEPROM needs to read “df” at offset 0x001e. A one-time EEPROM fix is available as a shell script. This script will verify that the adapter is applicable to the fix and if the fix is needed or not. If the fix is required, it applies the change to the EEPROM and updates the checksum. The user must reboot the system after applying the fix if changes were made to the EEPROM. Example output of the script: bash fixeep-82573-dspd.sh eth0 eth0: is a “82573E Gigabit Ethernet Controller” This fixup is applicable to your hardware executing command: ethtool -E eth0 magic 0x109a8086 offset 0x1e value 0xdf Change made. You MUST reboot your machine before changes take effect! The script can be downloaded at http://e1000.sourceforge.net/files/fixeep-82573-dspd.sh.
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 \<interface\>"
echo " i.e. $0 eth0"
exit 1
fi
if ! ifconfig $1 > /dev/null; then
exit 1
fi
dev=$(ethtool -e $1 | grep 0x0010 | awk '{print "0x"$13$12$15$14}')
case $dev in
0x108b8086)
echo "$1: is a \"82573V Gigabit Ethernet Controller\""
;;
0x108c8086)
echo "$1: is a \"82573E Gigabit Ethernet Controller\""
;;
0x109a8086)
echo "$1: is a \"82573L Gigabit Ethernet Controller\""
;;
*)
echo "No appropriate hardware found for this fixup"
exit 1
;;
esac
echo "This fixup is applicable to your hardware"
var=$(ethtool -e $1 | grep 0x0010 | awk '{print $16}')
new=$(echo ${var:0:1}`echo ${var:1} | tr '02468ace' '13579bdf'`)
if [ ${var:0:1}${var:1} == $new ]; then
echo "Your eeprom is up to date, no changes were made"
exit 2
fi
echo "executing command: ethtool -E $1 magic $dev offset 0x1e value 0x$new"
ethtool -E $1 magic $dev offset 0x1e value 0x$new
echo "Change made. You *MUST* reboot your machine before changes take effect!"
Packet drop issues may occur in some 82574 and 82583-based adapters. Neither the e1000e driver nor the hardware itself show any packets being dropped, however packets ARE actually being dropped. If you encounter packet drop issues in an 82574 or 82583-based adapter, you can verify that your adapter needs the fix by using ethtool: # ethtool -e eth0 Offset Values —— —— 0x0000 00 1b 21 51 39 8c 20 0d 46 f7 a1 10 ff ff ff ff 0x0010 29 e6 02 64 6b 02 00 00 86 80 0c 15 ff ff 58 9c ^^ The value at offset 0x001e (58) has bit 1 unset. This enables the problematic power saving feature. In this case, the EEPROM needs to read “5a” at offset 0x001e. A one-time EEPROM fix is available as a shell script. This script will verify that the adapter is applicable to the fix and whether the fix is needed or not. If the fix is required, it applies the change to the EEPROM and updates the checksum. The user must reboot the system after applying the fix if changes were made to the EEPROM. Example output of the script: # bash fixeep-82574_83.sh eth0 eth0: is a “82583V Gigabit Network Connection” This fixup is applicable to your hardware executing command: ethtool -E eth0 magic 0x150c8086 offset 0x1e value 0x5a Change made. You MUST reboot your machine before changes take effect! The script can be downloaded at [https://sourceforge.net/projects/e1000/files/e1000e%20stable/eeprom_fix_82574_or_82583/fixeep-82574_83.sh]
sh文件跟上述那个非官方文件不大一样,不过核心的地方是一样的:
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 \<interface\>"
echo " i.e. $0 eth0"
exit 1
fi
if ! ifconfig $1 > /dev/null; then
exit 1
fi
bdf=$(ethtool -i $1 | grep "bus-info:" | awk '{print $2}')
dev=$(lspci -s $bdf -x | grep "00: 86 80" | awk '{print "0x"$5$4$3$2}')
case $dev in
0x10d38086)
echo "$1: is a \"82574L Gigabit Network Connection\""
;;
0x10f68086)
echo "$1: is a \"82574L Gigabit Network Connection\""
;;
0x150c8086)
echo "$1: is a \"82583V Gigabit Network Connection\""
;;
*)
echo "No appropriate hardware found for this fixup"
exit 1
;;
esac
echo "This fixup is applicable to your hardware"
var=$(ethtool -e $1 | grep 0x0010 | awk '{print $16}')
new=$(echo ${var:0:1}`echo ${var:1} | tr '014589bc' '2367abef'`)
if [ ${var:0:1}${var:1} == $new ]; then
echo "Your eeprom is up to date, no changes were made"
exit 2
fi
echo "executing command: ethtool -E $1 magic $dev offset 0x1e value 0x$new"
ethtool -E $1 magic $dev offset 0x1e value 0x$new
echo "Change made. You *MUST* reboot your machine before changes take effect!"
Both the e1000e and e1000 drivers have changed to a kernel-only support model. Thus, the latest e1000e release is 3.8.7 and the latest for e1000 is 8.0.35. In brief, the kernel drivers (drivers included with the Operating System) will be the latest. Bug fixes and changes are made upstream in the Linux kernel.
ASPM(Active State Power Management)和ACPI(Advanced Configuration and Power Interface)是与电源管理相关的两个不同的技术标准,通常在计算机硬件和操作系统中使用。 ACPI(Advanced Configuration and Power Interface): ACPI是一种电源管理标准,旨在帮助操作系统有效地管理硬件设备的能源消耗和配置。它定义了一组用于控制系统硬件设备状态、电源模式和系统资源分配的接口和数据结构。ACPI允许操作系统在需要时通过合理的方式控制设备的电源状态,以实现节能和优化性能。此外,ACPI还可以用于执行系统休眠和唤醒操作,以及管理各种硬件事件。 ASPM(Active State Power Management): ASPM是ACPI的一部分,专门用于管理PCI Express(PCIe)总线上的电源状态。PCIe是一种高速总线技术,用于连接各种硬件组件,如显卡、存储设备等。ASPM允许PCIe设备在不活动时进入低功耗模式,从而降低系统能耗。ASPM可以在操作系统和系统BIOS中进行配置,以便根据系统需求启用或禁用。 综上所述,ASPM是ACPI的一部分,而ACPI是一个更广泛的电源管理标准,用于控制整个计算机系统的电源状态和配置。ASPM则更专注于PCIe总线上的电源管理,以减少PCIe设备的能源消耗。