主板: 微星MSI 迫击炮 B550
网卡: Intel Corporation Ethernet Connection (7) I219-V (rev 10)
内核版本: Linux 5.11.22-1-pve #1 SMP PVE 5.11.22-2
PVE版本: pve-manager/7.0-8/b1dbf562
问题现象: 每隔1-3分钟, 网卡会掉线15-30秒 , 期间ping丢包100%, ip丢包100%. 系统日志提示如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 Aug 15 18:48:46 proxmox kernel: e1000e 0000:00:1f.6 eno1: Detected Hardware Unit Hang: TDH <39> TDT <7b> next_to_use <7b> next_to_clean <38> buffer_info[next_to_clean]: time_stamp <1015769ac> next_to_watch <39> jiffies <101576ae0> next_to_watch.status <0> MAC Status <40080083> PHY Status <796d> PHY 1000BASE-T Status <3800> PHY Extended Status <3000> PCI Status <10> Aug 15 18:48:48 proxmox kernel: e1000e 0000:00:1f.6 eno1: Detected Hardware Unit Hang: TDH <39> TDT <7b> next_to_use <7b> next_to_clean <38> buffer_info[next_to_clean]: time_stamp <1015769ac> next_to_watch <39> jiffies <101576cd0> next_to_watch.status <0> MAC Status <40080083> PHY Status <796d> PHY 1000BASE-T Status <3800> PHY Extended Status <3000> PCI Status <10> Aug 15 18:48:50 proxmox kernel: e1000e 0000:00:1f.6 eno1: Detected Hardware Unit Hang: TDH <39> TDT <7b> next_to_use <7b> next_to_clean <38> buffer_info[next_to_clean]: time_stamp <1015769ac> next_to_watch <39> jiffies <101576ec8> next_to_watch.status <0> MAC Status <40080083> PHY Status <796d> PHY 1000BASE-T Status <3800> PHY Extended Status <3000> PCI Status <10> Aug 15 18:48:52 proxmox kernel: e1000e 0000:00:1f.6 eno1: Detected Hardware Unit Hang: TDH <39> TDT <7b> next_to_use <7b> next_to_clean <38> buffer_info[next_to_clean]: time_stamp <1015769ac> next_to_watch <39> jiffies <1015770b8> next_to_watch.status <0> MAC Status <40080083> PHY Status <796d> PHY 1000BASE-T Status <3800> PHY Extended Status <3000> PCI Status <10> Aug 15 18:48:54 proxmox kernel: e1000e 0000:00:1f.6 eno1: Detected Hardware Unit Hang: TDH <39> TDT <7b> next_to_use <7b> next_to_clean <38> buffer_info[next_to_clean]: time_stamp <1015769ac> next_to_watch <39> jiffies <1015772b0> next_to_watch.status <0> MAC Status <40080083> PHY Status <796d> PHY 1000BASE-T Status <3800> PHY Extended Status <3000> PCI Status <10> Aug 15 18:48:54 proxmox kernel: e1000e 0000:00:1f.6 eno1: Reset adapter unexpectedly
解决方法: 驱动问题, 需要关闭网卡的一些属性.
1 ethtool -K eno1 gso off gro off tso off tx off rx off rxvlan off txvlan off sg off
使用apt install -y ethtool
以安装以太网工具.
此改动仅限本次开机期间, 重启后会失效. 持久化保存需要修改 /etc/network/interfaces
在对应的网卡配置下, 与address
同级添加配置:
1 2 3 4 5 6 7 8 9 10 offload-gso off offload-gro off offload-tso off offload-rx off offload-tx off offload-rxvlan off offload-txvlan off offload-sg off offload-ufo off offload-lro off
不修改interfaces
也可以使用另一种方式, 即开机运行一次ethtool
命令, 创建一个ethfix.service
1 2 3 4 5 6 7 8 9 [Unit] Description=Fix network card on boot [Service] Type=simple ExecStart=/usr/sbin/ethtool -K eno1 gso off gro off tso off tx off rx off rxvlan off txvlan off sg off [Install] WantedBy=multi-user.target
运行systemctl enable ethfix
, 即可在今后开机时自动应用改动.
参考 e1000 driver hang | Proxmox Support Forum
e1000 driver hang | Page 8 | Proxmox Support Forum
e1000e eno1: Detected Hardware Unit Hang: | Proxmox Support Forum
ethtool(8) — Linux manual page
TSO、UFO、GSO、LRO、GRO和RSS介绍(ethtool命令)