楼主: HKDepartment

how to solve it?

[复制链接]
发表于 2011-11-26 23:20:44 | 显示全部楼层
Please refer 5#, already tired r8168 and confirm dirver is load correctly by ethtool.

回复 支持 反对

使用道具 举报

发表于 2011-11-26 23:57:36 | 显示全部楼层
本帖最后由 xiaoQ 于 2011-11-26 23:58 编辑

过去我遇到过这个问题,通过下面脚本查看drop值
# for a in {0..9} ; do ifconfig eth0|grep 'RX packets';sleep 0.01;done

当时,google了一番,发现故障原因有以下说法:
  内核版本存在BUG;  
  驱动存在问题;
  网卡输出队列值(tx_que_size)不足。

当时我的原因是驱动不符造成的。楼主,看贴出来的设备为r8168(lspci查看),但驱动好像加载的为r8169(linux内核内默认编译的)的。你按照我下面方法重新编译个r8168的,试试:
1)从Realtek 网站下载最新的网卡驱动源码。下载r8168-8.012.00.tar.bz2。
2)解压缩存档文件
# tar -jxf r8168-xxx.yyy.zzz.tar.bz2
3)配置编译环境
# aptitude install build-essential linux-headers-`uname -r`
4)编译驱动源码
# cd r8168-xxx.yyy.zzz
# make clean modules
# make install
5)删除错误已加载的网卡驱动模块 (命令lsmod查看)
# rmmod r8169
# rmmod r8168
6)拷贝编译好的模块r8168
# cp r8168.ko  /lib/modules/`uname -r`/kernel/drivers/net/
7)Genrate module dependency(生成模块依赖。将所有的模块进行重新分析的工作,建立关联文件)
# depmod -a
8)加载模块r8168
# modprobe r8168
9)update existing initramfs
# update-initramfs -u
10)将r8169加到/etc/modprobe.d/blacklist
# echo blacklist r8169  >>/etc/modprobe.d/blacklist
11)重启网络服务
# /etc/init.d/networking restart

先这样试着做次,如果还不行,再排除其他可能



回复 支持 反对

使用道具 举报

发表于 2011-11-27 00:21:57 | 显示全部楼层
Please refer to 5#. r8168 has been tried (actually tired many times).
> install network driver r8168 v8.026.00 from Realtek (confrim with "ethtool -i eth0") -> packet drop

Anyway, once again. Please see the result below for r8168 fyr.

root@U-NAS:~# lsmod | grep r81
r8168                 194469  0

root@U-NAS:~# ethtool -i eth0
driver: r8168
version: 8.026.00-NAPI
firmware-version:
bus-info: 0000:01:00.0

root@U-NAS:~# modinfo r8168
filename:       /lib/modules/2.6.35-unas-1.0/kernel/drivers/net/r8168.ko
version:        8.026.00-NAPI
license:        GPL
description:    RealTek RTL-8168 Gigabit Ethernet driver
author:         Realtek and the Linux r8168 crew <netdev@vger.kernel.org>
    .
    .

root@U-NAS:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:e0:6f:0f:0e:86
          inet addr:192.168.1.110  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:244978 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2200437 errors:0 dropped:2012 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21352247 (20.3 MiB)  TX bytes:2940517909 (2.7 GiB)
          Interrupt:41 Base address:0xa000

root@U-NAS:~# dmesg
    .
    .
[  413.360007] ------------[ cut here ]------------
[  413.360021] WARNING: at net/sched/sch_generic.c:258 dev_watchdog+0xef/0x18c()
[  413.360026] Hardware name: To Be Filled By O.E.M.
[  413.360031] NETDEV WATCHDOG: eth0 (r8168): transmit queue 0 timed out
[  413.360035] Modules linked in: ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables lm78 hwmon_vid nfsd nfs lockd fscache nfs_acl auth_rpcgss sunrpc xfs exportfs raid1 md_mod snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq snd_timer snd_seq_device tpm_tis tpm evdev psmouse tpm_bios i2c_i801 snd i2c_core pcspkr serio_raw soundcore button snd_page_alloc ext4 mbcache jbd2 crc16 dm_mod usbhid sd_mod ata_generic crc_t10dif hid usb_storage ata_piix sata_sil libata uhci_hcd ehci_hcd scsi_mod usbcore r8168 nls_base thermal [last unloaded: scsi_wait_scan]
[  413.360124] Pid: 0, comm: swapper Not tainted 2.6.35-unas-1.0 #1
[  413.360129] Call Trace:
[  413.360132]  <IRQ>  [<ffffffff81044013>] ? warn_slowpath_common+0x78/0x8c
[  413.360148]  [<ffffffff810440c6>] ? warn_slowpath_fmt+0x45/0x4a
[  413.360156]  [<ffffffff8126443a>] ? netif_tx_lock+0x3d/0x65
[  413.360163]  [<ffffffff81264551>] ? dev_watchdog+0xef/0x18c
[  413.360171]  [<ffffffff81057a0f>] ? __queue_work+0x27/0x38
    .
    .

root@U-NAS:~# uname -a
Linux U-NAS 2.6.35-unas-1.0 #1 SMP Mon Jun 27 14:05:50 CST 2011 x86_64 GNU/Linux





回复 支持 反对

使用道具 举报

发表于 2011-11-27 11:31:48 | 显示全部楼层
试过其它的router吗?有时候问题是双向的,也有可能是router导致的。换个router试试?
回复 支持 反对

使用道具 举报

发表于 2011-11-27 13:28:32 | 显示全部楼层
试过, please see below fyi.

Network
     update latest firmware on Netgear WNDR3700 and also tried DD-WRT -> packet drop
     use and old 100M route from PCCW -> packet drop
     NFS/SMB share media files from U-NAS to Xtreamer -> packet drop
     CIFS share media files for ASUS desktop (Windows 7) to Xtreamer -> ok
     Use 3m Cat 6 cable direct connect U-NAS to ASUS desktop -> packet drop
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|万由科技 ( 浙ICP备10004788号-13 )

GMT+8, 2024-5-16 05:08 , Processed in 0.057697 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表