-
Notifications
You must be signed in to change notification settings - Fork 9
/
Kconfig
595 lines (493 loc) · 23.1 KB
/
Kconfig
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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
menu "LWIP"
config ETHARP_SUPPORT_VLAN
bool "Support receiving and sending ethernet packets with VLAN header"
default n
help
ETHARP_SUPPORT_VLAN==1: support receiving and sending ethernet packets with
VLAN header. See the description of LWIP_HOOK_VLAN_CHECK and LWIP_HOOK_VLAN_SET
hooks to check/set VLAN headers.
If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted.
If ETHARP_VLAN_CHECK is not defined, all traffic is accepted.
config LWIP_IRAM_OPTIMIZATION
bool "Enable LWIP IRAM optimization"
default n
help
If this feature is enabled, some functions relating to RX/TX in LWIP will be
put into IRAM, it can improve UDP/TCP throughput by >10% for single core mode,
it doesn't help too much for dual core mode. On the other hand, it needs about
10KB IRAM for these optimizations.
If this feature is disabled, all lwip functions will be put into FLASH.
config LWIP_MAX_SOCKETS
int "Max number of open sockets"
range 1 16
default 10
help
Sockets take up a certain amount of memory, and allowing fewer
sockets to be open at the same time conserves memory. Specify
the maximum amount of sockets here. The valid value is from 1
to 16.
config LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS
bool "Randomize the local port for the first"
default y
help
LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first
local TCP/UDP pcb (default==0). This can prevent creating predictable port
numbers after booting a device.
config USE_ONLY_LWIP_SELECT
bool "Support LWIP socket select() only"
default n
help
The virtual filesystem layer of select() redirects sockets to
lwip_select() and non-socket file descriptors to their respective driver
implementations. If this option is enabled then all calls of select()
will be redirected to lwip_select(), therefore, select can be used
for sockets only.
config LWIP_SO_REUSE
bool "Enable SO_REUSEADDR option"
default y
help
Enabling this option allows binding to a port which remains in
TIME_WAIT.
config LWIP_SO_REUSE_RXTOALL
bool "SO_REUSEADDR copies broadcast/multicast to all matches"
depends on LWIP_SO_REUSE
default y
help
Enabling this option means that any incoming broadcast or multicast
packet will be copied to all of the local sockets that it matches
(may be more than one if SO_REUSEADDR is set on the socket.)
This increases memory overhead as the packets need to be copied,
however they are only copied per matching socket. You can safely
disable it if you don't plan to receive broadcast or multicast
traffic on more than one socket at a time.
config LWIP_SO_RCVBUF
bool "Enable SO_RCVBUF option"
default n
help
Enabling this option allows checking for available data on a netconn.
config LWIP_IP_FRAG
bool "Enable fragment outgoing IP packets"
default y
help
Enabling this option allows fragmenting outgoing IP packets if their size
exceeds MTU.
config LWIP_IP_REASSEMBLY
bool "Enable reassembly incoming fragmented IP packets"
default n
help
Enabling this option allows reassemblying incoming fragmented IP packets.
config LWIP_STATS
bool "Enable LWIP statistics"
default n
help
Enabling this option allows LWIP statistics
config LWIP_ETHARP_TRUST_IP_MAC
bool "Enable LWIP ARP trust"
default n
help
Enabling this option allows ARP table to be updated.
If this option is enabled, the incoming IP packets cause the ARP table to be
updated with the source MAC and IP addresses supplied in the packet.
You may want to disable this if you do not trust LAN peers to have the
correct addresses, or as a limited approach to attempt to handle
spoofing. If disabled, lwIP will need to make a new ARP request if
the peer is not already in the ARP table, adding a little latency.
The peer *is* in the ARP table if it requested our address before.
Also notice that this slows down input processing of every IP packet!
There are two known issues in real application if this feature is enabled:
- The LAN peer may have bug to update the ARP table after the ARP entry is aged out.
If the ARP entry on the LAN peer is aged out but failed to be updated, all IP packets
sent from LWIP to the LAN peer will be dropped by LAN peer.
- The LAN peer may not be trustful, the LAN peer may send IP packets to LWIP with
two different MACs, but the same IP address. If this happens, the LWIP has problem
to receive IP packets from LAN peer.
So the recommendation is to disable this option.
Here the LAN peer means the other side to which the ESP station or soft-AP is connected.
config ESP_GRATUITOUS_ARP
bool "Send gratuitous ARP periodically"
default y
help
Enable this option allows to send gratuitous ARP periodically.
This option solve the compatibility issues.If the ARP table of the AP is old, and the AP
doesn't send ARP request to update it's ARP table, this will lead to the STA sending IP packet fail.
Thus we send gratuitous ARP periodically to let AP update it's ARP table.
config GARP_TMR_INTERVAL
int "GARP timer interval(seconds)"
default 60
depends on ESP_GRATUITOUS_ARP
help
Set the timer interval for gratuitous ARP. The default value is 60s
config TCPIP_RECVMBOX_SIZE
int "TCPIP task receive mail box size"
default 32
range 6 64 if !LWIP_WND_SCALE
range 6 1024 if LWIP_WND_SCALE
help
Set TCPIP task receive mail box size. Generally bigger value means higher throughput
but more memory. The value should be bigger than UDP/TCP mail box size.
config LWIP_DHCP_DOES_ARP_CHECK
bool "DHCP: Perform ARP check on any offered address"
default y
help
Enabling this option performs a check (via ARP request) if the offered IP address
is not already in use by another host on the network.
config LWIP_DHCP_RESTORE_LAST_IP
bool "DHCP: Restore last IP obtained from DHCP server"
default n
help
When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP
server. Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still
available, there is no need for sending discovery message to DHCP server and save some time.
menu "DHCP server"
config LWIP_DHCPS_LEASE_UNIT
int "Multiplier for lease time, in seconds"
range 1 3600
default 60
help
The DHCP server is calculating lease time multiplying the sent
and received times by this number of seconds per unit.
The default is 60, that equals one minute.
config LWIP_DHCPS_MAX_STATION_NUM
int "Maximum number of stations"
range 1 64
default 8
help
The maximum number of DHCP clients that are connected to the server.
After this number is exceeded, DHCP server removes of the oldest device
from it's address pool, without notification.
endmenu # DHCPS
menuconfig LWIP_AUTOIP
bool "Enable IPV4 Link-Local Addressing (AUTOIP)"
default n
help
Enabling this option allows the device to self-assign an address
in the 169.256/16 range if none is assigned statically or via DHCP.
See RFC 3927.
config LWIP_AUTOIP_TRIES
int "DHCP Probes before self-assigning IPv4 LL address"
range 1 100
default 2
depends on LWIP_AUTOIP
help
DHCP client will send this many probes before self-assigning a
link local address.
From LWIP help: "This can be set as low as 1 to get an AutoIP
address very quickly, but you should be prepared to handle a
changing IP address when DHCP overrides AutoIP." (In the case of
ESP-IDF, this means multiple SYSTEM_EVENT_STA_GOT_IP events.)
config LWIP_AUTOIP_MAX_CONFLICTS
int "Max IP conflicts before rate limiting"
range 1 100
default 9
depends on LWIP_AUTOIP
help
If the AUTOIP functionality detects this many IP conflicts while
self-assigning an address, it will go into a rate limited mode.
config LWIP_AUTOIP_RATE_LIMIT_INTERVAL
int "Rate limited interval (seconds)"
range 5 120
default 20
depends on LWIP_AUTOIP
help
If rate limiting self-assignment requests, wait this long between
each request.
config LWIP_IPV6_AUTOCONFIG
bool "Enable IPV6 stateless address autoconfiguration"
default n
help
Enabling this option allows the devices to IPV6 stateless address autoconfiguration.
See RFC 4862.
menuconfig LWIP_NETIF_LOOPBACK
bool "Support per-interface loopback"
default y
help
Enabling this option means that if a packet is sent with a destination
address equal to the interface's own IP address, it will "loop back" and
be received by this interface.
config LWIP_LOOPBACK_MAX_PBUFS
int "Max queued loopback packets per interface"
range 0 16
default 8
depends on LWIP_NETIF_LOOPBACK
help
Configure the maximum number of packets which can be queued for
loopback on a given interface. Reducing this number may cause packets
to be dropped, but will avoid filling memory with queued packet data.
menu "TCP"
config LWIP_MAX_ACTIVE_TCP
int "Maximum active TCP Connections"
range 1 1024
default 16
help
The maximum number of simultaneously active TCP
connections. The practical maximum limit is
determined by available heap memory at runtime.
Changing this value by itself does not substantially
change the memory usage of LWIP, except for preventing
new TCP connections after the limit is reached.
config LWIP_MAX_LISTENING_TCP
int "Maximum listening TCP Connections"
range 1 1024
default 16
help
The maximum number of simultaneously listening TCP
connections. The practical maximum limit is
determined by available heap memory at runtime.
Changing this value by itself does not substantially
change the memory usage of LWIP, except for preventing
new listening TCP connections after the limit is reached.
config TCP_MAXRTX
int "Maximum number of retransmissions of data segments"
default 12
range 3 12
help
Set maximum number of retransmissions of data segments.
config TCP_SYNMAXRTX
int "Maximum number of retransmissions of SYN segments"
default 6
range 3 12
help
Set maximum number of retransmissions of SYN segments.
config TCP_MSS
int "Maximum Segment Size (MSS)"
default 1436
range 1220 1436
help
Set maximum segment size for TCP transmission.
Can be set lower to save RAM, the default value 1436 will give best throughput.
config TCP_MSL
int "Maximum segment lifetime (MSL)"
default 60000
help
Set maximum segment lifetime in in milliseconds.
config TCP_SND_BUF_DEFAULT
int "Default send buffer size"
default 5744 # 4 * default MSS
range 2440 65535 if !LWIP_WND_SCALE
range 2440 1024000 if LWIP_WND_SCALE
help
Set default send buffer size for new TCP sockets.
Per-socket send buffer size can be changed at runtime
with lwip_setsockopt(s, TCP_SNDBUF, ...).
This value must be at least 2x the MSS size, and the default
is 4x the default MSS size.
Setting a smaller default SNDBUF size can save some RAM, but
will decrease performance.
config TCP_WND_DEFAULT
int "Default receive window size"
default 5744 # 4 * default MSS
range 2440 65535 if !LWIP_WND_SCALE
range 2440 1024000 if LWIP_WND_SCALE
help
Set default TCP receive window size for new TCP sockets.
Per-socket receive window size can be changed at runtime
with lwip_setsockopt(s, TCP_WINDOW, ...).
Setting a smaller default receive window size can save some RAM,
but will significantly decrease performance.
config TCP_RECVMBOX_SIZE
int "Default TCP receive mail box size"
default 6
range 6 64 if !LWIP_WND_SCALE
range 6 1024 if LWIP_WND_SCALE
help
Set TCP receive mail box size. Generally bigger value means higher throughput
but more memory. The recommended value is: TCP_WND_DEFAULT/TCP_MSS + 2, e.g. if
TCP_WND_DEFAULT=14360, TCP_MSS=1436, then the recommended receive mail box size is
(14360/1436 + 2) = 12.
TCP receive mail box is a per socket mail box, when the application receives packets
from TCP socket, LWIP core firstly posts the packets to TCP receive mail box and the
application then fetches the packets from mail box. It means LWIP can caches maximum
TCP_RECCVMBOX_SIZE packets for each TCP socket, so the maximum possible cached TCP packets
for all TCP sockets is TCP_RECCVMBOX_SIZE multiples the maximum TCP socket number. In other
words, the bigger TCP_RECVMBOX_SIZE means more memory.
On the other hand, if the receiv mail box is too small, the mail box may be full. If the
mail box is full, the LWIP drops the packets. So generally we need to make sure the TCP
receive mail box is big enough to avoid packet drop between LWIP core and application.
config TCP_QUEUE_OOSEQ
bool "Queue incoming out-of-order segments"
default y
help
Queue incoming out-of-order segments for later use.
Disable this option to save some RAM during TCP sessions, at the expense
of increased retransmissions if segments arrive out of order.
config ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES
bool "Keep TCP connections when IP changed"
default n
help
This option is enabled when the following scenario happen:
network dropped and reconnected, IP changes is like: 192.168.0.2->0.0.0.0->192.168.0.2
Disable this option to keep consistent with the original LWIP code behavior.
choice TCP_OVERSIZE
prompt "Pre-allocate transmit PBUF size"
default TCP_OVERSIZE_MSS
help
Allows enabling "oversize" allocation of TCP transmission pbufs ahead of time,
which can reduce the length of pbuf chains used for transmission.
This will not make a difference to sockets where Nagle's algorithm
is disabled.
Default value of MSS is fine for most applications, 25% MSS may save
some RAM when only transmitting small amounts of data. Disabled will
have worst performance and fragmentation characteristics, but uses
least RAM overall.
config TCP_OVERSIZE_MSS
bool "MSS"
config TCP_OVERSIZE_QUARTER_MSS
bool "25% MSS"
config TCP_OVERSIZE_DISABLE
bool "Disabled"
endchoice
config LWIP_WND_SCALE
bool "Support TCP window scale"
depends on WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST
default n
help
Enable this feature to support TCP window scaling.
config TCP_RCV_SCALE
int "Set TCP receiving window scaling factor"
depends on LWIP_WND_SCALE
range 0 14
default 0
help
Enable this feature to support TCP window scaling.
endmenu # TCP
menu "UDP"
config LWIP_MAX_UDP_PCBS
int "Maximum active UDP control blocks"
range 1 1024
default 16
help
The maximum number of active UDP "connections" (ie
UDP sockets sending/receiving data).
The practical maximum limit is determined by available
heap memory at runtime.
config UDP_RECVMBOX_SIZE
int "Default UDP receive mail box size"
default 6
range 6 64
help
Set UDP receive mail box size. The recommended value is 6.
UDP receive mail box is a per socket mail box, when the application receives packets
from UDP socket, LWIP core firstly posts the packets to UDP receive mail box and the
application then fetches the packets from mail box. It means LWIP can caches maximum
UDP_RECCVMBOX_SIZE packets for each UDP socket, so the maximum possible cached UDP packets
for all UDP sockets is UDP_RECCVMBOX_SIZE multiples the maximum UDP socket number. In other
words, the bigger UDP_RECVMBOX_SIZE means more memory.
On the other hand, if the receiv mail box is too small, the mail box may be full. If the
mail box is full, the LWIP drops the packets. So generally we need to make sure the UDP
receive mail box is big enough to avoid packet drop between LWIP core and application.
endmenu # UDP
config TCPIP_TASK_STACK_SIZE
int "TCP/IP Task Stack Size"
default 3072
# for high log levels, tcpip_adapter API calls can end up
# a few calls deep and logging there can trigger a stack overflow
range 2048 65536 if LOG_DEFAULT_LEVEL < 4
range 2560 65536 if LOG_DEFAULT_LEVEL >= 4
help
Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
Setting this stack too small will result in stack overflow crashes.
choice TCPIP_TASK_AFFINITY
prompt "TCP/IP task affinity"
default TCPIP_TASK_AFFINITY_NO_AFFINITY
help
Allows setting LwIP tasks affinity, i.e. whether the task is pinned to
CPU0, pinned to CPU1, or allowed to run on any CPU.
Currently this applies to "TCP/IP" task and "Ping" task.
config TCPIP_TASK_AFFINITY_NO_AFFINITY
bool "No affinity"
config TCPIP_TASK_AFFINITY_CPU0
bool "CPU0"
config TCPIP_TASK_AFFINITY_CPU1
bool "CPU1"
depends on !FREERTOS_UNICORE
endchoice
config TCPIP_TASK_AFFINITY
hex
default FREERTOS_NO_AFFINITY if TCPIP_TASK_AFFINITY_NO_AFFINITY
default 0x0 if TCPIP_TASK_AFFINITY_CPU0
default 0x1 if TCPIP_TASK_AFFINITY_CPU1
menuconfig PPP_SUPPORT
bool "Enable PPP support (new/experimental)"
default n
help
Enable PPP stack. Now only PPP over serial is possible.
PPP over serial support is experimental and unsupported.
config PPP_NOTIFY_PHASE_SUPPORT
bool "Enable Notify Phase Callback"
depends on PPP_SUPPORT
default n
help
Enable to set a callback which is called on change of the internal PPP state machine.
config PPP_PAP_SUPPORT
bool "Enable PAP support"
depends on PPP_SUPPORT
default n
help
Enable Password Authentication Protocol (PAP) support
config PPP_CHAP_SUPPORT
bool "Enable CHAP support"
depends on PPP_SUPPORT
default n
help
Enable Challenge Handshake Authentication Protocol (CHAP) support
config PPP_MSCHAP_SUPPORT
bool "Enable MSCHAP support"
depends on PPP_SUPPORT
default n
help
Enable Microsoft version of the Challenge-Handshake Authentication Protocol (MSCHAP) support
config PPP_MPPE_SUPPORT
bool "Enable MPPE support"
depends on PPP_SUPPORT
default n
help
Enable Microsoft Point-to-Point Encryption (MPPE) support
config PPP_DEBUG_ON
bool "Enable PPP debug log output"
depends on PPP_SUPPORT
default n
help
Enable PPP debug log output
menu "ICMP"
config LWIP_MULTICAST_PING
bool "Respond to multicast pings"
default n
config LWIP_BROADCAST_PING
bool "Respond to broadcast pings"
default n
endmenu # ICMP
menu "LWIP RAW API"
config LWIP_MAX_RAW_PCBS
int "Maximum LWIP RAW PCBs"
range 1 1024
default 16
help
The maximum number of simultaneously active LWIP
RAW protocol control blocks. The practical maximum
limit is determined by available heap memory at runtime.
endmenu # LWIP RAW API
menu "SNTP"
config LWIP_DHCP_MAX_NTP_SERVERS
int "Maximum number of NTP servers"
default 1
range 1 16
help
Set maximum number of NTP servers used by LwIP SNTP module.
First argument of sntp_setserver/sntp_setservername functions
is limited to this value.
config LWIP_SNTP_UPDATE_DELAY
int "Request interval to update time (ms)"
range 15000 4294967295
default 3600000
help
This option allows you to set the time update period via SNTP.
Default is 1 hour. Must not be below 15 seconds by specification.
(SNTPv4 RFC 4330 enforces a minimum update time of 15 seconds).
endmenu # SNTP
config LWIP_ESP_LWIP_ASSERT
bool "Enable LWIP ASSERT checks"
default y
help
Enable this option allows lwip to check assert.
It is recommended to keep it open, do not close it.
endmenu