lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP Checksum errors.


From: address@hidden
Subject: Re: [lwip-users] TCP Checksum errors.
Date: Sat, 20 Sep 2008 13:51:59 +0200
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

Nick Thomas wrote:
Yes, wireshark (running on my PC) is complaining about checksums in packets
sent from my non-PC based development unit.
The PC then re-sends it's initial HTTP GET, and again receives a packet with
a bad checksum.
So, this doesn't appear to be a PC problem.

I have a similar codebase running on a different hardware platform which
doesn't exhibit this problem. However, the ethernet chips involved are
different, and the LWIP stack has some hardware related registers setup
differently. This is looking more like a problem with this specific unit,
and it's LWIP port :(

So, when wireshark suggests that it could be a 'TCP Checksum offload'
problem, is it referring to a setting in the development unit ethernet chip?
No, what wireshark says is that it might not be able to really see what's on the wire, because it can only see the packets transmitted beetween windows and the PC's network HW - at least when sending, the packets may not yet have their checksum.

You said before that UDP and DHCP (which is UDP) are running fine... Do you use the raw API? If so, UDP packets will get send in one piece (i.e. your netif driver will see them as one pbuf with p->len == p->tot_len and p->next == NULL). However, when sending TCP packets, the stack may chain multiple pbufs for one packet in which case the driver has to copy the data of multiple pbufs before sending a packet. There may be something wrong in the driver here! (especially since your other HW platform might use a different netif driver?)

However, if you used UDP with the netif or sockets API, this won't be the problem as UDP packets are always a chain of 2 pbufs here (one PBUF_RAM for headers and one PBUF_REF for data).

I don't think your ethernet HW has checksum capabilities or even turned them on - if so, the checksums would be OK ;-)

Simon




reply via email to

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