Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  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_REDIRECT
  46. bool
  47. config SKB_EXTENSIONS
  48. bool
  49. menu "Networking options"
  50. source "net/packet/Kconfig"
  51. source "net/unix/Kconfig"
  52. source "net/tls/Kconfig"
  53. source "net/xfrm/Kconfig"
  54. source "net/iucv/Kconfig"
  55. source "net/smc/Kconfig"
  56. source "net/xdp/Kconfig"
  57. config INET
  58. bool "TCP/IP networking"
  59. help
  60. These are the protocols used on the Internet and on most local
  61. Ethernets. It is highly recommended to say Y here (this will enlarge
  62. your kernel by about 400 KB), since some programs (e.g. the X window
  63. system) use TCP/IP even if your machine is not connected to any
  64. other computer. You will get the so-called loopback device which
  65. allows you to ping yourself (great fun, that!).
  66. For an excellent introduction to Linux networking, please read the
  67. Linux Networking HOWTO, available from
  68. <http://www.tldp.org/docs.html#howto>.
  69. If you say Y here and also to "/proc file system support" and
  70. "Sysctl support" below, you can change various aspects of the
  71. behavior of the TCP/IP code by writing to the (virtual) files in
  72. /proc/sys/net/ipv4/*; the options are explained in the file
  73. <file:Documentation/networking/ip-sysctl.rst>.
  74. Short answer: say Y.
  75. if INET
  76. source "net/ipv4/Kconfig"
  77. source "net/ipv6/Kconfig"
  78. source "net/netlabel/Kconfig"
  79. source "net/mptcp/Kconfig"
  80. endif # if INET
  81. config NETWORK_SECMARK
  82. bool "Security Marking"
  83. help
  84. This enables security marking of network packets, similar
  85. to nfmark, but designated for security purposes.
  86. If you are unsure how to answer this question, answer N.
  87. config NET_PTP_CLASSIFY
  88. def_bool n
  89. config NETWORK_PHY_TIMESTAMPING
  90. bool "Timestamping in PHY devices"
  91. select NET_PTP_CLASSIFY
  92. help
  93. This allows timestamping of network packets by PHYs (or
  94. other MII bus snooping devices) with hardware timestamping
  95. capabilities. This option adds some overhead in the transmit
  96. and receive paths.
  97. If you are unsure how to answer this question, answer N.
  98. menuconfig NETFILTER
  99. bool "Network packet filtering framework (Netfilter)"
  100. help
  101. Netfilter is a framework for filtering and mangling network packets
  102. that pass through your Linux box.
  103. The most common use of packet filtering is to run your Linux box as
  104. a firewall protecting a local network from the Internet. The type of
  105. firewall provided by this kernel support is called a "packet
  106. filter", which means that it can reject individual network packets
  107. based on type, source, destination etc. The other kind of firewall,
  108. a "proxy-based" one, is more secure but more intrusive and more
  109. bothersome to set up; it inspects the network traffic much more
  110. closely, modifies it and has knowledge about the higher level
  111. protocols, which a packet filter lacks. Moreover, proxy-based
  112. firewalls often require changes to the programs running on the local
  113. clients. Proxy-based firewalls don't need support by the kernel, but
  114. they are often combined with a packet filter, which only works if
  115. you say Y here.
  116. You should also say Y here if you intend to use your Linux box as
  117. the gateway to the Internet for a local network of machines without
  118. globally valid IP addresses. This is called "masquerading": if one
  119. of the computers on your local network wants to send something to
  120. the outside, your box can "masquerade" as that computer, i.e. it
  121. forwards the traffic to the intended outside destination, but
  122. modifies the packets to make it look like they came from the
  123. firewall box itself. It works both ways: if the outside host
  124. replies, the Linux box will silently forward the traffic to the
  125. correct local computer. This way, the computers on your local net
  126. are completely invisible to the outside world, even though they can
  127. reach the outside and can receive replies. It is even possible to
  128. run globally visible servers from within a masqueraded local network
  129. using a mechanism called portforwarding. Masquerading is also often
  130. called NAT (Network Address Translation).
  131. Another use of Netfilter is in transparent proxying: if a machine on
  132. the local network tries to connect to an outside host, your Linux
  133. box can transparently forward the traffic to a local server,
  134. typically a caching proxy server.
  135. Yet another use of Netfilter is building a bridging firewall. Using
  136. a bridge with Network packet filtering enabled makes iptables "see"
  137. the bridged traffic. For filtering on the lower network and Ethernet
  138. protocols over the bridge, use ebtables (under bridge netfilter
  139. configuration).
  140. Various modules exist for netfilter which replace the previous
  141. masquerading (ipmasqadm), packet filtering (ipchains), transparent
  142. proxying, and portforwarding mechanisms. Please see
  143. <file:Documentation/Changes> under "iptables" for the location of
  144. these packages.
  145. if NETFILTER
  146. config NETFILTER_ADVANCED
  147. bool "Advanced netfilter configuration"
  148. depends on NETFILTER
  149. default y
  150. help
  151. If you say Y here you can select between all the netfilter modules.
  152. If you say N the more unusual ones will not be shown and the
  153. basic ones needed by most people will default to 'M'.
  154. If unsure, say Y.
  155. config BRIDGE_NETFILTER
  156. tristate "Bridged IP/ARP packets filtering"
  157. depends on BRIDGE
  158. depends on NETFILTER && INET
  159. depends on NETFILTER_ADVANCED
  160. select NETFILTER_FAMILY_BRIDGE
  161. select SKB_EXTENSIONS
  162. help
  163. Enabling this option will let arptables resp. iptables see bridged
  164. ARP resp. IP traffic. If you want a bridging firewall, you probably
  165. want this option enabled.
  166. Enabling or disabling this option doesn't enable or disable
  167. ebtables.
  168. If unsure, say N.
  169. source "net/netfilter/Kconfig"
  170. source "net/ipv4/netfilter/Kconfig"
  171. source "net/ipv6/netfilter/Kconfig"
  172. source "net/bridge/netfilter/Kconfig"
  173. endif
  174. source "net/bpfilter/Kconfig"
  175. source "net/dccp/Kconfig"
  176. source "net/sctp/Kconfig"
  177. source "net/rds/Kconfig"
  178. source "net/tipc/Kconfig"
  179. source "net/atm/Kconfig"
  180. source "net/l2tp/Kconfig"
  181. source "net/802/Kconfig"
  182. source "net/bridge/Kconfig"
  183. source "net/dsa/Kconfig"
  184. source "net/8021q/Kconfig"
  185. source "net/llc/Kconfig"
  186. source "drivers/net/appletalk/Kconfig"
  187. source "net/x25/Kconfig"
  188. source "net/lapb/Kconfig"
  189. source "net/phonet/Kconfig"
  190. source "net/6lowpan/Kconfig"
  191. source "net/ieee802154/Kconfig"
  192. source "net/mac802154/Kconfig"
  193. source "net/sched/Kconfig"
  194. source "net/dcb/Kconfig"
  195. source "net/dns_resolver/Kconfig"
  196. source "net/batman-adv/Kconfig"
  197. source "net/openvswitch/Kconfig"
  198. source "net/vmw_vsock/Kconfig"
  199. source "net/netlink/Kconfig"
  200. source "net/mpls/Kconfig"
  201. source "net/nsh/Kconfig"
  202. source "net/hsr/Kconfig"
  203. source "net/switchdev/Kconfig"
  204. source "net/l3mdev/Kconfig"
  205. source "net/qrtr/Kconfig"
  206. source "net/qmsgq/Kconfig"
  207. source "net/ncsi/Kconfig"
  208. # SEC_PRODUCT_FEATURE_KNOX_SUPPORT_NPA {
  209. source "net/ncm/Kconfig"
  210. # SEC_PRODUCT_FEATURE_KNOX_SUPPORT_NPA }
  211. config PCPU_DEV_REFCNT
  212. bool "Use percpu variables to maintain network device refcount"
  213. depends on SMP
  214. default y
  215. help
  216. network device refcount are using per cpu variables if this option is set.
  217. This can be forced to N to detect underflows (with a performance drop).
  218. config RPS
  219. bool
  220. depends on SMP && SYSFS
  221. default y
  222. config RFS_ACCEL
  223. bool
  224. depends on RPS
  225. select CPU_RMAP
  226. default y
  227. config SOCK_RX_QUEUE_MAPPING
  228. bool
  229. config XPS
  230. bool
  231. depends on SMP
  232. select SOCK_RX_QUEUE_MAPPING
  233. default y
  234. config HWBM
  235. bool
  236. config CGROUP_NET_PRIO
  237. bool "Network priority cgroup"
  238. depends on CGROUPS
  239. select SOCK_CGROUP_DATA
  240. help
  241. Cgroup subsystem for use in assigning processes to network priorities on
  242. a per-interface basis.
  243. config CGROUP_NET_CLASSID
  244. bool "Network classid cgroup"
  245. depends on CGROUPS
  246. select SOCK_CGROUP_DATA
  247. help
  248. Cgroup subsystem for use as general purpose socket classid marker that is
  249. being used in cls_cgroup and for netfilter matching.
  250. config NET_RX_BUSY_POLL
  251. bool
  252. default y if !PREEMPT_RT
  253. config BQL
  254. bool
  255. depends on SYSFS
  256. select DQL
  257. default y
  258. config BPF_STREAM_PARSER
  259. bool "enable BPF STREAM_PARSER"
  260. depends on INET
  261. depends on BPF_SYSCALL
  262. depends on CGROUP_BPF
  263. select STREAM_PARSER
  264. select NET_SOCK_MSG
  265. help
  266. Enabling this allows a TCP stream parser to be used with
  267. BPF_MAP_TYPE_SOCKMAP.
  268. config NET_FLOW_LIMIT
  269. bool
  270. depends on RPS
  271. default y
  272. help
  273. The network stack has to drop packets when a receive processing CPU's
  274. backlog reaches netdev_max_backlog. If a few out of many active flows
  275. generate the vast majority of load, drop their traffic earlier to
  276. maintain capacity for the other flows. This feature provides servers
  277. with many clients some protection against DoS by a single (spoofed)
  278. flow that greatly exceeds average workload.
  279. menu "Network testing"
  280. config NET_PKTGEN
  281. tristate "Packet Generator (USE WITH CAUTION)"
  282. depends on INET && PROC_FS
  283. help
  284. This module will inject preconfigured packets, at a configurable
  285. rate, out of a given interface. It is used for network interface
  286. stress testing and performance analysis. If you don't understand
  287. what was just said, you don't need it: say N.
  288. Documentation on how to use the packet generator can be found
  289. at <file:Documentation/networking/pktgen.rst>.
  290. To compile this code as a module, choose M here: the
  291. module will be called pktgen.
  292. config NET_DROP_MONITOR
  293. tristate "Network packet drop alerting service"
  294. depends on INET && TRACEPOINTS
  295. help
  296. This feature provides an alerting service to userspace in the
  297. event that packets are discarded in the network stack. Alerts
  298. are broadcast via netlink socket to any listening user space
  299. process. If you don't need network drop alerts, or if you are ok
  300. just checking the various proc files and other utilities for
  301. drop statistics, say N here.
  302. endmenu
  303. endmenu
  304. source "net/ax25/Kconfig"
  305. source "net/can/Kconfig"
  306. source "net/bluetooth/Kconfig"
  307. source "net/rxrpc/Kconfig"
  308. source "net/kcm/Kconfig"
  309. source "net/strparser/Kconfig"
  310. source "net/mctp/Kconfig"
  311. config FIB_RULES
  312. bool
  313. menuconfig WIRELESS
  314. bool "Wireless"
  315. depends on !S390
  316. default y
  317. if WIRELESS
  318. source "net/wireless/Kconfig"
  319. source "net/mac80211/Kconfig"
  320. endif # WIRELESS
  321. source "net/rfkill/Kconfig"
  322. source "net/9p/Kconfig"
  323. source "net/caif/Kconfig"
  324. source "net/ceph/Kconfig"
  325. source "net/nfc/Kconfig"
  326. source "net/psample/Kconfig"
  327. source "net/ife/Kconfig"
  328. config LWTUNNEL
  329. bool "Network light weight tunnels"
  330. help
  331. This feature provides an infrastructure to support light weight
  332. tunnels like mpls. There is no netdevice associated with a light
  333. weight tunnel endpoint. Tunnel encapsulation parameters are stored
  334. with light weight tunnel state associated with fib routes.
  335. config LWTUNNEL_BPF
  336. bool "Execute BPF program as route nexthop action"
  337. depends on LWTUNNEL && INET
  338. default y if LWTUNNEL=y
  339. help
  340. Allows to run BPF programs as a nexthop action following a route
  341. lookup for incoming and outgoing packets.
  342. config DST_CACHE
  343. bool
  344. default n
  345. config GRO_CELLS
  346. bool
  347. default n
  348. config SOCK_VALIDATE_XMIT
  349. bool
  350. config NET_SELFTESTS
  351. def_tristate PHYLIB
  352. depends on PHYLIB && INET
  353. config NET_SOCK_MSG
  354. bool
  355. default n
  356. help
  357. The NET_SOCK_MSG provides a framework for plain sockets (e.g. TCP) or
  358. ULPs (upper layer modules, e.g. TLS) to process L7 application data
  359. with the help of BPF programs.
  360. config NET_DEVLINK
  361. bool
  362. default n
  363. config PAGE_POOL
  364. bool
  365. config PAGE_POOL_STATS
  366. default n
  367. bool "Page pool stats"
  368. depends on PAGE_POOL
  369. help
  370. Enable page pool statistics to track page allocation and recycling
  371. in page pools. This option incurs additional CPU cost in allocation
  372. and recycle paths and additional memory cost to store the statistics.
  373. These statistics are only available if this option is enabled and if
  374. the driver using the page pool supports exporting this data.
  375. If unsure, say N.
  376. config FAILOVER
  377. tristate "Generic failover module"
  378. help
  379. The failover module provides a generic interface for paravirtual
  380. drivers to register a netdev and a set of ops with a failover
  381. instance. The ops are used as event handlers that get called to
  382. handle netdev register/unregister/link change/name change events
  383. on slave pci ethernet devices with the same mac address as the
  384. failover netdev. This enables paravirtual drivers to use a
  385. VF as an accelerated low latency datapath. It also allows live
  386. migration of VMs with direct attached VFs by failing over to the
  387. paravirtual datapath when the VF is unplugged.
  388. config ETHTOOL_NETLINK
  389. bool "Netlink interface for ethtool"
  390. default y
  391. help
  392. An alternative userspace interface for ethtool based on generic
  393. netlink. It provides better extensibility and some new features,
  394. e.g. notification messages.
  395. config NETDEV_ADDR_LIST_TEST
  396. tristate "Unit tests for device address list"
  397. default KUNIT_ALL_TESTS
  398. depends on KUNIT
  399. endif # if NET