lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] again... Zero Copy Ethernet interface


From: Jakob Stoklund Olesen
Subject: Re: [lwip-devel] again... Zero Copy Ethernet interface
Date: Thu, 08 Jan 2009 08:32:16 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

address@hidden wrote:
>> If over time o suitable set of pbuf functions can be found, it would
>> be easy to port. Something like AllocTxPbuf, AllocRxPbuf,
>> FreeTxPbuf... and so on.
>>   
> Good idea. Although I doubt there is a really lightweight implementation
> to cover all this...? We'll see...


This is related:

I tried to use tcp_write() without the TCP_WRITE_FLAG_COPY flag. This
would allow zero copy transmission all the way from user code (I am not
using sockets).

tcp_enqueue() creates PBUF_ROM pbufs is this case. This works well for
fixed data, but not for memory that must be given back to the user (with
free() or whatever).

I first tried to use the tcp_sent() callback to keep track of memory
given to lwip, but this did not work reliably. (Possibly because of a
bug in my own code).

A better solution would be a pbuf destructor that is called when
pbuf_free() decides to release memory.

/stoklund




reply via email to

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