Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2007 17:25:36 +0400
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        Sten Daniel Soersdal <netslists@gmail.com>
Cc:        jfv@freebsd.org, freebsd-net@freebsd.org
Subject:   Re: Port of the new em(4) to RELENG_6 and some problems with 82540EM
Message-ID:  <20070517132536.GB991@void.codelabs.ru>
In-Reply-To: <464C36BD.7020900@gmail.com>
References:  <20070517055003.GB1325@void.codelabs.ru> <464C36BD.7020900@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sten, good day.

Thu, May 17, 2007 at 01:04:29PM +0200, Sten Daniel Soersdal wrote:
> >I have the '82540EM Gigabit Ethernet Controller' branded card
> >(PWLA8390MT) and I am currently expiriencing troubles with the
> >Gigabit switch (D-Link DGS-1008, the cheap one). Plugged into that
> >switch I have
> > - broken packets and SSH messages 'Disconnecting: Corrupted MAC
> > on input.' when checksumming is turned on and gigabit speed,
> > - abyssmal rates for the HTTP downloads (about 10Mbit/sec) when
> > checksums are turned off and the speed is gigabit again,
> > - having switched the media on the adapter to the 100BaseTX
> > full-duplex, but still using the same switch the speed drops to
> > 200Kbit/sec,
> > - using another D-Link switch (sorry, have no other brand in
> > hand) the above situation is completely reproducible.
> > - working in the half-duplex mode (for 10BaseT/UTP and 100BaseTX)
> > I have no problems to reach the 90% of the theoretical bandwidth
> > of the link via HTTP either with checksums enabled or disabled.
> >So, the full-duplex mode is not usable to me now. If someone can
> >help in this situation, I am all ears.
> 
> That's what we call a self inflicted network problem.
> When one end is configured full-duplex and the other end is in auto 
> speed/duplex and you want to set fixed speed/duplex, then you need to do it on
> both ends. Otherwise the auto-negotiating side will default to half-duplex. 
> This is to be backwards compatible with hubs.

If I am correct, there is no such thing as the fixed speed/duplex
for the 1000Base-TX: it always auto-negotiates.

Moreover, I just bough the 10/100 D-Link ;)) switch and plugged my
card into it saying just 'media 100BaseTX'. No problems: full duplex
mode and no errors. 'media 100BaseTX mediaopt full-duplex' and
'media autoselect' all resulted to full-duplex and no errors.

Redid my tests with varying speed/duplex and the Gbit switch:
 - 'media 100baseTX mediaopt full-duplex': no errors, small speed (1 Mbit),
 - 'media 100baseTX' (got full-duplex): the same,
 - 'media 1000Base-TX': 'Corrupted MAC on input'.
 - 'media autoselect' (got 1000Base-TX): 'Corrupted MAC on input'.
 - 'media 100baseTX' (got _half-duplex_): no errors, good speed.
 - 'media 100baseTX mediaopt full-duplex': small speed (1Mbit), no errors.

So there is something with the Gbit ports and maybe D-Link hardware
that stimulates the errors for the 1000Base-TX.  And you're right:
the slowness for the 10/100 full-duplex modes with Gbit switch can
be attributed to the duplex mismatch.

The funny thing that I have no problems to negotiate/set the duplex
for the 10/100 modes and 10/100 switch.  To my regret, I have no
means to force the speed/duplex on the switches: they are too
inexpensive for that.

Thank you.
-- 
Eygene



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070517132536.GB991>