1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Mellanox driver configuration
4#
5
6config MLX5_CORE
7	tristate "Mellanox 5th generation network adapters (ConnectX series) core driver"
8	depends on PCI
9	select AUXILIARY_BUS
10	select NET_DEVLINK
11	depends on VXLAN || !VXLAN
12	depends on MLXFW || !MLXFW
13	depends on PTP_1588_CLOCK_OPTIONAL
14	depends on PCI_HYPERV_INTERFACE || !PCI_HYPERV_INTERFACE
15	depends on HWMON || !HWMON
16	help
17	  Core driver for low level functionality of the ConnectX-4 and
18	  Connect-IB cards by Mellanox Technologies.
19
20config MLX5_FPGA
21	bool "Mellanox Technologies Innova support"
22	depends on MLX5_CORE
23	help
24	  Build support for the Innova family of network cards by Mellanox
25	  Technologies. Innova network cards are comprised of a ConnectX chip
26	  and an FPGA chip on one board. If you select this option, the
27	  mlx5_core driver will include the Innova FPGA core and allow building
28	  sandbox-specific client drivers.
29
30config MLX5_CORE_EN
31	bool "Mellanox 5th generation network adapters (ConnectX series) Ethernet support"
32	depends on NETDEVICES && ETHERNET && INET && PCI && MLX5_CORE
33	select PAGE_POOL
34	select DIMLIB
35	help
36	  Ethernet support in Mellanox Technologies ConnectX-4 NIC.
37
38config MLX5_EN_ARFS
39	bool "Mellanox MLX5 ethernet accelerated receive flow steering (ARFS) support"
40	depends on MLX5_CORE_EN && RFS_ACCEL
41	default y
42	help
43	  Mellanox MLX5 ethernet hardware-accelerated receive flow steering support,
44	  Enables ethernet netdevice arfs support and ntuple filtering.
45
46config MLX5_EN_RXNFC
47	bool "Mellanox MLX5 ethernet rx nfc flow steering support"
48	depends on MLX5_CORE_EN
49	default y
50	help
51	  Mellanox MLX5 ethernet rx nfc flow steering support
52	  Enables ethtool receive network flow classification, which allows user defined
53	  flow rules to direct traffic into arbitrary rx queue via ethtool set/get_rxnfc
54	  API.
55
56config MLX5_MPFS
57	bool "Mellanox Technologies MLX5 MPFS support"
58	depends on MLX5_CORE_EN
59	default y
60	help
61	  Mellanox Technologies Ethernet Multi-Physical Function Switch (MPFS)
62	  support in ConnectX NIC. MPFs is required for when multi-PF configuration
63	  is enabled to allow passing user configured unicast MAC addresses to the
64	  requesting PF.
65
66config MLX5_ESWITCH
67	bool "Mellanox Technologies MLX5 SRIOV E-Switch support"
68	depends on MLX5_CORE_EN && NET_SWITCHDEV
69	default y
70	help
71	  Mellanox Technologies Ethernet SRIOV E-Switch support in ConnectX NIC.
72	  E-Switch provides internal SRIOV packet steering and switching for the
73	  enabled VFs and PF in two available modes:
74	        Legacy SRIOV mode (L2 mac vlan steering based).
75	        Switchdev mode (eswitch offloads).
76
77config MLX5_BRIDGE
78	bool
79	depends on MLX5_ESWITCH && BRIDGE
80	default y
81	help
82	  mlx5 ConnectX offloads support for Ethernet Bridging (BRIDGE).
83	  Enable adding representors of mlx5 uplink and VF ports to Bridge and
84	  offloading rules for traffic between such ports. Supports VLANs (trunk and
85	  access modes).
86
87config MLX5_CLS_ACT
88	bool "MLX5 TC classifier action support"
89	depends on MLX5_ESWITCH && NET_CLS_ACT && NET_TC_SKB_EXT
90	default y
91	help
92	  mlx5 ConnectX offloads support for TC classifier action (NET_CLS_ACT),
93	  works in both native NIC mode and Switchdev SRIOV mode.
94	  Actions get attached to a Hardware offloaded classifiers and are
95	  invoked after a successful classification. Actions are used to
96	  overwrite the classification result, instantly drop or redirect and/or
97	  reformat packets in wire speeds without involving the host cpu.
98
99	  If set to N, TC offloads in both NIC and switchdev modes will be disabled.
100	  If unsure, set to Y
101
102config MLX5_TC_CT
103	bool "MLX5 TC connection tracking offload support"
104	depends on MLX5_CLS_ACT && NF_FLOW_TABLE && NET_ACT_CT
105	default y
106	help
107	  Say Y here if you want to support offloading connection tracking rules
108	  via tc ct action.
109
110	  If unsure, set to Y
111
112config MLX5_TC_SAMPLE
113	bool "MLX5 TC sample offload support"
114	depends on MLX5_CLS_ACT
115	depends on PSAMPLE=y || PSAMPLE=n || MLX5_CORE=m
116	default y
117	help
118	  Say Y here if you want to support offloading sample rules via tc
119	  sample action.
120	  If set to N, will not be able to configure tc rules with sample
121	  action.
122
123	  If unsure, set to Y
124
125config MLX5_CORE_EN_DCB
126	bool "Data Center Bridging (DCB) Support"
127	default y
128	depends on MLX5_CORE_EN && DCB
129	help
130	  Say Y here if you want to use Data Center Bridging (DCB) in the
131	  driver.
132	  If set to N, will not be able to configure QoS and ratelimit attributes.
133	  This flag is depended on the kernel's DCB support.
134
135	  If unsure, set to Y
136
137config MLX5_CORE_IPOIB
138	bool "Mellanox 5th generation network adapters (connectX series) IPoIB offloads support"
139	depends on MLX5_CORE_EN
140	help
141	  MLX5 IPoIB offloads & acceleration support.
142
143config MLX5_MACSEC
144	bool "Connect-X support for MACSec offload"
145	depends on MLX5_CORE_EN
146	depends on MACSEC
147	default n
148	help
149	  Build support for MACsec cryptography-offload acceleration in the NIC.
150
151config MLX5_EN_IPSEC
152	bool "Mellanox Technologies IPsec Connect-X support"
153	depends on MLX5_CORE_EN
154	depends on XFRM_OFFLOAD
155	depends on INET_ESP_OFFLOAD || INET6_ESP_OFFLOAD
156	help
157	  Build support for IPsec cryptography-offload acceleration in the NIC.
158
159config MLX5_EN_TLS
160	bool "Mellanox Technologies TLS Connect-X support"
161	depends on TLS_DEVICE
162	depends on TLS=y || MLX5_CORE=m
163	depends on MLX5_CORE_EN
164	help
165	Build support for TLS cryptography-offload acceleration in the NIC.
166
167config MLX5_SW_STEERING
168	bool "Mellanox Technologies software-managed steering"
169	depends on MLX5_CORE_EN && MLX5_ESWITCH
170	select CRC32
171	default y
172	help
173	Build support for software-managed steering in the NIC.
174
175config MLX5_SF
176	bool "Mellanox Technologies subfunction device support using auxiliary device"
177	depends on MLX5_CORE && MLX5_CORE_EN
178	help
179	Build support for subfuction device in the NIC. A Mellanox subfunction
180	device can support RDMA, netdevice and vdpa device.
181	It is similar to a SRIOV VF but it doesn't require SRIOV support.
182
183config MLX5_SF_MANAGER
184	bool
185	depends on MLX5_SF && MLX5_ESWITCH
186	default y
187	help
188	Build support for subfuction port in the NIC. A Mellanox subfunction
189	port is managed through devlink.  A subfunction supports RDMA, netdevice
190	and vdpa device. It is similar to a SRIOV VF but it doesn't require
191	SRIOV support.
192