From owner-freebsd-net@FreeBSD.ORG Thu Mar 8 04:17:09 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00747106566B; Thu, 8 Mar 2012 04:17:09 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id 5D1D78FC0A; Thu, 8 Mar 2012 04:17:08 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id q284H4FK020539; Thu, 8 Mar 2012 11:17:04 +0700 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <4F5832C0.8070409@rdtc.ru> Date: Thu, 08 Mar 2012 11:17:04 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: pyunyh@gmail.com References: <4F5608EA.6080705@rdtc.ru> <20120307202914.GB9436@michelle.cdnetworks.com> <4F571870.3090902@rdtc.ru> <20120308034345.GD9436@michelle.cdnetworks.com> <4F578FE1.1000808@rdtc.ru> <20120308190628.GB13138@michelle.cdnetworks.com> In-Reply-To: <20120308190628.GB13138@michelle.cdnetworks.com> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: marius@freebsd.org, yongari@freebsd.org, "net@freebsd.org" Subject: Re: suboptimal bge(4) BCM5704 performance in RELENG_8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 04:17:09 -0000 09.03.2012 02:06, YongHyeon PYUN пишет: >>>>> Show me the output of "sysctl dev.bge.0.stats". >>>> >>>> # sysctl dev.bge.0.stats >>>> dev.bge.0.stats.FramesDroppedDueToFilters: 0 >>>> dev.bge.0.stats.DmaWriteQueueFull: 84072 >>>> dev.bge.0.stats.DmaWriteHighPriQueueFull: 0 >>>> dev.bge.0.stats.NoMoreRxBDs: 0 >>>> dev.bge.0.stats.InputDiscards: 0 >>>> dev.bge.0.stats.InputErrors: 30 >>>> dev.bge.0.stats.RecvThresholdHit: 745400662 >>>> dev.bge.0.stats.DmaReadQueueFull: 2020586592 >>>> dev.bge.0.stats.DmaReadHighPriQueueFull: 0 >>>> dev.bge.0.stats.SendDataCompQueueFull: 0 >>>> dev.bge.0.stats.RingSetSendProdIndex: 2832885493 >>>> dev.bge.0.stats.RingStatusUpdate: 899990835 >>>> dev.bge.0.stats.Interrupts: 899990835 >>>> dev.bge.0.stats.AvoidedInterrupts: 0 >>>> dev.bge.0.stats.SendThresholdHit: 0 >>>> dev.bge.0.stats.rx.ifHCInOctets: 491268800 >>>> dev.bge.0.stats.rx.Fragments: 234 >>>> dev.bge.0.stats.rx.UnicastPkts: 1977202324 >>>> dev.bge.0.stats.rx.MulticastPkts: 0 >>>> dev.bge.0.stats.rx.FCSErrors: 341 >>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> You have multiple FCS and Input errors. Check signal >>> quality(i.e. UTP cable). >> >> OTOH, should not bge(4) for such errors increase "Ierrs" counters >> that shows netstat -i? >> > > You're right. I checked the code and noticed that old > controllers(BCM570[0-4]) do not report these errors. > Would you try attached patch and let me know whether it corrects > statistics counter? The patch also will show more information like > whether the controller runs in PCI mode or not as well as showing > frequency of PCI clock speed. I've applied the patch. Now dmesg shows: bge0: mem 0xfdf70000-0xfdf7ffff irq 25 at device 2.0 on pci2 bge0: CHIP ID 0x00002100; ASIC REV 0x02; CHIP REV 0x21; PCI-X 66 MHz I'll watch on Ierrs counter. Eugene Grosbein