lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Smallest possible PBUF_POOL_SIZE and MEM_SIZE (UDP only), P


From: Hamme, Janis
Subject: [lwip-users] Smallest possible PBUF_POOL_SIZE and MEM_SIZE (UDP only), PBUF allocation
Date: Fri, 19 Oct 2018 10:34:45 +0000

Hello lwIP Users,

I'm currently configuring/porting lwIP for an embedded application with quite 
constrained memory size (NO_SYS mode).
Since I only need IPv6/UDP with multicast I was wondering if setting the 
statically allocated memory as low as

#define PBUF_POOL_SIZE            1
#define MEM_SIZE                        800

could cause any problems. 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? I've attached the relevant parts of my lwipopts.h at the 
bottom.

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?

Regards
Janis Hamme

lwipopts.h enabled features:

#define LWIP_IPV4                                       0
#define LWIP_IPV6                                       1
#define LWIP_RAW                                        0
#define LWIP_DNS                                        0
#define LWIP_TCP                                        0
#define LWIP_UDP                                        1

#define LWIP_ICMP6                                      1
#define LWIP_IPV6_MLD                           1
#define LWIP_IPV6_REASS                         0
#define LWIP_IPV6_FRAG                          0
#define LWIP_IPV6_SEND_ROUTER_SOLICIT           0
#define LWIP_ND6_ALLOW_RA_UPDATES               0
#define LWIP_ND6_QUEUEING                               0

#define LWIP_NETCONN                            0
#define LWIP_SOCKET                                     0



reply via email to

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