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