問題敘述

使用 iptables 進行 NAT,傳輸檔案至不特定大小時,NAT server 斷線、kernel 鎖死,須重新開機解決。

環境

觀察

dmesg:

[246017.062280] e1000e 0000:00:1f.6 eth3: Detected Hardware Unit Hang:
[246017.062280]   TDH                  <0>
[246017.062280]   TDT                  <9>
[246017.062280]   next_to_use          <9>
[246017.062280]   next_to_clean        <0>
[246017.062280] buffer_info[next_to_clean]:
[246017.062280]   time_stamp           <103a948fc>
[246017.062280]   next_to_watch        <0>
[246017.062280]   jiffies              <103a952e7>
[246017.062280]   next_to_watch.status <0>
[246017.062280] MAC Status             <40080083>
[246017.062280] PHY Status             <796d>
[246017.062280] PHY 1000BASE-T Status  <3800>
[246017.062280] PHY Extended Status    <3000>
[246017.062280] PCI Status             <10>
[246017.066164] e1000e 0000:00:1f.6 eth3: Reset adapter unexpectedly

緩解

sudo ethtool -K <device> gro off
sudo ethtool -K <device> gso off

依參考資料1,關閉網卡的 gso, gro, tso 功能即可解決,但會導致效能降低。

經實測僅須關閉 gro, gso 即可解決本次遇到的問題。

更新

  1. 2016-12-05: 仍有問題,但不會造成 kernel 鎖死。

參考資料