From owner-freebsd-net@FreeBSD.ORG Tue Jul 17 16:17:42 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B29016A401 for ; Tue, 17 Jul 2007 16:17:42 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by mx1.freebsd.org (Postfix) with ESMTP id BC3BE13C48D for ; Tue, 17 Jul 2007 16:17:41 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so1083729nzf for ; Tue, 17 Jul 2007 09:17:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XzDxvDk85TUciwno2DZ1oWp2pjUyJe9dWhWezL9aA7Rg2rk08SdODfYCJWI6RUKNNxWJpQBLOH2BJCll8VVKWVDbagCzMOckzlzGRiBqFMTf7NmaJJc0j4Rzy0eNRkuNX9x5KkGW1Wsoz/jXt6hvlQ7/KlkkXmEjI5/ZdUay5T0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eYhe4PSpruU0mZ4CRrzq6gbY2/vE97bXoHq38bki4dBi3gCKLmGlFz6EIwJX21y6TuqVYbLaKHl0ywV9LtFAFn0TjjLdZa9dzffM+TZfISUYUyb3GiNFtVeKyMPNwGSLryYK/Q6qBr4Nc2n+Mkmk4IVqkU/CIf+5TMZqO2TubQ4= Received: by 10.115.89.1 with SMTP id r1mr566342wal.1184689056271; Tue, 17 Jul 2007 09:17:36 -0700 (PDT) Received: by 10.114.103.14 with HTTP; Tue, 17 Jul 2007 09:17:36 -0700 (PDT) Message-ID: <2a41acea0707170917n56e35cfbyc6e0bca094bfa729@mail.gmail.com> Date: Tue, 17 Jul 2007 09:17:36 -0700 From: "Jack Vogel" To: freebsd-net@freebsd.org In-Reply-To: <20070717110156.GA37722@hbnnbsddev03.sharedtcs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070717110156.GA37722@hbnnbsddev03.sharedtcs.net> Subject: Re: em(4)/82571eb: fifo not dma'ed to host memory 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: Tue, 17 Jul 2007 16:17:42 -0000 As an experiment, search in if_em.c for 'msix' look at the logic there. If the adapter is 82575 it will use msix, but the else clause has it use msi ONLY if its '>82571', change that to >=82571 and let's see if maybe using MSI will help you with your problems as I'm pretty confident its interrupt related. I had intended on making this change shortly anyway, my tests have shown the 571 to work fine this way. Let me know of the results. Jack On 7/17/07, Patrick Oeschger wrote: > bug description for 7.0-CURRENT - em(4) driver version 6.5.3 > - frame reception is not possible (missed packets counter incrementing) > - frame transmission is not possible (driver watchdog fires) > bug exists also on 6.2-RELENG - em(4) driver version 6.2.9 > bug does *not* exist on 6.1-RELENG - em(4) driver version 3.2.18 > > jack vogel told me that the i82571 can be tricky when having a bunch > of them - i have 8 such interfaces on the motherboard so i disabled > 7 of them with a modified em_probe (if_em.c) > running the driver on just one interface does not change the behaviour > > - init of the interface during verbose boot looks fine > - bringing the interface to upness looks fine too > - RDH0/RDT0 registers do *not* increment after frame reception > - frames suspected *not* getting dma'ed from fifo to host memory > - RX interrupt suspected *not* being sent to the driver > > see dmesg and debug ouput for futher details... > anybody having some experience with this issue? > any advice to track this further down? > thanks, pat > > > diff for em_probe subr to ensure that only one interface is init'ed: > > freebsd70# diff -u if_em.c.orig if_em.c > --- if_em.c.orig Tue Jul 17 11:18:18 2007 > +++ if_em.c Tue Jul 17 06:34:48 2007 > @@ -379,6 +379,10 @@ > > INIT_DEBUGOUT("em_probe: begin"); > > + // prevent init of all em(4) devices except pci9/0/0 > + if(pci_get_bus(dev) != 0x09 || pci_get_slot(dev) != 0x00 || > + pci_get_function(dev) != 0x00) > + return (ENXIO); > + > pci_vendor_id = pci_get_vendor(dev); > if (pci_vendor_id != EM_VENDOR_ID) > return (ENXIO); > > excerpt of verbose dmesg looks fine for em0: > > pcib9: irq 19 at device 11.0 on pci2 > pcib9: secondary bus 9 > pcib9: subordinate bus 9 > pcib9: I/O decode 0x6000-0x6fff > pcib9: memory decode 0xfd700000-0xfd7fffff > pcib9: prefetched decode 0xfce00000-0xfcefffff > pci9: on pcib9 > pci9: physical bus=9 > found-> vendor=0x8086, dev=0x105e, revid=0x06 > bus=9, slot=0, func=0 > class=02-00-00, hdrtype=0x00, mfdev=1 > cmdreg=0x0000, statreg=0x0010, cachelnsz=16 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=a, irq=255 > powerspec 2 supports D0 D3 current D0 > MSI supports 1 message, 64 bit > map[10]: type Memory, range 32, base 0, size 17, memory disabled > map[14]: type Memory, range 32, base 0, size 17, memory disabled > map[18]: type I/O Port, range 32, base 0, size 5, port disabled > found-> vendor=0x8086, dev=0x105e, revid=0x06 > bus=9, slot=0, func=1 > class=02-00-00, hdrtype=0x00, mfdev=1 > cmdreg=0x0000, statreg=0x0010, cachelnsz=16 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=b, irq=255 > powerspec 2 supports D0 D3 current D0 > MSI supports 1 message, 64 bit > map[10]: type Memory, range 32, base 0, size 17, memory disabled > map[14]: type Memory, range 32, base 0, size 17, memory disabled > map[18]: type I/O Port, range 32, base 0, size 5, port disabled > em0: > at device 0.0 on pci9 > pcib9: em0 requested memory range 0xfd700000-0xfd7fffff: good > pcib2: em0 requested memory range 0xfd700000-0xfd7fffff: good > pcib1: em0 requested memory range 0xfd700000-0xfd7fffff: good > em0: Lazy allocation of 0x20000 bytes rid 0x10 type 3 at 0xfd700000 > pcib1: matched entry for 1.0.INTD > pcib1: slot 0 INTD hardwired to IRQ 19 > pcib2: slot 11 INTA is routed to irq 19 > pcib9: slot 0 INTA is routed to irq 19 > em0: bpf attached > em0: Ethernet address: 00:10:f3:0c:5b:2a > ioapic0: routing intpin 19 (PCI IRQ 19) to vector 49 > em0: [FILTER] > pci9: at device 0.1 (no driver attached) > > bringing em0 to upness seems to work fine: > printf's inserted into subroutines em_handle_link and em_rxeof (if_em.c) > > freebsd70# ifconfig em0 up > em0: Link is Down > em_handle_link > em_rxeof > em_handle_link > em_rxeof > em0: Link is up 1000 Mbps Full Duplex > freebsd70# ifconfig em0 > em0: flags=8843 metric 0 > mtu 1500 > options=18b > ether 00:10:f3:0c:5b:2a > media: Ethernet autoselect (1000baseTX ) > status: active > > interface stats: > good packets increment but no em_rxeof/interrupts generated > fifo is full after 85 received frames > memory and missed packets are incrementing because they cant be > stored in fifo (fifo exhausted) > > freebsd70# sysctl dev.em.0.stats=1 > em0: Excessive collisions = 0 > em0: Sequence errors = 0 > em0: Defer count = 0 > em0: Missed Packets = 144 > em0: Receive No Buffers = 0 > em0: Receive Length Errors = 0 > em0: Receive errors = 0 > em0: Crc errors = 0 > em0: Alignment errors = 0 > em0: Carrier extension errors = 0 > em0: RX overruns = 0 > em0: watchdog timeouts = 0 > em0: XON Rcvd = 0 > em0: XON Xmtd = 0 > em0: XOFF Rcvd = 0 > em0: XOFF Xmtd = 0 > em0: Good Packets Rcvd = 85 > em0: Good Packets Xmtd = 0 > em0: TSO Contexts Xmtd = 0 > em0: TSO Contexts Failed = 0 > > interface debug_info: > output for registers RDBAH0/RDBAL0/RDLEN0/RDH0/RDT0/RXDCTL added > RDH0/RDT0 do not increment after frame reception... > cp. 6.1-RELENG: RDH0/RDT0 incremented after frame reception > RDT0 is always 'RDH0 - 1' > > freebsd70# sysctl dev.em.0.debug_info=1 > em0: Adapter hardware address = 0xc3b69a1c > em0: CTRL = 0x81c0241 RCTL = 0x8002 > em0: RDBAH0 = 0x0 RDBAL0 = 0x1458000 > em0: RDLEN0 = 0x1000 RDH0 = 0x0 > em0: RDT0 = 0xff RXDCTL = 0x10000 > em0: Packet buffer = Tx=16k Rx=32k > em0: Flow control watermarks high = 30720 low = 29220 > em0: tx_int_delay = 66, tx_abs_int_delay = 66 > em0: rx_int_delay = 0, rx_abs_int_delay = 66 > em0: fifo workaround = 0, fifo_reset_count = 0 > em0: hw tdh = 0, hw tdt = 0 > em0: hw rdh = 0, hw rdt = 255 > em0: Num Tx descriptors avail = 256 > em0: Tx Descriptors not avail1 = 0 > em0: Tx Descriptors not avail2 = 0 > em0: Std mbuf failed = 0 > em0: Std mbuf cluster failed = 0 > em0: Driver dropped packets = 0 > em0: Driver tx dma failure in encap = 0 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >