openWRT在M93p上出现的Detected Hardware Unit Hang

问题深入分析

M93p使用的网卡是Intel I217-LM网卡。
经过搜索,发现Intel网卡经常会出现Detected Hardware Unit Hang的问题。国外也有很多案例。大家普遍认为这是驱动问题,常规的解决办法就是关闭掉网卡的offload功能。
我猜想,既然是驱动问题,那我尝试在更新好openwrt的驱动是否能解决呢?
我们使用命令ethtool -i eth0查看驱动的情况:
root@OpenWrt:~# ethtool -i eth0
driver: e1000e
version: 3.2.6-k
firmware-version: 0.12-4
expansion-rom-version:
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
可以看出网卡驱动的八本是3.2.6-k。对比Intel官网,最新驱动是3.8。
于是我在编译的时候更新好驱动,并重新写入新的openwrt系统。
root@OpenWrt:~# ethtool -i eth0
driver: e1000e
version: 3.8.4-NAPI
firmware-version: 0.12-4
expansion-rom-version:
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
这是更新后的驱动版本,3.8.4-NAPI。此时我发现故障还是能复现。

刚好手里有一块主板集成的是I219-LM的网卡运行却正常。对比这2块网卡,发现只有firmware版本不一致,I217-LM的是0.12-4,而I219-LM的是0.13-4。所以猜想是不是由于firmware的问题。但是集成主板的firmware该如何升级呢?尝试升级主板BIOS也不行。所以只能采用关闭offload的方式。

由于每次重启之后关闭是offload又会开启,所以需要编写自启动脚本每次重启后,再关闭offload。

解决办法

ssh到openwrt,使用 ethtool -K eth0 tx off rx off关闭网卡的offload功能。

使用ethtool --show-offload eth0来查看offload功能是否被关闭

root@OpenWrt:~# ethtool --show-offload eth0
Features for eth0:
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: off [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]

自启动脚本编写

编写自启动脚本为e1000e,过程如下:
vi e1000e

#!bin/sh /etc/rc.common

START=99

start(){
ethtool -K eth0 tx off rx off >/tmp/e1000e.log
}

chmod 777 /etc/init.d/e1000e

ln -s /etc/init.d/e1000e /etc/rc.d/S99e1000e

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值