[Top][All Lists]

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

RE: [lwip-users] Zero Copy Ethernet interface

From: Goldschmidt Simon
Subject: RE: [lwip-users] Zero Copy Ethernet interface
Date: Thu, 20 Sep 2007 08:08:59 +0200

[re jifl's mail:]
> > 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()?
> [..]
> 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).

Note that for UDP sockets, PBUF_REFs are used, so you also have
to make sure that socket applications don't change the buffer they
passed to lwip_send afterwards.

[re andrew's mail:]

> input_thread_loop:
>     pbuf_alloc() 1514 bytes
>     pass pbuf to driver and block waiting for packet then DMA from
>     pbuf_realloc() <- trim to actual length
>     netif->input()

Which pbuf type do you use here? If you use PBUF_POOL, then
effectively only adjuts the length information, so small packets still
a significant amount of memory.


reply via email to

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