[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] udp (RFC!)
From: |
Leon Woestenberg |
Subject: |
Re: [lwip-users] udp (RFC!) |
Date: |
Mon, 17 Mar 2003 23:35:57 +0100 |
Hello David,
>
> I suppose I could fix this at a low level and copy all PBUF_ROM buffers
> into PBUF_RAM buffers before queuing onto the ARP queue or queuing in
> the output driver. I could write a pbuf_copy_if_rom() function in pbuf.c
> to do it.
>
Yup, this is the prefered approach for the current lwIP stack.
However, take in mind that a packet can consist of a chain of differently
typed PBUF_ types.
The trick would be to replace the PBUF_ROM in this chain by corresponding
copies in PBUF_RAM. Also, the same goes for PBUF_REF types (pointing
to application-RAM).
Thinking of it, maybe it would be possible to start implementing PBUF_REF
types in the current source anyway. They should not break anything else.
I will think about this a little more. Your feedback is great so far!
---
I understand your particular implementation of the ring buffer that defers
actual
sending using a thread.
Yes, it would be hard to implement a pass-by-reference socket layer,
implementing
zero-copy all the way. A concession (i.e. copying) must be made _somewhere_.
Still, my preference would be to defer a copy to the lower levels (like your
DMA
system).
Implementing copying at the high level will induce this everyone using lwIP,
removing the current zero-copy feature for everyone.
Regards,
Leon.
- [lwip-users] udp, David Haas, 2003/03/14
- Re: [lwip-users] udp, NGB, 2003/03/14
- Re: [lwip-users] udp, Leon Woestenberg, 2003/03/16
- Re: [lwip-users] udp, David Haas, 2003/03/16
- Re: [lwip-users] udp, Marc Boucher, 2003/03/16
- Re: [lwip-users] udp, Leon Woestenberg, 2003/03/16
- Message not available
- Re: [lwip-users] udp (RFC!), Leon Woestenberg, 2003/03/17
- Re: [lwip-users] udp (RFC!), David Haas, 2003/03/17
- Re: [lwip-users] udp (RFC!),
Leon Woestenberg <=
- Re: [lwip-users] udp (RFC!), Kieran Mansley, 2003/03/18
- Re: [lwip-users] udp (RFC!), Kieran Mansley, 2003/03/18
- Re: [lwip-users] udp (RFC!), Jani Monoses, 2003/03/18
- Re: [lwip-users] udp (RFC!), Kieran Mansley, 2003/03/18