1# Native posix ethernet driver configuration options
2
3# Copyright (c) 2018 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ETH_NATIVE_POSIX
7	bool "Native Posix Ethernet driver"
8	depends on ARCH_POSIX
9	help
10	  Enable native posix ethernet driver. Note, this driver is run inside
11	  a process in your host system.
12
13if ETH_NATIVE_POSIX
14
15config ETH_NATIVE_POSIX_INTERFACE_COUNT
16	int "Number of network interfaces created"
17	default NET_GPTP_NUM_PORTS if NET_GPTP
18	default PTP_NUM_PORTS if PTP
19	default 1
20	range 1 32
21	help
22	  By default only one network interface is created. It is possible
23	  to create multiple interfaces in certain use cases. For example if
24	  multiple ports are defined in gPTP or PTP, then multiple network interfaces
25	  must be created here.
26
27config ETH_NATIVE_POSIX_DRV_NAME
28	string "Ethernet driver name"
29	default "zeth"
30	help
31	  This option sets the driver name and name of the network interface
32	  in your host system. If there are multiple network interfaces defined,
33	  then this value is used as a prefix and the interface names will be
34	  zeth0, zeth1, etc.
35
36config ETH_NATIVE_POSIX_DEV_NAME
37	string "Host ethernet TUN/TAP device name"
38	default "/dev/net/tun"
39	help
40	  This option sets the TUN/TAP device name in your host system.
41
42config ETH_NATIVE_POSIX_PTP_CLOCK
43	bool "PTP clock driver support"
44	default y if NET_GPTP || PTP
45	select PTP_CLOCK
46	depends on NET_GPTP || PTP
47	help
48	  Enable PTP clock support.
49
50config ETH_NATIVE_POSIX_RANDOM_MAC
51	bool "Random MAC address"
52	depends on ENTROPY_GENERATOR
53	default y
54	help
55	  Generate a random MAC address dynamically.
56
57config ETH_NATIVE_POSIX_VLAN_TAG_STRIP
58	bool "Strip VLAN tag from Rx frames"
59	depends on NET_VLAN
60	help
61	  Native posix ethernet driver will strip of VLAN tag from
62	  Rx Ethernet frames and sets tag information in net packet
63	  metadata.
64
65config ETH_NATIVE_POSIX_MAC_ADDR
66	string "MAC address for the interface"
67	default ""
68	depends on !ETH_NATIVE_POSIX_RANDOM_MAC
69	help
70	  Specify a MAC address for the ethernet interface in the form of
71	  six hex 8-bit chars separated by colons (e.g.:
72	  aa:33:cc:22:e2:c0).  The default is an empty string, which
73	  means the code will make 00:00:5E:00:53:XX, where XX will be
74	  random.
75
76config ETH_NATIVE_POSIX_RX_TIMEOUT
77	int "Ethernet RX timeout"
78	default 1 if NET_GPTP
79	default 50
80	range 1 100
81	help
82	  Native posix ethernet driver repeatedly checks for new data.
83	  Specify how long the thread sleeps between these checks if no new data
84	  available.
85
86endif # ETH_NATIVE_POSIX
87