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