1f72b68a1SNavdeep Parhar# Chelsio T5 Factory Default configuration file.
2f72b68a1SNavdeep Parhar#
3f72b68a1SNavdeep Parhar# Copyright (C) 2010-2013 Chelsio Communications.  All rights reserved.
4f72b68a1SNavdeep Parhar#
5f72b68a1SNavdeep Parhar#   DO NOT MODIFY THIS FILE UNDER ANY CIRCUMSTANCES.  MODIFICATION OF
6f72b68a1SNavdeep Parhar#   THIS FILE WILL RESULT IN A NON-FUNCTIONAL T4 ADAPTER AND MAY RESULT
7f72b68a1SNavdeep Parhar#   IN PHYSICAL DAMAGE TO T4 ADAPTERS.
8f72b68a1SNavdeep Parhar
9f72b68a1SNavdeep Parhar# This file provides the default, power-on configuration for 4-port T4-based
10f72b68a1SNavdeep Parhar# adapters shipped from the factory.  These defaults are designed to address
11f72b68a1SNavdeep Parhar# the needs of the vast majority of T4 customers.  The basic idea is to have
12f72b68a1SNavdeep Parhar# a default configuration which allows a customer to plug a T4 adapter in and
13f72b68a1SNavdeep Parhar# have it work regardless of OS, driver or application except in the most
14f72b68a1SNavdeep Parhar# unusual and/or demanding customer applications.
15f72b68a1SNavdeep Parhar#
16f72b68a1SNavdeep Parhar# Many of the T4 resources which are described by this configuration are
17f72b68a1SNavdeep Parhar# finite.  This requires balancing the configuration/operation needs of
18f72b68a1SNavdeep Parhar# device drivers across OSes and a large number of customer application.
19f72b68a1SNavdeep Parhar#
20612226d7SPedro F. Giffuni# Some of the more important resources to allocate and their constaints are:
21f72b68a1SNavdeep Parhar#  1. Virtual Interfaces: 128.
22f72b68a1SNavdeep Parhar#  2. Ingress Queues with Free Lists: 1024.  PCI-E SR-IOV Virtual Functions
23f72b68a1SNavdeep Parhar#     must use a power of 2 Ingress Queues.
24f72b68a1SNavdeep Parhar#  3. Egress Queues: 128K.  PCI-E SR-IOV Virtual Functions must use a
25f72b68a1SNavdeep Parhar#     power of 2 Egress Queues.
26f72b68a1SNavdeep Parhar#  4. MSI-X Vectors: 1088.  A complication here is that the PCI-E SR-IOV
27f72b68a1SNavdeep Parhar#     Virtual Functions based off of a Physical Function all get the
28f72b68a1SNavdeep Parhar#     same umber of MSI-X Vectors as the base Physical Function.
29f72b68a1SNavdeep Parhar#     Additionally, regardless of whether Virtual Functions are enabled or
30f72b68a1SNavdeep Parhar#     not, their MSI-X "needs" are counted by the PCI-E implementation.
31f72b68a1SNavdeep Parhar#     And finally, all Physical Funcations capable of supporting Virtual
32f72b68a1SNavdeep Parhar#     Functions (PF0-3) must have the same number of configured TotalVFs in
33f72b68a1SNavdeep Parhar#     their SR-IOV Capabilities.
34f72b68a1SNavdeep Parhar#  5. Multi-Port Support (MPS) TCAM: 336 entries to support MAC destination
35f72b68a1SNavdeep Parhar#     address matching on Ingress Packets.
36f72b68a1SNavdeep Parhar#
37f72b68a1SNavdeep Parhar# Some of the important OS/Driver resource needs are:
38f72b68a1SNavdeep Parhar#  6. Some OS Drivers will manage all resources through a single Physical
39f72b68a1SNavdeep Parhar#     Function (currently PF0 but it could be any Physical Function).  Thus,
40f72b68a1SNavdeep Parhar#     this "Unified PF"  will need to have enough resources allocated to it
41f72b68a1SNavdeep Parhar#     to allow for this.  And because of the MSI-X resource allocation
42f72b68a1SNavdeep Parhar#     constraints mentioned above, this probably means we'll either have to
43f72b68a1SNavdeep Parhar#     severely limit the TotalVFs if we continue to use PF0 as the Unified PF
44f72b68a1SNavdeep Parhar#     or we'll need to move the Unified PF into the PF4-7 range since those
45f72b68a1SNavdeep Parhar#     Physical Functions don't have any Virtual Functions associated with
46f72b68a1SNavdeep Parhar#     them.
47f72b68a1SNavdeep Parhar#  7. Some OS Drivers will manage different ports and functions (NIC,
48f72b68a1SNavdeep Parhar#     storage, etc.) on different Physical Functions.  For example, NIC
49f72b68a1SNavdeep Parhar#     functions for ports 0-3 on PF0-3, FCoE on PF4, iSCSI on PF5, etc.
50f72b68a1SNavdeep Parhar#
51f72b68a1SNavdeep Parhar# Some of the customer application needs which need to be accommodated:
52f72b68a1SNavdeep Parhar#  8. Some customers will want to support large CPU count systems with
53f72b68a1SNavdeep Parhar#     good scaling.  Thus, we'll need to accommodate a number of
54f72b68a1SNavdeep Parhar#     Ingress Queues and MSI-X Vectors to allow up to some number of CPUs
55f72b68a1SNavdeep Parhar#     to be involved per port and per application function.  For example,
56f72b68a1SNavdeep Parhar#     in the case where all ports and application functions will be
57f72b68a1SNavdeep Parhar#     managed via a single Unified PF and we want to accommodate scaling up
58f72b68a1SNavdeep Parhar#     to 8 CPUs, we would want:
59f72b68a1SNavdeep Parhar#
60f72b68a1SNavdeep Parhar#         4 ports *
61f72b68a1SNavdeep Parhar#         3 application functions (NIC, FCoE, iSCSI) per port *
62f72b68a1SNavdeep Parhar#         8 Ingress Queue/MSI-X Vectors per application function
63f72b68a1SNavdeep Parhar#
64f72b68a1SNavdeep Parhar#     for a total of 96 Ingress Queues and MSI-X Vectors on the Unified PF.
65f72b68a1SNavdeep Parhar#     (Plus a few for Firmware Event Queues, etc.)
66f72b68a1SNavdeep Parhar#
67f72b68a1SNavdeep Parhar#  9. Some customers will want to use T4's PCI-E SR-IOV Capability to allow
68f72b68a1SNavdeep Parhar#     Virtual Machines to directly access T4 functionality via SR-IOV
69f72b68a1SNavdeep Parhar#     Virtual Functions and "PCI Device Passthrough" -- this is especially
70f72b68a1SNavdeep Parhar#     true for the NIC application functionality.  (Note that there is
71f72b68a1SNavdeep Parhar#     currently no ability to use the TOE, FCoE, iSCSI, etc. via Virtual
72f72b68a1SNavdeep Parhar#     Functions so this is in fact solely limited to NIC.)
73f72b68a1SNavdeep Parhar#
74f72b68a1SNavdeep Parhar
75f72b68a1SNavdeep Parhar
76f72b68a1SNavdeep Parhar# Global configuration settings.
77f72b68a1SNavdeep Parhar#
78f72b68a1SNavdeep Parhar[global]
79f72b68a1SNavdeep Parhar	rss_glb_config_mode = basicvirtual
80f72b68a1SNavdeep Parhar	rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp
81f72b68a1SNavdeep Parhar
82f72b68a1SNavdeep Parhar	# PCIE_MA_RSP register
83f72b68a1SNavdeep Parhar	pcie_ma_rsp_timervalue = 500	# the timer value in units of us
84f72b68a1SNavdeep Parhar	reg[0x59c4] = 0x3/0x3		# enable the timers
85f72b68a1SNavdeep Parhar
86f72b68a1SNavdeep Parhar	# PL_TIMEOUT register
87f72b68a1SNavdeep Parhar	pl_timeout_value = 200		# the timeout value in units of us
88f72b68a1SNavdeep Parhar
89f72b68a1SNavdeep Parhar	# The following Scatter Gather Engine (SGE) settings assume a 4KB Host
90f72b68a1SNavdeep Parhar	# Page Size and a 64B L1 Cache Line Size. It programs the
91f72b68a1SNavdeep Parhar	# EgrStatusPageSize and IngPadBoundary to 64B and the PktShift to 2.
92f72b68a1SNavdeep Parhar	# If a Master PF Driver finds itself on a machine with different
93f72b68a1SNavdeep Parhar	# parameters, then the Master PF Driver is responsible for initializing
94f72b68a1SNavdeep Parhar	# these parameters to appropriate values.
95f72b68a1SNavdeep Parhar	#
96f72b68a1SNavdeep Parhar	# Notes:
97f72b68a1SNavdeep Parhar	#  1. The Free List Buffer Sizes below are raw and the firmware will
98f72b68a1SNavdeep Parhar	#     round them up to the Ingress Padding Boundary.
99f72b68a1SNavdeep Parhar	#  2. The SGE Timer Values below are expressed below in microseconds.
100f72b68a1SNavdeep Parhar	#     The firmware will convert these values to Core Clock Ticks when
101f72b68a1SNavdeep Parhar	#     it processes the configuration parameters.
102f72b68a1SNavdeep Parhar	#
103f72b68a1SNavdeep Parhar	reg[0x1008] = 0x40810/0x21c70	# SGE_CONTROL
104f72b68a1SNavdeep Parhar	reg[0x100c] = 0x22222222	# SGE_HOST_PAGE_SIZE
105f72b68a1SNavdeep Parhar	reg[0x10a0] = 0x01040810	# SGE_INGRESS_RX_THRESHOLD
106f72b68a1SNavdeep Parhar	reg[0x1044] = 4096		# SGE_FL_BUFFER_SIZE0
107f72b68a1SNavdeep Parhar	reg[0x1048] = 65536		# SGE_FL_BUFFER_SIZE1
108f72b68a1SNavdeep Parhar	reg[0x104c] = 1536		# SGE_FL_BUFFER_SIZE2
109f72b68a1SNavdeep Parhar	reg[0x1050] = 9024		# SGE_FL_BUFFER_SIZE3
110f72b68a1SNavdeep Parhar	reg[0x1054] = 9216		# SGE_FL_BUFFER_SIZE4
111f72b68a1SNavdeep Parhar	reg[0x1058] = 2048		# SGE_FL_BUFFER_SIZE5
112f72b68a1SNavdeep Parhar	reg[0x105c] = 128		# SGE_FL_BUFFER_SIZE6
113f72b68a1SNavdeep Parhar	reg[0x1060] = 8192		# SGE_FL_BUFFER_SIZE7
114f72b68a1SNavdeep Parhar	reg[0x1064] = 16384		# SGE_FL_BUFFER_SIZE8
115f72b68a1SNavdeep Parhar	reg[0x10a4] = 0xa000a000/0xf000f000 # SGE_DBFIFO_STATUS
116f72b68a1SNavdeep Parhar	reg[0x10a8] = 0x402000/0x402000	# SGE_DOORBELL_CONTROL
117f72b68a1SNavdeep Parhar
118f72b68a1SNavdeep Parhar	# SGE_THROTTLE_CONTROL
119f72b68a1SNavdeep Parhar	bar2throttlecount = 500		# bar2throttlecount in us
120f72b68a1SNavdeep Parhar
121f72b68a1SNavdeep Parhar	sge_timer_value = 5, 10, 20, 50, 100, 200 # SGE_TIMER_VALUE* in usecs
122f72b68a1SNavdeep Parhar
123f72b68a1SNavdeep Parhar
124f72b68a1SNavdeep Parhar	reg[0x1124] = 0x00000400/0x00000400 # SGE_CONTROL2, enable VFIFO; if
125f72b68a1SNavdeep Parhar					# SGE_VFIFO_SIZE is not set, then
126f72b68a1SNavdeep Parhar					# firmware will set it up in function
127f72b68a1SNavdeep Parhar					# of number of egress queues used
128f72b68a1SNavdeep Parhar
129f72b68a1SNavdeep Parhar	reg[0x1130] = 0x00d5ffeb	# SGE_DBP_FETCH_THRESHOLD, fetch
130f72b68a1SNavdeep Parhar					# threshold set to queue depth
131f72b68a1SNavdeep Parhar					# minus 128-entries for FL and HP
132f72b68a1SNavdeep Parhar					# queues, and 0xfff for LP which
133f72b68a1SNavdeep Parhar					# prompts the firmware to set it up
134f72b68a1SNavdeep Parhar					# in function of egress queues
135f72b68a1SNavdeep Parhar					# used
136f72b68a1SNavdeep Parhar
137f72b68a1SNavdeep Parhar	reg[0x113c] = 0x0002ffc0	# SGE_VFIFO_SIZE, set to 0x2ffc0 which
138f72b68a1SNavdeep Parhar					# prompts the firmware to set it up in
139f72b68a1SNavdeep Parhar					# function of number of egress queues
140f72b68a1SNavdeep Parhar					# used
141f72b68a1SNavdeep Parhar
142f72b68a1SNavdeep Parhar	reg[0x7dc0] = 0x062f8849	# TP_SHIFT_CNT
143f72b68a1SNavdeep Parhar
144f72b68a1SNavdeep Parhar	# Selection of tuples for LE filter lookup, fields (and widths which
145f72b68a1SNavdeep Parhar	# must sum to <= 36): { IP Fragment (1), MPS Match Type (3),
146f72b68a1SNavdeep Parhar	# IP Protocol (8), [Inner] VLAN (17), Port (3), FCoE (1) }
147f72b68a1SNavdeep Parhar	#
148f72b68a1SNavdeep Parhar	filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe, srvrsram
149f72b68a1SNavdeep Parhar
150f72b68a1SNavdeep Parhar	# Percentage of dynamic memory (in either the EDRAM or external MEM)
151f72b68a1SNavdeep Parhar	# to use for TP RX payload
15262fc63abSNavdeep Parhar	tp_pmrx = 30, 512
153f72b68a1SNavdeep Parhar
154f72b68a1SNavdeep Parhar	# TP RX payload page size
155f72b68a1SNavdeep Parhar	tp_pmrx_pagesize = 64K
156f72b68a1SNavdeep Parhar
157f72b68a1SNavdeep Parhar	# TP number of RX channels
158f72b68a1SNavdeep Parhar	tp_nrxch = 0		# 0 (auto) = 1
159f72b68a1SNavdeep Parhar
160f72b68a1SNavdeep Parhar	# Percentage of dynamic memory (in either the EDRAM or external MEM)
161f72b68a1SNavdeep Parhar	# to use for TP TX payload
16262fc63abSNavdeep Parhar	tp_pmtx = 50, 512
163f72b68a1SNavdeep Parhar
164f72b68a1SNavdeep Parhar	# TP TX payload page size
165f72b68a1SNavdeep Parhar	tp_pmtx_pagesize = 64K
166f72b68a1SNavdeep Parhar
167f72b68a1SNavdeep Parhar	# TP number of TX channels
168f72b68a1SNavdeep Parhar	tp_ntxch = 0		# 0 (auto) = equal number of ports
169f72b68a1SNavdeep Parhar
170f72b68a1SNavdeep Parhar	reg[0x19c04] = 0x00400000/0x00400000 # LE Server SRAM Enable
171f72b68a1SNavdeep Parhar
172f72b68a1SNavdeep Parhar# Some "definitions" to make the rest of this a bit more readable.  We support
173f72b68a1SNavdeep Parhar# 4 ports, 3 functions (NIC, FCoE and iSCSI), scaling up to 8 "CPU Queue Sets"
174f72b68a1SNavdeep Parhar# per function per port ...
175f72b68a1SNavdeep Parhar#
176f72b68a1SNavdeep Parhar# NMSIX = 1088			# available MSI-X Vectors
177f72b68a1SNavdeep Parhar# NVI = 128			# available Virtual Interfaces
178f72b68a1SNavdeep Parhar# NMPSTCAM = 336		# MPS TCAM entries
179f72b68a1SNavdeep Parhar#
180f72b68a1SNavdeep Parhar# NPORTS = 4			# ports
181f72b68a1SNavdeep Parhar# NCPUS = 8			# CPUs we want to support scalably
182f72b68a1SNavdeep Parhar# NFUNCS = 3			# functions per port (NIC, FCoE, iSCSI)
183f72b68a1SNavdeep Parhar
184f72b68a1SNavdeep Parhar# Breakdown of Virtual Interface/Queue/Interrupt resources for the "Unified
185f72b68a1SNavdeep Parhar# PF" which many OS Drivers will use to manage most or all functions.
186f72b68a1SNavdeep Parhar#
187f72b68a1SNavdeep Parhar# Each Ingress Queue can use one MSI-X interrupt but some Ingress Queues can
188f72b68a1SNavdeep Parhar# use Forwarded Interrupt Ingress Queues.  For these latter, an Ingress Queue
189f72b68a1SNavdeep Parhar# would be created and the Queue ID of a Forwarded Interrupt Ingress Queue
190f72b68a1SNavdeep Parhar# will be specified as the "Ingress Queue Asynchronous Destination Index."
191f72b68a1SNavdeep Parhar# Thus, the number of MSI-X Vectors assigned to the Unified PF will be less
192f72b68a1SNavdeep Parhar# than or equal to the number of Ingress Queues ...
193f72b68a1SNavdeep Parhar#
194f72b68a1SNavdeep Parhar# NVI_NIC = 4			# NIC access to NPORTS
195f72b68a1SNavdeep Parhar# NFLIQ_NIC = 32		# NIC Ingress Queues with Free Lists
196f72b68a1SNavdeep Parhar# NETHCTRL_NIC = 32		# NIC Ethernet Control/TX Queues
197f72b68a1SNavdeep Parhar# NEQ_NIC = 64			# NIC Egress Queues (FL, ETHCTRL/TX)
198f72b68a1SNavdeep Parhar# NMPSTCAM_NIC = 16		# NIC MPS TCAM Entries (NPORTS*4)
199f72b68a1SNavdeep Parhar# NMSIX_NIC = 32		# NIC MSI-X Interrupt Vectors (FLIQ)
200f72b68a1SNavdeep Parhar#
201f72b68a1SNavdeep Parhar# NVI_OFLD = 0			# Offload uses NIC function to access ports
202f72b68a1SNavdeep Parhar# NFLIQ_OFLD = 16		# Offload Ingress Queues with Free Lists
203f72b68a1SNavdeep Parhar# NETHCTRL_OFLD = 0		# Offload Ethernet Control/TX Queues
204f72b68a1SNavdeep Parhar# NEQ_OFLD = 16			# Offload Egress Queues (FL)
205f72b68a1SNavdeep Parhar# NMPSTCAM_OFLD = 0		# Offload MPS TCAM Entries (uses NIC's)
206f72b68a1SNavdeep Parhar# NMSIX_OFLD = 16		# Offload MSI-X Interrupt Vectors (FLIQ)
207f72b68a1SNavdeep Parhar#
208f72b68a1SNavdeep Parhar# NVI_RDMA = 0			# RDMA uses NIC function to access ports
209f72b68a1SNavdeep Parhar# NFLIQ_RDMA = 4		# RDMA Ingress Queues with Free Lists
210f72b68a1SNavdeep Parhar# NETHCTRL_RDMA = 0		# RDMA Ethernet Control/TX Queues
211f72b68a1SNavdeep Parhar# NEQ_RDMA = 4			# RDMA Egress Queues (FL)
212f72b68a1SNavdeep Parhar# NMPSTCAM_RDMA = 0		# RDMA MPS TCAM Entries (uses NIC's)
213f72b68a1SNavdeep Parhar# NMSIX_RDMA = 4		# RDMA MSI-X Interrupt Vectors (FLIQ)
214f72b68a1SNavdeep Parhar#
215f72b68a1SNavdeep Parhar# NEQ_WD = 128			# Wire Direct TX Queues and FLs
216f72b68a1SNavdeep Parhar# NETHCTRL_WD = 64		# Wire Direct TX Queues
217f72b68a1SNavdeep Parhar# NFLIQ_WD = 64	`		# Wire Direct Ingress Queues with Free Lists
218f72b68a1SNavdeep Parhar#
219f72b68a1SNavdeep Parhar# NVI_ISCSI = 4			# ISCSI access to NPORTS
220f72b68a1SNavdeep Parhar# NFLIQ_ISCSI = 4		# ISCSI Ingress Queues with Free Lists
221f72b68a1SNavdeep Parhar# NETHCTRL_ISCSI = 0		# ISCSI Ethernet Control/TX Queues
222f72b68a1SNavdeep Parhar# NEQ_ISCSI = 4			# ISCSI Egress Queues (FL)
223f72b68a1SNavdeep Parhar# NMPSTCAM_ISCSI = 4		# ISCSI MPS TCAM Entries (NPORTS)
224f72b68a1SNavdeep Parhar# NMSIX_ISCSI = 4		# ISCSI MSI-X Interrupt Vectors (FLIQ)
225f72b68a1SNavdeep Parhar#
226f72b68a1SNavdeep Parhar# NVI_FCOE = 4			# FCOE access to NPORTS
227f72b68a1SNavdeep Parhar# NFLIQ_FCOE = 34		# FCOE Ingress Queues with Free Lists
228f72b68a1SNavdeep Parhar# NETHCTRL_FCOE = 32		# FCOE Ethernet Control/TX Queues
229f72b68a1SNavdeep Parhar# NEQ_FCOE = 66			# FCOE Egress Queues (FL)
230f72b68a1SNavdeep Parhar# NMPSTCAM_FCOE = 32 		# FCOE MPS TCAM Entries (NPORTS)
231f72b68a1SNavdeep Parhar# NMSIX_FCOE = 34		# FCOE MSI-X Interrupt Vectors (FLIQ)
232f72b68a1SNavdeep Parhar
233f72b68a1SNavdeep Parhar# Two extra Ingress Queues per function for Firmware Events and Forwarded
234f72b68a1SNavdeep Parhar# Interrupts, and two extra interrupts per function for Firmware Events (or a
235f72b68a1SNavdeep Parhar# Forwarded Interrupt Queue) and General Interrupts per function.
236f72b68a1SNavdeep Parhar#
237f72b68a1SNavdeep Parhar# NFLIQ_EXTRA = 6		# "extra" Ingress Queues 2*NFUNCS (Firmware and
238f72b68a1SNavdeep Parhar# 				#   Forwarded Interrupts
239f72b68a1SNavdeep Parhar# NMSIX_EXTRA = 6		# extra interrupts 2*NFUNCS (Firmware and
240f72b68a1SNavdeep Parhar# 				#   General Interrupts
241f72b68a1SNavdeep Parhar
242f72b68a1SNavdeep Parhar# Microsoft HyperV resources.  The HyperV Virtual Ingress Queues will have
243f72b68a1SNavdeep Parhar# their interrupts forwarded to another set of Forwarded Interrupt Queues.
244f72b68a1SNavdeep Parhar#
245f72b68a1SNavdeep Parhar# NVI_HYPERV = 16		# VMs we want to support
246f72b68a1SNavdeep Parhar# NVIIQ_HYPERV = 2		# Virtual Ingress Queues with Free Lists per VM
247f72b68a1SNavdeep Parhar# NFLIQ_HYPERV = 40		# VIQs + NCPUS Forwarded Interrupt Queues
248f72b68a1SNavdeep Parhar# NEQ_HYPERV = 32		# VIQs Free Lists
249f72b68a1SNavdeep Parhar# NMPSTCAM_HYPERV = 16		# MPS TCAM Entries (NVI_HYPERV)
250f72b68a1SNavdeep Parhar# NMSIX_HYPERV = 8		# NCPUS Forwarded Interrupt Queues
251f72b68a1SNavdeep Parhar
252f72b68a1SNavdeep Parhar# Adding all of the above Unified PF resource needs together: (NIC + OFLD +
253f72b68a1SNavdeep Parhar# RDMA + ISCSI + FCOE + EXTRA + HYPERV)
254f72b68a1SNavdeep Parhar#
255f72b68a1SNavdeep Parhar# NVI_UNIFIED = 28
256f72b68a1SNavdeep Parhar# NFLIQ_UNIFIED = 106
257f72b68a1SNavdeep Parhar# NETHCTRL_UNIFIED = 32
258f72b68a1SNavdeep Parhar# NEQ_UNIFIED = 124
259f72b68a1SNavdeep Parhar# NMPSTCAM_UNIFIED = 40
260f72b68a1SNavdeep Parhar#
261f72b68a1SNavdeep Parhar# The sum of all the MSI-X resources above is 74 MSI-X Vectors but we'll round
262f72b68a1SNavdeep Parhar# that up to 128 to make sure the Unified PF doesn't run out of resources.
263f72b68a1SNavdeep Parhar#
264f72b68a1SNavdeep Parhar# NMSIX_UNIFIED = 128
265f72b68a1SNavdeep Parhar#
266f72b68a1SNavdeep Parhar# The Storage PFs could need up to NPORTS*NCPUS + NMSIX_EXTRA MSI-X Vectors
267f72b68a1SNavdeep Parhar# which is 34 but they're probably safe with 32.
268f72b68a1SNavdeep Parhar#
269f72b68a1SNavdeep Parhar# NMSIX_STORAGE = 32
270f72b68a1SNavdeep Parhar
271f72b68a1SNavdeep Parhar# Note: The UnifiedPF is PF4 which doesn't have any Virtual Functions
272f72b68a1SNavdeep Parhar# associated with it.  Thus, the MSI-X Vector allocations we give to the
273f72b68a1SNavdeep Parhar# UnifiedPF aren't inherited by any Virtual Functions.  As a result we can
274f72b68a1SNavdeep Parhar# provision many more Virtual Functions than we can if the UnifiedPF were
275f72b68a1SNavdeep Parhar# one of PF0-3.
276f72b68a1SNavdeep Parhar#
277f72b68a1SNavdeep Parhar
278f72b68a1SNavdeep Parhar# All of the below PCI-E parameters are actually stored in various *_init.txt
279f72b68a1SNavdeep Parhar# files.  We include them below essentially as comments.
280f72b68a1SNavdeep Parhar#
281f72b68a1SNavdeep Parhar# For PF0-3 we assign 8 vectors each for NIC Ingress Queues of the associated
282f72b68a1SNavdeep Parhar# ports 0-3.
283f72b68a1SNavdeep Parhar#
284f72b68a1SNavdeep Parhar# For PF4, the Unified PF, we give it an MSI-X Table Size as outlined above.
285f72b68a1SNavdeep Parhar#
286f72b68a1SNavdeep Parhar# For PF5-6 we assign enough MSI-X Vectors to support FCoE and iSCSI
287f72b68a1SNavdeep Parhar# storage applications across all four possible ports.
288f72b68a1SNavdeep Parhar#
289f72b68a1SNavdeep Parhar# Additionally, since the UnifiedPF isn't one of the per-port Physical
290f72b68a1SNavdeep Parhar# Functions, we give the UnifiedPF and the PF0-3 Physical Functions
291f72b68a1SNavdeep Parhar# different PCI Device IDs which will allow Unified and Per-Port Drivers
292f72b68a1SNavdeep Parhar# to directly select the type of Physical Function to which they wish to be
293f72b68a1SNavdeep Parhar# attached.
294f72b68a1SNavdeep Parhar#
295612226d7SPedro F. Giffuni# Note that the actual values used for the PCI-E Intelectual Property will be
296f72b68a1SNavdeep Parhar# 1 less than those below since that's the way it "counts" things.  For
297f72b68a1SNavdeep Parhar# readability, we use the number we actually mean ...
298f72b68a1SNavdeep Parhar#
299f72b68a1SNavdeep Parhar# PF0_INT = 8			# NCPUS
300f72b68a1SNavdeep Parhar# PF1_INT = 8			# NCPUS
301f72b68a1SNavdeep Parhar# PF2_INT = 8			# NCPUS
302f72b68a1SNavdeep Parhar# PF3_INT = 8			# NCPUS
303f72b68a1SNavdeep Parhar# PF0_3_INT = 32		# PF0_INT + PF1_INT + PF2_INT + PF3_INT
304f72b68a1SNavdeep Parhar#
305f72b68a1SNavdeep Parhar# PF4_INT = 128			# NMSIX_UNIFIED
306f72b68a1SNavdeep Parhar# PF5_INT = 32			# NMSIX_STORAGE
307f72b68a1SNavdeep Parhar# PF6_INT = 32			# NMSIX_STORAGE
308f72b68a1SNavdeep Parhar# PF7_INT = 0			# Nothing Assigned
309f72b68a1SNavdeep Parhar# PF4_7_INT = 192		# PF4_INT + PF5_INT + PF6_INT + PF7_INT
310f72b68a1SNavdeep Parhar#
311f72b68a1SNavdeep Parhar# PF0_7_INT = 224		# PF0_3_INT + PF4_7_INT
312f72b68a1SNavdeep Parhar#
313f72b68a1SNavdeep Parhar# With the above we can get 17 VFs/PF0-3 (limited by 336 MPS TCAM entries)
314f72b68a1SNavdeep Parhar# but we'll lower that to 16 to make our total 64 and a nice power of 2 ...
315f72b68a1SNavdeep Parhar#
316f72b68a1SNavdeep Parhar# NVF = 16
317f72b68a1SNavdeep Parhar
318f72b68a1SNavdeep Parhar# For those OSes which manage different ports on different PFs, we need
319f72b68a1SNavdeep Parhar# only enough resources to support a single port's NIC application functions
320f72b68a1SNavdeep Parhar# on PF0-3.  The below assumes that we're only doing NIC with NCPUS "Queue
321f72b68a1SNavdeep Parhar# Sets" for ports 0-3.  The FCoE and iSCSI functions for such OSes will be
322f72b68a1SNavdeep Parhar# managed on the "storage PFs" (see below).
323f72b68a1SNavdeep Parhar#
324f72b68a1SNavdeep Parhar
325f72b68a1SNavdeep Parhar# Some OS Drivers manage all application functions for all ports via PF4.
326f72b68a1SNavdeep Parhar# Thus we need to provide a large number of resources here.  For Egress
327f72b68a1SNavdeep Parhar# Queues we need to account for both TX Queues as well as Free List Queues
328f72b68a1SNavdeep Parhar# (because the host is responsible for producing Free List Buffers for the
329f72b68a1SNavdeep Parhar# hardware to consume).
330f72b68a1SNavdeep Parhar#
331f72b68a1SNavdeep Parhar[function "0"]
332f72b68a1SNavdeep Parhar	wx_caps = all		# write/execute permissions for all commands
333f72b68a1SNavdeep Parhar	r_caps = all		# read permissions for all commands
334f72b68a1SNavdeep Parhar	nvi = 28		# NVI_UNIFIED
335f72b68a1SNavdeep Parhar	niqflint = 170		# NFLIQ_UNIFIED + NLFIQ_WD
336f72b68a1SNavdeep Parhar	nethctrl = 96 		# NETHCTRL_UNIFIED + NETHCTRL_WD
337f72b68a1SNavdeep Parhar	neq = 252		# NEQ_UNIFIED + NEQ_WD
338f72b68a1SNavdeep Parhar	nexactf = 40		# NMPSTCAM_UNIFIED
339f72b68a1SNavdeep Parhar	cmask = all		# access to all channels
340f72b68a1SNavdeep Parhar	pmask = all		# access to all four ports ...
341f72b68a1SNavdeep Parhar	nroute = 32		# number of routing region entries
342f72b68a1SNavdeep Parhar	nclip = 32		# number of clip region entries
343f72b68a1SNavdeep Parhar	nfilter = 48		# number of filter region entries
344f72b68a1SNavdeep Parhar	nserver = 32		# number of server region entries
345f72b68a1SNavdeep Parhar	nhash = 2048		# number of hash region entries
346f72b68a1SNavdeep Parhar	protocol = nic_vm, ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu
347f72b68a1SNavdeep Parhar	tp_l2t = 3072
348f72b68a1SNavdeep Parhar	tp_ddp = 2
349f72b68a1SNavdeep Parhar	tp_ddp_iscsi = 2
350f72b68a1SNavdeep Parhar	tp_stag = 2
351f72b68a1SNavdeep Parhar	tp_pbl = 5
352f72b68a1SNavdeep Parhar	tp_rq = 7
353f72b68a1SNavdeep Parhar
354f72b68a1SNavdeep Parhar# We have FCoE and iSCSI storage functions on PF5 and PF6 each of which may
355f72b68a1SNavdeep Parhar# need to have Virtual Interfaces on each of the four ports with up to NCPUS
356f72b68a1SNavdeep Parhar# "Queue Sets" each.
357f72b68a1SNavdeep Parhar#
358f72b68a1SNavdeep Parhar[function "1"]
359f72b68a1SNavdeep Parhar	wx_caps = all		# write/execute permissions for all commands
360f72b68a1SNavdeep Parhar	r_caps = all		# read permissions for all commands
361f72b68a1SNavdeep Parhar	nvi = 4			# NPORTS
362f72b68a1SNavdeep Parhar	niqflint = 34		# NPORTS*NCPUS + NMSIX_EXTRA
363f72b68a1SNavdeep Parhar	nethctrl = 32		# NPORTS*NCPUS
364f72b68a1SNavdeep Parhar	neq = 66		# NPORTS*NCPUS * 2 (FL, ETHCTRL/TX) + 2 (EXTRA)
365f72b68a1SNavdeep Parhar	nexactf = 32		# NPORTS + adding 28 exact entries for FCoE
366f72b68a1SNavdeep Parhar				# which is OK since < MIN(SUM PF0..3, PF4)
367f72b68a1SNavdeep Parhar				# and we never load PF0..3 and PF4 concurrently
368f72b68a1SNavdeep Parhar	cmask = all		# access to all channels
369f72b68a1SNavdeep Parhar	pmask = all		# access to all four ports ...
370f72b68a1SNavdeep Parhar	nhash = 2048
371f72b68a1SNavdeep Parhar	protocol = fcoe_initiator
372f72b68a1SNavdeep Parhar	tp_ddp = 2
373f72b68a1SNavdeep Parhar	fcoe_nfcf = 16
374f72b68a1SNavdeep Parhar	fcoe_nvnp = 32
375f72b68a1SNavdeep Parhar	fcoe_nssn = 1024
376f72b68a1SNavdeep Parhar
377f72b68a1SNavdeep Parhar# The following function, 1023, is not an actual PCIE function but is used to
378f72b68a1SNavdeep Parhar# configure and reserve firmware internal resources that come from the global
379f72b68a1SNavdeep Parhar# resource pool.
380f72b68a1SNavdeep Parhar#
381f72b68a1SNavdeep Parhar[function "1023"]
382f72b68a1SNavdeep Parhar	wx_caps = all		# write/execute permissions for all commands
383f72b68a1SNavdeep Parhar	r_caps = all		# read permissions for all commands
384f72b68a1SNavdeep Parhar	nvi = 4			# NVI_UNIFIED
385f72b68a1SNavdeep Parhar	cmask = all		# access to all channels
386f72b68a1SNavdeep Parhar	pmask = all		# access to all four ports ...
387f72b68a1SNavdeep Parhar	nexactf = 8		# NPORTS + DCBX +
388f72b68a1SNavdeep Parhar	nfilter = 16		# number of filter region entries
389f72b68a1SNavdeep Parhar
390f72b68a1SNavdeep Parhar# For Virtual functions, we only allow NIC functionality and we only allow
391f72b68a1SNavdeep Parhar# access to one port (1 << PF).  Note that because of limitations in the
392f72b68a1SNavdeep Parhar# Scatter Gather Engine (SGE) hardware which checks writes to VF KDOORBELL
393f72b68a1SNavdeep Parhar# and GTS registers, the number of Ingress and Egress Queues must be a power
394f72b68a1SNavdeep Parhar# of 2.
395f72b68a1SNavdeep Parhar#
396f72b68a1SNavdeep Parhar[function "0/*"]		# NVF
397f72b68a1SNavdeep Parhar	wx_caps = 0x82		# DMAQ | VF
398f72b68a1SNavdeep Parhar	r_caps = 0x86		# DMAQ | VF | PORT
399f72b68a1SNavdeep Parhar	nvi = 1			# 1 port
400f72b68a1SNavdeep Parhar	niqflint = 4		# 2 "Queue Sets" + NXIQ
401f72b68a1SNavdeep Parhar	nethctrl = 2		# 2 "Queue Sets"
402f72b68a1SNavdeep Parhar	neq = 4			# 2 "Queue Sets" * 2
403f72b68a1SNavdeep Parhar	nexactf = 4
404f72b68a1SNavdeep Parhar	cmask = all		# access to all channels
405f72b68a1SNavdeep Parhar	pmask = 0x1		# access to only one port ...
406f72b68a1SNavdeep Parhar
407f72b68a1SNavdeep Parhar[function "1/*"]		# NVF
408f72b68a1SNavdeep Parhar	wx_caps = 0x82		# DMAQ | VF
409f72b68a1SNavdeep Parhar	r_caps = 0x86		# DMAQ | VF | PORT
410f72b68a1SNavdeep Parhar	nvi = 1			# 1 port
411f72b68a1SNavdeep Parhar	niqflint = 4		# 2 "Queue Sets" + NXIQ
412f72b68a1SNavdeep Parhar	nethctrl = 2		# 2 "Queue Sets"
413f72b68a1SNavdeep Parhar	neq = 4			# 2 "Queue Sets" * 2
414f72b68a1SNavdeep Parhar	nexactf = 4
415f72b68a1SNavdeep Parhar	cmask = all		# access to all channels
416f72b68a1SNavdeep Parhar	pmask = 0x2		# access to only one port ...
417f72b68a1SNavdeep Parhar
418f72b68a1SNavdeep Parhar# MPS features a 196608 bytes ingress buffer that is used for ingress buffering
419f72b68a1SNavdeep Parhar# for packets from the wire as well as the loopback path of the L2 switch. The
420f72b68a1SNavdeep Parhar# folling params control how the buffer memory is distributed and the L2 flow
421f72b68a1SNavdeep Parhar# control settings:
422f72b68a1SNavdeep Parhar#
423f72b68a1SNavdeep Parhar# bg_mem:	%-age of mem to use for port/buffer group
424f72b68a1SNavdeep Parhar# lpbk_mem:	%-age of port/bg mem to use for loopback
425f72b68a1SNavdeep Parhar# hwm:		high watermark; bytes available when starting to send pause
426f72b68a1SNavdeep Parhar#		frames (in units of 0.1 MTU)
427f72b68a1SNavdeep Parhar# lwm:		low watermark; bytes remaining when sending 'unpause' frame
428f72b68a1SNavdeep Parhar#		(in inuits of 0.1 MTU)
429f72b68a1SNavdeep Parhar# dwm:		minimum delta between high and low watermark (in units of 100
430f72b68a1SNavdeep Parhar#		Bytes)
431f72b68a1SNavdeep Parhar#
432f72b68a1SNavdeep Parhar[port "0"]
433f72b68a1SNavdeep Parhar	dcb = ppp, dcbx		# configure for DCB PPP and enable DCBX offload
434f72b68a1SNavdeep Parhar	bg_mem = 25
435f72b68a1SNavdeep Parhar	lpbk_mem = 25
436f72b68a1SNavdeep Parhar	hwm = 30
437f72b68a1SNavdeep Parhar	lwm = 15
438f72b68a1SNavdeep Parhar	dwm = 30
439f72b68a1SNavdeep Parhar
440f72b68a1SNavdeep Parhar[port "1"]
441f72b68a1SNavdeep Parhar	dcb = ppp, dcbx
442f72b68a1SNavdeep Parhar	bg_mem = 25
443f72b68a1SNavdeep Parhar	lpbk_mem = 25
444f72b68a1SNavdeep Parhar	hwm = 30
445f72b68a1SNavdeep Parhar	lwm = 15
446f72b68a1SNavdeep Parhar	dwm = 30
447f72b68a1SNavdeep Parhar
448f72b68a1SNavdeep Parhar[port "2"]
449f72b68a1SNavdeep Parhar	dcb = ppp, dcbx
450f72b68a1SNavdeep Parhar	bg_mem = 25
451f72b68a1SNavdeep Parhar	lpbk_mem = 25
452f72b68a1SNavdeep Parhar	hwm = 30
453f72b68a1SNavdeep Parhar	lwm = 15
454f72b68a1SNavdeep Parhar	dwm = 30
455f72b68a1SNavdeep Parhar
456f72b68a1SNavdeep Parhar[port "3"]
457f72b68a1SNavdeep Parhar	dcb = ppp, dcbx
458f72b68a1SNavdeep Parhar	bg_mem = 25
459f72b68a1SNavdeep Parhar	lpbk_mem = 25
460f72b68a1SNavdeep Parhar	hwm = 30
461f72b68a1SNavdeep Parhar	lwm = 15
462f72b68a1SNavdeep Parhar	dwm = 30
463f72b68a1SNavdeep Parhar
464f72b68a1SNavdeep Parhar[fini]
465f72b68a1SNavdeep Parhar	version = 0x1425000d
46662fc63abSNavdeep Parhar	checksum = 0x22f1530b
467f72b68a1SNavdeep Parhar
468f72b68a1SNavdeep Parhar# Total resources used by above allocations:
469f72b68a1SNavdeep Parhar#   Virtual Interfaces: 104
470f72b68a1SNavdeep Parhar#   Ingress Queues/w Free Lists and Interrupts: 526
471f72b68a1SNavdeep Parhar#   Egress Queues: 702
472f72b68a1SNavdeep Parhar#   MPS TCAM Entries: 336
473f72b68a1SNavdeep Parhar#   MSI-X Vectors: 736
474f72b68a1SNavdeep Parhar#   Virtual Functions: 64
475f72b68a1SNavdeep Parhar#
476f72b68a1SNavdeep Parhar#
477