Problem with nfe stability and throughput

Pyun YongHyeon pyunyh at gmail.com
Thu Jan 17 17:01:08 PST 2008


On Thu, Jan 17, 2008 at 07:05:11PM +0100, Chris Poulsen wrote:
 > Hi,
 > 
 > Pyun YongHyeon wrote:
 > >Would you show me the output of "ifconfig nfe0"?
 > >  
 > nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 >        options=48<VLAN_MTU,POLLING>
 >        ether 00:1d:60:6d:73:ec
 >        inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
 >        media: Ethernet 100baseTX <full-duplex>
 >        status: active

Hmmm, it seems that you've set media type manually without relying
on automatic media detection. Is there any reason not using auto
media type?  How about using media type 'auto'?
#ifconfig nfe0 media auto

 > 
 > > > What do you need me to do, in order to get some usable info about what 
 > > > is going on?
 > > > 
 > >
 > >What about changing /usr/src/sys/dev/mii/atphy.c as the following?
 > >From atphy.c, line number 174:
 > >171                 /*
 > >172                  * Reset the PHY so all changes take effect.
 > >173                  */
 > >174                 if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) {
 > >175                         bmcr = PHY_READ(sc, MII_BMCR);
 > >176                         PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET);
 > >177                 }
 > >178                 break;
 > >
 > >To:
 > >171                 /*
 > >172                  * Reset the PHY so all changes take effect.
 > >173                  */
 > >174                 bmcr = PHY_READ(sc, MII_BMCR);
 > >175                 PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET);
 > >176                 break;
 > >
 > >As you know, no public documentation for the phy is available so
 > >it would take long time to find a clue to support the hardware.
 > >Please don't give up and lets try possible (still guessing)
 > >combinations.
 > >
 > >  
 > Tried the changes. Things came up just fine. Ftp transfer worked, well 
 > my machine had a panic after 3 big files, but as far as i could tell it 
 > was zfs related (I was dropping the files on my zfs test partition ;))
 > 
 > Ftp client reported transfer speeds around 8,7 megabyte/sec until the 
 > panic. After a reboot I tried ssh/sftp and things ran seemingly stable.  
 > So I decided to beat it up with a torrent download :)
 > Finally I managed to get some text in my logs ;) :
 > ....
 > kernel: nfe0: discard frame w/o leading ethernet header (len 4294967295 
 > pkt len 4294967295)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > last message repeated 9 times
 > kernel: nfe0: discard frame w/o leading ethernet header (len 4294967295 
 > pkt len 4294967295)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > last message repeated 10 times
 > kernel: nfe0: discard frame w/o leading ethernet header (len 7 pkt len 7)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > last message repeated 7 times
 > kernel: nfe0: discard frame w/o leading ethernet header (len 6 pkt len 6)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 5 pkt len 5)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 4 pkt len 4)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > last message repeated 7 times
 > kernel: nfe0: discard frame w/o leading ethernet header (len 5 pkt len 5)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > last message repeated 4 times
 > kernel: nfe0: discard frame w/o leading ethernet header (len 5 pkt len 5)
 > kernel: nfe0: discard frame w/o leading ethernet header (len 0 pkt len 0)
 > ...
 > 

nfe(4) has a long standing issue not correctly handling half-duplex
media in manual media configuration. I guess the above issue is
related with your manual media configuration such that nfe(4) thinks
it established a full-duplex link with link partner but the resolved
link is still half-duplex one.

 > Things seemed to still be running, but ping to another local machine was 
 > sloooow.
 > 

Yep, it's getting closer to working state. :)

-- 
Regards,
Pyun YongHyeon


More information about the freebsd-current mailing list