1252661Snp# Chelsio T5 Factory Default configuration file.
2252661Snp#
3319269Snp# Copyright (C) 2010-2017 Chelsio Communications.  All rights reserved.
4252661Snp#
5285527Snp#   DO NOT MODIFY THIS FILE UNDER ANY CIRCUMSTANCES.  MODIFICATION OF THIS FILE
6285527Snp#   WILL RESULT IN A NON-FUNCTIONAL ADAPTER AND MAY RESULT IN PHYSICAL DAMAGE
7285527Snp#   TO ADAPTERS.
8252661Snp
9285527Snp
10285527Snp# This file provides the default, power-on configuration for 4-port T5-based
11252661Snp# adapters shipped from the factory.  These defaults are designed to address
12285527Snp# the needs of the vast majority of Terminator customers.  The basic idea is to
13285527Snp# have a default configuration which allows a customer to plug a Terminator
14285527Snp# adapter in and have it work regardless of OS, driver or application except in
15285527Snp# the most unusual and/or demanding customer applications.
16252661Snp#
17285527Snp# Many of the Terminator resources which are described by this configuration
18285527Snp# are finite.  This requires balancing the configuration/operation needs of
19252661Snp# device drivers across OSes and a large number of customer application.
20252661Snp#
21298976Spfg# Some of the more important resources to allocate and their constaints are:
22285527Snp#  1. Virtual Interfaces: 256.
23285527Snp#  2. Ingress Queues with Free Lists: 1024.
24285527Snp#  3. Egress Queues: 128K.
25285527Snp#  4. MSI-X Vectors: 1088.
26252661Snp#  5. Multi-Port Support (MPS) TCAM: 336 entries to support MAC destination
27252661Snp#     address matching on Ingress Packets.
28252661Snp#
29252661Snp# Some of the important OS/Driver resource needs are:
30252661Snp#  6. Some OS Drivers will manage all resources through a single Physical
31285527Snp#     Function (currently PF4 but it could be any Physical Function).
32252661Snp#  7. Some OS Drivers will manage different ports and functions (NIC,
33252661Snp#     storage, etc.) on different Physical Functions.  For example, NIC
34252661Snp#     functions for ports 0-3 on PF0-3, FCoE on PF4, iSCSI on PF5, etc.
35252661Snp#
36252661Snp# Some of the customer application needs which need to be accommodated:
37252661Snp#  8. Some customers will want to support large CPU count systems with
38252661Snp#     good scaling.  Thus, we'll need to accommodate a number of
39252661Snp#     Ingress Queues and MSI-X Vectors to allow up to some number of CPUs
40252661Snp#     to be involved per port and per application function.  For example,
41252661Snp#     in the case where all ports and application functions will be
42252661Snp#     managed via a single Unified PF and we want to accommodate scaling up
43252661Snp#     to 8 CPUs, we would want:
44252661Snp#
45252661Snp#         4 ports *
46252661Snp#         3 application functions (NIC, FCoE, iSCSI) per port *
47252661Snp#         8 Ingress Queue/MSI-X Vectors per application function
48252661Snp#
49252661Snp#     for a total of 96 Ingress Queues and MSI-X Vectors on the Unified PF.
50252661Snp#     (Plus a few for Firmware Event Queues, etc.)
51252661Snp#
52285527Snp#  9. Some customers will want to use PCI-E SR-IOV Capability to allow Virtual
53285527Snp#     Machines to directly access T6 functionality via SR-IOV Virtual Functions
54285527Snp#     and "PCI Device Passthrough" -- this is especially true for the NIC
55285527Snp#     application functionality.
56252661Snp#
57252661Snp
58252661Snp
59252661Snp# Global configuration settings.
60252661Snp#
61252661Snp[global]
62252661Snp	rss_glb_config_mode = basicvirtual
63252661Snp	rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp
64252661Snp
65252661Snp	# PL_TIMEOUT register
66285527Snp	pl_timeout_value = 10000	# the timeout value in units of us
67252661Snp
68252661Snp	# The following Scatter Gather Engine (SGE) settings assume a 4KB Host
69252661Snp	# Page Size and a 64B L1 Cache Line Size. It programs the
70252661Snp	# EgrStatusPageSize and IngPadBoundary to 64B and the PktShift to 2.
71252661Snp	# If a Master PF Driver finds itself on a machine with different
72252661Snp	# parameters, then the Master PF Driver is responsible for initializing
73252661Snp	# these parameters to appropriate values.
74252661Snp	#
75252661Snp	# Notes:
76252661Snp	#  1. The Free List Buffer Sizes below are raw and the firmware will
77252661Snp	#     round them up to the Ingress Padding Boundary.
78252661Snp	#  2. The SGE Timer Values below are expressed below in microseconds.
79252661Snp	#     The firmware will convert these values to Core Clock Ticks when
80252661Snp	#     it processes the configuration parameters.
81252661Snp	#
82252661Snp	reg[0x1008] = 0x40810/0x21c70	# SGE_CONTROL
83252661Snp	reg[0x100c] = 0x22222222	# SGE_HOST_PAGE_SIZE
84252661Snp	reg[0x10a0] = 0x01040810	# SGE_INGRESS_RX_THRESHOLD
85252661Snp	reg[0x1044] = 4096		# SGE_FL_BUFFER_SIZE0
86252661Snp	reg[0x1048] = 65536		# SGE_FL_BUFFER_SIZE1
87252661Snp	reg[0x104c] = 1536		# SGE_FL_BUFFER_SIZE2
88252661Snp	reg[0x1050] = 9024		# SGE_FL_BUFFER_SIZE3
89252661Snp	reg[0x1054] = 9216		# SGE_FL_BUFFER_SIZE4
90252661Snp	reg[0x1058] = 2048		# SGE_FL_BUFFER_SIZE5
91252661Snp	reg[0x105c] = 128		# SGE_FL_BUFFER_SIZE6
92252661Snp	reg[0x1060] = 8192		# SGE_FL_BUFFER_SIZE7
93252661Snp	reg[0x1064] = 16384		# SGE_FL_BUFFER_SIZE8
94311506Snp	reg[0x10a4] = 0x00280000/0x3ffc0000 # SGE_DBFIFO_STATUS
95311506Snp	reg[0x1118] = 0x00002800/0x00003c00 # SGE_DBFIFO_STATUS2
96252661Snp	reg[0x10a8] = 0x402000/0x402000	# SGE_DOORBELL_CONTROL
97252661Snp
98252661Snp	# SGE_THROTTLE_CONTROL
99252661Snp	bar2throttlecount = 500		# bar2throttlecount in us
100252661Snp
101252661Snp	sge_timer_value = 5, 10, 20, 50, 100, 200 # SGE_TIMER_VALUE* in usecs
102252661Snp
103252661Snp	
104252661Snp	reg[0x1124] = 0x00000400/0x00000400 # SGE_CONTROL2, enable VFIFO; if
105252661Snp					# SGE_VFIFO_SIZE is not set, then
106252661Snp					# firmware will set it up in function
107252661Snp					# of number of egress queues used
108252661Snp
109252661Snp	reg[0x1130] = 0x00d5ffeb	# SGE_DBP_FETCH_THRESHOLD, fetch
110252661Snp					# threshold set to queue depth
111252661Snp					# minus 128-entries for FL and HP
112252661Snp					# queues, and 0xfff for LP which
113252661Snp					# prompts the firmware to set it up
114252661Snp					# in function of egress queues
115252661Snp					# used
116252661Snp
117252661Snp	reg[0x113c] = 0x0002ffc0	# SGE_VFIFO_SIZE, set to 0x2ffc0 which
118252661Snp					# prompts the firmware to set it up in
119252661Snp					# function of number of egress queues
120252661Snp					# used 
121252661Snp
122256459Snp	# enable TP_OUT_CONFIG.IPIDSPLITMODE
123256459Snp	reg[0x7d04] = 0x00010000/0x00010000
124256459Snp
125296249Snp	# disable TP_PARA_REG3.RxFragEn
126296249Snp	reg[0x7d6c] = 0x00000000/0x00007000
127296249Snp
128296249Snp	# enable TP_PARA_REG6.EnableCSnd
129296249Snp	reg[0x7d78] = 0x00000400/0x00000000
130296249Snp
131285527Snp	reg[0x7dc0] = 0x0e2f8849	# TP_SHIFT_CNT
132252661Snp
133256459Snp	# TP_VLAN_PRI_MAP to select filter tuples and enable ServerSram
134256459Snp	# filter control: compact, fcoemask
135256459Snp	# server sram   : srvrsram
136256459Snp	# filter tuples : fragmentation, mpshittype, macmatch, ethertype,
137256459Snp	#		  protocol, tos, vlan, vnic_id, port, fcoe
138256459Snp	# valid filterModes are described the Terminator 5 Data Book
139285527Snp	filterMode = fcoemask, srvrsram, fragmentation, mpshittype, protocol, vlan, port, fcoe
140256459Snp
141256459Snp	# filter tuples enforced in LE active region (equal to or subset of filterMode)
142252661Snp	filterMask = protocol, fcoe
143252661Snp
144252661Snp	# Percentage of dynamic memory (in either the EDRAM or external MEM)
145252661Snp	# to use for TP RX payload
146285527Snp	tp_pmrx = 30
147252661Snp
148252661Snp	# TP RX payload page size
149252661Snp	tp_pmrx_pagesize = 64K
150252661Snp
151252661Snp	# TP number of RX channels
152252661Snp	tp_nrxch = 0		# 0 (auto) = 1
153252661Snp
154252661Snp	# Percentage of dynamic memory (in either the EDRAM or external MEM)
155252661Snp	# to use for TP TX payload
156285527Snp	tp_pmtx = 50
157252661Snp
158252661Snp	# TP TX payload page size
159252661Snp	tp_pmtx_pagesize = 64K
160252661Snp
161252661Snp	# TP number of TX channels
162252661Snp	tp_ntxch = 0		# 0 (auto) = equal number of ports
163252661Snp
164256459Snp	# TP OFLD MTUs
165256459Snp	tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 4096, 4352, 8192, 9000, 9600
166256459Snp
167252661Snp	# TP_GLOBAL_CONFIG
168252661Snp	reg[0x7d08] = 0x00000800/0x00000800 # set IssFromCplEnable
169252661Snp
170267757Snp	# TP_PC_CONFIG
171267757Snp	reg[0x7d48] = 0x00000000/0x00000400 # clear EnableFLMError
172267757Snp
173256459Snp	# TP_PARA_REG0
174256459Snp	reg[0x7d60] = 0x06000000/0x07000000 # set InitCWND to 6
175256459Snp
176285527Snp	# ULPRX iSCSI Page Sizes
177285527Snp	reg[0x19168] = 0x04020100 # 64K, 16K, 8K and 4K
178285527Snp
179252661Snp	# LE_DB_CONFIG
180252661Snp	reg[0x19c04] = 0x00400000/0x00400000 # LE Server SRAM Enable
181252661Snp
182256459Snp	# MC configuration
183256459Snp	mc_mode_brc[0] = 1		# mc0 - 1: enable BRC, 0: enable RBC
184256459Snp	mc_mode_brc[1] = 1		# mc1 - 1: enable BRC, 0: enable RBC
185256459Snp
186296249Snp	# ULP_TX_CONFIG
187296249Snp	reg[0x8dc0] = 0x00000004/0x00000004 # Enable more error msg for ...
188296249Snp					    # TPT error.
189296249Snp
190252661Snp# Some "definitions" to make the rest of this a bit more readable.  We support
191252661Snp# 4 ports, 3 functions (NIC, FCoE and iSCSI), scaling up to 8 "CPU Queue Sets"
192252661Snp# per function per port ...
193252661Snp#
194252661Snp# NMSIX = 1088			# available MSI-X Vectors
195252661Snp# NVI = 128			# available Virtual Interfaces
196252661Snp# NMPSTCAM = 336		# MPS TCAM entries
197252661Snp#
198252661Snp# NPORTS = 4			# ports
199252661Snp# NCPUS = 8			# CPUs we want to support scalably
200252661Snp# NFUNCS = 3			# functions per port (NIC, FCoE, iSCSI)
201252661Snp
202252661Snp# Breakdown of Virtual Interface/Queue/Interrupt resources for the "Unified
203252661Snp# PF" which many OS Drivers will use to manage most or all functions.
204252661Snp#
205252661Snp# Each Ingress Queue can use one MSI-X interrupt but some Ingress Queues can
206252661Snp# use Forwarded Interrupt Ingress Queues.  For these latter, an Ingress Queue
207252661Snp# would be created and the Queue ID of a Forwarded Interrupt Ingress Queue
208252661Snp# will be specified as the "Ingress Queue Asynchronous Destination Index."
209252661Snp# Thus, the number of MSI-X Vectors assigned to the Unified PF will be less
210252661Snp# than or equal to the number of Ingress Queues ...
211252661Snp#
212252661Snp# NVI_NIC = 4			# NIC access to NPORTS
213252661Snp# NFLIQ_NIC = 32		# NIC Ingress Queues with Free Lists
214252661Snp# NETHCTRL_NIC = 32		# NIC Ethernet Control/TX Queues
215252661Snp# NEQ_NIC = 64			# NIC Egress Queues (FL, ETHCTRL/TX)
216252661Snp# NMPSTCAM_NIC = 16		# NIC MPS TCAM Entries (NPORTS*4)
217252661Snp# NMSIX_NIC = 32		# NIC MSI-X Interrupt Vectors (FLIQ)
218285527Snp#
219252661Snp# NVI_OFLD = 0			# Offload uses NIC function to access ports
220252661Snp# NFLIQ_OFLD = 16		# Offload Ingress Queues with Free Lists
221252661Snp# NETHCTRL_OFLD = 0		# Offload Ethernet Control/TX Queues
222252661Snp# NEQ_OFLD = 16			# Offload Egress Queues (FL)
223252661Snp# NMPSTCAM_OFLD = 0		# Offload MPS TCAM Entries (uses NIC's)
224252661Snp# NMSIX_OFLD = 16		# Offload MSI-X Interrupt Vectors (FLIQ)
225252661Snp#
226252661Snp# NVI_RDMA = 0			# RDMA uses NIC function to access ports
227252661Snp# NFLIQ_RDMA = 4		# RDMA Ingress Queues with Free Lists
228252661Snp# NETHCTRL_RDMA = 0		# RDMA Ethernet Control/TX Queues
229252661Snp# NEQ_RDMA = 4			# RDMA Egress Queues (FL)
230252661Snp# NMPSTCAM_RDMA = 0		# RDMA MPS TCAM Entries (uses NIC's)
231252661Snp# NMSIX_RDMA = 4		# RDMA MSI-X Interrupt Vectors (FLIQ)
232252661Snp#
233252661Snp# NEQ_WD = 128			# Wire Direct TX Queues and FLs
234252661Snp# NETHCTRL_WD = 64		# Wire Direct TX Queues
235252661Snp# NFLIQ_WD = 64	`		# Wire Direct Ingress Queues with Free Lists
236252661Snp#
237252661Snp# NVI_ISCSI = 4			# ISCSI access to NPORTS
238252661Snp# NFLIQ_ISCSI = 4		# ISCSI Ingress Queues with Free Lists
239252661Snp# NETHCTRL_ISCSI = 0		# ISCSI Ethernet Control/TX Queues
240252661Snp# NEQ_ISCSI = 4			# ISCSI Egress Queues (FL)
241252661Snp# NMPSTCAM_ISCSI = 4		# ISCSI MPS TCAM Entries (NPORTS)
242252661Snp# NMSIX_ISCSI = 4		# ISCSI MSI-X Interrupt Vectors (FLIQ)
243252661Snp#
244252661Snp# NVI_FCOE = 4			# FCOE access to NPORTS
245252661Snp# NFLIQ_FCOE = 34		# FCOE Ingress Queues with Free Lists
246252661Snp# NETHCTRL_FCOE = 32		# FCOE Ethernet Control/TX Queues
247252661Snp# NEQ_FCOE = 66			# FCOE Egress Queues (FL)
248252661Snp# NMPSTCAM_FCOE = 32 		# FCOE MPS TCAM Entries (NPORTS)
249252661Snp# NMSIX_FCOE = 34		# FCOE MSI-X Interrupt Vectors (FLIQ)
250252661Snp
251252661Snp# Two extra Ingress Queues per function for Firmware Events and Forwarded
252252661Snp# Interrupts, and two extra interrupts per function for Firmware Events (or a
253252661Snp# Forwarded Interrupt Queue) and General Interrupts per function.
254252661Snp#
255252661Snp# NFLIQ_EXTRA = 6		# "extra" Ingress Queues 2*NFUNCS (Firmware and
256252661Snp# 				#   Forwarded Interrupts
257252661Snp# NMSIX_EXTRA = 6		# extra interrupts 2*NFUNCS (Firmware and
258252661Snp# 				#   General Interrupts
259252661Snp
260252661Snp# Microsoft HyperV resources.  The HyperV Virtual Ingress Queues will have
261252661Snp# their interrupts forwarded to another set of Forwarded Interrupt Queues.
262252661Snp#
263252661Snp# NVI_HYPERV = 16		# VMs we want to support
264252661Snp# NVIIQ_HYPERV = 2		# Virtual Ingress Queues with Free Lists per VM
265252661Snp# NFLIQ_HYPERV = 40		# VIQs + NCPUS Forwarded Interrupt Queues
266252661Snp# NEQ_HYPERV = 32		# VIQs Free Lists
267252661Snp# NMPSTCAM_HYPERV = 16		# MPS TCAM Entries (NVI_HYPERV)
268252661Snp# NMSIX_HYPERV = 8		# NCPUS Forwarded Interrupt Queues
269252661Snp
270252661Snp# Adding all of the above Unified PF resource needs together: (NIC + OFLD +
271252661Snp# RDMA + ISCSI + FCOE + EXTRA + HYPERV)
272252661Snp#
273252661Snp# NVI_UNIFIED = 28
274252661Snp# NFLIQ_UNIFIED = 106
275252661Snp# NETHCTRL_UNIFIED = 32
276252661Snp# NEQ_UNIFIED = 124
277252661Snp# NMPSTCAM_UNIFIED = 40
278252661Snp#
279252661Snp# The sum of all the MSI-X resources above is 74 MSI-X Vectors but we'll round
280252661Snp# that up to 128 to make sure the Unified PF doesn't run out of resources.
281252661Snp#
282252661Snp# NMSIX_UNIFIED = 128
283252661Snp#
284252661Snp# The Storage PFs could need up to NPORTS*NCPUS + NMSIX_EXTRA MSI-X Vectors
285252661Snp# which is 34 but they're probably safe with 32.
286252661Snp#
287252661Snp# NMSIX_STORAGE = 32
288252661Snp
289252661Snp# Note: The UnifiedPF is PF4 which doesn't have any Virtual Functions
290252661Snp# associated with it.  Thus, the MSI-X Vector allocations we give to the
291252661Snp# UnifiedPF aren't inherited by any Virtual Functions.  As a result we can
292252661Snp# provision many more Virtual Functions than we can if the UnifiedPF were
293252661Snp# one of PF0-3.
294252661Snp#
295252661Snp
296252661Snp# All of the below PCI-E parameters are actually stored in various *_init.txt
297252661Snp# files.  We include them below essentially as comments.
298252661Snp#
299252661Snp# For PF0-3 we assign 8 vectors each for NIC Ingress Queues of the associated
300252661Snp# ports 0-3.
301252661Snp#
302252661Snp# For PF4, the Unified PF, we give it an MSI-X Table Size as outlined above.
303252661Snp#
304252661Snp# For PF5-6 we assign enough MSI-X Vectors to support FCoE and iSCSI
305252661Snp# storage applications across all four possible ports.
306252661Snp#
307252661Snp# Additionally, since the UnifiedPF isn't one of the per-port Physical
308252661Snp# Functions, we give the UnifiedPF and the PF0-3 Physical Functions
309252661Snp# different PCI Device IDs which will allow Unified and Per-Port Drivers
310252661Snp# to directly select the type of Physical Function to which they wish to be
311252661Snp# attached.
312252661Snp#
313298976Spfg# Note that the actual values used for the PCI-E Intelectual Property will be
314252661Snp# 1 less than those below since that's the way it "counts" things.  For
315252661Snp# readability, we use the number we actually mean ...
316252661Snp#
317252661Snp# PF0_INT = 8			# NCPUS
318252661Snp# PF1_INT = 8			# NCPUS
319252661Snp# PF2_INT = 8			# NCPUS
320252661Snp# PF3_INT = 8			# NCPUS
321252661Snp# PF0_3_INT = 32		# PF0_INT + PF1_INT + PF2_INT + PF3_INT
322285527Snp#
323252661Snp# PF4_INT = 128			# NMSIX_UNIFIED
324252661Snp# PF5_INT = 32			# NMSIX_STORAGE
325252661Snp# PF6_INT = 32			# NMSIX_STORAGE
326252661Snp# PF7_INT = 0			# Nothing Assigned
327252661Snp# PF4_7_INT = 192		# PF4_INT + PF5_INT + PF6_INT + PF7_INT
328285527Snp#
329252661Snp# PF0_7_INT = 224		# PF0_3_INT + PF4_7_INT
330285527Snp#
331252661Snp# With the above we can get 17 VFs/PF0-3 (limited by 336 MPS TCAM entries)
332252661Snp# but we'll lower that to 16 to make our total 64 and a nice power of 2 ...
333252661Snp#
334252661Snp# NVF = 16
335252661Snp
336285527Snp
337252661Snp# For those OSes which manage different ports on different PFs, we need
338252661Snp# only enough resources to support a single port's NIC application functions
339252661Snp# on PF0-3.  The below assumes that we're only doing NIC with NCPUS "Queue
340252661Snp# Sets" for ports 0-3.  The FCoE and iSCSI functions for such OSes will be
341252661Snp# managed on the "storage PFs" (see below).
342252661Snp#
343252661Snp[function "0"]
344252661Snp	nvf = 16		# NVF on this function
345252661Snp	wx_caps = all		# write/execute permissions for all commands
346252661Snp	r_caps = all		# read permissions for all commands
347252661Snp	nvi = 1			# 1 port
348252661Snp	niqflint = 8		# NCPUS "Queue Sets"
349252661Snp	nethctrl = 8		# NCPUS "Queue Sets"
350252661Snp	neq = 16		# niqflint + nethctrl Egress Queues
351252661Snp	nexactf = 8		# number of exact MPSTCAM MAC filters
352252661Snp	cmask = all		# access to all channels
353252661Snp	pmask = 0x1		# access to only one port
354252661Snp
355285527Snp
356252661Snp[function "1"]
357252661Snp	nvf = 16		# NVF on this function
358252661Snp	wx_caps = all		# write/execute permissions for all commands
359252661Snp	r_caps = all		# read permissions for all commands
360252661Snp	nvi = 1			# 1 port
361252661Snp	niqflint = 8		# NCPUS "Queue Sets"
362252661Snp	nethctrl = 8		# NCPUS "Queue Sets"
363252661Snp	neq = 16		# niqflint + nethctrl Egress Queues
364252661Snp	nexactf = 8		# number of exact MPSTCAM MAC filters
365252661Snp	cmask = all		# access to all channels
366252661Snp	pmask = 0x2		# access to only one port
367252661Snp
368285527Snp
369252661Snp[function "2"]
370252661Snp	nvf = 16		# NVF on this function
371252661Snp	wx_caps = all		# write/execute permissions for all commands
372252661Snp	r_caps = all		# read permissions for all commands
373252661Snp	nvi = 1			# 1 port
374252661Snp	niqflint = 8		# NCPUS "Queue Sets"
375252661Snp	nethctrl = 8		# NCPUS "Queue Sets"
376252661Snp	neq = 16		# niqflint + nethctrl Egress Queues
377252661Snp	nexactf = 8		# number of exact MPSTCAM MAC filters
378252661Snp	cmask = all		# access to all channels
379252661Snp	pmask = 0x4		# access to only one port
380252661Snp
381285527Snp
382252661Snp[function "3"]
383252661Snp	nvf = 16		# NVF on this function
384252661Snp	wx_caps = all		# write/execute permissions for all commands
385252661Snp	r_caps = all		# read permissions for all commands
386252661Snp	nvi = 1			# 1 port
387252661Snp	niqflint = 8		# NCPUS "Queue Sets"
388252661Snp	nethctrl = 8		# NCPUS "Queue Sets"
389252661Snp	neq = 16		# niqflint + nethctrl Egress Queues
390252661Snp	nexactf = 8		# number of exact MPSTCAM MAC filters
391252661Snp	cmask = all		# access to all channels
392252661Snp	pmask = 0x8		# access to only one port
393252661Snp
394285527Snp
395252661Snp# Some OS Drivers manage all application functions for all ports via PF4.
396252661Snp# Thus we need to provide a large number of resources here.  For Egress
397252661Snp# Queues we need to account for both TX Queues as well as Free List Queues
398252661Snp# (because the host is responsible for producing Free List Buffers for the
399252661Snp# hardware to consume).
400252661Snp#
401252661Snp[function "4"]
402252661Snp	wx_caps = all		# write/execute permissions for all commands
403252661Snp	r_caps = all		# read permissions for all commands
404252661Snp	nvi = 28		# NVI_UNIFIED
405252661Snp	niqflint = 170		# NFLIQ_UNIFIED + NLFIQ_WD
406252661Snp	nethctrl = 100		# NETHCTRL_UNIFIED + NETHCTRL_WD
407252661Snp	neq = 256		# NEQ_UNIFIED + NEQ_WD
408285527Snp	nqpcq = 12288 
409252661Snp	nexactf = 40		# NMPSTCAM_UNIFIED
410252661Snp	cmask = all		# access to all channels
411252661Snp	pmask = all		# access to all four ports ...
412252661Snp	nethofld = 1024		# number of user mode ethernet flow contexts
413252661Snp	nroute = 32		# number of routing region entries
414252661Snp	nclip = 32		# number of clip region entries
415252661Snp	nfilter = 496		# number of filter region entries
416252661Snp	nserver = 496		# number of server region entries
417252661Snp	nhash = 12288		# number of hash region entries
418346940Snp	protocol = nic_vm, ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, iscsi_t10dif, nic_hashfilter
419252661Snp	tp_l2t = 3072
420252661Snp	tp_ddp = 2
421252661Snp	tp_ddp_iscsi = 2
422252661Snp	tp_stag = 2
423252661Snp	tp_pbl = 5
424252661Snp	tp_rq = 7
425252661Snp
426285527Snp
427252661Snp# We have FCoE and iSCSI storage functions on PF5 and PF6 each of which may
428252661Snp# need to have Virtual Interfaces on each of the four ports with up to NCPUS
429252661Snp# "Queue Sets" each.
430252661Snp#
431252661Snp[function "5"]
432252661Snp	wx_caps = all		# write/execute permissions for all commands
433252661Snp	r_caps = all		# read permissions for all commands
434252661Snp	nvi = 4			# NPORTS
435252661Snp	niqflint = 34		# NPORTS*NCPUS + NMSIX_EXTRA
436252661Snp	nethctrl = 32		# NPORTS*NCPUS
437252661Snp	neq = 64		# NPORTS*NCPUS * 2 (FL, ETHCTRL/TX)
438285527Snp	nexactf = 16		# (NPORTS *(no of snmc grp + 1 hw mac) + 1 anmc grp)) rounded to 16.
439252661Snp	cmask = all		# access to all channels
440252661Snp	pmask = all		# access to all four ports ...
441252661Snp	nserver = 16
442252661Snp	nhash = 2048
443267757Snp	tp_l2t = 1020
444252661Snp	protocol = iscsi_initiator_fofld
445252661Snp	tp_ddp_iscsi = 2
446252661Snp	iscsi_ntask = 2048
447252661Snp	iscsi_nsess = 2048
448252661Snp	iscsi_nconn_per_session = 1
449252661Snp	iscsi_ninitiator_instance = 64
450252661Snp
451285527Snp
452252661Snp[function "6"]
453252661Snp	wx_caps = all		# write/execute permissions for all commands
454252661Snp	r_caps = all		# read permissions for all commands
455252661Snp	nvi = 4			# NPORTS
456252661Snp	niqflint = 34		# NPORTS*NCPUS + NMSIX_EXTRA
457252661Snp	nethctrl = 32		# NPORTS*NCPUS
458252661Snp	neq = 66		# NPORTS*NCPUS * 2 (FL, ETHCTRL/TX) + 2 (EXTRA)
459252661Snp	nexactf = 32		# NPORTS + adding 28 exact entries for FCoE
460252661Snp				# which is OK since < MIN(SUM PF0..3, PF4)
461252661Snp				# and we never load PF0..3 and PF4 concurrently
462252661Snp	cmask = all		# access to all channels
463252661Snp	pmask = all		# access to all four ports ...
464252661Snp	nhash = 2048
465267757Snp	tp_l2t = 4
466252661Snp	protocol = fcoe_initiator
467252661Snp	tp_ddp = 2
468252661Snp	fcoe_nfcf = 16
469252661Snp	fcoe_nvnp = 32
470252661Snp	fcoe_nssn = 1024
471252661Snp
472285527Snp
473252661Snp# The following function, 1023, is not an actual PCIE function but is used to
474252661Snp# configure and reserve firmware internal resources that come from the global
475252661Snp# resource pool.
476252661Snp#
477252661Snp[function "1023"]
478252661Snp	wx_caps = all		# write/execute permissions for all commands
479252661Snp	r_caps = all		# read permissions for all commands
480252661Snp	nvi = 4			# NVI_UNIFIED
481252661Snp	cmask = all		# access to all channels
482252661Snp	pmask = all		# access to all four ports ...
483252661Snp	nexactf = 8		# NPORTS + DCBX +
484252661Snp	nfilter = 16		# number of filter region entries
485252661Snp
486285527Snp
487252661Snp# For Virtual functions, we only allow NIC functionality and we only allow
488252661Snp# access to one port (1 << PF).  Note that because of limitations in the
489252661Snp# Scatter Gather Engine (SGE) hardware which checks writes to VF KDOORBELL
490252661Snp# and GTS registers, the number of Ingress and Egress Queues must be a power
491252661Snp# of 2.
492252661Snp#
493252661Snp[function "0/*"]		# NVF
494252661Snp	wx_caps = 0x82		# DMAQ | VF
495252661Snp	r_caps = 0x86		# DMAQ | VF | PORT
496252661Snp	nvi = 1			# 1 port
497319269Snp	niqflint = 6		# 2 "Queue Sets" + NXIQ
498319269Snp	nethctrl = 4		# 2 "Queue Sets"
499319269Snp	neq = 8			# 2 "Queue Sets" * 2
500252661Snp	nexactf = 4
501252661Snp	cmask = all		# access to all channels
502252661Snp	pmask = 0x1		# access to only one port ...
503252661Snp
504285527Snp
505252661Snp[function "1/*"]		# NVF
506252661Snp	wx_caps = 0x82		# DMAQ | VF
507252661Snp	r_caps = 0x86		# DMAQ | VF | PORT
508252661Snp	nvi = 1			# 1 port
509319269Snp	niqflint = 6		# 2 "Queue Sets" + NXIQ
510319269Snp	nethctrl = 4		# 2 "Queue Sets"
511319269Snp	neq = 8			# 2 "Queue Sets" * 2
512252661Snp	nexactf = 4
513252661Snp	cmask = all		# access to all channels
514252661Snp	pmask = 0x2		# access to only one port ...
515252661Snp
516285527Snp
517252661Snp[function "2/*"]		# NVF
518252661Snp	wx_caps = 0x82		# DMAQ | VF
519252661Snp	r_caps = 0x86		# DMAQ | VF | PORT
520252661Snp	nvi = 1			# 1 port
521319269Snp	niqflint = 6		# 2 "Queue Sets" + NXIQ
522319269Snp	nethctrl = 4		# 2 "Queue Sets"
523319269Snp	neq = 8			# 2 "Queue Sets" * 2
524252661Snp	nexactf = 4
525252661Snp	cmask = all		# access to all channels
526252661Snp	pmask = 0x4		# access to only one port ...
527252661Snp
528285527Snp
529252661Snp[function "3/*"]		# NVF
530252661Snp	wx_caps = 0x82		# DMAQ | VF
531252661Snp	r_caps = 0x86		# DMAQ | VF | PORT
532252661Snp	nvi = 1			# 1 port
533319269Snp	niqflint = 6		# 2 "Queue Sets" + NXIQ
534319269Snp	nethctrl = 4		# 2 "Queue Sets"
535319269Snp	neq = 8			# 2 "Queue Sets" * 2
536252661Snp	nexactf = 4
537252661Snp	cmask = all		# access to all channels
538252661Snp	pmask = 0x8		# access to only one port ...
539252661Snp
540285527Snp
541252661Snp# MPS features a 196608 bytes ingress buffer that is used for ingress buffering
542252661Snp# for packets from the wire as well as the loopback path of the L2 switch. The
543252661Snp# folling params control how the buffer memory is distributed and the L2 flow
544252661Snp# control settings:
545252661Snp#
546252661Snp# bg_mem:	%-age of mem to use for port/buffer group
547252661Snp# lpbk_mem:	%-age of port/bg mem to use for loopback
548252661Snp# hwm:		high watermark; bytes available when starting to send pause
549252661Snp#		frames (in units of 0.1 MTU)
550252661Snp# lwm:		low watermark; bytes remaining when sending 'unpause' frame
551252661Snp#		(in inuits of 0.1 MTU)
552252661Snp# dwm:		minimum delta between high and low watermark (in units of 100
553252661Snp#		Bytes)
554252661Snp#
555252661Snp[port "0"]
556252661Snp	dcb = ppp, dcbx		# configure for DCB PPP and enable DCBX offload
557252661Snp	bg_mem = 25
558252661Snp	lpbk_mem = 25
559252661Snp	hwm = 30
560252661Snp	lwm = 15
561252661Snp	dwm = 30
562267757Snp	dcb_app_tlv[0] = 0x8906, ethertype, 3
563267757Snp	dcb_app_tlv[1] = 0x8914, ethertype, 3
564267757Snp	dcb_app_tlv[2] = 3260, socketnum, 5
565252661Snp
566285527Snp
567252661Snp[port "1"]
568252661Snp	dcb = ppp, dcbx
569252661Snp	bg_mem = 25
570252661Snp	lpbk_mem = 25
571252661Snp	hwm = 30
572252661Snp	lwm = 15
573252661Snp	dwm = 30
574267757Snp	dcb_app_tlv[0] = 0x8906, ethertype, 3
575267757Snp	dcb_app_tlv[1] = 0x8914, ethertype, 3
576267757Snp	dcb_app_tlv[2] = 3260, socketnum, 5
577252661Snp
578285527Snp
579252661Snp[port "2"]
580252661Snp	dcb = ppp, dcbx
581252661Snp	bg_mem = 25
582252661Snp	lpbk_mem = 25
583252661Snp	hwm = 30
584252661Snp	lwm = 15
585252661Snp	dwm = 30
586267757Snp	dcb_app_tlv[0] = 0x8906, ethertype, 3
587267757Snp	dcb_app_tlv[1] = 0x8914, ethertype, 3
588267757Snp	dcb_app_tlv[2] = 3260, socketnum, 5
589252661Snp
590285527Snp
591252661Snp[port "3"]
592252661Snp	dcb = ppp, dcbx
593252661Snp	bg_mem = 25
594252661Snp	lpbk_mem = 25
595252661Snp	hwm = 30
596252661Snp	lwm = 15
597252661Snp	dwm = 30
598267757Snp	dcb_app_tlv[0] = 0x8906, ethertype, 3
599267757Snp	dcb_app_tlv[1] = 0x8914, ethertype, 3
600267757Snp	dcb_app_tlv[2] = 3260, socketnum, 5
601252661Snp
602285527Snp
603252661Snp[fini]
604346940Snp	version = 0x1425001d
605346940Snp	checksum = 0xd8c8fbd8
606252661Snp
607252661Snp# Total resources used by above allocations:
608252661Snp#   Virtual Interfaces: 104
609252661Snp#   Ingress Queues/w Free Lists and Interrupts: 526
610252661Snp#   Egress Queues: 702
611252661Snp#   MPS TCAM Entries: 336
612252661Snp#   MSI-X Vectors: 736
613252661Snp#   Virtual Functions: 64
614252661Snp#
615252661Snp# $FreeBSD: stable/11/sys/dev/cxgbe/firmware/t5fw_cfg_uwire.txt 346940 2019-04-30 01:25:02Z np $
616252661Snp#
617