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