From owner-freebsd-net@FreeBSD.ORG Thu May 17 13:25:43 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 7D01116A402; Thu, 17 May 2007 13:25:43 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 33E0313C46A; Thu, 17 May 2007 13:25:43 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=np7S3S1GW7Wtb+QQJNQyXo/z7P1hxUe54iIMnJjw66yPzHMfcl5D6jU/L2napDua+1DiuLClYPPCzdRCLc6VLKZTBvAQWOj91x37phhK2GbK3/HVt5NtlM0AN6eC+lJuCdDlf4ROYARipNbhEl4eJyo7IcmIvcNN2MFI0DsVJ/M=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1HofzB-0001wd-2G; Thu, 17 May 2007 17:25:41 +0400 Date: Thu, 17 May 2007 17:25:36 +0400 From: Eygene Ryabinkin To: Sten Daniel Soersdal Message-ID: <20070517132536.GB991@void.codelabs.ru> References: <20070517055003.GB1325@void.codelabs.ru> <464C36BD.7020900@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <464C36BD.7020900@gmail.com> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-4.4 required=4.0 tests=ALL_TRUSTED,BAYES_00 Cc: jfv@freebsd.org, freebsd-net@freebsd.org Subject: Re: Port of the new em(4) to RELENG_6 and some problems with 82540EM 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, 17 May 2007 13:25:43 -0000 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