From owner-freebsd-net@FreeBSD.ORG Thu Apr 12 10:25:13 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E9051065673 for ; Thu, 12 Apr 2012 10:25:13 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 191C48FC0A for ; Thu, 12 Apr 2012 10:25:13 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so2402806pbc.13 for ; Thu, 12 Apr 2012 03:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=O7Sy0J52oblcBHAdjVygwpoM1bPTgVbnJ1fsG9TWmAE=; b=t4kIzZNjwW5Cbmr+h0t1c4X0JQOvYXl6mDkMMqWxmDv0a/57OI4QS0LczxvJ0P8YbV f9xuMbItkTRU787HAcGsMjKsNJ2c7JS2aktmyak3Fq6ltwaF/PJgW2BV7O7kuDulsnpC PfiAy6aTplk1xPnNSXkSmqDNN+Pj+l6kB/zPuVizyButp3k9taiHoX79kWR3L5kxyXPz 79VvecNqyzMddr1LU0sEdXC+IS+RoqfDzOLf5d85RD547LPvlOX72j3z5m5j8grfhrdR Rjc8KaaeyxzaHzmkzenzxz8tXv6ZMmAfZdhoGzUuaxAPL4yXzDpeEzqKojbYyszay64w pq4g== Received: by 10.68.138.232 with SMTP id qt8mr1221939pbb.114.1334226312613; Thu, 12 Apr 2012 03:25:12 -0700 (PDT) Received: from pyunyh@gmail.com ([114.111.62.249]) by mx.google.com with ESMTPS id d6sm5310872pbi.23.2012.04.12.03.25.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Apr 2012 03:25:10 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 12 Apr 2012 19:25:07 -0700 From: YongHyeon PYUN Date: Thu, 12 Apr 2012 19:25:07 -0700 To: enoch Message-ID: <20120413022507.GA3270@michelle.cdnetworks.com> References: <20120403225422.GB7380@michelle.cdnetworks.com> <87sjgk5czo.fsf@hotmail.com> <20120404210445.GB10911@michelle.cdnetworks.com> <87vclfwqp4.fsf@hotmail.com> <20120405161152.GA14289@michelle.cdnetworks.com> <87iphejaar.fsf@hotmail.com> <20120409183704.GA1668@michelle.cdnetworks.com> <87fwccq0do.fsf@hotmail.com> <20120410195135.GA5349@michelle.cdnetworks.com> <87obqyr909.fsf@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87obqyr909.fsf@hotmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: [nfe] DHCP failure on 8-stable X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2012 10:25:13 -0000 On Wed, Apr 11, 2012 at 04:02:46AM -0400, enoch wrote: > YongHyeon PYUN writes: > > > On Mon, Apr 09, 2012 at 01:29:55PM -0400, enoch wrote: > >> YongHyeon PYUN writes: > >> > >> > On Thu, Apr 05, 2012 at 02:36:12PM -0400, enoch wrote: > >> >> YongHyeon PYUN writes: > >> >> > >> >> > On Wed, Apr 04, 2012 at 09:51:19AM -0400, enoch wrote: > >> >> >> YongHyeon PYUN writes: > >> >> >> > >> >> >> > On Wed, Apr 04, 2012 at 12:37:15AM -0400, enoch wrote: > >> >> >> >> YongHyeon PYUN writes: > >> >> >> >> > >> >> >> >> > On Tue, Apr 03, 2012 at 01:45:30AM -0400, enoch wrote: > >> >> >> >> >> YongHyeon PYUN writes: > >> >> >> >> >> > >> >> >> >> >> > On Mon, Apr 02, 2012 at 07:36:36PM -0400, enoch wrote: > >> >> >> >> >> >> YongHyeon PYUN writes: > >> >> >> >> >> >> > >> >> >> >> >> >> > On Mon, Apr 02, 2012 at 03:50:02AM -0400, enoch wrote: > >> >> >> >> >> >> >> On 04/02/2012 03:52 PM, YongHyeon PYUN wrote: > >> >> >> >> >> >> >> > On Fri, Mar 30, 2012 at 10:40:44AM -0400, enoch wrote: > >> >> >> >> >> >> >> >> On 03/30/2012 19:38, YongHyeon PYUN wrote: > >> >> >> >> >> >> >> >>> On Fri, Mar 30, 2012 at 03:01:52AM -0400, enoch wrote: > >> >> >> >> >> >> >> >>>> Recently it became extremely difficult to pass the DHCP discovery step > >> >> >> >> >> >> >> >>>> on boot. Now I am using the buggy [nve] instead. > >> >> >> >> >> >> >> >>>> > >> >> >> >> >> >> >> >>>> Can anyone help? > >> >> >> >> >> >> >> >>>> > >> >> >> >> >> >> >> >>> > >> >> >> >> >> >> >> >>> Did you set synchronous_dhclient option in rc.conf? > >> >> >> >> >> >> >> >>> > >> >> >> >> >> >> >> >> > >> >> >> >> >> >> >> >> Yes: ifconfig_nfe0="SYNCDHCP" > >> >> >> >> >> >> >> >> > >> >> >> >> >> >> >> >> I guess [nfe] is undergoing gradual devel changes of some sort as before > >> >> >> >> >> >> >> >> it had some chance of reporting "empty headers" on initial ifconfig and > >> >> >> >> >> >> >> >> refusing to work. Sorry, I should have reported when encountering the > >> >> >> >> >> >> >> >> first problems rather than solve by reboot. > >> >> >> >> >> >> >> > > >> >> >> >> >> >> >> > Would you show me the output of both dmesg(nfe(4) and its PHY only) > >> >> >> >> >> >> >> > and 'sysctl dev.nfe.0.stats'? > >> >> >> >> >> >> >> > It would be also helpful to know whether nfe(4) still sees > >> >> >> >> >> >> >> > incoming traffic. > >> >> >> >> >> >> >> > Does assigning static IP work? > >> >> >> >> >> >> >> > > >> >> >> >> >> >> >> > >> >> >> >> >> >> >> Static IP direct communication attempt from this desktop to another > >> >> >> >> >> >> >> laptop through a crossover cable fails as follows. Thanks. > >> >> >> >> >> >> >> > >> >> >> >> >> >> >> nfe0: flags=8843 metric 0 mtu 1500 > >> >> >> >> >> >> >> options=82008 > >> >> >> >> >> >> >> ether 00:1f:bc:00:19:dc > >> >> >> >> >> >> >> inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 > >> >> >> >> >> >> >> media: Ethernet autoselect (1000baseT > >> >> >> >> >> >> >> ) > >> >> >> >> >> >> >> status: active > >> >> >> >> >> >> >> > >> >> >> >> >> >> >> nfe0: link state changed to UP > >> >> >> >> >> >> >> nfe0: port 0xf200-0xf207 > >> >> >> >> >> >> >> mem 0xefffb000-0xefffbfff irq 21 at device 20.0 on pci0 > >> >> >> >> >> >> >> miibus1: on nfe0 > >> >> >> >> >> >> > > >> >> >> >> >> >> > It seems you've omitted PHY driver here. What PHY driver was > >> >> >> >> >> >> > attached to nfe(4)? > >> >> >> >> >> >> > > >> >> >> >> >> >> > >> >> >> >> >> >> miibus1: on nfe0 > >> >> >> >> >> >> rgephy1: PHY 1 on miibus1 > >> >> >> >> >> >> > >> >> >> >> >> >> >> nfe0: Ethernet address: 00:1f:bc:00:19:dc > >> >> >> >> >> >> >> nfe0: [FILTER] > >> >> >> >> >> >> >> nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0) > >> >> >> >> >> >> >> nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0) > >> >> >> >> >> >> >> nfe0: link state changed to UP > >> >> >> >> >> >> >> nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0) > >> >> >> >> >> >> >> nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0) > >> >> >> >> >> >> >> nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0) > >> >> >> >> >> >> >> > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.frame_errors: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.extra_bytes: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.late_cols: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.runts: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.jumbos: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.fifo_overuns: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.crc_errors: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.fae: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.len_errors: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.unicast: 56 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.multicast: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.rx.broadcast: 280 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.octets: 7517 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.zero_rexmits: 51 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.one_rexmits: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.multi_rexmits: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.late_cols: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.fifo_underuns: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.carrier_losts: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.excess_deferrals: 0 > >> >> >> >> >> >> >> dev.nfe.0.stats.tx.retry_errors: 0 > >> >> >> >> >> >> >> > >> >> >> >> >> >> > > >> >> >> >> >> >> > Thanks. Would you show me the output of "pciconf -lcbv"? > >> >> >> >> >> >> > > >> >> >> >> >> >> > >> >> >> >> >> >> nfe0@pci0:0:20:0: class=0x068000 card=0x10003842 chip=0x026910de rev=0xa3 hdr=0x00 > >> >> >> >> >> >> vendor = 'NVIDIA Corporation' > >> >> >> >> >> >> device = 'MCP51 Network Bus Enumerator' > >> >> >> >> >> >> class = bridge > >> >> >> >> >> >> bar [10] = type Memory, range 32, base 0xefffb000, size 4096, enabled > >> >> >> >> >> >> bar [14] = type I/O Port, range 32, base 0xf200, size 8, enabled > >> >> >> >> >> >> cap 01[44] = powerspec 2 supports D0 D1 D2 D3 current D0 > >> >> >> >> >> >> > >> >> >> >> >> >> Interestingly, now that nfe0 is using a static IP it sometimes boots > >> >> >> >> >> >> up properly. Are you interested in its good working? > >> >> >> >> >> > > >> >> >> >> >> > Yes I am. Would you try attached patch and let me know whether the > >> >> >> >> >> > patch makes any difference on your box? > >> >> >> >> >> > >> >> >> >> >> Sorry to report: The patch was applied (to 8-stable latest code) but out > >> >> >> >> >> of 3 boots only one succeeded. Same stream of "nfe0: discard frame w/o > >> >> >> >> >> leading ethernet header (len 0 pkt len 0)" messages. > >> >> >> >> > > >> >> >> >> > Ok, back out previous patch and try attached one. > >> >> >> >> > >> >> >> >> With these two patch files applied to the 8-stable code, buildkernel > >> >> >> >> fails as follows. > >> >> >> >> > >> >> >> >> /usr/src/sys/modules/nfe/../../dev/nfe/if_nfe.c: In function 'nfe_attach': > >> >> >> >> /usr/src/sys/modules/nfe/../../dev/nfe/if_nfe.c:629: error: 'struct mii_softc' has no member named 'mii_mpd_oui' > >> >> >> >> /usr/src/sys/modules/nfe/../../dev/nfe/if_nfe.c:629: error: 'struct mii_softc' has no member named 'mii_mpd_oui' > >> >> >> >> /usr/src/sys/modules/nfe/../../dev/nfe/if_nfe.c:630: error: 'struct mii_softc' has no member named 'mii_mpd_model' > >> >> >> >> *** Error code 1 > >> >> >> >> > >> >> >> > > >> >> >> > Oops, sorry I forgot that this part of change was not merged to > >> >> >> > stable/8. I've attached a minimal patch which would be cleanly > >> >> >> > applied to stable/8. > >> >> >> > >> >> >> Wasn't the attached diff3 already included in diff2? Seems to me the > >> >> >> wrong file was attached this time. Please advise. > >> >> > > >> >> > diff2 is subset of diff3 but it can be merged to stable/8 and > >> >> > stable/7. Probably diff2 may have better chance to fully > >> >> > reinitialize PHY but let's see whether diff3 also makes difference > >> >> > on your box. > >> >> > So back out any changes and apply diff3. > >> >> > >> >> I'm sorry, this if_nfereg.h patch is not enough. Boot failure frequency > >> >> is just the same. I guess I should consider migrating to 9-stable. The > >> >> problem with 9-stable is that most of the time it does not build :-( > >> >> > >> >> Thanks for your efforts. Enoch. > >> > > >> > Here is updated patch for stable/8. Let me know whether it makes > >> > any difference. > >> > >> Sorry, the diff4 patch compiled but made no difference (using static > >> IP). On first boot the "w/o leading ethernet header" problem showed > >> up. Can you generate diagnostic messages that I can collect for you from > >> dmesg or messages? > >> > > > > Due to lack of documentation, I also don't know which registers > > should I poke at this moment. This reminds me old experimental > > patch which tried to address reset/DMA issues. > > Would you try that? Note, I don't have access to nfe(4) so > > the patch was not tested at all. > > You can find the patch at the following URL. > > http://people.freebsd.org/~yongari/nfe/nfe.reset.diff > > I will try it in the next few days. Ok, thanks. > I saw that you are contributing to the [re] driver as well. This PCI > card > that I plugged (to replace [nfe]) in 8-stable is losing its Ethernet > connection to the router every few hours. Recovery is only possible > through a reboot. What info do you suggest to collect before opening a > new thread. Thanks. > It's the same as nfe(4). Include both dmesg output(re(4), rgephy(4) only) and any messages printed by re(4). If you know how to trigger the issue, share that information too.