1# SPDX-License-Identifier: GPL-2.0-only 2# 3# Network configuration 4# 5 6menuconfig NET 7 bool "Networking support" 8 select NLATTR 9 select GENERIC_NET_UTILS 10 select BPF 11 help 12 Unless you really know what you are doing, you should say Y here. 13 The reason is that some programs need kernel networking support even 14 when running on a stand-alone machine that isn't connected to any 15 other computer. 16 17 If you are upgrading from an older kernel, you 18 should consider updating your networking tools too because changes 19 in the kernel and the tools often go hand in hand. The tools are 20 contained in the package net-tools, the location and version number 21 of which are given in <file:Documentation/Changes>. 22 23 For a general introduction to Linux networking, it is highly 24 recommended to read the NET-HOWTO, available from 25 <http://www.tldp.org/docs.html#howto>. 26 27if NET 28 29config WANT_COMPAT_NETLINK_MESSAGES 30 bool 31 help 32 This option can be selected by other options that need compat 33 netlink messages. 34 35config COMPAT_NETLINK_MESSAGES 36 def_bool y 37 depends on COMPAT 38 depends on WEXT_CORE || WANT_COMPAT_NETLINK_MESSAGES 39 help 40 This option makes it possible to send different netlink messages 41 to tasks depending on whether the task is a compat task or not. To 42 achieve this, you need to set skb_shinfo(skb)->frag_list to the 43 compat skb before sending the skb, the netlink code will sort out 44 which message to actually pass to the task. 45 46 Newly written code should NEVER need this option but do 47 compat-independent messages instead! 48 49config NET_INGRESS 50 bool 51 52config NET_EGRESS 53 bool 54 55config NET_XGRESS 56 select NET_INGRESS 57 select NET_EGRESS 58 bool 59 60config NET_REDIRECT 61 bool 62 63config SKB_DECRYPTED 64 bool 65 66config SKB_EXTENSIONS 67 bool 68 69config NET_DEVMEM 70 def_bool y 71 depends on DMA_SHARED_BUFFER 72 depends on PAGE_POOL 73 74config NET_SHAPER 75 bool 76 77config NET_CRC32C 78 bool 79 select CRC32 80 81menu "Networking options" 82 83source "net/packet/Kconfig" 84source "net/psp/Kconfig" 85source "net/unix/Kconfig" 86source "net/tls/Kconfig" 87source "net/xfrm/Kconfig" 88source "net/iucv/Kconfig" 89source "net/smc/Kconfig" 90source "drivers/dibs/Kconfig" 91source "net/xdp/Kconfig" 92 93config NET_HANDSHAKE 94 bool 95 depends on SUNRPC || NVME_TARGET_TCP || NVME_TCP 96 default y 97 98config NET_HANDSHAKE_KUNIT_TEST 99 tristate "KUnit tests for the handshake upcall mechanism" if !KUNIT_ALL_TESTS 100 default KUNIT_ALL_TESTS 101 depends on KUNIT 102 help 103 This builds the KUnit tests for the handshake upcall mechanism. 104 105 KUnit tests run during boot and output the results to the debug 106 log in TAP format (https://testanything.org/). Only useful for 107 kernel devs running KUnit test harness and are not for inclusion 108 into a production build. 109 110 For more information on KUnit and unit tests in general, refer 111 to the KUnit documentation in Documentation/dev-tools/kunit/. 112 113config INET 114 bool "TCP/IP networking" 115 help 116 These are the protocols used on the Internet and on most local 117 Ethernets. It is highly recommended to say Y here (this will enlarge 118 your kernel by about 400 KB), since some programs (e.g. the X window 119 system) use TCP/IP even if your machine is not connected to any 120 other computer. You will get the so-called loopback device which 121 allows you to ping yourself (great fun, that!). 122 123 For an excellent introduction to Linux networking, please read the 124 Linux Networking HOWTO, available from 125 <http://www.tldp.org/docs.html#howto>. 126 127 If you say Y here and also to "/proc file system support" and 128 "Sysctl support" below, you can change various aspects of the 129 behavior of the TCP/IP code by writing to the (virtual) files in 130 /proc/sys/net/ipv4/*; the options are explained in the file 131 <file:Documentation/networking/ip-sysctl.rst>. 132 133 Short answer: say Y. 134 135if INET 136source "net/ipv4/Kconfig" 137source "net/ipv6/Kconfig" 138source "net/netlabel/Kconfig" 139source "net/mptcp/Kconfig" 140 141endif # if INET 142 143config NETWORK_SECMARK 144 bool "Security Marking" 145 help 146 This enables security marking of network packets, similar 147 to nfmark, but designated for security purposes. 148 If you are unsure how to answer this question, answer N. 149 150config NET_PTP_CLASSIFY 151 def_bool n 152 153config NETWORK_PHY_TIMESTAMPING 154 bool "Timestamping in PHY devices" 155 select NET_PTP_CLASSIFY 156 help 157 This allows timestamping of network packets by PHYs (or 158 other MII bus snooping devices) with hardware timestamping 159 capabilities. This option adds some overhead in the transmit 160 and receive paths. 161 162 If you are unsure how to answer this question, answer N. 163 164menuconfig NETFILTER 165 bool "Network packet filtering framework (Netfilter)" 166 help 167 Netfilter is a framework for filtering and mangling network packets 168 that pass through your Linux box. 169 170 The most common use of packet filtering is to run your Linux box as 171 a firewall protecting a local network from the Internet. The type of 172 firewall provided by this kernel support is called a "packet 173 filter", which means that it can reject individual network packets 174 based on type, source, destination etc. The other kind of firewall, 175 a "proxy-based" one, is more secure but more intrusive and more 176 bothersome to set up; it inspects the network traffic much more 177 closely, modifies it and has knowledge about the higher level 178 protocols, which a packet filter lacks. Moreover, proxy-based 179 firewalls often require changes to the programs running on the local 180 clients. Proxy-based firewalls don't need support by the kernel, but 181 they are often combined with a packet filter, which only works if 182 you say Y here. 183 184 You should also say Y here if you intend to use your Linux box as 185 the gateway to the Internet for a local network of machines without 186 globally valid IP addresses. This is called "masquerading": if one 187 of the computers on your local network wants to send something to 188 the outside, your box can "masquerade" as that computer, i.e. it 189 forwards the traffic to the intended outside destination, but 190 modifies the packets to make it look like they came from the 191 firewall box itself. It works both ways: if the outside host 192 replies, the Linux box will silently forward the traffic to the 193 correct local computer. This way, the computers on your local net 194 are completely invisible to the outside world, even though they can 195 reach the outside and can receive replies. It is even possible to 196 run globally visible servers from within a masqueraded local network 197 using a mechanism called portforwarding. Masquerading is also often 198 called NAT (Network Address Translation). 199 200 Another use of Netfilter is in transparent proxying: if a machine on 201 the local network tries to connect to an outside host, your Linux 202 box can transparently forward the traffic to a local server, 203 typically a caching proxy server. 204 205 Yet another use of Netfilter is building a bridging firewall. Using 206 a bridge with Network packet filtering enabled makes iptables "see" 207 the bridged traffic. For filtering on the lower network and Ethernet 208 protocols over the bridge, use ebtables (under bridge netfilter 209 configuration). 210 211 Various modules exist for netfilter which replace the previous 212 masquerading (ipmasqadm), packet filtering (ipchains), transparent 213 proxying, and portforwarding mechanisms. Please see 214 <file:Documentation/Changes> under "iptables" for the location of 215 these packages. 216 217if NETFILTER 218 219config NETFILTER_ADVANCED 220 bool "Advanced netfilter configuration" 221 depends on NETFILTER 222 default y 223 help 224 If you say Y here you can select between all the netfilter modules. 225 If you say N the more unusual ones will not be shown and the 226 basic ones needed by most people will default to 'M'. 227 228 If unsure, say Y. 229 230config BRIDGE_NETFILTER 231 tristate "Bridged IP/ARP packets filtering" 232 depends on BRIDGE 233 depends on NETFILTER && INET 234 depends on NETFILTER_ADVANCED 235 select NETFILTER_FAMILY_BRIDGE 236 select SKB_EXTENSIONS 237 help 238 Enabling this option will let arptables resp. iptables see bridged 239 ARP resp. IP traffic. If you want a bridging firewall, you probably 240 want this option enabled. 241 Enabling or disabling this option doesn't enable or disable 242 ebtables. 243 244 If unsure, say N. 245 246source "net/netfilter/Kconfig" 247source "net/ipv4/netfilter/Kconfig" 248source "net/ipv6/netfilter/Kconfig" 249source "net/bridge/netfilter/Kconfig" 250 251endif # if NETFILTER 252 253source "net/sctp/Kconfig" 254source "net/rds/Kconfig" 255source "net/tipc/Kconfig" 256source "net/atm/Kconfig" 257source "net/l2tp/Kconfig" 258source "net/802/Kconfig" 259source "net/bridge/Kconfig" 260source "net/dsa/Kconfig" 261source "net/8021q/Kconfig" 262source "net/llc/Kconfig" 263source "net/x25/Kconfig" 264source "net/lapb/Kconfig" 265source "net/phonet/Kconfig" 266source "net/6lowpan/Kconfig" 267source "net/ieee802154/Kconfig" 268source "net/mac802154/Kconfig" 269source "net/sched/Kconfig" 270source "net/dcb/Kconfig" 271source "net/dns_resolver/Kconfig" 272source "net/batman-adv/Kconfig" 273source "net/openvswitch/Kconfig" 274source "net/vmw_vsock/Kconfig" 275source "net/netlink/Kconfig" 276source "net/mpls/Kconfig" 277source "net/nsh/Kconfig" 278source "net/hsr/Kconfig" 279source "net/switchdev/Kconfig" 280source "net/l3mdev/Kconfig" 281source "net/qrtr/Kconfig" 282source "net/ncsi/Kconfig" 283 284config PCPU_DEV_REFCNT 285 bool "Use percpu variables to maintain network device refcount" 286 depends on SMP 287 default y 288 help 289 network device refcount are using per cpu variables if this option is set. 290 This can be forced to N to detect underflows (with a performance drop). 291 292config MAX_SKB_FRAGS 293 int "Maximum number of fragments per skb_shared_info" 294 range 17 45 295 default 17 296 help 297 Having more fragments per skb_shared_info can help GRO efficiency. 298 This helps BIG TCP workloads, but might expose bugs in some 299 legacy drivers. 300 This also increases memory overhead of small packets, 301 and in drivers using build_skb(). 302 If unsure, say 17. 303 304config RPS 305 bool "Receive packet steering" 306 depends on SMP && SYSFS 307 default y 308 help 309 Software receive side packet steering (RPS) distributes the 310 load of received packet processing across multiple CPUs. 311 312config RFS_ACCEL 313 bool "Hardware acceleration of RFS" 314 depends on RPS 315 select CPU_RMAP 316 default y 317 help 318 Allowing drivers for multiqueue hardware with flow filter tables to 319 accelerate RFS. 320 321config SOCK_RX_QUEUE_MAPPING 322 bool 323 324config XPS 325 bool 326 depends on SMP 327 select SOCK_RX_QUEUE_MAPPING 328 default y 329 330config HWBM 331 bool 332 333config CGROUP_NET_PRIO 334 bool "Network priority cgroup" 335 depends on CGROUPS 336 select SOCK_CGROUP_DATA 337 help 338 Cgroup subsystem for use in assigning processes to network priorities on 339 a per-interface basis. 340 341config CGROUP_NET_CLASSID 342 bool "Network classid cgroup" 343 depends on CGROUPS 344 select SOCK_CGROUP_DATA 345 help 346 Cgroup subsystem for use as general purpose socket classid marker that is 347 being used in cls_cgroup and for netfilter matching. 348 349config NET_RX_BUSY_POLL 350 bool 351 default y if !PREEMPT_RT || (PREEMPT_RT && !NETCONSOLE) 352 353config BQL 354 bool 355 prompt "Enable Byte Queue Limits" 356 depends on SYSFS 357 select DQL 358 default y 359 360config BPF_STREAM_PARSER 361 bool "enable BPF STREAM_PARSER" 362 depends on INET 363 depends on BPF_SYSCALL 364 depends on CGROUP_BPF 365 select STREAM_PARSER 366 select NET_SOCK_MSG 367 help 368 Enabling this allows a TCP stream parser to be used with 369 BPF_MAP_TYPE_SOCKMAP. 370 371config NET_FLOW_LIMIT 372 bool "Net flow limit" 373 depends on RPS 374 default y 375 help 376 The network stack has to drop packets when a receive processing CPU's 377 backlog reaches netdev_max_backlog. If a few out of many active flows 378 generate the vast majority of load, drop their traffic earlier to 379 maintain capacity for the other flows. This feature provides servers 380 with many clients some protection against DoS by a single (spoofed) 381 flow that greatly exceeds average workload. 382 383menu "Network testing" 384 385config NET_PKTGEN 386 tristate "Packet Generator (USE WITH CAUTION)" 387 depends on INET && PROC_FS 388 help 389 This module will inject preconfigured packets, at a configurable 390 rate, out of a given interface. It is used for network interface 391 stress testing and performance analysis. If you don't understand 392 what was just said, you don't need it: say N. 393 394 Documentation on how to use the packet generator can be found 395 at <file:Documentation/networking/pktgen.rst>. 396 397 To compile this code as a module, choose M here: the 398 module will be called pktgen. 399 400config NET_DROP_MONITOR 401 tristate "Legacy network packet drop alerting service" 402 depends on INET && TRACEPOINTS 403 help 404 This feature provides an alerting service to userspace in the 405 event that packets are discarded in the network stack. Alerts 406 are broadcast via netlink socket to any listening user space 407 process. This feature is NOT related to "perf" based drop monitoring. 408 Say N here unless you need to support older userspace tools like 409 "dropwatch". 410 411endmenu # Network testing 412 413endmenu # Networking options 414 415source "net/can/Kconfig" 416source "net/bluetooth/Kconfig" 417source "net/rxrpc/Kconfig" 418source "net/kcm/Kconfig" 419source "net/strparser/Kconfig" 420source "net/mctp/Kconfig" 421 422config FIB_RULES 423 bool 424 425menuconfig WIRELESS 426 bool "Wireless" 427 depends on !S390 428 default y 429 430if WIRELESS 431 432source "net/wireless/Kconfig" 433source "net/mac80211/Kconfig" 434 435endif # WIRELESS 436 437source "net/rfkill/Kconfig" 438source "net/9p/Kconfig" 439source "net/ceph/Kconfig" 440source "net/nfc/Kconfig" 441source "net/psample/Kconfig" 442source "net/ife/Kconfig" 443 444config LWTUNNEL 445 bool "Network light weight tunnels" 446 help 447 This feature provides an infrastructure to support light weight 448 tunnels like mpls. There is no netdevice associated with a light 449 weight tunnel endpoint. Tunnel encapsulation parameters are stored 450 with light weight tunnel state associated with fib routes. 451 452config LWTUNNEL_BPF 453 bool "Execute BPF program as route nexthop action" 454 depends on LWTUNNEL && INET 455 default y if LWTUNNEL=y 456 help 457 Allows to run BPF programs as a nexthop action following a route 458 lookup for incoming and outgoing packets. 459 460config DST_CACHE 461 bool 462 default n 463 464config GRO_CELLS 465 bool 466 default n 467 468config SOCK_VALIDATE_XMIT 469 bool 470 471config NET_IEEE8021Q_HELPERS 472 bool 473 474config NET_SELFTESTS 475 def_tristate PHYLIB 476 depends on PHYLIB && INET 477 478config NET_SOCK_MSG 479 bool 480 default n 481 help 482 The NET_SOCK_MSG provides a framework for plain sockets (e.g. TCP) or 483 ULPs (upper layer modules, e.g. TLS) to process L7 application data 484 with the help of BPF programs. 485 486config NET_DEVLINK 487 bool 488 default n 489 490config PAGE_POOL 491 bool 492 493config PAGE_POOL_STATS 494 default n 495 bool "Page pool stats" 496 depends on PAGE_POOL 497 help 498 Enable page pool statistics to track page allocation and recycling 499 in page pools. This option incurs additional CPU cost in allocation 500 and recycle paths and additional memory cost to store the statistics. 501 These statistics are only available if this option is enabled and if 502 the driver using the page pool supports exporting this data. 503 504 If unsure, say N. 505 506config FAILOVER 507 tristate "Generic failover module" 508 help 509 The failover module provides a generic interface for paravirtual 510 drivers to register a netdev and a set of ops with a failover 511 instance. The ops are used as event handlers that get called to 512 handle netdev register/unregister/link change/name change events 513 on slave pci ethernet devices with the same mac address as the 514 failover netdev. This enables paravirtual drivers to use a 515 VF as an accelerated low latency datapath. It also allows live 516 migration of VMs with direct attached VFs by failing over to the 517 paravirtual datapath when the VF is unplugged. 518 519config ETHTOOL_NETLINK 520 bool "Netlink interface for ethtool" 521 select DIMLIB 522 default y 523 help 524 An alternative userspace interface for ethtool based on generic 525 netlink. It provides better extensibility and some new features, 526 e.g. notification messages. 527 528config NETDEV_ADDR_LIST_TEST 529 tristate "Unit tests for device address list" 530 default KUNIT_ALL_TESTS 531 depends on KUNIT 532 533config NET_TEST 534 tristate "KUnit tests for networking" if !KUNIT_ALL_TESTS 535 depends on KUNIT 536 default KUNIT_ALL_TESTS 537 help 538 KUnit tests covering core networking infra, such as sk_buff. 539 540 If unsure, say N. 541 542endif # if NET 543