debian6更新網卡驅動

Last Update: 2011-12-18
ifconfig發現機器有很多錯誤包,如下:
eth1      Link encap:Ethernet  HWaddr 00:1e:67:07:ef:25  
         inet addr:192.168.0.146  Bcast:192.168.255.255  Mask:255.255.255.0
         inet6 addr: fe80::21e:67ff:fe07:ef25/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1370106046 errors:5336 dropped:0 overruns:0 frame:5336
         TX packets:1168372497 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:1468098380312 (1.3 TiB)  TX bytes:1199235165999 (1.0 TiB)
         Memory:b1a00000-b1a20000
相同配置,相同應用的機器都有這錯誤,所以抽空排查一下原因。
網線和交換機都是新的,網卡是 Intel千M,82574L 模塊。
在sf.net上下載intel對應驅動e1000e,make install編譯出錯:
  1. root@d1-197:~/e1000e-1.6.3/src# make install

  2. make -C /lib/modules/2.6.32-5-amd64/build SUBDIRS=/root/e1000e-1.6.3/src modules

  3. make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'

  4.  CC [M]  /root/e1000e-1.6.3/src/netdev.o

  5. /root/e1000e-1.6.3/src/netdev.c: In function ‘e1000_runtime_resume’:

  6. /root/e1000e-1.6.3/src/netdev.c:6612: error: ‘struct dev_pm_info’ has no member named ‘runtime_auto’

  7. /root/e1000e-1.6.3/src/netdev.c: At top level:

  8. /root/e1000e-1.6.3/src/netdev.c:7466: error: implicit declaration of function ‘SET_RUNTIME_PM_OPS’

  9. /root/e1000e-1.6.3/src/netdev.c:7468: error: initializer element is not constant

  10. /root/e1000e-1.6.3/src/netdev.c:7468: error: (near initialization for ‘e1000_pm_ops.suspend_noirq’)

  11. make[4]: *** [/root/e1000e-1.6.3/src/netdev.o] 錯誤 1

  12. make[3]: *** [_module_/root/e1000e-1.6.3/src] 錯誤 2

  13. make[2]: *** [sub-make] 錯誤 2

  14. make[1]: *** [all] 錯誤 2

  15. make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'

  16. make: *** [default] 錯誤 2

  17. root@d1-197:~/e1000e-1.6.3/src# ll /root/e1000e-1.6.3/src/netdev.o

最後,make CFLAGS_EXTRA=-DDISABLE_PM install ,才正常編譯出來。
不過,更換了驅動,錯誤包仍存在。
嘗試將交換機端口設置爲強制1000M,系統裏面也設置好強制千M,全雙工,關自協商,但錯誤包反而更多了,看來使用默認設置一般更好些。google一下這問題,別人都建議檢查交換機和系統設置兩邊是不是匹配,看來有時候會是因爲兩邊設置不一致導致錯誤包的產生,但這種原因導致的錯誤包,在交換機端口裏面也能顯示。
測試

1. 交換機上強制百M,系統裏面使用默認,不會出現錯誤包;

2. 編譯更新了最新版本的驅動仍不正常;
# ethtool -i eth1
driver: e1000e
version: 1.9.5-NAPI
firmware-version: 2.1-0
bus-info: 0000:01:00.0

測試方法

1. 在一臺機器上發送數據,執行命令:cat /dev/zero |nc -l -p 6666

2. 在被測試機器上執行命令:nc 192.168.200.145 6666

直接使用 ifconfig 觀察是否產生錯誤包(errors 數目)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章