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: Tue, 16 Mar 2010 12:54:36 +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 #26, task #6849 (project lwip):

I used a u32_t in the pbuf so I could use a special value to say "Need
checksum calcualted".  If not that value, I skipped the inet_chksum call and
simply added in this field.  I made the assumption in my method that a pbuf
had a checksum only for it's payload, but chained pbufs each with a checksum
was allowed.

Like:

  /* iterate through all pbuf in chain */
  for(q = p; q != NULL; q = q->next) {
    LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has
next %p) n",
      (void *)q, (void *)q->next));
    if(q->checksum != -1)
      acc += q->checksum;
    else
      acc += LWIP_CHKSUM(q->payload, q->len);
....

q->checksum is a u32_t which is -1 if I need the checksum calculated.

Perhaps it's that what I did is lower level than what you want to do?

    _______________________________________________________

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]