MPC8XX Ethernet Speed

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Wed Sep 21 13:31:00 UTC 2005


Jay Monkman wrote:
> Steven Johnson wrote:
> 
>>Hi,
>>
>>We use a heavily customized MPC8XX BSP to suit our strange hardware.  We
>>have a 100Mhz MPC862.  Rtems works fine, has done for years.  Ethernet
>>is just being implemented now.  We are using the FEC of the MPC8XX and
>>the main processor is running as 100Mhz.
>>
>>Now my Engineer is telling me if he opens a socket to the target, and
>>just echo's the data back, he is only able to sustain around 33KB/s
>>transfer rate.  This seems pretty dodgy, for 100Mbps Ethernet running on
>>the FEC.
> 
> 
> That's about what you should expect for TCP. The MCP8xx just doesn't have the
> memory bandwidth to do 100 Mbps.
> 
> How fast is your memory bus? I assume it's 50MHz, since the CPU is running at
> 100MHz. Then, your SDRAM accesses are probably 5-1-1-1 ( five clock cycles for
> the first access, then one for each of the next 3, for a 4 word burst.) That
> comes out an average of one 32 bit word every two clocks for a maximum memory
> bandwidth of 100 Mbps.
> 
> For a TCP receive, each byte must be read/written several times:
> 	Data comes into CPU, written to memory.
> 	packet read to check checksum
> 	packet copied to mbuf (I forget if this happens on MPC8xx)
> 
> That's up four times the packet is read or written. TCP send is similar. That
> means that you have a maximum throughout of 50 Mbps or 25 Mbps (depending on
> whether the copy is needed). But it's not even that high, since some of the
> memory bandwidth is used for reading and executing instructions, other tasks, etc.
> 
> The only way to improve the performance on the MPC8xx is to have a bunch of
> static RAM and use that for buffering the network traffic.

As a point of reference, you might want to run ttcp on a dedicated 
network and see what that gives.

I don't doubt that memory bandwidth could place an upper limit on
the transfer rate but your ping time seems high.  Are you sure you
are getting FEC interrupts when you should.  I would expect ping
time to be in the low single digit milliseconds or better on just
about anything.

Is it possible you are not getting an interrupt until some
watermark has been met?  Or timing out?

--joel





More information about the users mailing list