1# IP stack config 2 3# Copyright (c) 2016 Intel Corporation. 4# Copyright (c) 2021 Nordic Semiconductor 5# Copyright (c) 2023 Arm Limited (or its affiliates). All rights reserved. 6# SPDX-License-Identifier: Apache-2.0 7 8menu "IP stack" 9 10# Hidden option enabled whenever an IP stack is available. 11config NET_IP 12 bool 13 default y if NET_IPV6 || NET_IPV4 14 15# Hidden option selected by net connection based socket implementations 16# to draw in all code required for connection infrastructure. 17config NET_CONNECTION_SOCKETS 18 bool 19 20config NET_NATIVE 21 bool "Native network stack support" 22 default y 23 help 24 Enables Zephyr native IP stack. If you disable this, then 25 you need to enable the offloading support if you want to 26 have IP connectivity. 27 28# Hidden options for enabling native IPv6/IPv4. Using these options 29# avoids having "defined(CONFIG_NET_IPV6) && defined(CONFIG_NET_NATIVE)" 30# in the code as we can have "defined(CONFIG_NET_NATIVE_IPV6)" instead. 31config NET_NATIVE_IPV6 32 bool 33 depends on NET_NATIVE 34 default y if NET_IPV6 35 36config NET_NATIVE_IPV4 37 bool 38 depends on NET_NATIVE 39 default y if NET_IPV4 40 41config NET_NATIVE_TCP 42 bool 43 depends on NET_NATIVE 44 default y if NET_TCP 45 46config NET_NATIVE_UDP 47 bool 48 depends on NET_NATIVE 49 default y if NET_UDP 50 51config NET_OFFLOAD 52 bool "Offload IP stack" 53 help 54 Enables TCP/IP stack to be offload to a co-processor. 55 56if NET_OFFLOAD 57module = NET_OFFLOAD 58module-dep = NET_LOG 59module-str = Log level for offload layer 60module-help = Enables offload layer to output debug messages. 61source "subsys/net/Kconfig.template.log_config.net" 62endif # NET_OFFLOAD 63 64config NET_RAW_MODE 65 bool 66 help 67 This is a very specific option used to built only the very minimal 68 part of the net stack in order to get network drivers working without 69 any net stack above: core, L2 etc... Basically this will build only 70 net_pkt part. It is currently used only by IEEE 802.15.4 drivers, 71 though any type of net drivers could use it. 72 73if !NET_RAW_MODE 74 75choice 76 prompt "Qemu networking" 77 default NET_QEMU_PPP if NET_PPP 78 default NET_QEMU_SLIP 79 depends on QEMU_TARGET 80 help 81 Can be used to select how the network connectivity is established 82 from inside qemu to host system. This can be done either via 83 serial connection (SLIP) or via Qemu ethernet driver. 84 85config NET_QEMU_SLIP 86 bool "SLIP" 87 help 88 Connect to host or to another Qemu via SLIP. 89 90config NET_QEMU_PPP 91 bool "PPP" 92 help 93 Connect to host via PPP. 94 95config NET_QEMU_ETHERNET 96 bool "Ethernet" 97 help 98 Connect to host system via Qemu ethernet driver support. One such 99 driver that Zephyr supports is Intel e1000 ethernet driver. 100 101config NET_QEMU_USER 102 bool "SLIRP" 103 help 104 Connect to host system via Qemu's built-in User Networking support. This 105 is implemented using "slirp", which provides a full TCP/IP stack within 106 QEMU and uses that stack to implement a virtual NAT'd network. 107 108endchoice 109 110config NET_QEMU_USER_EXTRA_ARGS 111 string "Qemu User Networking Args" 112 depends on NET_QEMU_USER 113 default "" 114 help 115 Extra arguments passed to QEMU when User Networking is enabled. This may 116 include host / guest port forwarding, device id, Network address 117 information etc. This string is appended to the QEMU "-net user" option. 118 119config NET_INIT_PRIO 120 int 121 default 90 122 help 123 Network initialization priority level. This number tells how 124 early in the boot the network stack is initialized. 125 126config NET_IP_DSCP_ECN 127 bool "DSCP/ECN processing at IP layer" 128 depends on NET_IP 129 default y 130 help 131 Specify whether DSCP/ECN values are processed at IP layer. The values 132 are encoded within ToS field in IPv4 and TC field in IPv6. 133 134source "subsys/net/ip/Kconfig.ipv6" 135 136source "subsys/net/ip/Kconfig.ipv4" 137 138config NET_SHELL 139 bool "Network shell utilities" 140 select SHELL 141 help 142 Activate shell module that provides network commands like 143 ping to the console. 144 145config NET_SHELL_DYN_CMD_COMPLETION 146 bool "Network shell dynamic command completion" 147 depends on NET_SHELL 148 default y 149 help 150 Enable various net-shell command to support dynamic command 151 completion. This means that for example the nbr command can 152 automatically complete the neighboring IPv6 address and user 153 does not need to type it manually. 154 Please note that this uses more memory in order to save the 155 dynamic command strings. For example for nbr command the 156 increase is 320 bytes (8 neighbors * 40 bytes for IPv6 address 157 length) by default. Other dynamic completion commands in 158 net-shell require also some smaller amount of memory. 159 160config NET_TC_TX_COUNT 161 int "How many Tx traffic classes to have for each network device" 162 default 1 if USERSPACE || USB_DEVICE_NETWORK 163 default 0 164 range 1 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 && USERSPACE 165 range 0 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 166 range 1 8 if USERSPACE 167 range 0 8 168 help 169 Define how many Tx traffic classes (queues) the system should have 170 when sending a network packet. The network packet priority can then 171 be mapped to this traffic class so that higher prioritized packets 172 can be processed before lower prioritized ones. Each queue is handled 173 by a separate thread which will need RAM for stack space. 174 Only increase the value from 1 if you really need this feature. 175 The default value is 1 which means that all the network traffic is 176 handled equally. In this implementation, the higher traffic class 177 value corresponds to lower thread priority. 178 If you select 0 here, then it means that all the network traffic 179 is pushed to the driver directly without any queues. 180 Note that if USERSPACE support is enabled, then currently we need to 181 enable at least 1 TX thread. 182 183config NET_TC_RX_COUNT 184 int "How many Rx traffic classes to have for each network device" 185 default 1 186 range 1 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 && USERSPACE 187 range 0 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 188 range 1 8 if USERSPACE 189 range 0 8 190 help 191 Define how many Rx traffic classes (queues) the system should have 192 when receiving a network packet. The network packet priority can then 193 be mapped to this traffic class so that higher prioritized packets 194 can be processed before lower prioritized ones. Each queue is handled 195 by a separate thread which will need RAM for stack space. 196 Only increase the value from 1 if you really need this feature. 197 The default value is 1 which means that all the network traffic is 198 handled equally. In this implementation, the higher traffic class 199 value corresponds to lower thread priority. 200 If you select 0 here, then it means that all the network traffic 201 is pushed from the driver to application thread without any 202 intermediate RX queue. There is always a receive socket queue between 203 device driver and application. Disabling RX thread means that the 204 network device driver, that is typically running in IRQ context, will 205 handle the packet all the way to the application. This might cause 206 other incoming packets to be lost if the RX processing takes long 207 time. 208 Note that if USERSPACE support is enabled, then currently we need to 209 enable at least 1 RX thread. 210 211config NET_TC_SKIP_FOR_HIGH_PRIO 212 bool "Push high priority packets directly to network driver" 213 help 214 If this is set, then high priority (NET_PRIORITY_CA) net_pkt will be 215 pushed directly to network driver and will skip the traffic class 216 queues. This is currently not enabled by default. 217 218choice NET_TC_THREAD_TYPE 219 prompt "How the network RX/TX threads should work" 220 help 221 Please select the RX/TX threads to be either pre-emptive or 222 co-operative. 223 224config NET_TC_THREAD_COOPERATIVE 225 bool "Use co-operative TX/RX threads" 226 depends on COOP_ENABLED 227 help 228 With co-operative threads, the thread cannot be pre-empted. 229 230config NET_TC_THREAD_PREEMPTIVE 231 bool "Use pre-emptive TX/RX threads [EXPERIMENTAL]" 232 depends on PREEMPT_ENABLED 233 select EXPERIMENTAL 234 help 235 With pre-emptive threads, the thread can be pre-empted. 236 237endchoice 238 239config NET_TC_NUM_PRIORITIES 240 int 241 default NUM_COOP_PRIORITIES if NET_TC_THREAD_COOPERATIVE 242 default NUM_PREEMPT_PRIORITIES if NET_TC_THREAD_PREEMPTIVE 243 244choice 245 prompt "Priority to traffic class mapping" 246 help 247 Select mapping to use to map network packet priorities to traffic 248 classes. 249 250config NET_TC_MAPPING_STRICT 251 bool "Strict priority mapping" 252 help 253 This is the recommended default priority to traffic class mapping. 254 Use it for implementations that do not support the credit-based 255 shaper transmission selection algorithm. 256 See 802.1Q, chapter 8.6.6 for more information. 257 258config NET_TC_MAPPING_SR_CLASS_A_AND_B 259 bool "SR class A and class B mapping" 260 depends on NET_TC_TX_COUNT >= 2 261 depends on NET_TC_RX_COUNT >= 2 262 help 263 This is the recommended priority to traffic class mapping for a 264 system that supports SR (Stream Reservation) class A and SR class B. 265 See 802.1Q, chapter 34.5 for more information. 266 267config NET_TC_MAPPING_SR_CLASS_B_ONLY 268 bool "SR class B only mapping" 269 depends on NET_TC_TX_COUNT >= 2 270 depends on NET_TC_RX_COUNT >= 2 271 help 272 This is the recommended priority to traffic class mapping for a 273 system that supports SR (Stream Reservation) class B only. 274 See 802.1Q, chapter 34.5 for more information. 275endchoice 276 277config NET_TX_DEFAULT_PRIORITY 278 int "Default network TX packet priority if none have been set" 279 default 1 280 range 0 7 281 help 282 What is the default network packet priority if user has not specified 283 one. The value 0 means lowest priority and 7 is the highest. 284 285config NET_RX_DEFAULT_PRIORITY 286 int "Default network RX packet priority if none have been set" 287 default 0 288 range 0 7 289 help 290 What is the default network RX packet priority if user has not set 291 one. The value 0 means lowest priority and 7 is the highest. 292 293config NET_IP_ADDR_CHECK 294 bool "Check IP address validity before sending IP packet" 295 default y 296 help 297 Check that either the source or destination address is 298 correct before sending either IPv4 or IPv6 network packet. 299 300config NET_MAX_ROUTERS 301 int "How many routers are supported" 302 default 2 if NET_IPV4 && NET_IPV6 303 default 1 if NET_IPV4 && !NET_IPV6 304 default 1 if !NET_IPV4 && NET_IPV6 305 range 1 254 306 help 307 The value depends on your network needs. 308 309# Normally the route support is enabled by RPL or similar technology 310# that needs to use the routing infrastructure. 311config NET_ROUTE 312 bool 313 depends on NET_IPV6_NBR_CACHE 314 default y if NET_IPV6_NBR_CACHE 315 316# Temporarily hide the routing option as we do not have RPL in the system 317# that used to populate the routing table. 318config NET_ROUTING 319 bool 320 depends on NET_ROUTE 321 help 322 Allow IPv6 routing between different network interfaces and 323 technologies. Currently this has limited use as some entity 324 would need to populate the routing table. RPL used to do that 325 earlier but currently there is no RPL support in Zephyr. 326 327config NET_MAX_ROUTES 328 int "Max number of routing entries stored." 329 default NET_IPV6_MAX_NEIGHBORS 330 depends on NET_ROUTE 331 help 332 This determines how many entries can be stored in routing table. 333 334config NET_MAX_NEXTHOPS 335 int "Max number of next hop entries stored." 336 default NET_MAX_ROUTES 337 depends on NET_ROUTE 338 help 339 This determines how many entries can be stored in nexthop table. 340 341config NET_ROUTE_MCAST 342 bool "Multicast Routing / Forwarding" 343 depends on NET_ROUTE 344 help 345 Activates multicast routing/forwarding 346 347config NET_MAX_MCAST_ROUTES 348 int "Max number of multicast routing entries stored." 349 default 1 350 depends on NET_ROUTE_MCAST 351 help 352 This determines how many entries can be stored in multicast 353 routing table. 354 355config NET_TCP 356 bool "TCP" 357 depends on NET_IP 358 help 359 The value depends on your network needs. 360 361config NET_TCP_CHECKSUM 362 bool "Check TCP checksum" 363 default y 364 depends on NET_TCP 365 help 366 Enables TCP handler to check TCP checksum. If the checksum is invalid, 367 then the packet is discarded. 368 369if NET_TCP 370module = NET_TCP 371module-dep = NET_LOG 372module-str = Log level for TCP 373module-help = Enables TCP handler output debug messages 374source "subsys/net/Kconfig.template.log_config.net" 375endif # NET_TCP 376 377config NET_TCP_TIME_WAIT_DELAY 378 int "How long to wait in TIME_WAIT state (in milliseconds)" 379 depends on NET_TCP 380 default 1500 381 help 382 To avoid a (low-probability) issue when delayed packets from 383 previous connection get delivered to next connection reusing 384 the same local/remote ports, RFC 793 (TCP) suggests to keep 385 an old, closed connection in a special "TIME_WAIT" state for 386 the duration of 2*MSL (Maximum Segment Lifetime). The RFC 387 suggests to use MSL of 2 minutes, but notes "This is an 388 engineering choice, and may be changed if experience indicates 389 it is desirable to do so." For low-resource systems, having 390 large MSL may lead to quick resource exhaustion (and related 391 DoS attacks). At the same time, the issue of packet misdelivery 392 is largely alleviated in the modern TCP stacks by using random, 393 non-repeating port numbers and initial sequence numbers. Due 394 to this, Zephyr uses much lower value of 1500ms by default. 395 Value of 0 disables TIME_WAIT state completely. 396 397config NET_TCP_ACK_TIMEOUT 398 int "How long to wait for ACK (in milliseconds)" 399 depends on NET_TCP 400 default 1000 401 range 1 2147483647 402 help 403 This value affects the timeout when waiting ACK to arrive in 404 various TCP states. The value is in milliseconds. Note that 405 having a very low value here could prevent connectivity. 406 407config NET_TCP_INIT_RETRANSMISSION_TIMEOUT 408 int "Initial value of Retransmission Timeout (RTO) (in milliseconds)" 409 depends on NET_TCP 410 default 200 411 range 100 60000 412 help 413 This value affects the timeout between initial retransmission 414 of TCP data packets. The value is in milliseconds. 415 416config NET_TCP_RETRY_COUNT 417 int "Maximum number of TCP segment retransmissions" 418 depends on NET_TCP 419 default 9 420 help 421 The following formula can be used to determine the time (in ms) 422 that a segment will be be buffered awaiting retransmission: 423 n=NET_TCP_RETRY_COUNT 424 Sum((1<<n) * NET_TCP_INIT_RETRANSMISSION_TIMEOUT) 425 n=0 426 With the default value of 9, the IP stack will try to 427 retransmit for up to 1:42 minutes. This is as close as possible 428 to the minimum value recommended by RFC1122 (1:40 minutes). 429 Only 5 bits are dedicated for the retransmission count, so accepted 430 values are in the 0-31 range. It's highly recommended to not go 431 below 9, though. 432 Should a retransmission timeout occur, the receive callback is 433 called with -ECONNRESET error code and the context is dereferenced. 434 435config NET_TCP_RANDOMIZED_RTO 436 bool "Use a randomized retransmission time" 437 default y 438 depends on NET_TCP 439 help 440 It can happen that two similar stacks enter a retransmission cycle 441 due to a packet collision. If the transmission timeout is the same 442 both stacks will retry at the same moment resulting in another 443 collision. By introducing a randomized retry timeout, the chance of 444 a second collision is reduced and it reduces furter the more 445 retransmissions occur. 446 447config NET_TCP_FAST_RETRANSMIT 448 bool "Fast-retry algorithm based on the number of duplicated ACKs" 449 depends on NET_TCP 450 default y 451 help 452 When a packet is lost, the receiver will keep acknowledging the 453 sequence number of the last correctly received byte. Upon reception 454 of a sequence of acknowledgements for the same sequence number, 455 this can be deduced as that the packet afterwards must have been lost. 456 In that case a retransmission is triggerd to avoid having to wait for 457 the retransmit timer to elapse. 458 459config NET_TCP_MAX_SEND_WINDOW_SIZE 460 int "Maximum sending window size to use" 461 depends on NET_TCP 462 default 0 463 range 0 65535 464 help 465 This value affects how the TCP selects the maximum sending window 466 size. The default value 0 lets the TCP stack select the value 467 according to amount of network buffers configured in the system. 468 469config NET_TCP_MAX_RECV_WINDOW_SIZE 470 int "Maximum receive window size to use" 471 depends on NET_TCP 472 default 0 473 range 0 65535 474 help 475 This value defines the maximum TCP receive window size. Increasing 476 this value can improve connection throughput, but requires more 477 receive buffers available in the system for efficient operation. 478 The default value 0 lets the TCP stack select the value 479 according to amount of network buffers configured in the system. 480 481config NET_TCP_RECV_QUEUE_TIMEOUT 482 int "How long to queue received data (in ms)" 483 depends on NET_TCP 484 default 2000 485 range 0 10000 486 help 487 If we receive out-of-order TCP data, we queue it. This value tells 488 how long the data is kept before it is discarded if we have not been 489 able to pass the data to the application. If set to 0, then receive 490 queueing is not enabled. The value is in milliseconds. 491 Note that we only queue data sequentially in current version i.e., 492 there should be no holes in the queue. For example, if we receive 493 SEQs 5,4,3,6 and are waiting SEQ 2, the data in segments 3,4,5,6 is 494 queued (in this order), and then given to application when we receive 495 SEQ 2. But if we receive SEQs 5,4,3,7 then the SEQ 7 is discarded 496 because the list would not be sequential as number 6 is be missing. 497 498config NET_TCP_PKT_ALLOC_TIMEOUT 499 int "How long to wait for a TCP packet allocation (in ms)" 500 depends on NET_TCP 501 default 100 502 range 10 1000 503 help 504 The TCP network stack allocates packets from the buffers and the 505 allocation can take some time depending on the situation. 506 This value indicates how long the stack should wait for the packet to 507 be allocated, before returning an internal error and trying again. 508 509config NET_TCP_WORKQ_STACK_SIZE 510 int "TCP work queue thread stack size" 511 default 1024 512 depends on NET_TCP 513 help 514 Set the TCP work queue thread stack size in bytes. 515 516config NET_TCP_ISN_RFC6528 517 bool "Use ISN algorithm from RFC 6528" 518 default y 519 depends on NET_TCP 520 select MBEDTLS 521 select MBEDTLS_MD 522 select MBEDTLS_MAC_MD5_ENABLED 523 help 524 Implement Initial Sequence Number calculation as described in 525 RFC 6528 chapter 3. https://tools.ietf.org/html/rfc6528 526 If this is not set, then sys_rand32_get() is used for ISN value. 527 528config NET_TEST_PROTOCOL 529 bool "JSON based test protocol (UDP)" 530 help 531 Enable JSON based test protocol (UDP). 532 533config NET_UDP 534 bool "UDP" 535 default y 536 depends on NET_IP 537 help 538 The value depends on your network needs. 539 540config NET_UDP_CHECKSUM 541 bool "Check UDP checksum" 542 default y 543 depends on NET_UDP 544 help 545 Enables UDP handler to check UDP checksum. If the checksum is invalid, 546 then the packet is discarded. 547 548config NET_UDP_MISSING_CHECKSUM 549 bool "Accept missing checksum (IPv4 only)" 550 default y 551 depends on NET_UDP && NET_IPV4 552 help 553 RFC 768 states the possibility to have a missing checksum, for 554 debugging purposes for instance. That feature is however valid only 555 for IPv4 and on reception only, since Zephyr will always compute the 556 UDP checksum in transmission path. 557 558if NET_UDP 559module = NET_UDP 560module-dep = NET_LOG 561module-str = Log level for UDP 562module-help = Enables UDP handler output debug messages 563source "subsys/net/Kconfig.template.log_config.net" 564endif # NET_UDP 565 566config NET_MAX_CONN 567 int "How many network connections are supported" 568 depends on NET_UDP || NET_TCP || NET_SOCKETS_PACKET || NET_SOCKETS_CAN 569 default 8 if NET_IPV6 && NET_IPV4 570 default 4 571 help 572 The value depends on your network needs. The value 573 should include both UDP and TCP connections. 574 575config NET_MAX_CONTEXTS 576 int "Number of network contexts to allocate" 577 default 6 578 help 579 Each network context is used to describe a network 5-tuple that 580 is used when listening or sending network traffic. This is very 581 similar as one could call a network socket in some other systems. 582 583config NET_CONTEXT_NET_PKT_POOL 584 bool "Net_buf TX pool / context" 585 default y if NET_TCP && NET_6LO 586 help 587 If enabled, then it is possible to fine-tune network packet pool 588 for each context when sending network data. If this setting is 589 enabled, then you should define the context pools in your application 590 using NET_PKT_TX_POOL_DEFINE() and NET_PKT_DATA_POOL_DEFINE() 591 macros and tie these pools to desired context using the 592 net_context_setup_pools() function. 593 594config NET_CONTEXT_SYNC_RECV 595 bool "Support synchronous functionality in net_context_recv() API" 596 default y 597 help 598 You can disable sync support to save some memory if you are calling 599 net_context_recv() in async way only when timeout is set to 0. 600 601config NET_CONTEXT_CHECK 602 bool "Check options when calling various net_context functions" 603 default y 604 help 605 If you know that the options passed to net_context...() functions 606 are ok, then you can disable the checks to save some memory. 607 608config NET_CONTEXT_PRIORITY 609 bool "Add priority support to net_context" 610 help 611 It is possible to prioritize network traffic. This requires 612 also traffic class support to work as expected. 613 614config NET_CONTEXT_TXTIME 615 bool "Add TXTIME support to net_context" 616 select NET_PKT_TXTIME 617 help 618 It is possible to add information when the outgoing network packet 619 should be sent. The TX time information should be placed into 620 ancillary data field in sendmsg call. 621 622config NET_CONTEXT_RCVTIMEO 623 bool "Add RCVTIMEO support to net_context" 624 help 625 It is possible to time out receiving a network packet. The timeout 626 time is configurable run-time in the application code. For network 627 sockets timeout is configured per socket with 628 setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, ...) function. 629 630config NET_CONTEXT_SNDTIMEO 631 bool "Add SNDTIMEO support to net_context" 632 help 633 It is possible to time out sending a network packet. The timeout 634 time is configurable run-time in the application code. For network 635 sockets timeout is configured per socket with 636 setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, ...) function. 637 638config NET_CONTEXT_RCVBUF 639 bool "Add RCVBUF support to net_context" 640 help 641 If is possible to define the maximum socket receive buffer per socket. 642 The default value is set by CONFIG_NET_TCP_MAX_RECV_WINDOW_SIZE. For 643 TCP sockets, the rcvbuf will determine the receive window size. 644 645config NET_CONTEXT_SNDBUF 646 bool "Add SNDBUF support to net_context" 647 help 648 It is possible to define the maximum socket send buffer per socket. 649 For TCP sockets, the sndbuf will determine the total size of queued 650 data in the TCP layer. 651 652config NET_CONTEXT_DSCP_ECN 653 bool "Add support for setting DSCP/ECN IP properties on net_context" 654 depends on NET_IP_DSCP_ECN 655 default y 656 help 657 Allow to set Differentiated Services and Explicit Congestion 658 Notification values on net_context. Those values are then used in 659 IPv4/IPv6 header when sending packets over net_context. 660 661config NET_TEST 662 bool "Network Testing" 663 help 664 Used for self-contained networking tests that do not require a 665 network device. 666 667config NET_SLIP_TAP 668 bool "TAP SLIP driver" 669 depends on NET_QEMU_SLIP 670 depends on NET_NATIVE 671 select SLIP 672 select UART_PIPE 673 select UART_INTERRUPT_DRIVEN 674 select SLIP_TAP 675 default y if (QEMU_TARGET && !NET_TEST && !NET_L2_BT) 676 help 677 SLIP TAP support is necessary when testing with QEMU. The host 678 needs to have tunslip6 with TAP support running in order to 679 communicate via the SLIP driver. See net-tools project at 680 https://github.com/zephyrproject-rtos/net-tools for more details. 681 682config NET_TRICKLE 683 bool "Trickle library" 684 help 685 Normally this is enabled automatically if needed, 686 so say 'n' if unsure. 687 688if NET_TRICKLE 689module = NET_TRICKLE 690module-dep = NET_LOG 691module-str = Log level for Trickle algorithm 692module-help = Enables Trickle library output debug messages 693source "subsys/net/Kconfig.template.log_config.net" 694endif # NET_TRICKLE 695 696endif # NET_RAW_MODE 697 698config NET_PKT_RX_COUNT 699 int "How many packet receives can be pending at the same time" 700 default 14 if NET_L2_ETHERNET 701 default 4 702 help 703 Each RX buffer will occupy smallish amount of memory. 704 See include/net/net_pkt.h and the sizeof(struct net_pkt) 705 706config NET_PKT_TX_COUNT 707 int "How many packet sends can be pending at the same time" 708 default 14 if NET_L2_ETHERNET 709 default 4 710 help 711 Each TX buffer will occupy smallish amount of memory. 712 See include/net/net_pkt.h and the sizeof(struct net_pkt) 713 714config NET_BUF_RX_COUNT 715 int "How many network buffers are allocated for receiving data" 716 default 36 if NET_L2_ETHERNET 717 default 16 718 help 719 Each data buffer will occupy CONFIG_NET_BUF_DATA_SIZE + smallish 720 header (sizeof(struct net_buf)) amount of data. 721 722config NET_BUF_TX_COUNT 723 int "How many network buffers are allocated for sending data" 724 default 36 if NET_L2_ETHERNET 725 default 16 726 help 727 Each data buffer will occupy CONFIG_NET_BUF_DATA_SIZE + smallish 728 header (sizeof(struct net_buf)) amount of data. 729 730choice 731 prompt "Network packet data allocator type" 732 default NET_BUF_FIXED_DATA_SIZE 733 help 734 Select the memory allocator for the network buffers that hold the 735 packet data. 736 737config NET_BUF_FIXED_DATA_SIZE 738 bool "Fixed data size buffer" 739 help 740 Each buffer comes with a built time configured size. If runtime 741 requested is bigger than that, it will allocate as many net_buf 742 as necessary to reach that request. 743 744config NET_BUF_VARIABLE_DATA_SIZE 745 bool "Variable data size buffer [EXPERIMENTAL]" 746 select EXPERIMENTAL 747 help 748 The buffer is dynamically allocated from runtime requested size. 749 750endchoice 751 752config NET_BUF_DATA_SIZE 753 int "Size of each network data fragment" 754 default 128 755 depends on NET_BUF_FIXED_DATA_SIZE 756 help 757 This value tells what is the fixed size of each network buffer. 758 759config NET_BUF_DATA_POOL_SIZE 760 int "Size of the memory pool where buffers are allocated from" 761 default 4096 if NET_L2_ETHERNET 762 default 2048 763 depends on NET_BUF_VARIABLE_DATA_SIZE 764 help 765 This value tell what is the size of the memory pool where each 766 network buffer is allocated from. 767 768config NET_PKT_BUF_USER_DATA_SIZE 769 int "Size of user_data available in rx and tx network buffers" 770 default BT_CONN_TX_USER_DATA_SIZE if NET_L2_BT 771 default 4 772 range BT_CONN_TX_USER_DATA_SIZE 16 if NET_L2_BT 773 range 4 16 774 help 775 User data size used in rx and tx network buffers. 776 777config NET_HEADERS_ALWAYS_CONTIGUOUS 778 bool 779 help 780 This a hidden option, which one should use with a lot of care. 781 NO bug reports will be accepted if that option is enabled! 782 You are warned. 783 If you are 100% sure the headers memory space is always in a 784 contiguous space, this will save stack usage and ROM in net core. 785 This is a possible case when using IPv4 only, with 786 NET_BUF_FIXED_DATA_SIZE enabled and NET_BUF_DATA_SIZE of 128 for 787 instance. 788 789choice 790 prompt "Default Network Interface" 791 default NET_DEFAULT_IF_FIRST 792 help 793 If system has multiple interfaces enabled, then user shall be able 794 to choose default interface. Otherwise first interface will be the 795 default interface. 796 797config NET_DEFAULT_IF_FIRST 798 bool "First available interface" 799 800config NET_DEFAULT_IF_UP 801 bool "First interface which is up" 802 803config NET_DEFAULT_IF_ETHERNET 804 bool "Ethernet" 805 depends on NET_L2_ETHERNET 806 807config NET_DEFAULT_IF_BLUETOOTH 808 bool "Bluetooth" 809 depends on NET_L2_BT 810 811config NET_DEFAULT_IF_IEEE802154 812 bool "IEEE 802.15.4" 813 depends on NET_L2_IEEE802154 814 815config NET_DEFAULT_IF_OFFLOAD 816 bool "Offloaded interface" 817 depends on NET_OFFLOAD 818 819config NET_DEFAULT_IF_DUMMY 820 bool "Dummy testing interface" 821 depends on NET_L2_DUMMY 822 823config NET_DEFAULT_IF_CANBUS_RAW 824 bool "Socket CAN interface" 825 depends on NET_L2_CANBUS_RAW 826 827config NET_DEFAULT_IF_PPP 828 bool "PPP interface" 829 depends on NET_L2_PPP 830 831endchoice 832 833config NET_PKT_TIMESTAMP 834 bool "Network packet timestamp support" 835 help 836 Enable network packet timestamp support. This is needed for 837 example in gPTP which needs to know how long it takes to send 838 a network packet. 839 840config NET_PKT_TIMESTAMP_THREAD 841 bool "Create TX timestamp thread" 842 default y if NET_L2_PTP 843 depends on NET_PKT_TIMESTAMP 844 help 845 Create a TX timestamp thread that will pass the timestamped network 846 packets to some other module like gPTP for further processing. 847 If you just want to timestamp network packets and get information 848 how long the network packets flow in the system, you can disable 849 the thread support. 850 851config NET_PKT_TIMESTAMP_STACK_SIZE 852 int "Timestamp thread stack size" 853 default 1024 854 depends on NET_PKT_TIMESTAMP_THREAD 855 help 856 Set the timestamp thread stack size in bytes. The timestamp 857 thread waits for timestamped TX frames and calls registered 858 callbacks. 859 860config NET_PKT_TXTIME 861 bool "Network packet TX time support" 862 help 863 Enable network packet TX time support. This is needed for 864 when the application wants to set the exact time when the network 865 packet should be sent. 866 867config NET_PKT_RXTIME_STATS 868 bool "Network packet RX time statistics" 869 select NET_PKT_TIMESTAMP 870 select NET_STATISTICS 871 depends on (NET_UDP || NET_TCP || NET_SOCKETS_PACKET) && NET_NATIVE 872 help 873 Enable network packet RX time statistics support. This is used to 874 calculate how long on average it takes for a packet to travel from 875 device driver to just before it is given to application. The RX 876 timing information can then be seen in network interface statistics 877 in net-shell. 878 The RX statistics are only calculated for UDP and TCP packets. 879 880config NET_PKT_RXTIME_STATS_DETAIL 881 bool "Get extra receive detail statistics in RX path" 882 depends on NET_PKT_RXTIME_STATS 883 help 884 Store receive statistics detail information in certain key points 885 in RX path. This is very special configuration and will increase 886 the size of net_pkt so in typical cases you should not enable it. 887 The extra statistics can be seen in net-shell using "net stats" 888 command. 889 890config NET_PKT_TXTIME_STATS 891 bool "Network packet TX time statistics" 892 select NET_PKT_TIMESTAMP 893 select NET_STATISTICS 894 depends on (NET_UDP || NET_TCP || NET_SOCKETS_PACKET) && NET_NATIVE 895 help 896 Enable network packet TX time statistics support. This is used to 897 calculate how long on average it takes for a packet to travel from 898 application to just before it is sent to network. The TX timing 899 information can then be seen in network interface statistics in 900 net-shell. 901 The RX calculation is done only for UDP, TCP or RAW packets, 902 but for TX we do not know the protocol so the TX packet timing is 903 done for all network protocol packets. 904 905config NET_PKT_TXTIME_STATS_DETAIL 906 bool "Get extra transmit detail statistics in TX path" 907 depends on NET_PKT_TXTIME_STATS 908 help 909 Store receive statistics detail information in certain key points 910 in TX path. This is very special configuration and will increase 911 the size of net_pkt so in typical cases you should not enable it. 912 The extra statistics can be seen in net-shell using "net stats" 913 command. 914 915config NET_PROMISCUOUS_MODE 916 bool "Promiscuous mode support" 917 select NET_MGMT 918 select NET_MGMT_EVENT 919 select NET_L2_ETHERNET_MGMT if NET_L2_ETHERNET 920 help 921 Enable promiscuous mode support. This only works if the network 922 device driver supports promiscuous mode. The user application 923 also needs to read the promiscuous mode data. 924 925if NET_PROMISCUOUS_MODE 926module = NET_PROMISC 927module-dep = NET_LOG 928module-str = Log level for promiscuous mode 929module-help = Enables promiscuous mode to output debug messages. 930source "subsys/net/Kconfig.template.log_config.net" 931endif # NET_PROMISCUOUS_MODE 932 933config NET_DISABLE_ICMP_DESTINATION_UNREACHABLE 934 bool "Disable destination unreachable ICMP errors" 935 help 936 Suppress the generation of ICMP destination unreachable errors 937 when ports that are not in a listening state receive packets. 938 939source "subsys/net/ip/Kconfig.stack" 940 941source "subsys/net/ip/Kconfig.mgmt" 942 943source "subsys/net/ip/Kconfig.stats" 944 945source "subsys/net/ip/Kconfig.debug" 946 947endmenu 948