lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Smallest possible PBUF_POOL_SIZE and MEM_SIZE (UDP only


From: goldsimon
Subject: Re: [lwip-users] Smallest possible PBUF_POOL_SIZE and MEM_SIZE (UDP only), PBUF allocation
Date: Fri, 19 Oct 2018 14:14:23 +0200
User-agent: K-9 Mail for Android


Hamme, Janis" wrote:
> Since each packet would be processed
>immediately I can't think of any situation where I would need to store
>more than one incoming and one outgoing packet at a time. Queueing
>shouldn't occur anywhere - or am I missing something?

If your netif driver doesn't queue, tx packets can still be queued for a short 
time if the MAC address for the next hop needs to be resolved. For multicast, 
this should not be required, so your assumption might hold.


>My other question is what would be the most efficient way to allocate
>PBUFs for outgoing packets. I'm using a statically allocated buffer to
>generate outgoing packets and I could easily increase the buffer size
>to hold all other headers in contiguous memory. But I must be sure that
>the buffer can be reused once udp_sendto(...) returns. Is there any way
>to achieve that or is the overhead of using PBUF_REF with chained
>header PBUFs negligible?

That would involve some work, I think. Using a PBUF_RAM should be the most 
simple solution, I guess? In your simple setup you could also use a PBUF_POOL 
for tx pbufs to get rid of the heap...


Simon



reply via email to

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