Skip to content

lwip: Allow several configuration macros to be set externally. #2550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions features/net/FEATURE_IPV4/lwip-interface/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,24 @@
// 32-bit alignment
#define MEM_ALIGNMENT 4

#ifndef PBUF_POOL_SIZE
#define PBUF_POOL_SIZE 5
#endif
#ifndef MEMP_NUM_TCP_PCB_LISTEN
#define MEMP_NUM_TCP_PCB_LISTEN 4
#endif
#ifndef MEMP_NUM_TCP_PCB
#define MEMP_NUM_TCP_PCB 4
#endif
#ifndef MEMP_NUM_UDP_PCB
#define MEMP_NUM_UDP_PCB 4
#endif
#ifndef MEMP_NUM_PBUF
#define MEMP_NUM_PBUF 8
#endif
#ifndef MEMP_NUM_NETBUF
#define MEMP_NUM_NETBUF 8
#endif

#define TCP_QUEUE_OOSEQ 0
#define TCP_OVERSIZE 0
Expand Down Expand Up @@ -119,8 +131,12 @@

/* MSS should match the hardware packet size */
#define TCP_MSS 1460
#ifndef TCP_SND_BUF
#define TCP_SND_BUF (2 * TCP_MSS)
#endif
#ifndef TCP_WND
#define TCP_WND (2 * TCP_MSS)
#endif
#define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)

// Broadcast
Expand Down