lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] what speed?


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] what speed?
Date: Thu, 09 Jan 2003 02:33:49 -0000

Hi!

On Wednesday 28 November 2001 18.40, you wrote:
> I am planning to port lwIP to the Zilog eZ80. This processor is supplied
> with a (precompiled) TCP/IP: IPworks from MetroLink, with a unix-like
> RTOS called "xinu". All that is big (about 100KB code size for a web
> server), and very slow (less than 10KB/s transfer rate on an 8-bit CPU
> running at near 20 MIPS and a RTL8019AS 10Mb/s ethernet interface).
>
> I know that lwIP will allow me to gain access to the source (for using
> in other projects) and to reduce the memory usage. But will it allow me
> to increase the transfer rate over Ethernet? I hoped to transfer near
> 1MB/s (or at least 500Ko/s) on a 10Mb/s 10-base-T interface. Using
> IPworks the speed is 100 times below that, probably because this RTOS is
> too heavy for such a slow CPU. Does anyone have ideas about the speed
> using lwIP?

The most time consuming part of any TCP/IP stack is data copying and 
checksumming. In lwIP, data copying can be avoided so checksumming is the 
bottleneck. The usual approach is to code the checksumming loop in highly 
optimized assembler, but lwIP does not have any such assembler 
implementations (as of yet). I don't know if IPworks has native Z80 assembler 
checksumming, but I would assume so. They might copy the data that should be 
sent once though, so lwIP may still be faster but I really can't tell. I do 
not know of any performance measurements of lwIP either. 

I do know, however, that the native TCP/IP implementation in Xinu (as 
described in Comer's book on the subject) isn't really built for speed. Each 
protocol resides in its own thread and packets are passed between the 
protocols using IPC, IIRC. Not the most effective solution, IMHO. But IPworks 
perhaps isn't derived from that implementation.

But the maximum transfer speed also depends on how much memory you have and 
is willing to dedicate to buffers. 

> By the way, if somebody has a manual on how to program the RTL8019AS
> (this is a NE2000-compatible chip with ISA PnP support), it would be
> really nice. At Realtek, they give a very short manual, and explain
> mostly how to use the Plug-and-Play features, they seem to beleive that
> anyone knows how to program a NE2000...

Both Linux and the BSDs have ne2k drivers, and I think TinyTCP includes a 
simple ne2k driver. Perhaps that could be useful?

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]