Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / lwip / efr32 / lwipopts.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *    Copyright (c) 2019 Nest Labs, Inc.
5  *
6  *    Licensed under the Apache License, Version 2.0 (the "License");
7  *    you may not use this file except in compliance with the License.
8  *    You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *    Unless required by applicable law or agreed to in writing, software
13  *    distributed under the License is distributed on an "AS IS" BASIS,
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *    See the License for the specific language governing permissions and
16  *    limitations under the License.
17  */
18
19 /**
20  *    @file
21  *      Compile-time configuration for LwIP on EFR32 platforms using the
22  *      Silicon Labs EFR32 SDK.
23  *
24  */
25
26 #ifndef __LWIPOPTS_H__
27 #define __LWIPOPTS_H__
28
29 #if CHIP_HAVE_CONFIG_H
30 #include <lwip/lwip_buildconfig.h>
31 #endif
32
33 #include <stdlib.h>
34
35 #define NO_SYS 0
36 #define MEM_ALIGNMENT (4)
37 #define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1)
38 #define LWIP_TIMEVAL_PRIVATE (0)
39 #define MEM_LIBC_MALLOC (0)
40 #define LWIP_COMPAT_MUTEX (0)
41 #define SYS_LIGHTWEIGHT_PROT (1)
42 #define LWIP_AUTOIP (0)
43 #define LWIP_DHCP_AUTOIP_COOP (0)
44 #define LWIP_SOCKET_SET_ERRNO 0
45 #define IP_REASS_MAX_PBUFS 0
46 #define IP_REASSEMBLY 0
47 #define MEMP_NUM_REASSDATA 0
48 #define LWIP_SO_RCVTIMEO 0
49 #define SO_REUSE (1)
50 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1)
51 #define LWIP_STATS (0)
52 #define LWIP_TCPIP_CORE_LOCKING 1
53 #define TCP_QUEUE_OOSEQ 0
54 #define ARP_QUEUEING (0)
55 #define TCPIP_THREAD_NAME "LWIP"
56
57 #define LWIP_SOCKET 0
58
59 #define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1
60
61 // TODO: seems like this is unnecessary on Thread-only platforms
62 #define LWIP_RAW 1
63 #define MEMP_NUM_RAW_PCB (5)
64
65 // TODO: verify count
66 #define MEMP_NUM_UDP_PCB (7)
67
68 #define LWIP_HAVE_LOOPIF (0)
69
70 // TODO: not sure why this is disabled
71 #define LWIP_NETIF_LOOPBACK (0)
72
73 #define MEMP_NUM_NETCONN (0)
74
75 #define LWIP_IPV4 0
76 #define LWIP_IPV6 1
77 #define LWIP_ARP (0)
78 #define LWIP_DNS (0)
79 #define LWIP_ICMP (0)
80 #define LWIP_IGMP (0)
81 #define LWIP_DHCP (0)
82 #define LWIP_IPV6_REASS (0)
83 #define LWIP_IPV6_DHCP6 0
84 #define LWIP_IPV6_AUTOCONFIG (0)
85 #define LWIP_IPV6_ROUTER_SUPPORT 0
86 #define LWIP_ND6_LISTEN_RA 0
87
88 #define LWIP_ND6_NUM_NEIGHBORS (0)
89 #define LWIP_ND6_NUM_DESTINATIONS (0)
90 #define LWIP_ND6_NUM_PREFIXES (0)
91 #define LWIP_ND6_NUM_ROUTERS (0)
92 #define LWIP_ND6_MAX_MULTICAST_SOLICIT (0)
93 #define LWIP_ND6_MAX_UNICAST_SOLICIT (0)
94 #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (0)
95 #define LWIP_ND6_TCP_REACHABILITY_HINTS (0)
96
97 #ifdef CHIP_CONFIG_EFR32MG21_PBUF_POOLS
98 #define MEMP_SEPARATE_POOLS (1)
99 #define LWIP_PBUF_FROM_CUSTOM_POOLS (0)
100 #define MEMP_USE_CUSTOM_POOLS (0)
101 #define PBUF_POOL_SIZE (4)
102 #define PBUF_POOL_BUFSIZE (1500)
103 #define PBUF_POOL_SIZE_LARGE (1)
104 #define PBUF_POOL_SIZE_MEDIUM (2)
105 #define PBUF_POOL_SIZE_SMALL (2)
106 #define PBUF_POOL_BUFSIZE_LARGE (1280)
107 #define PBUF_POOL_BUFSIZE_MEDIUM (640)
108 #define PBUF_POOL_BUFSIZE_SMALL (256)
109 #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL)
110 #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE)
111 #else
112 #define MEMP_SEPARATE_POOLS (1)
113 #define LWIP_PBUF_FROM_CUSTOM_POOLS (0)
114 #define MEMP_USE_CUSTOM_POOLS (0)
115 #define PBUF_POOL_SIZE (8)
116 #define PBUF_POOL_BUFSIZE (1500)
117 #define PBUF_POOL_SIZE_LARGE (3)
118 #define PBUF_POOL_SIZE_MEDIUM (4)
119 #define PBUF_POOL_SIZE_SMALL (5)
120 #define PBUF_POOL_BUFSIZE_LARGE (1280)
121 #define PBUF_POOL_BUFSIZE_MEDIUM (640)
122 #define PBUF_POOL_BUFSIZE_SMALL (256)
123 #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL)
124 #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE)
125 #endif
126
127 #define TCP_MSS (1152)
128 #define TCP_SND_BUF (2 * TCP_MSS)
129 #define TCP_LISTEN_BACKLOG (1)
130
131 #define ETH_PAD_SIZE (0)
132 #define SUB_ETHERNET_HEADER_SPACE (0)
133 #define PBUF_LINK_HLEN (0)
134
135 #define TCPIP_THREAD_STACKSIZE (2048)
136 #define TCPIP_THREAD_PRIO (2)
137
138 #define NETIF_MAX_HWADDR_LEN 8U
139
140 #define LWIP_IPV6_NUM_ADDRESSES 5
141
142 #define LWIP_IPV6_ND 0
143 #define LWIP_ND6_QUEUEING 0
144
145 #define LWIP_MULTICAST_PING 0
146
147 #define TCPIP_MBOX_SIZE 6
148 #define DEFAULT_RAW_RECVMBOX_SIZE 6
149 #define DEFAULT_UDP_RECVMBOX_SIZE 6
150 #define DEFAULT_TCP_RECVMBOX_SIZE 6
151
152 #ifndef LWIP_DEBUG
153 #define LWIP_DEBUG 1
154 #endif
155
156 #define MEMP_OVERFLOW_CHECK (0)
157 #define MEMP_SANITY_CHECK (0)
158 #define MEM_DEBUG (LWIP_DBG_OFF)
159 #define MEMP_DEBUG (LWIP_DBG_OFF)
160 #define PBUF_DEBUG (LWIP_DBG_OFF)
161 #define API_LIB_DEBUG (LWIP_DBG_OFF)
162 #define API_MSG_DEBUG (LWIP_DBG_OFF)
163 #define TCPIP_DEBUG (LWIP_DBG_OFF)
164 #define NETIF_DEBUG (LWIP_DBG_OFF)
165 #define SOCKETS_DEBUG (LWIP_DBG_OFF)
166 #define DEMO_DEBUG (LWIP_DBG_OFF)
167 #define DHCP_DEBUG (LWIP_DBG_OFF)
168 #define AUTOIP_DEBUG (LWIP_DBG_OFF)
169 #define ETHARP_DEBUG (LWIP_DBG_OFF)
170 #define IP_DEBUG (LWIP_DBG_OFF)
171 #define IP_REASS_DEBUG (LWIP_DBG_OFF)
172 #define IP6_DEBUG (LWIP_DBG_OFF)
173 #define RAW_DEBUG (LWIP_DBG_OFF)
174 #define ICMP_DEBUG (LWIP_DBG_OFF)
175 #define UDP_DEBUG (LWIP_DBG_OFF)
176 #define TCP_DEBUG (LWIP_DBG_OFF)
177 #define TCP_INPUT_DEBUG (LWIP_DBG_OFF)
178 #define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF)
179 #define TCP_RTO_DEBUG (LWIP_DBG_OFF)
180 #define TCP_CWND_DEBUG (LWIP_DBG_OFF)
181 #define TCP_WND_DEBUG (LWIP_DBG_OFF)
182 #define TCP_FR_DEBUG (LWIP_DBG_OFF)
183 #define TCP_QLEN_DEBUG (LWIP_DBG_OFF)
184 #define TCP_RST_DEBUG (LWIP_DBG_OFF)
185 #define PPP_DEBUG (LWIP_DBG_OFF)
186
187 #define LWIP_DBG_TYPES_ON                                                                                                          \
188     (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */
189
190 #endif /* __LWIPOPTS_H__ */