lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Packet queues (was Re: [bug #11400] ARP multi-packet-qu


From: Kieran Mansley
Subject: Re: [lwip-devel] Packet queues (was Re: [bug #11400] ARP multi-packet-queue modifies TCP ...)
Date: Thu, 05 Apr 2007 16:18:47 +0100

On Thu, 2007-04-05 at 15:57 +0100, Jonathan Larmour wrote:
> So is zero copy at present impossible to implement safely in lwIP?

Probably, yes.  I had wondered the same thing.

> That's 
> bad if so, as one of the good things about zero copy is not just 
> performance but memory use. This is very wasteful given there being plenty 
> of DMAing controllers out there now capable of zero copy.

True, but there are very few standard APIs that are capable of it, which
is probably why there hasn't been much concern about it.  Zero-copy
through the sockets API is nigh on impossible for example.

> If this is the case, then I think we're going to have to improve the API.

For the raw API I think this would be wise.

> Rather than trying to retain the copyable state through an API parameter 
> passed all the way through (like the copy flag to tcp_write), or break the 
> API, it may be better to add a new pbuf type PBUF_RAM_NOCOPY.

I think I'd prefer to keep it symmetric with the way that TCP does it at
the moment - ie. use a copy flag.  This would mean that the existing
mode of operation would be preserved as it would be an extension rather
than a change in behaviour, although the udp_send() function would
require an extra parameter. Having both tcp_send() and udp_send() work
in the same way is attractive.

Kieran





reply via email to

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