lwip-devel
[Top][All Lists]
Advanced

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

RE: [lwip-devel] Last changes by Marc


From: Grubb, Jared
Subject: RE: [lwip-devel] Last changes by Marc
Date: Fri, 17 Aug 2007 14:37:20 -0700

>> - "pbuf": split the flags fields in flags & type don't cause me any problems (except I would rename "flgs" in "flags").

>> PBUF_FLAG_LINK_BROADCAST is not used (it wasn't before this change). I propose to remove it.

 

Rather than “type”, I think we should still use flags. There are really two attributes that our current “types” cover:
1) “Ownership” – Whether the pbuf is allowed to be changed by the application. Here, I mean that “application owns” the buffer if the application could potentially change the buffer upon return from stack calls. “Stack owns” is the opposite and implies “zero copy OK”.

2) “Headers” – Whether the pbuf is designed to contain headers or is strictly payload-only.

 

So, the four types map to the following attributes:
PBUF_RAM = Application-owned, Header+Payload

PBUF_REF = Application-owned, Payload only

PBUF_RAM_NOCOPY = Stack-owned, Header+Payload

PBUF_ROM = Stack-owned, Payload only

 

The exact titles might not be the right choice, but isn’t this what these types really mean?


reply via email to

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