lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] PBUF_REF: udp_send() has pbuf_dechain() removed. Why?


From: David Haas
Subject: Re: [lwip-users] PBUF_REF: udp_send() has pbuf_dechain() removed. Why?
Date: Mon, 24 Mar 2003 08:58:33 -0500
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4a) Gecko/20030314

Hi Leon,

The problem I was/am having has to do with the way the output driver frees pbufs and the differences between tcp and udp. When frames are output from tcp, pbuf_dechain() is not called. Yet from UDP it is called. In both cases there is a chain of buffers.

When I made this change, I also changed the way pbuf_free() works. It now goes through the entire buffer chain decrementing ref on each buffer. When I tested this change, I tested it with UDP through the socket layer (which does use a no-copy approach) and it seemed to work. How is your use of the interface different from the way sockets works?

David.

address@hidden wrote:


Hello David,

testing our code against the latest CVS version, we ended up with an
assertion failure all the time.

in udp.c 1.24 to 1.25 udp_send() was changed to have the call to
pbuf_dechain() removed:

  /* dechain and free the header pbuf */
  if(hdr != NULL) {
    ////////   pbuf_dechain(hdr);
    pbuf_free(hdr);
  }

Now, the whole chain is freed, after which the application again frees
its pointer to its own pbuf, resulting in an assertion failure in pbuf_free()!

David, why did you remove the dechain()?

Regards,

Leon Woestenberg

Axon Digital Design
Phone: +31 13 511 6666
Fax: +31 13 511 4151
web: www.axon.tv

================================================================================
=====================
The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. Axon Digital Design Group is neither liable for the proper nor for the complete transmission of the information contained in this communication nor for any delay in its receipt. Axon Digital Design Group does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended
recipient of this communication, you are hereby notified that reading,
disseminating, distributing or copying this message is strictly prohibited. In that case please return the communication to the sender and delete and destroy all copies. In carrying out its engagements, Axon Digital Design Group applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge.
================================================================================
=====================

------------------------------------------------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-users






reply via email to

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