lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP Checksum Errors - NOT.


From: address@hidden
Subject: Re: [lwip-users] TCP Checksum Errors - NOT.
Date: Thu, 25 Sep 2008 18:58:20 +0200
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

Nick Thomas wrote:
Does anyone on this list also use the STMAC110 with OSPlus? If so, how did
you get around this problem? I am not too happy about copying all of the
pbufs in the chain to a buffer prior to sending!
Sending like that will certainly the main bottleneck in your lwIP setup. The ports in contrib that do it like that are not speed-optimized as they don't use real hardware (in the win32 port, for example, it is a limitation of the pcap library).
For one thing I don't know
how big to make the buffer in advance? What if there are a lot of pbufs in
the chain?
You always know how much data your hardware can send at maximum. I.e. the MTU will be 1500 for most ethernet networks. Adding the ethernet header, VNET support and some room for aligment and so on, you'll be on the safe side with 1536 bytes (which is used quite often since it works with most cache line sizes / data alignment requirements). This will be different for non-standard MTUs, of course (e.g. jumbo frames).
I notice that some examples in the contrib sections use stack
variable buffer like 'unsigned char buffer[1600];' but then don't do a
length check on the memcpy(s) as it builds up the buffer with data!
I'll check that. Although this is taken care of by setting the MTU (and relying on the rest of the stack to not exceeding this MTU), I think it should be checked! Thanks for the info.

Unfortunately, I can't help with your hardware / OS problem. :-(

Simon




reply via email to

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