1# Copyright (c) 2018 Intel Corporation.
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig NET_L2_ETHERNET
5	bool "Ethernet support"
6	help
7	  Add support for Ethernet, enabling selecting relevant hardware drivers.
8	  If NET_SLIP_TAP is selected, NET_L2_ETHERNET will enable to fully
9	  simulate Ethernet through SLIP.
10
11if NET_L2_ETHERNET
12
13module = NET_L2_ETHERNET
14module-dep = NET_LOG
15module-str = Log level for Ethernet L2 layer
16module-help = Enables Ethernet L2 to output debug messages.
17source "subsys/net/Kconfig.template.log_config.net"
18
19config NET_L2_ETHERNET_RESERVE_HEADER
20	bool "Reserve space for Ethernet header in first net_buf in TX"
21	help
22	  If enabled, then reserve space for Ethernet header to the first
23	  net_buf when sending data. The default is still to have layer 2
24	  header in a separate net_buf. In RX side the Ethernet header
25	  is always part of the first net_buf.
26
27config NET_L2_ETHERNET_MGMT
28	bool "Ethernet network management interface"
29	select NET_MGMT
30	select NET_MGMT_EVENT
31	help
32	  Enable support net_mgmt Ethernet interface which can be used to
33	  configure at run-time Ethernet drivers and L2 settings.
34
35config NET_VLAN
36	bool "Virtual LAN support"
37	select NET_L2_VIRTUAL
38	help
39	  Enables virtual lan (VLAN) support for Ethernet.
40
41config NET_VLAN_COUNT
42	int "Max VLAN tags supported in the system"
43	default 1
44	range 1 $(UINT8_MAX)
45	depends on NET_VLAN
46	help
47	  How many VLAN tags can be configured.
48
49config NET_VLAN_TXRX_DEBUG
50	bool "Debug received and sent packets in VLAN"
51	depends on NET_L2_ETHERNET_LOG_LEVEL_DBG && NET_VLAN
52	help
53	  Enables printing of received and sent network packets.
54	  This can produce lot of output so it is disabled by default.
55
56config NET_ARP
57	bool "ARP"
58	default y
59	depends on NET_IPV4
60	help
61	  Enable ARP support. This is necessary on hardware that requires it to
62	  get IPv4 working (like Ethernet devices).
63
64config NET_ARP_TABLE_SIZE
65	int "Number of entries in ARP table."
66	depends on NET_ARP
67	default 2
68	help
69	  Each entry in the ARP table consumes 48 bytes of memory.
70
71config NET_ARP_GRATUITOUS
72	bool "Support gratuitous ARP requests/replies."
73	depends on NET_ARP
74	default y
75	help
76	  Gratuitous in this case means a ARP request or reply that is not
77	  normally needed according to the ARP specification but could be used
78	  in some cases. A gratuitous ARP request is a ARP request packet where
79	  the source and destination IP are both set to the IP of the machine
80	  issuing the packet and the destination MAC is the broadcast address
81	  ff:ff:ff:ff:ff:ff. Ordinarily, no reply packet will occur.
82	  A gratuitous ARP reply is a reply to which no request has been made.
83
84config NET_ARP_GRATUITOUS_TRANSMISSION
85	bool "Transmit gratuitous ARP requests"
86	depends on NET_ARP_GRATUITOUS
87	depends on NET_MGMT_EVENT
88	depends on NET_MGMT_EVENT_INFO
89	help
90	  Transmit gratuitous ARP requests, as defined in RFC 5227.
91
92config NET_ARP_GRATUITOUS_INTERVAL
93	int "Time interval (in seconds) between sending gratuitous ARP requests"
94	depends on NET_ARP_GRATUITOUS_TRANSMISSION
95	default 60
96
97if NET_ARP
98module = NET_ARP
99module-dep = NET_LOG
100module-str = Log level for IPv4 ARP
101module-help = Enables core ARP code to output debug messages.
102source "subsys/net/Kconfig.template.log_config.net"
103endif # NET_ARP
104
105source "subsys/net/l2/ethernet/gptp/Kconfig"
106source "subsys/net/l2/ethernet/lldp/Kconfig"
107
108config NET_ETHERNET_BRIDGE
109	bool "Ethernet Bridging support"
110	select NET_PROMISCUOUS_MODE
111	select NET_L2_VIRTUAL
112	help
113	  Enables Ethernet bridging where packets can be transparently
114	  forwarded across interfaces registered to a bridge.
115
116config NET_ETHERNET_BRIDGE_COUNT
117	int "Max number of bridge interfaces"
118	default 1
119	range 1 16
120	depends on NET_ETHERNET_BRIDGE
121	help
122	  How many bridge interfaces are created. Each interface can bridge
123	  two or more Ethernet interfaces.
124
125config NET_ETHERNET_BRIDGE_ETH_INTERFACE_COUNT
126	int "Max number of Ethernet interfaces bridged together"
127	default 2
128	range 2 32
129	depends on NET_ETHERNET_BRIDGE
130	help
131	  How many Ethernet interfaces can be bridged together per each
132	  bridge interface.
133
134if NET_ETHERNET_BRIDGE
135module = NET_ETHERNET_BRIDGE
136module-dep = NET_LOG
137module-str = Log level for Ethernet Bridging
138module-help = Enables Ethernet Bridge code to output debug messages.
139source "subsys/net/Kconfig.template.log_config.net"
140endif # NET_ETHERNET_BRIDGE
141
142config NET_ETHERNET_BRIDGE_TXRX_DEBUG
143	bool "Debug received and sent packets in bridge"
144	depends on NET_L2_ETHERNET_LOG_LEVEL_DBG && NET_ETHERNET_BRIDGE
145	help
146	  Enables printing of received and sent network packets.
147	  This can produce lot of output so it is disabled by default.
148
149config NET_ETHERNET_BRIDGE_SHELL
150	bool "Ethernet Bridging management shell"
151	depends on NET_ETHERNET_BRIDGE
152	select NET_SHELL
153	help
154	  Enables shell utility to manage bridge configuration interactively.
155
156config NET_ETHERNET_FORWARD_UNRECOGNISED_ETHERTYPE
157	bool "Forward unrecognized EtherType frames further into net stack"
158	default y if NET_SOCKETS_PACKET
159	help
160	  When enabled, the Ethernet L2 will forward even those frames for which
161	  it does not recognize the EtherType in the header. By default, such
162	  frames are dropped at the L2 processing.
163
164endif # NET_L2_ETHERNET
165