Quantcast
Channel: mura日記 (halfrack)
Viewing all articles
Browse latest Browse all 50

Debian で NIC offload を無効にする方法

$
0
0

rc.local に書くみたいな雑な手法ではない王道はなにか?

結論から言うと interfaces に offload-lro off とか書ける。

# grep -A3 eth2 /etc/network/interfaces
auto eth2
iface eth2 inet manual
  offload-lro off
  bond-master bond0

#

Debian のお作法として、 rc まわりの情報は /usr/share/doc/${該当機能を操作するコマンド名}/README.Debian に置いておくものらしい。

例えば /usr/share/doc/ifenslave/README.Debian.gz には、 bonding をやりたいとき interfaces にどう書けば良いかドキュメンテーションされている。

検証環境は Debian 8 Jessie です。他ディストロから来て *NIX お作法の範囲で探すんでは気づきようがなかったので、せめてポインタぐらいは man interfaces に書いといてくれとは思いました。

なお今回は、別のアプローチでググっている時に、たまたま下記が引っかかったからヒントになって発見できた。

ethtool for Debian
------------------

Most settings that can be controlled through ethtool can be specified
in /etc/network/interfaces.  They will then be applied to interfaces
that are brought up automatically at boot time or using the 'ifup'
command.  The following settings are supported:

Link mode (--change):
link-speed <speed>
link-duplex half|full

Ethernet settings (--change):
ethernet-autoneg on|off|<mask>
ethernet-port <port>
ethernet-wol <mode> [<pass-key>]

Driver control (--change):
driver-message-level <level>

Ethernet flow control (--pause):
ethernet-pause-rx on|off
ethernet-pause-tx on|off
ethernet-pause-autoneg on|off

Protocol offload (--offload):
offload-rx on|off
offload-tx on|off
offload-sg on|off
offload-tso on|off
offload-ufo on|off
offload-gso on|off
offload-lro on|off
(etc.)

Hardware tuning (--coalesce, --ring):
hardware-irq-coalesce-adaptive-rx on|off
hardware-irq-coalesce-adaptive-tx on|off
hardware-irq-coalesce-rx-usecs <n>
hardware-irq-coalesce-rx-frames <n>
(etc.)
hardware-dma-ring-rx <size>
hardware-dma-ring-rx-mini <size>
hardware-dma-ring-rx-jumbo <size>
hardware-dma-ring-tx <size>

Example:

iface eth0 inet dhcp
link-speed 100
link-duplex full
ethernet-autoneg off
ethernet-wol s 46:65:62:69:61:6e

 -- Ben Hutchings <ben@decadent.org.uk>, Sat,  4 Jun 2011 20:37:08 +0100
http://metadata.ftp-master.debian.org/changelogs/main/e/ethtool/stable_README.Debian

些細な内容だけど、ググってロクにドキュメント出てこなかったのでここに記す。


Viewing all articles
Browse latest Browse all 50

Trending Articles