[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 2.0.0.6 (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.
--
Paul
- [lwip-users] Zero Copy Ethernet interface, Paul Black, 2007/09/19
- Re: [lwip-users] Zero Copy Ethernet interface, Jonathan Larmour, 2007/09/19
- Re: [lwip-users] Zero Copy Ethernet interface, Andrew Dennison, 2007/09/19
- RE: [lwip-users] Zero Copy Ethernet interface, Goldschmidt Simon, 2007/09/20
- Re: [lwip-users] Zero Copy Ethernet interface, Andrew Dennison, 2007/09/20
- RE: [lwip-users] Zero Copy Ethernet interface, Goldschmidt Simon, 2007/09/20
- Re: [lwip-users] Zero Copy Ethernet interface, Jonathan Larmour, 2007/09/20
- RE: [lwip-users] Zero Copy Ethernet interface, Goldschmidt Simon, 2007/09/20
- Re: [lwip-users] Zero Copy Ethernet interface, Andrew Dennison, 2007/09/20
Re: [lwip-users] Zero Copy Ethernet interface,
Paul Black <=