Full-Duplex fix for (tulip) de4x5.c

From: Phillip Ezolt (ezolt@perf.zko.dec.com)
Date: Thu Jul 13 2000 - 12:56:10 EST


Hi all,

We've fixed full duplex mode in the de4x5 driver on the DEC DC21142
network cards, with no performance penalty to the rest of the driver.

Unless the de4x5 driver maintainer objects, could this patch be added
to the latest 2.2.X and 2.4.X kernels?

The Problem
-----------

        When doing some performance work, we discovered that the de4x5
network driver would run the Alpha Digital Personal Workstation 600au
(miata)'s builtin tulip card at half duplex, even when "fdx" (full
duplex) was specified.

We received terrible performance when connecting a full duplex
Win2K machine to the miata.

The original throughput on a 100MB-FD network link was
77k/second. (Terrible)

After modifications, we received 11,000 k/second.

Our tests showed that the duplex setting WAS honored on a slower, 10 MBS
card DE450 (DC21041), but not the 100MB (DC21142) card.

This does not appear to be an Alpha/Linux specific problem. From
review of the code, it appears to be present on any architecture that
uses this driver.

The Solution
------------

In the driver, the function srom_map_media() clears the duplex setting
(lp->fdx = 0) and then does not honor the command line parameter in
the case of "Intermediate AutoNegotiation State". (ANS)

This could be caused by two bugs.
        1) The driver is not properly autodetecting Full duplex links.
        2) The driver is not honoring the user's command line parameters.

By fixing #2, when can circumvent #1.

After our modification, the driver behaves more like the user would
expect.

It may not be a full solution, but:
        1) The driver still works properly with a DC21041. (We've Tested)
        2) It allows us use full duplex on a DC21142 with good throughput.

de4x5 Performance
-----------------

These tests were run using a point to point network connection, ie no
network switch.

We ftped a 10,295,264 byte file between a W2K machine and a Miata.

NOTE: The ftp client only gave two significant figures of precision.

                    Before Mod After Mod Driver Options

DC21142
10 (Half Duplex) 1,000 Kb/s 1,000 Kb/s autosense=10MBS
10 (Full Duplex) * 1,200 Kb/s fdx autosense=10MBS
100 (Half Duplex) 10,000 Kb/s 10,000 Kb/s autosense=100MBS
100 (Full Duplex) 72 Kb/s 11,000 Kb/s fdx autosense=100MBS

DC21041
10 (Half Duplex) 1,000 Kb/s 1,000 Kb/s autosense=10MBS
10 (Full Duplex) 1,100 Kb/s 1,100 Kb/s fdx autosense=10MBS

* A 10 second transfer hadn't completed after 2 minutes.

The Machine
-----------

Digital Personal Workstation 600au (miata) w/ built in DEC DC21142
(rev 48)). & DE450 DC21041

Kernel V2.2.14-6.0 (Redhat 6.2 Stock + devpoll patches)

With the following patch, 10Mbs, 10Mbs-FD, 100Mbs, 100Mbx-FD all work
on both cards.

The Patch
---------

--- linux/drivers/net/de4x5.c.orig Mon Aug 9 15:04:39 1999
+++ linux/drivers/net/de4x5.c Wed Jul 12 20:05:22 2000
@@ -3231,6 +3231,7 @@
 
       case ANS:
         lp->media = ANS;
+ lp->fdx = lp->params.fdx;
         break;
 
       default:

Cheers,
Phil Ezolt & Bill Carr

Compaq: High Performance Server Division/Benchmark Performance Engineering
---------------- Alpha, The Fastest Processor on Earth --------------------
Phillip.Ezolt@compaq.com |C|O|M|P|A|Q| ezolt@perf.zko.dec.com
------------------- See the results at www.spec.org -----------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:17 EST