lwip-members
[Top][All Lists]
Advanced

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

Re: [lwip-members] pbuf_header() now does not work for PBUF_REF and PBU


From: Kieran Mansley
Subject: Re: [lwip-members] pbuf_header() now does not work for PBUF_REF and PBUF_ROM
Date: Mon, 31 Mar 2003 18:11:51 +0100 (BST)

On Mon, 31 Mar 2003, David Haas wrote:

> Right now the assumption is that the payload pointer of a PBUF_ROM or
> PBUF_REF buffer is immutable. I don't think this breaks anything. No one
> should be using PBUF_ROM or PBUF_REF on input to the stack. The netif
> driver on input should be using PBUF_POOL or PBUF_RAM. IMHO users on
> high-performance networks should use PBUF_POOL buffers and dma directly
> into the payload portion of the buffer.

Wouldn't work for me, but that's ok as I have my own branch to do with as
I please.  The reason it wouldn't work is because the latency of telling
the remote host where to put the data would be too great.  As a result I
have a fixed circular queue into which the remote host places the
payloads, and I create a pbuf to point into that queue.  The memory in the
queue is immutable until the netif layer is told it can get rid of it
(extension to the API that I've added) and obviously I don't want to copy.
Where the local host decides where to DMA the data from the network card
to memory, your suggestion would work, but my network is a little more
exotic than that!

> It's interesting that we have a
> differing opinion on what PBUF_REF buffers are for. Perhaps we should
> rethink how they are used, but my assumption was that they were only for
> "output" use.

I say keep it as general as possible.  In this case I can't see an
advantage of restricting the use to output only, but if it makes it
simpler for others to go the way you suggested that's fine by me too - I
won't be put out.

Kieran





reply via email to

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