lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: Zero copy pbufs (Re: [lwip] Memory leak and queued pac


From: Leon Woestenberg
Subject: [lwip-users] Re: Zero copy pbufs (Re: [lwip] Memory leak and queued packets inetharp.c)
Date: Wed, 08 Jan 2003 23:48:28 -0000

Hello,

----- Original Message -----
From: "Martin Glunz" <address@hidden>
To: <address@hidden>
Sent: Friday, November 15, 2002 11:31 AM
Subject: Re: Zero copy pbufs (Re: [lwip] Memory leak and queued packets
inetharp.c)


> Adam Dunkels wrote:
> > Adding a PBUF_REF type sounds like a very good way to do it. A callback
> > probably is the best way to handle the notification when the memory can
> > be reused.
> >
> Good idea, but I think we'll need a function in the synchronous api
> like "wait_for_memory_referenced_by_netbuf_to_be_reusable(netbuf)" and a
>

I would make the implementation simpler, and without callbacks, because:

as far as I can see, they are useful only in outgoing IP traffic situations
where the
application has formatted data available in memory already. In near 100% of
cases, zero-copy can be exploited to send the data. Except when queueing
occurs, PBUF_REF pbufs are replaced by PBUF_RAM by the stack.

The application can simply assume the PBUF_REF is immediately available
again.

Regards,

Leon Woestenberg




[This message was sent through the lwip discussion list.]




reply via email to

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