lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] low_level_output question


From: John Kennedy
Subject: RE: [lwip-users] low_level_output question
Date: Tue, 7 Apr 2009 09:54:26 -0600

Ah, that's unfortunate since using the reference count as I described is so 
intuitive and eliminates the need to copy the pbuf in the driver (if it can't 
be sent immediately).  It makes one wonder why UDP sockets use the reference 
count differently, seems like a mistake?

John


 
________________________________________
John Kennedy


Idaho Technology Inc.
390 Wakara Way
Salt Lake City, UT 84108, USA

USA: 1-800-735-6544
Bus:+1 (801)736-6354 x448
Fax:+1 (801)588-0507

http://www.idahotech.com/
-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: Tuesday, April 07, 2009 9:26 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] low_level_output question


John Kennedy wrote:
> Since pbuf_free decrements the pbuf reference count and only frees the pbuf 
> when the reference count goes to zero I assumed that by incrementing the 
> reference count in the Ethernet driver it would prevent the stack from 
> freeing or reusing the pbuf, and that the Ethernet driver should then call 
> pbuf_free when done with the pbuf.  My original question was to verify this 
> assumption.
>

Your assumtption is indeed correct, but it doesn't account for
application buffers used with PBUF_REF/_ROM.

Simon


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

________________________________________
CONFIDENTIALITY NOTICE: This E-mail and any attachments are confidential 
information of the sender and are for the exclusive use of the intended 
recipient. If you are not the intended recipient, be aware that any disclosure, 
copying, distribution, or use of this E-mail or any attachment is prohibited. 
If you have received this E-mail in error, please notify us immediately by 
returning it to the sender and delete this copy from your system. Thank you for 
your cooperation.
 
 




reply via email to

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