Thursday, December 15, 2011

kernel: msk0: watchdog timeout

My Ethernet Card
# pciconf -lvc

mskc0@pci0:2:0:0: class=0x020000 card=0x34588086 chip=0x436111ab rev=0x18 hdr=0x00
vendor = 'Marvell Semiconductor (Was: Galileo Technology Ltd)'
device = 'Yukon 88E8050 PCI-E ASF Gigabit Ethernet Controller'
class = network
subclass = ethernet
cap 01[48] = powerspec 2 supports D0 D1 D2 D3 current D0
cap 03[50] = VPD
cap 05[5c] = MSI supports 2 messages, 64 bit enabled with 1 message
cap 10[e0] = PCI-Express 1 legacy endpoint max data 128(128) link x1(x1)
ecap 0001[100] = AER 1 0 fatal 1 non-fatal 0 corrected

Error messages from log:
# tail /var/log/messages
Dec 13 13:33:52 web0 kernel: msk0: watchdog timeout
Dec 13 13:33:52 web0 kernel: msk0: link state changed to DOWN
Dec 13 13:33:55 web0 kernel: msk0: link state changed to UP

If you see msk0 msk(4) watchdog timeouts, try disabling MSI (Message Signaled Interrupts) in /boot/loader.conf:

Note: MSI stands for Message Signaled Interrupts. MSI-X is an extension to MSI, for supporting more vectors. MSI can support at most 32 vectorsm while MSI-X can up to 2048.

# vim /boot/loader.conf
### disable MSI (Message Signaled Interrupts) support for msk ethernet card.

msk in manual:
# man 4 msk
             This tunable disables MSI support on the Ethernet hardware.  The
             default value is 0.

If it still doesn't work, try to disable TSO (net.inet.tcp.tso is set to "zero" in /etc/sysctl.conf). Active TSO causes many connection terminates, when network interfese was some load (~2 Mbit/s):

TSO (TCP segmentation offload)
The FreeBSD driver offers support for TSO (TCP Segmentation Offload).

You can enable/disable it in two ways/places:

- sysctl net.inet.tcp.tso=0 (or 1 to enable it)

Doing this disables TSO in the stack and will affect all adapters.

- ifconfig igbX -tso

Doing this will disable TSO only for this adapter.

To enable:

- ifconfig igbX tso

NOTE: By default only PCI-Express adapters are ENABLED to do TSO. Others
can be enabled by the user at their own risk
TSO is not supported on 82547 and 82544-based adapters, as well as older adapters.

# sysctl -a | grep tcp.tso
net.inet.tcp.tso: 1

Disable tso:
# vim /etc/sysctl.conf


No comments: