delih 发表于 2013-5-22 08:53:31

关于DELLR710/R910(rhel5.3-5.5) Broadcom netxtreme 5709网卡间歇性的停止接收...

问题描述:rhel5.5系统在做压力测试时,因网络流量较大致使网卡间歇性的停止接收数据包的问题,经查是redhat系统自带网卡驱动有BUG,需要更新网卡驱动,以下为问题描述和驱动更新方法:Why does the Broadcom NetXtreme 5709 NIC stop receiving packets intermittently on RHEL 5.3 and newer?Article ID: 26837- Created on: Mar 2, 2010 9:41 PM- Last Modified:Mar 24, 2011 5:05 PMIssue In certain situations under heavy loads, the network interface card can stop accepting packets from remote devices. This problem has been reported on Red Hat Enterprise Linux 5.3 (RHEL 5.3) and newer when using a Broadcom NetXtreme 5709 network interface card.EnvironmentRed Hat Enterprise Linux 5.3 to 5.5 Network Interface Cards (NIC) using the bnx2 driver including:Broadcom Corporation NetXtreme II BCM5709S Gigabit EthernetResolutionRed Hat has released kernel-2.6.18-194.3.1.el5 which will address this issue in RHEL 5. It can be downloaded from the following link:
https://rhn.redhat.com/errata/RHSA-2010-0398.html* in certain circumstances, under heavy load, certain network interface cards using the bnx2 driver and configured to use MSI-X, could stop processing interrupts and then network connectivity would cease.(BZ#587799)If upgrading the kernel is not an option, review the following workarounds Disable MSI-X in the bnx2 driver. To do this, add the following line to /etc/modprobe.confooptions bnx2 disable_msi=1Disable MSI completely by booting with thepci=nomsi boot parameter. Obviously, this will disable MSI on all devices that are able to utilize it.
Note: MSI-X increases network performance so disabling it means that the performance will return to the level available before MSI-X was introduced. Disable C-States in BIOS. Refer to the vendor system documentation in order to learn how to do this.Root Cause The kernel gets outof sync with interrupts generated by the networkinterface card which results in an inability to process interrupts,causing packets to be dropped and ultimately, lost connectivity. When this situationoccurs, the rx_fw_discards counter willkeep increasing as remote devices unsuccessfully attempt tocommunicate with the system via the NIC. It has been reported that under certain heavy traffic conditions in MSI-X mode, the bnx2 driver can lose an MSI-X vector causing all packets in the associated rx/tx ring pair to be dropped.The problem is caused by the chip dropping the write to unmask the MSI-X vector by the kernel (when migrating the IRQ for example).This can be prevented by increasing the GRC timeout value for these register read and write operations.The upstream patch resolving this issue is available here.

以下是更新网卡驱动方法:
1 –在编译网卡之前,先检查网卡使用的网卡驱动模块名。#cat /etc/modprobe.confalias eth0 bnx2      ß表明网卡驱动模块名为bnx2alias eth1 bnx2alias eth2 bnx2alias eth3 bnx2

2 –检查当前是否有已加载网卡驱动模块bnx2#lsmod | grep bnx2bnx2                  1790210    ß表明系统已有加载完网卡驱动模块bnx2i                  404130cnic                   448771 bnx2ilibiscsi2            426936 be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libiscsi_tcpscsi_transport_iscsi2    377098 be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libiscsi2scsi_mod            14197315 be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libiscsi2,scsi_transport_iscsi2,scsi_dh,sg,pvscsi,libata,mptspi,mptscsih,scsi_transport_spi,sd_mod

3 –查看当前驱动模块信息,从而得到驱动模块的版本,以便验证稍后网卡驱动模块升级#modinfo bnx2filename:       /lib/modules/2.6.18-194.el5/kernel/drivers/net/bnx2.ko ß网卡驱动存放的路径,升级后网卡存放路径与此路径不同version:      2.0.2   ß表明网卡模块版本为2.0.2,是系统默认网卡驱动版本license:      GPLdescription:    Broadcom NetXtreme II BCM5706/5708/5709/5716 Driverauthor:         Michael Chan <mchan@broadcom.com>srcversion:   7025AAF3645EE432EAF1C00alias:          pci:v000014E4d0000163Csv*sd*bc*sc*i*alias:          pci:v000014E4d0000163Bsv*sd*bc*sc*i*alias:          pci:v000014E4d0000163Asv*sd*bc*sc*i*alias:          pci:v000014E4d00001639sv*sd*bc*sc*i*alias:          pci:v000014E4d000016ACsv*sd*bc*sc*i*alias:          pci:v000014E4d000016AAsv*sd*bc*sc*i*alias:          pci:v000014E4d000016AAsv0000103Csd00003102bc*sc*i*alias:          pci:v000014E4d0000164Csv*sd*bc*sc*i*alias:          pci:v000014E4d0000164Asv*sd*bc*sc*i*alias:          pci:v000014E4d0000164Asv0000103Csd00003106bc*sc*i*alias:          pci:v000014E4d0000164Asv0000103Csd00003101bc*sc*i*depends:      vermagic:       2.6.18-194.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1parm:         disable_msi:Disable Message Signaled Interrupt (MSI) (int)parm:         enable_entropy:Allow bnx2 to populate the /dev/random entropy pool (int)module_sig:   883f3504ba037551e1fa4939f6a62931127b30a0e5a160a7ad7a7b9b2c162b309b3316fddc41f280a0cbecbd80e777d961e16218019c365c4b328d1a8

4 –从DELL网站下载Broadcom网卡驱动包
ftp://ftp.dell.com/FOLDER29291M/1/Bcom_LAN_16.2.0_Linux_Source_A01.tar.gz。解压开始安装#tar -vzxf Bcom_LAN_16.2.0_Linux_Source_A01.tar.gz   ß解压驱动包Bcom_LAN_16.2.0_Linux_Source_A01/Bcom_LAN_16.2.0_Linux_Source_A01/Linux_Readme/Bcom_LAN_16.2.0_Linux_Source_A01/Linux_Readme/linux_readme.txtBcom_LAN_16.2.0_Linux_Source_A01/NetXtreme/Bcom_LAN_16.2.0_Linux_Source_A01/NetXtreme/ChangeLogBcom_LAN_16.2.0_Linux_Source_A01/NetXtreme/README.TXTBcom_LAN_16.2.0_Linux_Source_A01/NetXtreme/tg3-3.115j-1.src.rpmBcom_LAN_16.2.0_Linux_Source_A01/NetXtreme/tg3-3.115j.tar.gzBcom_LAN_16.2.0_Linux_Source_A01/NetXtreme/tg3_sup-3.115j-1.ISO.tar.gzBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/Bcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/brcm_iscsi_uio-0.6.2.13.tar.gzBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/netxtreme2-6.2.23-1.src.rpmBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/netxtreme2-6.2.23.tar.gzBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/netxtreme2_sup-6.2.23-1.ISO.tar.gzBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/READMEBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/RELEASE.bnx2.TXTBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/RELEASE.bnx2i.TXTBcom_LAN_16.2.0_Linux_Source_A01/NetXtremeII/RELEASE.bnx2x.TXT
#cd Bcom_LAN_16.2.0_Linux_Source_A01   ß进入解压出来的目录
#lsß显示文件夹内容Linux_ReadmeNetXtremeNetXtremeII
#cd NetXtremeII/ß进入到网卡驱动资源目录
#lsß显示此目录的内容brcm_iscsi_uio-0.6.2.13.tar.gz      READMEnetxtreme2-6.2.23-1.src.rpm         RELEASE.bnx2i.TXTnetxtreme2-6.2.23.tar.gz            RELEASE.bnx2.TXTnetxtreme2_sup-6.2.23-1.ISO.tar.gzRELEASE.bnx2x.TXT
#rpm -ivh netxtreme2-6.2.23-1.src.rpm   ß安装编译网卡所需要的资源1:netxtreme2             ########################################### ***************************************************************************Note:(1) –RPM包netxtreme2-6.2.23-1.src.rpm所包含的内容,及存放的目录# rpm -qlp netxtreme2-6.2.23-1.src.rpm/usr/src/redhat/SOURCES/netxtreme2-6.2.23.tar.bz2/usr/src/redhat/SPECS/netxtreme2.spec(2) -Question:安装netxtreme2-6.2.23-1.src.rpm时会报“error: cannot create %sourcedir /usr/src/redhat/SOURCES”信息。Cause:没有安装qlp rpm-build-4.4.2.3-18.el5.i386.rpm包。Resolution:安装rpm-build,同时关联binutils,elfutils两个包。可解决此问题。### /usr/src/redhat/SOURCES此目录是由rpm-build软件包安装生成#### rpm -qlp rpm-build-4.4.2.3-18.el5.i386.rpmß检查rpm-build软件包所包含的内容/usr/bin/rpmbuild/usr/src/redhat/usr/src/redhat/BUILD/usr/src/redhat/RPMS/usr/src/redhat/RPMS/athlon/usr/src/redhat/RPMS/geode/usr/src/redhat/RPMS/i386/usr/src/redhat/RPMS/i486/usr/src/redhat/RPMS/i586/usr/src/redhat/RPMS/i686/usr/src/redhat/RPMS/noarch/usr/src/redhat/SOURCES/usr/src/redhat/SPECS/usr/src/redhat/SRPMS***************************************************************************

5 –编译网卡驱动#rpmbuild -bb SPECS/netxtreme2.specExecuting(%prep): /bin/sh -e /var/tmp/rpm-tmp.98884+ umask 022+ cd /usr/src/redhat/BUILD+ LANG=C+ export LANG+ unset DISPLAY+ cd /usr/src/redhat/BUILD+ rm -rf netxtreme2-6.2.23+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/netxtreme2-6.2.23.tar.bz2+ tar -xvvf -drwxr-xr-x root/root         0 2011-02-11 04:25:14 netxtreme2-6.2.23/drwxr-xr-x root/root         0 2011-02-11 04:25:14 netxtreme2-6.2.23/bnx2x-1.62.15/…… ß省略编译过程Requires(interp): /bin/sh /bin/shRequires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1Requires(post): /bin/shRequires(postun): /bin/shChecking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/netxtreme2-buildrootWrote: /usr/src/redhat/RPMS/i386/netxtreme2-6.2.23-1.i386.rpm   ß可以看到生成的网卡驱动RPM包:netxtreme2-6.2.23-1.i386.rpmExecuting(%clean): /bin/sh -e /var/tmp/rpm-tmp.28263+ umask 022+ cd /usr/src/redhat/BUILD+ cd netxtreme2-6.2.23+ rm -rf /var/tmp/netxtreme2-buildroot /usr/src/redhat/BUILD/file.list.netxtreme2+ exit 0***************************************************************************Note:(1)-Question:编译网卡驱动报错,退出编译过程,无法编译成功# rpmbuild -bb SPECS/netxtreme2.spec/var/tmp/rpm-tmp.9077: line 32: make: command not founderror: Bad exit status from /var/tmp/rpm-tmp.9077 (%build)RPM build errors:   Bad exit status from /var/tmp/rpm-tmp.9077 (%build)Cause:是因为没有编译环境,或编译环境不全导致。Resolution:需要安装RPM包“kernel-devel”和RPM包组"Development Tools"建议使用YUM环境安装以上RPM包,以解决RPM包关联性问题。安装命令如下:# yum groupinstall "Development Tools"# yum install kernel-devel***************************************************************************

6 –安装已编译好的网卡驱动#rpm -ivh RPMS/i386/netxtreme2-6.2.23-1.i386.rpmPreparing...                ########################################### 1:netxtreme2             ###########################################

7 –安装新网卡驱动RPM包后,重新检查已挂载的网卡驱动模块。#modinfo bnx2filename:       /lib/modules/2.6.18-194.el5/updates/bnx2.ko          ß可以看到网卡驱动模块地址已经更新version:      2.0.23b                                              ß可以新网卡驱动版本从2.0.2升级到2.0.23blicense:      GPLdescription:    Broadcom NetXtreme II BCM5706/5708/5709/5716 Driverauthor:         Michael Chan <mchan@broadcom.com>srcversion:   6E0DD070AB24C11F50B2712alias:          pci:v000014E4d0000163Csv*sd*bc*sc*i*alias:          pci:v000014E4d0000163Bsv*sd*bc*sc*i*alias:          pci:v000014E4d0000163Asv*sd*bc*sc*i*alias:          pci:v000014E4d00001639sv*sd*bc*sc*i*alias:          pci:v000014E4d000016ACsv*sd*bc*sc*i*alias:          pci:v000014E4d000016AAsv*sd*bc*sc*i*alias:          pci:v000014E4d000016AAsv0000103Csd00003102bc*sc*i*alias:          pci:v000014E4d0000164Csv*sd*bc*sc*i*alias:          pci:v000014E4d0000164Asv*sd*bc*sc*i*alias:          pci:v000014E4d0000164Asv0000103Csd00003106bc*sc*i*alias:          pci:v000014E4d0000164Asv0000103Csd00003101bc*sc*i*depends:      vermagic:       2.6.18-194.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1parm:         disable_msi:Disable Message Signaled Interrupt (MSI) (int)parm:         stop_on_tx_timeout:For debugging purposes, prevent a chipreset when a tx timeout occurs (int)
8 –重启系统,在使用modinfo命令,再次验收升级结果,如果显示为新模块,表明升级成功。

网络浪子 发表于 2013-5-22 09:03:52

我妈常说,我们家要是没有电话就不会这么穷。

q528 发表于 2013-5-22 09:06:06

如果跟导师讲不清楚,那么就把他搞胡涂吧!

bjghzly 发表于 2013-5-22 09:19:15

生,容易。活,容易。生活,不容易。

lipeng 发表于 2013-5-22 09:33:54

男人偷腥时的智商仅次于爱因斯坦!

santaclaus 发表于 2013-5-22 09:35:52

如果恐龙是人,那人是什么?

gteric 发表于 2013-5-22 09:36:04

找到好贴不容易,我顶你了,谢了
页: [1]
查看完整版本: 关于DELLR710/R910(rhel5.3-5.5) Broadcom netxtreme 5709网卡间歇性的停止接收...