lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #6253] Added csum to struct pbuf.


From: Andrey Volkov
Subject: [lwip-devel] [patch #6253] Added csum to struct pbuf.
Date: Wed, 27 Aug 2008 12:26:20 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

Follow-up Comment #13, patch #6253 (project lwip):

Hi Simon

> Why do you "calculate csum for it before I call udp_send (and do 
> it fast in asm)" instead of providing this fast asm routing as
> LWIP_CHKSUM macro? 

Since, when my app. generate udp payload, it do it directly to preallocated
buffer, and do it in asm routine, i.e. payload csum calculation is part of
payload data generation process.

> Anyway, from your description, it seems to me as one checksum
> per packet could also be sufficient...

Only and only if packet == pbuf. But in my case, for any _outgoing_ udp
packet, I need 2 pbufs in chain - first for udp/ip/eth headers (and lwip will
calculate csum for it in udp_sendto_if), second - for payload (with
precalculated csum).

Also, for each _incoming_ ethernet packet, AD BF537 MAC calculate 2 csums -
for ip header and for ip payload. So, in this case, lwip need NOT to
recalculate checksums for incoming ip packets, if driver store they somewhere
(in pbufs).

--
Andrey

P.S. Oops, I'm sorry, that don't tell it before, but I use only low level
api, so udp_send called directly from my application.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6253>

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





reply via email to

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