lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #6849] Test how checksum on copy could be integrated


From: Bill Auerbach
Subject: [lwip-devel] [task #6849] Test how checksum on copy could be integrated into the stack
Date: Mon, 15 Mar 2010 17:48:43 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)

Follow-up Comment #22, task #6849 (project lwip):

In my case, I had the ability for the hardware to send me the payload part of
the packet with its checksum.  So the stack does the IP header and its
checksum, and the payload was passed in with the checksum.  When the segment
was created with the checksum, I filled it in (in the pbuf but just as easily
could have been in the tcp_seg).  I was sending full MSS-sized data so
multiple segments didn't apply (which is why it was a trivial change for me). 
For UDP, I put the checksum in the pbuf and the code that checksums pbufs (and
chains) just added in the checksum supplied (if supplied) or calculated it
otherwise.  Note the even/odd detail fell out without any added code.  So for
both UDP and TCP to work the same was the reason why I mentioned the checksum
belongs in the pbuf.  There are no tcp_segs with UDP.  So maybe it doesn't
belong there from a layer or design standpoint, but it looked like a better
fit for TCP and UDP to work alike.  (No Kieran, I'm not trying to change your
mind :-) ).

>...is it hard to change your current implementation to call udp_send_chksum
/ tcp_write_chksum with the checksum as an argument?

No, this is exactly what I did.  So I suppose checksum on copy is the same as
what I did.  Checksum offloading is where you can throw the #define to
complete turn it off.

TX and RX are separate, yes, but at the driver level there is some overlap.

I have no problem with your (good by the way) idea of adding the checksum as
another type in pbuf_alloc to only the pbufs that need them.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?6849>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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