Kconfig 16 KB

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