[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c
From: |
Leon Woestenberg |
Subject: |
[lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c |
Date: |
Wed, 08 Jan 2003 23:16:36 -0000 |
Hello,
> Pbufs of type PBUF_ROM are never supposed to be overwritten by the
> application (hence the name ROM = Read Only Memory). If there are
> problems with netbuf_ref() and pbufs, it is better to change the netbuf_
> API than the core code.
>
> So: no copying of PBUF_ROM pbuf, since this should have been done by the
> application (into a PBUF_RAM pbuf) if the application intended to
> overwrite the data.
>
Then, the question is: how can zero-copy be used between
application-managed-memory
and lwIP in the current architecture?
The PBUF_ROM type can be used to exploit the "zero-copy" feature of lwIP,
i.e.
payload is never redundantly copied between data and network interface
hardware.
This is a desirable feature. (Many UNIX stacks are not zero-copy; one of the
BSDs
recently has achieved the "zero-copy" feature, cannot remember if it was
NetBSD or
one of the others.)
AFAIK, abusing PBUF_ROM is the only way to exploit zero-copy of payload data
in
application-managed-memory.
For non-ROM non-lwIP managed memory, maybe the introduction of PBUF_REF
is desirable. It has the same properties as PBUF_ROM, only that the data
itself is
not be considered constant after it has been submitted to lwIP.
Using such an approach would allow zero-copy in case the packet can be
immediately
send, or payload-copying in case the packet is queued in lwIP.
Regards,
Leon.
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Kieran Mansley, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c,
Leon Woestenberg <=
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Nicolas Moreau, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Leon Woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin . Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Adam Dunkels, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09