e1000e 意外重置适配器/检测到硬件单元挂起

Kyl*_*ots 48 networking ethernet nic forwarding linux-networking

我有一台戴尔 1U 服务器,带有 Intel(R) Xeon(R) CPU L5420 @ 2.50GHz,8 核,在 x86_64 上运行 Ubuntu 服务器内核版本 3.13.0-32-generic。它具有双 1000baseT 网卡。我已将其设置为将数据包从 eth0 转发到 eth1。

我注意到在我的 kern.log 文件中它一直挂着然后休息。这经常发生。这种情况每隔几秒钟发生一次,然后可能几分钟就可以了,然后每隔几秒钟就会恢复。

这是日志文件转储:

 [118943.768245] e1000e 0000:00:19.0 eth0: Detected Hardware Unit Hang:
 [118943.768245]   TDH                  <45>
 [118943.768245]   TDT                  <50>
 [118943.768245]   next_to_use          <50>
 [118943.768245]   next_to_clean        <43>
 [118943.768245] buffer_info[next_to_clean]:
 [118943.768245]   time_stamp           <101c48d04>
 [118943.768245]   next_to_watch        <45>
 [118943.768245]   jiffies              <101c4970f>
 [118943.768245]   next_to_watch.status <0>
 [118943.768245] MAC Status             <80283>
 [118943.768245] PHY Status             <792d>
 [118943.768245] PHY 1000BASE-T Status  <7800>
 [118943.768245] PHY Extended Status    <3000>
 [118943.768245] PCI Status             <10>
 [118944.780015] e1000e 0000:00:19.0 eth0: Reset adapter unexpectedly
Run Code Online (Sandbox Code Playgroud)

以下是来自 ethtool 的信息:

设置:

Settings for eth0:

Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
               drv probe link
Link detected: yes
Run Code Online (Sandbox Code Playgroud)

司机资料:

ethtool -i eth0

driver: e1000e
version: 2.3.2-k
firmware-version: 1.4-0
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
Run Code Online (Sandbox Code Playgroud)

什么可能导致这种情况?这只是软件中的错误还是实际的硬件问题?我看到许多其他人有类似的问题,但没有真正的解决方案,这也让我相信这是一个软件问题?

也许有人可以为我阐明这一点?

Kyl*_*ots 38

好吧,昨晚发布这个问题后,我继续做一些研究,我遇到的唯一真正的解决方案似乎已经解决了这个问题。

使用 ethtool 禁用 TSO、GSO 和 GRO:

ethtool -K eth0 gso off gro off tso off
Run Code Online (Sandbox Code Playgroud)

根据在这里找到的帖子:http : //ehc.ac/p/e1000/bugs/378/

据我了解,这将或可能导致性能下降。

我还注意到另一个解决方案是禁用活动状态电源管理

pcie_aspm=off
Run Code Online (Sandbox Code Playgroud)

根据 serverfault 上的这篇文章:Linux e1000e(英特尔网络驱动程序)问题很多,我从哪里开始?

我还没有尝试过这个解决方案。我会尝试一下,看看这是否有所作为,然后发回我的发现。

编辑:

好的,所以我尝试关闭活动状态电源管理, pcie_aspm=off 并且这没有任何效果。我继续注意到日志文件中的错误。

这可能仍然适用于某些英特尔网卡,因为在启用电源管理时,某些英特尔网卡会出现不同内核入睡的问题。

  • 谢谢!我尝试了 ethtool 修复程序,它解决了我的问题。(也把它卡在一个初始化脚本中) (2认同)
  • '根据在这里找到的帖子:http://ehc.ac/p/e1000/bugs/378/'现在转到域名抢注,原始内容可以在这里找到:https://web.archive.org/web /20160205153351/http://ehc.ac:80/p/e1000/bugs/378/ (2认同)

小智 9

在 BIOS 中禁用增强型 C1 (C1E) 为我修复了它。

不确定 C1E 的低功耗状态是否会干扰驱动程序,或者当处理器处于此状态时驱动程序中是否存在 oops。

总之,问题解决了。


Dav*_*gen 9

禁用TCP 分段卸载 (TSO) 对我来说很有效。

ethtool -K eth0 tso off
Run Code Online (Sandbox Code Playgroud)

注意:似乎没有必要同时禁用通用接收卸载 (GRO) 和通用分段卸载 (GSO),因为各种来源都建议这样做。据我了解,这些都是纯粹用软件实现的,应该是安全的。不要牺牲不必要的性能。