0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VMware vSphere ESXiでigbがdev_watchdogで死なないようにする

Last updated at Posted at 2016-06-11

現象

さて、Open-AVB用に買ったI210-T1で、linuxptpをハードタイムスタンプでやるかな。
というわけで、インターフェースをUPすると、こんな感じでドライバのigbが死ぬ。

igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
igb 0000:0b:00.0: Using MSI-X interrupts. 2 rx queue(s), 2 tx queue(s)
:
igb 0000:0b:00.0 ens192: igb: ens192 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:303 dev_watchdog+0x235/0x240()
NETDEV WATCHDOG: ens192 (igb): transmit queue 0 timed out

ググると、結構前から起こり得る現象のようだ。

環境

  • CPU: Core i7 Ivy Bridge(非Kモデル)
  • マザー: VT-d対応
  • ホスト: VMware vSphere ESXi 6.0
  • ゲスト: Arch Linux 4.5.4-1-ARCH
  • NIC: Intel Ethernet Server Adapter I210-T1 (PCIパススルー接続)
  • OSのigb: 5.3.0-k
  • 最新のigb: 5.3.5.3

原因と対策

ググると、なんとなくMSI-Xが関係していそうだ。
igbには、IntModeというオプションがあり、割り込みモードを指定できる。
manによると、

       IntMode

              Valid Range: 0-2 (0 = Legacy Int, 1 = MSI and 2 = MSI-X)

              IntMode controls allow load time control over the type of inter‐
              rupt registered for by the driver. MSI-X is required for  multi‐
              ple  queue  support, and some kernels and combinations of kernel
              .config options will force a lower level of interrupt support.

とのことで、これをdefaultっぽいMSI-XからMSIにしたらどうだろう。

検証

# rmmod igb
# modprobe igb IntMode=1
# ip link set ens192 up

ところが、dmesgには

igb 0000:0b:00.0 ens192: Reset adapter

なるエラーが繰り返される。
最新版のigbにしたら?

最新ドライバ

ありがたいことに、I210には、本家にLinux用ドライバのソースがある。
これをbuildするには、kernelのヘッダ - Arch Linuxの場合はlinux-headers - が必要。
buildは簡単、makeするだけ。

検証再び

# rmmod igb
# insmod ./igb.ko IntMode=1
# ip link set ens192 up
# ethtool -i ens192
driver: igb
version: 5.3.5.3

最新版になっている。さてさて、dmesgは?

Intel(R) Gigabit Ethernet Network Driver - version 5.3.5.3
Using MSI interrupts. 1 rx queue(s), 1 tx queue(s)
:
igb 0000:0b:00.0 ens192: igb: ens192 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

とりあえず、死ななくなった!

でも

queueが1本になっちゃうの?
AVBのigb_avbにマージしても、AVBはできないか。
ESXiのpciPassthru0.msiEnabledあたりを調べる必要があるのかな…。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?