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
35
36config NET_L2_ETHERNET_ACCEPT_MISMATCH_L3_L2_ADDR
37	bool "Accept mismatched L3 and L2 addresses"
38	help
39	  If enabled, then accept packets where the L3 and L2 addresses do not
40	  conform to RFC1122 section 3.3.6. This is useful in dealing with
41	  buggy devices that do not follow the RFC.
42
43config NET_VLAN
44	bool "Virtual LAN support"
45	select NET_L2_VIRTUAL
46	help
47	  Enables virtual lan (VLAN) support for Ethernet.
48
49config NET_VLAN_COUNT
50	int "Max VLAN tags supported in the system"
51	default 1
52	range 0 $(UINT8_MAX)
53	depends on NET_VLAN
54	help
55	  How many VLAN tags can be configured. If set to 0, then only
56	  priority tagged VLAN frames with tag value 0 can be handled.
57	  This is useful if you do not want to receive any other VLAN
58	  tagged frames than tag 0. This will save some memory as the
59	  VLAN virtual interface is not created in this case.
60
61config NET_VLAN_TXRX_DEBUG
62	bool "Debug received and sent packets in VLAN"
63	depends on NET_L2_ETHERNET_LOG_LEVEL_DBG && NET_VLAN
64	help
65	  Enables printing of received and sent network packets.
66	  This can produce lot of output so it is disabled by default.
67
68config NET_ARP
69	bool "ARP"
70	default y
71	depends on NET_IPV4
72	help
73	  Enable ARP support. This is necessary on hardware that requires it to
74	  get IPv4 working (like Ethernet devices).
75
76config NET_ARP_TABLE_SIZE
77	int "Number of entries in ARP table."
78	depends on NET_ARP
79	default 2
80	help
81	  Each entry in the ARP table consumes 48 bytes of memory.
82
83config NET_ARP_GRATUITOUS
84	bool "Support gratuitous ARP requests/replies."
85	depends on NET_ARP
86	default y
87	help
88	  Gratuitous in this case means a ARP request or reply that is not
89	  normally needed according to the ARP specification but could be used
90	  in some cases. A gratuitous ARP request is a ARP request packet where
91	  the source and destination IP are both set to the IP of the machine
92	  issuing the packet and the destination MAC is the broadcast address
93	  ff:ff:ff:ff:ff:ff. Ordinarily, no reply packet will occur.
94	  A gratuitous ARP reply is a reply to which no request has been made.
95
96config NET_ARP_GRATUITOUS_TRANSMISSION
97	bool "Transmit gratuitous ARP requests"
98	depends on NET_ARP_GRATUITOUS
99	depends on NET_MGMT_EVENT
100	depends on NET_MGMT_EVENT_INFO
101	help
102	  Transmit gratuitous ARP requests, as defined in RFC 5227.
103
104config NET_ARP_GRATUITOUS_INTERVAL
105	int "Time interval (in seconds) between sending gratuitous ARP requests"
106	depends on NET_ARP_GRATUITOUS_TRANSMISSION
107	default 60
108
109if NET_ARP
110module = NET_ARP
111module-dep = NET_LOG
112module-str = Log level for IPv4 ARP
113module-help = Enables core ARP code to output debug messages.
114source "subsys/net/Kconfig.template.log_config.net"
115endif # NET_ARP
116
117source "subsys/net/l2/ethernet/gptp/Kconfig"
118source "subsys/net/l2/ethernet/lldp/Kconfig"
119
120config NET_ETHERNET_BRIDGE
121	bool "Ethernet Bridging support"
122	select NET_PROMISCUOUS_MODE
123	select NET_L2_VIRTUAL
124	help
125	  Enables Ethernet bridging where packets can be transparently
126	  forwarded across interfaces registered to a bridge.
127
128config NET_ETHERNET_BRIDGE_COUNT
129	int "Max number of bridge interfaces"
130	default 1
131	range 1 16
132	depends on NET_ETHERNET_BRIDGE
133	help
134	  How many bridge interfaces are created. Each interface can bridge
135	  two or more Ethernet interfaces.
136
137config NET_ETHERNET_BRIDGE_ETH_INTERFACE_COUNT
138	int "Max number of Ethernet interfaces bridged together"
139	default 2
140	range 2 32
141	depends on NET_ETHERNET_BRIDGE
142	help
143	  How many Ethernet interfaces can be bridged together per each
144	  bridge interface.
145
146if NET_ETHERNET_BRIDGE
147module = NET_ETHERNET_BRIDGE
148module-dep = NET_LOG
149module-str = Log level for Ethernet Bridging
150module-help = Enables Ethernet Bridge code to output debug messages.
151source "subsys/net/Kconfig.template.log_config.net"
152endif # NET_ETHERNET_BRIDGE
153
154config NET_ETHERNET_BRIDGE_TXRX_DEBUG
155	bool "Debug received and sent packets in bridge"
156	depends on NET_L2_ETHERNET_LOG_LEVEL_DBG && NET_ETHERNET_BRIDGE
157	help
158	  Enables printing of received and sent network packets.
159	  This can produce lot of output so it is disabled by default.
160
161config NET_ETHERNET_BRIDGE_SHELL
162	bool "Ethernet Bridging management shell"
163	depends on NET_ETHERNET_BRIDGE
164	select NET_SHELL
165	help
166	  Enables shell utility to manage bridge configuration interactively.
167
168config NET_ETHERNET_FORWARD_UNRECOGNISED_ETHERTYPE
169	bool "Forward unrecognized EtherType frames further into net stack"
170	default y if NET_SOCKETS_PACKET
171	help
172	  When enabled, the Ethernet L2 will forward even those frames for which
173	  it does not recognize the EtherType in the header. By default, such
174	  frames are dropped at the L2 processing.
175
176endif # NET_L2_ETHERNET
177