forked from flapjack321/lib-lwip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.uk
392 lines (336 loc) · 8.93 KB
/
Config.uk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
menuconfig LIBLWIP
bool "lwip - Lightweight TCP/IP stack"
default n
select LIBNOLIBC if !HAVE_LIBC
select LIBUKDEBUG
select LIBUKSWRAND
select HAVE_NW_STACK
if LIBLWIP
choice
prompt "Version"
default LWIP_UNIKRAFT21X
help
Select the version of the upstream lwIP stack
sources that will be downloaded.
Please note that you should run `make properclean`
whenever you change the version.
config LWIP_RELEASE212
bool "Release 2.1.2"
help
An official release from the lwIP community.
config LWIP_LATEST21X
bool "Latest 2.1.x (unofficial)"
help
The latest available lwIP version from the 2.1
release series that include recent bugfixes and
security patches.
Please note that there is a little chance that
depending on the changes upstream, the Unikraft
code could become incompatible. In such a case,
we recommend to select a released and officially
supported version instead.
config LWIP_UNIKRAFT21X
bool "Unikraft 2.1.x (official)"
help
Unikraft official latest available and tested lwIP
version. This version is based on the latest lwIP
release from the 2.1 release series, includes some
recent bugfixes and security patches, and includes
latest features developed by the Unikraft community
that are currently upstreamed to lwIP.
endchoice
menu "Netif drivers"
config LWIP_LOOPIF
bool "Loop interface"
default n
select LWIP_LOOPBACK
help
A driver for localhost (e.g., 127.0.0.1) networking.
Note: When lwIP is configured with mainloop mode, the
loop interface needs to be polled manually (netif_poll()).
config LWIP_UKNETDEV
bool "Unikraft Netdev Ethernet (libuknetdev)"
default y
select LIBUKNETDEV
select LIBUKNETDEV_DISPATCHERTHREADS if LWIP_THREADS
help
A generic driver that operates network drivers through
libuknetdev API.
Note: When lwIP is configured with mainloop mode, receive
interrupts are not enabled by this driver (there is also no
receive interrupt handler registered).
In case threaded mode is selected and the underlying device
driver does not support receive interrupts the network
interfaces have to be polled manually (uknetdev_poll()).
if LWIP_UKNETDEV
config LWIP_UKNETDEV_POLLONLY
depends on LWIP_THREADS
bool "Force polling mode (workaround)"
default n
help
This option forces polling mode for uknetdev devices
irrespective if the device supports interrupt-driven
mode.
Because this option always causes 100% CPU utilization
it should be considered as workaround for cases where
interrupt-based handling performs badly.
endif
config LWIP_UKNETDEV_SCRATCH
int
default 64
help
The network stack reserves space in the uknetdev device for its
use. Please do not change this value and in case change this
value please make sure it is sufficient enough to hold the
lwip_netdev_data data structure.
endmenu
config LWIP_AUTOIFACE
bool "Automatically attach netifs"
default y
help
Automatically attach found network devices to the stack
during initialization.
choice
prompt "Operation mode"
default LWIP_THREADS
config LWIP_NOTHREADS
bool "Mainloop (non-threaded)"
help
No thread is created to operate the stack. The stack has to be
called from the same context as all stack interactions. This
includes polling network devices. The Socket API is unavailable.
config LWIP_THREADS
bool "Threaded"
select LIBUKSCHED
select LIBUKMPI
select LIBUKMPI_MBOX
select LIBUKLOCK
select LIBUKLOCK_SEMAPHORE
select LIBUKLOCK_MUTEX
help
Creates a core thread for the stack.
endchoice
choice
prompt "Stack input mailbox size"
depends on LWIP_THREADS
default LWIP_STACKTHREAD_MBOX_SIZE_256
config LWIP_STACKTHREAD_MBOX_SIZE_32
bool "32"
config LWIP_STACKTHREAD_MBOX_SIZE_64
bool "64"
config LWIP_STACKTHREAD_MBOX_SIZE_128
bool "128"
config LWIP_STACKTHREAD_MBOX_SIZE_256
bool "256"
config LWIP_STACKTHREAD_MBOX_SIZE_512
bool "512"
config LWIP_STACKTHREAD_MBOX_SIZE_1024
bool "1024"
config LWIP_STACKTHREAD_MBOX_SIZE_2048
bool "2048"
help
This sets the size for the input mailbox that is used for receiving traffic from the network
interfaces.
endchoice
config LWIP_STACKTHREAD_MBOX_SIZE
int
default 32 if LWIP_STACKTHREAD_MBOX_SIZE_32
default 64 if LWIP_STACKTHREAD_MBOX_SIZE_64
default 128 if LWIP_STACKTHREAD_MBOX_SIZE_128
default 256 if LWIP_STACKTHREAD_MBOX_SIZE_256
default 512 if LWIP_STACKTHREAD_MBOX_SIZE_512
default 1024 if LWIP_STACKTHREAD_MBOX_SIZE_1024
default 2048 if LWIP_STACKTHREAD_MBOX_SIZE_2048
choice
prompt "Memory allocation mode"
default LWIP_HEAP
config LWIP_HEAP
bool "Heap only"
help
Use default ukalloc allocator for all memory allocation requests
config LWIP_POOLS
bool "Memory pools"
endchoice
config LWIP_NETIF_EXT_STATUS_CALLBACK
bool "Netif extended status callback API"
default y
help
Support extended status callbacks to netif related events.
config LWIP_NETIF_STATUS_PRINT
bool "Print netif status updates"
depends on LWIP_NETIF_EXT_STATUS_CALLBACK
default y
help
Print netif status changes to standard console
config LWIP_LOOPBACK
bool "Loopback traffic"
default y
help
Support sending packets with a destination IP address
that is equal to the netif IP address, looping them back
up the stack.
config LWIP_IPV4
bool "IPv4 support"
default y
config LWIP_IPV6
bool "IPv6 support"
default n
menu "IP Configuration"
depends on LWIP_IPV4 || LWIP_IPV6
config LWIP_IP_REASS_MAX_PBUFS
int "Maximum number of fragments"
default 10
help
This is the maximum number of IP fragments waiting to be
reassembled.
endmenu
menuconfig LWIP_RAW
bool "RAW support"
default n
config LWIP_UDP
bool "UDP support"
default y
config LWIP_SO_RCVBUF
bool "SO_RCVBUF flag support"
default n
menuconfig LWIP_TCP
bool "TCP support"
default y
if LWIP_TCP
config LWIP_TCP_MSS
int "Maximum segment size (bytes)"
default 1460
config LWIP_WND_SCALE
bool "Window scaling"
default y
config LWIP_TCP_KEEPALIVE
bool "Keepalive"
default n
config LWIP_TCP_TIMESTAMPS
bool "Timestamps"
default n
config LWIP_NUM_TCPCON
int "Maximum number of simultaneous TCP connections"
default 64
config LWIP_NUM_TCPLISTENERS
int "Maximum number of simultaneous TCP listeners"
default 64
endif
config LWIP_ICMP
bool "ICMP support"
default y
config LWIP_IGMP
bool "IGMP support"
default n
config LWIP_SNMP
bool "SNMP support"
default n
config LWIP_DHCP
bool "DHCP client"
depends on LWIP_IPV4
select LWIP_UDP
default n
help
When LWIP_AUTOIFACE is used, the initialization routine will
query the IPv4 addresses for the found devices from a DHCP
server on network.
menuconfig LWIP_DNS
bool "DNS Resolver"
default y
if LWIP_DNS
config LWIP_DNS_MAX_SERVERS
int "Maximum number of servers"
default 2
config LWIP_DNS_TABLE_SIZE
int "DNS table size"
default 32
endif
menuconfig LWIP_SOCKET
depends on LWIP_THREADS && (LWIP_UDP || LWIP_TCP)
bool "Socket API"
select LIBVFSCORE
default y
if LWIP_SOCKET
config LWIP_SOCKET_SELECT_GENERIC_FDS
bool "Use select() with any file descriptor type"
depends on HAVE_LIBC
default y
help
lwip's select() implementation supports only sockets. This
configuration option makes it possible to use other file descriptor
types as well, even though they are not supported by lwip.
config LWIP_SOCKET_PPOLL
bool "Enable ppoll()"
depends on HAVE_LIBC
default y
help
Enable ppoll() implementation.
config LWIP_UDP_RECVMBOX_FACTOR
int "Factor for UDP recvmbox"
depends on LWIP_UDP
range 1 5
default 2
help
How many times should the UDP recvmbox be bigger than the LWIP stackthread mbox size.
Default 2, maximum 5.
config LWIP_TCP_RECVMBOX_FACTOR
int "Factor for TCP recvmbox"
depends on LWIP_TCP
range 1 5
default 2
help
How many times should the TCP recvmbox be bigger than the LWIP stackthread mbox size.
Default 2, maximum 5.
endif
menuconfig LWIP_DEBUG
bool "Debug messages"
default n
help
Enables debug messages on the debug console for selected lwIP
message types.
if LWIP_DEBUG
config LWIP_MAINLOOP_DEBUG
bool "Mainloop"
default n
help
Enables TCP_IP_DEBUG, TIMERS_DEBUG
config LWIP_IF_DEBUG
bool "Netif"
default n
help
Enables ETHARP_DEBUG, NETIF_DEBUG
config LWIP_IP_DEBUG
bool "IP"
default n
help
Enables IP_DEBUG, IP6_DEBUG, IP_REASS_DEBUG
config LWIP_UDP_DEBUG
bool "UDP"
default n
help
Enables UDP_DEBUG
config LWIP_TCP_DEBUG
bool "TCP"
default n
help
Enables TCP_DEBUG, TCP_FR_DEBUG, TCP_RTO_DEBUG, TCP_CWND_DEBUG,
TCP_WND_DEBUG, TCP_RST_DEBUG, TCP_QLEN_DEBUG, TCP_OUTPUT_DEBUG,
TCP_INPUT_DEBUG
config LWIP_SYS_DEBUG
bool "System"
default n
help
Enables SYS_DEBUG, PBUF_DEBUG, MEM_DEBUG, MEMP_DEBUG
config LWIP_API_DEBUG
bool "APIs"
default n
help
Enables SOCKETS_DEBUG, RAW_DEBUG, API_MSG_DEBUG, API_LIB_DEBUG
config LWIP_SERVICE_DEBUG
bool "Services"
default n
help
Enables ETHARP_DEBUG, DNS_DEBUG, AUTOIP_DEBUG, DHCP_DEBUG,
ICMP_DEBUG, SNMP_DEBUG, SNMP_MSG_DEBUG, SNMP_MIB_DEBUG
endif
endif