[Top][All Lists]

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

Re: [lwip-users] Zero Copy Ethernet interface

From: Paul Black
Subject: Re: [lwip-users] Zero Copy Ethernet interface
Date: Thu, 20 Sep 2007 12:02:02 +0100
User-agent: Thunderbird (X11/20070728)

Jonathan Larmour wrote:
>> For output:
>> I get passed a chain of pbufs:
>>  - Because I want to hang on to these until an interrupt has fired, I
>>    guess I need to call pbuf_ref()?
> Yes and no. Yes, I have found that this works, but officially the answer is 
> no because someone may modify a pbuf after it has been sent. This has 
> resulted in task #6735 to provide a new pbuf type of PBUF_RAM_NOCOPY, in 
> order to permit efficient driver operation because the alternative is 
> having to copy the packet *every* *time* just in case.
> For you, if you can impose a constraint on your applications that they are 
> not allowed to modify pbufs after transmission (except to free them) then 
> you can get away with just a pbuf_ref() (and consequent pbuf_free() when 
> the transmission completes).

Ah yes. I now see from the code how this could go badly wrong.

Thanks for a most informative reply. It'll certainly help me with my
choice of TCP stack.


reply via email to

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