This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ethernet performance <TCPIP guru question>


On Thursday, 25. April 2002 20:55, Grant Edwards wrote:
> On Thu, Apr 25, 2002 at 05:36:02PM +0200, Roland Caßebohm wrote:
> > The ethernet controller (integrated in the Samsung S3C4510
> > (KS32C50100)) on my board does DMA too.
>
> Yes, but it doesn't do scatter/gather, so you've still doing
> memcpy() operations to transfer data between the BSD buffer
> lists and the DMA buffers used by the 4510 DMA controller.
>
> > The LEDs of the PHY-chip indicates 100 MBit/s, but I think
> > something is wrong. Everytime when there is traffic on the net
> > the LEDs indicates collisions, also if I have connected the two
> > machines directly together.
>
> It sounds like a half/full duplex problem.  If the MAC is in
> full duplex mode but the PHY is in half-duplex mode, you get
> lots of "collisions" and dropped packets.  Try forcing the MAC
> to half-duplex mode, which will (AFAICT) work even if the PHY
> is in full-duplex mode.
Yes I use your driver (Thank you!!!). I think the MAC is forced to be in 
half-duplex mode.

	static volatile U32 MACConfigVar = 0;

in EthInit():

	MACCON = MACConfigVar;

Because of there is no PHY-interrupt, I think the MAC couldn't change in 
full-duplex mode after this.

>
> Also, if you're using the Ethernet driver I wrote, make sure
> that software Ethernet CRC validation on receive packets is
> disabled.  The S3C4510 does Ethernet CRC in hardware (correctly).
>
> I don't know what version of gcc you're using, but with 2.95.2
> compiling the IP checksum routine on ARM7 with optimization
> enabled results in regsiter-thrashing that causes -O2 or -O3
> code to be about 100% larger and 50% slower than -O0 code.
>
> I re-wrote IP checksum in assembly language and saw a big
> improvement in CPU usage, and a modest improvement in
> throughput. Holler if you want a copy to play with.

The software Ethernet CRC validation is disabled.

But I have just seen the following in PhyReset() (lxt970.c):

    // default values for 100M encryption are wrong, so fix them
    // and configure LEDC to be activity indicator
     MiiStationWrite(19, LX970_ADDR, BIT7);

Maybe this is the reason for LEDC to indicate traffic?

So it seems to be everything right. What max. transfer rate did you have?


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]