blob: edac74ff7a21c40be25fdd3c4ae4eddcc60b4478 [file] [log] [blame]
Jerome Forissiere86aa9f2024-10-16 12:04:02 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2
3/* Copyright (C) 2023 Linaro Ltd. <maxim.uvarov@linaro.org> */
4
5#ifndef LWIP_UBOOT_LWIPOPTS_H
6#define LWIP_UBOOT_LWIPOPTS_H
7
Heinrich Schuchardtbd198b32024-12-06 12:37:09 +01008#include <linux/kconfig.h>
9
Jerome Forissiere86aa9f2024-10-16 12:04:02 +020010#if defined(CONFIG_LWIP_DEBUG)
11#define LWIP_DEBUG 1
12#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
13#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
14#define ETHARP_DEBUG LWIP_DBG_ON
15#define NETIF_DEBUG LWIP_DBG_ON
16#define PBUF_DEBUG LWIP_DBG_OFF
17#define API_LIB_DEBUG LWIP_DBG_ON
18#define API_MSG_DEBUG LWIP_DBG_OFF
19#define SOCKETS_DEBUG LWIP_DBG_OFF
20#define ICMP_DEBUG LWIP_DBG_OFF
21#define IGMP_DEBUG LWIP_DBG_OFF
22#define INET_DEBUG LWIP_DBG_OFF
23#define IP_DEBUG LWIP_DBG_ON
24#define IP_REASS_DEBUG LWIP_DBG_OFF
25#define RAW_DEBUG LWIP_DBG_OFF
26#define MEM_DEBUG LWIP_DBG_OFF
27#define MEMP_DEBUG LWIP_DBG_OFF
28#define SYS_DEBUG LWIP_DBG_OFF
29#define TIMERS_DEBUG LWIP_DBG_ON
30#define TCP_DEBUG LWIP_DBG_OFF
31#define TCP_INPUT_DEBUG LWIP_DBG_OFF
32#define TCP_FR_DEBUG LWIP_DBG_OFF
33#define TCP_RTO_DEBUG LWIP_DBG_OFF
34#define TCP_CWND_DEBUG LWIP_DBG_OFF
35#define TCP_WND_DEBUG LWIP_DBG_OFF
36#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
37#define TCP_RST_DEBUG LWIP_DBG_OFF
38#define TCP_QLEN_DEBUG LWIP_DBG_OFF
39#define UDP_DEBUG LWIP_DBG_OFF
40#define TCPIP_DEBUG LWIP_DBG_OFF
41#define SLIP_DEBUG LWIP_DBG_OFF
42#define DHCP_DEBUG LWIP_DBG_ON
43#define AUTOIP_DEBUG LWIP_DBG_ON
44#define DNS_DEBUG LWIP_DBG_ON
45#define IP6_DEBUG LWIP_DBG_OFF
46#define DHCP6_DEBUG LWIP_DBG_OFF
47#endif
48
49#define LWIP_TESTMODE 0
50
51#if !defined(CONFIG_LWIP_ASSERT)
52#define LWIP_NOASSERT 1
53#define LWIP_ASSERT(message, assertion)
54#endif
55
56#include "lwip/debug.h"
57
58#define SYS_LIGHTWEIGHT_PROT 0
59#define NO_SYS 1
60
61#define LWIP_IPV4 1
62#define LWIP_IPV6 0
63
64#define MEM_ALIGNMENT 8
65
66#define MEMP_NUM_TCP_SEG 16
67#define PBUF_POOL_SIZE 8
68
69#define LWIP_ARP 1
70#define ARP_TABLE_SIZE 4
71#define ARP_QUEUEING 1
72
73#define IP_FORWARD 0
74#define IP_OPTIONS_ALLOWED 1
75#define IP_REASSEMBLY 0
76#define IP_FRAG 0
77#define IP_REASS_MAXAGE 3
78#define IP_REASS_MAX_PBUFS 4
79#define IP_FRAG_USES_STATIC_BUF 0
80
81#define IP_DEFAULT_TTL 255
82
83#define LWIP_ICMP 0
84
85#if defined(CONFIG_PROT_RAW_LWIP)
86#define LWIP_RAW 1
87#else
88#define LWIP_RAW 0
89#endif
90
91#if defined(CONFIG_PROT_DHCP_LWIP)
92#define LWIP_DHCP 1
93#define LWIP_DHCP_BOOTP_FILE 1
94#else
95#define LWIP_DHCP 0
96#endif
97
98#define LWIP_DHCP_DOES_ACD_CHECK 0
99
100#define LWIP_AUTOIP 0
101
102#define LWIP_SNMP 0
103
104#define LWIP_IGMP 0
105
106#if defined(CONFIG_PROT_DNS_LWIP)
107#define LWIP_DNS 1
108#define DNS_TABLE_SIZE 1
109#else
110#define LWIP_DNS 0
111#endif
112
113#if defined(CONFIG_PROT_UDP_LWIP)
114#define LWIP_UDP 1
115#else
116#define LWIP_UDP 0
117#endif
118
119#if defined(CONFIG_PROT_TCP_LWIP)
120#define LWIP_TCP 1
121#define TCP_MSS 1460
122#define TCP_WND CONFIG_LWIP_TCP_WND
123#define LWIP_WND_SCALE 1
124#define TCP_RCV_SCALE 0x7
125#define TCP_SND_BUF (2 * TCP_MSS)
126#ifdef CONFIG_PROT_TCP_SACK_LWIP
127#define LWIP_TCP_SACK_OUT 1
128#endif
129#else
130#define LWIP_TCP 0
131#endif
132
133#define LWIP_LISTEN_BACKLOG 0
134
135#define PBUF_LINK_HLEN 14
136#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_HLEN)
137
138#define LWIP_HAVE_LOOPIF 0
139
140#define LWIP_NETCONN 0
141#define LWIP_DISABLE_MEMP_SANITY_CHECKS 1
142
143#define LWIP_SOCKET 0
144#define SO_REUSE 0
145
146#define LWIP_STATS 0
147
148#define PPP_SUPPORT 0
149
150#define LWIP_TCPIP_CORE_LOCKING 0
151
152#define LWIP_NETIF_LOOPBACK 0
153
154/* use malloc instead of pool */
155#define MEMP_MEM_MALLOC 1
156#define MEMP_MEM_INIT 1
157#define MEM_LIBC_MALLOC 1
158
Heinrich Schuchardtbd198b32024-12-06 12:37:09 +0100159#if CONFIG_IS_ENABLED(MBEDTLS_LIB_TLS)
Javier Tia273e2792024-11-10 10:28:38 +0200160#define LWIP_ALTCP 1
161#define LWIP_ALTCP_TLS 1
162#define LWIP_ALTCP_TLS_MBEDTLS 1
163#endif
164
Jerome Forissiere86aa9f2024-10-16 12:04:02 +0200165#endif /* LWIP_UBOOT_LWIPOPTS_H */