xref: /freebsd/sys/dev/bnxt/bnxt_en/hsi_struct_def.h (revision 3d8bbe00)
1 /*-
2  *   BSD LICENSE
3  *
4  *   Copyright (c) 2024 Broadcom, All Rights Reserved.
5  *   The term Broadcom refers to Broadcom Limited and/or its subsidiaries
6  *
7  *   Redistribution and use in source and binary forms, with or without
8  *   modification, are permitted provided that the following conditions
9  *   are met:
10  *     * Redistributions of source code must retain the above copyright
11  *       notice, this list of conditions and the following disclaimer.
12  *     * Redistributions in binary form must reproduce the above copyright
13  *       notice, this list of conditions and the following disclaimer in
14  *       the documentation and/or other materials provided with the
15  *       distribution.
16  *
17  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #include <sys/cdefs.h>
31 __FBSDID("$FreeBSD$");
32 
33 /*
34  * Copyright(c) 2001-2024, Broadcom. All rights reserved. The
35  * term Broadcom refers to Broadcom Inc. and/or its subsidiaries.
36  * Proprietary and Confidential Information.
37  *
38  * This source file is the property of Broadcom Corporation, and
39  * may not be copied or distributed in any isomorphic form without
40  * the prior written consent of Broadcom Corporation.
41  *
42  * DO NOT MODIFY!!! This file is automatically generated.
43  */
44 
45 #ifndef _HSI_STRUCT_DEF_H_
46 #define _HSI_STRUCT_DEF_H_
47 
48 #if defined(HAVE_STDINT_H)
49 #include <stdint.h>
50 #endif
51 
52 /* This is the HWRM command header. */
53 /* hwrm_cmd_hdr (size:128b/16B) */
54 
55 typedef struct hwrm_cmd_hdr {
56 	/* The HWRM command request type. */
57 	uint16_t	req_type;
58 	/*
59 	 * The completion ring to send the completion event on. This should
60 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61 	 */
62 	uint16_t	cmpl_ring;
63 	/*
64 	 * The sequence ID is used by the driver for tracking multiple
65 	 * commands. This ID is treated as opaque data by the firmware and
66 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67 	 */
68 	uint16_t	seq_id;
69 	/*
70 	 * The target ID of the command:
71 	 * * 0x0-0xFFF8 - The function ID
72 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
73 	 * * 0xFFFD - Reserved for user-space HWRM interface
74 	 * * 0xFFFF - HWRM
75 	 */
76 	uint16_t	target_id;
77 	/*
78 	 * A physical address pointer pointing to a host buffer that the
79 	 * command's response data will be written. This can be either a host
80 	 * physical address (HPA) or a guest physical address (GPA) and must
81 	 * point to a physically contiguous block of memory.
82 	 */
83 	uint64_t        resp_addr;
84 } hwrm_cmd_hdr_t, *phwrm_cmd_hdr_t;
85 
86 /* This is the HWRM response header. */
87 /* hwrm_resp_hdr (size:64b/8B) */
88 
89 typedef struct hwrm_resp_hdr {
90 	/* The specific error status for the command. */
91 	uint16_t	error_code;
92 	/* The HWRM command request type. */
93 	uint16_t	req_type;
94 	/* The sequence ID from the original command. */
95 	uint16_t	seq_id;
96 	/* The length of the response data in number of bytes. */
97 	uint16_t	resp_len;
98 } hwrm_resp_hdr_t, *phwrm_resp_hdr_t;
99 
100 /*
101  * TLV encapsulated message. Use the TLV type field of the
102  * TLV to determine the type of message encapsulated.
103  */
104 #define CMD_DISCR_TLV_ENCAP UINT32_C(0x8000)
105 #define CMD_DISCR_LAST	CMD_DISCR_TLV_ENCAP
106 
107 
108 /* HWRM request message */
109 #define TLV_TYPE_HWRM_REQUEST			UINT32_C(0x1)
110 /* HWRM response message */
111 #define TLV_TYPE_HWRM_RESPONSE		UINT32_C(0x2)
112 /* RoCE slow path command */
113 #define TLV_TYPE_ROCE_SP_COMMAND		UINT32_C(0x3)
114 /* RoCE slow path command to query CC Gen1 support. */
115 #define TLV_TYPE_QUERY_ROCE_CC_GEN1		UINT32_C(0x4)
116 /* RoCE slow path command to modify CC Gen1 support. */
117 #define TLV_TYPE_MODIFY_ROCE_CC_GEN1		UINT32_C(0x5)
118 /* RoCE slow path command to query CC Gen2 support. */
119 #define TLV_TYPE_QUERY_ROCE_CC_GEN2		UINT32_C(0x6)
120 /* RoCE slow path command to modify CC Gen2 support. */
121 #define TLV_TYPE_MODIFY_ROCE_CC_GEN2		UINT32_C(0x7)
122 /* Engine CKV - The Alias key EC curve and ECC public key information. */
123 #define TLV_TYPE_ENGINE_CKV_ALIAS_ECC_PUBLIC_KEY UINT32_C(0x8001)
124 /* Engine CKV - Initialization vector. */
125 #define TLV_TYPE_ENGINE_CKV_IV		UINT32_C(0x8003)
126 /* Engine CKV - Authentication tag. */
127 #define TLV_TYPE_ENGINE_CKV_AUTH_TAG		UINT32_C(0x8004)
128 /* Engine CKV - The encrypted data. */
129 #define TLV_TYPE_ENGINE_CKV_CIPHERTEXT	UINT32_C(0x8005)
130 /* Engine CKV - Supported host_algorithms. */
131 #define TLV_TYPE_ENGINE_CKV_HOST_ALGORITHMS	UINT32_C(0x8006)
132 /* Engine CKV - The Host EC curve name and ECC public key information. */
133 #define TLV_TYPE_ENGINE_CKV_HOST_ECC_PUBLIC_KEY  UINT32_C(0x8007)
134 /* Engine CKV - The ECDSA signature. */
135 #define TLV_TYPE_ENGINE_CKV_ECDSA_SIGNATURE	UINT32_C(0x8008)
136 /* Engine CKV - The firmware EC curve name and ECC public key information. */
137 #define TLV_TYPE_ENGINE_CKV_FW_ECC_PUBLIC_KEY	UINT32_C(0x8009)
138 /* Engine CKV - Supported firmware algorithms. */
139 #define TLV_TYPE_ENGINE_CKV_FW_ALGORITHMS	UINT32_C(0x800a)
140 #define TLV_TYPE_LAST			TLV_TYPE_ENGINE_CKV_FW_ALGORITHMS
141 
142 
143 /* tlv (size:64b/8B) */
144 
145 typedef struct tlv {
146 	/*
147 	 * The command discriminator is used to differentiate between various
148 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
149 	 * command messages as well as newer TLV encapsulated HWRM commands.
150 	 *
151 	 * For TLV encapsulated messages this field must be 0x8000.
152 	 */
153 	uint16_t	cmd_discr;
154 	uint8_t	reserved_8b;
155 	uint8_t	flags;
156 	/*
157 	 * Indicates the presence of additional TLV encapsulated data
158 	 * follows this TLV.
159 	 */
160 	#define TLV_FLAGS_MORE	UINT32_C(0x1)
161 	/* Last TLV in a sequence of TLVs. */
162 		#define TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
163 	/* More TLVs follow this TLV. */
164 		#define TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
165 	/*
166 	 * When an HWRM receiver detects a TLV type that it does not
167 	 * support with the TLV required flag set, the receiver must
168 	 * reject the HWRM message with an error code indicating an
169 	 * unsupported TLV type.
170 	 */
171 	#define TLV_FLAGS_REQUIRED	UINT32_C(0x2)
172 	/* No */
173 		#define TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
174 	/* Yes */
175 		#define TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
176 		#define TLV_FLAGS_REQUIRED_LAST TLV_FLAGS_REQUIRED_YES
177 	/*
178 	 * This field defines the TLV type value which is divided into
179 	 * two ranges to differentiate between global and local TLV types.
180 	 * Global TLV types must be unique across all defined TLV types.
181 	 * Local TLV types are valid only for extensions to a given
182 	 * HWRM message and may be repeated across different HWRM message
183 	 * types. There is a direct correlation of each HWRM message type
184 	 * to a single global TLV type value.
185 	 *
186 	 * Global TLV range: `0 - (63k-1)`
187 	 *
188 	 * Local TLV range: `63k - (64k-1)`
189 	 */
190 	uint16_t	tlv_type;
191 	/*
192 	 * Length of the message data encapsulated by this TLV in bytes.
193 	 * This length does not include the size of the TLV header itself
194 	 * and it must be an integer multiple of 8B.
195 	 */
196 	uint16_t	length;
197 } tlv_t, *ptlv_t;
198 
199 /* Input */
200 /* input (size:128b/16B) */
201 
202 typedef struct input {
203 	/*
204 	 * This value indicates what type of request this is. The format
205 	 * for the rest of the command is determined by this field.
206 	 */
207 	uint16_t	req_type;
208 	/*
209 	 * This value indicates the what completion ring the request will
210 	 * be optionally completed on. If the value is -1, then no
211 	 * CR completion will be generated. Any other value must be a
212 	 * valid CR ring_id value for this function.
213 	 */
214 	uint16_t	cmpl_ring;
215 	/* This value indicates the command sequence number. */
216 	uint16_t	seq_id;
217 	/*
218 	 * Target ID of this command.
219 	 *
220 	 * 0x0 - 0xFFF8 - Used for function ids
221 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
222 	 * 0xFFFF - HWRM
223 	 */
224 	uint16_t	target_id;
225 	/*
226 	 * This is the host address where the response will be written
227 	 * when the request is complete. This area must be 16B aligned
228 	 * and must be cleared to zero before the request is made.
229 	 */
230 	uint64_t	resp_addr;
231 } input_t, *pinput_t;
232 
233 /* Output */
234 /* output (size:64b/8B) */
235 
236 typedef struct output {
237 	/*
238 	 * Pass/Fail or error type
239 	 *
240 	 * Note: receiver to verify the in parameters, and fail the call
241 	 * with an error when appropriate
242 	 */
243 	uint16_t	error_code;
244 	/* This field returns the type of original request. */
245 	uint16_t	req_type;
246 	/* This field provides original sequence number of the command. */
247 	uint16_t	seq_id;
248 	/*
249 	 * This field is the length of the response in bytes. The
250 	 * last byte of the response is a valid flag that will read
251 	 * as '1' when the command has been completely written to
252 	 * memory.
253 	 */
254 	uint16_t	resp_len;
255 } output_t, *poutput_t;
256 
257 /* Short Command Structure */
258 /* hwrm_short_input (size:128b/16B) */
259 
260 typedef struct hwrm_short_input {
261 	/*
262 	 * This field indicates the type of request in the request buffer.
263 	 * The format for the rest of the command (request) is determined
264 	 * by this field.
265 	 */
266 	uint16_t	req_type;
267 	/*
268 	 * This field indicates a signature that is used to identify short
269 	 * form of the command listed here. This field shall be set to
270 	 * 17185 (0x4321).
271 	 */
272 	uint16_t	signature;
273 	/* Signature indicating this is a short form of HWRM command */
274 	#define HWRM_SHORT_INPUT_SIGNATURE_SHORT_CMD UINT32_C(0x4321)
275 	#define HWRM_SHORT_INPUT_SIGNATURE_LAST	HWRM_SHORT_INPUT_SIGNATURE_SHORT_CMD
276 	/* The target ID of the command */
277 	uint16_t	target_id;
278 	/* Default target_id (0x0) to maintain compatibility with old driver */
279 	#define HWRM_SHORT_INPUT_TARGET_ID_DEFAULT UINT32_C(0x0)
280 	/* Reserved for user-space HWRM interface */
281 	#define HWRM_SHORT_INPUT_TARGET_ID_TOOLS   UINT32_C(0xfffd)
282 	#define HWRM_SHORT_INPUT_TARGET_ID_LAST   HWRM_SHORT_INPUT_TARGET_ID_TOOLS
283 	/* This value indicates the length of the request. */
284 	uint16_t	size;
285 	/*
286 	 * This is the host address where the request was written.
287 	 * This area must be 16B aligned.
288 	 */
289 	uint64_t	req_addr;
290 } hwrm_short_input_t, *phwrm_short_input_t;
291 
292 #define GET_HWRM_REQ_TYPE(x) \
293 	(((x) < 0x80) ? \
294 	((x) == 0x0 ? "HWRM_VER_GET": \
295 	((x) == 0xb ? "HWRM_FUNC_ECHO_RESPONSE": \
296 	((x) == 0xc ? "HWRM_ERROR_RECOVERY_QCFG": \
297 	((x) == 0xd ? "HWRM_FUNC_DRV_IF_CHANGE": \
298 	((x) == 0xe ? "HWRM_FUNC_BUF_UNRGTR": \
299 	((x) == 0xf ? "HWRM_FUNC_VF_CFG": \
300 	((x) == 0x10 ? "HWRM_RESERVED1": \
301 	((x) == 0x11 ? "HWRM_FUNC_RESET": \
302 	((x) == 0x12 ? "HWRM_FUNC_GETFID": \
303 	((x) == 0x13 ? "HWRM_FUNC_VF_ALLOC": \
304 	((x) == 0x14 ? "HWRM_FUNC_VF_FREE": \
305 	((x) == 0x15 ? "HWRM_FUNC_QCAPS": \
306 	((x) == 0x16 ? "HWRM_FUNC_QCFG": \
307 	((x) == 0x17 ? "HWRM_FUNC_CFG": \
308 	((x) == 0x18 ? "HWRM_FUNC_QSTATS": \
309 	((x) == 0x19 ? "HWRM_FUNC_CLR_STATS": \
310 	((x) == 0x1a ? "HWRM_FUNC_DRV_UNRGTR": \
311 	((x) == 0x1b ? "HWRM_FUNC_VF_RESC_FREE": \
312 	((x) == 0x1c ? "HWRM_FUNC_VF_VNIC_IDS_QUERY": \
313 	((x) == 0x1d ? "HWRM_FUNC_DRV_RGTR": \
314 	((x) == 0x1e ? "HWRM_FUNC_DRV_QVER": \
315 	((x) == 0x1f ? "HWRM_FUNC_BUF_RGTR": \
316 	((x) == 0x20 ? "HWRM_PORT_PHY_CFG": \
317 	((x) == 0x21 ? "HWRM_PORT_MAC_CFG": \
318 	((x) == 0x22 ? "HWRM_PORT_TS_QUERY": \
319 	((x) == 0x23 ? "HWRM_PORT_QSTATS": \
320 	((x) == 0x24 ? "HWRM_PORT_LPBK_QSTATS": \
321 	((x) == 0x25 ? "HWRM_PORT_CLR_STATS": \
322 	((x) == 0x26 ? "HWRM_PORT_LPBK_CLR_STATS": \
323 	((x) == 0x27 ? "HWRM_PORT_PHY_QCFG": \
324 	((x) == 0x28 ? "HWRM_PORT_MAC_QCFG": \
325 	((x) == 0x29 ? "HWRM_PORT_MAC_PTP_QCFG": \
326 	((x) == 0x2a ? "HWRM_PORT_PHY_QCAPS": \
327 	((x) == 0x2b ? "HWRM_PORT_PHY_I2C_WRITE": \
328 	((x) == 0x2c ? "HWRM_PORT_PHY_I2C_READ": \
329 	((x) == 0x2d ? "HWRM_PORT_LED_CFG": \
330 	((x) == 0x2e ? "HWRM_PORT_LED_QCFG": \
331 	((x) == 0x2f ? "HWRM_PORT_LED_QCAPS": \
332 	((x) == 0x30 ? "HWRM_QUEUE_QPORTCFG": \
333 	((x) == 0x31 ? "HWRM_QUEUE_QCFG": \
334 	((x) == 0x32 ? "HWRM_QUEUE_CFG": \
335 	((x) == 0x33 ? "HWRM_FUNC_VLAN_CFG": \
336 	((x) == 0x34 ? "HWRM_FUNC_VLAN_QCFG": \
337 	((x) == 0x35 ? "HWRM_QUEUE_PFCENABLE_QCFG": \
338 	((x) == 0x36 ? "HWRM_QUEUE_PFCENABLE_CFG": \
339 	((x) == 0x37 ? "HWRM_QUEUE_PRI2COS_QCFG": \
340 	((x) == 0x38 ? "HWRM_QUEUE_PRI2COS_CFG": \
341 	((x) == 0x39 ? "HWRM_QUEUE_COS2BW_QCFG": \
342 	((x) == 0x3a ? "HWRM_QUEUE_COS2BW_CFG": \
343 	((x) == 0x3b ? "HWRM_QUEUE_DSCP_QCAPS": \
344 	((x) == 0x3c ? "HWRM_QUEUE_DSCP2PRI_QCFG": \
345 	((x) == 0x3d ? "HWRM_QUEUE_DSCP2PRI_CFG": \
346 	((x) == 0x40 ? "HWRM_VNIC_ALLOC": \
347 	((x) == 0x41 ? "HWRM_VNIC_FREE": \
348 	((x) == 0x42 ? "HWRM_VNIC_CFG": \
349 	((x) == 0x43 ? "HWRM_VNIC_QCFG": \
350 	((x) == 0x44 ? "HWRM_VNIC_TPA_CFG": \
351 	((x) == 0x45 ? "HWRM_VNIC_TPA_QCFG": \
352 	((x) == 0x46 ? "HWRM_VNIC_RSS_CFG": \
353 	((x) == 0x47 ? "HWRM_VNIC_RSS_QCFG": \
354 	((x) == 0x48 ? "HWRM_VNIC_PLCMODES_CFG": \
355 	((x) == 0x49 ? "HWRM_VNIC_PLCMODES_QCFG": \
356 	((x) == 0x4a ? "HWRM_VNIC_QCAPS": \
357 	((x) == 0x4b ? "HWRM_VNIC_UPDATE": \
358 	((x) == 0x50 ? "HWRM_RING_ALLOC": \
359 	((x) == 0x51 ? "HWRM_RING_FREE": \
360 	((x) == 0x52 ? "HWRM_RING_CMPL_RING_QAGGINT_PARAMS": \
361 	((x) == 0x53 ? "HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS": \
362 	((x) == 0x54 ? "HWRM_RING_AGGINT_QCAPS": \
363 	((x) == 0x55 ? "HWRM_RING_SCHQ_ALLOC": \
364 	((x) == 0x56 ? "HWRM_RING_SCHQ_CFG": \
365 	((x) == 0x57 ? "HWRM_RING_SCHQ_FREE": \
366 	((x) == 0x5e ? "HWRM_RING_RESET": \
367 	((x) == 0x60 ? "HWRM_RING_GRP_ALLOC": \
368 	((x) == 0x61 ? "HWRM_RING_GRP_FREE": \
369 	((x) == 0x62 ? "HWRM_RING_CFG": \
370 	((x) == 0x63 ? "HWRM_RING_QCFG": \
371 	((x) == 0x64 ? "HWRM_RESERVED5": \
372 	((x) == 0x65 ? "HWRM_RESERVED6": \
373 	((x) == 0x70 ? "HWRM_VNIC_RSS_COS_LB_CTX_ALLOC": \
374 	((x) == 0x71 ? "HWRM_VNIC_RSS_COS_LB_CTX_FREE": \
375 	"Unknown decode" ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) : \
376 	(((x) < 0x100) ? \
377 	((x) == 0x80 ? "HWRM_QUEUE_MPLS_QCAPS": \
378 	((x) == 0x81 ? "HWRM_QUEUE_MPLSTC2PRI_QCFG": \
379 	((x) == 0x82 ? "HWRM_QUEUE_MPLSTC2PRI_CFG": \
380 	((x) == 0x83 ? "HWRM_QUEUE_VLANPRI_QCAPS": \
381 	((x) == 0x84 ? "HWRM_QUEUE_VLANPRI2PRI_QCFG": \
382 	((x) == 0x85 ? "HWRM_QUEUE_VLANPRI2PRI_CFG": \
383 	((x) == 0x86 ? "HWRM_QUEUE_GLOBAL_CFG": \
384 	((x) == 0x87 ? "HWRM_QUEUE_GLOBAL_QCFG": \
385 	((x) == 0x88 ? "HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG": \
386 	((x) == 0x89 ? "HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG": \
387 	((x) == 0x8a ? "HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG": \
388 	((x) == 0x8b ? "HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG": \
389 	((x) == 0x8c ? "HWRM_QUEUE_QCAPS": \
390 	((x) == 0x8d ? "HWRM_QUEUE_ADPTV_QOS_RX_TUNING_QCFG": \
391 	((x) == 0x8e ? "HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG": \
392 	((x) == 0x8f ? "HWRM_QUEUE_ADPTV_QOS_TX_TUNING_QCFG": \
393 	((x) == 0x90 ? "HWRM_CFA_L2_FILTER_ALLOC": \
394 	((x) == 0x91 ? "HWRM_CFA_L2_FILTER_FREE": \
395 	((x) == 0x92 ? "HWRM_CFA_L2_FILTER_CFG": \
396 	((x) == 0x93 ? "HWRM_CFA_L2_SET_RX_MASK": \
397 	((x) == 0x94 ? "HWRM_CFA_VLAN_ANTISPOOF_CFG": \
398 	((x) == 0x95 ? "HWRM_CFA_TUNNEL_FILTER_ALLOC": \
399 	((x) == 0x96 ? "HWRM_CFA_TUNNEL_FILTER_FREE": \
400 	((x) == 0x97 ? "HWRM_CFA_ENCAP_RECORD_ALLOC": \
401 	((x) == 0x98 ? "HWRM_CFA_ENCAP_RECORD_FREE": \
402 	((x) == 0x99 ? "HWRM_CFA_NTUPLE_FILTER_ALLOC": \
403 	((x) == 0x9a ? "HWRM_CFA_NTUPLE_FILTER_FREE": \
404 	((x) == 0x9b ? "HWRM_CFA_NTUPLE_FILTER_CFG": \
405 	((x) == 0x9c ? "HWRM_CFA_EM_FLOW_ALLOC": \
406 	((x) == 0x9d ? "HWRM_CFA_EM_FLOW_FREE": \
407 	((x) == 0x9e ? "HWRM_CFA_EM_FLOW_CFG": \
408 	((x) == 0xa0 ? "HWRM_TUNNEL_DST_PORT_QUERY": \
409 	((x) == 0xa1 ? "HWRM_TUNNEL_DST_PORT_ALLOC": \
410 	((x) == 0xa2 ? "HWRM_TUNNEL_DST_PORT_FREE": \
411 	((x) == 0xa3 ? "HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG": \
412 	((x) == 0xaf ? "HWRM_STAT_CTX_ENG_QUERY": \
413 	((x) == 0xb0 ? "HWRM_STAT_CTX_ALLOC": \
414 	((x) == 0xb1 ? "HWRM_STAT_CTX_FREE": \
415 	((x) == 0xb2 ? "HWRM_STAT_CTX_QUERY": \
416 	((x) == 0xb3 ? "HWRM_STAT_CTX_CLR_STATS": \
417 	((x) == 0xb4 ? "HWRM_PORT_QSTATS_EXT": \
418 	((x) == 0xb5 ? "HWRM_PORT_PHY_MDIO_WRITE": \
419 	((x) == 0xb6 ? "HWRM_PORT_PHY_MDIO_READ": \
420 	((x) == 0xb7 ? "HWRM_PORT_PHY_MDIO_BUS_ACQUIRE": \
421 	((x) == 0xb8 ? "HWRM_PORT_PHY_MDIO_BUS_RELEASE": \
422 	((x) == 0xb9 ? "HWRM_PORT_QSTATS_EXT_PFC_WD": \
423 	((x) == 0xba ? "HWRM_RESERVED7": \
424 	((x) == 0xbb ? "HWRM_PORT_TX_FIR_CFG": \
425 	((x) == 0xbc ? "HWRM_PORT_TX_FIR_QCFG": \
426 	((x) == 0xbd ? "HWRM_PORT_ECN_QSTATS": \
427 	((x) == 0xbe ? "HWRM_FW_LIVEPATCH_QUERY": \
428 	((x) == 0xbf ? "HWRM_FW_LIVEPATCH": \
429 	((x) == 0xc0 ? "HWRM_FW_RESET": \
430 	((x) == 0xc1 ? "HWRM_FW_QSTATUS": \
431 	((x) == 0xc2 ? "HWRM_FW_HEALTH_CHECK": \
432 	((x) == 0xc3 ? "HWRM_FW_SYNC": \
433 	((x) == 0xc4 ? "HWRM_FW_STATE_QCAPS": \
434 	((x) == 0xc5 ? "HWRM_FW_STATE_QUIESCE": \
435 	((x) == 0xc6 ? "HWRM_FW_STATE_BACKUP": \
436 	((x) == 0xc7 ? "HWRM_FW_STATE_RESTORE": \
437 	((x) == 0xc8 ? "HWRM_FW_SET_TIME": \
438 	((x) == 0xc9 ? "HWRM_FW_GET_TIME": \
439 	((x) == 0xca ? "HWRM_FW_SET_STRUCTURED_DATA": \
440 	((x) == 0xcb ? "HWRM_FW_GET_STRUCTURED_DATA": \
441 	((x) == 0xcc ? "HWRM_FW_IPC_MAILBOX": \
442 	((x) == 0xcd ? "HWRM_FW_ECN_CFG": \
443 	((x) == 0xce ? "HWRM_FW_ECN_QCFG": \
444 	((x) == 0xcf ? "HWRM_FW_SECURE_CFG": \
445 	((x) == 0xd0 ? "HWRM_EXEC_FWD_RESP": \
446 	((x) == 0xd1 ? "HWRM_REJECT_FWD_RESP": \
447 	((x) == 0xd2 ? "HWRM_FWD_RESP": \
448 	((x) == 0xd3 ? "HWRM_FWD_ASYNC_EVENT_CMPL": \
449 	((x) == 0xd4 ? "HWRM_OEM_CMD": \
450 	((x) == 0xd5 ? "HWRM_PORT_PRBS_TEST": \
451 	((x) == 0xd6 ? "HWRM_PORT_SFP_SIDEBAND_CFG": \
452 	((x) == 0xd7 ? "HWRM_PORT_SFP_SIDEBAND_QCFG": \
453 	((x) == 0xd8 ? "HWRM_FW_STATE_UNQUIESCE": \
454 	((x) == 0xd9 ? "HWRM_PORT_DSC_DUMP": \
455 	((x) == 0xda ? "HWRM_PORT_EP_TX_QCFG": \
456 	((x) == 0xdb ? "HWRM_PORT_EP_TX_CFG": \
457 	((x) == 0xdc ? "HWRM_PORT_CFG": \
458 	((x) == 0xdd ? "HWRM_PORT_QCFG": \
459 	((x) == 0xdf ? "HWRM_PORT_MAC_QCAPS": \
460 	((x) == 0xe0 ? "HWRM_TEMP_MONITOR_QUERY": \
461 	((x) == 0xe1 ? "HWRM_REG_POWER_QUERY": \
462 	((x) == 0xe2 ? "HWRM_CORE_FREQUENCY_QUERY": \
463 	((x) == 0xe3 ? "HWRM_REG_POWER_HISTOGRAM": \
464 	((x) == 0xf0 ? "HWRM_WOL_FILTER_ALLOC": \
465 	((x) == 0xf1 ? "HWRM_WOL_FILTER_FREE": \
466 	((x) == 0xf2 ? "HWRM_WOL_FILTER_QCFG": \
467 	((x) == 0xf3 ? "HWRM_WOL_REASON_QCFG": \
468 	((x) == 0xf4 ? "HWRM_CFA_METER_QCAPS": \
469 	((x) == 0xf5 ? "HWRM_CFA_METER_PROFILE_ALLOC": \
470 	((x) == 0xf6 ? "HWRM_CFA_METER_PROFILE_FREE": \
471 	((x) == 0xf7 ? "HWRM_CFA_METER_PROFILE_CFG": \
472 	((x) == 0xf8 ? "HWRM_CFA_METER_INSTANCE_ALLOC": \
473 	((x) == 0xf9 ? "HWRM_CFA_METER_INSTANCE_FREE": \
474 	((x) == 0xfa ? "HWRM_CFA_METER_INSTANCE_CFG": \
475 	((x) == 0xfd ? "HWRM_CFA_VFR_ALLOC": \
476 	((x) == 0xfe ? "HWRM_CFA_VFR_FREE": \
477 	"Unknown decode" )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) : \
478 	(((x) < 0x180) ? \
479 	((x) == 0x100 ? "HWRM_CFA_VF_PAIR_ALLOC": \
480 	((x) == 0x101 ? "HWRM_CFA_VF_PAIR_FREE": \
481 	((x) == 0x102 ? "HWRM_CFA_VF_PAIR_INFO": \
482 	((x) == 0x103 ? "HWRM_CFA_FLOW_ALLOC": \
483 	((x) == 0x104 ? "HWRM_CFA_FLOW_FREE": \
484 	((x) == 0x105 ? "HWRM_CFA_FLOW_FLUSH": \
485 	((x) == 0x106 ? "HWRM_CFA_FLOW_STATS": \
486 	((x) == 0x107 ? "HWRM_CFA_FLOW_INFO": \
487 	((x) == 0x108 ? "HWRM_CFA_DECAP_FILTER_ALLOC": \
488 	((x) == 0x109 ? "HWRM_CFA_DECAP_FILTER_FREE": \
489 	((x) == 0x10a ? "HWRM_CFA_VLAN_ANTISPOOF_QCFG": \
490 	((x) == 0x10b ? "HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC": \
491 	((x) == 0x10c ? "HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE": \
492 	((x) == 0x10d ? "HWRM_CFA_PAIR_ALLOC": \
493 	((x) == 0x10e ? "HWRM_CFA_PAIR_FREE": \
494 	((x) == 0x10f ? "HWRM_CFA_PAIR_INFO": \
495 	((x) == 0x110 ? "HWRM_FW_IPC_MSG": \
496 	((x) == 0x111 ? "HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO": \
497 	((x) == 0x112 ? "HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE": \
498 	((x) == 0x113 ? "HWRM_CFA_FLOW_AGING_TIMER_RESET": \
499 	((x) == 0x114 ? "HWRM_CFA_FLOW_AGING_CFG": \
500 	((x) == 0x115 ? "HWRM_CFA_FLOW_AGING_QCFG": \
501 	((x) == 0x116 ? "HWRM_CFA_FLOW_AGING_QCAPS": \
502 	((x) == 0x117 ? "HWRM_CFA_CTX_MEM_RGTR": \
503 	((x) == 0x118 ? "HWRM_CFA_CTX_MEM_UNRGTR": \
504 	((x) == 0x119 ? "HWRM_CFA_CTX_MEM_QCTX": \
505 	((x) == 0x11a ? "HWRM_CFA_CTX_MEM_QCAPS": \
506 	((x) == 0x11b ? "HWRM_CFA_COUNTER_QCAPS": \
507 	((x) == 0x11c ? "HWRM_CFA_COUNTER_CFG": \
508 	((x) == 0x11d ? "HWRM_CFA_COUNTER_QCFG": \
509 	((x) == 0x11e ? "HWRM_CFA_COUNTER_QSTATS": \
510 	((x) == 0x11f ? "HWRM_CFA_TCP_FLAG_PROCESS_QCFG": \
511 	((x) == 0x120 ? "HWRM_CFA_EEM_QCAPS": \
512 	((x) == 0x121 ? "HWRM_CFA_EEM_CFG": \
513 	((x) == 0x122 ? "HWRM_CFA_EEM_QCFG": \
514 	((x) == 0x123 ? "HWRM_CFA_EEM_OP": \
515 	((x) == 0x124 ? "HWRM_CFA_ADV_FLOW_MGNT_QCAPS": \
516 	((x) == 0x125 ? "HWRM_CFA_TFLIB": \
517 	((x) == 0x126 ? "HWRM_CFA_LAG_GROUP_MEMBER_RGTR": \
518 	((x) == 0x127 ? "HWRM_CFA_LAG_GROUP_MEMBER_UNRGTR": \
519 	((x) == 0x128 ? "HWRM_CFA_TLS_FILTER_ALLOC": \
520 	((x) == 0x129 ? "HWRM_CFA_TLS_FILTER_FREE": \
521 	((x) == 0x12a ? "HWRM_CFA_RELEASE_AFM_FUNC": \
522 	((x) == 0x12e ? "HWRM_ENGINE_CKV_STATUS": \
523 	((x) == 0x12f ? "HWRM_ENGINE_CKV_CKEK_ADD": \
524 	((x) == 0x130 ? "HWRM_ENGINE_CKV_CKEK_DELETE": \
525 	((x) == 0x131 ? "HWRM_ENGINE_CKV_KEY_ADD": \
526 	((x) == 0x132 ? "HWRM_ENGINE_CKV_KEY_DELETE": \
527 	((x) == 0x133 ? "HWRM_ENGINE_CKV_FLUSH": \
528 	((x) == 0x134 ? "HWRM_ENGINE_CKV_RNG_GET": \
529 	((x) == 0x135 ? "HWRM_ENGINE_CKV_KEY_GEN": \
530 	((x) == 0x136 ? "HWRM_ENGINE_CKV_KEY_LABEL_CFG": \
531 	((x) == 0x137 ? "HWRM_ENGINE_CKV_KEY_LABEL_QCFG": \
532 	((x) == 0x13c ? "HWRM_ENGINE_QG_CONFIG_QUERY": \
533 	((x) == 0x13d ? "HWRM_ENGINE_QG_QUERY": \
534 	((x) == 0x13e ? "HWRM_ENGINE_QG_METER_PROFILE_CONFIG_QUERY": \
535 	((x) == 0x13f ? "HWRM_ENGINE_QG_METER_PROFILE_QUERY": \
536 	((x) == 0x140 ? "HWRM_ENGINE_QG_METER_PROFILE_ALLOC": \
537 	((x) == 0x141 ? "HWRM_ENGINE_QG_METER_PROFILE_FREE": \
538 	((x) == 0x142 ? "HWRM_ENGINE_QG_METER_QUERY": \
539 	((x) == 0x143 ? "HWRM_ENGINE_QG_METER_BIND": \
540 	((x) == 0x144 ? "HWRM_ENGINE_QG_METER_UNBIND": \
541 	((x) == 0x145 ? "HWRM_ENGINE_QG_FUNC_BIND": \
542 	((x) == 0x146 ? "HWRM_ENGINE_SG_CONFIG_QUERY": \
543 	((x) == 0x147 ? "HWRM_ENGINE_SG_QUERY": \
544 	((x) == 0x148 ? "HWRM_ENGINE_SG_METER_QUERY": \
545 	((x) == 0x149 ? "HWRM_ENGINE_SG_METER_CONFIG": \
546 	((x) == 0x14a ? "HWRM_ENGINE_SG_QG_BIND": \
547 	((x) == 0x14b ? "HWRM_ENGINE_QG_SG_UNBIND": \
548 	((x) == 0x154 ? "HWRM_ENGINE_CONFIG_QUERY": \
549 	((x) == 0x155 ? "HWRM_ENGINE_STATS_CONFIG": \
550 	((x) == 0x156 ? "HWRM_ENGINE_STATS_CLEAR": \
551 	((x) == 0x157 ? "HWRM_ENGINE_STATS_QUERY": \
552 	((x) == 0x158 ? "HWRM_ENGINE_STATS_QUERY_CONTINUOUS_ERROR": \
553 	((x) == 0x15e ? "HWRM_ENGINE_RQ_ALLOC": \
554 	((x) == 0x15f ? "HWRM_ENGINE_RQ_FREE": \
555 	((x) == 0x160 ? "HWRM_ENGINE_CQ_ALLOC": \
556 	((x) == 0x161 ? "HWRM_ENGINE_CQ_FREE": \
557 	((x) == 0x162 ? "HWRM_ENGINE_NQ_ALLOC": \
558 	((x) == 0x163 ? "HWRM_ENGINE_NQ_FREE": \
559 	((x) == 0x164 ? "HWRM_ENGINE_ON_DIE_RQE_CREDITS": \
560 	((x) == 0x165 ? "HWRM_ENGINE_FUNC_QCFG": \
561 	"Unknown decode" )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) : \
562 	(((x) < 0x200) ? \
563 	((x) == 0x190 ? "HWRM_FUNC_RESOURCE_QCAPS": \
564 	((x) == 0x191 ? "HWRM_FUNC_VF_RESOURCE_CFG": \
565 	((x) == 0x192 ? "HWRM_FUNC_BACKING_STORE_QCAPS": \
566 	((x) == 0x193 ? "HWRM_FUNC_BACKING_STORE_CFG": \
567 	((x) == 0x194 ? "HWRM_FUNC_BACKING_STORE_QCFG": \
568 	((x) == 0x195 ? "HWRM_FUNC_VF_BW_CFG": \
569 	((x) == 0x196 ? "HWRM_FUNC_VF_BW_QCFG": \
570 	((x) == 0x197 ? "HWRM_FUNC_HOST_PF_IDS_QUERY": \
571 	((x) == 0x198 ? "HWRM_FUNC_QSTATS_EXT": \
572 	((x) == 0x199 ? "HWRM_STAT_EXT_CTX_QUERY": \
573 	((x) == 0x19a ? "HWRM_FUNC_SPD_CFG": \
574 	((x) == 0x19b ? "HWRM_FUNC_SPD_QCFG": \
575 	((x) == 0x19c ? "HWRM_FUNC_PTP_PIN_QCFG": \
576 	((x) == 0x19d ? "HWRM_FUNC_PTP_PIN_CFG": \
577 	((x) == 0x19e ? "HWRM_FUNC_PTP_CFG": \
578 	((x) == 0x19f ? "HWRM_FUNC_PTP_TS_QUERY": \
579 	((x) == 0x1a0 ? "HWRM_FUNC_PTP_EXT_CFG": \
580 	((x) == 0x1a1 ? "HWRM_FUNC_PTP_EXT_QCFG": \
581 	((x) == 0x1a2 ? "HWRM_FUNC_KEY_CTX_ALLOC": \
582 	((x) == 0x1a3 ? "HWRM_FUNC_BACKING_STORE_CFG_V2": \
583 	((x) == 0x1a4 ? "HWRM_FUNC_BACKING_STORE_QCFG_V2": \
584 	((x) == 0x1a5 ? "HWRM_FUNC_DBR_PACING_CFG": \
585 	((x) == 0x1a6 ? "HWRM_FUNC_DBR_PACING_QCFG": \
586 	((x) == 0x1a7 ? "HWRM_FUNC_DBR_PACING_BROADCAST_EVENT": \
587 	((x) == 0x1a8 ? "HWRM_FUNC_BACKING_STORE_QCAPS_V2": \
588 	((x) == 0x1a9 ? "HWRM_FUNC_DBR_PACING_NQLIST_QUERY": \
589 	((x) == 0x1aa ? "HWRM_FUNC_DBR_RECOVERY_COMPLETED": \
590 	((x) == 0x1ab ? "HWRM_FUNC_SYNCE_CFG": \
591 	((x) == 0x1ac ? "HWRM_FUNC_SYNCE_QCFG": \
592 	((x) == 0x1ad ? "HWRM_FUNC_KEY_CTX_FREE": \
593 	((x) == 0x1ae ? "HWRM_FUNC_LAG_MODE_CFG": \
594 	((x) == 0x1af ? "HWRM_FUNC_LAG_MODE_QCFG": \
595 	((x) == 0x1b0 ? "HWRM_FUNC_LAG_CREATE": \
596 	((x) == 0x1b1 ? "HWRM_FUNC_LAG_UPDATE": \
597 	((x) == 0x1b2 ? "HWRM_FUNC_LAG_FREE": \
598 	((x) == 0x1b3 ? "HWRM_FUNC_LAG_QCFG": \
599 	"Unknown decode" )))))))))))))))))))))))))))))))))))) : \
600 	(((x) < 0x280) ? \
601 	((x) == 0x200 ? "HWRM_SELFTEST_QLIST": \
602 	((x) == 0x201 ? "HWRM_SELFTEST_EXEC": \
603 	((x) == 0x202 ? "HWRM_SELFTEST_IRQ": \
604 	((x) == 0x203 ? "HWRM_SELFTEST_RETRIEVE_SERDES_DATA": \
605 	((x) == 0x204 ? "HWRM_PCIE_QSTATS": \
606 	((x) == 0x205 ? "HWRM_MFG_FRU_WRITE_CONTROL": \
607 	((x) == 0x206 ? "HWRM_MFG_TIMERS_QUERY": \
608 	((x) == 0x207 ? "HWRM_MFG_OTP_CFG": \
609 	((x) == 0x208 ? "HWRM_MFG_OTP_QCFG": \
610 	((x) == 0x209 ? "HWRM_MFG_HDMA_TEST": \
611 	((x) == 0x20a ? "HWRM_MFG_FRU_EEPROM_WRITE": \
612 	((x) == 0x20b ? "HWRM_MFG_FRU_EEPROM_READ": \
613 	((x) == 0x20c ? "HWRM_MFG_SOC_IMAGE": \
614 	((x) == 0x20d ? "HWRM_MFG_SOC_QSTATUS": \
615 	((x) == 0x20e ? "HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE": \
616 	((x) == 0x20f ? "HWRM_MFG_PARAM_CRITICAL_DATA_READ": \
617 	((x) == 0x210 ? "HWRM_MFG_PARAM_CRITICAL_DATA_HEALTH": \
618 	((x) == 0x211 ? "HWRM_MFG_PRVSN_EXPORT_CSR": \
619 	((x) == 0x212 ? "HWRM_MFG_PRVSN_IMPORT_CERT": \
620 	((x) == 0x213 ? "HWRM_MFG_PRVSN_GET_STATE": \
621 	((x) == 0x214 ? "HWRM_MFG_GET_NVM_MEASUREMENT": \
622 	((x) == 0x215 ? "HWRM_MFG_PSOC_QSTATUS": \
623 	((x) == 0x216 ? "HWRM_MFG_SELFTEST_QLIST": \
624 	((x) == 0x217 ? "HWRM_MFG_SELFTEST_EXEC": \
625 	((x) == 0x218 ? "HWRM_STAT_GENERIC_QSTATS": \
626 	((x) == 0x219 ? "HWRM_MFG_PRVSN_EXPORT_CERT": \
627 	((x) == 0x21a ? "HWRM_STAT_DB_ERROR_QSTATS": \
628 	((x) == 0x258 ? "HWRM_UDCC_QCAPS": \
629 	((x) == 0x259 ? "HWRM_UDCC_CFG": \
630 	((x) == 0x25a ? "HWRM_UDCC_QCFG": \
631 	((x) == 0x25b ? "HWRM_UDCC_SESSION_CFG": \
632 	((x) == 0x25c ? "HWRM_UDCC_SESSION_QCFG": \
633 	((x) == 0x25d ? "HWRM_UDCC_SESSION_QUERY": \
634 	((x) == 0x25e ? "HWRM_UDCC_COMP_CFG": \
635 	((x) == 0x25f ? "HWRM_UDCC_COMP_QCFG": \
636 	((x) == 0x260 ? "HWRM_UDCC_COMP_QUERY": \
637 	"Unknown decode" )))))))))))))))))))))))))))))))))))) : \
638 	(((x) < 0x300) ? \
639 	((x) == 0x2bc ? "HWRM_TF": \
640 	((x) == 0x2bd ? "HWRM_TF_VERSION_GET": \
641 	((x) == 0x2c6 ? "HWRM_TF_SESSION_OPEN": \
642 	((x) == 0x2c8 ? "HWRM_TF_SESSION_REGISTER": \
643 	((x) == 0x2c9 ? "HWRM_TF_SESSION_UNREGISTER": \
644 	((x) == 0x2ca ? "HWRM_TF_SESSION_CLOSE": \
645 	((x) == 0x2cb ? "HWRM_TF_SESSION_QCFG": \
646 	((x) == 0x2cc ? "HWRM_TF_SESSION_RESC_QCAPS": \
647 	((x) == 0x2cd ? "HWRM_TF_SESSION_RESC_ALLOC": \
648 	((x) == 0x2ce ? "HWRM_TF_SESSION_RESC_FREE": \
649 	((x) == 0x2cf ? "HWRM_TF_SESSION_RESC_FLUSH": \
650 	((x) == 0x2d0 ? "HWRM_TF_SESSION_RESC_INFO": \
651 	((x) == 0x2d1 ? "HWRM_TF_SESSION_HOTUP_STATE_SET": \
652 	((x) == 0x2d2 ? "HWRM_TF_SESSION_HOTUP_STATE_GET": \
653 	((x) == 0x2da ? "HWRM_TF_TBL_TYPE_GET": \
654 	((x) == 0x2db ? "HWRM_TF_TBL_TYPE_SET": \
655 	((x) == 0x2dc ? "HWRM_TF_TBL_TYPE_BULK_GET": \
656 	((x) == 0x2ea ? "HWRM_TF_EM_INSERT": \
657 	((x) == 0x2eb ? "HWRM_TF_EM_DELETE": \
658 	((x) == 0x2ec ? "HWRM_TF_EM_HASH_INSERT": \
659 	((x) == 0x2ed ? "HWRM_TF_EM_MOVE": \
660 	((x) == 0x2f8 ? "HWRM_TF_TCAM_SET": \
661 	((x) == 0x2f9 ? "HWRM_TF_TCAM_GET": \
662 	((x) == 0x2fa ? "HWRM_TF_TCAM_MOVE": \
663 	((x) == 0x2fb ? "HWRM_TF_TCAM_FREE": \
664 	((x) == 0x2fc ? "HWRM_TF_GLOBAL_CFG_SET": \
665 	((x) == 0x2fd ? "HWRM_TF_GLOBAL_CFG_GET": \
666 	((x) == 0x2fe ? "HWRM_TF_IF_TBL_SET": \
667 	((x) == 0x2ff ? "HWRM_TF_IF_TBL_GET": \
668 	"Unknown decode" ))))))))))))))))))))))))))))) : \
669 	(((x) < 0x380) ? \
670 	((x) == 0x300 ? "HWRM_TF_RESC_USAGE_SET": \
671 	((x) == 0x301 ? "HWRM_TF_RESC_USAGE_QUERY": \
672 	((x) == 0x302 ? "HWRM_TF_TBL_TYPE_ALLOC": \
673 	((x) == 0x303 ? "HWRM_TF_TBL_TYPE_FREE": \
674 	"Unknown decode" )))) : \
675 	(((x) < 0x400) ? \
676 	((x) == 0x380 ? "HWRM_TFC_TBL_SCOPE_QCAPS": \
677 	((x) == 0x381 ? "HWRM_TFC_TBL_SCOPE_ID_ALLOC": \
678 	((x) == 0x382 ? "HWRM_TFC_TBL_SCOPE_CONFIG": \
679 	((x) == 0x383 ? "HWRM_TFC_TBL_SCOPE_DECONFIG": \
680 	((x) == 0x384 ? "HWRM_TFC_TBL_SCOPE_FID_ADD": \
681 	((x) == 0x385 ? "HWRM_TFC_TBL_SCOPE_FID_REM": \
682 	((x) == 0x386 ? "HWRM_TFC_TBL_SCOPE_POOL_ALLOC": \
683 	((x) == 0x387 ? "HWRM_TFC_TBL_SCOPE_POOL_FREE": \
684 	((x) == 0x388 ? "HWRM_TFC_SESSION_ID_ALLOC": \
685 	((x) == 0x389 ? "HWRM_TFC_SESSION_FID_ADD": \
686 	((x) == 0x38a ? "HWRM_TFC_SESSION_FID_REM": \
687 	((x) == 0x38b ? "HWRM_TFC_IDENT_ALLOC": \
688 	((x) == 0x38c ? "HWRM_TFC_IDENT_FREE": \
689 	((x) == 0x38d ? "HWRM_TFC_IDX_TBL_ALLOC": \
690 	((x) == 0x38e ? "HWRM_TFC_IDX_TBL_ALLOC_SET": \
691 	((x) == 0x38f ? "HWRM_TFC_IDX_TBL_SET": \
692 	((x) == 0x390 ? "HWRM_TFC_IDX_TBL_GET": \
693 	((x) == 0x391 ? "HWRM_TFC_IDX_TBL_FREE": \
694 	((x) == 0x392 ? "HWRM_TFC_GLOBAL_ID_ALLOC": \
695 	((x) == 0x393 ? "HWRM_TFC_TCAM_SET": \
696 	((x) == 0x394 ? "HWRM_TFC_TCAM_GET": \
697 	((x) == 0x395 ? "HWRM_TFC_TCAM_ALLOC": \
698 	((x) == 0x396 ? "HWRM_TFC_TCAM_ALLOC_SET": \
699 	((x) == 0x397 ? "HWRM_TFC_TCAM_FREE": \
700 	((x) == 0x398 ? "HWRM_TFC_IF_TBL_SET": \
701 	((x) == 0x399 ? "HWRM_TFC_IF_TBL_GET": \
702 	((x) == 0x39a ? "HWRM_TFC_TBL_SCOPE_CONFIG_GET": \
703 	((x) == 0x39b ? "HWRM_TFC_RESC_USAGE_QUERY": \
704 	((x) == 0x39c ? "HWRM_QUEUE_PFCWD_TIMEOUT_QCAPS": \
705 	((x) == 0x39d ? "HWRM_QUEUE_PFCWD_TIMEOUT_CFG": \
706 	((x) == 0x39e ? "HWRM_QUEUE_PFCWD_TIMEOUT_QCFG": \
707 	"Unknown decode" ))))))))))))))))))))))))))))))) : \
708 	(((x) < 0x480) ? \
709 	((x) == 0x400 ? "HWRM_SV": \
710 	"Unknown decode" ) : \
711 	(((x) < 0xff80) ? \
712 	((x) == 0xff0f ? "HWRM_DBG_LOG_BUFFER_FLUSH": \
713 	((x) == 0xff10 ? "HWRM_DBG_READ_DIRECT": \
714 	((x) == 0xff11 ? "HWRM_DBG_READ_INDIRECT": \
715 	((x) == 0xff12 ? "HWRM_DBG_WRITE_DIRECT": \
716 	((x) == 0xff13 ? "HWRM_DBG_WRITE_INDIRECT": \
717 	((x) == 0xff14 ? "HWRM_DBG_DUMP": \
718 	((x) == 0xff15 ? "HWRM_DBG_ERASE_NVM": \
719 	((x) == 0xff16 ? "HWRM_DBG_CFG": \
720 	((x) == 0xff17 ? "HWRM_DBG_COREDUMP_LIST": \
721 	((x) == 0xff18 ? "HWRM_DBG_COREDUMP_INITIATE": \
722 	((x) == 0xff19 ? "HWRM_DBG_COREDUMP_RETRIEVE": \
723 	((x) == 0xff1a ? "HWRM_DBG_FW_CLI": \
724 	((x) == 0xff1b ? "HWRM_DBG_I2C_CMD": \
725 	((x) == 0xff1c ? "HWRM_DBG_RING_INFO_GET": \
726 	((x) == 0xff1d ? "HWRM_DBG_CRASHDUMP_HEADER": \
727 	((x) == 0xff1e ? "HWRM_DBG_CRASHDUMP_ERASE": \
728 	((x) == 0xff1f ? "HWRM_DBG_DRV_TRACE": \
729 	((x) == 0xff20 ? "HWRM_DBG_QCAPS": \
730 	((x) == 0xff21 ? "HWRM_DBG_QCFG": \
731 	((x) == 0xff22 ? "HWRM_DBG_CRASHDUMP_MEDIUM_CFG": \
732 	((x) == 0xff23 ? "HWRM_DBG_USEQ_ALLOC": \
733 	((x) == 0xff24 ? "HWRM_DBG_USEQ_FREE": \
734 	((x) == 0xff25 ? "HWRM_DBG_USEQ_FLUSH": \
735 	((x) == 0xff26 ? "HWRM_DBG_USEQ_QCAPS": \
736 	((x) == 0xff27 ? "HWRM_DBG_USEQ_CW_CFG": \
737 	((x) == 0xff28 ? "HWRM_DBG_USEQ_SCHED_CFG": \
738 	((x) == 0xff29 ? "HWRM_DBG_USEQ_RUN": \
739 	((x) == 0xff2a ? "HWRM_DBG_USEQ_DELIVERY_REQ": \
740 	((x) == 0xff2b ? "HWRM_DBG_USEQ_RESP_HDR": \
741 	"Unknown decode" ))))))))))))))))))))))))))))) : \
742 	(((x) <= 0xffff) ? \
743 	((x) == 0xffea ? "HWRM_NVM_GET_VPD_FIELD_INFO": \
744 	((x) == 0xffeb ? "HWRM_NVM_SET_VPD_FIELD_INFO": \
745 	((x) == 0xffec ? "HWRM_NVM_DEFRAG": \
746 	((x) == 0xffed ? "HWRM_NVM_REQ_ARBITRATION": \
747 	((x) == 0xffee ? "HWRM_NVM_FACTORY_DEFAULTS": \
748 	((x) == 0xffef ? "HWRM_NVM_VALIDATE_OPTION": \
749 	((x) == 0xfff0 ? "HWRM_NVM_FLUSH": \
750 	((x) == 0xfff1 ? "HWRM_NVM_GET_VARIABLE": \
751 	((x) == 0xfff2 ? "HWRM_NVM_SET_VARIABLE": \
752 	((x) == 0xfff3 ? "HWRM_NVM_INSTALL_UPDATE": \
753 	((x) == 0xfff4 ? "HWRM_NVM_MODIFY": \
754 	((x) == 0xfff5 ? "HWRM_NVM_VERIFY_UPDATE": \
755 	((x) == 0xfff6 ? "HWRM_NVM_GET_DEV_INFO": \
756 	((x) == 0xfff7 ? "HWRM_NVM_ERASE_DIR_ENTRY": \
757 	((x) == 0xfff8 ? "HWRM_NVM_MOD_DIR_ENTRY": \
758 	((x) == 0xfff9 ? "HWRM_NVM_FIND_DIR_ENTRY": \
759 	((x) == 0xfffa ? "HWRM_NVM_GET_DIR_ENTRIES": \
760 	((x) == 0xfffb ? "HWRM_NVM_GET_DIR_INFO": \
761 	((x) == 0xfffc ? "HWRM_NVM_RAW_DUMP": \
762 	((x) == 0xfffd ? "HWRM_NVM_READ": \
763 	((x) == 0xfffe ? "HWRM_NVM_WRITE": \
764 	((x) == 0xffff ? "HWRM_NVM_RAW_WRITE_BLK": \
765 	"Unknown decode" )))))))))))))))))))))) : \
766 	"Unknown decode" )))))))))))
767 
768 
769 /*
770  * Command numbering
771  * # NOTE - definitions already in hwrm_req_type, in hwrm_types.yaml
772  * #	So only structure definition is provided here.
773  */
774 /* cmd_nums (size:64b/8B) */
775 
776 typedef struct cmd_nums {
777 	/*
778 	 * This version of the specification defines the commands listed in
779 	 * the table below. The following are general implementation
780 	 * requirements for these commands:
781 	 *
782 	 * # All commands listed below that are marked neither
783 	 * reserved nor experimental shall be implemented by the HWRM.
784 	 * # A HWRM client compliant to this specification should not use
785 	 * commands outside of the list below.
786 	 * # A HWRM client compliant to this specification should not use
787 	 * command numbers marked reserved below.
788 	 * # A command marked experimental below may not be implemented
789 	 * by the HWRM.
790 	 * # A command marked experimental may change in the
791 	 * future version of the HWRM specification.
792 	 * # A command not listed below may be implemented by the HWRM.
793 	 * The behavior of commands that are not listed below is outside
794 	 * the scope of this specification.
795 	 */
796 	uint16_t	req_type;
797 	#define HWRM_VER_GET				UINT32_C(0x0)
798 	#define HWRM_FUNC_ECHO_RESPONSE		UINT32_C(0xb)
799 	#define HWRM_ERROR_RECOVERY_QCFG		UINT32_C(0xc)
800 	#define HWRM_FUNC_DRV_IF_CHANGE		UINT32_C(0xd)
801 	#define HWRM_FUNC_BUF_UNRGTR			UINT32_C(0xe)
802 	#define HWRM_FUNC_VF_CFG			UINT32_C(0xf)
803 	/* Reserved for future use. */
804 	#define HWRM_RESERVED1				UINT32_C(0x10)
805 	#define HWRM_FUNC_RESET			UINT32_C(0x11)
806 	#define HWRM_FUNC_GETFID			UINT32_C(0x12)
807 	#define HWRM_FUNC_VF_ALLOC			UINT32_C(0x13)
808 	#define HWRM_FUNC_VF_FREE			UINT32_C(0x14)
809 	#define HWRM_FUNC_QCAPS			UINT32_C(0x15)
810 	#define HWRM_FUNC_QCFG				UINT32_C(0x16)
811 	#define HWRM_FUNC_CFG				UINT32_C(0x17)
812 	#define HWRM_FUNC_QSTATS			UINT32_C(0x18)
813 	#define HWRM_FUNC_CLR_STATS			UINT32_C(0x19)
814 	#define HWRM_FUNC_DRV_UNRGTR			UINT32_C(0x1a)
815 	#define HWRM_FUNC_VF_RESC_FREE			UINT32_C(0x1b)
816 	#define HWRM_FUNC_VF_VNIC_IDS_QUERY		UINT32_C(0x1c)
817 	#define HWRM_FUNC_DRV_RGTR			UINT32_C(0x1d)
818 	#define HWRM_FUNC_DRV_QVER			UINT32_C(0x1e)
819 	#define HWRM_FUNC_BUF_RGTR			UINT32_C(0x1f)
820 	#define HWRM_PORT_PHY_CFG			UINT32_C(0x20)
821 	#define HWRM_PORT_MAC_CFG			UINT32_C(0x21)
822 	/* Experimental */
823 	#define HWRM_PORT_TS_QUERY			UINT32_C(0x22)
824 	#define HWRM_PORT_QSTATS			UINT32_C(0x23)
825 	#define HWRM_PORT_LPBK_QSTATS			UINT32_C(0x24)
826 	/* Experimental */
827 	#define HWRM_PORT_CLR_STATS			UINT32_C(0x25)
828 	/* Experimental */
829 	#define HWRM_PORT_LPBK_CLR_STATS		UINT32_C(0x26)
830 	#define HWRM_PORT_PHY_QCFG			UINT32_C(0x27)
831 	#define HWRM_PORT_MAC_QCFG			UINT32_C(0x28)
832 	/* Experimental */
833 	#define HWRM_PORT_MAC_PTP_QCFG			UINT32_C(0x29)
834 	#define HWRM_PORT_PHY_QCAPS			UINT32_C(0x2a)
835 	#define HWRM_PORT_PHY_I2C_WRITE		UINT32_C(0x2b)
836 	#define HWRM_PORT_PHY_I2C_READ			UINT32_C(0x2c)
837 	#define HWRM_PORT_LED_CFG			UINT32_C(0x2d)
838 	#define HWRM_PORT_LED_QCFG			UINT32_C(0x2e)
839 	#define HWRM_PORT_LED_QCAPS			UINT32_C(0x2f)
840 	#define HWRM_QUEUE_QPORTCFG			UINT32_C(0x30)
841 	#define HWRM_QUEUE_QCFG			UINT32_C(0x31)
842 	#define HWRM_QUEUE_CFG				UINT32_C(0x32)
843 	#define HWRM_FUNC_VLAN_CFG			UINT32_C(0x33)
844 	#define HWRM_FUNC_VLAN_QCFG			UINT32_C(0x34)
845 	#define HWRM_QUEUE_PFCENABLE_QCFG		UINT32_C(0x35)
846 	#define HWRM_QUEUE_PFCENABLE_CFG		UINT32_C(0x36)
847 	#define HWRM_QUEUE_PRI2COS_QCFG		UINT32_C(0x37)
848 	#define HWRM_QUEUE_PRI2COS_CFG			UINT32_C(0x38)
849 	#define HWRM_QUEUE_COS2BW_QCFG			UINT32_C(0x39)
850 	#define HWRM_QUEUE_COS2BW_CFG			UINT32_C(0x3a)
851 	#define HWRM_QUEUE_DSCP_QCAPS			UINT32_C(0x3b)
852 	#define HWRM_QUEUE_DSCP2PRI_QCFG		UINT32_C(0x3c)
853 	#define HWRM_QUEUE_DSCP2PRI_CFG		UINT32_C(0x3d)
854 	#define HWRM_VNIC_ALLOC			UINT32_C(0x40)
855 	#define HWRM_VNIC_FREE				UINT32_C(0x41)
856 	#define HWRM_VNIC_CFG				UINT32_C(0x42)
857 	#define HWRM_VNIC_QCFG				UINT32_C(0x43)
858 	#define HWRM_VNIC_TPA_CFG			UINT32_C(0x44)
859 	/* Experimental */
860 	#define HWRM_VNIC_TPA_QCFG			UINT32_C(0x45)
861 	#define HWRM_VNIC_RSS_CFG			UINT32_C(0x46)
862 	#define HWRM_VNIC_RSS_QCFG			UINT32_C(0x47)
863 	#define HWRM_VNIC_PLCMODES_CFG			UINT32_C(0x48)
864 	#define HWRM_VNIC_PLCMODES_QCFG		UINT32_C(0x49)
865 	#define HWRM_VNIC_QCAPS			UINT32_C(0x4a)
866 	/* Updates specific fields in RX VNIC structure */
867 	#define HWRM_VNIC_UPDATE			UINT32_C(0x4b)
868 	#define HWRM_RING_ALLOC			UINT32_C(0x50)
869 	#define HWRM_RING_FREE				UINT32_C(0x51)
870 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS	UINT32_C(0x52)
871 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS	UINT32_C(0x53)
872 	#define HWRM_RING_AGGINT_QCAPS			UINT32_C(0x54)
873 	#define HWRM_RING_SCHQ_ALLOC			UINT32_C(0x55)
874 	#define HWRM_RING_SCHQ_CFG			UINT32_C(0x56)
875 	#define HWRM_RING_SCHQ_FREE			UINT32_C(0x57)
876 	#define HWRM_RING_RESET			UINT32_C(0x5e)
877 	#define HWRM_RING_GRP_ALLOC			UINT32_C(0x60)
878 	#define HWRM_RING_GRP_FREE			UINT32_C(0x61)
879 	#define HWRM_RING_CFG				UINT32_C(0x62)
880 	#define HWRM_RING_QCFG				UINT32_C(0x63)
881 	/* Reserved for future use. */
882 	#define HWRM_RESERVED5				UINT32_C(0x64)
883 	/* Reserved for future use. */
884 	#define HWRM_RESERVED6				UINT32_C(0x65)
885 	#define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC		UINT32_C(0x70)
886 	#define HWRM_VNIC_RSS_COS_LB_CTX_FREE		UINT32_C(0x71)
887 	#define HWRM_QUEUE_MPLS_QCAPS			UINT32_C(0x80)
888 	#define HWRM_QUEUE_MPLSTC2PRI_QCFG		UINT32_C(0x81)
889 	#define HWRM_QUEUE_MPLSTC2PRI_CFG		UINT32_C(0x82)
890 	#define HWRM_QUEUE_VLANPRI_QCAPS		UINT32_C(0x83)
891 	#define HWRM_QUEUE_VLANPRI2PRI_QCFG		UINT32_C(0x84)
892 	#define HWRM_QUEUE_VLANPRI2PRI_CFG		UINT32_C(0x85)
893 	#define HWRM_QUEUE_GLOBAL_CFG			UINT32_C(0x86)
894 	#define HWRM_QUEUE_GLOBAL_QCFG			UINT32_C(0x87)
895 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG	UINT32_C(0x88)
896 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG	UINT32_C(0x89)
897 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG	UINT32_C(0x8a)
898 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG	UINT32_C(0x8b)
899 	#define HWRM_QUEUE_QCAPS			UINT32_C(0x8c)
900 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_QCFG	UINT32_C(0x8d)
901 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG	UINT32_C(0x8e)
902 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_QCFG	UINT32_C(0x8f)
903 	#define HWRM_CFA_L2_FILTER_ALLOC		UINT32_C(0x90)
904 	#define HWRM_CFA_L2_FILTER_FREE		UINT32_C(0x91)
905 	#define HWRM_CFA_L2_FILTER_CFG			UINT32_C(0x92)
906 	#define HWRM_CFA_L2_SET_RX_MASK		UINT32_C(0x93)
907 	#define HWRM_CFA_VLAN_ANTISPOOF_CFG		UINT32_C(0x94)
908 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC		UINT32_C(0x95)
909 	#define HWRM_CFA_TUNNEL_FILTER_FREE		UINT32_C(0x96)
910 	/* Experimental */
911 	#define HWRM_CFA_ENCAP_RECORD_ALLOC		UINT32_C(0x97)
912 	/* Experimental */
913 	#define HWRM_CFA_ENCAP_RECORD_FREE		UINT32_C(0x98)
914 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC		UINT32_C(0x99)
915 	#define HWRM_CFA_NTUPLE_FILTER_FREE		UINT32_C(0x9a)
916 	#define HWRM_CFA_NTUPLE_FILTER_CFG		UINT32_C(0x9b)
917 	/* Experimental */
918 	#define HWRM_CFA_EM_FLOW_ALLOC			UINT32_C(0x9c)
919 	/* Experimental */
920 	#define HWRM_CFA_EM_FLOW_FREE			UINT32_C(0x9d)
921 	/* Experimental */
922 	#define HWRM_CFA_EM_FLOW_CFG			UINT32_C(0x9e)
923 	#define HWRM_TUNNEL_DST_PORT_QUERY		UINT32_C(0xa0)
924 	#define HWRM_TUNNEL_DST_PORT_ALLOC		UINT32_C(0xa1)
925 	#define HWRM_TUNNEL_DST_PORT_FREE		UINT32_C(0xa2)
926 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG	UINT32_C(0xa3)
927 	#define HWRM_STAT_CTX_ENG_QUERY		UINT32_C(0xaf)
928 	#define HWRM_STAT_CTX_ALLOC			UINT32_C(0xb0)
929 	#define HWRM_STAT_CTX_FREE			UINT32_C(0xb1)
930 	#define HWRM_STAT_CTX_QUERY			UINT32_C(0xb2)
931 	#define HWRM_STAT_CTX_CLR_STATS		UINT32_C(0xb3)
932 	#define HWRM_PORT_QSTATS_EXT			UINT32_C(0xb4)
933 	#define HWRM_PORT_PHY_MDIO_WRITE		UINT32_C(0xb5)
934 	#define HWRM_PORT_PHY_MDIO_READ		UINT32_C(0xb6)
935 	#define HWRM_PORT_PHY_MDIO_BUS_ACQUIRE		UINT32_C(0xb7)
936 	#define HWRM_PORT_PHY_MDIO_BUS_RELEASE		UINT32_C(0xb8)
937 	#define HWRM_PORT_QSTATS_EXT_PFC_WD		UINT32_C(0xb9)
938 	/* Reserved. */
939 	#define HWRM_RESERVED7				UINT32_C(0xba)
940 	#define HWRM_PORT_TX_FIR_CFG			UINT32_C(0xbb)
941 	#define HWRM_PORT_TX_FIR_QCFG			UINT32_C(0xbc)
942 	#define HWRM_PORT_ECN_QSTATS			UINT32_C(0xbd)
943 	#define HWRM_FW_LIVEPATCH_QUERY		UINT32_C(0xbe)
944 	#define HWRM_FW_LIVEPATCH			UINT32_C(0xbf)
945 	#define HWRM_FW_RESET				UINT32_C(0xc0)
946 	#define HWRM_FW_QSTATUS			UINT32_C(0xc1)
947 	#define HWRM_FW_HEALTH_CHECK			UINT32_C(0xc2)
948 	#define HWRM_FW_SYNC				UINT32_C(0xc3)
949 	#define HWRM_FW_STATE_QCAPS			UINT32_C(0xc4)
950 	#define HWRM_FW_STATE_QUIESCE			UINT32_C(0xc5)
951 	#define HWRM_FW_STATE_BACKUP			UINT32_C(0xc6)
952 	#define HWRM_FW_STATE_RESTORE			UINT32_C(0xc7)
953 	/* Experimental */
954 	#define HWRM_FW_SET_TIME			UINT32_C(0xc8)
955 	/* Experimental */
956 	#define HWRM_FW_GET_TIME			UINT32_C(0xc9)
957 	/* Experimental */
958 	#define HWRM_FW_SET_STRUCTURED_DATA		UINT32_C(0xca)
959 	/* Experimental */
960 	#define HWRM_FW_GET_STRUCTURED_DATA		UINT32_C(0xcb)
961 	/* Experimental */
962 	#define HWRM_FW_IPC_MAILBOX			UINT32_C(0xcc)
963 	#define HWRM_FW_ECN_CFG			UINT32_C(0xcd)
964 	#define HWRM_FW_ECN_QCFG			UINT32_C(0xce)
965 	#define HWRM_FW_SECURE_CFG			UINT32_C(0xcf)
966 	#define HWRM_EXEC_FWD_RESP			UINT32_C(0xd0)
967 	#define HWRM_REJECT_FWD_RESP			UINT32_C(0xd1)
968 	#define HWRM_FWD_RESP				UINT32_C(0xd2)
969 	#define HWRM_FWD_ASYNC_EVENT_CMPL		UINT32_C(0xd3)
970 	#define HWRM_OEM_CMD				UINT32_C(0xd4)
971 	/* Tells the fw to run PRBS test on a given port and lane. */
972 	#define HWRM_PORT_PRBS_TEST			UINT32_C(0xd5)
973 	#define HWRM_PORT_SFP_SIDEBAND_CFG		UINT32_C(0xd6)
974 	#define HWRM_PORT_SFP_SIDEBAND_QCFG		UINT32_C(0xd7)
975 	#define HWRM_FW_STATE_UNQUIESCE		UINT32_C(0xd8)
976 	/* Tells the fw to collect dsc dump on a given port and lane. */
977 	#define HWRM_PORT_DSC_DUMP			UINT32_C(0xd9)
978 	#define HWRM_PORT_EP_TX_QCFG			UINT32_C(0xda)
979 	#define HWRM_PORT_EP_TX_CFG			UINT32_C(0xdb)
980 	#define HWRM_PORT_CFG				UINT32_C(0xdc)
981 	#define HWRM_PORT_QCFG				UINT32_C(0xdd)
982 	/* Queries MAC capabilities for the specified port */
983 	#define HWRM_PORT_MAC_QCAPS			UINT32_C(0xdf)
984 	#define HWRM_TEMP_MONITOR_QUERY		UINT32_C(0xe0)
985 	#define HWRM_REG_POWER_QUERY			UINT32_C(0xe1)
986 	#define HWRM_CORE_FREQUENCY_QUERY		UINT32_C(0xe2)
987 	#define HWRM_REG_POWER_HISTOGRAM		UINT32_C(0xe3)
988 	#define HWRM_WOL_FILTER_ALLOC			UINT32_C(0xf0)
989 	#define HWRM_WOL_FILTER_FREE			UINT32_C(0xf1)
990 	#define HWRM_WOL_FILTER_QCFG			UINT32_C(0xf2)
991 	#define HWRM_WOL_REASON_QCFG			UINT32_C(0xf3)
992 	/* Experimental */
993 	#define HWRM_CFA_METER_QCAPS			UINT32_C(0xf4)
994 	/* Experimental */
995 	#define HWRM_CFA_METER_PROFILE_ALLOC		UINT32_C(0xf5)
996 	/* Experimental */
997 	#define HWRM_CFA_METER_PROFILE_FREE		UINT32_C(0xf6)
998 	/* Experimental */
999 	#define HWRM_CFA_METER_PROFILE_CFG		UINT32_C(0xf7)
1000 	/* Experimental */
1001 	#define HWRM_CFA_METER_INSTANCE_ALLOC		UINT32_C(0xf8)
1002 	/* Experimental */
1003 	#define HWRM_CFA_METER_INSTANCE_FREE		UINT32_C(0xf9)
1004 	/* Experimental */
1005 	#define HWRM_CFA_METER_INSTANCE_CFG		UINT32_C(0xfa)
1006 	/* Experimental */
1007 	#define HWRM_CFA_VFR_ALLOC			UINT32_C(0xfd)
1008 	/* Experimental */
1009 	#define HWRM_CFA_VFR_FREE			UINT32_C(0xfe)
1010 	/* Experimental */
1011 	#define HWRM_CFA_VF_PAIR_ALLOC			UINT32_C(0x100)
1012 	/* Experimental */
1013 	#define HWRM_CFA_VF_PAIR_FREE			UINT32_C(0x101)
1014 	/* Experimental */
1015 	#define HWRM_CFA_VF_PAIR_INFO			UINT32_C(0x102)
1016 	/* Experimental */
1017 	#define HWRM_CFA_FLOW_ALLOC			UINT32_C(0x103)
1018 	/* Experimental */
1019 	#define HWRM_CFA_FLOW_FREE			UINT32_C(0x104)
1020 	/* Experimental */
1021 	#define HWRM_CFA_FLOW_FLUSH			UINT32_C(0x105)
1022 	#define HWRM_CFA_FLOW_STATS			UINT32_C(0x106)
1023 	#define HWRM_CFA_FLOW_INFO			UINT32_C(0x107)
1024 	/* Experimental */
1025 	#define HWRM_CFA_DECAP_FILTER_ALLOC		UINT32_C(0x108)
1026 	/* Experimental */
1027 	#define HWRM_CFA_DECAP_FILTER_FREE		UINT32_C(0x109)
1028 	#define HWRM_CFA_VLAN_ANTISPOOF_QCFG		UINT32_C(0x10a)
1029 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC	UINT32_C(0x10b)
1030 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE	UINT32_C(0x10c)
1031 	/* Experimental */
1032 	#define HWRM_CFA_PAIR_ALLOC			UINT32_C(0x10d)
1033 	/* Experimental */
1034 	#define HWRM_CFA_PAIR_FREE			UINT32_C(0x10e)
1035 	/* Experimental */
1036 	#define HWRM_CFA_PAIR_INFO			UINT32_C(0x10f)
1037 	/* Experimental */
1038 	#define HWRM_FW_IPC_MSG			UINT32_C(0x110)
1039 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO	UINT32_C(0x111)
1040 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE	UINT32_C(0x112)
1041 	/* Experimental */
1042 	#define HWRM_CFA_FLOW_AGING_TIMER_RESET	UINT32_C(0x113)
1043 	/* Experimental */
1044 	#define HWRM_CFA_FLOW_AGING_CFG		UINT32_C(0x114)
1045 	/* Experimental */
1046 	#define HWRM_CFA_FLOW_AGING_QCFG		UINT32_C(0x115)
1047 	/* Experimental */
1048 	#define HWRM_CFA_FLOW_AGING_QCAPS		UINT32_C(0x116)
1049 	/* Experimental */
1050 	#define HWRM_CFA_CTX_MEM_RGTR			UINT32_C(0x117)
1051 	/* Experimental */
1052 	#define HWRM_CFA_CTX_MEM_UNRGTR		UINT32_C(0x118)
1053 	/* Experimental */
1054 	#define HWRM_CFA_CTX_MEM_QCTX			UINT32_C(0x119)
1055 	/* Experimental */
1056 	#define HWRM_CFA_CTX_MEM_QCAPS			UINT32_C(0x11a)
1057 	/* Experimental */
1058 	#define HWRM_CFA_COUNTER_QCAPS			UINT32_C(0x11b)
1059 	/* Experimental */
1060 	#define HWRM_CFA_COUNTER_CFG			UINT32_C(0x11c)
1061 	/* Experimental */
1062 	#define HWRM_CFA_COUNTER_QCFG			UINT32_C(0x11d)
1063 	/* Experimental */
1064 	#define HWRM_CFA_COUNTER_QSTATS		UINT32_C(0x11e)
1065 	/* Experimental */
1066 	#define HWRM_CFA_TCP_FLAG_PROCESS_QCFG		UINT32_C(0x11f)
1067 	/* Experimental */
1068 	#define HWRM_CFA_EEM_QCAPS			UINT32_C(0x120)
1069 	/* Experimental */
1070 	#define HWRM_CFA_EEM_CFG			UINT32_C(0x121)
1071 	/* Experimental */
1072 	#define HWRM_CFA_EEM_QCFG			UINT32_C(0x122)
1073 	/* Experimental */
1074 	#define HWRM_CFA_EEM_OP			UINT32_C(0x123)
1075 	/* Experimental */
1076 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS		UINT32_C(0x124)
1077 	/* Experimental - DEPRECATED */
1078 	#define HWRM_CFA_TFLIB				UINT32_C(0x125)
1079 	/* Experimental */
1080 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR		UINT32_C(0x126)
1081 	/* Experimental */
1082 	#define HWRM_CFA_LAG_GROUP_MEMBER_UNRGTR	UINT32_C(0x127)
1083 	/* Experimental */
1084 	#define HWRM_CFA_TLS_FILTER_ALLOC		UINT32_C(0x128)
1085 	/* Experimental */
1086 	#define HWRM_CFA_TLS_FILTER_FREE		UINT32_C(0x129)
1087 	/* Release an AFM function for TF control */
1088 	#define HWRM_CFA_RELEASE_AFM_FUNC		UINT32_C(0x12a)
1089 	/*
1090 	 * Engine CKV - Get the current allocation status of keys provisioned in
1091 	 * the key vault.
1092 	 */
1093 	#define HWRM_ENGINE_CKV_STATUS			UINT32_C(0x12e)
1094 	/* Engine CKV - Add a new CKEK used to encrypt keys. */
1095 	#define HWRM_ENGINE_CKV_CKEK_ADD		UINT32_C(0x12f)
1096 	/* Engine CKV - Delete a previously added CKEK. */
1097 	#define HWRM_ENGINE_CKV_CKEK_DELETE		UINT32_C(0x130)
1098 	/* Engine CKV - Add a new key to the key vault. */
1099 	#define HWRM_ENGINE_CKV_KEY_ADD		UINT32_C(0x131)
1100 	/* Engine CKV - Delete a key from the key vault. */
1101 	#define HWRM_ENGINE_CKV_KEY_DELETE		UINT32_C(0x132)
1102 	/* Engine CKV - Delete all keys from the key vault. */
1103 	#define HWRM_ENGINE_CKV_FLUSH			UINT32_C(0x133)
1104 	/* Engine CKV - Get random data. */
1105 	#define HWRM_ENGINE_CKV_RNG_GET		UINT32_C(0x134)
1106 	/* Engine CKV - Generate and encrypt a new AES key. */
1107 	#define HWRM_ENGINE_CKV_KEY_GEN		UINT32_C(0x135)
1108 	/* Engine CKV - Configure a label index with a label value. */
1109 	#define HWRM_ENGINE_CKV_KEY_LABEL_CFG		UINT32_C(0x136)
1110 	/* Engine CKV - Query a label */
1111 	#define HWRM_ENGINE_CKV_KEY_LABEL_QCFG		UINT32_C(0x137)
1112 	/* Engine - Query the available queue groups configuration. */
1113 	#define HWRM_ENGINE_QG_CONFIG_QUERY		UINT32_C(0x13c)
1114 	/* Engine - Query the queue groups assigned to a function. */
1115 	#define HWRM_ENGINE_QG_QUERY			UINT32_C(0x13d)
1116 	/* Engine - Query the available queue group meter profile configuration. */
1117 	#define HWRM_ENGINE_QG_METER_PROFILE_CONFIG_QUERY UINT32_C(0x13e)
1118 	/* Engine - Query the configuration of a queue group meter profile. */
1119 	#define HWRM_ENGINE_QG_METER_PROFILE_QUERY	UINT32_C(0x13f)
1120 	/* Engine - Allocate a queue group meter profile. */
1121 	#define HWRM_ENGINE_QG_METER_PROFILE_ALLOC	UINT32_C(0x140)
1122 	/* Engine - Free a queue group meter profile. */
1123 	#define HWRM_ENGINE_QG_METER_PROFILE_FREE	UINT32_C(0x141)
1124 	/* Engine - Query the meters assigned to a queue group. */
1125 	#define HWRM_ENGINE_QG_METER_QUERY		UINT32_C(0x142)
1126 	/* Engine - Bind a queue group meter profile to a queue group. */
1127 	#define HWRM_ENGINE_QG_METER_BIND		UINT32_C(0x143)
1128 	/* Engine - Unbind a queue group meter profile from a queue group. */
1129 	#define HWRM_ENGINE_QG_METER_UNBIND		UINT32_C(0x144)
1130 	/* Engine - Bind a queue group to a function. */
1131 	#define HWRM_ENGINE_QG_FUNC_BIND		UINT32_C(0x145)
1132 	/* Engine - Query the scheduling group configuration. */
1133 	#define HWRM_ENGINE_SG_CONFIG_QUERY		UINT32_C(0x146)
1134 	/* Engine - Query the queue groups assigned to a scheduling group. */
1135 	#define HWRM_ENGINE_SG_QUERY			UINT32_C(0x147)
1136 	/* Engine - Query the configuration of a scheduling group's meter profiles. */
1137 	#define HWRM_ENGINE_SG_METER_QUERY		UINT32_C(0x148)
1138 	/* Engine - Configure a scheduling group's meter profiles. */
1139 	#define HWRM_ENGINE_SG_METER_CONFIG		UINT32_C(0x149)
1140 	/* Engine - Bind a queue group to a scheduling group. */
1141 	#define HWRM_ENGINE_SG_QG_BIND			UINT32_C(0x14a)
1142 	/* Engine - Unbind a queue group from its scheduling group. */
1143 	#define HWRM_ENGINE_QG_SG_UNBIND		UINT32_C(0x14b)
1144 	/* Engine - Query the Engine configuration. */
1145 	#define HWRM_ENGINE_CONFIG_QUERY		UINT32_C(0x154)
1146 	/* Engine - Configure the statistics accumulator for an Engine. */
1147 	#define HWRM_ENGINE_STATS_CONFIG		UINT32_C(0x155)
1148 	/* Engine - Clear the statistics accumulator for an Engine. */
1149 	#define HWRM_ENGINE_STATS_CLEAR		UINT32_C(0x156)
1150 	/* Engine - Query the statistics accumulator for an Engine. */
1151 	#define HWRM_ENGINE_STATS_QUERY		UINT32_C(0x157)
1152 	/*
1153 	 * Engine - Query statistics counters for continuous errors from all CDDIP
1154 	 * Engines.
1155 	 */
1156 	#define HWRM_ENGINE_STATS_QUERY_CONTINUOUS_ERROR  UINT32_C(0x158)
1157 	/* Engine - Allocate an Engine RQ. */
1158 	#define HWRM_ENGINE_RQ_ALLOC			UINT32_C(0x15e)
1159 	/* Engine - Free an Engine RQ. */
1160 	#define HWRM_ENGINE_RQ_FREE			UINT32_C(0x15f)
1161 	/* Engine - Allocate an Engine CQ. */
1162 	#define HWRM_ENGINE_CQ_ALLOC			UINT32_C(0x160)
1163 	/* Engine - Free an Engine CQ. */
1164 	#define HWRM_ENGINE_CQ_FREE			UINT32_C(0x161)
1165 	/* Engine - Allocate an NQ. */
1166 	#define HWRM_ENGINE_NQ_ALLOC			UINT32_C(0x162)
1167 	/* Engine - Free an NQ. */
1168 	#define HWRM_ENGINE_NQ_FREE			UINT32_C(0x163)
1169 	/* Engine - Set the on-die RQE credit update location. */
1170 	#define HWRM_ENGINE_ON_DIE_RQE_CREDITS		UINT32_C(0x164)
1171 	/* Engine - Query the engine function configuration. */
1172 	#define HWRM_ENGINE_FUNC_QCFG			UINT32_C(0x165)
1173 	/* Experimental */
1174 	#define HWRM_FUNC_RESOURCE_QCAPS		UINT32_C(0x190)
1175 	/* Experimental */
1176 	#define HWRM_FUNC_VF_RESOURCE_CFG		UINT32_C(0x191)
1177 	/* Experimental */
1178 	#define HWRM_FUNC_BACKING_STORE_QCAPS		UINT32_C(0x192)
1179 	/* Experimental */
1180 	#define HWRM_FUNC_BACKING_STORE_CFG		UINT32_C(0x193)
1181 	/* Experimental */
1182 	#define HWRM_FUNC_BACKING_STORE_QCFG		UINT32_C(0x194)
1183 	/* Configures the BW of any VF */
1184 	#define HWRM_FUNC_VF_BW_CFG			UINT32_C(0x195)
1185 	/* Queries the BW of any VF */
1186 	#define HWRM_FUNC_VF_BW_QCFG			UINT32_C(0x196)
1187 	/* Queries pf ids belong to specified host(s) */
1188 	#define HWRM_FUNC_HOST_PF_IDS_QUERY		UINT32_C(0x197)
1189 	/* Queries extended stats per function */
1190 	#define HWRM_FUNC_QSTATS_EXT			UINT32_C(0x198)
1191 	/* Queries extended statistics context */
1192 	#define HWRM_STAT_EXT_CTX_QUERY		UINT32_C(0x199)
1193 	/* Configure SoC packet DMA settings */
1194 	#define HWRM_FUNC_SPD_CFG			UINT32_C(0x19a)
1195 	/* Query SoC packet DMA settings */
1196 	#define HWRM_FUNC_SPD_QCFG			UINT32_C(0x19b)
1197 	/* PTP - Queries configuration of timesync IO pins. */
1198 	#define HWRM_FUNC_PTP_PIN_QCFG			UINT32_C(0x19c)
1199 	/* PTP - Configuration of timesync IO pins. */
1200 	#define HWRM_FUNC_PTP_PIN_CFG			UINT32_C(0x19d)
1201 	/* PTP - Configuration for disciplining PHC. */
1202 	#define HWRM_FUNC_PTP_CFG			UINT32_C(0x19e)
1203 	/* PTP - Queries for PHC timestamps. */
1204 	#define HWRM_FUNC_PTP_TS_QUERY			UINT32_C(0x19f)
1205 	/* PTP - Extended PTP configuration. */
1206 	#define HWRM_FUNC_PTP_EXT_CFG			UINT32_C(0x1a0)
1207 	/* PTP - Query extended PTP configuration. */
1208 	#define HWRM_FUNC_PTP_EXT_QCFG			UINT32_C(0x1a1)
1209 	/* The command is used to allocate KTLS or QUIC key contexts. */
1210 	#define HWRM_FUNC_KEY_CTX_ALLOC		UINT32_C(0x1a2)
1211 	/* The is the new API to configure backing stores. */
1212 	#define HWRM_FUNC_BACKING_STORE_CFG_V2		UINT32_C(0x1a3)
1213 	/* The is the new API to query backing store configurations. */
1214 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2	UINT32_C(0x1a4)
1215 	/* To support doorbell pacing configuration. */
1216 	#define HWRM_FUNC_DBR_PACING_CFG		UINT32_C(0x1a5)
1217 	/* To query doorbell pacing configuration. */
1218 	#define HWRM_FUNC_DBR_PACING_QCFG		UINT32_C(0x1a6)
1219 	/*
1220 	 * To broadcast the doorbell event to the drivers to
1221 	 * initiate pacing of doorbells.
1222 	 */
1223 	#define HWRM_FUNC_DBR_PACING_BROADCAST_EVENT	UINT32_C(0x1a7)
1224 	/* The is the new API to query backing store capabilities. */
1225 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2	UINT32_C(0x1a8)
1226 	/* To query doorbell pacing NQ id list configuration. */
1227 	#define HWRM_FUNC_DBR_PACING_NQLIST_QUERY	UINT32_C(0x1a9)
1228 	/*
1229 	 * To notify the firmware that recovery cycle has been
1230 	 * completed by host function drivers.
1231 	 */
1232 	#define HWRM_FUNC_DBR_RECOVERY_COMPLETED	UINT32_C(0x1aa)
1233 	/* Configures SyncE configurations. */
1234 	#define HWRM_FUNC_SYNCE_CFG			UINT32_C(0x1ab)
1235 	/* Queries SyncE configurations. */
1236 	#define HWRM_FUNC_SYNCE_QCFG			UINT32_C(0x1ac)
1237 	/* The command is used to deallocate KTLS or QUIC key contexts. */
1238 	#define HWRM_FUNC_KEY_CTX_FREE			UINT32_C(0x1ad)
1239 	/* The command is used to configure link aggr group mode. */
1240 	#define HWRM_FUNC_LAG_MODE_CFG			UINT32_C(0x1ae)
1241 	/* The command is used to query link aggr group mode. */
1242 	#define HWRM_FUNC_LAG_MODE_QCFG		UINT32_C(0x1af)
1243 	/* The command is used to create a link aggr group. */
1244 	#define HWRM_FUNC_LAG_CREATE			UINT32_C(0x1b0)
1245 	/* The command is used to update a link aggr group. */
1246 	#define HWRM_FUNC_LAG_UPDATE			UINT32_C(0x1b1)
1247 	/* The command is used to free a link aggr group. */
1248 	#define HWRM_FUNC_LAG_FREE			UINT32_C(0x1b2)
1249 	/* The command is used to query a link aggr group. */
1250 	#define HWRM_FUNC_LAG_QCFG			UINT32_C(0x1b3)
1251 	/* Experimental */
1252 	#define HWRM_SELFTEST_QLIST			UINT32_C(0x200)
1253 	/* Experimental */
1254 	#define HWRM_SELFTEST_EXEC			UINT32_C(0x201)
1255 	/* Experimental */
1256 	#define HWRM_SELFTEST_IRQ			UINT32_C(0x202)
1257 	/* Experimental */
1258 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA	UINT32_C(0x203)
1259 	/* Experimental */
1260 	#define HWRM_PCIE_QSTATS			UINT32_C(0x204)
1261 	/* Experimental */
1262 	#define HWRM_MFG_FRU_WRITE_CONTROL		UINT32_C(0x205)
1263 	/* Returns the current value of a free running counter from the device. */
1264 	#define HWRM_MFG_TIMERS_QUERY			UINT32_C(0x206)
1265 	/* Experimental */
1266 	#define HWRM_MFG_OTP_CFG			UINT32_C(0x207)
1267 	/* Experimental */
1268 	#define HWRM_MFG_OTP_QCFG			UINT32_C(0x208)
1269 	/*
1270 	 * Tells the fw to run the DMA read from the host and DMA write
1271 	 * to the host test.
1272 	 */
1273 	#define HWRM_MFG_HDMA_TEST			UINT32_C(0x209)
1274 	/* Tells the fw to program the fru memory */
1275 	#define HWRM_MFG_FRU_EEPROM_WRITE		UINT32_C(0x20a)
1276 	/* Tells the fw to read the fru memory */
1277 	#define HWRM_MFG_FRU_EEPROM_READ		UINT32_C(0x20b)
1278 	/* Used to provision SoC software images */
1279 	#define HWRM_MFG_SOC_IMAGE			UINT32_C(0x20c)
1280 	/* Retrieves the SoC status and image provisioning information */
1281 	#define HWRM_MFG_SOC_QSTATUS			UINT32_C(0x20d)
1282 	/* Tells the fw to finalize the critical data (store and lock it) */
1283 	#define HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE	UINT32_C(0x20e)
1284 	/* Tells the fw to read the critical data */
1285 	#define HWRM_MFG_PARAM_CRITICAL_DATA_READ	UINT32_C(0x20f)
1286 	/* Tells the fw to get the health of critical data */
1287 	#define HWRM_MFG_PARAM_CRITICAL_DATA_HEALTH	UINT32_C(0x210)
1288 	/*
1289 	 * The command is used for certificate provisioning to export a
1290 	 * Certificate Signing Request (CSR) from the device.
1291 	 */
1292 	#define HWRM_MFG_PRVSN_EXPORT_CSR		UINT32_C(0x211)
1293 	/*
1294 	 * The command is used for certificate provisioning to import a
1295 	 * CA-signed certificate chain to the device.
1296 	 */
1297 	#define HWRM_MFG_PRVSN_IMPORT_CERT		UINT32_C(0x212)
1298 	/*
1299 	 * The command is used for certificate provisioning to query the
1300 	 * provisioned state.
1301 	 */
1302 	#define HWRM_MFG_PRVSN_GET_STATE		UINT32_C(0x213)
1303 	/*
1304 	 * The command is used to get the hash of the NVM configuration that is
1305 	 * calculated during firmware boot.
1306 	 */
1307 	#define HWRM_MFG_GET_NVM_MEASUREMENT		UINT32_C(0x214)
1308 	/* Retrieves the PSOC status and provisioning information. */
1309 	#define HWRM_MFG_PSOC_QSTATUS			UINT32_C(0x215)
1310 	/*
1311 	 * This command allows manufacturing tool to determine which selftests
1312 	 * are available to be run.
1313 	 */
1314 	#define HWRM_MFG_SELFTEST_QLIST		UINT32_C(0x216)
1315 	/*
1316 	 * This command allows manufacturing tool to request which selftests
1317 	 * to run.
1318 	 */
1319 	#define HWRM_MFG_SELFTEST_EXEC			UINT32_C(0x217)
1320 	/* Queries the generic stats */
1321 	#define HWRM_STAT_GENERIC_QSTATS		UINT32_C(0x218)
1322 	/*
1323 	 * The command is used for certificate provisioning to export a
1324 	 * certificate chain from the device.
1325 	 */
1326 	#define HWRM_MFG_PRVSN_EXPORT_CERT		UINT32_C(0x219)
1327 	/* Query the statistics for doorbell drops due to various error conditions. */
1328 	#define HWRM_STAT_DB_ERROR_QSTATS		UINT32_C(0x21a)
1329 	/*
1330 	 * This command returns the capabilities related to User Defined
1331 	 * Congestion Control on a function.
1332 	 */
1333 	#define HWRM_UDCC_QCAPS			UINT32_C(0x258)
1334 	/* This command configures User Defined Congestion Control on a function. */
1335 	#define HWRM_UDCC_CFG				UINT32_C(0x259)
1336 	/*
1337 	 * This command queries the configuration of User Defined Congestion
1338 	 * Control on a function.
1339 	 */
1340 	#define HWRM_UDCC_QCFG				UINT32_C(0x25a)
1341 	/* This command configures an existing UDCC session. */
1342 	#define HWRM_UDCC_SESSION_CFG			UINT32_C(0x25b)
1343 	/* This command queries the configuration of a UDCC session. */
1344 	#define HWRM_UDCC_SESSION_QCFG			UINT32_C(0x25c)
1345 	/* This command queries the UDCC session. */
1346 	#define HWRM_UDCC_SESSION_QUERY		UINT32_C(0x25d)
1347 	/* This command configures the computation unit. */
1348 	#define HWRM_UDCC_COMP_CFG			UINT32_C(0x25e)
1349 	/* This command queries the configuration of the computation unit. */
1350 	#define HWRM_UDCC_COMP_QCFG			UINT32_C(0x25f)
1351 	/* This command queries the status and statistics of the computation unit. */
1352 	#define HWRM_UDCC_COMP_QUERY			UINT32_C(0x260)
1353 	/* Experimental */
1354 	#define HWRM_TF				UINT32_C(0x2bc)
1355 	/* Experimental */
1356 	#define HWRM_TF_VERSION_GET			UINT32_C(0x2bd)
1357 	/* Experimental */
1358 	#define HWRM_TF_SESSION_OPEN			UINT32_C(0x2c6)
1359 	/* Experimental */
1360 	#define HWRM_TF_SESSION_REGISTER		UINT32_C(0x2c8)
1361 	/* Experimental */
1362 	#define HWRM_TF_SESSION_UNREGISTER		UINT32_C(0x2c9)
1363 	/* Experimental */
1364 	#define HWRM_TF_SESSION_CLOSE			UINT32_C(0x2ca)
1365 	/* Experimental */
1366 	#define HWRM_TF_SESSION_QCFG			UINT32_C(0x2cb)
1367 	/* Experimental */
1368 	#define HWRM_TF_SESSION_RESC_QCAPS		UINT32_C(0x2cc)
1369 	/* Experimental */
1370 	#define HWRM_TF_SESSION_RESC_ALLOC		UINT32_C(0x2cd)
1371 	/* Experimental */
1372 	#define HWRM_TF_SESSION_RESC_FREE		UINT32_C(0x2ce)
1373 	/* Experimental */
1374 	#define HWRM_TF_SESSION_RESC_FLUSH		UINT32_C(0x2cf)
1375 	/* Experimental */
1376 	#define HWRM_TF_SESSION_RESC_INFO		UINT32_C(0x2d0)
1377 	/* Experimental */
1378 	#define HWRM_TF_SESSION_HOTUP_STATE_SET	UINT32_C(0x2d1)
1379 	/* Experimental */
1380 	#define HWRM_TF_SESSION_HOTUP_STATE_GET	UINT32_C(0x2d2)
1381 	/* Experimental */
1382 	#define HWRM_TF_TBL_TYPE_GET			UINT32_C(0x2da)
1383 	/* Experimental */
1384 	#define HWRM_TF_TBL_TYPE_SET			UINT32_C(0x2db)
1385 	/* Experimental */
1386 	#define HWRM_TF_TBL_TYPE_BULK_GET		UINT32_C(0x2dc)
1387 	/* Experimental */
1388 	#define HWRM_TF_EM_INSERT			UINT32_C(0x2ea)
1389 	/* Experimental */
1390 	#define HWRM_TF_EM_DELETE			UINT32_C(0x2eb)
1391 	/* Experimental */
1392 	#define HWRM_TF_EM_HASH_INSERT			UINT32_C(0x2ec)
1393 	/* Experimental */
1394 	#define HWRM_TF_EM_MOVE			UINT32_C(0x2ed)
1395 	/* Experimental */
1396 	#define HWRM_TF_TCAM_SET			UINT32_C(0x2f8)
1397 	/* Experimental */
1398 	#define HWRM_TF_TCAM_GET			UINT32_C(0x2f9)
1399 	/* Experimental */
1400 	#define HWRM_TF_TCAM_MOVE			UINT32_C(0x2fa)
1401 	/* Experimental */
1402 	#define HWRM_TF_TCAM_FREE			UINT32_C(0x2fb)
1403 	/* Experimental */
1404 	#define HWRM_TF_GLOBAL_CFG_SET			UINT32_C(0x2fc)
1405 	/* Experimental */
1406 	#define HWRM_TF_GLOBAL_CFG_GET			UINT32_C(0x2fd)
1407 	/* Experimental */
1408 	#define HWRM_TF_IF_TBL_SET			UINT32_C(0x2fe)
1409 	/* Experimental */
1410 	#define HWRM_TF_IF_TBL_GET			UINT32_C(0x2ff)
1411 	/* Experimental */
1412 	#define HWRM_TF_RESC_USAGE_SET			UINT32_C(0x300)
1413 	/* Experimental */
1414 	#define HWRM_TF_RESC_USAGE_QUERY		UINT32_C(0x301)
1415 	/* Truflow command to allocate a table */
1416 	#define HWRM_TF_TBL_TYPE_ALLOC			UINT32_C(0x302)
1417 	/* Truflow command to free a table */
1418 	#define HWRM_TF_TBL_TYPE_FREE			UINT32_C(0x303)
1419 	/* TruFlow command to check firmware table scope capabilities. */
1420 	#define HWRM_TFC_TBL_SCOPE_QCAPS		UINT32_C(0x380)
1421 	/* TruFlow command to allocate a table scope ID and create the pools. */
1422 	#define HWRM_TFC_TBL_SCOPE_ID_ALLOC		UINT32_C(0x381)
1423 	/* TruFlow command to configure the table scope memory. */
1424 	#define HWRM_TFC_TBL_SCOPE_CONFIG		UINT32_C(0x382)
1425 	/* TruFlow command to deconfigure a table scope memory. */
1426 	#define HWRM_TFC_TBL_SCOPE_DECONFIG		UINT32_C(0x383)
1427 	/* TruFlow command to add a FID to a table scope. */
1428 	#define HWRM_TFC_TBL_SCOPE_FID_ADD		UINT32_C(0x384)
1429 	/* TruFlow command to remove a FID from a table scope. */
1430 	#define HWRM_TFC_TBL_SCOPE_FID_REM		UINT32_C(0x385)
1431 	/* DEPRECATED */
1432 	#define HWRM_TFC_TBL_SCOPE_POOL_ALLOC		UINT32_C(0x386)
1433 	/* DEPRECATED */
1434 	#define HWRM_TFC_TBL_SCOPE_POOL_FREE		UINT32_C(0x387)
1435 	/* Experimental */
1436 	#define HWRM_TFC_SESSION_ID_ALLOC		UINT32_C(0x388)
1437 	/* Experimental */
1438 	#define HWRM_TFC_SESSION_FID_ADD		UINT32_C(0x389)
1439 	/* Experimental */
1440 	#define HWRM_TFC_SESSION_FID_REM		UINT32_C(0x38a)
1441 	/* Experimental */
1442 	#define HWRM_TFC_IDENT_ALLOC			UINT32_C(0x38b)
1443 	/* Experimental */
1444 	#define HWRM_TFC_IDENT_FREE			UINT32_C(0x38c)
1445 	/* TruFlow command to allocate an index table entry */
1446 	#define HWRM_TFC_IDX_TBL_ALLOC			UINT32_C(0x38d)
1447 	/* TruFlow command to allocate and set an index table entry */
1448 	#define HWRM_TFC_IDX_TBL_ALLOC_SET		UINT32_C(0x38e)
1449 	/* TruFlow command to set an index table entry */
1450 	#define HWRM_TFC_IDX_TBL_SET			UINT32_C(0x38f)
1451 	/* TruFlow command to get an index table entry */
1452 	#define HWRM_TFC_IDX_TBL_GET			UINT32_C(0x390)
1453 	/* TruFlow command to free an index table entry */
1454 	#define HWRM_TFC_IDX_TBL_FREE			UINT32_C(0x391)
1455 	/* TruFlow command to allocate resources for a global id. */
1456 	#define HWRM_TFC_GLOBAL_ID_ALLOC		UINT32_C(0x392)
1457 	/* TruFlow command to set TCAM entry. */
1458 	#define HWRM_TFC_TCAM_SET			UINT32_C(0x393)
1459 	/* TruFlow command to get TCAM entry. */
1460 	#define HWRM_TFC_TCAM_GET			UINT32_C(0x394)
1461 	/* TruFlow command to allocate a TCAM entry. */
1462 	#define HWRM_TFC_TCAM_ALLOC			UINT32_C(0x395)
1463 	/* TruFlow command allocate and set TCAM entry. */
1464 	#define HWRM_TFC_TCAM_ALLOC_SET		UINT32_C(0x396)
1465 	/* TruFlow command to free a TCAM entry. */
1466 	#define HWRM_TFC_TCAM_FREE			UINT32_C(0x397)
1467 	/* Truflow command to set an interface table entry */
1468 	#define HWRM_TFC_IF_TBL_SET			UINT32_C(0x398)
1469 	/* Truflow command to get an interface table entry */
1470 	#define HWRM_TFC_IF_TBL_GET			UINT32_C(0x399)
1471 	/* TruFlow command to get configured info about a table scope. */
1472 	#define HWRM_TFC_TBL_SCOPE_CONFIG_GET		UINT32_C(0x39a)
1473 	/* TruFlow command to query the resource usage state. */
1474 	#define HWRM_TFC_RESC_USAGE_QUERY		UINT32_C(0x39b)
1475 	/*
1476 	 * This command is used to query the pfc watchdog max configurable
1477 	 * timeout value.
1478 	 */
1479 	#define HWRM_QUEUE_PFCWD_TIMEOUT_QCAPS		UINT32_C(0x39c)
1480 	/* This command is used to set the PFC watchdog timeout value. */
1481 	#define HWRM_QUEUE_PFCWD_TIMEOUT_CFG		UINT32_C(0x39d)
1482 	/*
1483 	 * This command is used to query the current configured pfc watchdog
1484 	 * timeout value.
1485 	 */
1486 	#define HWRM_QUEUE_PFCWD_TIMEOUT_QCFG		UINT32_C(0x39e)
1487 	/* Experimental */
1488 	#define HWRM_SV				UINT32_C(0x400)
1489 	/* Flush any trace buffer data that has not been sent to the host. */
1490 	#define HWRM_DBG_LOG_BUFFER_FLUSH		UINT32_C(0xff0f)
1491 	/* Experimental */
1492 	#define HWRM_DBG_READ_DIRECT			UINT32_C(0xff10)
1493 	/* Experimental */
1494 	#define HWRM_DBG_READ_INDIRECT			UINT32_C(0xff11)
1495 	/* Experimental */
1496 	#define HWRM_DBG_WRITE_DIRECT			UINT32_C(0xff12)
1497 	/* Experimental */
1498 	#define HWRM_DBG_WRITE_INDIRECT		UINT32_C(0xff13)
1499 	#define HWRM_DBG_DUMP				UINT32_C(0xff14)
1500 	/* Experimental */
1501 	#define HWRM_DBG_ERASE_NVM			UINT32_C(0xff15)
1502 	/* Experimental */
1503 	#define HWRM_DBG_CFG				UINT32_C(0xff16)
1504 	/* Experimental */
1505 	#define HWRM_DBG_COREDUMP_LIST			UINT32_C(0xff17)
1506 	/* Experimental */
1507 	#define HWRM_DBG_COREDUMP_INITIATE		UINT32_C(0xff18)
1508 	/* Experimental */
1509 	#define HWRM_DBG_COREDUMP_RETRIEVE		UINT32_C(0xff19)
1510 	/* Experimental */
1511 	#define HWRM_DBG_FW_CLI			UINT32_C(0xff1a)
1512 	/*  */
1513 	#define HWRM_DBG_I2C_CMD			UINT32_C(0xff1b)
1514 	/*  */
1515 	#define HWRM_DBG_RING_INFO_GET			UINT32_C(0xff1c)
1516 	/* Experimental */
1517 	#define HWRM_DBG_CRASHDUMP_HEADER		UINT32_C(0xff1d)
1518 	/* Experimental */
1519 	#define HWRM_DBG_CRASHDUMP_ERASE		UINT32_C(0xff1e)
1520 	/* Send driver debug information to firmware */
1521 	#define HWRM_DBG_DRV_TRACE			UINT32_C(0xff1f)
1522 	/* Query debug capabilities of firmware */
1523 	#define HWRM_DBG_QCAPS				UINT32_C(0xff20)
1524 	/* Retrieve debug settings of firmware */
1525 	#define HWRM_DBG_QCFG				UINT32_C(0xff21)
1526 	/* Set destination parameters for crashdump medium */
1527 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG		UINT32_C(0xff22)
1528 	/* Experimental */
1529 	#define HWRM_DBG_USEQ_ALLOC			UINT32_C(0xff23)
1530 	/* Experimental */
1531 	#define HWRM_DBG_USEQ_FREE			UINT32_C(0xff24)
1532 	/* Experimental */
1533 	#define HWRM_DBG_USEQ_FLUSH			UINT32_C(0xff25)
1534 	/* Experimental */
1535 	#define HWRM_DBG_USEQ_QCAPS			UINT32_C(0xff26)
1536 	/* Experimental */
1537 	#define HWRM_DBG_USEQ_CW_CFG			UINT32_C(0xff27)
1538 	/* Experimental */
1539 	#define HWRM_DBG_USEQ_SCHED_CFG		UINT32_C(0xff28)
1540 	/* Experimental */
1541 	#define HWRM_DBG_USEQ_RUN			UINT32_C(0xff29)
1542 	/* Experimental */
1543 	#define HWRM_DBG_USEQ_DELIVERY_REQ		UINT32_C(0xff2a)
1544 	/* Experimental */
1545 	#define HWRM_DBG_USEQ_RESP_HDR			UINT32_C(0xff2b)
1546 	#define HWRM_NVM_GET_VPD_FIELD_INFO		UINT32_C(0xffea)
1547 	#define HWRM_NVM_SET_VPD_FIELD_INFO		UINT32_C(0xffeb)
1548 	#define HWRM_NVM_DEFRAG			UINT32_C(0xffec)
1549 	#define HWRM_NVM_REQ_ARBITRATION		UINT32_C(0xffed)
1550 	/* Experimental */
1551 	#define HWRM_NVM_FACTORY_DEFAULTS		UINT32_C(0xffee)
1552 	#define HWRM_NVM_VALIDATE_OPTION		UINT32_C(0xffef)
1553 	#define HWRM_NVM_FLUSH				UINT32_C(0xfff0)
1554 	#define HWRM_NVM_GET_VARIABLE			UINT32_C(0xfff1)
1555 	#define HWRM_NVM_SET_VARIABLE			UINT32_C(0xfff2)
1556 	#define HWRM_NVM_INSTALL_UPDATE		UINT32_C(0xfff3)
1557 	#define HWRM_NVM_MODIFY			UINT32_C(0xfff4)
1558 	#define HWRM_NVM_VERIFY_UPDATE			UINT32_C(0xfff5)
1559 	#define HWRM_NVM_GET_DEV_INFO			UINT32_C(0xfff6)
1560 	#define HWRM_NVM_ERASE_DIR_ENTRY		UINT32_C(0xfff7)
1561 	#define HWRM_NVM_MOD_DIR_ENTRY			UINT32_C(0xfff8)
1562 	#define HWRM_NVM_FIND_DIR_ENTRY		UINT32_C(0xfff9)
1563 	#define HWRM_NVM_GET_DIR_ENTRIES		UINT32_C(0xfffa)
1564 	#define HWRM_NVM_GET_DIR_INFO			UINT32_C(0xfffb)
1565 	#define HWRM_NVM_RAW_DUMP			UINT32_C(0xfffc)
1566 	#define HWRM_NVM_READ				UINT32_C(0xfffd)
1567 	#define HWRM_NVM_WRITE				UINT32_C(0xfffe)
1568 	#define HWRM_NVM_RAW_WRITE_BLK			UINT32_C(0xffff)
1569 	#define HWRM_LAST				HWRM_NVM_RAW_WRITE_BLK
1570 	uint16_t	unused_0[3];
1571 } cmd_nums_t, *pcmd_nums_t;
1572 
1573 /* Return Codes */
1574 /* ret_codes (size:64b/8B) */
1575 
1576 typedef struct ret_codes {
1577 	uint16_t	error_code;
1578 	/* Request was successfully executed by the HWRM. */
1579 	#define HWRM_ERR_CODE_SUCCESS			UINT32_C(0x0)
1580 	/* The HWRM failed to execute the request. */
1581 	#define HWRM_ERR_CODE_FAIL			UINT32_C(0x1)
1582 	/*
1583 	 * The request contains invalid argument(s) or input
1584 	 * parameters.
1585 	 */
1586 	#define HWRM_ERR_CODE_INVALID_PARAMS		UINT32_C(0x2)
1587 	/*
1588 	 * The requester is not allowed to access the requested
1589 	 * resource. This error code shall be provided in a
1590 	 * response to a request to query or modify an existing
1591 	 * resource that is not accessible by the requester.
1592 	 */
1593 	#define HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED	UINT32_C(0x3)
1594 	/*
1595 	 * The HWRM is unable to allocate the requested resource.
1596 	 * This code only applies to requests for HWRM resource
1597 	 * allocations.
1598 	 */
1599 	#define HWRM_ERR_CODE_RESOURCE_ALLOC_ERROR	UINT32_C(0x4)
1600 	/*
1601 	 * Invalid combination of flags is specified in the
1602 	 * request.
1603 	 */
1604 	#define HWRM_ERR_CODE_INVALID_FLAGS		UINT32_C(0x5)
1605 	/*
1606 	 * Invalid combination of enables fields is specified in
1607 	 * the request.
1608 	 */
1609 	#define HWRM_ERR_CODE_INVALID_ENABLES		UINT32_C(0x6)
1610 	/*
1611 	 * Request contains a required TLV that is not supported by
1612 	 * the installed version of firmware.
1613 	 */
1614 	#define HWRM_ERR_CODE_UNSUPPORTED_TLV		UINT32_C(0x7)
1615 	/*
1616 	 * No firmware buffer available to accept the request. Driver
1617 	 * should retry the request.
1618 	 */
1619 	#define HWRM_ERR_CODE_NO_BUFFER			UINT32_C(0x8)
1620 	/*
1621 	 * This error code is only reported by firmware when some
1622 	 * sub-option of a supported HWRM command is unsupported.
1623 	 */
1624 	#define HWRM_ERR_CODE_UNSUPPORTED_OPTION_ERR	UINT32_C(0x9)
1625 	/*
1626 	 * This error code is only reported by firmware when the specific
1627 	 * request is not able to process when the HOT reset in progress.
1628 	 */
1629 	#define HWRM_ERR_CODE_HOT_RESET_PROGRESS	UINT32_C(0xa)
1630 	/*
1631 	 * This error code is only reported by firmware when the registered
1632 	 * driver instances are not capable of hot reset.
1633 	 */
1634 	#define HWRM_ERR_CODE_HOT_RESET_FAIL		UINT32_C(0xb)
1635 	/*
1636 	 * This error code is only reported by the firmware when during
1637 	 * flow allocation when a request for a flow counter fails because
1638 	 * the number of flow counters are exhausted.
1639 	 */
1640 	#define HWRM_ERR_CODE_NO_FLOW_COUNTER_DURING_ALLOC UINT32_C(0xc)
1641 	/*
1642 	 * This error code is only reported by firmware when the registered
1643 	 * driver instances requested to offloaded a flow but was unable to
1644 	 * because the requested key's hash collides with the installed keys.
1645 	 */
1646 	#define HWRM_ERR_CODE_KEY_HASH_COLLISION	UINT32_C(0xd)
1647 	/*
1648 	 * This error code is only reported by firmware when the registered
1649 	 * driver instances requested to offloaded a flow but was unable to
1650 	 * because the same key has already been installed.
1651 	 */
1652 	#define HWRM_ERR_CODE_KEY_ALREADY_EXISTS	UINT32_C(0xe)
1653 	/*
1654 	 * Generic HWRM execution error that represents an
1655 	 * internal error.
1656 	 */
1657 	#define HWRM_ERR_CODE_HWRM_ERROR		UINT32_C(0xf)
1658 	/*
1659 	 * Firmware is unable to service the request at the present time.
1660 	 * Caller may try again later.
1661 	 */
1662 	#define HWRM_ERR_CODE_BUSY			UINT32_C(0x10)
1663 	/*
1664 	 * This error code is reported by Firmware when an operation requested
1665 	 * by the host is not allowed due to a secure lock violation.
1666 	 */
1667 	#define HWRM_ERR_CODE_RESOURCE_LOCKED		UINT32_C(0x11)
1668 	/*
1669 	 * This error code is reported by Firmware when an operation requested
1670 	 * by a VF cannot be forwarded to the parent PF as required, either
1671 	 * because the PF is down or otherwise doesn't have an appropriate
1672 	 * async completion ring or associated forwarding buffers configured.
1673 	 */
1674 	#define HWRM_ERR_CODE_PF_UNAVAILABLE		UINT32_C(0x12)
1675 	/*
1676 	 * This error code is reported by Firmware when the specific entity
1677 	 * requested by the host is not present or does not exist.
1678 	 */
1679 	#define HWRM_ERR_CODE_ENTITY_NOT_PRESENT	UINT32_C(0x13)
1680 	/*
1681 	 * This value indicates that the HWRM response is in TLV format and
1682 	 * should be interpreted as one or more TLVs starting with the
1683 	 * hwrm_resp_hdr TLV. This value is not an indication of any error
1684 	 * by itself, just an indication that the response should be parsed
1685 	 * as TLV and the actual error code will be in the hwrm_resp_hdr TLV.
1686 	 */
1687 	#define HWRM_ERR_CODE_TLV_ENCAPSULATED_RESPONSE	UINT32_C(0x8000)
1688 	/* Unknown error */
1689 	#define HWRM_ERR_CODE_UNKNOWN_ERR		UINT32_C(0xfffe)
1690 	/* Unsupported or invalid command */
1691 	#define HWRM_ERR_CODE_CMD_NOT_SUPPORTED		UINT32_C(0xffff)
1692 	#define HWRM_ERR_CODE_LAST			HWRM_ERR_CODE_CMD_NOT_SUPPORTED
1693 	uint16_t	unused_0[3];
1694 } ret_codes_t, *pret_codes_t;
1695 
1696 #define GET_HWRM_ERROR_CODE(x) \
1697 	(((x) < 0x80) ? \
1698 	((x) == 0x0 ? "SUCCESS": \
1699 	((x) == 0x1 ? "FAIL": \
1700 	((x) == 0x2 ? "INVALID_PARAMS": \
1701 	((x) == 0x3 ? "RESOURCE_ACCESS_DENIED": \
1702 	((x) == 0x4 ? "RESOURCE_ALLOC_ERROR": \
1703 	((x) == 0x5 ? "INVALID_FLAGS": \
1704 	((x) == 0x6 ? "INVALID_ENABLES": \
1705 	((x) == 0x7 ? "UNSUPPORTED_TLV": \
1706 	((x) == 0x8 ? "NO_BUFFER": \
1707 	((x) == 0x9 ? "UNSUPPORTED_OPTION_ERR": \
1708 	((x) == 0xa ? "HOT_RESET_PROGRESS": \
1709 	((x) == 0xb ? "HOT_RESET_FAIL": \
1710 	((x) == 0xc ? "NO_FLOW_COUNTER_DURING_ALLOC": \
1711 	((x) == 0xd ? "KEY_HASH_COLLISION": \
1712 	((x) == 0xe ? "KEY_ALREADY_EXISTS": \
1713 	((x) == 0xf ? "HWRM_ERROR": \
1714 	((x) == 0x10 ? "BUSY": \
1715 	((x) == 0x11 ? "RESOURCE_LOCKED": \
1716 	((x) == 0x12 ? "PF_UNAVAILABLE": \
1717 	((x) == 0x13 ? "ENTITY_NOT_PRESENT": \
1718 	"Unknown decode" )))))))))))))))))))) : \
1719 	(((x) < 0x8080) ? \
1720 	((x) == 0x8000 ? "TLV_ENCAPSULATED_RESPONSE": \
1721 	"Unknown decode" ) : \
1722 	(((x) <= 0xffff) ? \
1723 	((x) == 0xfffe ? "UNKNOWN_ERR": \
1724 	((x) == 0xffff ? "CMD_NOT_SUPPORTED": \
1725 	"Unknown decode" )) : \
1726 	"Unknown decode" )))
1727 
1728 
1729 /* Output */
1730 /* hwrm_err_output (size:128b/16B) */
1731 
1732 typedef struct hwrm_err_output {
1733 	/*
1734 	 * Pass/Fail or error type
1735 	 *
1736 	 * Note: receiver to verify the in parameters, and fail the call
1737 	 * with an error when appropriate
1738 	 */
1739 	uint16_t	error_code;
1740 	/* This field returns the type of original request. */
1741 	uint16_t	req_type;
1742 	/* This field provides original sequence number of the command. */
1743 	uint16_t	seq_id;
1744 	/*
1745 	 * This field is the length of the response in bytes. The
1746 	 * last byte of the response is a valid flag that will read
1747 	 * as '1' when the command has been completely written to
1748 	 * memory.
1749 	 */
1750 	uint16_t	resp_len;
1751 	/* debug info for this error response. */
1752 	uint32_t	opaque_0;
1753 	/* debug info for this error response. */
1754 	uint16_t	opaque_1;
1755 	/*
1756 	 * In the case of an error response, command specific error
1757 	 * code is returned in this field.
1758 	 */
1759 	uint8_t	cmd_err;
1760 	/*
1761 	 * This field is used in Output records to indicate that the output
1762 	 * is completely written to RAM. This field should be read as '1'
1763 	 * to indicate that the output has been completely written. When
1764 	 * writing a command completion or response to an internal processor,
1765 	 * the order of writes has to be such that this field is written last.
1766 	 */
1767 	uint8_t	valid;
1768 } hwrm_err_output_t, *phwrm_err_output_t;
1769 
1770 /*
1771  * Following is the signature for HWRM message field that indicates not
1772  * applicable (All F's). Need to cast it the size of the field if needed.
1773  */
1774 #define HWRM_NA_SIGNATURE ((uint32_t)(-1))
1775 /*
1776  * This is reflecting the size of the PF mailbox and not the maximum
1777  * command size for any of the HWRM command structures. To determine
1778  * the maximum size of an HWRM command supported by the firmware, see
1779  * the max_ext_req_len field in the response of the HWRM_VER_GET command.
1780  */
1781 #define HWRM_MAX_REQ_LEN 128
1782 /* hwrm_cfa_flow_info */
1783 #define HWRM_MAX_RESP_LEN 704
1784 /* 7 bit indirection table index. */
1785 #define HW_HASH_INDEX_SIZE 0x80
1786 #define HW_HASH_KEY_SIZE 40
1787 /* valid key for HWRM response */
1788 #define HWRM_RESP_VALID_KEY 1
1789 /* Reserved for BONO processor */
1790 #define HWRM_TARGET_ID_BONO 0xFFF8
1791 /* Reserved for KONG processor */
1792 #define HWRM_TARGET_ID_KONG 0xFFF9
1793 /* Reserved for APE processor */
1794 #define HWRM_TARGET_ID_APE 0xFFFA
1795 /*
1796  * This value will be used by tools for User-space HWRM Interface.
1797  * When tool execute any HWRM command with this target_id, firmware
1798  * will copy the response and/or data payload via register space instead
1799  * of DMAing it.
1800  */
1801 #define HWRM_TARGET_ID_TOOLS 0xFFFD
1802 #define HWRM_VERSION_MAJOR 1
1803 #define HWRM_VERSION_MINOR 10
1804 #define HWRM_VERSION_UPDATE 3
1805 /* non-zero means beta version */
1806 #define HWRM_VERSION_RSVD 42
1807 #define HWRM_VERSION_STR "1.10.3.42"
1808 
1809 /****************
1810  * hwrm_ver_get *
1811  ****************/
1812 
1813 
1814 /* hwrm_ver_get_input (size:192b/24B) */
1815 
1816 typedef struct hwrm_ver_get_input {
1817 	/* The HWRM command request type. */
1818 	uint16_t	req_type;
1819 	/*
1820 	 * The completion ring to send the completion event on. This should
1821 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
1822 	 */
1823 	uint16_t	cmpl_ring;
1824 	/*
1825 	 * The sequence ID is used by the driver for tracking multiple
1826 	 * commands. This ID is treated as opaque data by the firmware and
1827 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
1828 	 */
1829 	uint16_t	seq_id;
1830 	/*
1831 	 * The target ID of the command:
1832 	 * * 0x0-0xFFF8 - The function ID
1833 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
1834 	 * * 0xFFFD - Reserved for user-space HWRM interface
1835 	 * * 0xFFFF - HWRM
1836 	 */
1837 	uint16_t	target_id;
1838 	/*
1839 	 * A physical address pointer pointing to a host buffer that the
1840 	 * command's response data will be written. This can be either a host
1841 	 * physical address (HPA) or a guest physical address (GPA) and must
1842 	 * point to a physically contiguous block of memory.
1843 	 */
1844 	uint64_t	resp_addr;
1845 	/*
1846 	 * This field represents the major version of HWRM interface
1847 	 * specification supported by the driver HWRM implementation.
1848 	 * The interface major version is intended to change only when
1849 	 * non backward compatible changes are made to the HWRM
1850 	 * interface specification.
1851 	 */
1852 	uint8_t	hwrm_intf_maj;
1853 	/*
1854 	 * This field represents the minor version of HWRM interface
1855 	 * specification supported by the driver HWRM implementation.
1856 	 * A change in interface minor version is used to reflect
1857 	 * significant backward compatible modification to HWRM
1858 	 * interface specification.
1859 	 * This can be due to addition or removal of functionality.
1860 	 * HWRM interface specifications with the same major version
1861 	 * but different minor versions are compatible.
1862 	 */
1863 	uint8_t	hwrm_intf_min;
1864 	/*
1865 	 * This field represents the update version of HWRM interface
1866 	 * specification supported by the driver HWRM implementation.
1867 	 * The interface update version is used to reflect minor
1868 	 * changes or bug fixes to a released HWRM interface
1869 	 * specification.
1870 	 */
1871 	uint8_t	hwrm_intf_upd;
1872 	uint8_t	unused_0[5];
1873 } hwrm_ver_get_input_t, *phwrm_ver_get_input_t;
1874 
1875 /* hwrm_ver_get_output (size:1408b/176B) */
1876 
1877 typedef struct hwrm_ver_get_output {
1878 	/* The specific error status for the command. */
1879 	uint16_t	error_code;
1880 	/* The HWRM command request type. */
1881 	uint16_t	req_type;
1882 	/* The sequence ID from the original command. */
1883 	uint16_t	seq_id;
1884 	/* The length of the response data in number of bytes. */
1885 	uint16_t	resp_len;
1886 	/*
1887 	 * This field represents the major version of HWRM interface
1888 	 * specification supported by the HWRM implementation.
1889 	 * The interface major version is intended to change only when
1890 	 * non backward compatible changes are made to the HWRM
1891 	 * interface specification.
1892 	 * A HWRM implementation that is compliant with this
1893 	 * specification shall provide value of 1 in this field.
1894 	 */
1895 	uint8_t	hwrm_intf_maj_8b;
1896 	/*
1897 	 * This field represents the minor version of HWRM interface
1898 	 * specification supported by the HWRM implementation.
1899 	 * A change in interface minor version is used to reflect
1900 	 * significant backward compatible modification to HWRM
1901 	 * interface specification.
1902 	 * This can be due to addition or removal of functionality.
1903 	 * HWRM interface specifications with the same major version
1904 	 * but different minor versions are compatible.
1905 	 * A HWRM implementation that is compliant with this
1906 	 * specification shall provide value of 2 in this field.
1907 	 */
1908 	uint8_t	hwrm_intf_min_8b;
1909 	/*
1910 	 * This field represents the update version of HWRM interface
1911 	 * specification supported by the HWRM implementation.
1912 	 * The interface update version is used to reflect minor
1913 	 * changes or bug fixes to a released HWRM interface
1914 	 * specification.
1915 	 * A HWRM implementation that is compliant with this
1916 	 * specification shall provide value of 2 in this field.
1917 	 */
1918 	uint8_t	hwrm_intf_upd_8b;
1919 	uint8_t	hwrm_intf_rsvd_8b;
1920 	/*
1921 	 * This field represents the major version of HWRM firmware.
1922 	 * A change in firmware major version represents a major
1923 	 * firmware release.
1924 	 */
1925 	uint8_t	hwrm_fw_maj_8b;
1926 	/*
1927 	 * This field represents the minor version of HWRM firmware.
1928 	 * A change in firmware minor version represents significant
1929 	 * firmware functionality changes.
1930 	 */
1931 	uint8_t	hwrm_fw_min_8b;
1932 	/*
1933 	 * This field represents the build version of HWRM firmware.
1934 	 * A change in firmware build version represents bug fixes
1935 	 * to a released firmware.
1936 	 */
1937 	uint8_t	hwrm_fw_bld_8b;
1938 	/*
1939 	 * This field is a reserved field. This field can be used to
1940 	 * represent firmware branches or customer specific releases
1941 	 * tied to a specific (major,minor,update) version of the
1942 	 * HWRM firmware.
1943 	 */
1944 	uint8_t	hwrm_fw_rsvd_8b;
1945 	/*
1946 	 * This field represents the major version of mgmt firmware.
1947 	 * A change in major version represents a major release.
1948 	 */
1949 	uint8_t	mgmt_fw_maj_8b;
1950 	/*
1951 	 * This field represents the minor version of mgmt firmware.
1952 	 * A change in minor version represents significant
1953 	 * functionality changes.
1954 	 */
1955 	uint8_t	mgmt_fw_min_8b;
1956 	/*
1957 	 * This field represents the build version of mgmt firmware.
1958 	 * A change in update version represents bug fixes.
1959 	 */
1960 	uint8_t	mgmt_fw_bld_8b;
1961 	/*
1962 	 * This field is a reserved field. This field can be used to
1963 	 * represent firmware branches or customer specific releases
1964 	 * tied to a specific (major,minor,update) version
1965 	 */
1966 	uint8_t	mgmt_fw_rsvd_8b;
1967 	/*
1968 	 * This field represents the major version of network
1969 	 * control firmware.
1970 	 * A change in major version represents a major release.
1971 	 */
1972 	uint8_t	netctrl_fw_maj_8b;
1973 	/*
1974 	 * This field represents the minor version of network
1975 	 * control firmware.
1976 	 * A change in minor version represents significant
1977 	 * functionality changes.
1978 	 */
1979 	uint8_t	netctrl_fw_min_8b;
1980 	/*
1981 	 * This field represents the build version of network
1982 	 * control firmware.
1983 	 * A change in update version represents bug fixes.
1984 	 */
1985 	uint8_t	netctrl_fw_bld_8b;
1986 	/*
1987 	 * This field is a reserved field. This field can be used to
1988 	 * represent firmware branches or customer specific releases
1989 	 * tied to a specific (major,minor,update) version
1990 	 */
1991 	uint8_t	netctrl_fw_rsvd_8b;
1992 	/*
1993 	 * This field is used to indicate device's capabilities and
1994 	 * configurations.
1995 	 */
1996 	uint32_t	dev_caps_cfg;
1997 	/*
1998 	 * If set to 1, then secure firmware update behavior
1999 	 * is supported.
2000 	 * If set to 0, then secure firmware update behavior is
2001 	 * not supported.
2002 	 */
2003 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SECURE_FW_UPD_SUPPORTED		UINT32_C(0x1)
2004 	/*
2005 	 * If set to 1, then firmware based DCBX agent is supported.
2006 	 * If set to 0, then firmware based DCBX agent capability
2007 	 * is not supported on this device.
2008 	 */
2009 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_FW_DCBX_AGENT_SUPPORTED		UINT32_C(0x2)
2010 	/*
2011 	 * If set to 1, then HWRM short command format is supported.
2012 	 * If set to 0, then HWRM short command format is not supported.
2013 	 */
2014 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED			UINT32_C(0x4)
2015 	/*
2016 	 * If set to 1, then HWRM short command format is required.
2017 	 * If set to 0, then HWRM short command format is not required.
2018 	 */
2019 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_REQUIRED			UINT32_C(0x8)
2020 	/*
2021 	 * If set to 1, then the KONG host mailbox channel is supported.
2022 	 * If set to 0, then the KONG host mailbox channel is not supported.
2023 	 * By default, this flag should be 0 for older version of core
2024 	 * firmware.
2025 	 */
2026 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_KONG_MB_CHNL_SUPPORTED		UINT32_C(0x10)
2027 	/*
2028 	 * If set to 1, then the 64bit flow handle is supported in addition
2029 	 * to the legacy 16bit flow handle. If set to 0, then the 64bit flow
2030 	 * handle is not supported. By default, this flag should be 0 for
2031 	 * older version of core firmware.
2032 	 */
2033 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_FLOW_HANDLE_64BIT_SUPPORTED		UINT32_C(0x20)
2034 	/*
2035 	 * If set to 1, then filter type can be provided in filter_alloc or
2036 	 * filter_cfg filter types like L2 for l2 traffic and ROCE for roce &
2037 	 * l2 traffic. If set to 0, then filter types not supported. By
2038 	 * default, this flag should be 0 for older version of core firmware.
2039 	 */
2040 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_L2_FILTER_TYPES_ROCE_OR_L2_SUPPORTED	UINT32_C(0x40)
2041 	/*
2042 	 * If set to 1, firmware is capable to support virtio vSwitch offload
2043 	 * model. If set to 0, firmware can't supported virtio vSwitch
2044 	 * offload model.
2045 	 * By default, this flag should be 0 for older version of core
2046 	 * firmware.
2047 	 */
2048 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_VIRTIO_VSWITCH_OFFLOAD_SUPPORTED	UINT32_C(0x80)
2049 	/*
2050 	 * If set to 1, firmware is capable to support trusted VF.
2051 	 * If set to 0, firmware is not capable to support trusted VF.
2052 	 * By default, this flag should be 0 for older version of core
2053 	 * firmware.
2054 	 */
2055 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_TRUSTED_VF_SUPPORTED			UINT32_C(0x100)
2056 	/*
2057 	 * If set to 1, firmware is capable to support flow aging.
2058 	 * If set to 0, firmware is not capable to support flow aging.
2059 	 * By default, this flag should be 0 for older version of core
2060 	 * firmware. (deprecated)
2061 	 */
2062 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_FLOW_AGING_SUPPORTED			UINT32_C(0x200)
2063 	/*
2064 	 * If set to 1, firmware is capable to support advanced flow counters
2065 	 * like, Meter drop counters and EEM counters.
2066 	 * If set to 0, firmware is not capable to support advanced flow
2067 	 * counters. By default, this flag should be 0 for older version of
2068 	 * core firmware. (deprecated)
2069 	 */
2070 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_ADV_FLOW_COUNTERS_SUPPORTED		UINT32_C(0x400)
2071 	/*
2072 	 * If set to 1, the firmware is able to support the use of the CFA
2073 	 * Extended Exact Match(EEM) feature.
2074 	 * If set to 0, firmware is not capable to support the use of the
2075 	 * CFA EEM feature.
2076 	 * By default, this flag should be 0 for older version of core
2077 	 * firmware. (deprecated)
2078 	 */
2079 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_EEM_SUPPORTED			UINT32_C(0x800)
2080 	/*
2081 	 * If set to 1, the firmware is able to support advance CFA flow
2082 	 * management features reported in the HWRM_CFA_FLOW_MGNT_QCAPS.
2083 	 * If set to 0, then the firmware doesn't support the advance CFA
2084 	 * flow management features.
2085 	 * By default, this flag should be 0 for older version of core
2086 	 * firmware.
2087 	 */
2088 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_ADV_FLOW_MGNT_SUPPORTED		UINT32_C(0x1000)
2089 	/*
2090 	 * Deprecated and replaced with cfa_truflow_supported.
2091 	 * If set to 1, the firmware is able to support TFLIB features.
2092 	 * If set to 0, then the firmware doesn't support TFLIB features.
2093 	 * By default, this flag should be 0 for older version of core
2094 	 * firmware.
2095 	 */
2096 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_TFLIB_SUPPORTED			UINT32_C(0x2000)
2097 	/*
2098 	 * If set to 1, the firmware is able to support TruFlow features.
2099 	 * If set to 0, then the firmware doesn't support TruFlow features.
2100 	 * By default, this flag should be 0 for older version of
2101 	 * core firmware.
2102 	 */
2103 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_TRUFLOW_SUPPORTED			UINT32_C(0x4000)
2104 	/*
2105 	 * If set to 1, then firmware supports secure boot.
2106 	 * If set to 0, then firmware doesn't support secure boot.
2107 	 */
2108 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SECURE_BOOT_CAPABLE			UINT32_C(0x8000)
2109 	/*
2110 	 * If set to 1, then firmware is able to support the secure solution
2111 	 * feature.
2112 	 * If set to 0, then firmware does not support the secure solution
2113 	 * feature.
2114 	 */
2115 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SECURE_SOC_CAPABLE			UINT32_C(0x10000)
2116 	/*
2117 	 * This field represents the major version of RoCE firmware.
2118 	 * A change in major version represents a major release.
2119 	 */
2120 	uint8_t	roce_fw_maj_8b;
2121 	/*
2122 	 * This field represents the minor version of RoCE firmware.
2123 	 * A change in minor version represents significant
2124 	 * functionality changes.
2125 	 */
2126 	uint8_t	roce_fw_min_8b;
2127 	/*
2128 	 * This field represents the build version of RoCE firmware.
2129 	 * A change in update version represents bug fixes.
2130 	 */
2131 	uint8_t	roce_fw_bld_8b;
2132 	/*
2133 	 * This field is a reserved field. This field can be used to
2134 	 * represent firmware branches or customer specific releases
2135 	 * tied to a specific (major,minor,update) version
2136 	 */
2137 	uint8_t	roce_fw_rsvd_8b;
2138 	/*
2139 	 * This field represents the name of HWRM FW (ASCII chars
2140 	 * with NULL at the end).
2141 	 */
2142 	char	hwrm_fw_name[16];
2143 	/*
2144 	 * This field represents the name of mgmt FW (ASCII chars
2145 	 * with NULL at the end).
2146 	 */
2147 	char	mgmt_fw_name[16];
2148 	/*
2149 	 * This field represents the name of network control
2150 	 * firmware (ASCII chars with NULL at the end).
2151 	 */
2152 	char	netctrl_fw_name[16];
2153 	/* This field represents the active board package name. */
2154 	char	active_pkg_name[16];
2155 	/*
2156 	 * This field represents the name of RoCE FW (ASCII chars
2157 	 * with NULL at the end).
2158 	 */
2159 	char	roce_fw_name[16];
2160 	/* This field returns the chip number. */
2161 	uint16_t	chip_num;
2162 	/* This field returns the revision of chip. */
2163 	uint8_t	chip_rev;
2164 	/* This field returns the chip metal number. */
2165 	uint8_t	chip_metal;
2166 	/* This field returns the bond id of the chip. */
2167 	uint8_t	chip_bond_id;
2168 	/*
2169 	 * This value indicates the type of platform used for chip
2170 	 * implementation.
2171 	 */
2172 	uint8_t	chip_platform_type;
2173 	/* ASIC */
2174 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_ASIC	UINT32_C(0x0)
2175 	/* FPGA platform of the chip. */
2176 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_FPGA	UINT32_C(0x1)
2177 	/* Palladium platform of the chip. */
2178 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_PALLADIUM UINT32_C(0x2)
2179 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_LAST	HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_PALLADIUM
2180 	/*
2181 	 * This field returns the maximum value of request window that
2182 	 * is supported by the HWRM. The request window is mapped
2183 	 * into device address space using MMIO.
2184 	 */
2185 	uint16_t	max_req_win_len;
2186 	/*
2187 	 * This field returns the maximum value of response buffer in
2188 	 * bytes.
2189 	 */
2190 	uint16_t	max_resp_len;
2191 	/*
2192 	 * This field returns the default request timeout value in
2193 	 * milliseconds.
2194 	 */
2195 	uint16_t	def_req_timeout;
2196 	/*
2197 	 * This field will indicate if any subsystems is not fully
2198 	 * initialized.
2199 	 */
2200 	uint8_t	flags;
2201 	/*
2202 	 * If set to 1, it will indicate to host drivers that firmware is
2203 	 * not ready to start full blown HWRM commands. Host drivers should
2204 	 * re-try HWRM_VER_GET with some timeout period. The timeout period
2205 	 * can be selected up to 5 seconds. Host drivers should also check
2206 	 * for dev_not_rdy_backing_store to identify if flag is set due to
2207 	 * backing store not been available.
2208 	 * For Example, PCIe hot-plug:
2209 	 *	Hot plug timing is system dependent. It generally takes up to
2210 	 *	600 milliseconds for firmware to clear DEV_NOT_RDY flag.
2211 	 * If set to 0, device is ready to accept all HWRM commands.
2212 	 */
2213 	#define HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY		UINT32_C(0x1)
2214 	/*
2215 	 * If set to 1, external version present.
2216 	 * If set to 0, external version not present.
2217 	 */
2218 	#define HWRM_VER_GET_OUTPUT_FLAGS_EXT_VER_AVAIL		UINT32_C(0x2)
2219 	/*
2220 	 * Firmware sets this flag along with dev_not_rdy flag to indicate
2221 	 * host drivers that it has not completed resource initialization
2222 	 * required for data path operations. Host drivers should not send
2223 	 * any HWRM command that requires data path resources. Firmware will
2224 	 * fail those commands with HWRM_ERR_CODE_BUSY. Host drivers can
2225 	 * retry those commands once both the flags are cleared.
2226 	 * If this flag and dev_not_rdy flag are set to 0, device is ready
2227 	 * to accept all HWRM commands.
2228 	 */
2229 	#define HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY_BACKING_STORE	UINT32_C(0x4)
2230 	uint8_t	unused_0[2];
2231 	/*
2232 	 * For backward compatibility this field must be set to 1.
2233 	 * Older drivers might look for this field to be 1 before
2234 	 * processing the message.
2235 	 */
2236 	uint8_t	always_1;
2237 	/*
2238 	 * This field represents the major version of HWRM interface
2239 	 * specification supported by the HWRM implementation.
2240 	 * The interface major version is intended to change only when
2241 	 * non backward compatible changes are made to the HWRM
2242 	 * interface specification. A HWRM implementation that is
2243 	 * compliant with this specification shall provide value of 1
2244 	 * in this field.
2245 	 */
2246 	uint16_t	hwrm_intf_major;
2247 	/*
2248 	 * This field represents the minor version of HWRM interface
2249 	 * specification supported by the HWRM implementation.
2250 	 * A change in interface minor version is used to reflect
2251 	 * significant backward compatible modification to HWRM
2252 	 * interface specification. This can be due to addition or
2253 	 * removal of functionality. HWRM interface specifications
2254 	 * with the same major version but different minor versions are
2255 	 * compatible. A HWRM implementation that is compliant with
2256 	 * this specification shall provide value of 2 in this field.
2257 	 */
2258 	uint16_t	hwrm_intf_minor;
2259 	/*
2260 	 * This field represents the update version of HWRM interface
2261 	 * specification supported by the HWRM implementation. The
2262 	 * interface update version is used to reflect minor changes or
2263 	 * bug fixes to a released HWRM interface specification.
2264 	 * A HWRM implementation that is compliant with this
2265 	 * specification shall provide value of 2 in this field.
2266 	 */
2267 	uint16_t	hwrm_intf_build;
2268 	/*
2269 	 * This field represents the patch version of HWRM interface
2270 	 * specification supported by the HWRM implementation.
2271 	 */
2272 	uint16_t	hwrm_intf_patch;
2273 	/*
2274 	 * This field represents the major version of HWRM firmware.
2275 	 * A change in firmware major version represents a major
2276 	 * firmware release.
2277 	 */
2278 	uint16_t	hwrm_fw_major;
2279 	/*
2280 	 * This field represents the minor version of HWRM firmware.
2281 	 * A change in firmware minor version represents significant
2282 	 * firmware functionality changes.
2283 	 */
2284 	uint16_t	hwrm_fw_minor;
2285 	/*
2286 	 * This field represents the build version of HWRM firmware.
2287 	 * A change in firmware build version represents bug fixes to
2288 	 * a released firmware.
2289 	 */
2290 	uint16_t	hwrm_fw_build;
2291 	/*
2292 	 * This field is a reserved field.
2293 	 * This field can be used to represent firmware branches or customer
2294 	 * specific releases tied to a specific (major,minor,update) version
2295 	 * of the HWRM firmware.
2296 	 */
2297 	uint16_t	hwrm_fw_patch;
2298 	/*
2299 	 * This field represents the major version of mgmt firmware.
2300 	 * A change in major version represents a major release.
2301 	 */
2302 	uint16_t	mgmt_fw_major;
2303 	/*
2304 	 * This field represents the minor version of HWRM firmware.
2305 	 * A change in firmware minor version represents significant
2306 	 * firmware functionality changes.
2307 	 */
2308 	uint16_t	mgmt_fw_minor;
2309 	/*
2310 	 * This field represents the build version of mgmt firmware.
2311 	 * A change in update version represents bug fixes.
2312 	 */
2313 	uint16_t	mgmt_fw_build;
2314 	/*
2315 	 * This field is a reserved field. This field can be used to
2316 	 * represent firmware branches or customer specific releases
2317 	 * tied to a specific (major,minor,update) version.
2318 	 */
2319 	uint16_t	mgmt_fw_patch;
2320 	/*
2321 	 * This field represents the major version of network control
2322 	 * firmware. A change in major version represents
2323 	 * a major release.
2324 	 */
2325 	uint16_t	netctrl_fw_major;
2326 	/*
2327 	 * This field represents the minor version of network control
2328 	 * firmware. A change in minor version represents significant
2329 	 * functionality changes.
2330 	 */
2331 	uint16_t	netctrl_fw_minor;
2332 	/*
2333 	 * This field represents the build version of network control
2334 	 * firmware. A change in update version represents bug fixes.
2335 	 */
2336 	uint16_t	netctrl_fw_build;
2337 	/*
2338 	 * This field is a reserved field. This field can be used to
2339 	 * represent firmware branches or customer specific releases
2340 	 * tied to a specific (major,minor,update) version
2341 	 */
2342 	uint16_t	netctrl_fw_patch;
2343 	/*
2344 	 * This field represents the major version of RoCE firmware.
2345 	 * A change in major version represents a major release.
2346 	 */
2347 	uint16_t	roce_fw_major;
2348 	/*
2349 	 * This field represents the minor version of RoCE firmware.
2350 	 * A change in minor version represents significant
2351 	 * functionality changes.
2352 	 */
2353 	uint16_t	roce_fw_minor;
2354 	/*
2355 	 * This field represents the build version of RoCE firmware.
2356 	 * A change in update version represents bug fixes.
2357 	 */
2358 	uint16_t	roce_fw_build;
2359 	/*
2360 	 * This field is a reserved field. This field can be used to
2361 	 * represent firmware branches or customer specific releases
2362 	 * tied to a specific (major,minor,update) version
2363 	 */
2364 	uint16_t	roce_fw_patch;
2365 	/*
2366 	 * This field returns the maximum extended request length acceptable
2367 	 * by the device which allows requests greater than mailbox size when
2368 	 * used with the short cmd request format.
2369 	 */
2370 	uint16_t	max_ext_req_len;
2371 	/*
2372 	 * This field returns the maximum request timeout value in seconds.
2373 	 * For backward compatibility, a value of zero should be interpreted
2374 	 * as the default value of 40 seconds. Drivers should always honor the
2375 	 * maximum timeout, but are permitted to warn if a longer duration than
2376 	 * this default is advertised. Values larger than 40 seconds should
2377 	 * only be used as a stopgap measure to address a device limitation or
2378 	 * for the purposes of test and debugging. The long term goal is for
2379 	 * firmware to significantly reduce this value in the passage of time.
2380 	 */
2381 	uint16_t	max_req_timeout;
2382 	uint8_t	unused_1[3];
2383 	/*
2384 	 * This field is used in Output records to indicate that the output
2385 	 * is completely written to RAM. This field should be read as '1'
2386 	 * to indicate that the output has been completely written. When
2387 	 * writing a command completion or response to an internal processor,
2388 	 * the order of writes has to be such that this field is written last.
2389 	 */
2390 	uint8_t	valid;
2391 } hwrm_ver_get_output_t, *phwrm_ver_get_output_t;
2392 
2393 /* cfa_bds_read_cmd_data_msg (size:128b/16B) */
2394 
2395 typedef struct cfa_bds_read_cmd_data_msg {
2396 	/* This value selects the format for the mid-path command for the CFA. */
2397 	uint8_t	opcode;
2398 	/*
2399 	 * This is read command. From 32 to 128B can be read from a table
2400 	 * using this command.
2401 	 */
2402 	#define CFA_BDS_READ_CMD_DATA_MSG_OPCODE_READ UINT32_C(0x0)
2403 	#define CFA_BDS_READ_CMD_DATA_MSG_OPCODE_LAST CFA_BDS_READ_CMD_DATA_MSG_OPCODE_READ
2404 	/* This value selects the table type to be acted upon. */
2405 	uint8_t	table_type;
2406 	/* This value selects the table type to be acted upon. */
2407 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
2408 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_SFT   0
2409 	/* This command acts on the action table of the specified scope. */
2410 		#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_ACTION  UINT32_C(0x0)
2411 	/* This command acts on the exact match table of the specified scope. */
2412 		#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_EM	UINT32_C(0x1)
2413 		#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_LAST   CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_EM
2414 	/* This value selects which table scope will be accessed. */
2415 	uint8_t	table_scope;
2416 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2417 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2418 	/*
2419 	 * This value identifies the number of 32B units will be accessed. A
2420 	 * value of zero is invalid. Maximum value is 4.
2421 	 */
2422 	uint8_t	data_size;
2423 	#define CFA_BDS_READ_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2424 	#define CFA_BDS_READ_CMD_DATA_MSG_DATA_SIZE_SFT 0
2425 	/* This is the 32B index into the selected table to access. */
2426 	uint32_t	table_index;
2427 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
2428 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_INDEX_SFT 0
2429 	/*
2430 	 * This is the 64b host address where you want the data returned to. The
2431 	 * data will be written to the same function as the one that owns the SQ
2432 	 * this command is read from. The bottom two bits of this value must be
2433 	 * zero. The size of the write is controlled by the data_size field.
2434 	 */
2435 	uint64_t	host_address;
2436 } cfa_bds_read_cmd_data_msg_t, *pcfa_bds_read_cmd_data_msg_t;
2437 
2438 /* cfa_bds_write_cmd_data_msg (size:1152b/144B) */
2439 
2440 typedef struct cfa_bds_write_cmd_data_msg {
2441 	/* This value selects the format for the mid-path command for the CFA. */
2442 	uint8_t	opcode;
2443 	/*
2444 	 * This is write command. From 32 to 128B can be written to a table
2445 	 * using this command.
2446 	 */
2447 	#define CFA_BDS_WRITE_CMD_DATA_MSG_OPCODE_WRITE UINT32_C(0x1)
2448 	#define CFA_BDS_WRITE_CMD_DATA_MSG_OPCODE_LAST CFA_BDS_WRITE_CMD_DATA_MSG_OPCODE_WRITE
2449 	/* This value selects the table type to be acted upon. */
2450 	uint8_t	write_thru_table_type;
2451 	/* This value selects the table type to be acted upon. */
2452 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
2453 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_SFT   0
2454 	/* This command acts on the action table of the specified scope. */
2455 		#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_ACTION  UINT32_C(0x0)
2456 	/* This command acts on the exact match table of the specified scope. */
2457 		#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_EM	UINT32_C(0x1)
2458 		#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_LAST   CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_EM
2459 	/*
2460 	 * Indicates write-through control. Indicates write-through when set,
2461 	 * or write back when cleared.
2462 	 */
2463 	#define CFA_BDS_WRITE_CMD_DATA_MSG_WRITE_THRU	UINT32_C(0x10)
2464 	/* This value selects which table scope will be accessed. */
2465 	uint8_t	table_scope;
2466 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2467 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2468 	/*
2469 	 * This value identifies the number of 32B units will be accessed. A
2470 	 * value of zero is invalid. Maximum value is 4.
2471 	 */
2472 	uint8_t	data_size;
2473 	#define CFA_BDS_WRITE_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2474 	#define CFA_BDS_WRITE_CMD_DATA_MSG_DATA_SIZE_SFT 0
2475 	/* This is the 32B index into the selected table to access. */
2476 	uint32_t	table_index;
2477 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
2478 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_INDEX_SFT 0
2479 	uint32_t	unused0;
2480 	uint32_t	unused1;
2481 	/*
2482 	 * This is the data to be written. Data length is determined by the
2483 	 * data_size field. The bd_cnt in the encapsulating BD must also be set
2484 	 * correctly to ensure that the BD is processed correctly and the full
2485 	 * WRITE_CMD message is extracted from the BD.
2486 	 */
2487 	uint32_t	dta[32];
2488 } cfa_bds_write_cmd_data_msg_t, *pcfa_bds_write_cmd_data_msg_t;
2489 
2490 /* cfa_bds_read_clr_cmd_data_msg (size:256b/32B) */
2491 
2492 typedef struct cfa_bds_read_clr_cmd_data_msg {
2493 	/* This value selects the format for the mid-path command for the CFA. */
2494 	uint8_t	opcode;
2495 	/*
2496 	 * This is read-clear command. 32B can be read from a table and
2497 	 * a 16b mask can be used to clear specific 16b units after the
2498 	 * read as an atomic operation.
2499 	 */
2500 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_OPCODE_READ_CLR UINT32_C(0x2)
2501 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_OPCODE_LAST	CFA_BDS_READ_CLR_CMD_DATA_MSG_OPCODE_READ_CLR
2502 	/* This value selects the table type to be acted upon. */
2503 	uint8_t	table_type;
2504 	/* This value selects the table type to be acted upon. */
2505 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
2506 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_SFT   0
2507 	/* This command acts on the action table of the specified scope. */
2508 		#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_ACTION  UINT32_C(0x0)
2509 	/* This command acts on the exact match table of the specified scope. */
2510 		#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_EM	UINT32_C(0x1)
2511 		#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_LAST   CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_EM
2512 	/* This value selects which table scope will be accessed. */
2513 	uint8_t	table_scope;
2514 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2515 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2516 	/*
2517 	 * This value identifies the number of 32B units will be accessed.
2518 	 * Always set the value to 1.
2519 	 */
2520 	uint8_t	data_size;
2521 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2522 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_DATA_SIZE_SFT 0
2523 	/* This is the 32B index into the selected table to access. */
2524 	uint32_t	table_index;
2525 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
2526 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_INDEX_SFT 0
2527 	/*
2528 	 * This is the 64b host address where you want the data returned to. The
2529 	 * data will be written to the same function as the one that owns the SQ
2530 	 * this command is read from. The bottom two bits of this value must be
2531 	 * zero. The size of the write is controlled by the data_size field.
2532 	 */
2533 	uint64_t	host_address;
2534 	/*
2535 	 * This is active high clear mask for the 32B of data that this command
2536 	 * can read. Bit 0 of the field will clear bits 15:0 of the first word
2537 	 * of data read when set to '1'.
2538 	 */
2539 	uint16_t	clear_mask;
2540 	uint16_t	unused0[3];
2541 	uint16_t	unused1[4];
2542 } cfa_bds_read_clr_cmd_data_msg_t, *pcfa_bds_read_clr_cmd_data_msg_t;
2543 
2544 /* cfa_bds_em_insert_cmd_data_msg (size:1152b/144B) */
2545 
2546 typedef struct cfa_bds_em_insert_cmd_data_msg {
2547 	/* This value selects the format for the mid-path command for the CFA. */
2548 	uint8_t	opcode;
2549 	/*
2550 	 * An exact match table insert will be attempted into the table.
2551 	 * If there is a free location in the bucket, the payload will
2552 	 * be written to the bucket.
2553 	 */
2554 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_OPCODE_EM_INSERT UINT32_C(0x3)
2555 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_OPCODE_LAST	CFA_BDS_EM_INSERT_CMD_DATA_MSG_OPCODE_EM_INSERT
2556 	/*
2557 	 * Indicates write-through control. Indicates write-through when set,
2558 	 * or write back when cleared.
2559 	 */
2560 	uint8_t	write_thru;
2561 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_UNUSED_MASK	UINT32_C(0xf)
2562 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_UNUSED_SFT	0
2563 	/*
2564 	 * Indicates write-through control. Indicates write-through when set,
2565 	 * or write back when cleared.
2566 	 */
2567 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_WRITE_THRU	UINT32_C(0x10)
2568 	/* This value selects which table scope will be accessed. */
2569 	uint8_t	table_scope;
2570 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2571 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2572 	/*
2573 	 * This value identifies the number of 32B units will be accessed. A
2574 	 * value of zero is invalid. Maximum value is 4.
2575 	 */
2576 	uint8_t	data_size;
2577 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2578 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_DATA_SIZE_SFT 0
2579 	/* This is the 32B index into the selected table to access. */
2580 	uint32_t	table_index;
2581 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
2582 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_INDEX_SFT 0
2583 	/*
2584 	 * This is the 64b host address where you want the data returned to. The
2585 	 * data will be written to the same function as the one that owns the SQ
2586 	 */
2587 	uint64_t	host_address;
2588 	/*
2589 	 * This is the Exact Match Lookup Record. Data length is determined by
2590 	 * the data_size field. The bd_cnt in the encapsulating BD must also be
2591 	 */
2592 	uint32_t	dta[32];
2593 } cfa_bds_em_insert_cmd_data_msg_t, *pcfa_bds_em_insert_cmd_data_msg_t;
2594 
2595 /* cfa_bds_em_delete_cmd_data_msg (size:256b/32B) */
2596 
2597 typedef struct cfa_bds_em_delete_cmd_data_msg {
2598 	/* This value selects the format for the mid-path command for the CFA. */
2599 	uint8_t	opcode;
2600 	/* An exact match table delete will be attempted. */
2601 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_OPCODE_EM_DELETE UINT32_C(0x4)
2602 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_OPCODE_LAST	CFA_BDS_EM_DELETE_CMD_DATA_MSG_OPCODE_EM_DELETE
2603 	/*
2604 	 * Indicates write-through control. Indicates write-through when set,
2605 	 * or write back when cleared.
2606 	 */
2607 	uint8_t	write_thru;
2608 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_UNUSED_MASK	UINT32_C(0xf)
2609 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_UNUSED_SFT	0
2610 	/*
2611 	 * Indicates write-through control. Indicates write-through when set,
2612 	 * or write back when cleared.
2613 	 */
2614 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_WRITE_THRU	UINT32_C(0x10)
2615 	/* This value selects which table scope will be accessed. */
2616 	uint8_t	table_scope;
2617 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2618 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2619 	/*
2620 	 * This value identifies the number of 32B units will be accessed. A
2621 	 * value of zero is invalid. Maximum value is 4.
2622 	 */
2623 	uint8_t	data_size;
2624 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2625 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_DATA_SIZE_SFT 0
2626 	uint32_t	unused0;
2627 	/*
2628 	 * This is the 64b host address where you want the data returned to. The
2629 	 * data will be written to the same function as the one that owns the SQ
2630 	 */
2631 	uint64_t	host_address;
2632 	/*
2633 	 * This is the Exact Match Lookup Record. Data length is determined by
2634 	 * the data_size field. The bd_cnt in the encapsulating BD must also be
2635 	 */
2636 	uint64_t	dta;
2637 	uint64_t	unused1;
2638 } cfa_bds_em_delete_cmd_data_msg_t, *pcfa_bds_em_delete_cmd_data_msg_t;
2639 
2640 /* cfa_bds_invalidate_cmd_data_msg (size:128b/16B) */
2641 
2642 typedef struct cfa_bds_invalidate_cmd_data_msg {
2643 	/* This value selects the format for the mid-path command for the CFA. */
2644 	uint8_t	opcode;
2645 	/*
2646 	 * The specified table area will be invalidated. If it is needed.
2647 	 * again, it will be read from the backing store.
2648 	 */
2649 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_OPCODE_INVALIDATE UINT32_C(0x5)
2650 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_OPCODE_LAST	CFA_BDS_INVALIDATE_CMD_DATA_MSG_OPCODE_INVALIDATE
2651 	/* This value selects the table type to be acted upon. */
2652 	uint8_t	table_type;
2653 	/* This value selects the table type to be acted upon. */
2654 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
2655 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_SFT   0
2656 	/* This command acts on the action table of the specified scope. */
2657 		#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_ACTION  UINT32_C(0x0)
2658 	/* This command acts on the exact match table of the specified scope. */
2659 		#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_EM	UINT32_C(0x1)
2660 		#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_LAST   CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_EM
2661 	/* This value selects which table scope will be accessed. */
2662 	uint8_t	table_scope;
2663 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2664 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2665 	/* This value specifies the number of cache lines to invalidate. */
2666 	uint8_t	data_size;
2667 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2668 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_DATA_SIZE_SFT 0
2669 	/* This is the 32B index into the selected table to access. */
2670 	uint32_t	table_index;
2671 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
2672 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_INDEX_SFT 0
2673 	uint64_t	unused;
2674 } cfa_bds_invalidate_cmd_data_msg_t, *pcfa_bds_invalidate_cmd_data_msg_t;
2675 
2676 /* cfa_bds_event_collect_cmd_data_msg (size:128b/16B) */
2677 
2678 typedef struct cfa_bds_event_collect_cmd_data_msg {
2679 	/* This value selects the format for the mid-path command for the CFA. */
2680 	uint8_t	opcode;
2681 	/* Reads notification messages from the Host Notification Queue. */
2682 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_OPCODE_EVENT_COLLECT UINT32_C(0x6)
2683 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_OPCODE_LAST	CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_OPCODE_EVENT_COLLECT
2684 	uint8_t	unused0;
2685 	/* This value selects which table scope will be accessed. */
2686 	uint8_t	table_scope;
2687 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2688 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2689 	/*
2690 	 * This value identifies the number of 32B units will be accessed. A
2691 	 * value of zero is invalid. Maximum value is 4.
2692 	 */
2693 	uint8_t	data_size;
2694 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2695 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_DATA_SIZE_SFT 0
2696 	uint32_t	unused1;
2697 	/*
2698 	 * This is the 64b host address where you want the data returned to. The
2699 	 * data will be written to the same function as the one that owns the SQ
2700 	 */
2701 	uint64_t	host_address;
2702 } cfa_bds_event_collect_cmd_data_msg_t, *pcfa_bds_event_collect_cmd_data_msg_t;
2703 
2704 /* ce_bds_add_data_msg (size:576b/72B) */
2705 
2706 typedef struct ce_bds_add_data_msg {
2707 	uint32_t	version_algorithm_kid_opcode;
2708 	/*
2709 	 * This value selects the operation for the mid-path command for the
2710 	 * crypto blocks.
2711 	 */
2712 	#define CE_BDS_ADD_DATA_MSG_OPCODE_MASK		UINT32_C(0xf)
2713 	#define CE_BDS_ADD_DATA_MSG_OPCODE_SFT		0
2714 	/*
2715 	 * This is the add command. Using this opcode, Host Driver can add
2716 	 * information required for kTLS processing. The information is
2717 	 * updated in the CFCK context.
2718 	 */
2719 		#define CE_BDS_ADD_DATA_MSG_OPCODE_ADD		UINT32_C(0x1)
2720 		#define CE_BDS_ADD_DATA_MSG_OPCODE_LAST		CE_BDS_ADD_DATA_MSG_OPCODE_ADD
2721 	/*
2722 	 * This field is the Crypto Context ID. The KID is used to store
2723 	 * information used by the associated kTLS offloaded connection.
2724 	 */
2725 	#define CE_BDS_ADD_DATA_MSG_KID_MASK		UINT32_C(0xfffff0)
2726 	#define CE_BDS_ADD_DATA_MSG_KID_SFT		4
2727 	/*
2728 	 * Currently only two algorithms are supported, AES_GCM_128 and
2729 	 * AES_GCM_256. Additional bits for future growth.
2730 	 */
2731 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_MASK		UINT32_C(0xf000000)
2732 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_SFT		24
2733 	/* AES_GCM_128 Algorithm */
2734 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_AES_GCM_128	UINT32_C(0x1000000)
2735 	/* AES_GCM_256 Algorithm */
2736 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_AES_GCM_256	UINT32_C(0x2000000)
2737 	/*
2738 	 * Version number of TLS connection. HW will provide registers that
2739 	 * converts the 4b encoded version number to 16b of actual version
2740 	 * number in the TLS Header. This field is initialized/updated by
2741 	 * this "KTLS crypto add" mid-path command.
2742 	 */
2743 	#define CE_BDS_ADD_DATA_MSG_VERSION_MASK		UINT32_C(0xf0000000)
2744 	#define CE_BDS_ADD_DATA_MSG_VERSION_SFT		28
2745 	/* TLS1.2 Version */
2746 		#define CE_BDS_ADD_DATA_MSG__TLS1_2			(UINT32_C(0x0) << 28)
2747 	/* TLS1.3 Version */
2748 		#define CE_BDS_ADD_DATA_MSG__TLS1_3			(UINT32_C(0x1) << 28)
2749 		#define CE_BDS_ADD_DATA_MSG__LAST			CE_BDS_ADD_DATA_MSG__TLS1_3
2750 	uint8_t	ctx_kind;
2751 	/* This field selects the context kind for the request. */
2752 	#define CE_BDS_ADD_DATA_MSG_CTX_KIND_MASK UINT32_C(0x1f)
2753 	#define CE_BDS_ADD_DATA_MSG_CTX_KIND_SFT  0
2754 	/* Crypto key transmit context */
2755 		#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_TX  UINT32_C(0x11)
2756 	/* Crypto key receive context */
2757 		#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_RX  UINT32_C(0x12)
2758 		#define CE_BDS_ADD_DATA_MSG_CTX_KIND_LAST  CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_RX
2759 	uint8_t	unused0[3];
2760 	/*
2761 	 * Salt is part of the nonce that is used as the Initial Vector (IV) in
2762 	 * AES-GCM cipher suites. These are exchanged as part of the handshake
2763 	 * process and is either the client_write_iv (when the client is
2764 	 * sending) or server_write_iv (when the server is sending). In
2765 	 * TLS1.2, 4B of Salt is concatenated with 8B of explicit_nonce to
2766 	 * generate the 12B of IV. In TLS1.3, 8B of TLS record sequence number
2767 	 * is zero padded to 12B and then xor'ed with the 4B of salt to generate
2768 	 * the 12B of IV. This value is initialized by this mid-path command.
2769 	 */
2770 	uint8_t	salt[4];
2771 	uint8_t	unused1[4];
2772 	/*
2773 	 * This field keeps track of the TCP sequence number that is expected as
2774 	 * the first byte in the next TCP packet. This field is calculated by HW
2775 	 * using the output of the parser. The field is initialized as part of
2776 	 * the Mid-path BD download/update of a kTLS connection. For every TCP
2777 	 * packet processed, TCE HW will update the value to Current packet TCP
2778 	 * sequence number + Current packet TCP Payload Length.
2779 	 */
2780 	uint32_t	pkt_tcp_seq_num;
2781 	/*
2782 	 * This field maintains the TCP sequence number of the first byte in the
2783 	 * header of the active TLS record. This field is initialized as part of
2784 	 * the Mid-path BD download/update of a kTLS connection. For every
2785 	 * record that is processed, TCE HW copies the value from the
2786 	 * next_tls_header_tcp_seq_num field.
2787 	 */
2788 	uint32_t	tls_header_tcp_seq_num;
2789 	/*
2790 	 * This is sequence number for the TLS record in a particular session.
2791 	 * In TLS1.2, record sequence number is part of the Associated Data (AD)
2792 	 * in the AEAD algorithm. In TLS1.3, record sequence number is part of
2793 	 * the Initial Vector (IV). The field is initialized as part of the
2794 	 * mid-path BD download/update of a kTLS connection. TCE HW increments
2795 	 * the field after that for every record processed as it parses the TCP
2796 	 * packet.
2797 	 */
2798 	uint64_t	record_seq_num;
2799 	/*
2800 	 * Key used for encrypting or decrypting TLS records. The Key is
2801 	 * exchanged during the hand-shake protocol by the client-server and
2802 	 * provided to HW through this mid-path BD.
2803 	 */
2804 	uint8_t	session_key[32];
2805 	/*
2806 	 * Additional IV that is exchanged as part of sessions setup between
2807 	 * the two end points. This field is used for TLS1.3 only.
2808 	 */
2809 	uint8_t	addl_iv[8];
2810 } ce_bds_add_data_msg_t, *pce_bds_add_data_msg_t;
2811 
2812 /* ce_bds_delete_data_msg (size:32b/4B) */
2813 
2814 typedef struct ce_bds_delete_data_msg {
2815 	uint32_t	kid_opcode_ctx_kind;
2816 	/*
2817 	 * This value selects the operation for the mid-path command for the
2818 	 * crypto blocks.
2819 	 */
2820 	#define CE_BDS_DELETE_DATA_MSG_OPCODE_MASK	UINT32_C(0xf)
2821 	#define CE_BDS_DELETE_DATA_MSG_OPCODE_SFT	0
2822 	/*
2823 	 * This is the delete command. Using this opcode, the host Driver
2824 	 * can remove a key context from the CFCK. If context is deleted
2825 	 * and packets with the same KID come through the pipeline, the
2826 	 * following actions are taken. For transmit packets, no crypto
2827 	 * operation will be performed, payload will be zero'ed out. For
2828 	 * receive packets, no crypto operation will be performed,
2829 	 * payload will be unmodified.
2830 	 */
2831 		#define CE_BDS_DELETE_DATA_MSG_OPCODE_DELETE	UINT32_C(0x2)
2832 		#define CE_BDS_DELETE_DATA_MSG_OPCODE_LAST	CE_BDS_DELETE_DATA_MSG_OPCODE_DELETE
2833 	/*
2834 	 * This field is the Crypto Context ID. The KID is used to store
2835 	 * information used by the associated kTLS offloaded connection.
2836 	 */
2837 	#define CE_BDS_DELETE_DATA_MSG_KID_MASK	UINT32_C(0xfffff0)
2838 	#define CE_BDS_DELETE_DATA_MSG_KID_SFT	4
2839 	/* This field selects the context kind for the request. */
2840 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_MASK   UINT32_C(0x1f000000)
2841 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_SFT	24
2842 	/* Crypto Key Transmit Context. */
2843 		#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_CK_TX	(UINT32_C(0x11) << 24)
2844 	/* Crypto Key Receive Context. */
2845 		#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_CK_RX	(UINT32_C(0x12) << 24)
2846 	/* QUIC Key Transmit Context. */
2847 		#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_TX  (UINT32_C(0x14) << 24)
2848 	/* QUIC Key Receive Context. */
2849 		#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_RX  (UINT32_C(0x15) << 24)
2850 		#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_LAST	CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_RX
2851 } ce_bds_delete_data_msg_t, *pce_bds_delete_data_msg_t;
2852 
2853 /* ce_bds_resync_resp_ack_msg (size:128b/16B) */
2854 
2855 typedef struct ce_bds_resync_resp_ack_msg {
2856 	uint32_t	resync_status_kid_opcode;
2857 	/*
2858 	 * This value selects the operation for the mid-path command for the
2859 	 * crypto blocks.
2860 	 */
2861 	#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_MASK	UINT32_C(0xf)
2862 	#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_SFT	0
2863 	/*
2864 	 * This command is used by the driver as a response to the resync
2865 	 * request sent by the crypto engine.
2866 	 */
2867 		#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_RESYNC	UINT32_C(0x3)
2868 		#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_LAST	CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_RESYNC
2869 	/*
2870 	 * This field is the Crypto Context ID. The KID is used to store
2871 	 * information used by the associated kTLS offloaded connection.
2872 	 */
2873 	#define CE_BDS_RESYNC_RESP_ACK_MSG_KID_MASK	UINT32_C(0xfffff0)
2874 	#define CE_BDS_RESYNC_RESP_ACK_MSG_KID_SFT	4
2875 	/*
2876 	 * This field indicates if the resync request resulted in a success or
2877 	 * a failure.
2878 	 */
2879 	#define CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS	UINT32_C(0x1000000)
2880 	/*
2881 	 * An ACK indicates that the driver was able to find the TLS record
2882 	 * associated with TCP sequence number provided by the HW
2883 	 */
2884 		#define CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS_ACK   (UINT32_C(0x0) << 24)
2885 		#define CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS_LAST CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS_ACK
2886 	/*
2887 	 * This field is the echo of the TCP sequence number provided in the
2888 	 * resync request by the HW. If HW sent multiple resync requests, it
2889 	 * only tracks the latest TCP sequence number. When the response from
2890 	 * the Driver doesn't match the latest request, HW will drop the resync
2891 	 * response.
2892 	 */
2893 	uint32_t	resync_record_tcp_seq_num;
2894 	/*
2895 	 * This field indicates the TLS record sequence number associated with
2896 	 * the resync request. HW will take this number and add the delta records
2897 	 * it has found since sending the resync request, update the context and
2898 	 * resume decrypting records.
2899 	 */
2900 	uint64_t	resync_record_seq_num;
2901 } ce_bds_resync_resp_ack_msg_t, *pce_bds_resync_resp_ack_msg_t;
2902 
2903 /* ce_bds_resync_resp_nack_msg (size:64b/8B) */
2904 
2905 typedef struct ce_bds_resync_resp_nack_msg {
2906 	uint32_t	resync_status_kid_opcode;
2907 	/*
2908 	 * This value selects the operation for the mid-path command for the
2909 	 * crypto blocks.
2910 	 */
2911 	#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_MASK	UINT32_C(0xf)
2912 	#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_SFT	0
2913 	/*
2914 	 * This command is used by the driver as a response to the resync
2915 	 * request sent by the crypto engine.
2916 	 */
2917 		#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_RESYNC	UINT32_C(0x3)
2918 		#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_LAST	CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_RESYNC
2919 	/*
2920 	 * This field is the Crypto Context ID. The KID is used to store
2921 	 * information used by the associated kTLS offloaded connection.
2922 	 */
2923 	#define CE_BDS_RESYNC_RESP_NACK_MSG_KID_MASK	UINT32_C(0xfffff0)
2924 	#define CE_BDS_RESYNC_RESP_NACK_MSG_KID_SFT	4
2925 	/*
2926 	 * This field indicates if the resync request resulted in a success or
2927 	 * a failure.
2928 	 */
2929 	#define CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS	UINT32_C(0x1000000)
2930 	/*
2931 	 * An NAK indicates that the driver wasn't able to find the TLS
2932 	 * record associated with TCP sequence number provided by the HW
2933 	 */
2934 		#define CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS_NACK  (UINT32_C(0x1) << 24)
2935 		#define CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS_LAST CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS_NACK
2936 	/*
2937 	 * This field is the echo of the TCP sequence number provided in the
2938 	 * resync request by the HW. If HW sent multiple resync requests, it
2939 	 * only tracks the latest TCP sequence number. When the response from
2940 	 * the Driver doesn't match the latest request, HW will drop the resync
2941 	 * response.
2942 	 */
2943 	uint32_t	resync_record_tcp_seq_num;
2944 } ce_bds_resync_resp_nack_msg_t, *pce_bds_resync_resp_nack_msg_t;
2945 
2946 /* crypto_presync_bd_cmd (size:256b/32B) */
2947 
2948 typedef struct crypto_presync_bd_cmd {
2949 	uint8_t	flags;
2950 	/*
2951 	 * Typically, presync BDs are used for packet retransmissions. Source
2952 	 * port sends all the packets in order over the network to destination
2953 	 * port and packets get dropped in the network. The destination port
2954 	 * will request retransmission of dropped packets and source port
2955 	 * driver will send presync BD to setup the transmitter appropriately.
2956 	 * It will provide the start and end TCP sequence number of the data to
2957 	 * be transmitted. HW keeps two sets of context variable, one for in
2958 	 * order traffic and one for retransmission traffic. HW is designed to
2959 	 * transmit everything posted in the presync BD and return to in order
2960 	 * mode after that. No inorder context variables are updated in the
2961 	 * process. There is a special case where packets can be dropped
2962 	 * between the TCP stack and Device Driver (Berkeley Packet Filter for
2963 	 * ex) and HW still needs to transmit rest of the traffic. In this
2964 	 * mode, driver will send a presync BD as if it is a retransmission but
2965 	 * at the end of the transmission, the in order variables need to be
2966 	 * updated. This flag is used by driver to indicate that in order
2967 	 * variables needs to be updated at the end of completing the task
2968 	 * associated with the presync BD.
2969 	 */
2970 	#define CRYPTO_PRESYNC_BD_CMD_FLAGS_UPDATE_IN_ORDER_VAR	UINT32_C(0x1)
2971 	/*
2972 	 * When packet with an authentication TAG is lost in the network,
2973 	 * During retransmission Device driver will post the entire record for
2974 	 * the hardware to recalculate the TAG. Hardware is set to retransmit
2975 	 * only portions of the record, it does so by looking at the Header
2976 	 * TCP Sequence Number and Start TCP Sequence Number. However, there
2977 	 * is a case where the header packet gets dropped in the stack for ex
2978 	 * BPF packet filter and it is impossible for the Hardware to
2979 	 * determine if this is a case of full replay for only the TAG
2980 	 * generation.
2981 	 */
2982 	#define CRYPTO_PRESYNC_BD_CMD_FLAGS_FULL_REPLAY_RETRAN	UINT32_C(0x2)
2983 	uint8_t	unused0;
2984 	uint16_t	unused1;
2985 	/*
2986 	 * This field maintains the TCP sequence number of the first byte in the
2987 	 * Header of the active TLS record. This field is set to 0 during
2988 	 * mid-path BD updates, but is set to correct value when a presync BD is
2989 	 * detected. For every record that is processed, the value from the
2990 	 * next_tls_header_tcp_seq_num field is copied.
2991 	 */
2992 	uint32_t	header_tcp_seq_num;
2993 	/*
2994 	 * When a retransmitted packet has a TLS authentication TAG present and
2995 	 * the data spans multiple TCP Packets, HW is required to read the entire
2996 	 * record to recalculate the TAG but only transmit what is required. This
2997 	 * field is the start TCP sequence number of the packet(s) that need to
2998 	 * be re-transmitted. This field is initialized to 0 during Mid-path BD
2999 	 * add command and initialized to value provided by the driver when
3000 	 * Pre-sync BD is detected. This field is never updated unless another
3001 	 * Pre-sync BD signaling a new retransmission is scheduled.
3002 	 */
3003 	uint32_t	start_tcp_seq_num;
3004 	/*
3005 	 * When a retransmitted packet has a TLS authentication TAG present and
3006 	 * the data spans multiple TCP Packets, HW is required to read the
3007 	 * entire record to recalculate the TAG but only transmit what is
3008 	 * required. This field is the end TCP sequence number of the packet(s)
3009 	 * that need to be re-transmitted. This field is initialized to 0 during
3010 	 * Mid-path BD add command and initialized to value provided by the
3011 	 * driver when Pre-sync BD is detected. This field is never updated
3012 	 * unless another Pre-sync BD signaling a new retransmission is
3013 	 * scheduled.
3014 	 */
3015 	uint32_t	end_tcp_seq_num;
3016 	/*
3017 	 * For TLS1.2, an explicit nonce is used as part of the IV (concatenated
3018 	 * with the SALT). For retrans packets, this field is extracted from the
3019 	 * TLS record, field right after the TLS Header and stored in the
3020 	 * context. This field needs to be stored in context as TCP segmentation
3021 	 * could have split the field into multiple TCP packets. This value is
3022 	 * initialized to 0 when presync BD is detected by taking the value from
3023 	 * the first TLS header. When subsequent TLS Headers are detected, the
3024 	 * value is extracted from packet.
3025 	 */
3026 	uint8_t	explicit_nonce[8];
3027 	/*
3028 	 * This is sequence number for the TLS record in a particular session. In
3029 	 * TLS1.2, record sequence number is part of the Associated Data (AD) in
3030 	 * the AEAD algorithm. In TLS1.3, record sequence number is part of the
3031 	 * Initial Vector (IV). The field is initialized to 0 during Mid-path BD
3032 	 * download. Is initialized to correct value when a pre-sync BD is
3033 	 * detected. TCE HW increments the field after that for every record
3034 	 * processed as it parses the TCP packet. Subsequent pre-sync BDs
3035 	 * delivering more retransmission instruction will also update this
3036 	 * field.
3037 	 */
3038 	uint64_t	record_seq_num;
3039 } crypto_presync_bd_cmd_t, *pcrypto_presync_bd_cmd_t;
3040 
3041 /* ce_bds_quic_add_data_msg (size:832b/104B) */
3042 
3043 typedef struct ce_bds_quic_add_data_msg {
3044 	uint32_t	ver_algo_kid_opcode;
3045 	/*
3046 	 * This value selects the operation for the mid-path command for the
3047 	 * crypto blocks.
3048 	 */
3049 	#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_MASK	UINT32_C(0xf)
3050 	#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_SFT	0
3051 	/*
3052 	 * This is the add command. Using this opcode, Host Driver can add
3053 	 * information required for QUIC processing. The information is
3054 	 * updated in the CFCK context.
3055 	 */
3056 		#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_ADD		UINT32_C(0x1)
3057 		#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_LAST	CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_ADD
3058 	/*
3059 	 * This field is the Crypto Context ID. The KID is used to store
3060 	 * information used by the associated QUIC offloaded connection.
3061 	 */
3062 	#define CE_BDS_QUIC_ADD_DATA_MSG_KID_MASK		UINT32_C(0xfffff0)
3063 	#define CE_BDS_QUIC_ADD_DATA_MSG_KID_SFT		4
3064 	/* Algorithm used for encryption and decryption. */
3065 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_MASK	UINT32_C(0xf000000)
3066 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_SFT	24
3067 	/* AES_GCM_128 Algorithm. */
3068 		#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_AES_GCM_128  (UINT32_C(0x1) << 24)
3069 	/* AES_GCM_256 Algorithm. */
3070 		#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_AES_GCM_256  (UINT32_C(0x2) << 24)
3071 	/* Chacha20 Algorithm. */
3072 		#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_CHACHA20	(UINT32_C(0x3) << 24)
3073 		#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_LAST	CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_CHACHA20
3074 	/* Version number of QUIC connection. */
3075 	#define CE_BDS_QUIC_ADD_DATA_MSG_VERSION_MASK	UINT32_C(0xf0000000)
3076 	#define CE_BDS_QUIC_ADD_DATA_MSG_VERSION_SFT	28
3077 	/* TLS1.2 Version */
3078 		#define CE_BDS_QUIC_ADD_DATA_MSG__TLS1_2		(UINT32_C(0x0) << 28)
3079 	/* TLS1.3 Version */
3080 		#define CE_BDS_QUIC_ADD_DATA_MSG__TLS1_3		(UINT32_C(0x1) << 28)
3081 	/* DTLS1.2 Version */
3082 		#define CE_BDS_QUIC_ADD_DATA_MSG__DTLS1_2		(UINT32_C(0x2) << 28)
3083 	/* DTLS1.2 for RoCE Version */
3084 		#define CE_BDS_QUIC_ADD_DATA_MSG__DTLS1_2_ROCE	(UINT32_C(0x3) << 28)
3085 	/* QUIC Version */
3086 		#define CE_BDS_QUIC_ADD_DATA_MSG__QUIC		(UINT32_C(0x4) << 28)
3087 		#define CE_BDS_QUIC_ADD_DATA_MSG__LAST		CE_BDS_QUIC_ADD_DATA_MSG__QUIC
3088 	uint32_t	ctx_kind_dcid_width_key_phase;
3089 	/* Key phase. */
3090 	#define CE_BDS_QUIC_ADD_DATA_MSG_KEY_PHASE	UINT32_C(0x1)
3091 	/* Destination connection ID width. */
3092 	#define CE_BDS_QUIC_ADD_DATA_MSG_DCID_WIDTH_MASK UINT32_C(0x3e)
3093 	#define CE_BDS_QUIC_ADD_DATA_MSG_DCID_WIDTH_SFT  1
3094 	/* This field selects the context kind for the request. */
3095 	#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_MASK   UINT32_C(0x7c0)
3096 	#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_SFT	6
3097 	/* QUIC key transmit context */
3098 		#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_TX  (UINT32_C(0x14) << 6)
3099 	/* QUIC key receive context */
3100 		#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_RX  (UINT32_C(0x15) << 6)
3101 		#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_LAST	CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_RX
3102 	uint64_t	unused_0;
3103 	/*
3104 	 * Least-significant 64 bits (of 96) of additional IV that is
3105 	 * exchanged as part of sessions setup between the two end
3106 	 * points for QUIC operations.
3107 	 */
3108 	uint8_t	quic_iv_lo[8];
3109 	/*
3110 	 * Most-significant 32 bits (of 96) of additional IV that is
3111 	 * exchanged as part of sessions setup between the two end
3112 	 * points for QUIC operations.
3113 	 */
3114 	uint8_t	quic_iv_hi[4];
3115 	uint32_t	unused_1;
3116 	/*
3117 	 * Key used for encrypting or decrypting records. The Key is exchanged
3118 	 * as part of sessions setup between the two end points through this
3119 	 * mid-path BD.
3120 	 */
3121 	uint8_t	session_key[32];
3122 	/* Header protection key. */
3123 	uint8_t	hp_key[32];
3124 	/* Packet number associated with the QUIC connection. */
3125 	uint64_t	pkt_number;
3126 } ce_bds_quic_add_data_msg_t, *pce_bds_quic_add_data_msg_t;
3127 
3128 /* bd_base (size:64b/8B) */
3129 
3130 typedef struct bd_base {
3131 	uint8_t	type;
3132 	/* This value identifies the type of buffer descriptor. */
3133 	#define BD_BASE_TYPE_MASK		UINT32_C(0x3f)
3134 	#define BD_BASE_TYPE_SFT		0
3135 	/*
3136 	 * Indicates that this BD is 16B long and is used for
3137 	 * normal L2 packet transmission.
3138 	 */
3139 		#define BD_BASE_TYPE_TX_BD_SHORT	UINT32_C(0x0)
3140 	/*
3141 	 * Indicates that this BD is 1BB long and is an empty
3142 	 * TX BD. Not valid for use by the driver.
3143 	 */
3144 		#define BD_BASE_TYPE_TX_BD_EMPTY	UINT32_C(0x1)
3145 	/*
3146 	 * Indicates that this BD is 16B long and is an RX Producer
3147 	 * (i.e. empty) buffer descriptor.
3148 	 */
3149 		#define BD_BASE_TYPE_RX_PROD_PKT	UINT32_C(0x4)
3150 	/*
3151 	 * Indicates that this BD is 16B long and is an RX
3152 	 * Producer Buffer BD.
3153 	 */
3154 		#define BD_BASE_TYPE_RX_PROD_BFR	UINT32_C(0x5)
3155 	/*
3156 	 * Indicates that this BD is 16B long and is an
3157 	 * RX Producer Assembly Buffer Descriptor.
3158 	 */
3159 		#define BD_BASE_TYPE_RX_PROD_AGG	UINT32_C(0x6)
3160 	/*
3161 	 * Indicates that this BD is used to issue a command to one of
3162 	 * the mid-path destinations.
3163 	 */
3164 		#define BD_BASE_TYPE_TX_BD_MP_CMD	UINT32_C(0x8)
3165 	/*
3166 	 * Indicates that this BD is used to issue a cryptographic pre-
3167 	 * sync command through the fast path and destined for TCE.
3168 	 */
3169 		#define BD_BASE_TYPE_TX_BD_PRESYNC_CMD  UINT32_C(0x9)
3170 	/*
3171 	 * Indicates a timed transmit BD. This is a 16b BD that is inserted
3172 	 * into a packet BD chain immediately after the first BD. It is used
3173 	 * to control the flow in a timed transmit operation.
3174 	 */
3175 		#define BD_BASE_TYPE_TX_BD_TIMEDTX	UINT32_C(0xa)
3176 	/*
3177 	 * Indicates that this BD is 32B long and is used for
3178 	 * normal L2 packet transmission.
3179 	 */
3180 		#define BD_BASE_TYPE_TX_BD_LONG	UINT32_C(0x10)
3181 	/*
3182 	 * Indicates that this BD is 32B long and is used for
3183 	 * L2 packet transmission for small packets that require
3184 	 * low latency.
3185 	 */
3186 		#define BD_BASE_TYPE_TX_BD_LONG_INLINE  UINT32_C(0x11)
3187 		#define BD_BASE_TYPE_LAST		BD_BASE_TYPE_TX_BD_LONG_INLINE
3188 	uint8_t	unused_1[7];
3189 } bd_base_t, *pbd_base_t;
3190 
3191 /* tx_bd_short (size:128b/16B) */
3192 
3193 typedef struct tx_bd_short {
3194 	/*
3195 	 * All bits in this field must be valid on the first BD of a packet.
3196 	 * Only the packet_end bit must be valid for the remaining BDs
3197 	 * of a packet.
3198 	 */
3199 	uint16_t	flags_type;
3200 	/* This value identifies the type of buffer descriptor. */
3201 	#define TX_BD_SHORT_TYPE_MASK		UINT32_C(0x3f)
3202 	#define TX_BD_SHORT_TYPE_SFT		0
3203 	/*
3204 	 * Indicates that this BD is 16B long and is used for
3205 	 * normal L2 packet transmission.
3206 	 */
3207 		#define TX_BD_SHORT_TYPE_TX_BD_SHORT	UINT32_C(0x0)
3208 		#define TX_BD_SHORT_TYPE_LAST		TX_BD_SHORT_TYPE_TX_BD_SHORT
3209 	/*
3210 	 * All bits in this field must be valid on the first BD of a packet.
3211 	 * Only the packet_end bit must be valid for the remaining BDs
3212 	 * of a packet.
3213 	 */
3214 	#define TX_BD_SHORT_FLAGS_MASK	UINT32_C(0xffc0)
3215 	#define TX_BD_SHORT_FLAGS_SFT		6
3216 	/*
3217 	 * If set to 1, the packet ends with the data in the buffer
3218 	 * pointed to by this descriptor. This flag must be
3219 	 * valid on every BD.
3220 	 */
3221 	#define TX_BD_SHORT_FLAGS_PACKET_END	UINT32_C(0x40)
3222 	/*
3223 	 * If set to 1, the device will not generate a completion for
3224 	 * this transmit packet unless there is an error in it's
3225 	 * processing.
3226 	 * If this bit
3227 	 * is set to 0, then the packet will be completed normally.
3228 	 *
3229 	 * This bit must be valid only on the first BD of a packet.
3230 	 */
3231 	#define TX_BD_SHORT_FLAGS_NO_CMPL	UINT32_C(0x80)
3232 	/*
3233 	 * This value indicates how many 16B BD locations are consumed
3234 	 * in the ring by this packet.
3235 	 * A value of 1 indicates that this BD is the only BD (and that
3236 	 * it is a short BD). A value
3237 	 * of 3 indicates either 3 short BDs or 1 long BD and one short
3238 	 * BD in the packet. A value of 0 indicates
3239 	 * that there are 32 BD locations in the packet (the maximum).
3240 	 *
3241 	 * This field is valid only on the first BD of a packet.
3242 	 */
3243 	#define TX_BD_SHORT_FLAGS_BD_CNT_MASK	UINT32_C(0x1f00)
3244 	#define TX_BD_SHORT_FLAGS_BD_CNT_SFT	8
3245 	/*
3246 	 * This value is a hint for the length of the entire packet.
3247 	 * It is used by the chip to optimize internal processing.
3248 	 *
3249 	 * The packet will be dropped if the hint is too short.
3250 	 *
3251 	 * This field is valid only on the first BD of a packet.
3252 	 */
3253 	#define TX_BD_SHORT_FLAGS_LHINT_MASK	UINT32_C(0x6000)
3254 	#define TX_BD_SHORT_FLAGS_LHINT_SFT	13
3255 	/* indicates packet length < 512B */
3256 		#define TX_BD_SHORT_FLAGS_LHINT_LT512	(UINT32_C(0x0) << 13)
3257 	/* indicates 512 <= packet length < 1KB */
3258 		#define TX_BD_SHORT_FLAGS_LHINT_LT1K	(UINT32_C(0x1) << 13)
3259 	/* indicates 1KB <= packet length < 2KB */
3260 		#define TX_BD_SHORT_FLAGS_LHINT_LT2K	(UINT32_C(0x2) << 13)
3261 	/* indicates packet length >= 2KB */
3262 		#define TX_BD_SHORT_FLAGS_LHINT_GTE2K	(UINT32_C(0x3) << 13)
3263 		#define TX_BD_SHORT_FLAGS_LHINT_LAST	TX_BD_SHORT_FLAGS_LHINT_GTE2K
3264 	/*
3265 	 * If set to 1, the device immediately updates the Send Consumer
3266 	 * Index after the buffer associated with this descriptor has
3267 	 * been transferred via DMA to NIC memory from host memory. An
3268 	 * interrupt may or may not be generated according to the state
3269 	 * of the interrupt avoidance mechanisms. If this bit
3270 	 * is set to 0, then the Consumer Index is only updated as soon
3271 	 * as one of the host interrupt coalescing conditions has been met.
3272 	 *
3273 	 * This bit must be valid on the first BD of a packet.
3274 	 */
3275 	#define TX_BD_SHORT_FLAGS_COAL_NOW	UINT32_C(0x8000)
3276 	/*
3277 	 * This is the length of the host physical buffer this BD describes
3278 	 * in bytes.
3279 	 *
3280 	 * This field must be valid on all BDs of a packet.
3281 	 */
3282 	uint16_t	len;
3283 	/*
3284 	 * The opaque data field is pass through to the completion and can be
3285 	 * used for any data that the driver wants to associate with the
3286 	 * transmit BD.
3287 	 *
3288 	 * This field must be valid on the first BD of a packet. If completion
3289 	 * coalescing is enabled on the TX ring, it is suggested that the driver
3290 	 * populate the opaque field to indicate the specific TX ring with which
3291 	 * the completion is associated, then utilize the opaque and sq_cons_idx
3292 	 * fields in the coalesced completion record to determine the specific
3293 	 * packets that are to be completed on that ring.
3294 	 */
3295 	uint32_t	opaque;
3296 	/*
3297 	 * This is the host physical address for the portion of the packet
3298 	 * described by this TX BD.
3299 	 *
3300 	 * This value must be valid on all BDs of a packet.
3301 	 */
3302 	uint32_t	addr_lo;
3303 	uint32_t	addr_hi;
3304 } tx_bd_short_t, *ptx_bd_short_t;
3305 
3306 /* tx_bd_long (size:128b/16B) */
3307 
3308 typedef struct tx_bd_long {
3309 	/* This value identifies the type of buffer descriptor. */
3310 	uint16_t	flags_type;
3311 	/*
3312 	 * This value indicates the type of buffer descriptor.
3313 	 * packet.
3314 	 */
3315 	#define TX_BD_LONG_TYPE_MASK		UINT32_C(0x3f)
3316 	#define TX_BD_LONG_TYPE_SFT		0
3317 	/*
3318 	 * Indicates that this BD is 32B long and is used for
3319 	 * normal L2 packet transmission.
3320 	 */
3321 		#define TX_BD_LONG_TYPE_TX_BD_LONG	UINT32_C(0x10)
3322 		#define TX_BD_LONG_TYPE_LAST		TX_BD_LONG_TYPE_TX_BD_LONG
3323 	/*
3324 	 * All bits in this field must be valid on the first BD of a packet.
3325 	 * Only the packet_end bit must be valid for the remaining BDs
3326 	 * of a packet.
3327 	 */
3328 	#define TX_BD_LONG_FLAGS_MASK	UINT32_C(0xffc0)
3329 	#define TX_BD_LONG_FLAGS_SFT		6
3330 	/*
3331 	 * If set to 1, the packet ends with the data in the buffer
3332 	 * pointed to by this descriptor. This flag must be
3333 	 * valid on every BD.
3334 	 */
3335 	#define TX_BD_LONG_FLAGS_PACKET_END	UINT32_C(0x40)
3336 	/*
3337 	 * If set to 1, the device will not generate a completion for
3338 	 * this transmit packet unless there is an error in it's
3339 	 * processing.
3340 	 * If this bit
3341 	 * is set to 0, then the packet will be completed normally.
3342 	 *
3343 	 * This bit must be valid only on the first BD of a packet.
3344 	 */
3345 	#define TX_BD_LONG_FLAGS_NO_CMPL	UINT32_C(0x80)
3346 	/*
3347 	 * This value indicates how many 16B BD locations are consumed
3348 	 * in the ring by this packet.
3349 	 * A value of 1 indicates that this BD is the only BD (and that
3350 	 * it is a short BD). A value
3351 	 * of 3 indicates either 3 short BDs or 1 long BD and one short
3352 	 * BD in the packet. A value of 0 indicates
3353 	 * that there are 32 BD locations in the packet (the maximum).
3354 	 *
3355 	 * This field is valid only on the first BD of a packet.
3356 	 */
3357 	#define TX_BD_LONG_FLAGS_BD_CNT_MASK	UINT32_C(0x1f00)
3358 	#define TX_BD_LONG_FLAGS_BD_CNT_SFT	8
3359 	/*
3360 	 * This value is a hint for the length of the entire packet.
3361 	 * It is used by the chip to optimize internal processing.
3362 	 *
3363 	 * The packet will be dropped if the hint is too short.
3364 	 *
3365 	 * This field is valid only on the first BD of a packet.
3366 	 */
3367 	#define TX_BD_LONG_FLAGS_LHINT_MASK	UINT32_C(0x6000)
3368 	#define TX_BD_LONG_FLAGS_LHINT_SFT	13
3369 	/* indicates packet length < 512B */
3370 		#define TX_BD_LONG_FLAGS_LHINT_LT512	(UINT32_C(0x0) << 13)
3371 	/* indicates 512 <= packet length < 1KB */
3372 		#define TX_BD_LONG_FLAGS_LHINT_LT1K	(UINT32_C(0x1) << 13)
3373 	/* indicates 1KB <= packet length < 2KB */
3374 		#define TX_BD_LONG_FLAGS_LHINT_LT2K	(UINT32_C(0x2) << 13)
3375 	/* indicates packet length >= 2KB */
3376 		#define TX_BD_LONG_FLAGS_LHINT_GTE2K	(UINT32_C(0x3) << 13)
3377 		#define TX_BD_LONG_FLAGS_LHINT_LAST	TX_BD_LONG_FLAGS_LHINT_GTE2K
3378 	/*
3379 	 * If set to 1, the device immediately updates the Send Consumer
3380 	 * Index after the buffer associated with this descriptor has
3381 	 * been transferred via DMA to NIC memory from host memory. An
3382 	 * interrupt may or may not be generated according to the state
3383 	 * of the interrupt avoidance mechanisms. If this bit
3384 	 * is set to 0, then the Consumer Index is only updated as soon
3385 	 * as one of the host interrupt coalescing conditions has been met.
3386 	 *
3387 	 * This bit must be valid on the first BD of a packet.
3388 	 */
3389 	#define TX_BD_LONG_FLAGS_COAL_NOW	UINT32_C(0x8000)
3390 	/*
3391 	 * This is the length of the host physical buffer this BD describes
3392 	 * in bytes.
3393 	 *
3394 	 * This field must be valid on all BDs of a packet.
3395 	 */
3396 	uint16_t	len;
3397 	/*
3398 	 * The opaque data field is passed through to the completion and can be
3399 	 * used for any data that the driver wants to associate with the
3400 	 * transmit BD.
3401 	 *
3402 	 * This field must be valid on the first BD of a packet. If completion
3403 	 * coalescing is enabled on the TX ring, it is suggested that the driver
3404 	 * populate the opaque field to indicate the specific TX ring with which
3405 	 * the completion is associated, then utilize the opaque and sq_cons_idx
3406 	 * fields in the coalesced completion record to determine the specific
3407 	 * packets that are to be completed on that ring.
3408 	 */
3409 	uint32_t	opaque;
3410 	/*
3411 	 * This is the host physical address for the portion of the packet
3412 	 * described by this TX BD.
3413 	 *
3414 	 * This value must be valid on all BDs of a packet.
3415 	 */
3416 	uint64_t	addr;
3417 } tx_bd_long_t, *ptx_bd_long_t;
3418 
3419 /* Last 16 bytes of tx_bd_long. */
3420 /* tx_bd_long_hi (size:128b/16B) */
3421 
3422 typedef struct tx_bd_long_hi {
3423 	/*
3424 	 * All bits in this field must be valid on the first BD of a packet.
3425 	 * Their value on other BDs of the packet will be ignored.
3426 	 */
3427 	uint16_t	lflags;
3428 	/*
3429 	 * If set to 1, the controller replaces the TCP/UPD checksum
3430 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
3431 	 * checksum field of the encapsulated TCP/UDP packets with the
3432 	 * hardware calculated TCP/UDP checksum for the packet associated
3433 	 * with this descriptor. The flag is ignored if the LSO flag is set.
3434 	 *
3435 	 * This bit must be valid on the first BD of a packet.
3436 	 */
3437 	#define TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM	UINT32_C(0x1)
3438 	/*
3439 	 * If set to 1, the controller replaces the IP checksum of the
3440 	 * normal packets, or the inner IP checksum of the encapsulated
3441 	 * packets with the hardware calculated IP checksum for the
3442 	 * packet associated with this descriptor.
3443 	 *
3444 	 * This bit must be valid on the first BD of a packet.
3445 	 */
3446 	#define TX_BD_LONG_LFLAGS_IP_CHKSUM	UINT32_C(0x2)
3447 	/*
3448 	 * If set to 1, the controller will not append an Ethernet CRC
3449 	 * to the end of the frame.
3450 	 *
3451 	 * This bit must be valid on the first BD of a packet.
3452 	 *
3453 	 * Packet must be 64B or longer when this flag is set. It is not
3454 	 * useful to use this bit with any form of TX offload such as
3455 	 * CSO or LSO. The intent is that the packet from the host already
3456 	 * has a valid Ethernet CRC on the packet.
3457 	 */
3458 	#define TX_BD_LONG_LFLAGS_NOCRC		UINT32_C(0x4)
3459 	/*
3460 	 * This bit, in conjunction with the stamp_1step bit, controls whether
3461 	 * a TX packet timestamp is collected and the type of timestamp that
3462 	 * is collected.
3463 	 *
3464 	 * This bit must be valid on the first BD of a packet.
3465 	 *
3466 	 * Enumerations of the concatenation { stamp, stamp_1step } are
3467 	 * as follows:
3468 	 *
3469 	 * - 2'b00: ts_none - no timestamp
3470 	 * - 2'b01: ts_ptp_1step - 1-step PTP
3471 	 * - 2'b10: ts_2cmpl - 2-step PTP timestamp or PA timestamp
3472 	 * - 2'b11: ts_rsvd - reserved, same behavior as ts_none
3473 	 * For the ts_2cmpl enumeration, an additional completion is returned.
3474 	 * This additional completion may carry a 2-step PTP timestamp or a PA
3475 	 * timestamp, depending on parsing of the transmitted packet.
3476 	 */
3477 	#define TX_BD_LONG_LFLAGS_STAMP		UINT32_C(0x8)
3478 	/*
3479 	 * If set to 1, The controller replaces the tunnel IP checksum
3480 	 * field with hardware calculated IP checksum for the IP header
3481 	 * of the packet associated with this descriptor.
3482 	 *
3483 	 * For outer UDP checksum, global outer UDP checksum TE_NIC register
3484 	 * needs to be enabled. If the global outer UDP checksum TE_NIC
3485 	 * register bit is set, outer UDP checksum will be calculated for
3486 	 * the following cases:
3487 	 * 1. Packets with tcp_udp_chksum flag set to offload checksum for
3488 	 * inner packet AND the inner packet is TCP/UDP. If the inner packet
3489 	 * is ICMP for example (non-TCP/UDP), even if the tcp_udp_chksum is
3490 	 * set, the outer UDP checksum will not be calculated.
3491 	 * 2. Packets with lso flag set which implies inner TCP checksum
3492 	 * calculation as part of LSO operation.
3493 	 */
3494 	#define TX_BD_LONG_LFLAGS_T_IP_CHKSUM	UINT32_C(0x10)
3495 	/*
3496 	 * If set to 1, the device will treat this packet with LSO(Large
3497 	 * Send Offload) processing for both normal or encapsulated
3498 	 * packets, which is a form of TCP segmentation. When this bit
3499 	 * is 1, the hdr_size and mss fields must be valid. The driver
3500 	 * doesn't need to set ot_ip_chksum, t_ip_chksum, ip_chksum, and
3501 	 * tcp_udp_chksum flags since the controller will replace the
3502 	 * appropriate checksum fields for segmented packets.
3503 	 *
3504 	 * When this bit is 1, the hdr_size and mss fields must be valid.
3505 	 */
3506 	#define TX_BD_LONG_LFLAGS_LSO		UINT32_C(0x20)
3507 	/*
3508 	 * If set to zero when LSO is '1', then the IPID will be treated
3509 	 * as a 16b number and will be wrapped if it exceeds a value of
3510 	 * 0xffff.
3511 	 *
3512 	 * If set to one when LSO is '1', then the IPID will be treated
3513 	 * as a 15b number and will be wrapped if it exceeds a value of
3514 	 * 0x7fff.
3515 	 */
3516 	#define TX_BD_LONG_LFLAGS_IPID_FMT	UINT32_C(0x40)
3517 	/*
3518 	 * If set to zero when LSO is '1', then the IPID of the tunnel
3519 	 * IP header will not be modified during LSO operations.
3520 	 *
3521 	 * If set to one when LSO is '1', then the IPID of the tunnel
3522 	 * IP header will be incremented for each subsequent segment of an
3523 	 * LSO operation.
3524 	 *
3525 	 * The flag is ignored if the LSO packet is a normal (non-tunneled)
3526 	 * TCP packet.
3527 	 */
3528 	#define TX_BD_LONG_LFLAGS_T_IPID		UINT32_C(0x80)
3529 	/*
3530 	 * If set to '1', then the RoCE ICRC will be appended to the
3531 	 * packet. Packet must be a valid RoCE format packet.
3532 	 */
3533 	#define TX_BD_LONG_LFLAGS_ROCE_CRC	UINT32_C(0x100)
3534 	/*
3535 	 * If set to '1', then the FCoE CRC will be appended to the
3536 	 * packet. Packet must be a valid FCoE format packet.
3537 	 */
3538 	#define TX_BD_LONG_LFLAGS_FCOE_CRC	UINT32_C(0x200)
3539 	/*
3540 	 * If set to '1', then the timestamp from the BD is used. If cleared
3541 	 * to 0, then TWE provides the timestamp.
3542 	 */
3543 	/*
3544 	 * The BD timestamp feature cannot be enabled concurrently with
3545 	 * cryptography (KTLS), thus lflags.bd_ts_en and lflags.crypto_en
3546 	 * shall never both be set in a BD.
3547 	 */
3548 	#define TX_BD_LONG_LFLAGS_BD_TS_EN	UINT32_C(0x400)
3549 	/*
3550 	 * If set to '1', this operation will cause a trace capture in each
3551 	 * block it passes through.
3552 	 */
3553 	#define TX_BD_LONG_LFLAGS_DEBUG_TRACE	UINT32_C(0x800)
3554 	/*
3555 	 * This bit, in conjunction with the stamp bit, controls whether a
3556 	 * TX packet timestamp is collected and the type of timestamp that
3557 	 * is collected.
3558 	 *
3559 	 * See the stamp field for a description of the valid combinations of
3560 	 * stamp and stamp_1step.
3561 	 *
3562 	 * This bit must be valid on the first BD of a packet.
3563 	 */
3564 	#define TX_BD_LONG_LFLAGS_STAMP_1STEP	UINT32_C(0x1000)
3565 	/*
3566 	 * If set to '1', the controller replaces the Outer-tunnel IP checksum
3567 	 * field with hardware calculated IP checksum for the IP header of the
3568 	 * packet associated with this descriptor. For outer UDP checksum, it
3569 	 * will be the following behavior for all cases independent of
3570 	 * settings of inner LSO and checksum offload BD flags.
3571 	 * If outer UDP checksum is 0, then do not update it.
3572 	 * If outer UDP checksum is non zero, then the hardware should
3573 	 * compute and update it.
3574 	 */
3575 	#define TX_BD_LONG_LFLAGS_OT_IP_CHKSUM	UINT32_C(0x2000)
3576 	/*
3577 	 * If set to zero when LSO is '1', then the IPID of the Outer-tunnel
3578 	 * IP header will not be modified during LSO operations. If set to one
3579 	 * when LSO is '1', then the IPID of the Outer-tunnel IP header will
3580 	 * be incremented for each subsequent segment of an LSO operation. The
3581 	 * flag is ignored if the LSO packet is a normal (non-tunneled) TCP
3582 	 * packet.
3583 	 */
3584 	#define TX_BD_LONG_LFLAGS_OT_IPID		UINT32_C(0x4000)
3585 	/*
3586 	 * If set to '1', When set to 1, KTLS encryption will be enabled for
3587 	 * the packet.
3588 	 */
3589 	/*
3590 	 * The BD timestamp feature cannot be enabled concurrently with
3591 	 * cryptography (KTLS), thus lflags.bd_ts_en and lflags.crypto_en
3592 	 * shall never both be set in a BD.
3593 	 */
3594 	#define TX_BD_LONG_LFLAGS_CRYPTO_EN	UINT32_C(0x8000)
3595 	uint16_t	kid_or_ts_low_hdr_size;
3596 	/*
3597 	 * When LSO is '1', this field must contain the offset of the
3598 	 * TCP payload from the beginning of the packet in as
3599 	 * 16b words. In case of encapsulated/tunneling packet, this field
3600 	 * contains the offset of the inner TCP payload from beginning of the
3601 	 * packet as 16-bit words.
3602 	 *
3603 	 * This value must be valid on the first BD of a packet.
3604 	 */
3605 	#define TX_BD_LONG_HDR_SIZE_MASK	UINT32_C(0x1ff)
3606 	#define TX_BD_LONG_HDR_SIZE_SFT	0
3607 	/*
3608 	 * If lflags.bd_ts_en is 1, this is the lower 7 bits of the 24-bit
3609 	 * timestamp. If lflags.crypto_en is 1, this is the lower 7 bits of
3610 	 * the 20-bit KID.
3611 	 */
3612 	/*
3613 	 * The KID value of all-ones is reserved for non-KTLS packets, which
3614 	 * only implies that this value must not be used when filling this
3615 	 * field for crypto packets.
3616 	 */
3617 	#define TX_BD_LONG_KID_OR_TS_LOW_MASK UINT32_C(0xfe00)
3618 	#define TX_BD_LONG_KID_OR_TS_LOW_SFT 9
3619 	uint32_t	kid_or_ts_high_mss;
3620 	/*
3621 	 * This is the MSS value that will be used to do the LSO processing.
3622 	 * The value is the length in bytes of the TCP payload for each
3623 	 * segment generated by the LSO operation.
3624 	 *
3625 	 * This value must be valid on the first BD of a packet.
3626 	 */
3627 	#define TX_BD_LONG_MSS_MASK	UINT32_C(0x7fff)
3628 	#define TX_BD_LONG_MSS_SFT		0
3629 	/*
3630 	 * If lflags.bd_ts_en is 1, this is the upper 17 bits of the 24-bit
3631 	 * timestamp. If lflags.crypto_en is 1, the least significant 13 bits
3632 	 * of this field contain the upper 13 bits of the 20-bit KID.
3633 	 */
3634 	/*
3635 	 * The KID value of all-ones is reserved for non-KTLS packets, which
3636 	 * only implies that this value must not be used when filling this
3637 	 * field for crypto packets.
3638 	 */
3639 	#define TX_BD_LONG_KID_OR_TS_HIGH_MASK UINT32_C(0xffff8000)
3640 	#define TX_BD_LONG_KID_OR_TS_HIGH_SFT 15
3641 	/*
3642 	 * This value selects bits 25:16 of the CFA action to perform on the
3643 	 * packet. See the cfa_action field for more information.
3644 	 */
3645 	uint16_t	cfa_action_high;
3646 	#define TX_BD_LONG_CFA_ACTION_HIGH_MASK UINT32_C(0x3ff)
3647 	#define TX_BD_LONG_CFA_ACTION_HIGH_SFT 0
3648 	/*
3649 	 * This value selects a CFA action to perform on the packet.
3650 	 * Set this value to zero if no CFA action is desired.
3651 	 *
3652 	 * This value must be valid on the first BD of a packet.
3653 	 */
3654 	uint16_t	cfa_action;
3655 	/*
3656 	 * This value is action meta-data that defines CFA edit operations
3657 	 * that are done in addition to any action editing.
3658 	 */
3659 	uint32_t	cfa_meta;
3660 	/* When key=1, This is the VLAN tag VID value. */
3661 	#define TX_BD_LONG_CFA_META_VLAN_VID_MASK	UINT32_C(0xfff)
3662 	#define TX_BD_LONG_CFA_META_VLAN_VID_SFT	0
3663 	/* When key=1, This is the VLAN tag DE value. */
3664 	#define TX_BD_LONG_CFA_META_VLAN_DE		UINT32_C(0x1000)
3665 	/* When key=1, This is the VLAN tag PRI value. */
3666 	#define TX_BD_LONG_CFA_META_VLAN_PRI_MASK	UINT32_C(0xe000)
3667 	#define TX_BD_LONG_CFA_META_VLAN_PRI_SFT	13
3668 	/* When key=1, This is the VLAN tag TPID select value. */
3669 	#define TX_BD_LONG_CFA_META_VLAN_TPID_MASK	UINT32_C(0x70000)
3670 	#define TX_BD_LONG_CFA_META_VLAN_TPID_SFT	16
3671 	/* 0x88a8 */
3672 		#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID88A8	(UINT32_C(0x0) << 16)
3673 	/* 0x8100 */
3674 		#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID8100	(UINT32_C(0x1) << 16)
3675 	/* 0x9100 */
3676 		#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9100	(UINT32_C(0x2) << 16)
3677 	/* 0x9200 */
3678 		#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9200	(UINT32_C(0x3) << 16)
3679 	/* 0x9300 */
3680 		#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9300	(UINT32_C(0x4) << 16)
3681 	/* Value programmed in CFA VLANTPID register. */
3682 		#define TX_BD_LONG_CFA_META_VLAN_TPID_TPIDCFG	(UINT32_C(0x5) << 16)
3683 		#define TX_BD_LONG_CFA_META_VLAN_TPID_LAST	TX_BD_LONG_CFA_META_VLAN_TPID_TPIDCFG
3684 	/* When key=1, This is the VLAN tag TPID select value. */
3685 	#define TX_BD_LONG_CFA_META_VLAN_RESERVED_MASK   UINT32_C(0xff80000)
3686 	#define TX_BD_LONG_CFA_META_VLAN_RESERVED_SFT	19
3687 	/*
3688 	 * This field identifies the type of edit to be performed
3689 	 * on the packet.
3690 	 *
3691 	 * This value must be valid on the first BD of a packet.
3692 	 */
3693 	#define TX_BD_LONG_CFA_META_KEY_MASK		UINT32_C(0xf0000000)
3694 	#define TX_BD_LONG_CFA_META_KEY_SFT		28
3695 	/* No editing */
3696 		#define TX_BD_LONG_CFA_META_KEY_NONE		(UINT32_C(0x0) << 28)
3697 	/*
3698 	 * - meta[17:16] - TPID select value (0 = 0x8100).
3699 	 * - meta[15:12] - PRI/DE value.
3700 	 * - meta[11:0] - VID value.
3701 	 */
3702 		#define TX_BD_LONG_CFA_META_KEY_VLAN_TAG	(UINT32_C(0x1) << 28)
3703 	/*
3704 	 * Provide metadata
3705 	 * - Wh+/SR - this option is not supported.
3706 	 * - Thor - cfa_meta[15:0] is used for metadata output if en_bd_meta
3707 	 *   is set in the Lookup Table.
3708 	 * - SR2 - {4'd0, cfa_meta[27:0]} is used for metadata output if
3709 	 *   en_bd_meta is set in the Lookup Table.
3710 	 */
3711 		#define TX_BD_LONG_CFA_META_KEY_METADATA_TRANSFER  (UINT32_C(0x2) << 28)
3712 		#define TX_BD_LONG_CFA_META_KEY_LAST		TX_BD_LONG_CFA_META_KEY_METADATA_TRANSFER
3713 } tx_bd_long_hi_t, *ptx_bd_long_hi_t;
3714 
3715 /*
3716  * This structure is used to inform the NIC of packet data that needs to
3717  * be transmitted with additional processing that requires extra data
3718  * such as VLAN insertion plus attached inline data.
3719  * This BD type may be used to improve latency for small packets needing
3720  * the additional extended features supported by long BDs.
3721  */
3722 /* tx_bd_long_inline (size:256b/32B) */
3723 
3724 typedef struct tx_bd_long_inline {
3725 	uint16_t	flags_type;
3726 	/* This value identifies the type of buffer descriptor. */
3727 	#define TX_BD_LONG_INLINE_TYPE_MASK		UINT32_C(0x3f)
3728 	#define TX_BD_LONG_INLINE_TYPE_SFT		0
3729 	/*
3730 	 * This type of BD is 32B long and is used for inline L2 packet
3731 	 * transmission.
3732 	 */
3733 		#define TX_BD_LONG_INLINE_TYPE_TX_BD_LONG_INLINE  UINT32_C(0x11)
3734 		#define TX_BD_LONG_INLINE_TYPE_LAST		TX_BD_LONG_INLINE_TYPE_TX_BD_LONG_INLINE
3735 	/*
3736 	 * All bits in this field may be set on the first BD of a packet.
3737 	 * Only the packet_end bit may be set in non-first BDs.
3738 	 */
3739 	#define TX_BD_LONG_INLINE_FLAGS_MASK		UINT32_C(0xffc0)
3740 	#define TX_BD_LONG_INLINE_FLAGS_SFT		6
3741 	/*
3742 	 * If set to 1, the packet ends with the data in the buffer
3743 	 * pointed to by this descriptor. This flag must be
3744 	 * valid on every BD.
3745 	 */
3746 	#define TX_BD_LONG_INLINE_FLAGS_PACKET_END	UINT32_C(0x40)
3747 	/*
3748 	 * If set to 1, the device will not generate a completion for
3749 	 * this transmit packet unless there is an error in its processing.
3750 	 * If this bit is set to 0, then the packet will be completed
3751 	 * normally.
3752 	 *
3753 	 * This bit may be set only on the first BD of a packet.
3754 	 */
3755 	#define TX_BD_LONG_INLINE_FLAGS_NO_CMPL	UINT32_C(0x80)
3756 	/*
3757 	 * This value indicates how many 16B BD locations are consumed
3758 	 * in the ring by this packet, including the BD and inline
3759 	 * data.
3760 	 */
3761 	#define TX_BD_LONG_INLINE_FLAGS_BD_CNT_MASK	UINT32_C(0x1f00)
3762 	#define TX_BD_LONG_INLINE_FLAGS_BD_CNT_SFT	8
3763 	/* This field is deprecated. */
3764 	#define TX_BD_LONG_INLINE_FLAGS_LHINT_MASK	UINT32_C(0x6000)
3765 	#define TX_BD_LONG_INLINE_FLAGS_LHINT_SFT	13
3766 	/*
3767 	 * If set to 1, the device immediately updates the Send Consumer
3768 	 * Index after the buffer associated with this descriptor has
3769 	 * been transferred via DMA to NIC memory from host memory. An
3770 	 * interrupt may or may not be generated according to the state
3771 	 * of the interrupt avoidance mechanisms. If this bit
3772 	 * is set to 0, then the Consumer Index is only updated as soon
3773 	 * as one of the host interrupt coalescing conditions has been met.
3774 	 *
3775 	 * This bit must be valid on the first BD of a packet.
3776 	 */
3777 	#define TX_BD_LONG_INLINE_FLAGS_COAL_NOW	UINT32_C(0x8000)
3778 	/*
3779 	 * This is the length of the inline data, not including BD length, in
3780 	 * bytes.
3781 	 * The maximum value is 480.
3782 	 *
3783 	 * This field must be valid on all BDs of a packet.
3784 	 */
3785 	/*
3786 	 * A fatal error will be generated if the value of this field
3787 	 * does not correspond with the value of flags.bd_cnt. For example, if
3788 	 * this field carries a value of 20, then bd_cnt must equal 4.
3789 	 */
3790 	uint16_t	len;
3791 	/*
3792 	 * The opaque data field is passed through to the completion and can be
3793 	 * used for any data that the driver wants to associate with the
3794 	 * transmit BD. This field must be valid on the first BD of a packet.
3795 	 * If completion coalescing is enabled on the TX ring, it is suggested
3796 	 * that the driver populate the opaque field to indicate the specific
3797 	 * TX ring with which the completion is associated, then utilize the
3798 	 * opaque and sq_cons_idx fields in the coalesced completion record to
3799 	 * determine the specific packets that are to be completed on that ring.
3800 	 *
3801 	 * This field must be valid on the first BD of a packet.
3802 	 */
3803 	uint32_t	opaque;
3804 	uint32_t	unused1_lo;
3805 	uint32_t	unused1_hi;
3806 	/*
3807 	 * All bits in this field must be valid on the first BD of a packet.
3808 	 * Their value on other BDs of the packet is ignored.
3809 	 */
3810 	uint16_t	lflags;
3811 	/*
3812 	 * If set to 1, the controller replaces the TCP/UPD checksum
3813 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
3814 	 * checksum field of the encapsulated TCP/UDP packets with the
3815 	 * hardware calculated TCP/UDP checksum for the packet associated
3816 	 * with this descriptor. The flag is ignored if the LSO flag is set.
3817 	 */
3818 	#define TX_BD_LONG_INLINE_LFLAGS_TCP_UDP_CHKSUM	UINT32_C(0x1)
3819 	/*
3820 	 * If set to 1, the controller replaces the IP checksum of the
3821 	 * normal packets, or the inner IP checksum of the encapsulated
3822 	 * packets with the hardware calculated IP checksum for the
3823 	 * packet associated with this descriptor.
3824 	 */
3825 	#define TX_BD_LONG_INLINE_LFLAGS_IP_CHKSUM	UINT32_C(0x2)
3826 	/*
3827 	 * If set to 1, the controller will not append an Ethernet CRC
3828 	 * to the end of the frame.
3829 	 *
3830 	 * Packet must be 64B or longer when this flag is set. It is not
3831 	 * useful to use this bit with any form of TX offload such as
3832 	 * CSO or LSO. The intent is that the packet from the host already
3833 	 * has a valid Ethernet CRC on the packet.
3834 	 */
3835 	#define TX_BD_LONG_INLINE_LFLAGS_NOCRC		UINT32_C(0x4)
3836 	/*
3837 	 * If set to 1, the device will record the time at which the packet
3838 	 * was actually transmitted at the TX MAC for 2-step time sync. This
3839 	 * bit must be valid on the first BD of a packet.
3840 	 */
3841 	#define TX_BD_LONG_INLINE_LFLAGS_STAMP		UINT32_C(0x8)
3842 	/*
3843 	 * If set to 1, the controller replaces the tunnel IP checksum
3844 	 * field with hardware calculated IP checksum for the IP header
3845 	 * of the packet associated with this descriptor. The hardware
3846 	 * updates an outer UDP checksum if it is non-zero.
3847 	 */
3848 	#define TX_BD_LONG_INLINE_LFLAGS_T_IP_CHKSUM	UINT32_C(0x10)
3849 	/*
3850 	 * This bit must be 0 for BDs of this type. LSO is not supported with
3851 	 * inline BDs.
3852 	 */
3853 	#define TX_BD_LONG_INLINE_LFLAGS_LSO		UINT32_C(0x20)
3854 	/* Since LSO is not supported with inline BDs, this bit is not used. */
3855 	#define TX_BD_LONG_INLINE_LFLAGS_IPID_FMT	UINT32_C(0x40)
3856 	/* Since LSO is not supported with inline BDs, this bit is not used. */
3857 	#define TX_BD_LONG_INLINE_LFLAGS_T_IPID		UINT32_C(0x80)
3858 	/*
3859 	 * If set to '1', then the RoCE ICRC will be appended to the
3860 	 * packet. Packet must be a valid RoCE format packet.
3861 	 */
3862 	#define TX_BD_LONG_INLINE_LFLAGS_ROCE_CRC	UINT32_C(0x100)
3863 	/*
3864 	 * If set to '1', then the FCoE CRC will be appended to the
3865 	 * packet. Packet must be a valid FCoE format packet.
3866 	 */
3867 	#define TX_BD_LONG_INLINE_LFLAGS_FCOE_CRC	UINT32_C(0x200)
3868 	/*
3869 	 * If set to '1', then the timestamp from the BD is used. If cleared
3870 	 * to 0, then TWE provides the timestamp.
3871 	 */
3872 	/*
3873 	 * The BD timestamp feature cannot be enabled concurrently with
3874 	 * cryptography (KTLS), thus lflags.bd_ts_en and lflags.crypto_en
3875 	 * shall never both be set in a BD.
3876 	 */
3877 	#define TX_BD_LONG_INLINE_LFLAGS_BD_TS_EN	UINT32_C(0x400)
3878 	/*
3879 	 * If set to '1', this operation will cause a trace capture in each
3880 	 * block it passes through.
3881 	 */
3882 	#define TX_BD_LONG_INLINE_LFLAGS_DEBUG_TRACE	UINT32_C(0x800)
3883 	/*
3884 	 * If set to '1', the device will record the time at which the packet
3885 	 * was actually transmitted at the TX MAC for 1-step time sync. This
3886 	 * bit must be valid on the first BD of a packet.
3887 	 */
3888 	#define TX_BD_LONG_INLINE_LFLAGS_STAMP_1STEP	UINT32_C(0x1000)
3889 	/*
3890 	 * If set to '1', the controller replaces the Outer-tunnel IP checksum
3891 	 * field with hardware calculated IP checksum for the IP header of the
3892 	 * packet associated with this descriptor. For outer UDP checksum, it
3893 	 * will be the following behavior for all cases independent of settings
3894 	 * of inner LSO and checksum offload BD flags. If outer UDP checksum
3895 	 * is 0, then do not update it. If outer UDP checksum is non zero, then
3896 	 * the hardware should compute and update it.
3897 	 */
3898 	#define TX_BD_LONG_INLINE_LFLAGS_OT_IP_CHKSUM	UINT32_C(0x2000)
3899 	/*
3900 	 * If set to zero when LSO is '1', then the IPID of the Outer-tunnel IP
3901 	 * header will not be modified during LSO operations. If set to one
3902 	 * when LSO is '1', then the IPID of the Outer-tunnel IP header will be
3903 	 * incremented for each subsequent segment of an LSO operation. The
3904 	 * flag is ignored if the LSO packet is a normal (non-tunneled) TCP
3905 	 * packet.
3906 	 */
3907 	#define TX_BD_LONG_INLINE_LFLAGS_OT_IPID		UINT32_C(0x4000)
3908 	/*
3909 	 * If set to '1', When set to 1, KTLS encryption will be enabled for
3910 	 * the packet.
3911 	 */
3912 	/*
3913 	 * The BD timestamp feature cannot be enabled concurrently with
3914 	 * cryptography (KTLS), thus lflags.bd_ts_en and lflags.crypto_en
3915 	 * shall never both be set in a BD.
3916 	 */
3917 	#define TX_BD_LONG_INLINE_LFLAGS_CRYPTO_EN	UINT32_C(0x8000)
3918 	uint8_t	unused2;
3919 	uint8_t	kid_or_ts_low;
3920 	#define TX_BD_LONG_INLINE_UNUSED		UINT32_C(0x1)
3921 	/*
3922 	 * If lflags.bd_ts_en is 1, this is the lower 7 bits of the 24-bit
3923 	 * timestamp. If lflags.crypto_en is 1, this is the lower 7 bits of
3924 	 * the 20-bit KID.
3925 	 */
3926 	/*
3927 	 * The KID value of all-ones is reserved for non-KTLS packets, which
3928 	 * only implies that this value must not be used when filling this
3929 	 * field for crypto packets.
3930 	 */
3931 	#define TX_BD_LONG_INLINE_KID_OR_TS_LOW_MASK UINT32_C(0xfe)
3932 	#define TX_BD_LONG_INLINE_KID_OR_TS_LOW_SFT 1
3933 	uint32_t	kid_or_ts_high;
3934 	#define TX_BD_LONG_INLINE_UNUSED_MASK	UINT32_C(0x7fff)
3935 	#define TX_BD_LONG_INLINE_UNUSED_SFT	0
3936 	/*
3937 	 * If lflags.bd_ts_en is 1, this is the upper 17 bits of the 24-bit
3938 	 * timestamp. If lflags.crypto_en is 1, the least significant 13 bits
3939 	 * of this field contain the upper 13 bits of the 20-bit KID.
3940 	 */
3941 	/*
3942 	 * The KID value of all-ones is reserved for non-KTLS packets, which
3943 	 * only implies that this value must not be used when filling this
3944 	 * field for crypto packets.
3945 	 */
3946 	#define TX_BD_LONG_INLINE_KID_OR_TS_HIGH_MASK UINT32_C(0xffff8000)
3947 	#define TX_BD_LONG_INLINE_KID_OR_TS_HIGH_SFT 15
3948 	/*
3949 	 * This value selects bits 25:16 of the CFA action to perform on the
3950 	 * packet. See the cfa_action field for more information.
3951 	 */
3952 	uint16_t	cfa_action_high;
3953 	#define TX_BD_LONG_INLINE_CFA_ACTION_HIGH_MASK UINT32_C(0x3ff)
3954 	#define TX_BD_LONG_INLINE_CFA_ACTION_HIGH_SFT 0
3955 	/*
3956 	 * This value selects a CFA action to perform on the packet.
3957 	 * Set this value to zero if no CFA action is desired.
3958 	 *
3959 	 * This value must be valid on the first BD of a packet.
3960 	 */
3961 	uint16_t	cfa_action;
3962 	/*
3963 	 * This value is action meta-data that defines CFA edit operations
3964 	 * that are done in addition to any action editing.
3965 	 */
3966 	uint32_t	cfa_meta;
3967 	/* When key = 1, this is the VLAN tag VID value. */
3968 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_VID_MASK	UINT32_C(0xfff)
3969 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_VID_SFT	0
3970 	/* When key = 1, this is the VLAN tag DE value. */
3971 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_DE		UINT32_C(0x1000)
3972 	/* When key = 1, this is the VLAN tag PRI value. */
3973 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_PRI_MASK	UINT32_C(0xe000)
3974 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_PRI_SFT	13
3975 	/* When key = 1, this is the VLAN tag TPID select value. */
3976 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_MASK	UINT32_C(0x70000)
3977 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_SFT	16
3978 	/* 0x88a8 */
3979 		#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID88A8	(UINT32_C(0x0) << 16)
3980 	/* 0x8100 */
3981 		#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID8100	(UINT32_C(0x1) << 16)
3982 	/* 0x9100 */
3983 		#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID9100	(UINT32_C(0x2) << 16)
3984 	/* 0x9200 */
3985 		#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID9200	(UINT32_C(0x3) << 16)
3986 	/* 0x9300 */
3987 		#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID9300	(UINT32_C(0x4) << 16)
3988 	/* Value programmed in CFA VLANTPID register. */
3989 		#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPIDCFG	(UINT32_C(0x5) << 16)
3990 		#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_LAST	TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPIDCFG
3991 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_RESERVED_MASK   UINT32_C(0xff80000)
3992 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_RESERVED_SFT	19
3993 	/*
3994 	 * This field identifies the type of edit to be performed
3995 	 * on the packet.
3996 	 *
3997 	 * This value must be valid on the first BD of a packet.
3998 	 */
3999 	#define TX_BD_LONG_INLINE_CFA_META_KEY_MASK		UINT32_C(0xf0000000)
4000 	#define TX_BD_LONG_INLINE_CFA_META_KEY_SFT		28
4001 	/* No editing */
4002 		#define TX_BD_LONG_INLINE_CFA_META_KEY_NONE		(UINT32_C(0x0) << 28)
4003 	/*
4004 	 * - meta[17:16] - TPID select value (0 = 0x8100).
4005 	 * - meta[15:12] - PRI/DE value.
4006 	 * - meta[11:0] - VID value.
4007 	 */
4008 		#define TX_BD_LONG_INLINE_CFA_META_KEY_VLAN_TAG	(UINT32_C(0x1) << 28)
4009 	/*
4010 	 * Provide metadata
4011 	 * - Wh+/SR - this option is not supported.
4012 	 * - Thor - cfa_meta[15:0] is used for metadata output if en_bd_meta
4013 	 *   is set in the Lookup Table.
4014 	 * - SR2 - {4'd0, cfa_meta[27:0]} is used for metadata output if
4015 	 *   en_bd_meta is set in the Lookup Table.
4016 	 */
4017 		#define TX_BD_LONG_INLINE_CFA_META_KEY_METADATA_TRANSFER  (UINT32_C(0x2) << 28)
4018 		#define TX_BD_LONG_INLINE_CFA_META_KEY_LAST		TX_BD_LONG_INLINE_CFA_META_KEY_METADATA_TRANSFER
4019 } tx_bd_long_inline_t, *ptx_bd_long_inline_t;
4020 
4021 /* tx_bd_empty (size:128b/16B) */
4022 
4023 typedef struct tx_bd_empty {
4024 	/* This value identifies the type of buffer descriptor. */
4025 	uint8_t	type;
4026 	#define TX_BD_EMPTY_TYPE_MASK	UINT32_C(0x3f)
4027 	#define TX_BD_EMPTY_TYPE_SFT	0
4028 	/*
4029 	 * Indicates that this BD is 1BB long and is an empty
4030 	 * TX BD. Not valid for use by the driver.
4031 	 */
4032 		#define TX_BD_EMPTY_TYPE_TX_BD_EMPTY  UINT32_C(0x1)
4033 		#define TX_BD_EMPTY_TYPE_LAST	TX_BD_EMPTY_TYPE_TX_BD_EMPTY
4034 	uint8_t	unused_1[3];
4035 	uint8_t	unused_2;
4036 	uint8_t	unused_3[3];
4037 	uint8_t	unused_4[8];
4038 } tx_bd_empty_t, *ptx_bd_empty_t;
4039 
4040 /* tx_bd_mp_cmd (size:128b/16B) */
4041 
4042 typedef struct tx_bd_mp_cmd {
4043 	/* Unless otherwise stated, sub-fields of this field are always valid. */
4044 	uint16_t	flags_type;
4045 	/* This value identifies the type of buffer descriptor. */
4046 	#define TX_BD_MP_CMD_TYPE_MASK	UINT32_C(0x3f)
4047 	#define TX_BD_MP_CMD_TYPE_SFT	0
4048 	/*
4049 	 * Indicates that this BD is used to issue a command to one of
4050 	 * the mid-path destinations.
4051 	 */
4052 		#define TX_BD_MP_CMD_TYPE_TX_BD_MP_CMD  UINT32_C(0x8)
4053 		#define TX_BD_MP_CMD_TYPE_LAST	TX_BD_MP_CMD_TYPE_TX_BD_MP_CMD
4054 	#define TX_BD_MP_CMD_FLAGS_MASK	UINT32_C(0xffc0)
4055 	#define TX_BD_MP_CMD_FLAGS_SFT	6
4056 	/*  */
4057 	#define TX_BD_MP_CMD_FLAGS_UNUSED_MASK UINT32_C(0xc0)
4058 	#define TX_BD_MP_CMD_FLAGS_UNUSED_SFT  6
4059 	/*
4060 	 * This value indicates the number of 16B BD locations (slots)
4061 	 * consumed in the ring by this mid-path command BD, including the
4062 	 * BD header and the command field.
4063 	 */
4064 	#define TX_BD_MP_CMD_FLAGS_BD_CNT_MASK UINT32_C(0x1f00)
4065 	#define TX_BD_MP_CMD_FLAGS_BD_CNT_SFT  8
4066 	/*
4067 	 * This value defines the length of command field in bytes. The maximum
4068 	 * value shall be 496.
4069 	 */
4070 	/*
4071 	 * Note that a fatal error will be generated if the value of this field
4072 	 * does not correspond with the value of flags.bd_cnt. For example, if
4073 	 * this field carries a value of 20, then bd_cnt must equal 3.
4074 	 */
4075 	uint16_t	len;
4076 	/*
4077 	 * The opaque data field is pass through to the completion and can be
4078 	 * used for any data that the driver wants to associate with this
4079 	 * Tx mid-path command.
4080 	 */
4081 	uint32_t	opaque;
4082 	uint32_t	unused1_lo;
4083 	uint32_t	unused1_hi;
4084 } tx_bd_mp_cmd_t, *ptx_bd_mp_cmd_t;
4085 
4086 /* tx_bd_presync_cmd (size:128b/16B) */
4087 
4088 typedef struct tx_bd_presync_cmd {
4089 	/* Unless otherwise stated, sub-fields of this field are always valid. */
4090 	uint16_t	flags_type;
4091 	/* This value identifies the type of buffer descriptor. */
4092 	#define TX_BD_PRESYNC_CMD_TYPE_MASK		UINT32_C(0x3f)
4093 	#define TX_BD_PRESYNC_CMD_TYPE_SFT		0
4094 	/*
4095 	 * Indicates that this BD is used to issue a cryptographic pre-
4096 	 * sync command through the fast path and destined for TCE.
4097 	 */
4098 		#define TX_BD_PRESYNC_CMD_TYPE_TX_BD_PRESYNC_CMD  UINT32_C(0x9)
4099 		#define TX_BD_PRESYNC_CMD_TYPE_LAST		TX_BD_PRESYNC_CMD_TYPE_TX_BD_PRESYNC_CMD
4100 	#define TX_BD_PRESYNC_CMD_FLAGS_MASK		UINT32_C(0xffc0)
4101 	#define TX_BD_PRESYNC_CMD_FLAGS_SFT		6
4102 	/*  */
4103 	#define TX_BD_PRESYNC_CMD_FLAGS_UNUSED_MASK	UINT32_C(0xc0)
4104 	#define TX_BD_PRESYNC_CMD_FLAGS_UNUSED_SFT	6
4105 	/*
4106 	 * This value indicates the number of 16B BD locations (slots)
4107 	 * consumed in the ring by this pre-sync command BD, including the
4108 	 * BD header and the command field.
4109 	 */
4110 	#define TX_BD_PRESYNC_CMD_FLAGS_BD_CNT_MASK	UINT32_C(0x1f00)
4111 	#define TX_BD_PRESYNC_CMD_FLAGS_BD_CNT_SFT	8
4112 	/*
4113 	 * This value defines the length of command field in bytes. The maximum
4114 	 * value shall be 496.
4115 	 */
4116 	/*
4117 	 * Note that a fatal error will be generated if the value of this field
4118 	 * does not correspond with the value of flags.bd_cnt. For example, if
4119 	 * this field carries a value of 20, then bd_cnt must equal 3.
4120 	 */
4121 	uint16_t	len;
4122 	/*
4123 	 * The opaque data field is pass through to TCE and can be used for
4124 	 * debug.
4125 	 */
4126 	uint32_t	opaque;
4127 	/*
4128 	 * This field is the Crypto Context ID to which the retransmit packet is
4129 	 * applied. The KID references the context fields used by the
4130 	 * associated kTLS offloaded connection.
4131 	 */
4132 	uint32_t	kid;
4133 	/*
4134 	 * The KID value of all-ones is reserved for non-KTLS packets, which
4135 	 * only implies that this value must not be used when filling this
4136 	 * field for crypto packets.
4137 	 */
4138 	#define TX_BD_PRESYNC_CMD_KID_VAL_MASK UINT32_C(0xfffff)
4139 	#define TX_BD_PRESYNC_CMD_KID_VAL_SFT 0
4140 	uint32_t	unused_1;
4141 } tx_bd_presync_cmd_t, *ptx_bd_presync_cmd_t;
4142 
4143 /*
4144  * This structure is used to send additional information for transmitting
4145  * packets using timed transmit scheduling. It must only to be applied as
4146  * the second BD of a BD chain that represents a packet. Any subsequent
4147  * BDs will follow the timed transmit BD.
4148  */
4149 /* tx_bd_timedtx (size:128b/16B) */
4150 
4151 typedef struct tx_bd_timedtx {
4152 	uint16_t	flags_type;
4153 	/* This value identifies the type of buffer descriptor. */
4154 	#define TX_BD_TIMEDTX_TYPE_MASK	UINT32_C(0x3f)
4155 	#define TX_BD_TIMEDTX_TYPE_SFT		0
4156 	/*
4157 	 * Indicates a timed transmit BD. This is a 16b BD that is inserted
4158 	 * into a packet BD chain immediately after the first BD. It is used
4159 	 * to control the flow in a timed transmit operation.
4160 	 */
4161 		#define TX_BD_TIMEDTX_TYPE_TX_BD_TIMEDTX	UINT32_C(0xa)
4162 		#define TX_BD_TIMEDTX_TYPE_LAST		TX_BD_TIMEDTX_TYPE_TX_BD_TIMEDTX
4163 	/* Unless otherwise stated, sub-fields of this field are always valid. */
4164 	#define TX_BD_TIMEDTX_FLAGS_MASK	UINT32_C(0xffc0)
4165 	#define TX_BD_TIMEDTX_FLAGS_SFT	6
4166 	/*
4167 	 * This value identifies the kind of buffer timed transmit mode that
4168 	 * is to be enabled for the packet.
4169 	 */
4170 	#define TX_BD_TIMEDTX_FLAGS_KIND_MASK	UINT32_C(0x1c0)
4171 	#define TX_BD_TIMEDTX_FLAGS_KIND_SFT	6
4172 	/*
4173 	 * This timed transmit mode indicates that the packet will be
4174 	 * scheduled and send immediately (or as soon as possible), once
4175 	 * it is scheduled in the transmitter.
4176 	 * Note: This mode is similar to regular (non-timed transmit)
4177 	 * operation. Its main purpose is to cancel pace mode timed
4178 	 * transmit.
4179 	 */
4180 		#define TX_BD_TIMEDTX_FLAGS_KIND_ASAP	(UINT32_C(0x0) << 6)
4181 	/*
4182 	 * This timed transmit mode is used to schedule transmission of
4183 	 * the packet no earlier than the time given in the tx_time
4184 	 * field of the BD.
4185 	 * Note: In case subsequent packets don't include a timed transmit
4186 	 * BD, they will be scheduled subsequently for transmission
4187 	 * without any timed transmit constraint.
4188 	 */
4189 		#define TX_BD_TIMEDTX_FLAGS_KIND_SO_TXTIME   (UINT32_C(0x1) << 6)
4190 	/*
4191 	 * This timed transmit mode is used to enable rate control for the
4192 	 * flow (QP) at a rate as defined by the rate field of this BD.
4193 	 * Note: In case subsequent, adjacent packets on the same flow
4194 	 * don't include a timed transmit BD, they will continue to be
4195 	 * paced by the transmitter at the same rate as given in this BD.
4196 	 */
4197 		#define TX_BD_TIMEDTX_FLAGS_KIND_PACE	(UINT32_C(0x2) << 6)
4198 		#define TX_BD_TIMEDTX_FLAGS_KIND_LAST	TX_BD_TIMEDTX_FLAGS_KIND_PACE
4199 	/*
4200 	 * This field exists in all Tx BDs. It doesn't apply to this particular
4201 	 * BD type since the BD never represents an SGL or inline data; i.e. it
4202 	 * is only a command. This field must be zero.
4203 	 */
4204 	/*
4205 	 * Note that if this field is not zero, a fatal length error will be
4206 	 * generated as it will be included in the aggregate of SGE lengths for
4207 	 * the packet.
4208 	 */
4209 	uint16_t	len;
4210 	/*
4211 	 * This field represents the rate of the flow (QP) in terms of KB/s.
4212 	 * This applies to pace mode timed transmit.
4213 	 */
4214 	uint32_t	rate;
4215 	/*
4216 	 * Applying this rate to a QP will result in this and all subsequent
4217 	 * packets of the flow being paced at the given rate, until such time
4218 	 * that the timed transmit mode is either changed or the rate is
4219 	 * updated in a future packet on the flow.
4220 	 * This field is applicable only if flags.kind is pace.
4221 	 */
4222 	#define TX_BD_TIMEDTX_RATE_VAL_MASK UINT32_C(0x1ffffff)
4223 	#define TX_BD_TIMEDTX_RATE_VAL_SFT 0
4224 	/*
4225 	 * This field represents the nano-second time to transmit the
4226 	 * corresponding packet using SO_TXTIME mode of timed transmit.
4227 	 * This field is applicable only if flags.kind is so_txtime.
4228 	 */
4229 	uint32_t	tx_time_lo;
4230 	uint32_t	tx_time_hi;
4231 } tx_bd_timedtx_t, *ptx_bd_timedtx_t;
4232 
4233 /* rx_prod_pkt_bd (size:128b/16B) */
4234 
4235 typedef struct rx_prod_pkt_bd {
4236 	/* This value identifies the type of buffer descriptor. */
4237 	uint16_t	flags_type;
4238 	/* This value identifies the type of buffer descriptor. */
4239 	#define RX_PROD_PKT_BD_TYPE_MASK	UINT32_C(0x3f)
4240 	#define RX_PROD_PKT_BD_TYPE_SFT	0
4241 	/*
4242 	 * Indicates that this BD is 16B long and is an RX Producer
4243 	 * (i.e. empty) buffer descriptor.
4244 	 */
4245 		#define RX_PROD_PKT_BD_TYPE_RX_PROD_PKT	UINT32_C(0x4)
4246 		#define RX_PROD_PKT_BD_TYPE_LAST	RX_PROD_PKT_BD_TYPE_RX_PROD_PKT
4247 	#define RX_PROD_PKT_BD_FLAGS_MASK	UINT32_C(0xffc0)
4248 	#define RX_PROD_PKT_BD_FLAGS_SFT	6
4249 	/*
4250 	 * If set to 1, the packet will be placed at the address plus
4251 	 * 2B. The 2 Bytes of padding will be written as zero.
4252 	 */
4253 	/*
4254 	 * This is intended to be used when the host buffer is
4255 	 * cache-line aligned to produce packets that are easy to
4256 	 * parse in host memory while still allowing writes to be cache
4257 	 * line aligned.
4258 	 */
4259 	#define RX_PROD_PKT_BD_FLAGS_SOP_PAD	UINT32_C(0x40)
4260 	/*
4261 	 * If set to 1, the packet write will be padded out to the
4262 	 * nearest cache-line with zero value padding.
4263 	 */
4264 	/*
4265 	 * If receive buffers start/end on cache-line boundaries, this
4266 	 * feature will ensure that all data writes on the PCI bus
4267 	 * start/end on cache line boundaries.
4268 	 */
4269 	#define RX_PROD_PKT_BD_FLAGS_EOP_PAD	UINT32_C(0x80)
4270 	/*
4271 	 * This field has been deprecated. There can be no additional
4272 	 * BDs for this packet from this ring.
4273 	 *
4274 	 * Old definition:
4275 	 * This value is the number of additional buffers in the ring that
4276 	 * describe the buffer space to be consumed for this packet.
4277 	 * If the value is zero, then the packet must fit within the
4278 	 * space described by this BD. If this value is 1 or more, it
4279 	 * indicates how many additional "buffer" BDs are in the ring
4280 	 * immediately following this BD to be used for the same
4281 	 * network packet. Even if the packet to be placed does not need
4282 	 * all the additional buffers, they will be consumed anyway.
4283 	 */
4284 	#define RX_PROD_PKT_BD_FLAGS_BUFFERS_MASK UINT32_C(0x300)
4285 	#define RX_PROD_PKT_BD_FLAGS_BUFFERS_SFT  8
4286 	/*
4287 	 * This is the length in Bytes of the host physical buffer where
4288 	 * data for the packet may be placed in host memory.
4289 	 */
4290 	/*
4291 	 * While this is a Byte resolution value, it is often advantageous
4292 	 * to ensure that the buffers provided end on a host cache line.
4293 	 */
4294 	uint16_t	len;
4295 	/*
4296 	 * The opaque data field is pass through to the completion and can be
4297 	 * used for any data that the driver wants to associate with this
4298 	 * receive buffer set.
4299 	 */
4300 	uint32_t	opaque;
4301 	/*
4302 	 * This is the host physical address where data for the packet may
4303 	 * be placed in host memory.
4304 	 */
4305 	/*
4306 	 * While this is a Byte resolution value, it is often advantageous
4307 	 * to ensure that the buffers provide start on a host cache line.
4308 	 */
4309 	uint64_t	addr;
4310 } rx_prod_pkt_bd_t, *prx_prod_pkt_bd_t;
4311 
4312 /* rx_prod_bfr_bd (size:128b/16B) */
4313 
4314 typedef struct rx_prod_bfr_bd {
4315 	/* This value identifies the type of buffer descriptor. */
4316 	uint16_t	flags_type;
4317 	/* This value identifies the type of buffer descriptor. */
4318 	#define RX_PROD_BFR_BD_TYPE_MASK	UINT32_C(0x3f)
4319 	#define RX_PROD_BFR_BD_TYPE_SFT	0
4320 	/*
4321 	 * Indicates that this BD is 16B long and is an RX
4322 	 * Producer Buffer BD.
4323 	 */
4324 		#define RX_PROD_BFR_BD_TYPE_RX_PROD_BFR  UINT32_C(0x5)
4325 		#define RX_PROD_BFR_BD_TYPE_LAST	RX_PROD_BFR_BD_TYPE_RX_PROD_BFR
4326 	#define RX_PROD_BFR_BD_FLAGS_MASK	UINT32_C(0xffc0)
4327 	#define RX_PROD_BFR_BD_FLAGS_SFT	6
4328 	/*
4329 	 * This is the length in Bytes of the host physical buffer where
4330 	 * data for the packet may be placed in host memory.
4331 	 */
4332 	/*
4333 	 * While this is a Byte resolution value, it is often advantageous
4334 	 * to ensure that the buffers provided end on a host cache line.
4335 	 */
4336 	uint16_t	len;
4337 	/* This field is not used. */
4338 	uint32_t	opaque;
4339 	/*
4340 	 * This is the host physical address where data for the packet may
4341 	 * be placed in host memory.
4342 	 */
4343 	/*
4344 	 * While this is a Byte resolution value, it is often advantageous
4345 	 * to ensure that the buffers provide start on a host cache line.
4346 	 */
4347 	uint32_t	addr_lo;
4348 	uint32_t	addr_hi;
4349 } rx_prod_bfr_bd_t, *prx_prod_bfr_bd_t;
4350 
4351 /* rx_prod_agg_bd (size:128b/16B) */
4352 
4353 typedef struct rx_prod_agg_bd {
4354 	/* This value identifies the type of buffer descriptor. */
4355 	uint16_t	flags_type;
4356 	/* This value identifies the type of buffer descriptor. */
4357 	#define RX_PROD_AGG_BD_TYPE_MASK	UINT32_C(0x3f)
4358 	#define RX_PROD_AGG_BD_TYPE_SFT	0
4359 	/*
4360 	 * Indicates that this BD is 16B long and is an
4361 	 * RX Producer Assembly Buffer Descriptor.
4362 	 */
4363 		#define RX_PROD_AGG_BD_TYPE_RX_PROD_AGG	UINT32_C(0x6)
4364 		#define RX_PROD_AGG_BD_TYPE_LAST	RX_PROD_AGG_BD_TYPE_RX_PROD_AGG
4365 	#define RX_PROD_AGG_BD_FLAGS_MASK	UINT32_C(0xffc0)
4366 	#define RX_PROD_AGG_BD_FLAGS_SFT	6
4367 	/*
4368 	 * If set to 1, the packet write will be padded out to the
4369 	 * nearest cache-line with zero value padding.
4370 	 */
4371 	/*
4372 	 * If receive buffers start/end on cache-line boundaries, this
4373 	 * feature will ensure that all data writes on the PCI bus
4374 	 * end on cache line boundaries.
4375 	 */
4376 	#define RX_PROD_AGG_BD_FLAGS_EOP_PAD	UINT32_C(0x40)
4377 	/*
4378 	 * This is the length in Bytes of the host physical buffer where
4379 	 * data for the packet may be placed in host memory.
4380 	 */
4381 	/*
4382 	 * While this is a Byte resolution value, it is often advantageous
4383 	 * to ensure that the buffers provided end on a host cache line.
4384 	 */
4385 	uint16_t	len;
4386 	/*
4387 	 * The opaque data field is pass through to the completion and can be
4388 	 * used for any data that the driver wants to associate with this
4389 	 * receive assembly buffer.
4390 	 */
4391 	uint32_t	opaque;
4392 	/*
4393 	 * This is the host physical address where data for the packet may
4394 	 * be placed in host memory.
4395 	 */
4396 	/*
4397 	 * While this is a Byte resolution value, it is often advantageous
4398 	 * to ensure that the buffers provide start on a host cache line.
4399 	 */
4400 	uint32_t	addr_lo;
4401 	uint32_t	addr_hi;
4402 } rx_prod_agg_bd_t, *prx_prod_agg_bd_t;
4403 
4404 /* cfa_cmpls_cmp_data_msg (size:128b/16B) */
4405 
4406 typedef struct cfa_cmpls_cmp_data_msg {
4407 	uint32_t	mp_client_dma_length_opcode_status_type;
4408 	/*
4409 	 * This field represents the Mid-Path client that generated the
4410 	 * completion.
4411 	 */
4412 	/*
4413 	 * This field indicates the exact type of the completion. By
4414 	 * convention, the LSB identifies the length of the record in 16B
4415 	 * units. Even values indicate 16B records. Odd values indicate 32B
4416 	 * records.
4417 	 */
4418 	#define CFA_CMPLS_CMP_DATA_MSG_TYPE_MASK		UINT32_C(0x3f)
4419 	#define CFA_CMPLS_CMP_DATA_MSG_TYPE_SFT		0
4420 	/* Mid Path Short Completion with length = 16B. */
4421 		#define CFA_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT	UINT32_C(0x1e)
4422 		#define CFA_CMPLS_CMP_DATA_MSG_TYPE_LAST		CFA_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT
4423 	/* This value indicates the status for the command. */
4424 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_MASK		UINT32_C(0x3c0)
4425 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_SFT		6
4426 	/* Completed without error. */
4427 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_OK		(UINT32_C(0x0) << 6)
4428 	/* Indicates an unsupported CFA opcode in the command. */
4429 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_UNSPRT_ERR	(UINT32_C(0x1) << 6)
4430 	/*
4431 	 * Indicates a CFA command formatting error. This error can occur on
4432 	 * any of the supported CFA commands.
4433 	 */
4434 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_FMT_ERR		(UINT32_C(0x2) << 6)
4435 	/*
4436 	 * Indicates an SVIF-Table scope error. This error can occur on any
4437 	 * of the supported CFA commands.
4438 	 */
4439 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_SCOPE_ERR	(UINT32_C(0x3) << 6)
4440 	/*
4441 	 * Indicates that the table_index is either outside of the
4442 	 * table_scope range set by its EM_SIZE or, for EM Insert, it is in
4443 	 * the static bucket range. This error can occur on EM Insert
4444 	 * commands. It can also occur on Read, Read Clear, Write, and
4445 	 * Invalidate commands if the table_type is EM.
4446 	 */
4447 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_ADDR_ERR		(UINT32_C(0x4) << 6)
4448 	/*
4449 	 * Cache operation responded with an error. This error can occur on
4450 	 * Read, Read Clear, Write, EM Insert, and EM Delete commands.
4451 	 */
4452 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_CACHE_ERR	(UINT32_C(0x5) << 6)
4453 	/*
4454 	 * Indicates failure on EM Insert or EM Delete Command. Hash index
4455 	 * and hash msb are returned in table_index and hash_msb fields.
4456 	 * Dma_length is set to 1 if the bucket is also returned (as dma
4457 	 * data).
4458 	 */
4459 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_EM_FAIL		(UINT32_C(0x6) << 6)
4460 	/*
4461 	 * Indicates no notifications were available on an Event Collection
4462 	 * command.
4463 	 */
4464 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_EVENT_COLLECT_FAIL  (UINT32_C(0x7) << 6)
4465 		#define CFA_CMPLS_CMP_DATA_MSG_STATUS_LAST		CFA_CMPLS_CMP_DATA_MSG_STATUS_EVENT_COLLECT_FAIL
4466 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED0_MASK		UINT32_C(0xc00)
4467 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED0_SFT		10
4468 	/* This is the opcode from the command. */
4469 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_MASK		UINT32_C(0xff000)
4470 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_SFT		12
4471 	/*
4472 	 * This is read command. From 32 to 128B can be read from a table
4473 	 * using this command.
4474 	 */
4475 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_READ		(UINT32_C(0x0) << 12)
4476 	/*
4477 	 * This is write command. From 32 to 128B can be written to a table
4478 	 * using this command.
4479 	 */
4480 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_WRITE		(UINT32_C(0x1) << 12)
4481 	/*
4482 	 * This is read-clear command. 32B can be read from a table and a 16b
4483 	 * mask can be used to clear specific 16b units after the read as an
4484 	 * atomic operation.
4485 	 */
4486 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_READ_CLR		(UINT32_C(0x2) << 12)
4487 	/*
4488 	 * An exact match table insert will be attempted into the table. If
4489 	 * there is a free location in the bucket, the payload will be
4490 	 * written to the bucket.
4491 	 */
4492 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_EM_INSERT	(UINT32_C(0x3) << 12)
4493 	/* An exact match table delete will be attempted. */
4494 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_EM_DELETE	(UINT32_C(0x4) << 12)
4495 	/*
4496 	 * The specified table area will be invalidated. If it is needed
4497 	 * again, it will be read from the backing store.
4498 	 */
4499 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_INVALIDATE	(UINT32_C(0x5) << 12)
4500 	/* Reads notification messages from the Host Notification Queue. */
4501 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_EVENT_COLLECT	(UINT32_C(0x6) << 12)
4502 		#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_LAST		CFA_CMPLS_CMP_DATA_MSG_OPCODE_EVENT_COLLECT
4503 	/*
4504 	 * This field indicates the length of the DMA that accompanies the
4505 	 * completion. Specified in units of DWords (32b). Valid values are
4506 	 * between 0 and 128. A value of zero indicates that there is no DMA
4507 	 * that accompanies the completion.
4508 	 */
4509 	#define CFA_CMPLS_CMP_DATA_MSG_DMA_LENGTH_MASK	UINT32_C(0xff00000)
4510 	#define CFA_CMPLS_CMP_DATA_MSG_DMA_LENGTH_SFT	20
4511 	/*
4512 	 * This field represents the Mid-Path client that generated the
4513 	 * completion.
4514 	 */
4515 	#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_MASK	UINT32_C(0xf0000000)
4516 	#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_SFT		28
4517 	/* TX configurable flow processing block. */
4518 		#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_TE_CFA	(UINT32_C(0x2) << 28)
4519 	/* RX configurable flow processing block. */
4520 		#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_RE_CFA	(UINT32_C(0x3) << 28)
4521 		#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_LAST		CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_RE_CFA
4522 	/*
4523 	 * This is a copy of the opaque field from the mid path BD of this
4524 	 * command.
4525 	 */
4526 	uint32_t	opaque;
4527 	uint16_t	hash_msb_v;
4528 	/*
4529 	 * This value is written by the NIC such that it will be different for
4530 	 * each pass through the completion queue. The even passes will
4531 	 * write 1. The odd passes will write 0.
4532 	 */
4533 	#define CFA_CMPLS_CMP_DATA_MSG_V		UINT32_C(0x1)
4534 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED1_MASK UINT32_C(0xe)
4535 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED1_SFT  1
4536 	/*
4537 	 * This is the upper 12b of the hash, returned on Exact Match
4538 	 * Insertion/Deletion Commands.
4539 	 */
4540 	#define CFA_CMPLS_CMP_DATA_MSG_HASH_MSB_MASK UINT32_C(0xfff0)
4541 	#define CFA_CMPLS_CMP_DATA_MSG_HASH_MSB_SFT 4
4542 	/* This is the table type from the command. */
4543 	uint8_t	table_type;
4544 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED2_MASK	UINT32_C(0xf)
4545 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED2_SFT	0
4546 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf0)
4547 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_SFT   4
4548 	/* This command acts on the action table of the specified scope. */
4549 		#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_ACTION  (UINT32_C(0x0) << 4)
4550 	/* This command acts on the exact match table of the specified scope. */
4551 		#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_EM	(UINT32_C(0x1) << 4)
4552 		#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_LAST   CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_EM
4553 	uint8_t	table_scope;
4554 	/* This is the table scope from the command. */
4555 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
4556 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_SCOPE_SFT 0
4557 	uint32_t	table_index;
4558 	/*
4559 	 * This is the table index from the command (if it exists). However, if
4560 	 * an Exact Match Insertion/Deletion command failed, then this is the
4561 	 * table index of the calculated static hash bucket.
4562 	 */
4563 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
4564 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_INDEX_SFT 0
4565 } cfa_cmpls_cmp_data_msg_t, *pcfa_cmpls_cmp_data_msg_t;
4566 
4567 /* CFA Mid-Path 32B DMA Message */
4568 /* cfa_dma32b_data_msg (size:256b/32B) */
4569 
4570 typedef struct cfa_dma32b_data_msg {
4571 	/* DMA data value. */
4572 	uint32_t	dta[8];
4573 } cfa_dma32b_data_msg_t, *pcfa_dma32b_data_msg_t;
4574 
4575 /* CFA Mid-Path 64B DMA Message */
4576 /* cfa_dma64b_data_msg (size:512b/64B) */
4577 
4578 typedef struct cfa_dma64b_data_msg {
4579 	/* DMA data value. */
4580 	uint32_t	dta[16];
4581 } cfa_dma64b_data_msg_t, *pcfa_dma64b_data_msg_t;
4582 
4583 /* CFA Mid-Path 96B DMA Message */
4584 /* cfa_dma96b_data_msg (size:768b/96B) */
4585 
4586 typedef struct cfa_dma96b_data_msg {
4587 	/* DMA data value. */
4588 	uint32_t	dta[24];
4589 } cfa_dma96b_data_msg_t, *pcfa_dma96b_data_msg_t;
4590 
4591 /* CFA Mid-Path 128B DMA Message */
4592 /* cfa_dma128b_data_msg (size:1024b/128B) */
4593 
4594 typedef struct cfa_dma128b_data_msg {
4595 	/* DMA data value. */
4596 	uint32_t	dta[32];
4597 } cfa_dma128b_data_msg_t, *pcfa_dma128b_data_msg_t;
4598 
4599 /* ce_cmpls_cmp_data_msg (size:128b/16B) */
4600 
4601 typedef struct ce_cmpls_cmp_data_msg {
4602 	uint16_t	client_subtype_type;
4603 	/*
4604 	 * This field indicates the exact type of the completion. By
4605 	 * convention, the LSB identifies the length of the record in 16B
4606 	 * units. Even values indicate 16B records. Odd values indicate 32B
4607 	 * records.
4608 	 */
4609 	#define CE_CMPLS_CMP_DATA_MSG_TYPE_MASK	UINT32_C(0x3f)
4610 	#define CE_CMPLS_CMP_DATA_MSG_TYPE_SFT	0
4611 	/* Completion of a Mid Path Command. Length = 16B */
4612 		#define CE_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT  UINT32_C(0x1e)
4613 		#define CE_CMPLS_CMP_DATA_MSG_TYPE_LAST	CE_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT
4614 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED0_MASK	UINT32_C(0xc0)
4615 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED0_SFT	6
4616 	/*
4617 	 * This value indicates the CE sub-type operation that is being
4618 	 * completed.
4619 	 */
4620 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_MASK	UINT32_C(0xf00)
4621 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SFT	8
4622 	/* Completion Response for a Solicited Command. */
4623 		#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SOLICITED	(UINT32_C(0x0) << 8)
4624 	/* Error Completion (Unsolicited). */
4625 		#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_ERR	(UINT32_C(0x1) << 8)
4626 	/* Re-Sync Completion (Unsolicited) */
4627 		#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_RESYNC	(UINT32_C(0x2) << 8)
4628 		#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_LAST	CE_CMPLS_CMP_DATA_MSG_SUBTYPE_RESYNC
4629 	/*
4630 	 * This field represents the Mid-Path client that generated the
4631 	 * completion.
4632 	 */
4633 	#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_MASK	UINT32_C(0xf000)
4634 	#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_SFT	12
4635 	/* TX crypto engine block. */
4636 		#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_TCE	(UINT32_C(0x0) << 12)
4637 	/* RX crypto engine block. */
4638 		#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_RCE	(UINT32_C(0x1) << 12)
4639 		#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_LAST	CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_RCE
4640 	uint16_t	status;
4641 	/* This value indicates the status for the command. */
4642 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_MASK	UINT32_C(0xf)
4643 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_SFT	0
4644 	/* Completed without error. */
4645 		#define CE_CMPLS_CMP_DATA_MSG_STATUS_OK	UINT32_C(0x0)
4646 	/* CFCK load error. */
4647 		#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_LD_ERR   UINT32_C(0x1)
4648 	/* FID check error. */
4649 		#define CE_CMPLS_CMP_DATA_MSG_STATUS_FID_CHK_ERR  UINT32_C(0x2)
4650 	/* Context kind / MP version mismatch error. */
4651 		#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_VER_ERR  UINT32_C(0x3)
4652 	/* Unsupported Destination Connection ID Length. */
4653 		#define CE_CMPLS_CMP_DATA_MSG_STATUS_DST_ID_ERR   UINT32_C(0x4)
4654 	/*
4655 	 * Invalid MP Command [anything other than ADD or DELETE
4656 	 * triggers this for QUIC].
4657 	 */
4658 		#define CE_CMPLS_CMP_DATA_MSG_STATUS_MP_CMD_ERR   UINT32_C(0x5)
4659 		#define CE_CMPLS_CMP_DATA_MSG_STATUS_LAST	CE_CMPLS_CMP_DATA_MSG_STATUS_MP_CMD_ERR
4660 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_MASK	UINT32_C(0xfff0)
4661 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_SFT	4
4662 	/*
4663 	 * This is a copy of the opaque field from the mid path BD of this
4664 	 * command.
4665 	 */
4666 	uint32_t	opaque;
4667 	uint32_t	v;
4668 	/*
4669 	 * This value is written by the NIC such that it will be different
4670 	 * for each pass through the completion queue. The even passes will
4671 	 * write 1. The odd passes will write 0.
4672 	 */
4673 	#define CE_CMPLS_CMP_DATA_MSG_V	UINT32_C(0x1)
4674 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED2_MASK UINT32_C(0xfffffffe)
4675 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED2_SFT 1
4676 	uint32_t	kid;
4677 	/*
4678 	 * This field is the Crypto Context ID. The KID is used to store
4679 	 * information used by the associated kTLS offloaded connection.
4680 	 */
4681 	#define CE_CMPLS_CMP_DATA_MSG_KID_MASK	UINT32_C(0xfffff)
4682 	#define CE_CMPLS_CMP_DATA_MSG_KID_SFT	0
4683 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED3_MASK UINT32_C(0xfff00000)
4684 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED3_SFT 20
4685 } ce_cmpls_cmp_data_msg_t, *pce_cmpls_cmp_data_msg_t;
4686 
4687 /* cmpl_base (size:128b/16B) */
4688 
4689 typedef struct cmpl_base {
4690 	uint16_t	type;
4691 	/*
4692 	 * This field indicates the exact type of the completion.
4693 	 * By convention, the LSB identifies the length of the
4694 	 * record in 16B units. Even values indicate 16B
4695 	 * records. Odd values indicate 32B
4696 	 * records.
4697 	 */
4698 	#define CMPL_BASE_TYPE_MASK		UINT32_C(0x3f)
4699 	#define CMPL_BASE_TYPE_SFT		0
4700 	/*
4701 	 * TX L2 completion:
4702 	 * Completion of TX packet. Length = 16B
4703 	 */
4704 		#define CMPL_BASE_TYPE_TX_L2		UINT32_C(0x0)
4705 	/*
4706 	 * NO-OP completion:
4707 	 * Completion of NO-OP. Length = 16B
4708 	 */
4709 		#define CMPL_BASE_TYPE_NO_OP		UINT32_C(0x1)
4710 	/*
4711 	 * TX L2 coalesced completion:
4712 	 * Completion of coalesced TX packet. Length = 16B
4713 	 */
4714 		#define CMPL_BASE_TYPE_TX_L2_COAL	UINT32_C(0x2)
4715 	/*
4716 	 * TX L2 Packet Timestamp completion:
4717 	 * Completion of an L2 Packet Timestamp Packet. Length = 16B
4718 	 */
4719 		#define CMPL_BASE_TYPE_TX_L2_PKT_TS	UINT32_C(0x4)
4720 	/*
4721 	 * RX L2 TPA Start V2 Completion:
4722 	 * Completion of and L2 RX packet. Length = 32B
4723 	 * This is the new version of the RX_TPA_START completion used
4724 	 * in SR2 and later chips.
4725 	 */
4726 		#define CMPL_BASE_TYPE_RX_TPA_START_V2   UINT32_C(0xd)
4727 	/*
4728 	 * RX L2 V2 completion:
4729 	 * Completion of and L2 RX packet. Length = 32B
4730 	 * This is the new version of the RX_L2 completion used in SR2
4731 	 * and later chips.
4732 	 */
4733 		#define CMPL_BASE_TYPE_RX_L2_V2	UINT32_C(0xf)
4734 	/*
4735 	 * RX L2 completion:
4736 	 * This is the compressed version of Rx Completion for performance
4737 	 * applications. Length = 16B
4738 	 */
4739 		#define CMPL_BASE_TYPE_RX_L2_COMPRESS	UINT32_C(0x10)
4740 	/*
4741 	 * RX L2 completion:
4742 	 * Completion of and L2 RX packet. Length = 32B
4743 	 */
4744 		#define CMPL_BASE_TYPE_RX_L2		UINT32_C(0x11)
4745 	/*
4746 	 * RX Aggregation Buffer completion:
4747 	 * Completion of an L2 aggregation buffer in support of
4748 	 * TPA, HDS, or Jumbo packet completion. Length = 16B
4749 	 */
4750 		#define CMPL_BASE_TYPE_RX_AGG		UINT32_C(0x12)
4751 	/*
4752 	 * RX L2 TPA Start Completion:
4753 	 * Completion at the beginning of a TPA operation.
4754 	 * Length = 32B
4755 	 */
4756 		#define CMPL_BASE_TYPE_RX_TPA_START	UINT32_C(0x13)
4757 	/*
4758 	 * RX L2 TPA End Completion:
4759 	 * Completion at the end of a TPA operation.
4760 	 * Length = 32B
4761 	 */
4762 		#define CMPL_BASE_TYPE_RX_TPA_END	UINT32_C(0x15)
4763 	/*
4764 	 * RX TPA Aggregation Buffer Completion:
4765 	 * Completion of an L2 aggregation buffer in support of TPA packet
4766 	 * completion.
4767 	 * Length = 16B
4768 	 */
4769 		#define CMPL_BASE_TYPE_RX_TPA_AGG	UINT32_C(0x16)
4770 	/*
4771 	 * RX L2 completion: Completion of and L2 RX packet.
4772 	 * Length = 32B
4773 	 */
4774 		#define CMPL_BASE_TYPE_RX_L2_V3	UINT32_C(0x17)
4775 	/*
4776 	 * RX L2 TPA Start completion: Completion at the beginning of a TPA
4777 	 * operation.
4778 	 * Length = 32B
4779 	 */
4780 		#define CMPL_BASE_TYPE_RX_TPA_START_V3   UINT32_C(0x19)
4781 	/*
4782 	 * Statistics Ejection Completion:
4783 	 * Completion of statistics data ejection buffer.
4784 	 * Length = 16B
4785 	 */
4786 		#define CMPL_BASE_TYPE_STAT_EJECT	UINT32_C(0x1a)
4787 	/*
4788 	 * VEE Flush Completion:
4789 	 * This completion is inserted manually by
4790 	 * the Primate and processed by the VEE hardware to ensure that
4791 	 * all completions on a VEE function have been processed by the
4792 	 * VEE hardware before FLR process is completed.
4793 	 */
4794 		#define CMPL_BASE_TYPE_VEE_FLUSH	UINT32_C(0x1c)
4795 	/*
4796 	 * Mid Path Short Completion :
4797 	 * Completion of a Mid Path Command. Length = 16B
4798 	 */
4799 		#define CMPL_BASE_TYPE_MID_PATH_SHORT	UINT32_C(0x1e)
4800 	/*
4801 	 * Mid Path Long Completion :
4802 	 * Completion of a Mid Path Command. Length = 32B
4803 	 */
4804 		#define CMPL_BASE_TYPE_MID_PATH_LONG	UINT32_C(0x1f)
4805 	/*
4806 	 * HWRM Command Completion:
4807 	 * Completion of an HWRM command.
4808 	 */
4809 		#define CMPL_BASE_TYPE_HWRM_DONE	UINT32_C(0x20)
4810 	/* Forwarded HWRM Request */
4811 		#define CMPL_BASE_TYPE_HWRM_FWD_REQ	UINT32_C(0x22)
4812 	/* Forwarded HWRM Response */
4813 		#define CMPL_BASE_TYPE_HWRM_FWD_RESP	UINT32_C(0x24)
4814 	/* HWRM Asynchronous Event Information */
4815 		#define CMPL_BASE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
4816 	/* CQ Notification */
4817 		#define CMPL_BASE_TYPE_CQ_NOTIFICATION   UINT32_C(0x30)
4818 	/* SRQ Threshold Event */
4819 		#define CMPL_BASE_TYPE_SRQ_EVENT	UINT32_C(0x32)
4820 	/* DBQ Threshold Event */
4821 		#define CMPL_BASE_TYPE_DBQ_EVENT	UINT32_C(0x34)
4822 	/* QP Async Notification */
4823 		#define CMPL_BASE_TYPE_QP_EVENT	UINT32_C(0x38)
4824 	/* Function Async Notification */
4825 		#define CMPL_BASE_TYPE_FUNC_EVENT	UINT32_C(0x3a)
4826 		#define CMPL_BASE_TYPE_LAST		CMPL_BASE_TYPE_FUNC_EVENT
4827 	/* info1 is 16 b */
4828 	uint16_t	info1;
4829 	/* info2 is 32 b */
4830 	uint32_t	info2;
4831 	/*
4832 	 * This value is written by the NIC such that it will be different
4833 	 * for each pass through the completion queue. The even passes
4834 	 * will write 1. The odd passes will write 0.
4835 	 */
4836 	uint32_t	info3_v;
4837 	#define CMPL_BASE_V	UINT32_C(0x1)
4838 	#define CMPL_BASE_INFO3_MASK UINT32_C(0xfffffffe)
4839 	#define CMPL_BASE_INFO3_SFT 1
4840 	/* info4 is 32 b */
4841 	uint32_t	info4;
4842 } cmpl_base_t, *pcmpl_base_t;
4843 
4844 /* tx_cmpl (size:128b/16B) */
4845 
4846 typedef struct tx_cmpl {
4847 	uint16_t	flags_type;
4848 	/*
4849 	 * This field indicates the exact type of the completion.
4850 	 * By convention, the LSB identifies the length of the
4851 	 * record in 16B units. Even values indicate 16B
4852 	 * records. Odd values indicate 32B
4853 	 * records.
4854 	 */
4855 	#define TX_CMPL_TYPE_MASK	UINT32_C(0x3f)
4856 	#define TX_CMPL_TYPE_SFT	0
4857 	/*
4858 	 * TX L2 completion:
4859 	 * Completion of TX packet. Length = 16B
4860 	 */
4861 		#define TX_CMPL_TYPE_TX_L2	UINT32_C(0x0)
4862 		#define TX_CMPL_TYPE_LAST	TX_CMPL_TYPE_TX_L2
4863 	#define TX_CMPL_FLAGS_MASK	UINT32_C(0xffc0)
4864 	#define TX_CMPL_FLAGS_SFT	6
4865 	/*
4866 	 * When this bit is '1', it indicates a packet that has an
4867 	 * error of some type. Type of error is indicated in
4868 	 * error_flags.
4869 	 */
4870 	#define TX_CMPL_FLAGS_ERROR	UINT32_C(0x40)
4871 	/*
4872 	 * When this bit is '1', it indicates that the packet completed
4873 	 * was transmitted using the push acceleration data provided
4874 	 * by the driver. When this bit is '0', it indicates that the
4875 	 * packet had not push acceleration data written or was executed
4876 	 * as a normal packet even though push data was provided.
4877 	 */
4878 	#define TX_CMPL_FLAGS_PUSH	UINT32_C(0x80)
4879 	/* unused1 is 16 b */
4880 	uint16_t	unused_0;
4881 	/*
4882 	 * This is a copy of the opaque field from the first TX BD of this
4883 	 * transmitted packet. Note that, if the packet was described by a short
4884 	 * CSO or short CSO inline BD, then the 16-bit opaque field from the
4885 	 * short CSO BD will appear in the bottom 16 bits of this field.
4886 	 */
4887 	uint32_t	opaque;
4888 	uint16_t	errors_v;
4889 	/*
4890 	 * This value is written by the NIC such that it will be different
4891 	 * for each pass through the completion queue. The even passes
4892 	 * will write 1. The odd passes will write 0.
4893 	 */
4894 	#define TX_CMPL_V				UINT32_C(0x1)
4895 	#define TX_CMPL_ERRORS_MASK			UINT32_C(0xfffe)
4896 	#define TX_CMPL_ERRORS_SFT			1
4897 	/*
4898 	 * This error indicates that there was some sort of problem
4899 	 * with the BDs for the packet.
4900 	 */
4901 	#define TX_CMPL_ERRORS_BUFFER_ERROR_MASK		UINT32_C(0xe)
4902 	#define TX_CMPL_ERRORS_BUFFER_ERROR_SFT		1
4903 	/* No error */
4904 		#define TX_CMPL_ERRORS_BUFFER_ERROR_NO_ERROR	(UINT32_C(0x0) << 1)
4905 	/*
4906 	 * Bad Format:
4907 	 * BDs were not formatted correctly.
4908 	 */
4909 		#define TX_CMPL_ERRORS_BUFFER_ERROR_BAD_FMT	(UINT32_C(0x2) << 1)
4910 		#define TX_CMPL_ERRORS_BUFFER_ERROR_LAST		TX_CMPL_ERRORS_BUFFER_ERROR_BAD_FMT
4911 	/*
4912 	 * When this bit is '1', it indicates that the length of
4913 	 * the packet was zero. No packet was transmitted.
4914 	 */
4915 	#define TX_CMPL_ERRORS_ZERO_LENGTH_PKT		UINT32_C(0x10)
4916 	/*
4917 	 * When this bit is '1', it indicates that the packet
4918 	 * was longer than the programmed limit in TDI. No
4919 	 * packet was transmitted.
4920 	 */
4921 	#define TX_CMPL_ERRORS_EXCESSIVE_BD_LENGTH	UINT32_C(0x20)
4922 	/*
4923 	 * When this bit is '1', it indicates that one or more of the
4924 	 * BDs associated with this packet generated a PCI error.
4925 	 * This probably means the address was not valid.
4926 	 */
4927 	#define TX_CMPL_ERRORS_DMA_ERROR			UINT32_C(0x40)
4928 	/*
4929 	 * When this bit is '1', it indicates that the packet was longer
4930 	 * than indicated by the hint. No packet was transmitted.
4931 	 */
4932 	#define TX_CMPL_ERRORS_HINT_TOO_SHORT		UINT32_C(0x80)
4933 	/*
4934 	 * When this bit is '1', it indicates that the packet was
4935 	 * dropped due to Poison TLP error on one or more of the
4936 	 * TLPs in the PXP completion.
4937 	 */
4938 	#define TX_CMPL_ERRORS_POISON_TLP_ERROR		UINT32_C(0x100)
4939 	/*
4940 	 * When this bit is '1', it indicates that the packet was dropped
4941 	 * due to a transient internal error in TDC. The packet or LSO can
4942 	 * be retried and may transmit successfully on a subsequent attempt.
4943 	 */
4944 	#define TX_CMPL_ERRORS_INTERNAL_ERROR		UINT32_C(0x200)
4945 	/*
4946 	 * When this bit is '1', it was not possible to collect a timestamp
4947 	 * for a PTP completion, in which case the timestamp_hi and
4948 	 * timestamp_lo fields are invalid. When this bit is '0' for a PTP
4949 	 * completion, the timestamp_hi and timestamp_lo fields are valid.
4950 	 * RJRN will copy the value of this bit into the field of the same
4951 	 * name in all TX completions, regardless of whether such completions
4952 	 * are PTP completions or other TX completions.
4953 	 */
4954 	#define TX_CMPL_ERRORS_TIMESTAMP_INVALID_ERROR	UINT32_C(0x400)
4955 	/* unused2 is 16 b */
4956 	uint16_t	unused_1;
4957 	/* unused3 is 32 b */
4958 	uint32_t	unused_2;
4959 } tx_cmpl_t, *ptx_cmpl_t;
4960 
4961 /* tx_cmpl_coal (size:128b/16B) */
4962 
4963 typedef struct tx_cmpl_coal {
4964 	uint16_t	flags_type;
4965 	/*
4966 	 * This field indicates the exact type of the completion.
4967 	 * By convention, the LSB identifies the length of the
4968 	 * record in 16B units. Even values indicate 16B
4969 	 * records. Odd values indicate 32B
4970 	 * records.
4971 	 */
4972 	#define TX_CMPL_COAL_TYPE_MASK	UINT32_C(0x3f)
4973 	#define TX_CMPL_COAL_TYPE_SFT	0
4974 	/*
4975 	 * TX L2 coalesced completion:
4976 	 * Completion of TX packet. Length = 16B
4977 	 */
4978 		#define TX_CMPL_COAL_TYPE_TX_L2_COAL   UINT32_C(0x2)
4979 		#define TX_CMPL_COAL_TYPE_LAST	TX_CMPL_COAL_TYPE_TX_L2_COAL
4980 	#define TX_CMPL_COAL_FLAGS_MASK	UINT32_C(0xffc0)
4981 	#define TX_CMPL_COAL_FLAGS_SFT	6
4982 	/*
4983 	 * When this bit is '1', it indicates a packet that has an
4984 	 * error of some type. Type of error is indicated in
4985 	 * error_flags.
4986 	 */
4987 	#define TX_CMPL_COAL_FLAGS_ERROR	UINT32_C(0x40)
4988 	/*
4989 	 * When this bit is '1', it indicates that the packet completed
4990 	 * was transmitted using the push acceleration data provided
4991 	 * by the driver. When this bit is '0', it indicates that the
4992 	 * packet had not push acceleration data written or was executed
4993 	 * as a normal packet even though push data was provided.
4994 	 */
4995 	#define TX_CMPL_COAL_FLAGS_PUSH	UINT32_C(0x80)
4996 	/* unused1 is 16 b */
4997 	uint16_t	unused_0;
4998 	/*
4999 	 * This is a copy of the opaque field from the first TX BD of the packet
5000 	 * which corresponds with the reported sq_cons_idx. Note that, with
5001 	 * coalesced completions, completions are generated for only some of the
5002 	 * packets. The driver will see the opaque field for only those packets.
5003 	 * Note that, if the packet was described by a short CSO or short CSO
5004 	 * inline BD, then the 16-bit opaque field from the short CSO BD will
5005 	 * appear in the bottom 16 bits of this field. For TX rings with
5006 	 * completion coalescing enabled (which would use the coalesced
5007 	 * completion record), it is suggested that the driver populate the
5008 	 * opaque field to indicate the specific TX ring with which the
5009 	 * completion is associated, then utilize the opaque and sq_cons_idx
5010 	 * fields in the coalesced completion record to determine the specific
5011 	 * packets that are to be completed on that ring.
5012 	 */
5013 	uint32_t	opaque;
5014 	uint16_t	errors_v;
5015 	/*
5016 	 * This value is written by the NIC such that it will be different
5017 	 * for each pass through the completion queue. The even passes
5018 	 * will write 1. The odd passes will write 0.
5019 	 */
5020 	#define TX_CMPL_COAL_V				UINT32_C(0x1)
5021 	#define TX_CMPL_COAL_ERRORS_MASK			UINT32_C(0xfffe)
5022 	#define TX_CMPL_COAL_ERRORS_SFT			1
5023 	/*
5024 	 * This error indicates that there was some sort of problem
5025 	 * with the BDs for the packet.
5026 	 */
5027 	#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_MASK		UINT32_C(0xe)
5028 	#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_SFT		1
5029 	/* No error */
5030 		#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_NO_ERROR	(UINT32_C(0x0) << 1)
5031 	/*
5032 	 * Bad Format:
5033 	 * BDs were not formatted correctly.
5034 	 */
5035 		#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_BAD_FMT	(UINT32_C(0x2) << 1)
5036 		#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_LAST		TX_CMPL_COAL_ERRORS_BUFFER_ERROR_BAD_FMT
5037 	/*
5038 	 * When this bit is '1', it indicates that the length of
5039 	 * the packet was zero. No packet was transmitted.
5040 	 */
5041 	#define TX_CMPL_COAL_ERRORS_ZERO_LENGTH_PKT		UINT32_C(0x10)
5042 	/*
5043 	 * When this bit is '1', it indicates that the packet
5044 	 * was longer than the programmed limit in TDI. No
5045 	 * packet was transmitted.
5046 	 */
5047 	#define TX_CMPL_COAL_ERRORS_EXCESSIVE_BD_LENGTH	UINT32_C(0x20)
5048 	/*
5049 	 * When this bit is '1', it indicates that one or more of the
5050 	 * BDs associated with this packet generated a PCI error.
5051 	 * This probably means the address was not valid.
5052 	 */
5053 	#define TX_CMPL_COAL_ERRORS_DMA_ERROR			UINT32_C(0x40)
5054 	/*
5055 	 * When this bit is '1', it indicates that the packet was longer
5056 	 * than indicated by the hint. No packet was transmitted.
5057 	 */
5058 	#define TX_CMPL_COAL_ERRORS_HINT_TOO_SHORT		UINT32_C(0x80)
5059 	/*
5060 	 * When this bit is '1', it indicates that the packet was
5061 	 * dropped due to Poison TLP error on one or more of the
5062 	 * TLPs in the PXP completion.
5063 	 */
5064 	#define TX_CMPL_COAL_ERRORS_POISON_TLP_ERROR		UINT32_C(0x100)
5065 	/*
5066 	 * When this bit is '1', it indicates that the packet was dropped
5067 	 * due to a transient internal error in TDC. The packet or LSO can
5068 	 * be retried and may transmit successfully on a subsequent attempt.
5069 	 */
5070 	#define TX_CMPL_COAL_ERRORS_INTERNAL_ERROR		UINT32_C(0x200)
5071 	/*
5072 	 * When this bit is '1', it was not possible to collect a a timestamp
5073 	 * for a PTP completion, in which case the timestamp_hi and
5074 	 * timestamp_lo fields are invalid. When this bit is '0' for a PTP
5075 	 * completion, the timestamp_hi and timestamp_lo fields are valid.
5076 	 * RJRN will copy the value of this bit into the field of the same
5077 	 * name in all TX completions, regardless of whether such
5078 	 * completions are PTP completions or other TX completions.
5079 	 */
5080 	#define TX_CMPL_COAL_ERRORS_TIMESTAMP_INVALID_ERROR	UINT32_C(0x400)
5081 	/* unused2 is 16 b */
5082 	uint16_t	unused_1;
5083 	uint32_t	sq_cons_idx;
5084 	/*
5085 	 * This value is SQ index for the start of the packet following the
5086 	 * last completed packet.
5087 	 */
5088 	#define TX_CMPL_COAL_SQ_CONS_IDX_MASK UINT32_C(0xffffff)
5089 	#define TX_CMPL_COAL_SQ_CONS_IDX_SFT 0
5090 } tx_cmpl_coal_t, *ptx_cmpl_coal_t;
5091 
5092 /* tx_cmpl_packet_timestamp (size:128b/16B) */
5093 
5094 typedef struct tx_cmpl_packet_timestamp {
5095 	uint16_t	ts_sub_ns_flags_type;
5096 	/*
5097 	 * This field indicates the exact type of the completion. By
5098 	 * convention, the LSB identifies the length of the record in 16B
5099 	 * units. Even values indicate 16B records. Odd values indicate
5100 	 * 32B records.
5101 	 */
5102 	#define TX_CMPL_PACKET_TIMESTAMP_TYPE_MASK		UINT32_C(0x3f)
5103 	#define TX_CMPL_PACKET_TIMESTAMP_TYPE_SFT		0
5104 	/*
5105 	 * TX L2 Packet Timestamp completion:
5106 	 * Completion of an L2 Packet Timestamp Packet. Length = 16B
5107 	 */
5108 		#define TX_CMPL_PACKET_TIMESTAMP_TYPE_TX_L2_PKT_TS	UINT32_C(0x4)
5109 		#define TX_CMPL_PACKET_TIMESTAMP_TYPE_LAST		TX_CMPL_PACKET_TIMESTAMP_TYPE_TX_L2_PKT_TS
5110 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_MASK		UINT32_C(0xfc0)
5111 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_SFT		6
5112 	/*
5113 	 * When this bit is '1', it indicates a packet that has an error
5114 	 * of some type. Type of error is indicated in error_flags.
5115 	 */
5116 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_ERROR		UINT32_C(0x40)
5117 	/*
5118 	 * This field indicates the TX packet timestamp type that is
5119 	 * represented by a TX Packet Timestamp Completion. Note that
5120 	 * this field is invalid if the timestamp_invalid_error flag
5121 	 * is set.
5122 	 */
5123 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE	UINT32_C(0x80)
5124 	/* The packet timestamp came from PM. */
5125 		#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PM	(UINT32_C(0x0) << 7)
5126 	/* The packet timestamp came from PA. */
5127 		#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PA	(UINT32_C(0x1) << 7)
5128 		#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_LAST	TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PA
5129 	/*
5130 	 * This flag indicates that the timestamp should have come from PM,
5131 	 * but came instead from PA because all PM timestamp resources were
5132 	 * in use. This can occur in the following circumstances:
5133 	 * 1. The BD specified ts_2cmpl_auto and the packet was a PTP packet
5134 	 *	but PA could not request a PM timestamp
5135 	 * 2. The BD specified ts_2cmpl_pm, but PA could not request a PM
5136 	 *	timestamp
5137 	 */
5138 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_FALLBACK	UINT32_C(0x100)
5139 	/*
5140 	 * For 2-step PTP timestamps, bits[3:0] of this field represent the
5141 	 * sub-nanosecond portion of the packet timestamp, returned from PM
5142 	 * for 2-step PTP timestamps. For PA timestamps, this field also
5143 	 * represents the sub-nanosecond portion of the packet timestamp;
5144 	 * however, due to synchronization uncertainties, the accuracy of
5145 	 * PA timestamps is limited to approximately +/- 4 ns. Therefore
5146 	 * this field is of dubious value for PA timestamps.
5147 	 */
5148 	#define TX_CMPL_PACKET_TIMESTAMP_TS_SUB_NS_MASK	UINT32_C(0xf000)
5149 	#define TX_CMPL_PACKET_TIMESTAMP_TS_SUB_NS_SFT	12
5150 	/*
5151 	 * This is bits [47:32] of the nanoseconds portion of the packet
5152 	 * timestamp, returned from PM for 2-step PTP timestamps or from
5153 	 * PA for PA timestamps. This field is in units of 2^32 ns.
5154 	 */
5155 	uint16_t	ts_ns_mid;
5156 	/*
5157 	 * This is a copy of the opaque field from the first TX BD of this
5158 	 * transmitted packet. Note that, if the packet was described by a
5159 	 * short CSO or short CSO inline BD, then the 16-bit opaque field
5160 	 * from the short CSO BD will appear in the bottom 16 bits of this
5161 	 * field.
5162 	 */
5163 	uint32_t	opaque;
5164 	uint16_t	errors_v;
5165 	/*
5166 	 * This value is written by the NIC such that it will be different
5167 	 * for each pass through the completion queue. The even passes
5168 	 * will write 1. The odd passes will write 0.
5169 	 */
5170 	#define TX_CMPL_PACKET_TIMESTAMP_V				UINT32_C(0x1)
5171 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_MASK			UINT32_C(0xfffe)
5172 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_SFT			1
5173 	/*
5174 	 * This field was previously used to indicate fatal errors, which
5175 	 * now result in aborting and bringing down the ring. This field
5176 	 * is deprecated.
5177 	 */
5178 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_MASK		UINT32_C(0xe)
5179 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_SFT		1
5180 	/* No error. */
5181 		#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_NO_ERROR	(UINT32_C(0x0) << 1)
5182 	/* Deprecated. */
5183 		#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_BAD_FMT	(UINT32_C(0x2) << 1)
5184 		#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_LAST		TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_BAD_FMT
5185 	/*
5186 	 * This error is fatal and results in aborting and bringing down the
5187 	 * ring, thus is deprecated.
5188 	 */
5189 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_ZERO_LENGTH_PKT		UINT32_C(0x10)
5190 	/*
5191 	 * This error is fatal and results in aborting and bringing down the
5192 	 * ring, thus is deprecated.
5193 	 */
5194 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_EXCESSIVE_BD_LENGTH	UINT32_C(0x20)
5195 	/*
5196 	 * When this bit is '1', it indicates that one or more of the BDs
5197 	 * associated with this packet generated a PCI error when accessing
5198 	 * header/payload data from host memory. It most likely indicates
5199 	 * that the address was not valid. Note that this bit has no meaning
5200 	 * for the timestamp completion and will always be '0'.
5201 	 */
5202 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_DMA_ERROR			UINT32_C(0x40)
5203 	/*
5204 	 * This error is fatal and results in aborting and bringing down the
5205 	 * ring, thus is deprecated.
5206 	 */
5207 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_HINT_TOO_SHORT		UINT32_C(0x80)
5208 	/*
5209 	 * When this bit is '1', it indicates that the packet was dropped
5210 	 * due to Poison TLP error on one or more of the TLPs in one or more
5211 	 * of the associated PXP completion(s) when accessing header/payload
5212 	 * data from host memory. Note that this bit has no meaning for the
5213 	 * timestamp completion, and will always be '0'.
5214 	 */
5215 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_POISON_TLP_ERROR		UINT32_C(0x100)
5216 	/*
5217 	 * When this bit is '1', it indicates that the packet was dropped
5218 	 * due to a transient internal error in TDC. The packet or LSO can
5219 	 * be retried and may transmit successfully on a subsequent attempt.
5220 	 * Note that this bit has no meaning for the timestamp completion
5221 	 * and will always be '0'.
5222 	 */
5223 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_INTERNAL_ERROR		UINT32_C(0x200)
5224 	/*
5225 	 * When this bit is '1', it was not possible to collect a timestamp
5226 	 * for a timestamp completion, in which case the ts_ns and ts_sub_ns
5227 	 * fields are invalid. When this bit is '0' in a timestamp
5228 	 * completion record, the ts_sub_ns, ts_ns_lo, and ts_ns_mid fields
5229 	 * are valid. Note that this bit has meaning only for the timestamp
5230 	 * completion. For types other than the timestamp completion, this
5231 	 * bit will always be '0'.
5232 	 */
5233 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_TIMESTAMP_INVALID_ERROR	UINT32_C(0x400)
5234 	/*
5235 	 * When this bit is '1', it indicates that a Timed Transmit
5236 	 * SO-TXTIME packet violated the max_ttx_overtime constraint i.e.,
5237 	 * the time the packet was processed for transmission in TWE was
5238 	 * later than the time given by (TimedTx_BD.tx_time +
5239 	 * max_ttx_overtime) and as result, the packet was dropped.
5240 	 * Note that max_ttx_overtime is a global configuration in TWE.
5241 	 * Note that this bit has no meaning in a timestamp completion,
5242 	 * and will always be '0'.
5243 	 */
5244 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_TTX_OVERTIME_ERROR	UINT32_C(0x800)
5245 	/* unused2 is 16 b */
5246 	uint16_t	unused_2;
5247 	/*
5248 	 * This is bits [31:0] of the nanoseconds portion of the packet
5249 	 * timestamp, returned from PM for 2-step PTP timestamp or from
5250 	 * PA for PA timestamps. This field is in units of ns.
5251 	 */
5252 	uint32_t	ts_ns_lo;
5253 } tx_cmpl_packet_timestamp_t, *ptx_cmpl_packet_timestamp_t;
5254 
5255 /* rx_pkt_cmpl (size:128b/16B) */
5256 
5257 typedef struct rx_pkt_cmpl {
5258 	uint16_t	flags_type;
5259 	/*
5260 	 * This field indicates the exact type of the completion.
5261 	 * By convention, the LSB identifies the length of the
5262 	 * record in 16B units. Even values indicate 16B
5263 	 * records. Odd values indicate 32B
5264 	 * records.
5265 	 */
5266 	#define RX_PKT_CMPL_TYPE_MASK			UINT32_C(0x3f)
5267 	#define RX_PKT_CMPL_TYPE_SFT			0
5268 	/*
5269 	 * RX L2 completion:
5270 	 * Completion of and L2 RX packet. Length = 32B
5271 	 */
5272 		#define RX_PKT_CMPL_TYPE_RX_L2			UINT32_C(0x11)
5273 		#define RX_PKT_CMPL_TYPE_LAST			RX_PKT_CMPL_TYPE_RX_L2
5274 	#define RX_PKT_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
5275 	#define RX_PKT_CMPL_FLAGS_SFT			6
5276 	/*
5277 	 * When this bit is '1', it indicates a packet that has an
5278 	 * error of some type. Type of error is indicated in
5279 	 * error_flags.
5280 	 */
5281 	#define RX_PKT_CMPL_FLAGS_ERROR			UINT32_C(0x40)
5282 	/* This field indicates how the packet was placed in the buffer. */
5283 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
5284 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_SFT		7
5285 	/*
5286 	 * Normal:
5287 	 * Packet was placed using normal algorithm.
5288 	 */
5289 		#define RX_PKT_CMPL_FLAGS_PLACEMENT_NORMAL		(UINT32_C(0x0) << 7)
5290 	/*
5291 	 * Jumbo:
5292 	 * Packet was placed using jumbo algorithm.
5293 	 */
5294 		#define RX_PKT_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
5295 	/*
5296 	 * Header/Data Separation:
5297 	 * Packet was placed using Header/Data separation algorithm.
5298 	 * The separation location is indicated by the itype field.
5299 	 */
5300 		#define RX_PKT_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
5301 		#define RX_PKT_CMPL_FLAGS_PLACEMENT_LAST		RX_PKT_CMPL_FLAGS_PLACEMENT_HDS
5302 	/* This bit is '1' if the RSS field in this completion is valid. */
5303 	#define RX_PKT_CMPL_FLAGS_RSS_VALID		UINT32_C(0x400)
5304 	/*
5305 	 * This bit is '1' if metadata has been added to the end of the
5306 	 * packet in host memory.
5307 	 */
5308 	#define RX_PKT_CMPL_FLAGS_PKT_METADATA_PRESENT	UINT32_C(0x800)
5309 	/*
5310 	 * This value indicates what the inner packet determined for the
5311 	 * packet was.
5312 	 */
5313 	#define RX_PKT_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
5314 	#define RX_PKT_CMPL_FLAGS_ITYPE_SFT		12
5315 	/*
5316 	 * Not Known:
5317 	 * Indicates that the packet type was not known.
5318 	 */
5319 		#define RX_PKT_CMPL_FLAGS_ITYPE_NOT_KNOWN		(UINT32_C(0x0) << 12)
5320 	/*
5321 	 * IP Packet:
5322 	 * Indicates that the packet was an IP packet, but further
5323 	 * classification was not possible.
5324 	 */
5325 		#define RX_PKT_CMPL_FLAGS_ITYPE_IP			(UINT32_C(0x1) << 12)
5326 	/*
5327 	 * TCP Packet:
5328 	 * Indicates that the packet was IP and TCP.
5329 	 * This indicates that the payload_offset field is valid.
5330 	 */
5331 		#define RX_PKT_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
5332 	/*
5333 	 * UDP Packet:
5334 	 * Indicates that the packet was IP and UDP.
5335 	 * This indicates that the payload_offset field is valid.
5336 	 */
5337 		#define RX_PKT_CMPL_FLAGS_ITYPE_UDP		(UINT32_C(0x3) << 12)
5338 	/*
5339 	 * FCoE Packet:
5340 	 * Indicates that the packet was recognized as a FCoE.
5341 	 * This also indicates that the payload_offset field is valid.
5342 	 */
5343 		#define RX_PKT_CMPL_FLAGS_ITYPE_FCOE		(UINT32_C(0x4) << 12)
5344 	/*
5345 	 * RoCE Packet:
5346 	 * Indicates that the packet was recognized as a RoCE.
5347 	 * This also indicates that the payload_offset field is valid.
5348 	 */
5349 		#define RX_PKT_CMPL_FLAGS_ITYPE_ROCE		(UINT32_C(0x5) << 12)
5350 	/*
5351 	 * ICMP Packet:
5352 	 * Indicates that the packet was recognized as ICMP.
5353 	 * This indicates that the payload_offset field is valid.
5354 	 */
5355 		#define RX_PKT_CMPL_FLAGS_ITYPE_ICMP		(UINT32_C(0x7) << 12)
5356 	/*
5357 	 * PTP packet wo/timestamp:
5358 	 * Indicates that the packet was recognized as a PTP
5359 	 * packet.
5360 	 */
5361 		#define RX_PKT_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP	(UINT32_C(0x8) << 12)
5362 	/*
5363 	 * PTP packet w/timestamp:
5364 	 * Indicates that the packet was recognized as a PTP
5365 	 * packet and that a timestamp was taken for the packet.
5366 	 */
5367 		#define RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP	(UINT32_C(0x9) << 12)
5368 		#define RX_PKT_CMPL_FLAGS_ITYPE_LAST		RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
5369 	/*
5370 	 * This is the length of the data for the packet stored in the
5371 	 * buffer(s) identified by the opaque value. This includes
5372 	 * the packet BD and any associated buffer BDs. This does not include
5373 	 * the length of any data places in aggregation BDs.
5374 	 */
5375 	uint16_t	len;
5376 	/*
5377 	 * This is a copy of the opaque field from the RX BD this completion
5378 	 * corresponds to.
5379 	 */
5380 	uint32_t	opaque;
5381 	uint8_t	agg_bufs_v1;
5382 	/*
5383 	 * This value is written by the NIC such that it will be different
5384 	 * for each pass through the completion queue. The even passes
5385 	 * will write 1. The odd passes will write 0.
5386 	 */
5387 	#define RX_PKT_CMPL_V1	UINT32_C(0x1)
5388 	/*
5389 	 * This value is the number of aggregation buffers that follow this
5390 	 * entry in the completion ring that are a part of this packet.
5391 	 * If the value is zero, then the packet is completely contained
5392 	 * in the buffer space provided for the packet in the RX ring.
5393 	 */
5394 	#define RX_PKT_CMPL_AGG_BUFS_MASK UINT32_C(0x3e)
5395 	#define RX_PKT_CMPL_AGG_BUFS_SFT 1
5396 	/* unused1 is 2 b */
5397 	#define RX_PKT_CMPL_UNUSED1_MASK UINT32_C(0xc0)
5398 	#define RX_PKT_CMPL_UNUSED1_SFT  6
5399 	/*
5400 	 * This is the RSS hash type for the packet. The value is packed
5401 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
5402 	 * The value of tuple_extrac_op provides the information about
5403 	 * what fields the hash was computed on.
5404 	 * Note that 4-tuples values listed below are applicable
5405 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
5406 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
5407 	 * enabled for TCP traffic only, then the values of tuple_extract_op
5408 	 * corresponding to 4-tuples are only valid for TCP traffic.
5409 	 */
5410 	uint8_t	rss_hash_type;
5411 	/*
5412 	 * The RSS hash was computed over source IP address,
5413 	 * destination IP address, source port, and destination port of inner
5414 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
5415 	 * the packet headers are considered inner packet headers for the RSS
5416 	 * hash computation purpose.
5417 	 */
5418 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_0 UINT32_C(0x0)
5419 	/*
5420 	 * The RSS hash was computed over source IP address and destination
5421 	 * IP address of inner IP header. Note: For non-tunneled packets,
5422 	 * the packet headers are considered inner packet headers for the RSS
5423 	 * hash computation purpose.
5424 	 */
5425 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_1 UINT32_C(0x1)
5426 	/*
5427 	 * The RSS hash was computed over source IP address,
5428 	 * destination IP address, source port, and destination port of
5429 	 * IP and TCP or UDP headers of outer tunnel headers.
5430 	 * Note: For non-tunneled packets, this value is not applicable.
5431 	 */
5432 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_2 UINT32_C(0x2)
5433 	/*
5434 	 * The RSS hash was computed over source IP address and
5435 	 * destination IP address of IP header of outer tunnel headers.
5436 	 * Note: For non-tunneled packets, this value is not applicable.
5437 	 */
5438 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_3 UINT32_C(0x3)
5439 	#define RX_PKT_CMPL_RSS_HASH_TYPE_LAST  RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_3
5440 	/*
5441 	 * This value indicates the offset in bytes from the beginning of the
5442 	 * packet where the inner payload starts. This value is valid for TCP,
5443 	 * UDP, FCoE, and RoCE packets.
5444 	 *
5445 	 * A value of zero indicates that header is 256B into the packet.
5446 	 */
5447 	uint8_t	payload_offset;
5448 	/* unused2 is 8 b */
5449 	uint8_t	unused1;
5450 	/*
5451 	 * This value is the RSS hash value calculated for the packet
5452 	 * based on the mode bits and key value in the VNIC.
5453 	 */
5454 	uint32_t	rss_hash;
5455 } rx_pkt_cmpl_t, *prx_pkt_cmpl_t;
5456 
5457 /* Last 16 bytes of rx_pkt_cmpl. */
5458 /* rx_pkt_cmpl_hi (size:128b/16B) */
5459 
5460 typedef struct rx_pkt_cmpl_hi {
5461 	uint32_t	flags2;
5462 	/*
5463 	 * This indicates that the ip checksum was calculated for the
5464 	 * inner packet and that the ip_cs_error field indicates if there
5465 	 * was an error.
5466 	 */
5467 	#define RX_PKT_CMPL_FLAGS2_IP_CS_CALC		UINT32_C(0x1)
5468 	/*
5469 	 * This indicates that the TCP, UDP or ICMP checksum was
5470 	 * calculated for the inner packet and that the l4_cs_error field
5471 	 * indicates if there was an error.
5472 	 */
5473 	#define RX_PKT_CMPL_FLAGS2_L4_CS_CALC		UINT32_C(0x2)
5474 	/*
5475 	 * This indicates that the ip checksum was calculated for the
5476 	 * tunnel header and that the t_ip_cs_error field indicates if there
5477 	 * was an error.
5478 	 */
5479 	#define RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC		UINT32_C(0x4)
5480 	/*
5481 	 * This indicates that the UDP checksum was
5482 	 * calculated for the tunnel packet and that the t_l4_cs_error field
5483 	 * indicates if there was an error.
5484 	 */
5485 	#define RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC		UINT32_C(0x8)
5486 	/* This value indicates what format the metadata field is. */
5487 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
5488 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_SFT		4
5489 	/* No metadata information. Value is zero. */
5490 		#define RX_PKT_CMPL_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
5491 	/*
5492 	 * The metadata field contains the VLAN tag and TPID value.
5493 	 * - metadata[11:0] contains the vlan VID value.
5494 	 * - metadata[12] contains the vlan DE value.
5495 	 * - metadata[15:13] contains the vlan PRI value.
5496 	 * - metadata[31:16] contains the vlan TPID value.
5497 	 */
5498 		#define RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN		(UINT32_C(0x1) << 4)
5499 	/*
5500 	 * If ext_meta_format is equal to 1, the metadata field
5501 	 * contains the lower 16b of the tunnel ID value, justified
5502 	 * to LSB
5503 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
5504 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier.
5505 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
5506 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K = 0
5507 	 * - IPV4 = 0 (not populated)
5508 	 * - IPV6 = Flow Label[19:0]
5509 	 * - PPPoE = sessionID[15:0]
5510 	 * - MPLs = Outer label[19:0]
5511 	 * - UPAR = Selected[31:0] with bit mask
5512 	 */
5513 		#define RX_PKT_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
5514 	/*
5515 	 * if ext_meta_format is equal to 1, metadata field contains
5516 	 * 16b metadata from the prepended header (chdr_data).
5517 	 */
5518 		#define RX_PKT_CMPL_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
5519 	/*
5520 	 * If ext_meta_format is equal to 1, the metadata field contains
5521 	 * the outer_l3_offset, inner_l2_offset, inner_l3_offset and
5522 	 * inner_l4_size.
5523 	 * - metadata[8:0] contains the outer_l3_offset.
5524 	 * - metadata[17:9] contains the inner_l2_offset.
5525 	 * - metadata[26:18] contains the inner_l3_offset.
5526 	 * - metadata[31:27] contains the inner_l4_size.
5527 	 */
5528 		#define RX_PKT_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
5529 		#define RX_PKT_CMPL_FLAGS2_META_FORMAT_LAST		RX_PKT_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
5530 	/*
5531 	 * This field indicates the IP type for the inner-most IP header.
5532 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
5533 	 * This value is only valid if itype indicates a packet
5534 	 * with an IP header.
5535 	 */
5536 	#define RX_PKT_CMPL_FLAGS2_IP_TYPE			UINT32_C(0x100)
5537 	/*
5538 	 * This indicates that the complete 1's complement checksum was
5539 	 * calculated for the packet.
5540 	 */
5541 	#define RX_PKT_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
5542 	/*
5543 	 * The combination of this value and meta_format indicated what
5544 	 * format the metadata field is.
5545 	 */
5546 	#define RX_PKT_CMPL_FLAGS2_EXT_META_FORMAT_MASK	UINT32_C(0xc00)
5547 	#define RX_PKT_CMPL_FLAGS2_EXT_META_FORMAT_SFT	10
5548 	/*
5549 	 * This value is the complete 1's complement checksum calculated from
5550 	 * the start of the outer L3 header to the end of the packet (not
5551 	 * including the ethernet crc). It is valid when the
5552 	 * 'complete_checksum_calc' flag is set.
5553 	 */
5554 	#define RX_PKT_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
5555 	#define RX_PKT_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT	16
5556 	/*
5557 	 * This is data from the CFA block as indicated by the meta_format
5558 	 * field.
5559 	 */
5560 	uint32_t	metadata;
5561 	/* When meta_format=1, this value is the VLAN VID. */
5562 	#define RX_PKT_CMPL_METADATA_VID_MASK UINT32_C(0xfff)
5563 	#define RX_PKT_CMPL_METADATA_VID_SFT  0
5564 	/* When meta_format=1, this value is the VLAN DE. */
5565 	#define RX_PKT_CMPL_METADATA_DE	UINT32_C(0x1000)
5566 	/* When meta_format=1, this value is the VLAN PRI. */
5567 	#define RX_PKT_CMPL_METADATA_PRI_MASK UINT32_C(0xe000)
5568 	#define RX_PKT_CMPL_METADATA_PRI_SFT  13
5569 	/* When meta_format=1, this value is the VLAN TPID. */
5570 	#define RX_PKT_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000)
5571 	#define RX_PKT_CMPL_METADATA_TPID_SFT 16
5572 	uint16_t	errors_v2;
5573 	/*
5574 	 * This value is written by the NIC such that it will be different
5575 	 * for each pass through the completion queue. The even passes
5576 	 * will write 1. The odd passes will write 0.
5577 	 */
5578 	#define RX_PKT_CMPL_V2					UINT32_C(0x1)
5579 	#define RX_PKT_CMPL_ERRORS_MASK				UINT32_C(0xfffe)
5580 	#define RX_PKT_CMPL_ERRORS_SFT				1
5581 	/*
5582 	 * This error indicates that there was some sort of problem with
5583 	 * the BDs for the packet that was found after part of the
5584 	 * packet was already placed. The packet should be treated as
5585 	 * invalid.
5586 	 */
5587 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_MASK		UINT32_C(0xe)
5588 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_SFT		1
5589 	/* No buffer error */
5590 		#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER		(UINT32_C(0x0) << 1)
5591 	/*
5592 	 * Did Not Fit:
5593 	 * Packet did not fit into packet buffer provided.
5594 	 * For regular placement, this means the packet did not fit
5595 	 * in the buffer provided. For HDS and jumbo placement, this
5596 	 * means that the packet could not be placed into 7 physical
5597 	 * buffers or less.
5598 	 */
5599 		#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT		(UINT32_C(0x1) << 1)
5600 	/*
5601 	 * Not On Chip:
5602 	 * All BDs needed for the packet were not on-chip when
5603 	 * the packet arrived.
5604 	 */
5605 		#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP		(UINT32_C(0x2) << 1)
5606 	/*
5607 	 * Bad Format:
5608 	 * BDs were not formatted correctly.
5609 	 */
5610 		#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT		(UINT32_C(0x3) << 1)
5611 	/*
5612 	 * Flush:
5613 	 * There was a bad_format error on the previous operation
5614 	 */
5615 		#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_FLUSH		(UINT32_C(0x5) << 1)
5616 		#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_LAST		RX_PKT_CMPL_ERRORS_BUFFER_ERROR_FLUSH
5617 	/*
5618 	 * This indicates that there was an error in the IP header
5619 	 * checksum.
5620 	 */
5621 	#define RX_PKT_CMPL_ERRORS_IP_CS_ERROR			UINT32_C(0x10)
5622 	/*
5623 	 * This indicates that there was an error in the TCP, UDP
5624 	 * or ICMP checksum.
5625 	 */
5626 	#define RX_PKT_CMPL_ERRORS_L4_CS_ERROR			UINT32_C(0x20)
5627 	/*
5628 	 * This indicates that there was an error in the tunnel
5629 	 * IP header checksum.
5630 	 */
5631 	#define RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR			UINT32_C(0x40)
5632 	/*
5633 	 * This indicates that there was an error in the tunnel
5634 	 * UDP checksum.
5635 	 */
5636 	#define RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR			UINT32_C(0x80)
5637 	/*
5638 	 * This indicates that there was a CRC error on either an FCoE
5639 	 * or RoCE packet. The itype indicates the packet type.
5640 	 */
5641 	#define RX_PKT_CMPL_ERRORS_CRC_ERROR			UINT32_C(0x100)
5642 	/*
5643 	 * This indicates that there was an error in the tunnel
5644 	 * portion of the packet when this
5645 	 * field is non-zero.
5646 	 */
5647 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_MASK		UINT32_C(0xe00)
5648 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_SFT			9
5649 	/*
5650 	 * No additional error occurred on the tunnel portion
5651 	 * or the packet of the packet does not have a tunnel.
5652 	 */
5653 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 9)
5654 	/*
5655 	 * Indicates that IP header version does not match
5656 	 * expectation from L2 Ethertype for IPv4 and IPv6
5657 	 * in the tunnel header.
5658 	 */
5659 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION	(UINT32_C(0x1) << 9)
5660 	/*
5661 	 * Indicates that header length is out of range in the
5662 	 * tunnel header. Valid for
5663 	 * IPv4.
5664 	 */
5665 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 9)
5666 	/*
5667 	 * Indicates that the physical packet is shorter than that
5668 	 * claimed by the PPPoE header length for a tunnel PPPoE
5669 	 * packet.
5670 	 */
5671 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR	(UINT32_C(0x3) << 9)
5672 	/*
5673 	 * Indicates that physical packet is shorter than that claimed
5674 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6
5675 	 * tunnel packet packets.
5676 	 */
5677 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR	(UINT32_C(0x4) << 9)
5678 	/*
5679 	 * Indicates that the physical packet is shorter than that
5680 	 * claimed by the tunnel UDP header length for a tunnel
5681 	 * UDP packet that is not fragmented.
5682 	 */
5683 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR	(UINT32_C(0x5) << 9)
5684 	/*
5685 	 * indicates that the IPv4 TTL or IPv6 hop limit check
5686 	 * have failed (e.g. TTL = 0) in the tunnel header. Valid
5687 	 * for IPv4, and IPv6.
5688 	 */
5689 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL		(UINT32_C(0x6) << 9)
5690 		#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_LAST			RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL
5691 	/*
5692 	 * This indicates that there was an error in the inner
5693 	 * portion of the packet when this
5694 	 * field is non-zero.
5695 	 */
5696 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_MASK			UINT32_C(0xf000)
5697 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_SFT			12
5698 	/*
5699 	 * No additional error occurred on the tunnel portion
5700 	 * or the packet of the packet does not have a tunnel.
5701 	 */
5702 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 12)
5703 	/*
5704 	 * Indicates that IP header version does not match
5705 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
5706 	 * option other than VFT was parsed on
5707 	 * FCoE packet.
5708 	 */
5709 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_VERSION		(UINT32_C(0x1) << 12)
5710 	/*
5711 	 * indicates that header length is out of range. Valid for
5712 	 * IPv4 and RoCE
5713 	 */
5714 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN		(UINT32_C(0x2) << 12)
5715 	/*
5716 	 * indicates that the IPv4 TTL or IPv6 hop limit check
5717 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
5718 	 */
5719 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_TTL		(UINT32_C(0x3) << 12)
5720 	/*
5721 	 * Indicates that physical packet is shorter than that
5722 	 * claimed by the l3 header length. Valid for IPv4,
5723 	 * IPv6 packet or RoCE packets.
5724 	 */
5725 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_IP_TOTAL_ERROR		(UINT32_C(0x4) << 12)
5726 	/*
5727 	 * Indicates that the physical packet is shorter than that
5728 	 * claimed by the UDP header length for a UDP packet that is
5729 	 * not fragmented.
5730 	 */
5731 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR		(UINT32_C(0x5) << 12)
5732 	/*
5733 	 * Indicates that TCP header length > IP payload. Valid for
5734 	 * TCP packets only.
5735 	 */
5736 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN		(UINT32_C(0x6) << 12)
5737 	/* Indicates that TCP header length < 5. Valid for TCP. */
5738 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL   (UINT32_C(0x7) << 12)
5739 	/*
5740 	 * Indicates that TCP option headers result in a TCP header
5741 	 * size that does not match data offset in TCP header. Valid
5742 	 * for TCP.
5743 	 */
5744 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN		(UINT32_C(0x8) << 12)
5745 		#define RX_PKT_CMPL_ERRORS_PKT_ERROR_LAST			RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
5746 	/*
5747 	 * This field identifies the CFA action rule that was used for this
5748 	 * packet.
5749 	 */
5750 	uint16_t	cfa_code;
5751 	uint32_t	reorder;
5752 	/*
5753 	 * This value holds the reordering sequence number for the packet.
5754 	 * If the reordering sequence is not valid, then this value is zero.
5755 	 * The reordering domain for the packet is in the bottom 8 to 10b of
5756 	 * the rss_hash value. The bottom 20b of this value contain the
5757 	 * ordering domain value for the packet.
5758 	 */
5759 	#define RX_PKT_CMPL_REORDER_MASK UINT32_C(0xffffff)
5760 	#define RX_PKT_CMPL_REORDER_SFT 0
5761 } rx_pkt_cmpl_hi_t, *prx_pkt_cmpl_hi_t;
5762 
5763 /* rx_pkt_v2_cmpl (size:128b/16B) */
5764 
5765 typedef struct rx_pkt_v2_cmpl {
5766 	uint16_t	flags_type;
5767 	/*
5768 	 * This field indicates the exact type of the completion.
5769 	 * By convention, the LSB identifies the length of the
5770 	 * record in 16B units. Even values indicate 16B
5771 	 * records. Odd values indicate 32B
5772 	 * records.
5773 	 */
5774 	#define RX_PKT_V2_CMPL_TYPE_MASK			UINT32_C(0x3f)
5775 	#define RX_PKT_V2_CMPL_TYPE_SFT			0
5776 	/*
5777 	 * RX L2 V2 completion:
5778 	 * Completion of and L2 RX packet. Length = 32B
5779 	 * This is the new version of the RX_L2 completion used in SR2
5780 	 * and later chips.
5781 	 */
5782 		#define RX_PKT_V2_CMPL_TYPE_RX_L2_V2			UINT32_C(0xf)
5783 		#define RX_PKT_V2_CMPL_TYPE_LAST			RX_PKT_V2_CMPL_TYPE_RX_L2_V2
5784 	#define RX_PKT_V2_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
5785 	#define RX_PKT_V2_CMPL_FLAGS_SFT			6
5786 	/*
5787 	 * When this bit is '1', it indicates a packet that has an
5788 	 * error of some type. Type of error is indicated in
5789 	 * error_flags.
5790 	 */
5791 	#define RX_PKT_V2_CMPL_FLAGS_ERROR			UINT32_C(0x40)
5792 	/* This field indicates how the packet was placed in the buffer. */
5793 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
5794 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_SFT		7
5795 	/*
5796 	 * Normal:
5797 	 * Packet was placed using normal algorithm.
5798 	 */
5799 		#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_NORMAL		(UINT32_C(0x0) << 7)
5800 	/*
5801 	 * Jumbo:
5802 	 * Packet was placed using jumbo algorithm.
5803 	 */
5804 		#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
5805 	/*
5806 	 * Header/Data Separation:
5807 	 * Packet was placed using Header/Data separation algorithm.
5808 	 * The separation location is indicated by the itype field.
5809 	 */
5810 		#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
5811 	/*
5812 	 * Truncation:
5813 	 * Packet was placed using truncation algorithm. The
5814 	 * placed (truncated) length is indicated in the payload_offset
5815 	 * field. The original length is indicated in the len field.
5816 	 */
5817 		#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_TRUNCATION	(UINT32_C(0x3) << 7)
5818 		#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_LAST		RX_PKT_V2_CMPL_FLAGS_PLACEMENT_TRUNCATION
5819 	/* This bit is '1' if the RSS field in this completion is valid. */
5820 	#define RX_PKT_V2_CMPL_FLAGS_RSS_VALID		UINT32_C(0x400)
5821 	/*
5822 	 * This bit is '1' if metadata has been added to the end of the
5823 	 * packet in host memory. Metadata starts at the first 32B boundary
5824 	 * after the end of the packet for regular and jumbo placement.
5825 	 * It starts at the first 32B boundary after the end of the header
5826 	 * for HDS placement. The length of the metadata is indicated in the
5827 	 * metadata itself.
5828 	 */
5829 	#define RX_PKT_V2_CMPL_FLAGS_PKT_METADATA_PRESENT	UINT32_C(0x800)
5830 	/*
5831 	 * This value indicates what the inner packet determined for the
5832 	 * packet was.
5833 	 */
5834 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
5835 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_SFT		12
5836 	/*
5837 	 * Not Known:
5838 	 * Indicates that the packet type was not known.
5839 	 */
5840 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_NOT_KNOWN		(UINT32_C(0x0) << 12)
5841 	/*
5842 	 * IP Packet:
5843 	 * Indicates that the packet was an IP packet, but further
5844 	 * classification was not possible.
5845 	 */
5846 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_IP			(UINT32_C(0x1) << 12)
5847 	/*
5848 	 * TCP Packet:
5849 	 * Indicates that the packet was IP and TCP.
5850 	 * This indicates that the payload_offset field is valid.
5851 	 */
5852 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
5853 	/*
5854 	 * UDP Packet:
5855 	 * Indicates that the packet was IP and UDP.
5856 	 * This indicates that the payload_offset field is valid.
5857 	 */
5858 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_UDP		(UINT32_C(0x3) << 12)
5859 	/*
5860 	 * FCoE Packet:
5861 	 * Indicates that the packet was recognized as a FCoE.
5862 	 * This also indicates that the payload_offset field is valid.
5863 	 */
5864 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_FCOE		(UINT32_C(0x4) << 12)
5865 	/*
5866 	 * RoCE Packet:
5867 	 * Indicates that the packet was recognized as a RoCE.
5868 	 * This also indicates that the payload_offset field is valid.
5869 	 */
5870 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_ROCE		(UINT32_C(0x5) << 12)
5871 	/*
5872 	 * ICMP Packet:
5873 	 * Indicates that the packet was recognized as ICMP.
5874 	 * This indicates that the payload_offset field is valid.
5875 	 */
5876 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_ICMP		(UINT32_C(0x7) << 12)
5877 	/*
5878 	 * PTP packet wo/timestamp:
5879 	 * Indicates that the packet was recognized as a PTP
5880 	 * packet.
5881 	 */
5882 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP	(UINT32_C(0x8) << 12)
5883 	/*
5884 	 * PTP packet w/timestamp:
5885 	 * Indicates that the packet was recognized as a PTP
5886 	 * packet and that a timestamp was taken for the packet.
5887 	 */
5888 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP	(UINT32_C(0x9) << 12)
5889 		#define RX_PKT_V2_CMPL_FLAGS_ITYPE_LAST		RX_PKT_V2_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
5890 	/*
5891 	 * This is the length of the data for the packet stored in the
5892 	 * buffer(s) identified by the opaque value. This includes
5893 	 * the packet BD and any associated buffer BDs. This does not include
5894 	 * the length of any data places in aggregation BDs.
5895 	 */
5896 	uint16_t	len;
5897 	/*
5898 	 * This is a copy of the opaque field from the RX BD this completion
5899 	 * corresponds to.
5900 	 */
5901 	uint32_t	opaque;
5902 	uint8_t	agg_bufs_v1;
5903 	/*
5904 	 * This value is written by the NIC such that it will be different
5905 	 * for each pass through the completion queue. The even passes
5906 	 * will write 1. The odd passes will write 0.
5907 	 */
5908 	#define RX_PKT_V2_CMPL_V1	UINT32_C(0x1)
5909 	/*
5910 	 * This value is the number of aggregation buffers that follow this
5911 	 * entry in the completion ring that are a part of this packet.
5912 	 * If the value is zero, then the packet is completely contained
5913 	 * in the buffer space provided for the packet in the RX ring.
5914 	 */
5915 	#define RX_PKT_V2_CMPL_AGG_BUFS_MASK UINT32_C(0x3e)
5916 	#define RX_PKT_V2_CMPL_AGG_BUFS_SFT 1
5917 	/* unused1 is 2 b */
5918 	#define RX_PKT_V2_CMPL_UNUSED1_MASK UINT32_C(0xc0)
5919 	#define RX_PKT_V2_CMPL_UNUSED1_SFT  6
5920 	/*
5921 	 * This is the RSS hash type for the packet. The value is packed
5922 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
5923 	 * The value of tuple_extrac_op provides the information about
5924 	 * what fields the hash was computed on.
5925 	 * Note that 4-tuples values listed below are applicable
5926 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
5927 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
5928 	 * enabled for TCP traffic only, then the values of tuple_extract_op
5929 	 * corresponding to 4-tuples are only valid for TCP traffic.
5930 	 */
5931 	uint8_t	rss_hash_type;
5932 	/*
5933 	 * The RSS hash was computed over source IP address,
5934 	 * destination IP address, source port, and destination port of inner
5935 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
5936 	 * the packet headers are considered inner packet headers for the RSS
5937 	 * hash computation purpose.
5938 	 */
5939 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_0 UINT32_C(0x0)
5940 	/*
5941 	 * The RSS hash was computed over source IP address and destination
5942 	 * IP address of inner IP header. Note: For non-tunneled packets,
5943 	 * the packet headers are considered inner packet headers for the RSS
5944 	 * hash computation purpose.
5945 	 */
5946 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_1 UINT32_C(0x1)
5947 	/*
5948 	 * The RSS hash was computed over source IP address,
5949 	 * destination IP address, source port, and destination port of
5950 	 * IP and TCP or UDP headers of outer tunnel headers.
5951 	 * Note: For non-tunneled packets, this value is not applicable.
5952 	 */
5953 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_2 UINT32_C(0x2)
5954 	/*
5955 	 * The RSS hash was computed over source IP address and
5956 	 * destination IP address of IP header of outer tunnel headers.
5957 	 * Note: For non-tunneled packets, this value is not applicable.
5958 	 */
5959 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_3 UINT32_C(0x3)
5960 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_LAST  RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_3
5961 	uint16_t	metadata1_payload_offset;
5962 	/*
5963 	 * This is data from the CFA as indicated by the meta_format field.
5964 	 * If truncation placement is not used, this value indicates the offset
5965 	 * in bytes from the beginning of the packet where the inner payload
5966 	 * starts. This value is valid for TCP, UDP, FCoE, and RoCE packets. If
5967 	 * truncation placement is used, this value represents the placed
5968 	 * (truncated) length of the packet.
5969 	 */
5970 	#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_MASK	UINT32_C(0x1ff)
5971 	#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_SFT	0
5972 	/* This is data from the CFA as indicated by the meta_format field. */
5973 	#define RX_PKT_V2_CMPL_METADATA1_MASK		UINT32_C(0xf000)
5974 	#define RX_PKT_V2_CMPL_METADATA1_SFT		12
5975 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
5976 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_MASK	UINT32_C(0x7000)
5977 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_SFT	12
5978 	/* 0x88a8 */
5979 		#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID88A8   (UINT32_C(0x0) << 12)
5980 	/* 0x8100 */
5981 		#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID8100   (UINT32_C(0x1) << 12)
5982 	/* 0x9100 */
5983 		#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9100   (UINT32_C(0x2) << 12)
5984 	/* 0x9200 */
5985 		#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9200   (UINT32_C(0x3) << 12)
5986 	/* 0x9300 */
5987 		#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9300   (UINT32_C(0x4) << 12)
5988 	/* Value programmed in CFA VLANTPID register. */
5989 		#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 12)
5990 		#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_LAST	RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG
5991 	/* When meta_format != 0, this value is the VLAN valid. */
5992 	#define RX_PKT_V2_CMPL_METADATA1_VALID		UINT32_C(0x8000)
5993 	/*
5994 	 * This value is the RSS hash value calculated for the packet
5995 	 * based on the mode bits and key value in the VNIC. When vee_cmpl_mode
5996 	 * is set in VNIC context, this is the lower 32b of the host address
5997 	 * from the first BD used to place the packet.
5998 	 */
5999 	uint32_t	rss_hash;
6000 } rx_pkt_v2_cmpl_t, *prx_pkt_v2_cmpl_t;
6001 
6002 /* Last 16 bytes of RX Packet V2 Completion Record */
6003 /* rx_pkt_v2_cmpl_hi (size:128b/16B) */
6004 
6005 typedef struct rx_pkt_v2_cmpl_hi {
6006 	uint32_t	flags2;
6007 	/*
6008 	 * When this bit is '0', the cs_ok field has the following definition:-
6009 	 * ip_cs_ok[2:0] = The number of header groups with a valid IP checksum
6010 	 * in the delivered packet, counted from the outer-most header group to
6011 	 * the inner-most header group, stopping at the first error. -
6012 	 * l4_cs_ok[5:3] = The number of header groups with a valid L4 checksum
6013 	 * in the delivered packet, counted from the outer-most header group to
6014 	 * the inner-most header group, stopping at the first error. When this
6015 	 * bit is '1', the cs_ok field has the following definition: -
6016 	 * hdr_cnt[2:0] = The number of header groups that were parsed by the
6017 	 * chip and passed in the delivered packet. - ip_cs_all_ok[3] =This bit
6018 	 * will be '1' if all the parsed header groups with an IP checksum are
6019 	 * valid. - l4_cs_all_ok[4] = This bit will be '1' if all the parsed
6020 	 * header groups with an L4 checksum are valid.
6021 	 */
6022 	#define RX_PKT_V2_CMPL_HI_FLAGS2_CS_ALL_OK_MODE		UINT32_C(0x8)
6023 	/* This value indicates what format the metadata field is. */
6024 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
6025 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_SFT		4
6026 	/* There is no metadata information. Values are zero. */
6027 		#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
6028 	/*
6029 	 * The {metadata1, metadata0} fields contain the vtag
6030 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
6031 	 * de, vid[11:0]} The metadata2 field contains the table scope
6032 	 * and action record pointer. - metadata2[25:0] contains the
6033 	 * action record pointer. - metadata2[31:26] contains the table
6034 	 * scope.
6035 	 */
6036 		#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_ACT_REC_PTR	(UINT32_C(0x1) << 4)
6037 	/*
6038 	 * The {metadata1, metadata0} fields contain the vtag
6039 	 * information:
6040 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
6041 	 * The metadata2 field contains the Tunnel ID
6042 	 * value, justified to LSB.
6043 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
6044 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
6045 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
6046 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
6047 	 * - IPv4 = 0 (not populated)
6048 	 * - IPv6 = Flow Label[19:0]
6049 	 * - PPPoE = sessionID[15:0]
6050 	 * - MPLs = Outer label[19:0]
6051 	 * - UPAR = Selected[31:0] with bit mask
6052 	 */
6053 		#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
6054 	/*
6055 	 * The {metadata1, metadata0} fields contain the vtag
6056 	 * information:
6057 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
6058 	 * The metadata2 field contains the 32b metadata from the prepended
6059 	 * header (chdr_data).
6060 	 */
6061 		#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
6062 	/*
6063 	 * The {metadata1, metadata0} fields contain the vtag
6064 	 * information:
6065 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
6066 	 * The metadata2 field contains the outer_l3_offset,
6067 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
6068 	 * - metadata2[8:0] contains the outer_l3_offset.
6069 	 * - metadata2[17:9] contains the inner_l2_offset.
6070 	 * - metadata2[26:18] contains the inner_l3_offset.
6071 	 * - metadata2[31:27] contains the inner_l4_size.
6072 	 */
6073 		#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
6074 		#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_LAST		RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET
6075 	/*
6076 	 * This field indicates the IP type for the inner-most IP header.
6077 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
6078 	 * This value is only valid if itype indicates a packet
6079 	 * with an IP header.
6080 	 */
6081 	#define RX_PKT_V2_CMPL_HI_FLAGS2_IP_TYPE			UINT32_C(0x100)
6082 	/*
6083 	 * This indicates that the complete 1's complement checksum was
6084 	 * calculated for the packet.
6085 	 */
6086 	#define RX_PKT_V2_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
6087 	/*
6088 	 * This field indicates the status of IP and L4 CS calculations done
6089 	 * by the chip. The format of this field is indicated by the
6090 	 * cs_all_ok_mode bit.
6091 	 */
6092 	#define RX_PKT_V2_CMPL_HI_FLAGS2_CS_OK_MASK		UINT32_C(0xfc00)
6093 	#define RX_PKT_V2_CMPL_HI_FLAGS2_CS_OK_SFT		10
6094 	/*
6095 	 * This value is the complete 1's complement checksum calculated from
6096 	 * the start of the outer L3 header to the end of the packet (not
6097 	 * including the ethernet crc). It is valid when the
6098 	 * 'complete_checksum_calc' flag is set.
6099 	 */
6100 	#define RX_PKT_V2_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
6101 	#define RX_PKT_V2_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_SFT	16
6102 	/*
6103 	 * This is data from the CFA block as indicated by the meta_format
6104 	 * field.
6105 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
6106 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
6107 	 *   act_rec_ptr[25:0]}
6108 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
6109 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
6110 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
6111 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
6112 	 * of the host address from the first BD used to place the packet.
6113 	 */
6114 	uint32_t	metadata2;
6115 	uint16_t	errors_v2;
6116 	/*
6117 	 * This value is written by the NIC such that it will be different
6118 	 * for each pass through the completion queue. The even passes
6119 	 * will write 1. The odd passes will write 0.
6120 	 */
6121 	#define RX_PKT_V2_CMPL_HI_V2					UINT32_C(0x1)
6122 	#define RX_PKT_V2_CMPL_HI_ERRORS_MASK				UINT32_C(0xfffe)
6123 	#define RX_PKT_V2_CMPL_HI_ERRORS_SFT				1
6124 	/*
6125 	 * This error indicates that there was some sort of problem with
6126 	 * the BDs for the packet that was found after part of the
6127 	 * packet was already placed. The packet should be treated as
6128 	 * invalid.
6129 	 */
6130 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_MASK		UINT32_C(0xe)
6131 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_SFT		1
6132 	/* No buffer error */
6133 		#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_NO_BUFFER		(UINT32_C(0x0) << 1)
6134 	/*
6135 	 * Did Not Fit: Packet did not fit into packet buffer provided.
6136 	 * For regular placement, this means the packet did not fit in
6137 	 * the buffer provided. For HDS and jumbo placement, this means
6138 	 * that the packet could not be placed into 8 physical buffers
6139 	 * (if fixed-size buffers are used), or that the packet could
6140 	 * not be placed in the number of physical buffers configured
6141 	 * for the VNIC (if variable-size buffers are used)
6142 	 */
6143 		#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_DID_NOT_FIT		(UINT32_C(0x1) << 1)
6144 	/*
6145 	 * Not On Chip: All BDs needed for the packet were not on-chip
6146 	 * when the packet arrived. For regular placement, this error is
6147 	 * not valid. For HDS and jumbo placement, this means that not
6148 	 * enough agg BDs were posted to place the packet.
6149 	 */
6150 		#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_NOT_ON_CHIP		(UINT32_C(0x2) << 1)
6151 	/*
6152 	 * Bad Format:
6153 	 * BDs were not formatted correctly.
6154 	 */
6155 		#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_BAD_FORMAT		(UINT32_C(0x3) << 1)
6156 	/*
6157 	 * Flush:
6158 	 * There was a bad_format error on the previous operation
6159 	 */
6160 		#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH		(UINT32_C(0x5) << 1)
6161 		#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_LAST		RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH
6162 	/*
6163 	 * This indicates that there was an error in the outer tunnel
6164 	 * portion of the packet when this field is non-zero.
6165 	 */
6166 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_MASK		UINT32_C(0x70)
6167 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_SFT		4
6168 	/*
6169 	 * No additional error occurred on the outer tunnel portion
6170 	 * of the packet or the packet does not have a outer tunnel.
6171 	 */
6172 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 4)
6173 	/*
6174 	 * Indicates that IP header version does not match expectation
6175 	 * from L2 Ethertype for IPv4 and IPv6 in the outer tunnel header.
6176 	 */
6177 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L3_BAD_VERSION	(UINT32_C(0x1) << 4)
6178 	/*
6179 	 * Indicates that header length is out of range in the outer
6180 	 * tunnel header. Valid for IPv4.
6181 	 */
6182 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 4)
6183 	/*
6184 	 * Indicates that physical packet is shorter than that claimed
6185 	 * by the outer tunnel l3 header length. Valid for IPv4, or
6186 	 * IPv6 outer tunnel packets.
6187 	 */
6188 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_IP_TOTAL_ERROR	(UINT32_C(0x3) << 4)
6189 	/*
6190 	 * Indicates that the physical packet is shorter than that
6191 	 * claimed by the outer tunnel UDP header length for a outer
6192 	 * tunnel UDP packet that is not fragmented.
6193 	 */
6194 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_UDP_TOTAL_ERROR	(UINT32_C(0x4) << 4)
6195 	/*
6196 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have
6197 	 * failed (e.g. TTL = 0) in the outer tunnel header. Valid for
6198 	 * IPv4, and IPv6.
6199 	 */
6200 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L3_BAD_TTL	(UINT32_C(0x5) << 4)
6201 	/*
6202 	 * Indicates that the IP checksum failed its check in the outer
6203 	 * tunnel header.
6204 	 */
6205 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_IP_CS_ERROR	(UINT32_C(0x6) << 4)
6206 	/*
6207 	 * Indicates that the L4 checksum failed its check in the outer
6208 	 * tunnel header.
6209 	 */
6210 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L4_CS_ERROR	(UINT32_C(0x7) << 4)
6211 		#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_LAST		RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L4_CS_ERROR
6212 	/*
6213 	 * This indicates that there was a CRC error on either an FCoE
6214 	 * or RoCE packet. The itype indicates the packet type.
6215 	 */
6216 	#define RX_PKT_V2_CMPL_HI_ERRORS_CRC_ERROR			UINT32_C(0x100)
6217 	/*
6218 	 * This indicates that there was an error in the tunnel portion
6219 	 * of the packet when this field is non-zero.
6220 	 */
6221 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_MASK		UINT32_C(0xe00)
6222 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_SFT			9
6223 	/*
6224 	 * No additional error occurred on the tunnel portion
6225 	 * of the packet or the packet does not have a tunnel.
6226 	 */
6227 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 9)
6228 	/*
6229 	 * Indicates that IP header version does not match expectation
6230 	 * from L2 Ethertype for IPv4 and IPv6 in the tunnel header.
6231 	 */
6232 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION	(UINT32_C(0x1) << 9)
6233 	/*
6234 	 * Indicates that header length is out of range in the tunnel
6235 	 * header. Valid for IPv4.
6236 	 */
6237 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 9)
6238 	/*
6239 	 * Indicates that physical packet is shorter than that claimed
6240 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6 tunnel
6241 	 * packet packets.
6242 	 */
6243 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR	(UINT32_C(0x3) << 9)
6244 	/*
6245 	 * Indicates that the physical packet is shorter than that claimed
6246 	 * by the tunnel UDP header length for a tunnel UDP packet that is
6247 	 * not fragmented.
6248 	 */
6249 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR	(UINT32_C(0x4) << 9)
6250 	/*
6251 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have failed
6252 	 * (e.g. TTL = 0) in the tunnel header. Valid for IPv4, and IPv6.
6253 	 */
6254 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL		(UINT32_C(0x5) << 9)
6255 	/*
6256 	 * Indicates that the IP checksum failed its check in the tunnel
6257 	 * header.
6258 	 */
6259 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_IP_CS_ERROR		(UINT32_C(0x6) << 9)
6260 	/*
6261 	 * Indicates that the L4 checksum failed its check in the tunnel
6262 	 * header.
6263 	 */
6264 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR		(UINT32_C(0x7) << 9)
6265 		#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_LAST			RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR
6266 	/*
6267 	 * This indicates that there was an error in the inner
6268 	 * portion of the packet when this
6269 	 * field is non-zero.
6270 	 */
6271 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_MASK			UINT32_C(0xf000)
6272 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_SFT			12
6273 	/*
6274 	 * No additional error occurred on the tunnel portion
6275 	 * or the packet of the packet does not have a tunnel.
6276 	 */
6277 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 12)
6278 	/*
6279 	 * Indicates that IP header version does not match
6280 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
6281 	 * option other than VFT was parsed on
6282 	 * FCoE packet.
6283 	 */
6284 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_VERSION		(UINT32_C(0x1) << 12)
6285 	/*
6286 	 * indicates that header length is out of range. Valid for
6287 	 * IPv4 and RoCE
6288 	 */
6289 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN		(UINT32_C(0x2) << 12)
6290 	/*
6291 	 * indicates that the IPv4 TTL or IPv6 hop limit check
6292 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
6293 	 */
6294 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_TTL		(UINT32_C(0x3) << 12)
6295 	/*
6296 	 * Indicates that physical packet is shorter than that
6297 	 * claimed by the l3 header length. Valid for IPv4,
6298 	 * IPv6 packet or RoCE packets.
6299 	 */
6300 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_IP_TOTAL_ERROR		(UINT32_C(0x4) << 12)
6301 	/*
6302 	 * Indicates that the physical packet is shorter than that
6303 	 * claimed by the UDP header length for a UDP packet that is
6304 	 * not fragmented.
6305 	 */
6306 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR		(UINT32_C(0x5) << 12)
6307 	/*
6308 	 * Indicates that TCP header length > IP payload. Valid for
6309 	 * TCP packets only.
6310 	 */
6311 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN		(UINT32_C(0x6) << 12)
6312 	/* Indicates that TCP header length < 5. Valid for TCP. */
6313 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL   (UINT32_C(0x7) << 12)
6314 	/*
6315 	 * Indicates that TCP option headers result in a TCP header
6316 	 * size that does not match data offset in TCP header. Valid
6317 	 * for TCP.
6318 	 */
6319 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN		(UINT32_C(0x8) << 12)
6320 	/*
6321 	 * Indicates that the IP checksum failed its check in the
6322 	 * inner header.
6323 	 */
6324 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_IP_CS_ERROR		(UINT32_C(0x9) << 12)
6325 	/*
6326 	 * Indicates that the L4 checksum failed its check in the
6327 	 * inner header.
6328 	 */
6329 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_CS_ERROR		(UINT32_C(0xa) << 12)
6330 		#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_LAST			RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_CS_ERROR
6331 	/*
6332 	 * This is data from the CFA block as indicated by the meta_format
6333 	 * field.
6334 	 */
6335 	uint16_t	metadata0;
6336 	/* When meta_format=1, this value is the VLAN VID. */
6337 	#define RX_PKT_V2_CMPL_HI_METADATA0_VID_MASK UINT32_C(0xfff)
6338 	#define RX_PKT_V2_CMPL_HI_METADATA0_VID_SFT 0
6339 	/* When meta_format=1, this value is the VLAN DE. */
6340 	#define RX_PKT_V2_CMPL_HI_METADATA0_DE	UINT32_C(0x1000)
6341 	/* When meta_format=1, this value is the VLAN PRI. */
6342 	#define RX_PKT_V2_CMPL_HI_METADATA0_PRI_MASK UINT32_C(0xe000)
6343 	#define RX_PKT_V2_CMPL_HI_METADATA0_PRI_SFT 13
6344 	/*
6345 	 * The timestamp field contains the 32b timestamp for the packet from
6346 	 * the MAC.
6347 	 */
6348 	uint32_t	timestamp;
6349 } rx_pkt_v2_cmpl_hi_t, *prx_pkt_v2_cmpl_hi_t;
6350 
6351 /* rx_pkt_v3_cmpl (size:128b/16B) */
6352 
6353 typedef struct rx_pkt_v3_cmpl {
6354 	uint16_t	flags_type;
6355 	/*
6356 	 * This field indicates the exact type of the completion.
6357 	 * By convention, the LSB identifies the length of the
6358 	 * record in 16B units. Even values indicate 16B
6359 	 * records. Odd values indicate 32B
6360 	 * records.
6361 	 */
6362 	#define RX_PKT_V3_CMPL_TYPE_MASK			UINT32_C(0x3f)
6363 	#define RX_PKT_V3_CMPL_TYPE_SFT			0
6364 	/*
6365 	 * RX L2 V3 completion:
6366 	 * Completion of and L2 RX packet. Length = 32B
6367 	 * This is the new version of the RX_L2 completion used in Thor2
6368 	 * and later chips.
6369 	 */
6370 		#define RX_PKT_V3_CMPL_TYPE_RX_L2_V3			UINT32_C(0x17)
6371 		#define RX_PKT_V3_CMPL_TYPE_LAST			RX_PKT_V3_CMPL_TYPE_RX_L2_V3
6372 	#define RX_PKT_V3_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
6373 	#define RX_PKT_V3_CMPL_FLAGS_SFT			6
6374 	/*
6375 	 * When this bit is '1', it indicates a packet that has an
6376 	 * error of some type. Type of error is indicated in
6377 	 * error_flags.
6378 	 */
6379 	#define RX_PKT_V3_CMPL_FLAGS_ERROR			UINT32_C(0x40)
6380 	/* This field indicates how the packet was placed in the buffer. */
6381 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
6382 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_SFT		7
6383 	/*
6384 	 * Normal:
6385 	 * Packet was placed using normal algorithm.
6386 	 */
6387 		#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_NORMAL		(UINT32_C(0x0) << 7)
6388 	/*
6389 	 * Jumbo:
6390 	 * Packet was placed using jumbo algorithm.
6391 	 */
6392 		#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
6393 	/*
6394 	 * Header/Data Separation:
6395 	 * Packet was placed using Header/Data separation algorithm.
6396 	 * The separation location is indicated by the itype field.
6397 	 */
6398 		#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
6399 	/*
6400 	 * Truncation:
6401 	 * Packet was placed using truncation algorithm. The
6402 	 * placed (truncated) length is indicated in the payload_offset
6403 	 * field. The original length is indicated in the len field.
6404 	 */
6405 		#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_TRUNCATION	(UINT32_C(0x3) << 7)
6406 		#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_LAST		RX_PKT_V3_CMPL_FLAGS_PLACEMENT_TRUNCATION
6407 	/* This bit is '1' if the RSS field in this completion is valid. */
6408 	#define RX_PKT_V3_CMPL_FLAGS_RSS_VALID		UINT32_C(0x400)
6409 	/*
6410 	 * This bit is '1' if metadata has been added to the end of the
6411 	 * packet in host memory. Metadata starts at the first 32B boundary
6412 	 * after the end of the packet for regular and jumbo placement.
6413 	 * It starts at the first 32B boundary after the end of the header
6414 	 * for HDS placement. The length of the metadata is indicated in the
6415 	 * metadata itself.
6416 	 */
6417 	#define RX_PKT_V3_CMPL_FLAGS_PKT_METADATA_PRESENT	UINT32_C(0x800)
6418 	/*
6419 	 * This value indicates what the inner packet determined for the
6420 	 * packet was.
6421 	 */
6422 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
6423 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_SFT		12
6424 	/*
6425 	 * Not Known:
6426 	 * Indicates that the packet type was not known.
6427 	 */
6428 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_NOT_KNOWN		(UINT32_C(0x0) << 12)
6429 	/*
6430 	 * IP Packet:
6431 	 * Indicates that the packet was an IP packet, but further
6432 	 * classification was not possible.
6433 	 */
6434 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_IP			(UINT32_C(0x1) << 12)
6435 	/*
6436 	 * TCP Packet:
6437 	 * Indicates that the packet was IP and TCP.
6438 	 * This indicates that the payload_offset field is valid.
6439 	 */
6440 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
6441 	/*
6442 	 * UDP Packet:
6443 	 * Indicates that the packet was IP and UDP.
6444 	 * This indicates that the payload_offset field is valid.
6445 	 */
6446 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_UDP		(UINT32_C(0x3) << 12)
6447 	/*
6448 	 * FCoE Packet:
6449 	 * Indicates that the packet was recognized as a FCoE.
6450 	 * This also indicates that the payload_offset field is valid.
6451 	 */
6452 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_FCOE		(UINT32_C(0x4) << 12)
6453 	/*
6454 	 * RoCE Packet:
6455 	 * Indicates that the packet was recognized as a RoCE.
6456 	 * This also indicates that the payload_offset field is valid.
6457 	 */
6458 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_ROCE		(UINT32_C(0x5) << 12)
6459 	/*
6460 	 * ICMP Packet:
6461 	 * Indicates that the packet was recognized as ICMP.
6462 	 * This indicates that the payload_offset field is valid.
6463 	 */
6464 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_ICMP		(UINT32_C(0x7) << 12)
6465 	/*
6466 	 * PTP packet wo/timestamp:
6467 	 * Indicates that the packet was recognized as a PTP
6468 	 * packet.
6469 	 */
6470 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP	(UINT32_C(0x8) << 12)
6471 	/*
6472 	 * PTP packet w/timestamp:
6473 	 * Indicates that the packet was recognized as a PTP
6474 	 * packet and that a timestamp was taken for the packet.
6475 	 * The 4b sub-nanosecond portion of the timestamp is in
6476 	 * the payload_offset field.
6477 	 */
6478 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP	(UINT32_C(0x9) << 12)
6479 		#define RX_PKT_V3_CMPL_FLAGS_ITYPE_LAST		RX_PKT_V3_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
6480 	/*
6481 	 * This is the length of the data for the packet stored in the
6482 	 * buffer(s) identified by the opaque value. This includes
6483 	 * the packet BD and any associated buffer BDs. This does not include
6484 	 * the length of any data places in aggregation BDs.
6485 	 */
6486 	uint16_t	len;
6487 	/*
6488 	 * This is a copy of the opaque field from the RX BD this completion
6489 	 * corresponds to.
6490 	 */
6491 	uint32_t	opaque;
6492 	uint16_t	rss_hash_type_agg_bufs_v1;
6493 	/*
6494 	 * This value is written by the NIC such that it will be different
6495 	 * for each pass through the completion queue. The even passes
6496 	 * will write 1. The odd passes will write 0.
6497 	 */
6498 	#define RX_PKT_V3_CMPL_V1		UINT32_C(0x1)
6499 	/*
6500 	 * This value is the number of aggregation buffers that follow this
6501 	 * entry in the completion ring that are a part of this packet.
6502 	 * If the value is zero, then the packet is completely contained
6503 	 * in the buffer space provided for the packet in the RX ring.
6504 	 */
6505 	#define RX_PKT_V3_CMPL_AGG_BUFS_MASK	UINT32_C(0x3e)
6506 	#define RX_PKT_V3_CMPL_AGG_BUFS_SFT	1
6507 	/* unused1 is 1 b */
6508 	#define RX_PKT_V3_CMPL_UNUSED1		UINT32_C(0x40)
6509 	/*
6510 	 * This is the RSS hash type for the packet. The value is packed
6511 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
6512 	 * The value of tuple_extrac_op provides the information about
6513 	 * what fields the hash was computed on.
6514 	 * Note that 4-tuples values listed below are applicable
6515 	 * for layer 4 protocols supported and enabled for RSS in the
6516 	 * hardware, HWRM firmware, and drivers. For example, if RSS hash
6517 	 * is supported and enabled for TCP traffic only, then the values of
6518 	 * tuple_extract_op corresponding to 4-tuples are only valid for
6519 	 * TCP traffic.
6520 	 */
6521 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_MASK   UINT32_C(0xff80)
6522 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_SFT	7
6523 	/*
6524 	 * The RSS hash was computed over source IP address,
6525 	 * destination IP address, source port, and destination port of
6526 	 * inner IP and TCP or UDP headers.
6527 	 */
6528 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_0   (UINT32_C(0x0) << 7)
6529 	/*
6530 	 * The RSS hash was computed over source IP address and
6531 	 * destination IP address of inner IP header.
6532 	 */
6533 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_1   (UINT32_C(0x1) << 7)
6534 	/*
6535 	 * The RSS hash was computed over source IP address,
6536 	 * destination IP address, source port, and destination port of
6537 	 * IP and TCP or UDP headers of outer tunnel headers.
6538 	 * Note: For non-tunneled packets, this value is not applicable.
6539 	 */
6540 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_2   (UINT32_C(0x2) << 7)
6541 	/*
6542 	 * The RSS hash was computed over source IP address and
6543 	 * destination IP address of IP header of outer tunnel headers.
6544 	 * Note: For non-tunneled packets, this value is not applicable.
6545 	 */
6546 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_3   (UINT32_C(0x3) << 7)
6547 	/*
6548 	 * The RSS hash was computed over source IP address of the inner
6549 	 * IP header.
6550 	 */
6551 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_4   (UINT32_C(0x4) << 7)
6552 	/*
6553 	 * The RSS hash was computed over destination IP address of the
6554 	 * inner IP header.
6555 	 */
6556 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_5   (UINT32_C(0x5) << 7)
6557 	/*
6558 	 * The RSS hash was computed over source IP address of the outer
6559 	 * IP header.
6560 	 * Note: For non-tunneled packets, this value is not applicable.
6561 	 */
6562 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_6   (UINT32_C(0x6) << 7)
6563 	/*
6564 	 * The RSS hash was computed over destination IP address of the
6565 	 * outer IP header.
6566 	 * Note: For non-tunneled packets, this value is not applicable.
6567 	 */
6568 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_7   (UINT32_C(0x7) << 7)
6569 	/*
6570 	 * The RSS hash was computed over source IP address, destination
6571 	 * IP address, and flow label of the inner IP header.
6572 	 * Note: For packets without an inner IPv6 header, this value is not
6573 	 * this value is not applicable.
6574 	 */
6575 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_8   (UINT32_C(0x8) << 7)
6576 	/*
6577 	 * The RSS hash was computed over the flow label of the inner
6578 	 * IP header.
6579 	 * Note: For packets without an inner IPv6 header, this value
6580 	 * is not applicable.
6581 	 */
6582 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_9   (UINT32_C(0x9) << 7)
6583 	/*
6584 	 * The RSS hash was computed over source IP address, destination
6585 	 * IP address, and flow label of the outer IP header.
6586 	 * Note: For packets without an outer IPv6 header, this value is not
6587 	 * applicable.
6588 	 */
6589 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_10  (UINT32_C(0xa) << 7)
6590 	/*
6591 	 * The RSS hash was computed over the flow label of the outer
6592 	 * IP header.
6593 	 * Note: For packets without an outer IPv6 header, this value
6594 	 * is not applicable.
6595 	 */
6596 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_11  (UINT32_C(0xb) << 7)
6597 	/* The RSS hash was computed over tunnel context and tunnel ID field. */
6598 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_12  (UINT32_C(0xc) << 7)
6599 	/*
6600 	 * The RSS hash was computed over tunnel source IP address, tunnel
6601 	 * destination IP address, and tunnel ID field.
6602 	 */
6603 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_13  (UINT32_C(0xd) << 7)
6604 	/*
6605 	 * The RSS hash was computed over tunnel source IP address, tunnel
6606 	 * destination IP address, tunnel context, and tunnel ID field.
6607 	 */
6608 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_14  (UINT32_C(0xe) << 7)
6609 		#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_LAST	RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_14
6610 	uint16_t	metadata1_payload_offset;
6611 	/*
6612 	 * If truncation placement is not used, this value indicates the offset
6613 	 * in bytes from the beginning of the packet where the inner payload
6614 	 * starts. This value is valid for TCP, UDP, FCoE, and RoCE packets.
6615 	 * For PTP packets with timestamp (as indicated by the flags_itype
6616 	 * field), this field contains the 4b sub-nanosecond portion of the
6617 	 * timestamp.
6618 	 *
6619 	 * If truncation placement is used, this value represents the placed
6620 	 * (truncated) length of the packet.
6621 	 */
6622 	#define RX_PKT_V3_CMPL_PAYLOAD_OFFSET_MASK	UINT32_C(0x1ff)
6623 	#define RX_PKT_V3_CMPL_PAYLOAD_OFFSET_SFT	0
6624 	/* This is data from the CFA as indicated by the meta_format field. */
6625 	#define RX_PKT_V3_CMPL_METADATA1_MASK		UINT32_C(0xf000)
6626 	#define RX_PKT_V3_CMPL_METADATA1_SFT		12
6627 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
6628 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_MASK	UINT32_C(0x7000)
6629 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_SFT	12
6630 	/* 0x88a8 */
6631 		#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID88A8   (UINT32_C(0x0) << 12)
6632 	/* 0x8100 */
6633 		#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID8100   (UINT32_C(0x1) << 12)
6634 	/* 0x9100 */
6635 		#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID9100   (UINT32_C(0x2) << 12)
6636 	/* 0x9200 */
6637 		#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID9200   (UINT32_C(0x3) << 12)
6638 	/* 0x9300 */
6639 		#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID9300   (UINT32_C(0x4) << 12)
6640 	/* Value programmed in CFA VLANTPID register. */
6641 		#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 12)
6642 		#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_LAST	RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG
6643 	/* When meta_format != 0, this value is the VLAN valid. */
6644 	#define RX_PKT_V3_CMPL_METADATA1_VALID		UINT32_C(0x8000)
6645 	/*
6646 	 * This value is the RSS hash value calculated for the packet
6647 	 * based on the mode bits and key value in the VNIC. When hairpin_en
6648 	 * is set in VNIC context, this is the lower 32b of the host address
6649 	 * from the first BD used to place the packet.
6650 	 */
6651 	uint32_t	rss_hash;
6652 } rx_pkt_v3_cmpl_t, *prx_pkt_v3_cmpl_t;
6653 
6654 /* Last 16 bytes of RX Packet V3 Completion Record */
6655 /* rx_pkt_v3_cmpl_hi (size:128b/16B) */
6656 
6657 typedef struct rx_pkt_v3_cmpl_hi {
6658 	uint32_t	flags2;
6659 	/*
6660 	 * This indicates that the ip checksum was calculated for the inner
6661 	 * packet and that the ip_cs_error field indicates if there was an
6662 	 * error.
6663 	 */
6664 	#define RX_PKT_V3_CMPL_HI_FLAGS2_IP_CS_CALC		UINT32_C(0x1)
6665 	/*
6666 	 * This indicates that the TCP, UDP or ICMP checksum was calculated
6667 	 * for the inner packet and that the l4_cs_error field indicates if
6668 	 * there was an error.
6669 	 */
6670 	#define RX_PKT_V3_CMPL_HI_FLAGS2_L4_CS_CALC		UINT32_C(0x2)
6671 	/*
6672 	 * This indicates that the ip checksum was calculated for the tunnel
6673 	 * header and that the t_ip_cs_error field indicates if there was an
6674 	 * error.
6675 	 */
6676 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_CS_CALC		UINT32_C(0x4)
6677 	/*
6678 	 * This indicates that the UDP checksum was calculated for the tunnel
6679 	 * packet and that the t_l4_cs_error field indicates if there was an
6680 	 * error.
6681 	 */
6682 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_L4_CS_CALC		UINT32_C(0x8)
6683 	/* This value indicates what format the metadata field is. */
6684 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
6685 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_SFT		4
6686 	/* There is no metadata information. Values are zero. */
6687 		#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
6688 	/*
6689 	 * The {metadata1, metadata0} fields contain the vtag
6690 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
6691 	 * de, vid[11:0]} The metadata2 field contains the table scope
6692 	 * and action record pointer. - metadata2[25:0] contains the
6693 	 * action record pointer. - metadata2[31:26] contains the table
6694 	 * scope.
6695 	 */
6696 		#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_ACT_REC_PTR	(UINT32_C(0x1) << 4)
6697 	/*
6698 	 * The {metadata1, metadata0} fields contain the vtag
6699 	 * information:
6700 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
6701 	 * The metadata2 field contains the Tunnel ID
6702 	 * value, justified to LSB.
6703 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
6704 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
6705 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
6706 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
6707 	 * - IPv4 = 0 (not populated)
6708 	 * - IPv6 = Flow Label[19:0]
6709 	 * - PPPoE = sessionID[15:0]
6710 	 * - MPLs = Outer label[19:0]
6711 	 * - UPAR = Selected[31:0] with bit mask
6712 	 */
6713 		#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
6714 	/*
6715 	 * The {metadata1, metadata0} fields contain the vtag
6716 	 * information:
6717 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
6718 	 * The metadata2 field contains the 32b metadata from the prepended
6719 	 * header (chdr_data).
6720 	 */
6721 		#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
6722 	/*
6723 	 * The {metadata1, metadata0} fields contain the vtag
6724 	 * information:
6725 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
6726 	 * The metadata2 field contains the outer_l3_offset,
6727 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
6728 	 * - metadata2[8:0] contains the outer_l3_offset.
6729 	 * - metadata2[17:9] contains the inner_l2_offset.
6730 	 * - metadata2[26:18] contains the inner_l3_offset.
6731 	 * - metadata2[31:27] contains the inner_l4_size.
6732 	 */
6733 		#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
6734 		#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_LAST		RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET
6735 	/*
6736 	 * This field indicates the IP type for the inner-most IP header.
6737 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
6738 	 * This value is only valid if itype indicates a packet
6739 	 * with an IP header.
6740 	 */
6741 	#define RX_PKT_V3_CMPL_HI_FLAGS2_IP_TYPE			UINT32_C(0x100)
6742 	/*
6743 	 * This indicates that the complete 1's complement checksum was
6744 	 * calculated for the packet.
6745 	 */
6746 	#define RX_PKT_V3_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
6747 	/*
6748 	 * This field indicates the status of IP and L4 CS calculations done
6749 	 * by the chip. The format of this field is indicated by the
6750 	 * cs_all_ok_mode bit.
6751 	 */
6752 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE		UINT32_C(0x400)
6753 	/* Indicates that the Tunnel IP type was IPv4 */
6754 		#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_IPV4		(UINT32_C(0x0) << 10)
6755 	/* Indicates that the Tunnel IP type was IPv6 */
6756 		#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_IPV6		(UINT32_C(0x1) << 10)
6757 		#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_LAST		RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_IPV6
6758 	/*
6759 	 * This value is the complete 1's complement checksum calculated from
6760 	 * the start of the outer L3 header to the end of the packet (not
6761 	 * including the ethernet crc). It is valid when the
6762 	 * 'complete_checksum_calc' flag is set.
6763 	 */
6764 	#define RX_PKT_V3_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
6765 	#define RX_PKT_V3_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_SFT	16
6766 	/*
6767 	 * This is data from the CFA block as indicated by the meta_format
6768 	 * field.
6769 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
6770 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
6771 	 *   act_rec_ptr[25:0]}
6772 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
6773 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
6774 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
6775 	 */
6776 	uint32_t	metadata2;
6777 	uint16_t	errors_v2;
6778 	/*
6779 	 * This value is written by the NIC such that it will be different
6780 	 * for each pass through the completion queue. The even passes
6781 	 * will write 1. The odd passes will write 0.
6782 	 */
6783 	#define RX_PKT_V3_CMPL_HI_V2					UINT32_C(0x1)
6784 	#define RX_PKT_V3_CMPL_HI_ERRORS_MASK				UINT32_C(0xfffe)
6785 	#define RX_PKT_V3_CMPL_HI_ERRORS_SFT				1
6786 	/*
6787 	 * This error indicates that there was some sort of problem with
6788 	 * the BDs for the packet that was found after part of the
6789 	 * packet was already placed. The packet should be treated as
6790 	 * invalid.
6791 	 */
6792 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_MASK		UINT32_C(0xe)
6793 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_SFT		1
6794 	/* No buffer error */
6795 		#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_NO_BUFFER		(UINT32_C(0x0) << 1)
6796 	/*
6797 	 * Did Not Fit: Packet did not fit into packet buffer provided.
6798 	 * For regular placement, this means the packet did not fit in
6799 	 * the buffer provided. For HDS and jumbo placement, this means
6800 	 * that the packet could not be placed into 8 physical buffers.
6801 	 */
6802 		#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_DID_NOT_FIT		(UINT32_C(0x1) << 1)
6803 	/*
6804 	 * Not On Chip: All BDs needed for the packet were not on-chip
6805 	 * when the packet arrived. For regular placement, this error is
6806 	 * not valid. For HDS and jumbo placement, this means that not
6807 	 * enough agg BDs were posted to place the packet.
6808 	 */
6809 		#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_NOT_ON_CHIP		(UINT32_C(0x2) << 1)
6810 	/*
6811 	 * Bad Format:
6812 	 * BDs were not formatted correctly.
6813 	 */
6814 		#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_BAD_FORMAT		(UINT32_C(0x3) << 1)
6815 	/*
6816 	 * Flush:
6817 	 * There was a bad_format error on the previous operation
6818 	 */
6819 		#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH		(UINT32_C(0x5) << 1)
6820 		#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_LAST		RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH
6821 	/* This indicates that there was an error in the IP header checksum. */
6822 	#define RX_PKT_V3_CMPL_HI_ERRORS_IP_CS_ERROR			UINT32_C(0x10)
6823 	/*
6824 	 * This indicates that there was an error in the TCP, UDP or ICMP
6825 	 * checksum.
6826 	 */
6827 	#define RX_PKT_V3_CMPL_HI_ERRORS_L4_CS_ERROR			UINT32_C(0x20)
6828 	/*
6829 	 * This indicates that there was an error in the tunnel IP header
6830 	 * checksum.
6831 	 */
6832 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_IP_CS_ERROR			UINT32_C(0x40)
6833 	/* This indicates that there was an error in the tunnel UDP checksum. */
6834 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_L4_CS_ERROR			UINT32_C(0x80)
6835 	/*
6836 	 * This indicates that there was a CRC error on either an FCoE
6837 	 * or RoCE packet. The itype indicates the packet type.
6838 	 */
6839 	#define RX_PKT_V3_CMPL_HI_ERRORS_CRC_ERROR			UINT32_C(0x100)
6840 	/*
6841 	 * This indicates that there was an error in the tunnel portion
6842 	 * of the packet when this field is non-zero.
6843 	 */
6844 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_MASK		UINT32_C(0xe00)
6845 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_SFT			9
6846 	/*
6847 	 * No additional error occurred on the tunnel portion
6848 	 * of the packet or the packet does not have a tunnel.
6849 	 */
6850 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 9)
6851 	/*
6852 	 * Indicates that IP header version does not match expectation
6853 	 * from L2 Ethertype for IPv4 and IPv6 in the tunnel header.
6854 	 */
6855 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION	(UINT32_C(0x1) << 9)
6856 	/*
6857 	 * Indicates that header length is out of range in the tunnel
6858 	 * header. Valid for IPv4.
6859 	 */
6860 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 9)
6861 	/*
6862 	 * Indicates that physical packet is shorter than that claimed
6863 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6 tunnel
6864 	 * packet packets.
6865 	 */
6866 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR	(UINT32_C(0x3) << 9)
6867 	/*
6868 	 * Indicates that the physical packet is shorter than that claimed
6869 	 * by the tunnel UDP header length for a tunnel UDP packet that is
6870 	 * not fragmented.
6871 	 */
6872 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR	(UINT32_C(0x4) << 9)
6873 	/*
6874 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have failed
6875 	 * (e.g. TTL = 0) in the tunnel header. Valid for IPv4, and IPv6.
6876 	 */
6877 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL		(UINT32_C(0x5) << 9)
6878 	/*
6879 	 * Indicates that the physical packet is shorter than that claimed
6880 	 * by the tunnel header length. Valid for GTPv1-U packets.
6881 	 * header.
6882 	 */
6883 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_TOTAL_ERROR		(UINT32_C(0x6) << 9)
6884 		#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_LAST			RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_TOTAL_ERROR
6885 	/*
6886 	 * This indicates that there was an error in the inner
6887 	 * portion of the packet when this
6888 	 * field is non-zero.
6889 	 */
6890 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_MASK			UINT32_C(0xf000)
6891 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_SFT			12
6892 	/*
6893 	 * No additional error occurred on the tunnel portion
6894 	 * or the packet of the packet does not have a tunnel.
6895 	 */
6896 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 12)
6897 	/*
6898 	 * Indicates that IP header version does not match
6899 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
6900 	 * option other than VFT was parsed on
6901 	 * FCoE packet.
6902 	 */
6903 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_VERSION		(UINT32_C(0x1) << 12)
6904 	/*
6905 	 * indicates that header length is out of range. Valid for
6906 	 * IPv4 and RoCE
6907 	 */
6908 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN		(UINT32_C(0x2) << 12)
6909 	/*
6910 	 * indicates that the IPv4 TTL or IPv6 hop limit check
6911 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
6912 	 */
6913 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_TTL		(UINT32_C(0x3) << 12)
6914 	/*
6915 	 * Indicates that physical packet is shorter than that
6916 	 * claimed by the l3 header length. Valid for IPv4,
6917 	 * IPv6 packet or RoCE packets.
6918 	 */
6919 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_IP_TOTAL_ERROR		(UINT32_C(0x4) << 12)
6920 	/*
6921 	 * Indicates that the physical packet is shorter than that
6922 	 * claimed by the UDP header length for a UDP packet that is
6923 	 * not fragmented.
6924 	 */
6925 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR		(UINT32_C(0x5) << 12)
6926 	/*
6927 	 * Indicates that TCP header length > IP payload. Valid for
6928 	 * TCP packets only.
6929 	 */
6930 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN		(UINT32_C(0x6) << 12)
6931 	/* Indicates that TCP header length < 5. Valid for TCP. */
6932 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL   (UINT32_C(0x7) << 12)
6933 	/*
6934 	 * Indicates that TCP option headers result in a TCP header
6935 	 * size that does not match data offset in TCP header. Valid
6936 	 * for TCP.
6937 	 */
6938 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN		(UINT32_C(0x8) << 12)
6939 		#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_LAST			RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
6940 	/*
6941 	 * This is data from the CFA block as indicated by the meta_format
6942 	 * field.
6943 	 */
6944 	uint16_t	metadata0;
6945 	/* When meta_format=1, this value is the VLAN VID. */
6946 	#define RX_PKT_V3_CMPL_HI_METADATA0_VID_MASK UINT32_C(0xfff)
6947 	#define RX_PKT_V3_CMPL_HI_METADATA0_VID_SFT 0
6948 	/* When meta_format=1, this value is the VLAN DE. */
6949 	#define RX_PKT_V3_CMPL_HI_METADATA0_DE	UINT32_C(0x1000)
6950 	/* When meta_format=1, this value is the VLAN PRI. */
6951 	#define RX_PKT_V3_CMPL_HI_METADATA0_PRI_MASK UINT32_C(0xe000)
6952 	#define RX_PKT_V3_CMPL_HI_METADATA0_PRI_SFT 13
6953 	/*
6954 	 * The timestamp field contains the 32b timestamp for the packet from
6955 	 * the MAC.
6956 	 *
6957 	 * When hairpin_en is set in VNIC context, this is the upper 32b of the
6958 	 * host address from the first BD used to place the packet.
6959 	 */
6960 	uint32_t	timestamp;
6961 } rx_pkt_v3_cmpl_hi_t, *prx_pkt_v3_cmpl_hi_t;
6962 
6963 /* rx_pkt_compress_cmpl (size:128b/16B) */
6964 
6965 typedef struct rx_pkt_compress_cmpl {
6966 	uint16_t	flags_type;
6967 	/*
6968 	 * This field indicates the exact type of the completion.
6969 	 * By convention, the LSB identifies the length of the
6970 	 * record in 16B units. Even values indicate 16B
6971 	 * records. Odd values indicate 32B
6972 	 * records.
6973 	 */
6974 	#define RX_PKT_COMPRESS_CMPL_TYPE_MASK		UINT32_C(0x3f)
6975 	#define RX_PKT_COMPRESS_CMPL_TYPE_SFT			0
6976 	/*
6977 	 * RX L2 completion:
6978 	 * This is the compressed version of Rx Completion for performance
6979 	 * applications. Length = 16B
6980 	 * This version of the completion record is used in Thor2 and later
6981 	 * chips.
6982 	 */
6983 		#define RX_PKT_COMPRESS_CMPL_TYPE_RX_L2_COMPRESS	UINT32_C(0x10)
6984 		#define RX_PKT_COMPRESS_CMPL_TYPE_LAST			RX_PKT_COMPRESS_CMPL_TYPE_RX_L2_COMPRESS
6985 	#define RX_PKT_COMPRESS_CMPL_FLAGS_MASK		UINT32_C(0xffc0)
6986 	#define RX_PKT_COMPRESS_CMPL_FLAGS_SFT		6
6987 	/*
6988 	 * When this bit is '1', it indicates a packet that has an
6989 	 * error of some type. Type of error is indicated in
6990 	 * error_flags.
6991 	 */
6992 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ERROR		UINT32_C(0x40)
6993 	/*
6994 	 * This field indicates the status of IP and L4 CS calculations done
6995 	 * by the chip. The format of this field is indicated by the
6996 	 * cs_all_ok_mode bit.
6997 	 */
6998 	#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE		UINT32_C(0x100)
6999 	/* Indicates that the Tunnel IP type was IPv4 */
7000 		#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_IPV4	(UINT32_C(0x0) << 8)
7001 	/* Indicates that the Tunnel IP type was IPv6 */
7002 		#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_IPV6	(UINT32_C(0x1) << 8)
7003 		#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_LAST	RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_IPV6
7004 	/*
7005 	 * This field indicates the IP type for the inner-most IP header.
7006 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
7007 	 * This value is only valid if itype indicates a packet
7008 	 * with an IP header.
7009 	 */
7010 	#define RX_PKT_COMPRESS_CMPL_FLAGS_IP_TYPE		UINT32_C(0x200)
7011 	/* This bit is '1' if the RSS field in this completion is valid. */
7012 	#define RX_PKT_COMPRESS_CMPL_FLAGS_RSS_VALID		UINT32_C(0x400)
7013 	/*
7014 	 * This value indicates what the inner packet determined for the
7015 	 * packet was.
7016 	 */
7017 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
7018 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_SFT		12
7019 	/*
7020 	 * Not Known:
7021 	 * Indicates that the packet type was not known.
7022 	 */
7023 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_NOT_KNOWN	(UINT32_C(0x0) << 12)
7024 	/*
7025 	 * IP Packet:
7026 	 * Indicates that the packet was an IP packet, but further
7027 	 * classification was not possible.
7028 	 */
7029 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_IP		(UINT32_C(0x1) << 12)
7030 	/*
7031 	 * TCP Packet:
7032 	 * Indicates that the packet was IP and TCP.
7033 	 * This indicates that the payload_offset field is valid.
7034 	 */
7035 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
7036 	/*
7037 	 * UDP Packet:
7038 	 * Indicates that the packet was IP and UDP.
7039 	 * This indicates that the payload_offset field is valid.
7040 	 */
7041 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_UDP		(UINT32_C(0x3) << 12)
7042 	/*
7043 	 * FCoE Packet:
7044 	 * Indicates that the packet was recognized as a FCoE.
7045 	 * This also indicates that the payload_offset field is valid.
7046 	 */
7047 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_FCOE		(UINT32_C(0x4) << 12)
7048 	/*
7049 	 * RoCE Packet:
7050 	 * Indicates that the packet was recognized as a RoCE.
7051 	 * This also indicates that the payload_offset field is valid.
7052 	 */
7053 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_ROCE		(UINT32_C(0x5) << 12)
7054 	/*
7055 	 * ICMP Packet:
7056 	 * Indicates that the packet was recognized as ICMP.
7057 	 * This indicates that the payload_offset field is valid.
7058 	 */
7059 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_ICMP		(UINT32_C(0x7) << 12)
7060 	/*
7061 	 * PTP packet wo/timestamp:
7062 	 * Indicates that the packet was recognized as a PTP
7063 	 * packet.
7064 	 */
7065 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP   (UINT32_C(0x8) << 12)
7066 	/*
7067 	 * PTP packet w/timestamp:
7068 	 * Indicates that the packet was recognized as a PTP
7069 	 * packet and that a timestamp was taken for the packet.
7070 	 * The 4b sub-nanosecond portion of the timestamp is in
7071 	 * the payload_offset field.
7072 	 */
7073 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP	(UINT32_C(0x9) << 12)
7074 		#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_LAST		RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
7075 	/*
7076 	 * This is the length of the data for the packet stored in the
7077 	 * buffer(s) identified by the opaque value. This includes
7078 	 * the packet BD and any associated buffer BDs. This does not include
7079 	 * the length of any data places in aggregation BDs.
7080 	 */
7081 	uint16_t	len;
7082 	/*
7083 	 * This value is the RSS hash value calculated for the packet
7084 	 * based on the mode bits and key value in the VNIC. When hairpin_en
7085 	 * is set in VNIC context, this is the lower 32b of the host address
7086 	 * from the first BD used to place the packet.
7087 	 */
7088 	uint32_t	rss_hash;
7089 	uint16_t	metadata1_cs_error_calc_v1;
7090 	/*
7091 	 * This value is written by the NIC such that it will be different
7092 	 * for each pass through the completion queue. The even passes
7093 	 * will write 1. The odd passes will write 0.
7094 	 */
7095 	#define RX_PKT_COMPRESS_CMPL_V1				UINT32_C(0x1)
7096 	/* unused is 3 b */
7097 	#define RX_PKT_COMPRESS_CMPL_UNUSED_MASK			UINT32_C(0xe)
7098 	#define RX_PKT_COMPRESS_CMPL_UNUSED_SFT			1
7099 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_MASK		UINT32_C(0xff0)
7100 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_SFT		4
7101 	/* This indicates that there was an error in the IP header checksum. */
7102 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_IP_CS_ERROR	UINT32_C(0x10)
7103 	/*
7104 	 * This indicates that there was an error in the TCP, UDP or ICMP
7105 	 * checksum.
7106 	 */
7107 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_L4_CS_ERROR	UINT32_C(0x20)
7108 	/*
7109 	 * This indicates that there was an error in the tunnel IP header
7110 	 * checksum.
7111 	 */
7112 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_IP_CS_ERROR	UINT32_C(0x40)
7113 	/* This indicates that there was an error in the tunnel UDP checksum. */
7114 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_L4_CS_ERROR	UINT32_C(0x80)
7115 	/*
7116 	 * This indicates that the ip checksum was calculated for the inner
7117 	 * packet and that the ip_cs_error field indicates if there was an
7118 	 * error.
7119 	 */
7120 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_IP_CS_CALC	UINT32_C(0x100)
7121 	/*
7122 	 * This indicates that the TCP, UDP or ICMP checksum was calculated
7123 	 * for the inner packet and that the l4_cs_error field indicates if
7124 	 * there was an error.
7125 	 */
7126 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_L4_CS_CALC	UINT32_C(0x200)
7127 	/*
7128 	 * This indicates that the ip checksum was calculated for the tunnel
7129 	 * header and that the t_ip_cs_error field indicates if there was an
7130 	 * error.
7131 	 */
7132 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_IP_CS_CALC	UINT32_C(0x400)
7133 	/*
7134 	 * This indicates that the UDP checksum was calculated for the tunnel
7135 	 * packet and that the t_l4_cs_error field indicates if there was an
7136 	 * error.
7137 	 */
7138 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_L4_CS_CALC	UINT32_C(0x800)
7139 	/* This is data from the CFA as indicated by the meta_format field. */
7140 	#define RX_PKT_COMPRESS_CMPL_METADATA1_MASK		UINT32_C(0xf000)
7141 	#define RX_PKT_COMPRESS_CMPL_METADATA1_SFT		12
7142 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
7143 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_MASK	UINT32_C(0x7000)
7144 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_SFT	12
7145 	/* 0x88a8 */
7146 		#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID88A8	(UINT32_C(0x0) << 12)
7147 	/* 0x8100 */
7148 		#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID8100	(UINT32_C(0x1) << 12)
7149 	/* 0x9100 */
7150 		#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID9100	(UINT32_C(0x2) << 12)
7151 	/* 0x9200 */
7152 		#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID9200	(UINT32_C(0x3) << 12)
7153 	/* 0x9300 */
7154 		#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID9300	(UINT32_C(0x4) << 12)
7155 	/* Value programmed in CFA VLANTPID register. */
7156 		#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 12)
7157 		#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_LAST	RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPIDCFG
7158 	/* When meta_format != 0, this value is the VLAN valid. */
7159 	#define RX_PKT_COMPRESS_CMPL_METADATA1_VALID		UINT32_C(0x8000)
7160 	/* This is data from the CFA as indicated by the meta_format field. */
7161 	uint16_t	vlanc_tcid;
7162 	/* When meta_format!=0, this value is the VLAN VID. */
7163 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_VID_MASK UINT32_C(0xfff)
7164 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_VID_SFT 0
7165 	/* When meta_format!=0, this value is the VLAN DE. */
7166 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_DE	UINT32_C(0x1000)
7167 	/* When meta_format!=0, this value is the VLAN PRI. */
7168 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_PRI_MASK UINT32_C(0xe000)
7169 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_PRI_SFT 13
7170 	uint32_t	errors_agg_bufs_opaque;
7171 	/* Lower 16bits of the Opaque field provided in the Rx BD. */
7172 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_OPAQUE_MASK				UINT32_C(0xffff)
7173 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_OPAQUE_SFT				0
7174 	/*
7175 	 * This value is the number of aggregation buffers that follow this
7176 	 * entry in the completion ring that are a part of this packet.
7177 	 * If the value is zero, then the packet is completely contained
7178 	 * in the buffer space provided for the packet in the RX ring.
7179 	 */
7180 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_AGG_BUFS_MASK				UINT32_C(0x1f0000)
7181 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_AGG_BUFS_SFT				16
7182 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_MASK				UINT32_C(0x1fe00000)
7183 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_SFT				21
7184 	/*
7185 	 * This indicates that there was an error in the inner
7186 	 * portion of the packet when this
7187 	 * field is non-zero.
7188 	 */
7189 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_MASK			UINT32_C(0x1e00000)
7190 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_SFT			21
7191 	/*
7192 	 * No additional error occurred on the tunnel portion
7193 	 * or the packet of the packet does not have a tunnel.
7194 	 */
7195 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 21)
7196 	/*
7197 	 * Indicates that IP header version does not match
7198 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
7199 	 * option other than VFT was parsed on
7200 	 * FCoE packet.
7201 	 */
7202 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L3_BAD_VERSION		(UINT32_C(0x1) << 21)
7203 	/*
7204 	 * indicates that header length is out of range. Valid for
7205 	 * IPv4 and RoCE
7206 	 */
7207 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN		(UINT32_C(0x2) << 21)
7208 	/*
7209 	 * indicates that the IPv4 TTL or IPv6 hop limit check
7210 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
7211 	 */
7212 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L3_BAD_TTL		(UINT32_C(0x3) << 21)
7213 	/*
7214 	 * Indicates that physical packet is shorter than that
7215 	 * claimed by the l3 header length. Valid for IPv4,
7216 	 * IPv6 packet or RoCE packets.
7217 	 */
7218 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_IP_TOTAL_ERROR		(UINT32_C(0x4) << 21)
7219 	/*
7220 	 * Indicates that the physical packet is shorter than that
7221 	 * claimed by the UDP header length for a UDP packet that is
7222 	 * not fragmented.
7223 	 */
7224 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR		(UINT32_C(0x5) << 21)
7225 	/*
7226 	 * Indicates that TCP header length > IP payload. Valid for
7227 	 * TCP packets only.
7228 	 */
7229 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN		(UINT32_C(0x6) << 21)
7230 	/* Indicates that TCP header length < 5. Valid for TCP. */
7231 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL   (UINT32_C(0x7) << 21)
7232 	/*
7233 	 * Indicates that TCP option headers result in a TCP header
7234 	 * size that does not match data offset in TCP header. Valid
7235 	 * for TCP.
7236 	 */
7237 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN		(UINT32_C(0x8) << 21)
7238 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_LAST			RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
7239 	/*
7240 	 * This indicates that there was an error in the tunnel portion
7241 	 * of the packet when this field is non-zero.
7242 	 */
7243 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_MASK		UINT32_C(0xe000000)
7244 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_SFT			25
7245 	/*
7246 	 * No additional error occurred on the tunnel portion
7247 	 * of the packet or the packet does not have a tunnel.
7248 	 */
7249 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 25)
7250 	/*
7251 	 * Indicates that IP header version does not match expectation
7252 	 * from L2 Ethertype for IPv4 and IPv6 in the tunnel header.
7253 	 */
7254 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION	(UINT32_C(0x1) << 25)
7255 	/*
7256 	 * Indicates that header length is out of range in the tunnel
7257 	 * header. Valid for IPv4.
7258 	 */
7259 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 25)
7260 	/*
7261 	 * Indicates that physical packet is shorter than that claimed
7262 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6 tunnel
7263 	 * packet packets.
7264 	 */
7265 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR	(UINT32_C(0x3) << 25)
7266 	/*
7267 	 * Indicates that the physical packet is shorter than that claimed
7268 	 * by the tunnel UDP header length for a tunnel UDP packet that is
7269 	 * not fragmented.
7270 	 */
7271 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR	(UINT32_C(0x4) << 25)
7272 	/*
7273 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have failed
7274 	 * (e.g. TTL = 0) in the tunnel header. Valid for IPv4, and IPv6.
7275 	 */
7276 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL		(UINT32_C(0x5) << 25)
7277 	/*
7278 	 * Indicates that the IP checksum failed its check in the tunnel
7279 	 * header.
7280 	 */
7281 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_IP_CS_ERROR		(UINT32_C(0x6) << 25)
7282 	/*
7283 	 * Indicates that the L4 checksum failed its check in the tunnel
7284 	 * header.
7285 	 */
7286 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR		(UINT32_C(0x7) << 25)
7287 		#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_LAST			RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR
7288 	/*
7289 	 * This indicates that there was a CRC error on either an FCoE
7290 	 * or RoCE packet. The itype indicates the packet type.
7291 	 */
7292 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_CRC_ERROR			UINT32_C(0x10000000)
7293 	/* unused1 is 3 b */
7294 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_UNUSED1_MASK				UINT32_C(0xe0000000)
7295 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_UNUSED1_SFT				29
7296 } rx_pkt_compress_cmpl_t, *prx_pkt_compress_cmpl_t;
7297 
7298 /*
7299  * This TPA completion structure is used on devices where the
7300  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7301  */
7302 /* rx_tpa_start_cmpl (size:128b/16B) */
7303 
7304 typedef struct rx_tpa_start_cmpl {
7305 	uint16_t	flags_type;
7306 	/*
7307 	 * This field indicates the exact type of the completion.
7308 	 * By convention, the LSB identifies the length of the
7309 	 * record in 16B units. Even values indicate 16B
7310 	 * records. Odd values indicate 32B
7311 	 * records.
7312 	 */
7313 	#define RX_TPA_START_CMPL_TYPE_MASK		UINT32_C(0x3f)
7314 	#define RX_TPA_START_CMPL_TYPE_SFT		0
7315 	/*
7316 	 * RX L2 TPA Start Completion:
7317 	 * Completion at the beginning of a TPA operation.
7318 	 * Length = 32B
7319 	 */
7320 		#define RX_TPA_START_CMPL_TYPE_RX_TPA_START	UINT32_C(0x13)
7321 		#define RX_TPA_START_CMPL_TYPE_LAST		RX_TPA_START_CMPL_TYPE_RX_TPA_START
7322 	#define RX_TPA_START_CMPL_FLAGS_MASK		UINT32_C(0xffc0)
7323 	#define RX_TPA_START_CMPL_FLAGS_SFT		6
7324 	/* This bit will always be '0' for TPA start completions. */
7325 	#define RX_TPA_START_CMPL_FLAGS_ERROR		UINT32_C(0x40)
7326 	/* This field indicates how the packet was placed in the buffer. */
7327 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_MASK	UINT32_C(0x380)
7328 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_SFT	7
7329 	/*
7330 	 * Jumbo:
7331 	 * TPA Packet was placed using jumbo algorithm. This means
7332 	 * that the first buffer will be filled with data before
7333 	 * moving to aggregation buffers. Each aggregation buffer
7334 	 * will be filled before moving to the next aggregation
7335 	 * buffer.
7336 	 */
7337 		#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_JUMBO	(UINT32_C(0x1) << 7)
7338 	/*
7339 	 * Header/Data Separation:
7340 	 * Packet was placed using Header/Data separation algorithm.
7341 	 * The separation location is indicated by the itype field.
7342 	 */
7343 		#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_HDS	(UINT32_C(0x2) << 7)
7344 	/*
7345 	 * GRO/Jumbo:
7346 	 * Packet will be placed using GRO/Jumbo where the first
7347 	 * packet is filled with data. Subsequent packets will be
7348 	 * placed such that any one packet does not span two
7349 	 * aggregation buffers unless it starts at the beginning of
7350 	 * an aggregation buffer.
7351 	 */
7352 		#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_JUMBO   (UINT32_C(0x5) << 7)
7353 	/*
7354 	 * GRO/Header-Data Separation:
7355 	 * Packet will be placed using GRO/HDS where the header
7356 	 * is in the first packet.
7357 	 * Payload of each packet will be
7358 	 * placed such that any one packet does not span two
7359 	 * aggregation buffers unless it starts at the beginning of
7360 	 * an aggregation buffer.
7361 	 */
7362 		#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_HDS	(UINT32_C(0x6) << 7)
7363 		#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_LAST	RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_HDS
7364 	/* This bit is '1' if the RSS field in this completion is valid. */
7365 	#define RX_TPA_START_CMPL_FLAGS_RSS_VALID	UINT32_C(0x400)
7366 	/* unused is 1 b */
7367 	#define RX_TPA_START_CMPL_FLAGS_UNUSED		UINT32_C(0x800)
7368 	/*
7369 	 * This value indicates what the inner packet determined for the
7370 	 * packet was.
7371 	 */
7372 	#define RX_TPA_START_CMPL_FLAGS_ITYPE_MASK	UINT32_C(0xf000)
7373 	#define RX_TPA_START_CMPL_FLAGS_ITYPE_SFT	12
7374 	/*
7375 	 * TCP Packet:
7376 	 * Indicates that the packet was IP and TCP.
7377 	 */
7378 		#define RX_TPA_START_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
7379 		#define RX_TPA_START_CMPL_FLAGS_ITYPE_LAST	RX_TPA_START_CMPL_FLAGS_ITYPE_TCP
7380 	/*
7381 	 * This value indicates the amount of packet data written to the
7382 	 * buffer the opaque field in this completion corresponds to.
7383 	 */
7384 	uint16_t	len;
7385 	/*
7386 	 * This is a copy of the opaque field from the RX BD this completion
7387 	 * corresponds to.
7388 	 */
7389 	uint32_t	opaque;
7390 	/*
7391 	 * This value is written by the NIC such that it will be different
7392 	 * for each pass through the completion queue. The even passes
7393 	 * will write 1. The odd passes will write 0.
7394 	 */
7395 	uint8_t	v1;
7396 	/*
7397 	 * This value is written by the NIC such that it will be different
7398 	 * for each pass through the completion queue. The even passes
7399 	 * will write 1. The odd passes will write 0.
7400 	 */
7401 	#define RX_TPA_START_CMPL_V1 UINT32_C(0x1)
7402 	#define RX_TPA_START_CMPL_LAST RX_TPA_START_CMPL_V1
7403 	/*
7404 	 * This is the RSS hash type for the packet. The value is packed
7405 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
7406 	 *
7407 	 * The value of tuple_extrac_op provides the information about
7408 	 * what fields the hash was computed on.
7409 	 * * 0: The RSS hash was computed over source IP address,
7410 	 * destination IP address, source port, and destination port of inner
7411 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
7412 	 * the packet headers are considered inner packet headers for the RSS
7413 	 * hash computation purpose.
7414 	 * * 1: The RSS hash was computed over source IP address and destination
7415 	 * IP address of inner IP header. Note: For non-tunneled packets,
7416 	 * the packet headers are considered inner packet headers for the RSS
7417 	 * hash computation purpose.
7418 	 * * 2: The RSS hash was computed over source IP address,
7419 	 * destination IP address, source port, and destination port of
7420 	 * IP and TCP or UDP headers of outer tunnel headers.
7421 	 * Note: For non-tunneled packets, this value is not applicable.
7422 	 * * 3: The RSS hash was computed over source IP address and
7423 	 * destination IP address of IP header of outer tunnel headers.
7424 	 * Note: For non-tunneled packets, this value is not applicable.
7425 	 *
7426 	 * Note that 4-tuples values listed above are applicable
7427 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
7428 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
7429 	 * enabled for TCP traffic only, then the values of tuple_extract_op
7430 	 * corresponding to 4-tuples are only valid for TCP traffic.
7431 	 */
7432 	uint8_t	rss_hash_type;
7433 	/*
7434 	 * This is the aggregation ID that the completion is associated
7435 	 * with. Use this number to correlate the TPA start completion
7436 	 * with the TPA end completion.
7437 	 */
7438 	uint16_t	agg_id;
7439 	/* unused2 is 9 b */
7440 	#define RX_TPA_START_CMPL_UNUSED2_MASK UINT32_C(0x1ff)
7441 	#define RX_TPA_START_CMPL_UNUSED2_SFT 0
7442 	/*
7443 	 * This is the aggregation ID that the completion is associated
7444 	 * with. Use this number to correlate the TPA start completion
7445 	 * with the TPA end completion.
7446 	 */
7447 	#define RX_TPA_START_CMPL_AGG_ID_MASK UINT32_C(0xfe00)
7448 	#define RX_TPA_START_CMPL_AGG_ID_SFT  9
7449 	/*
7450 	 * This value is the RSS hash value calculated for the packet
7451 	 * based on the mode bits and key value in the VNIC.
7452 	 */
7453 	uint32_t	rss_hash;
7454 } rx_tpa_start_cmpl_t, *prx_tpa_start_cmpl_t;
7455 
7456 /*
7457  * Last 16 bytes of rx_tpa_start_cmpl.
7458  *
7459  * This TPA completion structure is used on devices where the
7460  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7461  */
7462 /* rx_tpa_start_cmpl_hi (size:128b/16B) */
7463 
7464 typedef struct rx_tpa_start_cmpl_hi {
7465 	uint32_t	flags2;
7466 	/*
7467 	 * This indicates that the ip checksum was calculated for the
7468 	 * inner packet and that the sum passed for all segments
7469 	 * included in the aggregation.
7470 	 */
7471 	#define RX_TPA_START_CMPL_FLAGS2_IP_CS_CALC	UINT32_C(0x1)
7472 	/*
7473 	 * This indicates that the TCP, UDP or ICMP checksum was
7474 	 * calculated for the inner packet and that the sum passed
7475 	 * for all segments included in the aggregation.
7476 	 */
7477 	#define RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC	UINT32_C(0x2)
7478 	/*
7479 	 * This indicates that the ip checksum was calculated for the
7480 	 * tunnel header and that the sum passed for all segments
7481 	 * included in the aggregation.
7482 	 */
7483 	#define RX_TPA_START_CMPL_FLAGS2_T_IP_CS_CALC	UINT32_C(0x4)
7484 	/*
7485 	 * This indicates that the UDP checksum was
7486 	 * calculated for the tunnel packet and that the sum passed for
7487 	 * all segments included in the aggregation.
7488 	 */
7489 	#define RX_TPA_START_CMPL_FLAGS2_T_L4_CS_CALC	UINT32_C(0x8)
7490 	/* This value indicates what format the metadata field is. */
7491 	#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_MASK UINT32_C(0xf0)
7492 	#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_SFT  4
7493 	/* No metadata information. Value is zero. */
7494 		#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_NONE   (UINT32_C(0x0) << 4)
7495 	/*
7496 	 * The metadata field contains the VLAN tag and TPID value.
7497 	 * - metadata[11:0] contains the vlan VID value.
7498 	 * - metadata[12] contains the vlan DE value.
7499 	 * - metadata[15:13] contains the vlan PRI value.
7500 	 * - metadata[31:16] contains the vlan TPID value.
7501 	 */
7502 		#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN   (UINT32_C(0x1) << 4)
7503 		#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_LAST  RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN
7504 	/*
7505 	 * This field indicates the IP type for the inner-most IP header.
7506 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
7507 	 */
7508 	#define RX_TPA_START_CMPL_FLAGS2_IP_TYPE	UINT32_C(0x100)
7509 	/*
7510 	 * This is data from the CFA block as indicated by the meta_format
7511 	 * field.
7512 	 */
7513 	uint32_t	metadata;
7514 	/* When meta_format=1, this value is the VLAN VID. */
7515 	#define RX_TPA_START_CMPL_METADATA_VID_MASK UINT32_C(0xfff)
7516 	#define RX_TPA_START_CMPL_METADATA_VID_SFT  0
7517 	/* When meta_format=1, this value is the VLAN DE. */
7518 	#define RX_TPA_START_CMPL_METADATA_DE	UINT32_C(0x1000)
7519 	/* When meta_format=1, this value is the VLAN PRI. */
7520 	#define RX_TPA_START_CMPL_METADATA_PRI_MASK UINT32_C(0xe000)
7521 	#define RX_TPA_START_CMPL_METADATA_PRI_SFT  13
7522 	/* When meta_format=1, this value is the VLAN TPID. */
7523 	#define RX_TPA_START_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000)
7524 	#define RX_TPA_START_CMPL_METADATA_TPID_SFT 16
7525 	uint16_t	v2;
7526 	/*
7527 	 * This value is written by the NIC such that it will be different
7528 	 * for each pass through the completion queue. The even passes
7529 	 * will write 1. The odd passes will write 0.
7530 	 */
7531 	#define RX_TPA_START_CMPL_V2	UINT32_C(0x1)
7532 	/*
7533 	 * This field identifies the CFA action rule that was used for this
7534 	 * packet.
7535 	 */
7536 	uint16_t	cfa_code;
7537 	/*
7538 	 * This is the size in bytes of the inner most L4 header.
7539 	 * This can be subtracted from the payload_offset to determine
7540 	 * the start of the inner most L4 header.
7541 	 */
7542 	uint32_t	inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset;
7543 	/*
7544 	 * This is the offset from the beginning of the packet in bytes for
7545 	 * the outer L3 header. If there is no outer L3 header, then this
7546 	 * value is zero.
7547 	 */
7548 	#define RX_TPA_START_CMPL_OUTER_L3_OFFSET_MASK UINT32_C(0x1ff)
7549 	#define RX_TPA_START_CMPL_OUTER_L3_OFFSET_SFT 0
7550 	/*
7551 	 * This is the offset from the beginning of the packet in bytes for
7552 	 * the inner most L2 header.
7553 	 */
7554 	#define RX_TPA_START_CMPL_INNER_L2_OFFSET_MASK UINT32_C(0x3fe00)
7555 	#define RX_TPA_START_CMPL_INNER_L2_OFFSET_SFT 9
7556 	/*
7557 	 * This is the offset from the beginning of the packet in bytes for
7558 	 * the inner most L3 header.
7559 	 */
7560 	#define RX_TPA_START_CMPL_INNER_L3_OFFSET_MASK UINT32_C(0x7fc0000)
7561 	#define RX_TPA_START_CMPL_INNER_L3_OFFSET_SFT 18
7562 	/*
7563 	 * This is the size in bytes of the inner most L4 header.
7564 	 * This can be subtracted from the payload_offset to determine
7565 	 * the start of the inner most L4 header.
7566 	 */
7567 	#define RX_TPA_START_CMPL_INNER_L4_SIZE_MASK  UINT32_C(0xf8000000)
7568 	#define RX_TPA_START_CMPL_INNER_L4_SIZE_SFT   27
7569 } rx_tpa_start_cmpl_hi_t, *prx_tpa_start_cmpl_hi_t;
7570 
7571 /*
7572  * This TPA completion structure is used on devices where the
7573  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7574  * RX L2 TPA Start V2 Completion Record (32 bytes split to 2 16-byte
7575  * struct)
7576  */
7577 /* rx_tpa_start_v2_cmpl (size:128b/16B) */
7578 
7579 typedef struct rx_tpa_start_v2_cmpl {
7580 	uint16_t	flags_type;
7581 	/*
7582 	 * This field indicates the exact type of the completion.
7583 	 * By convention, the LSB identifies the length of the
7584 	 * record in 16B units. Even values indicate 16B
7585 	 * records. Odd values indicate 32B
7586 	 * records.
7587 	 */
7588 	#define RX_TPA_START_V2_CMPL_TYPE_MASK			UINT32_C(0x3f)
7589 	#define RX_TPA_START_V2_CMPL_TYPE_SFT			0
7590 	/*
7591 	 * RX L2 TPA Start V2 Completion:
7592 	 * Completion at the beginning of a TPA operation.
7593 	 * Length = 32B
7594 	 * This is the new version of the RX_TPA_START completion used
7595 	 * in SR2 and later chips.
7596 	 */
7597 		#define RX_TPA_START_V2_CMPL_TYPE_RX_TPA_START_V2		UINT32_C(0xd)
7598 		#define RX_TPA_START_V2_CMPL_TYPE_LAST			RX_TPA_START_V2_CMPL_TYPE_RX_TPA_START_V2
7599 	#define RX_TPA_START_V2_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
7600 	#define RX_TPA_START_V2_CMPL_FLAGS_SFT			6
7601 	/*
7602 	 * When this bit is '1', it indicates a packet that has an error
7603 	 * of some type. Type of error is indicated in error_flags.
7604 	 */
7605 	#define RX_TPA_START_V2_CMPL_FLAGS_ERROR			UINT32_C(0x40)
7606 	/* This field indicates how the packet was placed in the buffer. */
7607 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
7608 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_SFT		7
7609 	/*
7610 	 * Jumbo:
7611 	 * TPA Packet was placed using jumbo algorithm. This means
7612 	 * that the first buffer will be filled with data before
7613 	 * moving to aggregation buffers. Each aggregation buffer
7614 	 * will be filled before moving to the next aggregation
7615 	 * buffer.
7616 	 */
7617 		#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
7618 	/*
7619 	 * Header/Data Separation:
7620 	 * Packet was placed using Header/Data separation algorithm.
7621 	 * The separation location is indicated by the itype field.
7622 	 */
7623 		#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
7624 	/*
7625 	 * IOC/Jumbo:
7626 	 * Packet will be placed using In-Order Completion/Jumbo where
7627 	 * the first packet of the aggregation is placed using Jumbo
7628 	 * Placement. Subsequent packets will be placed such that each
7629 	 * packet starts at the beginning of an aggregation buffer.
7630 	 */
7631 		#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_IOC_JUMBO	(UINT32_C(0x4) << 7)
7632 	/*
7633 	 * GRO/Jumbo:
7634 	 * Packet will be placed using GRO/Jumbo where the first
7635 	 * packet is filled with data. Subsequent packets will be
7636 	 * placed such that any one packet does not span two
7637 	 * aggregation buffers unless it starts at the beginning of
7638 	 * an aggregation buffer.
7639 	 */
7640 		#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_GRO_JUMBO	(UINT32_C(0x5) << 7)
7641 	/*
7642 	 * GRO/Header-Data Separation:
7643 	 * Packet will be placed using GRO/HDS where the header
7644 	 * is in the first packet.
7645 	 * Payload of each packet will be
7646 	 * placed such that any one packet does not span two
7647 	 * aggregation buffers unless it starts at the beginning of
7648 	 * an aggregation buffer.
7649 	 */
7650 		#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_GRO_HDS	(UINT32_C(0x6) << 7)
7651 	/*
7652 	 * IOC/Header-Data Separation:
7653 	 * Packet will be placed using In-Order Completion/HDS where
7654 	 * the header is in the first packet buffer. Payload of each
7655 	 * packet will be placed such that each packet starts at the
7656 	 * beginning of an aggregation buffer.
7657 	 */
7658 		#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_IOC_HDS	(UINT32_C(0x7) << 7)
7659 		#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_LAST		RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_IOC_HDS
7660 	/* This bit is '1' if the RSS field in this completion is valid. */
7661 	#define RX_TPA_START_V2_CMPL_FLAGS_RSS_VALID		UINT32_C(0x400)
7662 	/*
7663 	 * This bit is '1' if metadata has been added to the end of the
7664 	 * packet in host memory. Metadata starts at the first 32B boundary
7665 	 * after the end of the packet for regular and jumbo placement. It
7666 	 * starts at the first 32B boundary after the end of the header for
7667 	 * HDS placement. The length of the metadata is indicated in the
7668 	 * metadata itself.
7669 	 */
7670 	#define RX_TPA_START_V2_CMPL_FLAGS_PKT_METADATA_PRESENT	UINT32_C(0x800)
7671 	/*
7672 	 * This value indicates what the inner packet determined for the
7673 	 * packet was.
7674 	 */
7675 	#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
7676 	#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_SFT		12
7677 	/*
7678 	 * TCP Packet:
7679 	 * Indicates that the packet was IP and TCP.
7680 	 */
7681 		#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
7682 		#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_LAST		RX_TPA_START_V2_CMPL_FLAGS_ITYPE_TCP
7683 	/*
7684 	 * This value indicates the amount of packet data written to the
7685 	 * buffer the opaque field in this completion corresponds to.
7686 	 */
7687 	uint16_t	len;
7688 	/*
7689 	 * This is a copy of the opaque field from the RX BD this completion
7690 	 * corresponds to. If the VNIC is configured to not use an Rx BD for
7691 	 * the TPA Start completion, then this is a copy of the opaque field
7692 	 * from the first BD used to place the TPA Start packet.
7693 	 */
7694 	uint32_t	opaque;
7695 	/*
7696 	 * This value is written by the NIC such that it will be different
7697 	 * for each pass through the completion queue. The even passes
7698 	 * will write 1. The odd passes will write 0.
7699 	 */
7700 	uint8_t	v1;
7701 	/*
7702 	 * This value is written by the NIC such that it will be different
7703 	 * for each pass through the completion queue. The even passes
7704 	 * will write 1. The odd passes will write 0.
7705 	 */
7706 	#define RX_TPA_START_V2_CMPL_V1 UINT32_C(0x1)
7707 	#define RX_TPA_START_V2_CMPL_LAST RX_TPA_START_V2_CMPL_V1
7708 	/*
7709 	 * This is the RSS hash type for the packet. The value is packed
7710 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
7711 	 *
7712 	 * The value of tuple_extrac_op provides the information about
7713 	 * what fields the hash was computed on.
7714 	 * * 0: The RSS hash was computed over source IP address,
7715 	 * destination IP address, source port, and destination port of inner
7716 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
7717 	 * the packet headers are considered inner packet headers for the RSS
7718 	 * hash computation purpose.
7719 	 * * 1: The RSS hash was computed over source IP address and destination
7720 	 * IP address of inner IP header. Note: For non-tunneled packets,
7721 	 * the packet headers are considered inner packet headers for the RSS
7722 	 * hash computation purpose.
7723 	 * * 2: The RSS hash was computed over source IP address,
7724 	 * destination IP address, source port, and destination port of
7725 	 * IP and TCP or UDP headers of outer tunnel headers.
7726 	 * Note: For non-tunneled packets, this value is not applicable.
7727 	 * * 3: The RSS hash was computed over source IP address and
7728 	 * destination IP address of IP header of outer tunnel headers.
7729 	 * Note: For non-tunneled packets, this value is not applicable.
7730 	 *
7731 	 * Note that 4-tuples values listed above are applicable
7732 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
7733 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
7734 	 * enabled for TCP traffic only, then the values of tuple_extract_op
7735 	 * corresponding to 4-tuples are only valid for TCP traffic.
7736 	 */
7737 	uint8_t	rss_hash_type;
7738 	/*
7739 	 * This is the aggregation ID that the completion is associated
7740 	 * with. Use this number to correlate the TPA start completion
7741 	 * with the TPA end completion.
7742 	 */
7743 	uint16_t	agg_id;
7744 	/*
7745 	 * This is the aggregation ID that the completion is associated
7746 	 * with. Use this number to correlate the TPA start completion
7747 	 * with the TPA end completion.
7748 	 */
7749 	#define RX_TPA_START_V2_CMPL_AGG_ID_MASK		UINT32_C(0xfff)
7750 	#define RX_TPA_START_V2_CMPL_AGG_ID_SFT		0
7751 	#define RX_TPA_START_V2_CMPL_METADATA1_MASK		UINT32_C(0xf000)
7752 	#define RX_TPA_START_V2_CMPL_METADATA1_SFT		12
7753 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
7754 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_MASK	UINT32_C(0x7000)
7755 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_SFT	12
7756 	/* 0x88a8 */
7757 		#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID88A8   (UINT32_C(0x0) << 12)
7758 	/* 0x8100 */
7759 		#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID8100   (UINT32_C(0x1) << 12)
7760 	/* 0x9100 */
7761 		#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9100   (UINT32_C(0x2) << 12)
7762 	/* 0x9200 */
7763 		#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9200   (UINT32_C(0x3) << 12)
7764 	/* 0x9300 */
7765 		#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9300   (UINT32_C(0x4) << 12)
7766 	/* Value programmed in CFA VLANTPID register. */
7767 		#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 12)
7768 		#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_LAST	RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG
7769 	/* When meta_format != 0, this value is the VLAN valid. */
7770 	#define RX_TPA_START_V2_CMPL_METADATA1_VALID		UINT32_C(0x8000)
7771 	/*
7772 	 * This value is the RSS hash value calculated for the packet
7773 	 * based on the mode bits and key value in the VNIC.
7774 	 * When vee_cmpl_mode is set in VNIC context, this is the lower
7775 	 * 32b of the host address from the first BD used to place the packet.
7776 	 */
7777 	uint32_t	rss_hash;
7778 } rx_tpa_start_v2_cmpl_t, *prx_tpa_start_v2_cmpl_t;
7779 
7780 /*
7781  * Last 16 bytes of RX L2 TPA Start V2 Completion Record
7782  *
7783  * This TPA completion structure is used on devices where the
7784  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7785  */
7786 /* rx_tpa_start_v2_cmpl_hi (size:128b/16B) */
7787 
7788 typedef struct rx_tpa_start_v2_cmpl_hi {
7789 	uint32_t	flags2;
7790 	/* This indicates that the aggregation was done using GRO rules. */
7791 	#define RX_TPA_START_V2_CMPL_FLAGS2_AGG_GRO			UINT32_C(0x4)
7792 	/*
7793 	 * When this bit is '0', the cs_ok field has the following definition:-
7794 	 * ip_cs_ok[2:0] = The number of header groups with a valid IP checksum
7795 	 * in the delivered packet, counted from the outer-most header group to
7796 	 * the inner-most header group, stopping at the first error. -
7797 	 * l4_cs_ok[5:3] = The number of header groups with a valid L4 checksum
7798 	 * in the delivered packet, counted from the outer-most header group to
7799 	 * the inner-most header group, stopping at the first error. When this
7800 	 * bit is '1', the cs_ok field has the following definition: -
7801 	 * hdr_cnt[2:0] = The number of header groups that were parsed by the
7802 	 * chip and passed in the delivered packet. - ip_cs_all_ok[3] =This bit
7803 	 * will be '1' if all the parsed header groups with an IP checksum are
7804 	 * valid. - l4_cs_all_ok[4] = This bit will be '1' if all the parsed
7805 	 * header groups with an L4 checksum are valid.
7806 	 */
7807 	#define RX_TPA_START_V2_CMPL_FLAGS2_CS_ALL_OK_MODE		UINT32_C(0x8)
7808 	/* This value indicates what format the metadata field is. */
7809 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
7810 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_SFT		4
7811 	/* There is no metadata information. Values are zero. */
7812 		#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
7813 	/*
7814 	 * The {metadata1, metadata0} fields contain the vtag
7815 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
7816 	 * de, vid[11:0]} The metadata2 field contains the table scope
7817 	 * and action record pointer. - metadata2[25:0] contains the
7818 	 * action record pointer. - metadata2[31:26] contains the table
7819 	 * scope.
7820 	 */
7821 		#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_ACT_REC_PTR	(UINT32_C(0x1) << 4)
7822 	/*
7823 	 * The {metadata1, metadata0} fields contain the vtag
7824 	 * information:
7825 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
7826 	 * The metadata2 field contains the Tunnel ID
7827 	 * value, justified to LSB.
7828 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
7829 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
7830 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
7831 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
7832 	 * - IPv4 = 0 (not populated)
7833 	 * - IPv6 = Flow Label[19:0]
7834 	 * - PPPoE = sessionID[15:0]
7835 	 * - MPLs = Outer label[19:0]
7836 	 * - UPAR = Selected[31:0] with bit mask
7837 	 */
7838 		#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
7839 	/*
7840 	 * The {metadata1, metadata0} fields contain the vtag
7841 	 * information:
7842 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
7843 	 * The metadata2 field contains the 32b metadata from the prepended
7844 	 * header (chdr_data).
7845 	 */
7846 		#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
7847 	/*
7848 	 * The {metadata1, metadata0} fields contain the vtag
7849 	 * information:
7850 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
7851 	 * The metadata2 field contains the outer_l3_offset,
7852 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
7853 	 * - metadata2[8:0] contains the outer_l3_offset.
7854 	 * - metadata2[17:9] contains the inner_l2_offset.
7855 	 * - metadata2[26:18] contains the inner_l3_offset.
7856 	 * - metadata2[31:27] contains the inner_l4_size.
7857 	 */
7858 		#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
7859 		#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_LAST		RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
7860 	/*
7861 	 * This field indicates the IP type for the inner-most IP header.
7862 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
7863 	 * This value is only valid if itype indicates a packet
7864 	 * with an IP header.
7865 	 */
7866 	#define RX_TPA_START_V2_CMPL_FLAGS2_IP_TYPE			UINT32_C(0x100)
7867 	/*
7868 	 * This indicates that the complete 1's complement checksum was
7869 	 * calculated for the packet in the aggregation.
7870 	 */
7871 	#define RX_TPA_START_V2_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
7872 	/*
7873 	 * This field indicates the status of IP and L4 CS calculations done
7874 	 * by the chip. The format of this field is indicated by the
7875 	 * cs_all_ok_mode bit.
7876 	 * CS status for TPA packets is always valid. This means that "all_ok"
7877 	 * status will always be set. The ok count status will be set
7878 	 * appropriately for the packet header, such that all existing CS
7879 	 * values are ok.
7880 	 */
7881 	#define RX_TPA_START_V2_CMPL_FLAGS2_CS_OK_MASK		UINT32_C(0xfc00)
7882 	#define RX_TPA_START_V2_CMPL_FLAGS2_CS_OK_SFT		10
7883 	/*
7884 	 * This value is the complete 1's complement checksum calculated from
7885 	 * the start of the outer L3 header to the end of the packet (not
7886 	 * including the ethernet crc). It is valid when the
7887 	 * 'complete_checksum_calc' flag is set. For TPA Start completions,
7888 	 * the complete checksum is calculated for the first packet in the
7889 	 * aggregation only.
7890 	 */
7891 	#define RX_TPA_START_V2_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
7892 	#define RX_TPA_START_V2_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT	16
7893 	/*
7894 	 * This is data from the CFA block as indicated by the meta_format
7895 	 * field.
7896 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
7897 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
7898 	 *   act_rec_ptr[25:0]}
7899 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
7900 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
7901 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
7902 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
7903 	 * of the host address from the first BD used to place the packet.
7904 	 */
7905 	uint32_t	metadata2;
7906 	uint16_t	errors_v2;
7907 	/*
7908 	 * This value is written by the NIC such that it will be different
7909 	 * for each pass through the completion queue. The even passes
7910 	 * will write 1. The odd passes will write 0.
7911 	 */
7912 	#define RX_TPA_START_V2_CMPL_V2				UINT32_C(0x1)
7913 	#define RX_TPA_START_V2_CMPL_ERRORS_MASK			UINT32_C(0xfffe)
7914 	#define RX_TPA_START_V2_CMPL_ERRORS_SFT			1
7915 	/*
7916 	 * This error indicates that there was some sort of problem with
7917 	 * the BDs for the packetThe packet should be treated as
7918 	 * invalid.
7919 	 */
7920 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_MASK	UINT32_C(0xe)
7921 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_SFT	1
7922 	/* No buffer error */
7923 		#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER	(UINT32_C(0x0) << 1)
7924 	/*
7925 	 * Did Not Fit:
7926 	 * Packet did not fit into packet buffer provided. This means
7927 	 * that the TPA Start packet was too big to be placed into the
7928 	 * per-packet maximum number of physical buffers configured for
7929 	 * the VNIC, or that it was too big to be placed into the
7930 	 * per-aggregation maximum number of physical buffers configured
7931 	 * for the VNIC. This error only occurs when the VNIC is
7932 	 * configured for variable size receive buffers.
7933 	 */
7934 		#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT   (UINT32_C(0x1) << 1)
7935 	/*
7936 	 * Bad Format:
7937 	 * BDs were not formatted correctly.
7938 	 */
7939 		#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT	(UINT32_C(0x3) << 1)
7940 	/*
7941 	 * Flush:
7942 	 * There was a bad_format error on the previous operation
7943 	 */
7944 		#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_FLUSH	(UINT32_C(0x5) << 1)
7945 		#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_LAST	RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_FLUSH
7946 	/*
7947 	 * This is data from the CFA block as indicated by the meta_format
7948 	 * field.
7949 	 */
7950 	uint16_t	metadata0;
7951 	/* When meta_format != 0, this value is the VLAN VID. */
7952 	#define RX_TPA_START_V2_CMPL_METADATA0_VID_MASK UINT32_C(0xfff)
7953 	#define RX_TPA_START_V2_CMPL_METADATA0_VID_SFT 0
7954 	/* When meta_format != 0, this value is the VLAN DE. */
7955 	#define RX_TPA_START_V2_CMPL_METADATA0_DE	UINT32_C(0x1000)
7956 	/* When meta_format != 0, this value is the VLAN PRI. */
7957 	#define RX_TPA_START_V2_CMPL_METADATA0_PRI_MASK UINT32_C(0xe000)
7958 	#define RX_TPA_START_V2_CMPL_METADATA0_PRI_SFT 13
7959 	/*
7960 	 * This field contains the outer_l3_offset, inner_l2_offset,
7961 	 * inner_l3_offset, and inner_l4_size.
7962 	 *
7963 	 * hdr_offsets[8:0] contains the outer_l3_offset.
7964 	 * hdr_offsets[17:9] contains the inner_l2_offset.
7965 	 * hdr_offsets[26:18] contains the inner_l3_offset.
7966 	 * hdr_offsets[31:27] contains the inner_l4_size.
7967 	 */
7968 	uint32_t	hdr_offsets;
7969 } rx_tpa_start_v2_cmpl_hi_t, *prx_tpa_start_v2_cmpl_hi_t;
7970 
7971 /*
7972  * This TPA completion structure is used on devices where the
7973  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7974  * RX L2 TPA Start V3 Completion Record (32 bytes split to 2 16-byte
7975  * struct)
7976  */
7977 /* rx_tpa_start_v3_cmpl (size:128b/16B) */
7978 
7979 typedef struct rx_tpa_start_v3_cmpl {
7980 	uint16_t	flags_type;
7981 	/*
7982 	 * This field indicates the exact type of the completion.
7983 	 * By convention, the LSB identifies the length of the
7984 	 * record in 16B units. Even values indicate 16B
7985 	 * records. Odd values indicate 32B
7986 	 * records.
7987 	 */
7988 	#define RX_TPA_START_V3_CMPL_TYPE_MASK			UINT32_C(0x3f)
7989 	#define RX_TPA_START_V3_CMPL_TYPE_SFT			0
7990 	/*
7991 	 * RX L2 TPA Start V3 completion:
7992 	 * Completion at the beginning of a TPA operation.
7993 	 * Length = 32B
7994 	 * This is the new version of the RX_TPA_START completion used
7995 	 * in Thor2 and later chips.
7996 	 */
7997 		#define RX_TPA_START_V3_CMPL_TYPE_RX_TPA_START_V3		UINT32_C(0x19)
7998 		#define RX_TPA_START_V3_CMPL_TYPE_LAST			RX_TPA_START_V3_CMPL_TYPE_RX_TPA_START_V3
7999 	#define RX_TPA_START_V3_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
8000 	#define RX_TPA_START_V3_CMPL_FLAGS_SFT			6
8001 	/*
8002 	 * When this bit is '1', it indicates a packet that has an error
8003 	 * of some type. Type of error is indicated in error_flags.
8004 	 */
8005 	#define RX_TPA_START_V3_CMPL_FLAGS_ERROR			UINT32_C(0x40)
8006 	/* This field indicates how the packet was placed in the buffer. */
8007 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
8008 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_SFT		7
8009 	/*
8010 	 * Jumbo:
8011 	 * TPA Packet was placed using jumbo algorithm. This means
8012 	 * that the first buffer will be filled with data before
8013 	 * moving to aggregation buffers. Each aggregation buffer
8014 	 * will be filled before moving to the next aggregation
8015 	 * buffer.
8016 	 */
8017 		#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
8018 	/*
8019 	 * Header/Data Separation:
8020 	 * Packet was placed using Header/Data separation algorithm.
8021 	 * The separation location is indicated by the itype field.
8022 	 */
8023 		#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
8024 	/*
8025 	 * IOC/Jumbo:
8026 	 * Packet will be placed using In-Order Completion/Jumbo where
8027 	 * the first packet of the aggregation is placed using Jumbo
8028 	 * Placement. Subsequent packets will be placed such that each
8029 	 * packet starts at the beginning of an aggregation buffer.
8030 	 */
8031 		#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_IOC_JUMBO	(UINT32_C(0x4) << 7)
8032 	/*
8033 	 * GRO/Jumbo:
8034 	 * Packet will be placed using GRO/Jumbo where the first
8035 	 * packet is filled with data. Subsequent packets will be
8036 	 * placed such that any one packet does not span two
8037 	 * aggregation buffers unless it starts at the beginning of
8038 	 * an aggregation buffer.
8039 	 */
8040 		#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_GRO_JUMBO	(UINT32_C(0x5) << 7)
8041 	/*
8042 	 * GRO/Header-Data Separation:
8043 	 * Packet will be placed using GRO/HDS where the header
8044 	 * is in the first packet.
8045 	 * Payload of each packet will be
8046 	 * placed such that any one packet does not span two
8047 	 * aggregation buffers unless it starts at the beginning of
8048 	 * an aggregation buffer.
8049 	 */
8050 		#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_GRO_HDS	(UINT32_C(0x6) << 7)
8051 	/*
8052 	 * IOC/Header-Data Separation:
8053 	 * Packet will be placed using In-Order Completion/HDS where
8054 	 * the header is in the first packet buffer. Payload of each
8055 	 * packet will be placed such that each packet starts at the
8056 	 * beginning of an aggregation buffer.
8057 	 */
8058 		#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_IOC_HDS	(UINT32_C(0x7) << 7)
8059 		#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_LAST		RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_IOC_HDS
8060 	/* This bit is '1' if the RSS field in this completion is valid. */
8061 	#define RX_TPA_START_V3_CMPL_FLAGS_RSS_VALID		UINT32_C(0x400)
8062 	/*
8063 	 * This bit is '1' if metadata has been added to the end of the
8064 	 * packet in host memory. Metadata starts at the first 32B boundary
8065 	 * after the end of the packet for regular and jumbo placement. It
8066 	 * starts at the first 32B boundary after the end of the header for
8067 	 * HDS placement. The length of the metadata is indicated in the
8068 	 * metadata itself.
8069 	 */
8070 	#define RX_TPA_START_V3_CMPL_FLAGS_PKT_METADATA_PRESENT	UINT32_C(0x800)
8071 	/*
8072 	 * This value indicates what the inner packet determined for the
8073 	 * packet was.
8074 	 */
8075 	#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
8076 	#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_SFT		12
8077 	/*
8078 	 * TCP Packet:
8079 	 * Indicates that the packet was IP and TCP.
8080 	 */
8081 		#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
8082 		#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_LAST		RX_TPA_START_V3_CMPL_FLAGS_ITYPE_TCP
8083 	/*
8084 	 * This value indicates the amount of packet data written to the
8085 	 * buffer the opaque field in this completion corresponds to.
8086 	 */
8087 	uint16_t	len;
8088 	/*
8089 	 * This is a copy of the opaque field from the RX BD this completion
8090 	 * corresponds to. If the VNIC is configured to not use an Rx BD for
8091 	 * the TPA Start completion, then this is a copy of the opaque field
8092 	 * from the first BD used to place the TPA Start packet.
8093 	 */
8094 	uint32_t	opaque;
8095 	uint16_t	rss_hash_type_v1;
8096 	/*
8097 	 * This value is written by the NIC such that it will be different
8098 	 * for each pass through the completion queue. The even passes
8099 	 * will write 1. The odd passes will write 0.
8100 	 */
8101 	#define RX_TPA_START_V3_CMPL_V1		UINT32_C(0x1)
8102 	/* unused1 is 6 b. */
8103 	#define RX_TPA_START_V3_CMPL_UNUSED1_MASK	UINT32_C(0x7e)
8104 	#define RX_TPA_START_V3_CMPL_UNUSED1_SFT	1
8105 	/*
8106 	 * This is the RSS hash type for the packet. The value is packed
8107 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
8108 	 *
8109 	 * The value of tuple_extrac_op provides the information about
8110 	 * what fields the hash was computed on.
8111 	 * * 0: The RSS hash was computed over source IP address,
8112 	 * destination IP address, source port, and destination port of inner
8113 	 * IP and TCP or UDP headers.
8114 	 * * 1: The RSS hash was computed over source IP address and
8115 	 * destination IP address of inner IP header.
8116 	 * * 2: The RSS hash was computed over source IP address,
8117 	 * destination IP address, source port, and destination port of
8118 	 * IP and TCP or UDP headers of outer tunnel headers.
8119 	 * Note: For non-tunneled packets, this value is not applicable.
8120 	 * * 3: The RSS hash was computed over source IP address and
8121 	 * destination IP address of IP header of outer tunnel headers.
8122 	 * Note: For non-tunneled packets, this value is not applicable.
8123 	 * * 4: The RSS hash was computed over source IP address of the inner
8124 	 * IP header.
8125 	 * * 5: The RSS hash was computed over destination IP address of the
8126 	 * inner IP header.
8127 	 * * 6: The RSS hash was computed over source IP address of the outer
8128 	 * IP header. Note: For non-tunneled packets, this value is not
8129 	 * applicable
8130 	 * * 7: The RSS hash was computed over destination IP address of the
8131 	 * outer IP header.
8132 	 * Note: For non-tunneled packets, this value is not applicable.
8133 	 * * 8: The RSS hash was computed over source IP address, destination
8134 	 * IP address, and flow label of the inner IP header.
8135 	 * Note: For packets without an inner IPv6 header, this value is not
8136 	 * applicable.
8137 	 * * 9: The RSS hash was computed over the flow label of the inner
8138 	 * IP header.
8139 	 * Note: For packets without an inner IPv6 header, this value
8140 	 * is not applicable.
8141 	 * * 10: The RSS hash was computed over source IP address, destination
8142 	 * IP address, and flow label of the outer IP header.
8143 	 * Note: For packets without an outer IPv6 header, this value is not
8144 	 * applicable.
8145 	 * * 11: The RSS hash was computed over the flow label of the outer
8146 	 * IP header. Note: For packets without an outer IPv6 header, this
8147 	 * value is not applicable.
8148 	 *
8149 	 * Note that 4-tuples values listed above are applicable
8150 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
8151 	 * HWRM firmware, and drivers. For example, if RSS hash is supported
8152 	 * and enabled for TCP traffic only, then the values of
8153 	 * tuple_extract_op corresponding to 4-tuples are only valid for TCP
8154 	 * traffic
8155 	 */
8156 	#define RX_TPA_START_V3_CMPL_RSS_HASH_TYPE_MASK UINT32_C(0xff80)
8157 	#define RX_TPA_START_V3_CMPL_RSS_HASH_TYPE_SFT 7
8158 	/*
8159 	 * This is the aggregation ID that the completion is associated
8160 	 * with. Use this number to correlate the TPA start completion
8161 	 * with the TPA end completion.
8162 	 */
8163 	uint16_t	agg_id;
8164 	/*
8165 	 * This is the aggregation ID that the completion is associated
8166 	 * with. Use this number to correlate the TPA start completion
8167 	 * with the TPA end completion.
8168 	 */
8169 	#define RX_TPA_START_V3_CMPL_AGG_ID_MASK		UINT32_C(0xfff)
8170 	#define RX_TPA_START_V3_CMPL_AGG_ID_SFT		0
8171 	#define RX_TPA_START_V3_CMPL_METADATA1_MASK		UINT32_C(0xf000)
8172 	#define RX_TPA_START_V3_CMPL_METADATA1_SFT		12
8173 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
8174 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_MASK	UINT32_C(0x7000)
8175 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_SFT	12
8176 	/* 0x88a8 */
8177 		#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID88A8   (UINT32_C(0x0) << 12)
8178 	/* 0x8100 */
8179 		#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID8100   (UINT32_C(0x1) << 12)
8180 	/* 0x9100 */
8181 		#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID9100   (UINT32_C(0x2) << 12)
8182 	/* 0x9200 */
8183 		#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID9200   (UINT32_C(0x3) << 12)
8184 	/* 0x9300 */
8185 		#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID9300   (UINT32_C(0x4) << 12)
8186 	/* Value programmed in CFA VLANTPID register. */
8187 		#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 12)
8188 		#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_LAST	RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG
8189 	/* When meta_format != 0, this value is the VLAN valid. */
8190 	#define RX_TPA_START_V3_CMPL_METADATA1_VALID		UINT32_C(0x8000)
8191 	/*
8192 	 * This value is the RSS hash value calculated for the packet
8193 	 * based on the mode bits and key value in the VNIC.
8194 	 * When vee_cmpl_mode is set in VNIC context, this is the lower
8195 	 * 32b of the host address from the first BD used to place the packet.
8196 	 */
8197 	uint32_t	rss_hash;
8198 } rx_tpa_start_v3_cmpl_t, *prx_tpa_start_v3_cmpl_t;
8199 
8200 /*
8201  * Last 16 bytes of RX L2 TPA Start V3 Completion Record
8202  *
8203  * This TPA completion structure is used on devices where the
8204  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
8205  */
8206 /* rx_tpa_start_v3_cmpl_hi (size:128b/16B) */
8207 
8208 typedef struct rx_tpa_start_v3_cmpl_hi {
8209 	uint32_t	flags2;
8210 	/*
8211 	 * This indicates that the ip checksum was calculated for the inner
8212 	 * packet and that the ip_cs_error field indicates if there was an
8213 	 * error.
8214 	 */
8215 	#define RX_TPA_START_V3_CMPL_FLAGS2_IP_CS_CALC		UINT32_C(0x1)
8216 	/*
8217 	 * This indicates that the TCP, UDP or ICMP checksum was calculated
8218 	 * for the inner packet and that the l4_cs_error field indicates if
8219 	 * there was an error.
8220 	 */
8221 	#define RX_TPA_START_V3_CMPL_FLAGS2_L4_CS_CALC		UINT32_C(0x2)
8222 	/*
8223 	 * This indicates that the ip checksum was calculated for the tunnel
8224 	 * header and that the t_ip_cs_error field indicates if there was an
8225 	 * error.
8226 	 */
8227 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_CS_CALC		UINT32_C(0x4)
8228 	/*
8229 	 * This indicates that the UDP checksum was calculated for the tunnel
8230 	 * packet and that the t_l4_cs_error field indicates if there was an
8231 	 * error.
8232 	 */
8233 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_L4_CS_CALC		UINT32_C(0x8)
8234 	/* This value indicates what format the metadata field is. */
8235 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
8236 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_SFT		4
8237 	/* There is no metadata information. Values are zero. */
8238 		#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
8239 	/*
8240 	 * The {metadata1, metadata0} fields contain the vtag
8241 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
8242 	 * de, vid[11:0]} The metadata2 field contains the table scope
8243 	 * and action record pointer. - metadata2[25:0] contains the
8244 	 * action record pointer. - metadata2[31:26] contains the table
8245 	 * scope.
8246 	 */
8247 		#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_ACT_REC_PTR	(UINT32_C(0x1) << 4)
8248 	/*
8249 	 * The {metadata1, metadata0} fields contain the vtag
8250 	 * information:
8251 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
8252 	 * The metadata2 field contains the Tunnel ID
8253 	 * value, justified to LSB.
8254 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
8255 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
8256 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
8257 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
8258 	 * - IPv4 = 0 (not populated)
8259 	 * - IPv6 = Flow Label[19:0]
8260 	 * - PPPoE = sessionID[15:0]
8261 	 * - MPLs = Outer label[19:0]
8262 	 * - UPAR = Selected[31:0] with bit mask
8263 	 */
8264 		#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
8265 	/*
8266 	 * The {metadata1, metadata0} fields contain the vtag
8267 	 * information:
8268 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
8269 	 * The metadata2 field contains the 32b metadata from the prepended
8270 	 * header (chdr_data).
8271 	 */
8272 		#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
8273 	/*
8274 	 * The {metadata1, metadata0} fields contain the vtag
8275 	 * information:
8276 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
8277 	 * The metadata2 field contains the outer_l3_offset,
8278 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
8279 	 * - metadata2[8:0] contains the outer_l3_offset.
8280 	 * - metadata2[17:9] contains the inner_l2_offset.
8281 	 * - metadata2[26:18] contains the inner_l3_offset.
8282 	 * - metadata2[31:27] contains the inner_l4_size.
8283 	 */
8284 		#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
8285 		#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_LAST		RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
8286 	/*
8287 	 * This field indicates the IP type for the inner-most IP header.
8288 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
8289 	 * This value is only valid if itype indicates a packet
8290 	 * with an IP header.
8291 	 */
8292 	#define RX_TPA_START_V3_CMPL_FLAGS2_IP_TYPE			UINT32_C(0x100)
8293 	/*
8294 	 * This indicates that the complete 1's complement checksum was
8295 	 * calculated for the packet.
8296 	 */
8297 	#define RX_TPA_START_V3_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
8298 	/*
8299 	 * This field indicates the status of IP and L4 CS calculations done
8300 	 * by the chip. The format of this field is indicated by the
8301 	 * cs_all_ok_mode bit.
8302 	 */
8303 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE		UINT32_C(0x400)
8304 	/* Indicates that the Tunnel IP type was IPv4 */
8305 		#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_IPV4		(UINT32_C(0x0) << 10)
8306 	/* Indicates that the Tunnel IP type was IPv6 */
8307 		#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_IPV6		(UINT32_C(0x1) << 10)
8308 		#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_LAST		RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_IPV6
8309 	/* This indicates that the aggregation was done using GRO rules. */
8310 	#define RX_TPA_START_V3_CMPL_FLAGS2_AGG_GRO			UINT32_C(0x800)
8311 	/*
8312 	 * This value is the complete 1's complement checksum calculated from
8313 	 * the start of the outer L3 header to the end of the packet (not
8314 	 * including the ethernet crc). It is valid when the
8315 	 * 'complete_checksum_calc' flag is set. For TPA Start completions,
8316 	 * the complete checksum is calculated for the first packet in the
8317 	 * aggregation only.
8318 	 */
8319 	#define RX_TPA_START_V3_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
8320 	#define RX_TPA_START_V3_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT	16
8321 	/*
8322 	 * This is data from the CFA block as indicated by the meta_format
8323 	 * field.
8324 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
8325 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
8326 	 *   act_rec_ptr[25:0]}
8327 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
8328 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
8329 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
8330 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
8331 	 * of the host address from the first BD used to place the packet.
8332 	 */
8333 	uint32_t	metadata2;
8334 	uint16_t	errors_v2;
8335 	/*
8336 	 * This value is written by the NIC such that it will be different
8337 	 * for each pass through the completion queue. The even passes
8338 	 * will write 1. The odd passes will write 0.
8339 	 */
8340 	#define RX_TPA_START_V3_CMPL_V2				UINT32_C(0x1)
8341 	#define RX_TPA_START_V3_CMPL_ERRORS_MASK			UINT32_C(0xfffe)
8342 	#define RX_TPA_START_V3_CMPL_ERRORS_SFT			1
8343 	/*
8344 	 * This error indicates that there was some sort of problem with
8345 	 * the BDs for the packetThe packet should be treated as
8346 	 * invalid.
8347 	 */
8348 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_MASK	UINT32_C(0xe)
8349 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_SFT	1
8350 	/* No buffer error */
8351 		#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER	(UINT32_C(0x0) << 1)
8352 	/*
8353 	 * Did Not Fit:
8354 	 * Packet did not fit into packet buffer provided. This means
8355 	 * that the TPA Start packet was too big to be placed into the
8356 	 * per-packet maximum number of physical buffers configured for
8357 	 * the VNIC, or that it was too big to be placed into the
8358 	 * per-aggregation maximum number of physical buffers configured
8359 	 * for the VNIC. This error only occurs when the VNIC is
8360 	 * configured for variable size receive buffers.
8361 	 */
8362 		#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT   (UINT32_C(0x1) << 1)
8363 	/*
8364 	 * Bad Format:
8365 	 * BDs were not formatted correctly.
8366 	 */
8367 		#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT	(UINT32_C(0x3) << 1)
8368 	/*
8369 	 * Flush:
8370 	 * There was a bad_format error on the previous operation
8371 	 */
8372 		#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_FLUSH	(UINT32_C(0x5) << 1)
8373 		#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_LAST	RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_FLUSH
8374 	/*
8375 	 * This is data from the CFA block as indicated by the meta_format
8376 	 * field.
8377 	 */
8378 	uint16_t	metadata0;
8379 	/* When meta_format != 0, this value is the VLAN VID. */
8380 	#define RX_TPA_START_V3_CMPL_METADATA0_VID_MASK UINT32_C(0xfff)
8381 	#define RX_TPA_START_V3_CMPL_METADATA0_VID_SFT 0
8382 	/* When meta_format != 0, this value is the VLAN DE. */
8383 	#define RX_TPA_START_V3_CMPL_METADATA0_DE	UINT32_C(0x1000)
8384 	/* When meta_format != 0, this value is the VLAN PRI. */
8385 	#define RX_TPA_START_V3_CMPL_METADATA0_PRI_MASK UINT32_C(0xe000)
8386 	#define RX_TPA_START_V3_CMPL_METADATA0_PRI_SFT 13
8387 	/*
8388 	 * This field contains the outer_l3_offset, inner_l2_offset,
8389 	 * inner_l3_offset, and inner_l4_size.
8390 	 *
8391 	 * hdr_offsets[8:0] contains the outer_l3_offset.
8392 	 * hdr_offsets[17:9] contains the inner_l2_offset.
8393 	 * hdr_offsets[26:18] contains the inner_l3_offset.
8394 	 * hdr_offsets[31:27] contains the inner_l4_size.
8395 	 */
8396 	uint32_t	hdr_offsets;
8397 } rx_tpa_start_v3_cmpl_hi_t, *prx_tpa_start_v3_cmpl_hi_t;
8398 
8399 /*
8400  * This TPA completion structure is used on devices where the
8401  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
8402  */
8403 /* rx_tpa_end_cmpl (size:128b/16B) */
8404 
8405 typedef struct rx_tpa_end_cmpl {
8406 	uint16_t	flags_type;
8407 	/*
8408 	 * This field indicates the exact type of the completion.
8409 	 * By convention, the LSB identifies the length of the
8410 	 * record in 16B units. Even values indicate 16B
8411 	 * records. Odd values indicate 32B
8412 	 * records.
8413 	 */
8414 	#define RX_TPA_END_CMPL_TYPE_MASK			UINT32_C(0x3f)
8415 	#define RX_TPA_END_CMPL_TYPE_SFT			0
8416 	/*
8417 	 * RX L2 TPA End Completion:
8418 	 * Completion at the end of a TPA operation.
8419 	 * Length = 32B
8420 	 */
8421 		#define RX_TPA_END_CMPL_TYPE_RX_TPA_END		UINT32_C(0x15)
8422 		#define RX_TPA_END_CMPL_TYPE_LAST			RX_TPA_END_CMPL_TYPE_RX_TPA_END
8423 	#define RX_TPA_END_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
8424 	#define RX_TPA_END_CMPL_FLAGS_SFT			6
8425 	/*
8426 	 * When this bit is '1', it indicates a packet that has an
8427 	 * error of some type. Type of error is indicated in
8428 	 * error_flags.
8429 	 */
8430 	#define RX_TPA_END_CMPL_FLAGS_ERROR			UINT32_C(0x40)
8431 	/* This field indicates how the packet was placed in the buffer. */
8432 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
8433 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_SFT		7
8434 	/*
8435 	 * Jumbo:
8436 	 * TPA Packet was placed using jumbo algorithm. This means
8437 	 * that the first buffer will be filled with data before
8438 	 * moving to aggregation buffers. Each aggregation buffer
8439 	 * will be filled before moving to the next aggregation
8440 	 * buffer.
8441 	 */
8442 		#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
8443 	/*
8444 	 * Header/Data Separation:
8445 	 * Packet was placed using Header/Data separation algorithm.
8446 	 * The separation location is indicated by the itype field.
8447 	 */
8448 		#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
8449 	/*
8450 	 * IOC/Jumbo:
8451 	 * Packet will be placed using In-Order Completion/Jumbo where
8452 	 * the first packet of the aggregation is placed using Jumbo
8453 	 * Placement. Subsequent packets will be placed such that each
8454 	 * packet starts at the beginning of an aggregation buffer.
8455 	 */
8456 		#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_IOC_JUMBO	(UINT32_C(0x4) << 7)
8457 	/*
8458 	 * GRO/Jumbo:
8459 	 * Packet will be placed using GRO/Jumbo where the first
8460 	 * packet is filled with data. Subsequent packets will be
8461 	 * placed such that any one packet does not span two
8462 	 * aggregation buffers unless it starts at the beginning of
8463 	 * an aggregation buffer.
8464 	 */
8465 		#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_GRO_JUMBO	(UINT32_C(0x5) << 7)
8466 	/*
8467 	 * GRO/Header-Data Separation:
8468 	 * Packet will be placed using GRO/HDS where the header
8469 	 * is in the first packet.
8470 	 * Payload of each packet will be
8471 	 * placed such that any one packet does not span two
8472 	 * aggregation buffers unless it starts at the beginning of
8473 	 * an aggregation buffer.
8474 	 */
8475 		#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_GRO_HDS	(UINT32_C(0x6) << 7)
8476 	/*
8477 	 * IOC/Header-Data Separation:
8478 	 * Packet will be placed using In-Order Completion/HDS where
8479 	 * the header is in the first packet buffer. Payload of each
8480 	 * packet will be placed such that each packet starts at the
8481 	 * beginning of an aggregation buffer.
8482 	 */
8483 		#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_IOC_HDS	(UINT32_C(0x7) << 7)
8484 		#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_LAST		RX_TPA_END_CMPL_FLAGS_PLACEMENT_IOC_HDS
8485 	/* When set, this bit indicates that the timestamp field is valid. */
8486 	#define RX_TPA_END_CMPL_FLAGS_TIMESTAMP_VALID	UINT32_C(0x400)
8487 	/*
8488 	 * This bit is '1' if metadata has been added to the end of the
8489 	 * packet in host memory. Metadata starts at the first 32B boundary
8490 	 * after the end of the packet for regular and jumbo placement.
8491 	 * It starts at the first 32B boundary after the end of the header
8492 	 * for HDS placement. The length of the metadata is indicated in the
8493 	 * metadata itself.
8494 	 */
8495 	#define RX_TPA_END_CMPL_FLAGS_PKT_METADATA_PRESENT	UINT32_C(0x800)
8496 	/*
8497 	 * This value indicates what the inner packet determined for the
8498 	 * packet was.
8499 	 * - 2 TCP Packet
8500 	 *	Indicates that the packet was IP and TCP. This indicates
8501 	 *	that the ip_cs field is valid and that the tcp_udp_cs
8502 	 *	field is valid and contains the TCP checksum.
8503 	 *	This also indicates that the payload_offset field is valid.
8504 	 */
8505 	#define RX_TPA_END_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
8506 	#define RX_TPA_END_CMPL_FLAGS_ITYPE_SFT		12
8507 	/*
8508 	 * This value is zero for TPA End completions.
8509 	 * There is no data in the buffer that corresponds to the opaque
8510 	 * value in this completion.
8511 	 */
8512 	uint16_t	len;
8513 	/*
8514 	 * This is a copy of the opaque field from the RX BD this completion
8515 	 * corresponds to.
8516 	 */
8517 	uint32_t	opaque;
8518 	/*
8519 	 * This value is written by the NIC such that it will be different
8520 	 * for each pass through the completion queue. The even passes
8521 	 * will write 1. The odd passes will write 0.
8522 	 */
8523 	uint8_t	agg_bufs_v1;
8524 	/*
8525 	 * This value is written by the NIC such that it will be different
8526 	 * for each pass through the completion queue. The even passes
8527 	 * will write 1. The odd passes will write 0.
8528 	 */
8529 	#define RX_TPA_END_CMPL_V1	UINT32_C(0x1)
8530 	/*
8531 	 * This value is the number of aggregation buffers that follow this
8532 	 * entry in the completion ring that are a part of this aggregation
8533 	 * packet.
8534 	 * If the value is zero, then the packet is completely contained
8535 	 * in the buffer space provided in the aggregation start completion.
8536 	 */
8537 	#define RX_TPA_END_CMPL_AGG_BUFS_MASK UINT32_C(0x7e)
8538 	#define RX_TPA_END_CMPL_AGG_BUFS_SFT 1
8539 	/* This value is the number of segments in the TPA operation. */
8540 	uint8_t	tpa_segs;
8541 	/*
8542 	 * This value indicates the offset in bytes from the beginning of the
8543 	 * packet where the inner payload starts. This value is valid for TCP,
8544 	 * UDP, FCoE, and RoCE packets.
8545 	 *
8546 	 * A value of zero indicates an offset of 256 bytes.
8547 	 */
8548 	uint8_t	payload_offset;
8549 	uint8_t	agg_id;
8550 	/* unused2 is 1 b */
8551 	#define RX_TPA_END_CMPL_UNUSED2	UINT32_C(0x1)
8552 	/*
8553 	 * This is the aggregation ID that the completion is associated
8554 	 * with. Use this number to correlate the TPA start completion
8555 	 * with the TPA end completion.
8556 	 */
8557 	#define RX_TPA_END_CMPL_AGG_ID_MASK UINT32_C(0xfe)
8558 	#define RX_TPA_END_CMPL_AGG_ID_SFT  1
8559 	/*
8560 	 * For non-GRO packets, this value is the
8561 	 * timestamp delta between earliest and latest timestamp values for
8562 	 * TPA packet. If packets were not time stamped, then delta will be
8563 	 * zero.
8564 	 *
8565 	 * For GRO packets, this field is zero except for the following
8566 	 * sub-fields.
8567 	 * - tsdelta[31]
8568 	 *	Timestamp present indication. When '0', no Timestamp
8569 	 *	option is in the packet. When '1', then a Timestamp
8570 	 *	option is present in the packet.
8571 	 */
8572 	uint32_t	tsdelta;
8573 } rx_tpa_end_cmpl_t, *prx_tpa_end_cmpl_t;
8574 
8575 /*
8576  * Last 16 bytes of rx_tpa_end_cmpl.
8577  *
8578  * This TPA completion structure is used on devices where the
8579  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
8580  */
8581 /* rx_tpa_end_cmpl_hi (size:128b/16B) */
8582 
8583 typedef struct rx_tpa_end_cmpl_hi {
8584 	uint32_t	tpa_dup_acks;
8585 	/*
8586 	 * This value is the number of duplicate ACKs that have been
8587 	 * received as part of the TPA operation.
8588 	 */
8589 	#define RX_TPA_END_CMPL_TPA_DUP_ACKS_MASK UINT32_C(0xf)
8590 	#define RX_TPA_END_CMPL_TPA_DUP_ACKS_SFT 0
8591 	/*
8592 	 * This value is the valid when TPA completion is active. It
8593 	 * indicates the length of the longest segment of the TPA operation
8594 	 * for LRO mode and the length of the first segment in GRO mode.
8595 	 *
8596 	 * This value may be used by GRO software to re-construct the original
8597 	 * packet stream from the TPA packet. This is the length of all
8598 	 * but the last segment for GRO. In LRO mode this value may be used
8599 	 * to indicate MSS size to the stack.
8600 	 */
8601 	uint16_t	tpa_seg_len;
8602 	/*
8603 	 * The lower 16b of the timestamp of the last packet added to the
8604 	 * aggregation. Only valid when flags.timestamp_valid is set.
8605 	 */
8606 	uint16_t	timestamp_lower;
8607 	uint16_t	errors_v2;
8608 	/*
8609 	 * This value is written by the NIC such that it will be different
8610 	 * for each pass through the completion queue. The even passes
8611 	 * will write 1. The odd passes will write 0.
8612 	 */
8613 	#define RX_TPA_END_CMPL_V2				UINT32_C(0x1)
8614 	#define RX_TPA_END_CMPL_ERRORS_MASK			UINT32_C(0xfffe)
8615 	#define RX_TPA_END_CMPL_ERRORS_SFT			1
8616 	/*
8617 	 * This error indicates that there was some sort of problem with
8618 	 * the BDs for the packet that was found after part of the
8619 	 * packet was already placed. The packet should be treated as
8620 	 * invalid.
8621 	 */
8622 	#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_MASK	UINT32_C(0xe)
8623 	#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_SFT	1
8624 	/*
8625 	 * This error occurs when there is a fatal HW problem in
8626 	 * the chip only. It indicates that there were not
8627 	 * BDs on chip but that there was adequate reservation.
8628 	 * provided by the TPA block.
8629 	 */
8630 		#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP   (UINT32_C(0x2) << 1)
8631 	/*
8632 	 * This error occurs when TPA block was not configured to
8633 	 * reserve adequate BDs for TPA operations on this RX
8634 	 * ring. All data for the TPA operation was not placed.
8635 	 *
8636 	 * This error can also be generated when the number of
8637 	 * segments is not programmed correctly in TPA and the
8638 	 * 33 total aggregation buffers allowed for the TPA
8639 	 * operation has been exceeded.
8640 	 */
8641 		#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR	(UINT32_C(0x4) << 1)
8642 		#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_LAST	RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR
8643 	/*
8644 	 * The upper 16b of the timestamp of the last packet added to the
8645 	 * aggregation. Only valid when flags.timestamp_valid is set.
8646 	 */
8647 	uint16_t	timestamp_upper;
8648 	/*
8649 	 * This is the opaque value that was completed for the TPA start
8650 	 * completion that corresponds to this TPA end completion.
8651 	 */
8652 	uint32_t	start_opaque;
8653 } rx_tpa_end_cmpl_hi_t, *prx_tpa_end_cmpl_hi_t;
8654 
8655 /*
8656  * This TPA completion structure is used on devices where the
8657  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
8658  */
8659 /* rx_tpa_v2_start_cmpl (size:128b/16B) */
8660 
8661 typedef struct rx_tpa_v2_start_cmpl {
8662 	uint16_t	flags_type;
8663 	/*
8664 	 * This field indicates the exact type of the completion.
8665 	 * By convention, the LSB identifies the length of the
8666 	 * record in 16B units. Even values indicate 16B
8667 	 * records. Odd values indicate 32B
8668 	 * records.
8669 	 */
8670 	#define RX_TPA_V2_START_CMPL_TYPE_MASK			UINT32_C(0x3f)
8671 	#define RX_TPA_V2_START_CMPL_TYPE_SFT			0
8672 	/*
8673 	 * RX L2 TPA Start Completion:
8674 	 * Completion at the beginning of a TPA operation.
8675 	 * Length = 32B
8676 	 */
8677 		#define RX_TPA_V2_START_CMPL_TYPE_RX_TPA_START		UINT32_C(0x13)
8678 		#define RX_TPA_V2_START_CMPL_TYPE_LAST			RX_TPA_V2_START_CMPL_TYPE_RX_TPA_START
8679 	#define RX_TPA_V2_START_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
8680 	#define RX_TPA_V2_START_CMPL_FLAGS_SFT			6
8681 	/* This bit will always be '0' for TPA start completions. */
8682 	#define RX_TPA_V2_START_CMPL_FLAGS_ERROR			UINT32_C(0x40)
8683 	/* This field indicates how the packet was placed in the buffer. */
8684 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
8685 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_SFT		7
8686 	/*
8687 	 * Jumbo:
8688 	 * TPA Packet was placed using jumbo algorithm. This means
8689 	 * that the first buffer will be filled with data before
8690 	 * moving to aggregation buffers. Each aggregation buffer
8691 	 * will be filled before moving to the next aggregation
8692 	 * buffer.
8693 	 */
8694 		#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
8695 	/*
8696 	 * Header/Data Separation:
8697 	 * Packet was placed using Header/Data separation algorithm.
8698 	 * The separation location is indicated by the itype field.
8699 	 */
8700 		#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
8701 	/*
8702 	 * GRO/Jumbo:
8703 	 * Packet will be placed using GRO/Jumbo where the first
8704 	 * packet is filled with data. Subsequent packets will be
8705 	 * placed such that any one packet does not span two
8706 	 * aggregation buffers unless it starts at the beginning of
8707 	 * an aggregation buffer.
8708 	 */
8709 		#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_GRO_JUMBO	(UINT32_C(0x5) << 7)
8710 	/*
8711 	 * GRO/Header-Data Separation:
8712 	 * Packet will be placed using GRO/HDS where the header
8713 	 * is in the first packet.
8714 	 * Payload of each packet will be
8715 	 * placed such that any one packet does not span two
8716 	 * aggregation buffers unless it starts at the beginning of
8717 	 * an aggregation buffer.
8718 	 */
8719 		#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_GRO_HDS	(UINT32_C(0x6) << 7)
8720 		#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_LAST		RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_GRO_HDS
8721 	/* This bit is '1' if the RSS field in this completion is valid. */
8722 	#define RX_TPA_V2_START_CMPL_FLAGS_RSS_VALID		UINT32_C(0x400)
8723 	/*
8724 	 * For devices that support timestamps, when this bit is cleared the
8725 	 * `inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset`
8726 	 * field contains the 32b timestamp for
8727 	 * the packet from the MAC. When this bit is set, the
8728 	 * `inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset`
8729 	 * field contains the outer_l3_offset, inner_l2_offset,
8730 	 * inner_l3_offset, and inner_l4_size.
8731 	 */
8732 	#define RX_TPA_V2_START_CMPL_FLAGS_TIMESTAMP_FLD_FORMAT	UINT32_C(0x800)
8733 	/*
8734 	 * This value indicates what the inner packet determined for the
8735 	 * packet was.
8736 	 */
8737 	#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
8738 	#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_SFT		12
8739 	/*
8740 	 * TCP Packet:
8741 	 * Indicates that the packet was IP and TCP.
8742 	 */
8743 		#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 12)
8744 		#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_LAST		RX_TPA_V2_START_CMPL_FLAGS_ITYPE_TCP
8745 	/*
8746 	 * This value indicates the amount of packet data written to the
8747 	 * buffer the opaque field in this completion corresponds to.
8748 	 */
8749 	uint16_t	len;
8750 	/*
8751 	 * This is a copy of the opaque field from the RX BD this completion
8752 	 * corresponds to.
8753 	 */
8754 	uint32_t	opaque;
8755 	/*
8756 	 * This value is written by the NIC such that it will be different
8757 	 * for each pass through the completion queue. The even passes
8758 	 * will write 1. The odd passes will write 0.
8759 	 */
8760 	uint8_t	v1;
8761 	/*
8762 	 * This value is written by the NIC such that it will be different
8763 	 * for each pass through the completion queue. The even passes
8764 	 * will write 1. The odd passes will write 0.
8765 	 */
8766 	#define RX_TPA_V2_START_CMPL_V1 UINT32_C(0x1)
8767 	#define RX_TPA_V2_START_CMPL_LAST RX_TPA_V2_START_CMPL_V1
8768 	/*
8769 	 * This is the RSS hash type for the packet. The value is packed
8770 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
8771 	 *
8772 	 * The value of tuple_extrac_op provides the information about
8773 	 * what fields the hash was computed on.
8774 	 * * 0: The RSS hash was computed over source IP address,
8775 	 * destination IP address, source port, and destination port of inner
8776 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
8777 	 * the packet headers are considered inner packet headers for the RSS
8778 	 * hash computation purpose.
8779 	 * * 1: The RSS hash was computed over source IP address and destination
8780 	 * IP address of inner IP header. Note: For non-tunneled packets,
8781 	 * the packet headers are considered inner packet headers for the RSS
8782 	 * hash computation purpose.
8783 	 * * 2: The RSS hash was computed over source IP address,
8784 	 * destination IP address, source port, and destination port of
8785 	 * IP and TCP or UDP headers of outer tunnel headers.
8786 	 * Note: For non-tunneled packets, this value is not applicable.
8787 	 * * 3: The RSS hash was computed over source IP address and
8788 	 * destination IP address of IP header of outer tunnel headers.
8789 	 * Note: For non-tunneled packets, this value is not applicable.
8790 	 *
8791 	 * Note that 4-tuples values listed above are applicable
8792 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
8793 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
8794 	 * enabled for TCP traffic only, then the values of tuple_extract_op
8795 	 * corresponding to 4-tuples are only valid for TCP traffic.
8796 	 */
8797 	uint8_t	rss_hash_type;
8798 	/*
8799 	 * This is the aggregation ID that the completion is associated
8800 	 * with. Use this number to correlate the TPA start completion
8801 	 * with the TPA end completion.
8802 	 */
8803 	uint16_t	agg_id;
8804 	/*
8805 	 * This value is the RSS hash value calculated for the packet
8806 	 * based on the mode bits and key value in the VNIC.
8807 	 */
8808 	uint32_t	rss_hash;
8809 } rx_tpa_v2_start_cmpl_t, *prx_tpa_v2_start_cmpl_t;
8810 
8811 /*
8812  * Last 16 bytes of rx_tpa_v2_start_cmpl.
8813  *
8814  * This TPA completion structure is used on devices where the
8815  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
8816  */
8817 /* rx_tpa_v2_start_cmpl_hi (size:128b/16B) */
8818 
8819 typedef struct rx_tpa_v2_start_cmpl_hi {
8820 	uint32_t	flags2;
8821 	/*
8822 	 * This indicates that the ip checksum was calculated for the
8823 	 * inner packet and that the sum passed for all segments
8824 	 * included in the aggregation.
8825 	 */
8826 	#define RX_TPA_V2_START_CMPL_FLAGS2_IP_CS_CALC		UINT32_C(0x1)
8827 	/*
8828 	 * This indicates that the TCP, UDP or ICMP checksum was
8829 	 * calculated for the inner packet and that the sum passed
8830 	 * for all segments included in the aggregation.
8831 	 */
8832 	#define RX_TPA_V2_START_CMPL_FLAGS2_L4_CS_CALC		UINT32_C(0x2)
8833 	/*
8834 	 * This indicates that the ip checksum was calculated for the
8835 	 * tunnel header and that the sum passed for all segments
8836 	 * included in the aggregation.
8837 	 */
8838 	#define RX_TPA_V2_START_CMPL_FLAGS2_T_IP_CS_CALC		UINT32_C(0x4)
8839 	/*
8840 	 * This indicates that the UDP checksum was
8841 	 * calculated for the tunnel packet and that the sum passed for
8842 	 * all segments included in the aggregation.
8843 	 */
8844 	#define RX_TPA_V2_START_CMPL_FLAGS2_T_L4_CS_CALC		UINT32_C(0x8)
8845 	/* This value indicates what format the metadata field is. */
8846 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
8847 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_SFT		4
8848 	/* No metadata information. Value is zero. */
8849 		#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
8850 	/*
8851 	 * The metadata field contains the VLAN tag and TPID value.
8852 	 * - metadata[11:0] contains the vlan VID value.
8853 	 * - metadata[12] contains the vlan DE value.
8854 	 * - metadata[15:13] contains the vlan PRI value.
8855 	 * - metadata[31:16] contains the vlan TPID value.
8856 	 */
8857 		#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_VLAN		(UINT32_C(0x1) << 4)
8858 	/*
8859 	 * If ext_meta_format is equal to 1, the metadata field
8860 	 * contains the lower 16b of the tunnel ID value, justified
8861 	 * to LSB
8862 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
8863 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier.
8864 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
8865 	 * - GRE = KEY[31:0] -> key field with bit mask. Zero if K = 0
8866 	 * - IPV4 = 0 (not populated)
8867 	 * - IPV6 = Flow Label[19:0]
8868 	 * - PPPoE = sessionID[15:0]
8869 	 * - MPLs = Outer label[19:0]
8870 	 * - UPAR = Selected[31:0] with bit mask
8871 	 */
8872 		#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
8873 	/*
8874 	 * if ext_meta_format is equal to 1, metadata field contains
8875 	 * 16b metadata from the prepended header (chdr_data).
8876 	 */
8877 		#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
8878 	/*
8879 	 * If ext_meta_format is equal to 1, the metadata field contains
8880 	 * the outer_l3_offset, inner_l2_offset, inner_l3_offset and
8881 	 * inner_l4_size.
8882 	 * - metadata[8:0] contains the outer_l3_offset.
8883 	 * - metadata[17:9] contains the inner_l2_offset.
8884 	 * - metadata[26:18] contains the inner_l3_offset.
8885 	 * - metadata[31:27] contains the inner_l4_size.
8886 	 */
8887 		#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
8888 		#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_LAST		RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
8889 	/*
8890 	 * This field indicates the IP type for the inner-most IP header.
8891 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
8892 	 */
8893 	#define RX_TPA_V2_START_CMPL_FLAGS2_IP_TYPE			UINT32_C(0x100)
8894 	/*
8895 	 * This indicates that the complete 1's complement checksum was
8896 	 * calculated for the packet.
8897 	 */
8898 	#define RX_TPA_V2_START_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
8899 	/*
8900 	 * The combination of this value and meta_format indicated what
8901 	 * format the metadata field is.
8902 	 */
8903 	#define RX_TPA_V2_START_CMPL_FLAGS2_EXT_META_FORMAT_MASK	UINT32_C(0xc00)
8904 	#define RX_TPA_V2_START_CMPL_FLAGS2_EXT_META_FORMAT_SFT	10
8905 	/*
8906 	 * This value is the complete 1's complement checksum calculated from
8907 	 * the start of the outer L3 header to the end of the packet (not
8908 	 * including the ethernet crc). It is valid when the
8909 	 * 'complete_checksum_calc' flag is set. For TPA Start completions,
8910 	 * the complete checksum is calculated for the first packet in the
8911 	 * aggregation only.
8912 	 */
8913 	#define RX_TPA_V2_START_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
8914 	#define RX_TPA_V2_START_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT	16
8915 	/*
8916 	 * This is data from the CFA block as indicated by the meta_format
8917 	 * field.
8918 	 */
8919 	uint32_t	metadata;
8920 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN VID. */
8921 	#define RX_TPA_V2_START_CMPL_METADATA_VID_MASK UINT32_C(0xfff)
8922 	#define RX_TPA_V2_START_CMPL_METADATA_VID_SFT  0
8923 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN DE. */
8924 	#define RX_TPA_V2_START_CMPL_METADATA_DE	UINT32_C(0x1000)
8925 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN PRI. */
8926 	#define RX_TPA_V2_START_CMPL_METADATA_PRI_MASK UINT32_C(0xe000)
8927 	#define RX_TPA_V2_START_CMPL_METADATA_PRI_SFT  13
8928 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN TPID. */
8929 	#define RX_TPA_V2_START_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000)
8930 	#define RX_TPA_V2_START_CMPL_METADATA_TPID_SFT 16
8931 	uint16_t	errors_v2;
8932 	/*
8933 	 * This value is written by the NIC such that it will be different
8934 	 * for each pass through the completion queue. The even passes
8935 	 * will write 1. The odd passes will write 0.
8936 	 */
8937 	#define RX_TPA_V2_START_CMPL_V2				UINT32_C(0x1)
8938 	#define RX_TPA_V2_START_CMPL_ERRORS_MASK		UINT32_C(0xfffe)
8939 	#define RX_TPA_V2_START_CMPL_ERRORS_SFT			1
8940 	/*
8941 	 * This error indicates that there was some sort of problem with
8942 	 * the BDs for the packet that was found after part of the
8943 	 * packet was already placed. The packet should be treated as
8944 	 * invalid.
8945 	 */
8946 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_MASK	UINT32_C(0xe)
8947 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_SFT	1
8948 	/* No buffer error */
8949 		#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER	(UINT32_C(0x0) << 1)
8950 	/*
8951 	 * Bad Format:
8952 	 * BDs were not formatted correctly.
8953 	 */
8954 		#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT   (UINT32_C(0x3) << 1)
8955 	/*
8956 	 * Flush:
8957 	 * There was a bad_format error on the previous operation
8958 	 */
8959 		#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_FLUSH	(UINT32_C(0x5) << 1)
8960 		#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_LAST	RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_FLUSH
8961 	/*
8962 	 * This field identifies the CFA action rule that was used for this
8963 	 * packet.
8964 	 */
8965 	uint16_t	cfa_code;
8966 	/*
8967 	 * For devices that support timestamps this field is overridden
8968 	 * with the timestamp value. When `flags.timestamp_fld_format` is
8969 	 * cleared, this field contains the 32b timestamp for the packet from the
8970 	 * MAC.
8971 	 *
8972 	 * When `flags.timestamp_fld_format` is set, this field contains the
8973 	 * outer_l3_offset, inner_l2_offset, inner_l3_offset, and inner_l4_size
8974 	 * as defined below.
8975 	 */
8976 	uint32_t	inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset;
8977 	/*
8978 	 * This is the offset from the beginning of the packet in bytes for
8979 	 * the outer L3 header. If there is no outer L3 header, then this
8980 	 * value is zero.
8981 	 */
8982 	#define RX_TPA_V2_START_CMPL_OUTER_L3_OFFSET_MASK UINT32_C(0x1ff)
8983 	#define RX_TPA_V2_START_CMPL_OUTER_L3_OFFSET_SFT 0
8984 	/*
8985 	 * This is the offset from the beginning of the packet in bytes for
8986 	 * the inner most L2 header.
8987 	 */
8988 	#define RX_TPA_V2_START_CMPL_INNER_L2_OFFSET_MASK UINT32_C(0x3fe00)
8989 	#define RX_TPA_V2_START_CMPL_INNER_L2_OFFSET_SFT 9
8990 	/*
8991 	 * This is the offset from the beginning of the packet in bytes for
8992 	 * the inner most L3 header.
8993 	 */
8994 	#define RX_TPA_V2_START_CMPL_INNER_L3_OFFSET_MASK UINT32_C(0x7fc0000)
8995 	#define RX_TPA_V2_START_CMPL_INNER_L3_OFFSET_SFT 18
8996 	/*
8997 	 * This is the size in bytes of the inner most L4 header.
8998 	 * This can be subtracted from the payload_offset to determine
8999 	 * the start of the inner most L4 header.
9000 	 */
9001 	#define RX_TPA_V2_START_CMPL_INNER_L4_SIZE_MASK  UINT32_C(0xf8000000)
9002 	#define RX_TPA_V2_START_CMPL_INNER_L4_SIZE_SFT   27
9003 } rx_tpa_v2_start_cmpl_hi_t, *prx_tpa_v2_start_cmpl_hi_t;
9004 
9005 /*
9006  * This TPA completion structure is used on devices where the
9007  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
9008  */
9009 /* rx_tpa_v2_end_cmpl (size:128b/16B) */
9010 
9011 typedef struct rx_tpa_v2_end_cmpl {
9012 	uint16_t	flags_type;
9013 	/*
9014 	 * This field indicates the exact type of the completion.
9015 	 * By convention, the LSB identifies the length of the
9016 	 * record in 16B units. Even values indicate 16B
9017 	 * records. Odd values indicate 32B
9018 	 * records.
9019 	 */
9020 	#define RX_TPA_V2_END_CMPL_TYPE_MASK			UINT32_C(0x3f)
9021 	#define RX_TPA_V2_END_CMPL_TYPE_SFT			0
9022 	/*
9023 	 * RX L2 TPA End Completion:
9024 	 * Completion at the end of a TPA operation.
9025 	 * Length = 32B
9026 	 */
9027 		#define RX_TPA_V2_END_CMPL_TYPE_RX_TPA_END		UINT32_C(0x15)
9028 		#define RX_TPA_V2_END_CMPL_TYPE_LAST			RX_TPA_V2_END_CMPL_TYPE_RX_TPA_END
9029 	#define RX_TPA_V2_END_CMPL_FLAGS_MASK			UINT32_C(0xffc0)
9030 	#define RX_TPA_V2_END_CMPL_FLAGS_SFT			6
9031 	/*
9032 	 * When this bit is '1', it indicates a packet that has an
9033 	 * error of some type. Type of error is indicated in
9034 	 * error_flags.
9035 	 */
9036 	#define RX_TPA_V2_END_CMPL_FLAGS_ERROR			UINT32_C(0x40)
9037 	/* This field indicates how the packet was placed in the buffer. */
9038 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_MASK		UINT32_C(0x380)
9039 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_SFT		7
9040 	/*
9041 	 * Jumbo:
9042 	 * TPA Packet was placed using jumbo algorithm. This means
9043 	 * that the first buffer will be filled with data before
9044 	 * moving to aggregation buffers. Each aggregation buffer
9045 	 * will be filled before moving to the next aggregation
9046 	 * buffer.
9047 	 */
9048 		#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_JUMBO		(UINT32_C(0x1) << 7)
9049 	/*
9050 	 * Header/Data Separation:
9051 	 * Packet was placed using Header/Data separation algorithm.
9052 	 * The separation location is indicated by the itype field.
9053 	 */
9054 		#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_HDS		(UINT32_C(0x2) << 7)
9055 	/*
9056 	 * GRO/Jumbo:
9057 	 * Packet will be placed using GRO/Jumbo where the first
9058 	 * packet is filled with data. Subsequent packets will be
9059 	 * placed such that any one packet does not span two
9060 	 * aggregation buffers unless it starts at the beginning of
9061 	 * an aggregation buffer.
9062 	 */
9063 		#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_GRO_JUMBO	(UINT32_C(0x5) << 7)
9064 	/*
9065 	 * GRO/Header-Data Separation:
9066 	 * Packet will be placed using GRO/HDS where the header
9067 	 * is in the first packet.
9068 	 * Payload of each packet will be
9069 	 * placed such that any one packet does not span two
9070 	 * aggregation buffers unless it starts at the beginning of
9071 	 * an aggregation buffer.
9072 	 */
9073 		#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_GRO_HDS	(UINT32_C(0x6) << 7)
9074 	/*
9075 	 * IOC/Header-Data Separation:
9076 	 * Packet will be placed using In-Order Completion/HDS where
9077 	 * the header is in the first packet buffer. Payload of each
9078 	 * packet will be placed such that each packet starts at the
9079 	 * beginning of an aggregation buffer.
9080 	 */
9081 		#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_IOC_HDS	(UINT32_C(0x7) << 7)
9082 		#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_LAST		RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_IOC_HDS
9083 	/* unused is 1 b */
9084 	#define RX_TPA_V2_END_CMPL_FLAGS_UNUSED			UINT32_C(0x400)
9085 	/*
9086 	 * This bit is '1' if metadata has been added to the end of the
9087 	 * packet in host memory. Metadata starts at the first 32B boundary
9088 	 * after the end of the packet for regular and jumbo placement.
9089 	 * It starts at the first 32B boundary after the end of the header
9090 	 * for HDS placement. The length of the metadata is indicated in the
9091 	 * metadata itself.
9092 	 */
9093 	#define RX_TPA_V2_END_CMPL_FLAGS_PKT_METADATA_PRESENT	UINT32_C(0x800)
9094 	/*
9095 	 * This value indicates what the inner packet determined for the
9096 	 * packet was.
9097 	 * - 2 TCP Packet
9098 	 *	Indicates that the packet was IP and TCP. This indicates
9099 	 *	that the ip_cs field is valid and that the tcp_udp_cs
9100 	 *	field is valid and contains the TCP checksum.
9101 	 *	This also indicates that the payload_offset field is valid.
9102 	 */
9103 	#define RX_TPA_V2_END_CMPL_FLAGS_ITYPE_MASK		UINT32_C(0xf000)
9104 	#define RX_TPA_V2_END_CMPL_FLAGS_ITYPE_SFT		12
9105 	/*
9106 	 * This value is zero for TPA End completions.
9107 	 * There is no data in the buffer that corresponds to the opaque
9108 	 * value in this completion.
9109 	 */
9110 	uint16_t	len;
9111 	/*
9112 	 * This is a copy of the opaque field from the RX BD this completion
9113 	 * corresponds to.
9114 	 */
9115 	uint32_t	opaque;
9116 	uint8_t	v1;
9117 	/*
9118 	 * This value is written by the NIC such that it will be different
9119 	 * for each pass through the completion queue. The even passes
9120 	 * will write 1. The odd passes will write 0.
9121 	 */
9122 	#define RX_TPA_V2_END_CMPL_V1	UINT32_C(0x1)
9123 	/* This value is the number of segments in the TPA operation. */
9124 	uint8_t	tpa_segs;
9125 	/*
9126 	 * This is the aggregation ID that the completion is associated
9127 	 * with. Use this number to correlate the TPA start completion
9128 	 * with the TPA end completion.
9129 	 */
9130 	uint16_t	agg_id;
9131 	/*
9132 	 * For non-GRO packets, this value is the
9133 	 * timestamp delta between earliest and latest timestamp values for
9134 	 * TPA packet. If packets were not time stamped, then delta will be
9135 	 * zero.
9136 	 *
9137 	 * For GRO packets, this field is zero except for the following
9138 	 * sub-fields.
9139 	 * - tsdelta[31]
9140 	 *	Timestamp present indication. When '0', no Timestamp
9141 	 *	option is in the packet. When '1', then a Timestamp
9142 	 *	option is present in the packet.
9143 	 */
9144 	uint32_t	tsdelta;
9145 } rx_tpa_v2_end_cmpl_t, *prx_tpa_v2_end_cmpl_t;
9146 
9147 /*
9148  * Last 16 bytes of rx_tpa_v2_end_cmpl.
9149  *
9150  * This TPA completion structure is used on devices where the
9151  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
9152  */
9153 /* rx_tpa_v2_end_cmpl_hi (size:128b/16B) */
9154 
9155 typedef struct rx_tpa_v2_end_cmpl_hi {
9156 	/*
9157 	 * This value is the number of duplicate ACKs that have been
9158 	 * received as part of the TPA operation.
9159 	 */
9160 	uint16_t	tpa_dup_acks;
9161 	/*
9162 	 * This value is the number of duplicate ACKs that have been
9163 	 * received as part of the TPA operation.
9164 	 */
9165 	#define RX_TPA_V2_END_CMPL_TPA_DUP_ACKS_MASK UINT32_C(0xf)
9166 	#define RX_TPA_V2_END_CMPL_TPA_DUP_ACKS_SFT 0
9167 	/*
9168 	 * This value indicated the offset in bytes from the beginning of
9169 	 * the packet where the inner payload starts. This value is valid
9170 	 * for TCP, UDP, FCoE and RoCE packets
9171 	 */
9172 	uint8_t	payload_offset;
9173 	/*
9174 	 * The value is the total number of aggregation buffers that were
9175 	 * used in the TPA operation. All TPA aggregation buffer completions
9176 	 * precede the TPA End completion. If the value is zero, then the
9177 	 * aggregation is completely contained in the buffer space provided
9178 	 * in the aggregation start completion.
9179 	 * Note that the field is simply provided as a cross check.
9180 	 */
9181 	uint8_t	tpa_agg_bufs;
9182 	/*
9183 	 * This value is the valid when TPA completion is active. It
9184 	 * indicates the length of the longest segment of the TPA operation
9185 	 * for LRO mode and the length of the first segment in GRO mode.
9186 	 *
9187 	 * This value may be used by GRO software to re-construct the original
9188 	 * packet stream from the TPA packet. This is the length of all
9189 	 * but the last segment for GRO. In LRO mode this value may be used
9190 	 * to indicate MSS size to the stack.
9191 	 */
9192 	uint16_t	tpa_seg_len;
9193 	uint16_t	unused_1;
9194 	uint16_t	errors_v2;
9195 	/*
9196 	 * This value is written by the NIC such that it will be different
9197 	 * for each pass through the completion queue. The even passes
9198 	 * will write 1. The odd passes will write 0.
9199 	 */
9200 	#define RX_TPA_V2_END_CMPL_V2				UINT32_C(0x1)
9201 	#define RX_TPA_V2_END_CMPL_ERRORS_MASK			UINT32_C(0xfffe)
9202 	#define RX_TPA_V2_END_CMPL_ERRORS_SFT			1
9203 	/*
9204 	 * This error indicates that there was some sort of problem with
9205 	 * the BDs for the packet that was found after part of the
9206 	 * packet was already placed. The packet should be treated as
9207 	 * invalid.
9208 	 */
9209 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_MASK	UINT32_C(0xe)
9210 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_SFT	1
9211 	/* No buffer error */
9212 		#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER	(UINT32_C(0x0) << 1)
9213 	/*
9214 	 * This error occurs when there is a fatal HW problem in
9215 	 * the chip only. It indicates that there were not
9216 	 * BDs on chip but that there was adequate reservation.
9217 	 * provided by the TPA block.
9218 	 */
9219 		#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP   (UINT32_C(0x2) << 1)
9220 	/*
9221 	 * Bad Format:
9222 	 * BDs were not formatted correctly.
9223 	 */
9224 		#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT	(UINT32_C(0x3) << 1)
9225 	/*
9226 	 * This error occurs when TPA block was not configured to
9227 	 * reserve adequate BDs for TPA operations on this RX
9228 	 * ring. All data for the TPA operation was not placed.
9229 	 *
9230 	 * This error can also be generated when the number of
9231 	 * segments is not programmed correctly in TPA and the
9232 	 * 33 total aggregation buffers allowed for the TPA
9233 	 * operation has been exceeded.
9234 	 */
9235 		#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR	(UINT32_C(0x4) << 1)
9236 	/*
9237 	 * Flush:
9238 	 * There was a bad_format error on the previous operation
9239 	 */
9240 		#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_FLUSH	(UINT32_C(0x5) << 1)
9241 		#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_LAST	RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_FLUSH
9242 	uint16_t	unused_2;
9243 	/*
9244 	 * This is the opaque value that was completed for the TPA start
9245 	 * completion that corresponds to this TPA end completion.
9246 	 */
9247 	uint32_t	start_opaque;
9248 } rx_tpa_v2_end_cmpl_hi_t, *prx_tpa_v2_end_cmpl_hi_t;
9249 
9250 /*
9251  * This TPA completion structure is used on devices where the
9252  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
9253  */
9254 /* rx_tpa_v2_abuf_cmpl (size:128b/16B) */
9255 
9256 typedef struct rx_tpa_v2_abuf_cmpl {
9257 	uint16_t	type;
9258 	/*
9259 	 * This field indicates the exact type of the completion.
9260 	 * By convention, the LSB identifies the length of the
9261 	 * record in 16B units. Even values indicate 16B
9262 	 * records. Odd values indicate 32B
9263 	 * records.
9264 	 */
9265 	#define RX_TPA_V2_ABUF_CMPL_TYPE_MASK	UINT32_C(0x3f)
9266 	#define RX_TPA_V2_ABUF_CMPL_TYPE_SFT	0
9267 	/*
9268 	 * RX TPA Aggregation Buffer completion:
9269 	 * Completion of an L2 aggregation buffer in support of
9270 	 * TPA packet completion. Length = 16B
9271 	 */
9272 		#define RX_TPA_V2_ABUF_CMPL_TYPE_RX_TPA_AGG  UINT32_C(0x16)
9273 		#define RX_TPA_V2_ABUF_CMPL_TYPE_LAST	RX_TPA_V2_ABUF_CMPL_TYPE_RX_TPA_AGG
9274 	/*
9275 	 * This is the length of the data for the packet stored in this
9276 	 * aggregation buffer identified by the opaque value. This does not
9277 	 * include the length of any
9278 	 * data placed in other aggregation BDs or in the packet or buffer
9279 	 * BDs. This length does not include any space added due to
9280 	 * hdr_offset register during HDS placement mode.
9281 	 */
9282 	uint16_t	len;
9283 	/*
9284 	 * This is a copy of the opaque field from the RX BD this aggregation
9285 	 * buffer corresponds to.
9286 	 */
9287 	uint32_t	opaque;
9288 	uint16_t	v;
9289 	/*
9290 	 * This value is written by the NIC such that it will be different
9291 	 * for each pass through the completion queue. The even passes
9292 	 * will write 1. The odd passes will write 0.
9293 	 */
9294 	#define RX_TPA_V2_ABUF_CMPL_V	UINT32_C(0x1)
9295 	/*
9296 	 * This is the aggregation ID that the completion is associated with. Use
9297 	 * this number to correlate the TPA agg completion with the TPA start
9298 	 * completion and the TPA end completion.
9299 	 */
9300 	uint16_t	agg_id;
9301 	uint32_t	unused_1;
9302 } rx_tpa_v2_abuf_cmpl_t, *prx_tpa_v2_abuf_cmpl_t;
9303 
9304 /* rx_abuf_cmpl (size:128b/16B) */
9305 
9306 typedef struct rx_abuf_cmpl {
9307 	uint16_t	type;
9308 	/*
9309 	 * This field indicates the exact type of the completion.
9310 	 * By convention, the LSB identifies the length of the
9311 	 * record in 16B units. Even values indicate 16B
9312 	 * records. Odd values indicate 32B
9313 	 * records.
9314 	 */
9315 	#define RX_ABUF_CMPL_TYPE_MASK  UINT32_C(0x3f)
9316 	#define RX_ABUF_CMPL_TYPE_SFT   0
9317 	/*
9318 	 * RX Aggregation Buffer completion:
9319 	 * Completion of an L2 aggregation buffer in support of
9320 	 * TPA, HDS, or Jumbo packet completion. Length = 16B
9321 	 */
9322 		#define RX_ABUF_CMPL_TYPE_RX_AGG  UINT32_C(0x12)
9323 		#define RX_ABUF_CMPL_TYPE_LAST   RX_ABUF_CMPL_TYPE_RX_AGG
9324 	/*
9325 	 * This is the length of the data for the packet stored in this
9326 	 * aggregation buffer identified by the opaque value. This does not
9327 	 * include the length of any
9328 	 * data placed in other aggregation BDs or in the packet or buffer
9329 	 * BDs. This length does not include any space added due to
9330 	 * hdr_offset register during HDS placement mode.
9331 	 */
9332 	uint16_t	len;
9333 	/*
9334 	 * This is a copy of the opaque field from the RX BD this aggregation
9335 	 * buffer corresponds to.
9336 	 */
9337 	uint32_t	opaque;
9338 	uint32_t	v;
9339 	/*
9340 	 * This value is written by the NIC such that it will be different
9341 	 * for each pass through the completion queue. The even passes
9342 	 * will write 1. The odd passes will write 0.
9343 	 */
9344 	#define RX_ABUF_CMPL_V	UINT32_C(0x1)
9345 	/* unused3 is 32 b */
9346 	uint32_t	unused_2;
9347 } rx_abuf_cmpl_t, *prx_abuf_cmpl_t;
9348 
9349 /* VEE FLUSH Completion Record (16 bytes) */
9350 /* vee_flush (size:128b/16B) */
9351 
9352 typedef struct vee_flush {
9353 	uint32_t	downstream_path_type;
9354 	/*
9355 	 * This field indicates the exact type of the completion.
9356 	 * By convention, the LSB identifies the length of the
9357 	 * record in 16B units. Even values indicate 16B
9358 	 * records. Odd values indicate 32B
9359 	 * records.
9360 	 */
9361 	#define VEE_FLUSH_TYPE_MASK	UINT32_C(0x3f)
9362 	#define VEE_FLUSH_TYPE_SFT		0
9363 	/*
9364 	 * VEE Flush Completion:
9365 	 * This completion is inserted manually by the Primate and processed
9366 	 * by the VEE hardware to ensure that all completions on a VEE
9367 	 * function have been processed by the VEE hardware before FLR
9368 	 * process is completed.
9369 	 */
9370 		#define VEE_FLUSH_TYPE_VEE_FLUSH	UINT32_C(0x1c)
9371 		#define VEE_FLUSH_TYPE_LAST		VEE_FLUSH_TYPE_VEE_FLUSH
9372 	/* downstream_path is 1 b */
9373 	#define VEE_FLUSH_DOWNSTREAM_PATH	UINT32_C(0x40)
9374 	/* This completion is associated with VEE Transmit */
9375 		#define VEE_FLUSH_DOWNSTREAM_PATH_TX	(UINT32_C(0x0) << 6)
9376 	/* This completion is associated with VEE Receive */
9377 		#define VEE_FLUSH_DOWNSTREAM_PATH_RX	(UINT32_C(0x1) << 6)
9378 		#define VEE_FLUSH_DOWNSTREAM_PATH_LAST VEE_FLUSH_DOWNSTREAM_PATH_RX
9379 	/*
9380 	 * This is an opaque value that is passed through the completion
9381 	 * to the VEE handler SW and is used to indicate what VEE VQ or
9382 	 * function has completed FLR processing.
9383 	 */
9384 	uint32_t	opaque;
9385 	uint32_t	v;
9386 	/*
9387 	 * This value is written by the NIC such that it will be different
9388 	 * for each pass through the completion queue. The even passes will
9389 	 * write 1. The odd passes will write 0.
9390 	 */
9391 	#define VEE_FLUSH_V	UINT32_C(0x1)
9392 	/* unused3 is 32 b */
9393 	uint32_t	unused_3;
9394 } vee_flush_t, *pvee_flush_t;
9395 
9396 /* eject_cmpl (size:128b/16B) */
9397 
9398 typedef struct eject_cmpl {
9399 	uint16_t	type;
9400 	/*
9401 	 * This field indicates the exact type of the completion.
9402 	 * By convention, the LSB identifies the length of the
9403 	 * record in 16B units. Even values indicate 16B
9404 	 * records. Odd values indicate 32B
9405 	 * records.
9406 	 */
9407 	#define EJECT_CMPL_TYPE_MASK	UINT32_C(0x3f)
9408 	#define EJECT_CMPL_TYPE_SFT	0
9409 	/*
9410 	 * Statistics Ejection Completion:
9411 	 * Completion of statistics data ejection buffer.
9412 	 * Length = 16B
9413 	 */
9414 		#define EJECT_CMPL_TYPE_STAT_EJECT   UINT32_C(0x1a)
9415 		#define EJECT_CMPL_TYPE_LAST	EJECT_CMPL_TYPE_STAT_EJECT
9416 	#define EJECT_CMPL_FLAGS_MASK	UINT32_C(0xffc0)
9417 	#define EJECT_CMPL_FLAGS_SFT	6
9418 	/*
9419 	 * When this bit is '1', it indicates a packet that has an
9420 	 * error of some type. Type of error is indicated in
9421 	 * error_flags.
9422 	 */
9423 	#define EJECT_CMPL_FLAGS_ERROR	UINT32_C(0x40)
9424 	/*
9425 	 * This is the length of the statistics data stored in this
9426 	 * buffer.
9427 	 */
9428 	uint16_t	len;
9429 	/*
9430 	 * This is a copy of the opaque field from the RX BD this ejection
9431 	 * buffer corresponds to.
9432 	 */
9433 	uint32_t	opaque;
9434 	uint16_t	v;
9435 	/*
9436 	 * This value is written by the NIC such that it will be different
9437 	 * for each pass through the completion queue. The even passes
9438 	 * will write 1. The odd passes will write 0.
9439 	 */
9440 	#define EJECT_CMPL_V				UINT32_C(0x1)
9441 	#define EJECT_CMPL_ERRORS_MASK			UINT32_C(0xfffe)
9442 	#define EJECT_CMPL_ERRORS_SFT			1
9443 	/*
9444 	 * This error indicates that there was some sort of problem with
9445 	 * the BDs for statistics ejection. The statistics ejection should
9446 	 * be treated as invalid
9447 	 */
9448 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_MASK	UINT32_C(0xe)
9449 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_SFT	1
9450 	/* No buffer error */
9451 		#define EJECT_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER	(UINT32_C(0x0) << 1)
9452 	/*
9453 	 * Did Not Fit:
9454 	 * Statistics did not fit into aggregation buffer provided.
9455 	 */
9456 		#define EJECT_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT   (UINT32_C(0x1) << 1)
9457 	/*
9458 	 * Bad Format:
9459 	 * BDs were not formatted correctly.
9460 	 */
9461 		#define EJECT_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT	(UINT32_C(0x3) << 1)
9462 	/*
9463 	 * Flush:
9464 	 * There was a bad_format error on the previous operation
9465 	 */
9466 		#define EJECT_CMPL_ERRORS_BUFFER_ERROR_FLUSH	(UINT32_C(0x5) << 1)
9467 		#define EJECT_CMPL_ERRORS_BUFFER_ERROR_LAST	EJECT_CMPL_ERRORS_BUFFER_ERROR_FLUSH
9468 	/* reserved16 is 16 b */
9469 	uint16_t	reserved16;
9470 	/* unused3 is 32 b */
9471 	uint32_t	unused_2;
9472 } eject_cmpl_t, *peject_cmpl_t;
9473 
9474 /* hwrm_cmpl (size:128b/16B) */
9475 
9476 typedef struct hwrm_cmpl {
9477 	uint16_t	type;
9478 	/*
9479 	 * This field indicates the exact type of the completion.
9480 	 * By convention, the LSB identifies the length of the
9481 	 * record in 16B units. Even values indicate 16B
9482 	 * records. Odd values indicate 32B
9483 	 * records.
9484 	 */
9485 	#define HWRM_CMPL_TYPE_MASK	UINT32_C(0x3f)
9486 	#define HWRM_CMPL_TYPE_SFT	0
9487 	/*
9488 	 * HWRM Command Completion:
9489 	 * Completion of an HWRM command.
9490 	 */
9491 		#define HWRM_CMPL_TYPE_HWRM_DONE  UINT32_C(0x20)
9492 		#define HWRM_CMPL_TYPE_LAST	HWRM_CMPL_TYPE_HWRM_DONE
9493 	/* This is the sequence_id of the HWRM command that has completed. */
9494 	uint16_t	sequence_id;
9495 	/* unused2 is 32 b */
9496 	uint32_t	unused_1;
9497 	uint32_t	v;
9498 	/*
9499 	 * This value is written by the NIC such that it will be different
9500 	 * for each pass through the completion queue. The even passes
9501 	 * will write 1. The odd passes will write 0.
9502 	 */
9503 	#define HWRM_CMPL_V	UINT32_C(0x1)
9504 	/* unused4 is 32 b */
9505 	uint32_t	unused_3;
9506 } hwrm_cmpl_t, *phwrm_cmpl_t;
9507 
9508 /* hwrm_fwd_req_cmpl (size:128b/16B) */
9509 
9510 typedef struct hwrm_fwd_req_cmpl {
9511 	/*
9512 	 * This field indicates the exact type of the completion.
9513 	 * By convention, the LSB identifies the length of the
9514 	 * record in 16B units. Even values indicate 16B
9515 	 * records. Odd values indicate 32B
9516 	 * records.
9517 	 */
9518 	uint16_t	req_len_type;
9519 	/*
9520 	 * This field indicates the exact type of the completion.
9521 	 * By convention, the LSB identifies the length of the
9522 	 * record in 16B units. Even values indicate 16B
9523 	 * records. Odd values indicate 32B
9524 	 * records.
9525 	 */
9526 	#define HWRM_FWD_REQ_CMPL_TYPE_MASK	UINT32_C(0x3f)
9527 	#define HWRM_FWD_REQ_CMPL_TYPE_SFT	0
9528 	/* Forwarded HWRM Request */
9529 		#define HWRM_FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ  UINT32_C(0x22)
9530 		#define HWRM_FWD_REQ_CMPL_TYPE_LAST	HWRM_FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ
9531 	/* Length of forwarded request in bytes. */
9532 	#define HWRM_FWD_REQ_CMPL_REQ_LEN_MASK	UINT32_C(0xffc0)
9533 	#define HWRM_FWD_REQ_CMPL_REQ_LEN_SFT	6
9534 	/*
9535 	 * Source ID of this request.
9536 	 * Typically used in forwarding requests and responses.
9537 	 * 0x0 - 0xFFF8 - Used for function ids
9538 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
9539 	 * 0xFFFF - HWRM
9540 	 */
9541 	uint16_t	source_id;
9542 	/* unused1 is 32 b */
9543 	uint32_t	unused0;
9544 	/* Address of forwarded request. */
9545 	uint64_t	req_buf_addr_v;
9546 	/*
9547 	 * This value is written by the NIC such that it will be different
9548 	 * for each pass through the completion queue. The even passes
9549 	 * will write 1. The odd passes will write 0.
9550 	 */
9551 	#define HWRM_FWD_REQ_CMPL_V		UINT32_C(0x1)
9552 	/* Address of forwarded request. */
9553 	#define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_MASK UINT32_C(0xfffffffe)
9554 	#define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_SFT 1
9555 } hwrm_fwd_req_cmpl_t, *phwrm_fwd_req_cmpl_t;
9556 
9557 /* hwrm_fwd_resp_cmpl (size:128b/16B) */
9558 
9559 typedef struct hwrm_fwd_resp_cmpl {
9560 	uint16_t	type;
9561 	/*
9562 	 * This field indicates the exact type of the completion.
9563 	 * By convention, the LSB identifies the length of the
9564 	 * record in 16B units. Even values indicate 16B
9565 	 * records. Odd values indicate 32B
9566 	 * records.
9567 	 */
9568 	#define HWRM_FWD_RESP_CMPL_TYPE_MASK	UINT32_C(0x3f)
9569 	#define HWRM_FWD_RESP_CMPL_TYPE_SFT	0
9570 	/* Forwarded HWRM Response */
9571 		#define HWRM_FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP  UINT32_C(0x24)
9572 		#define HWRM_FWD_RESP_CMPL_TYPE_LAST	HWRM_FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP
9573 	/*
9574 	 * Source ID of this response.
9575 	 * Typically used in forwarding requests and responses.
9576 	 * 0x0 - 0xFFF8 - Used for function ids
9577 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
9578 	 * 0xFFFF - HWRM
9579 	 */
9580 	uint16_t	source_id;
9581 	/* Length of forwarded response in bytes. */
9582 	uint16_t	resp_len;
9583 	/* unused2 is 16 b */
9584 	uint16_t	unused_1;
9585 	/* Address of forwarded request. */
9586 	uint64_t	resp_buf_addr_v;
9587 	/*
9588 	 * This value is written by the NIC such that it will be different
9589 	 * for each pass through the completion queue. The even passes
9590 	 * will write 1. The odd passes will write 0.
9591 	 */
9592 	#define HWRM_FWD_RESP_CMPL_V		UINT32_C(0x1)
9593 	/* Address of forwarded request. */
9594 	#define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_MASK UINT32_C(0xfffffffe)
9595 	#define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_SFT 1
9596 } hwrm_fwd_resp_cmpl_t, *phwrm_fwd_resp_cmpl_t;
9597 
9598 /* hwrm_async_event_cmpl (size:128b/16B) */
9599 
9600 typedef struct hwrm_async_event_cmpl {
9601 	uint16_t	type;
9602 	/*
9603 	 * This field indicates the exact type of the completion.
9604 	 * By convention, the LSB identifies the length of the
9605 	 * record in 16B units. Even values indicate 16B
9606 	 * records. Odd values indicate 32B
9607 	 * records.
9608 	 */
9609 	#define HWRM_ASYNC_EVENT_CMPL_TYPE_MASK		UINT32_C(0x3f)
9610 	#define HWRM_ASYNC_EVENT_CMPL_TYPE_SFT		0
9611 	/* HWRM Asynchronous Event Information */
9612 		#define HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
9613 		#define HWRM_ASYNC_EVENT_CMPL_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT
9614 	/* Identifiers of events. */
9615 	uint16_t	event_id;
9616 	/* Link status changed */
9617 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE		UINT32_C(0x0)
9618 	/* Link MTU changed */
9619 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_MTU_CHANGE		UINT32_C(0x1)
9620 	/* Link speed changed */
9621 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE		UINT32_C(0x2)
9622 	/* DCB Configuration changed */
9623 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DCB_CONFIG_CHANGE		UINT32_C(0x3)
9624 	/* Port connection not allowed */
9625 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED	UINT32_C(0x4)
9626 	/* Link speed configuration was not allowed */
9627 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED	UINT32_C(0x5)
9628 	/* Link speed configuration change */
9629 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE	UINT32_C(0x6)
9630 	/* Port PHY configuration change */
9631 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_PHY_CFG_CHANGE		UINT32_C(0x7)
9632 	/* Reset notification to clients */
9633 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY			UINT32_C(0x8)
9634 	/* Master function selection event */
9635 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY		UINT32_C(0x9)
9636 	/*
9637 	 * An event signifying that a ring has been disabled by
9638 	 * hw due to error.
9639 	 */
9640 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RING_MONITOR_MSG		UINT32_C(0xa)
9641 	/* Function driver unloaded */
9642 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_UNLOAD		UINT32_C(0x10)
9643 	/* Function driver loaded */
9644 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_LOAD		UINT32_C(0x11)
9645 	/* Function FLR related processing has completed */
9646 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_FLR_PROC_CMPLT		UINT32_C(0x12)
9647 	/* PF driver unloaded */
9648 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD		UINT32_C(0x20)
9649 	/* PF driver loaded */
9650 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_LOAD			UINT32_C(0x21)
9651 	/* VF Function Level Reset (FLR) */
9652 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_FLR			UINT32_C(0x30)
9653 	/* VF MAC Address Change */
9654 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_MAC_ADDR_CHANGE		UINT32_C(0x31)
9655 	/* PF-VF communication channel status change. */
9656 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_VF_COMM_STATUS_CHANGE	UINT32_C(0x32)
9657 	/* VF Configuration Change */
9658 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE		UINT32_C(0x33)
9659 	/* LLFC/PFC Configuration Change */
9660 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LLFC_PFC_CHANGE		UINT32_C(0x34)
9661 	/* Default VNIC Configuration Change */
9662 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE		UINT32_C(0x35)
9663 	/* HW flow aged */
9664 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HW_FLOW_AGED			UINT32_C(0x36)
9665 	/*
9666 	 * A debug notification being posted to the driver. These
9667 	 * notifications are purely for diagnostic purpose and should not be
9668 	 * used for functional purpose. The driver is not supposed to act
9669 	 * on these messages except to log/record it.
9670 	 */
9671 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION		UINT32_C(0x37)
9672 	/*
9673 	 * An EEM flow cached memory flush for all flows request event being
9674 	 * posted to the PF driver.
9675 	 */
9676 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_CACHE_FLUSH_REQ		UINT32_C(0x38)
9677 	/*
9678 	 * An EEM flow cache memory flush completion event being posted to the
9679 	 * firmware by the PF driver. This is indication that host EEM flush
9680 	 * has completed by the PF.
9681 	 */
9682 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_CACHE_FLUSH_DONE		UINT32_C(0x39)
9683 	/*
9684 	 * A tcp flag action change event being posted to the PF or trusted VF
9685 	 * driver by the firmware. The PF or trusted VF driver should query
9686 	 * the firmware for the new TCP flag action update after receiving
9687 	 * this async event.
9688 	 */
9689 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_TCP_FLAG_ACTION_CHANGE	UINT32_C(0x3a)
9690 	/*
9691 	 * An EEM flow active event being posted to the PF or trusted VF driver
9692 	 * by the firmware. The PF or trusted VF driver should update the
9693 	 * flow's aging timer after receiving this async event.
9694 	 */
9695 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_FLOW_ACTIVE		UINT32_C(0x3b)
9696 	/*
9697 	 * A eem cfg change event being posted to the trusted VF driver by the
9698 	 * firmware if the parent PF EEM configuration changed.
9699 	 */
9700 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_CFG_CHANGE		UINT32_C(0x3c)
9701 	/*
9702 	 * Deprecated.
9703 	 * TFLIB unique default VNIC Configuration Change
9704 	 */
9705 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_TFLIB_DEFAULT_VNIC_CHANGE	UINT32_C(0x3d)
9706 	/*
9707 	 * Deprecated.
9708 	 * TFLIB unique link status changed
9709 	 */
9710 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_TFLIB_LINK_STATUS_CHANGE	UINT32_C(0x3e)
9711 	/*
9712 	 * An event signifying completion for HWRM_FW_STATE_QUIESCE
9713 	 * (completion, timeout, or error)
9714 	 */
9715 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_QUIESCE_DONE			UINT32_C(0x3f)
9716 	/*
9717 	 * An event signifying a HWRM command is in progress and its
9718 	 * response will be deferred. This event is used on crypto controllers
9719 	 * only.
9720 	 */
9721 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEFERRED_RESPONSE		UINT32_C(0x40)
9722 	/*
9723 	 * An event signifying that a PFC WatchDog configuration
9724 	 * has changed on any port / cos.
9725 	 */
9726 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PFC_WATCHDOG_CFG_CHANGE	UINT32_C(0x41)
9727 	/*
9728 	 * An echo request from the firmware. An echo response is expected by
9729 	 * the firmware.
9730 	 */
9731 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ECHO_REQUEST			UINT32_C(0x42)
9732 	/*
9733 	 * An event from firmware indicating who has been selected as the
9734 	 * PHC Master or secondary. Also indicates the last time a failover
9735 	 * happens. Event will also be sent when PHC rolls over.
9736 	 */
9737 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PHC_UPDATE			UINT32_C(0x43)
9738 	/*
9739 	 * An event from firmware showing the last PPS timestamp that has been
9740 	 * latched.
9741 	 */
9742 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PPS_TIMESTAMP		UINT32_C(0x44)
9743 	/*
9744 	 * An event from firmware indicating that an error has occurred.
9745 	 * The driver should log the event so that an administrator can be
9746 	 * aware that a problem has occurred that may need attention.
9747 	 */
9748 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ERROR_REPORT			UINT32_C(0x45)
9749 	/*
9750 	 * An event from firmware indicating that the programmed pacing
9751 	 * threshold for the doorbell global FIFO has been crossed. The driver
9752 	 * needs to take appropriate action to pace the doorbells when this
9753 	 * event is received from the firmware.
9754 	 */
9755 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DOORBELL_PACING_THRESHOLD	UINT32_C(0x46)
9756 	/*
9757 	 * An event from firmware indicating that the RSS capabilities have
9758 	 * changed.
9759 	 */
9760 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RSS_CHANGE			UINT32_C(0x47)
9761 	/*
9762 	 * An event from firmware indicating that list of nq ids used for
9763 	 * doorbell pacing DBQ event notification has been updated. The driver
9764 	 * needs to take appropriate action and retrieve the new list when this
9765 	 * event is received from the firmware.
9766 	 */
9767 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DOORBELL_PACING_NQ_UPDATE	UINT32_C(0x48)
9768 	/*
9769 	 * An event from firmware indicating that hardware ran into an error
9770 	 * while trying to read the host based doorbell copy region. The driver
9771 	 * needs to take the appropriate action and maintain the corresponding
9772 	 * doorbell copy region.
9773 	 */
9774 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR UINT32_C(0x49)
9775 	/*
9776 	 * An event from firmware indicating that the XID partition was not
9777 	 * allocated/freed by the FW successfully for the request that is
9778 	 * encapsulated in the HWRM_EXEC_FWD_RESP by the PF driver for VF.
9779 	 */
9780 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_CTX_ERROR			UINT32_C(0x4a)
9781 	/*
9782 	 * A UDCC session has been modified in the FW. The session_id can be
9783 	 * used by the driver to retrieve information related to the UDCC
9784 	 * session.
9785 	 */
9786 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_UDCC_SESSION_CHANGE		UINT32_C(0x4b)
9787 	/*
9788 	 * Used to notify the host that the firmware has DMA-ed additional
9789 	 * debug data to the host buffer. This is effectively a producer index
9790 	 * update. The host driver can utilize this information to determine
9791 	 * how much of its host buffer has been populated by the firmware.
9792 	 */
9793 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DBG_BUF_PRODUCER		UINT32_C(0x4c)
9794 	/* Maximum Registrable event id. */
9795 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_MAX_RGTR_EVENT_ID		UINT32_C(0x4d)
9796 	/*
9797 	 * A trace log message. This contains firmware trace logs string
9798 	 * embedded in the asynchronous message. This is an experimental
9799 	 * event, not meant for production use at this time.
9800 	 */
9801 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FW_TRACE_MSG			UINT32_C(0xfe)
9802 	/* HWRM Error */
9803 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR			UINT32_C(0xff)
9804 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LAST			HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR
9805 	/* Event specific data */
9806 	uint32_t	event_data2;
9807 	uint8_t	opaque_v;
9808 	/*
9809 	 * This value is written by the NIC such that it will be different
9810 	 * for each pass through the completion queue. The even passes
9811 	 * will write 1. The odd passes will write 0.
9812 	 */
9813 	#define HWRM_ASYNC_EVENT_CMPL_V	UINT32_C(0x1)
9814 	/* opaque is 7 b */
9815 	#define HWRM_ASYNC_EVENT_CMPL_OPAQUE_MASK UINT32_C(0xfe)
9816 	#define HWRM_ASYNC_EVENT_CMPL_OPAQUE_SFT 1
9817 	/* 8-lsb timestamp from POR (100-msec resolution) */
9818 	uint8_t	timestamp_lo;
9819 	/* 16-lsb timestamp from POR (100-msec resolution) */
9820 	uint16_t	timestamp_hi;
9821 	/* Event specific data */
9822 	uint32_t	event_data1;
9823 } hwrm_async_event_cmpl_t, *phwrm_async_event_cmpl_t;
9824 
9825 #define GET_EVENT_ID(x) \
9826 	(((x) < 0x80) ? \
9827 	((x) == 0x0 ? "LINK_STATUS_CHANGE": \
9828 	((x) == 0x1 ? "LINK_MTU_CHANGE": \
9829 	((x) == 0x2 ? "LINK_SPEED_CHANGE": \
9830 	((x) == 0x3 ? "DCB_CONFIG_CHANGE": \
9831 	((x) == 0x4 ? "PORT_CONN_NOT_ALLOWED": \
9832 	((x) == 0x5 ? "LINK_SPEED_CFG_NOT_ALLOWED": \
9833 	((x) == 0x6 ? "LINK_SPEED_CFG_CHANGE": \
9834 	((x) == 0x7 ? "PORT_PHY_CFG_CHANGE": \
9835 	((x) == 0x8 ? "RESET_NOTIFY": \
9836 	((x) == 0x9 ? "ERROR_RECOVERY": \
9837 	((x) == 0xa ? "RING_MONITOR_MSG": \
9838 	((x) == 0x10 ? "FUNC_DRVR_UNLOAD": \
9839 	((x) == 0x11 ? "FUNC_DRVR_LOAD": \
9840 	((x) == 0x12 ? "FUNC_FLR_PROC_CMPLT": \
9841 	((x) == 0x20 ? "PF_DRVR_UNLOAD": \
9842 	((x) == 0x21 ? "PF_DRVR_LOAD": \
9843 	((x) == 0x30 ? "VF_FLR": \
9844 	((x) == 0x31 ? "VF_MAC_ADDR_CHANGE": \
9845 	((x) == 0x32 ? "PF_VF_COMM_STATUS_CHANGE": \
9846 	((x) == 0x33 ? "VF_CFG_CHANGE": \
9847 	((x) == 0x34 ? "LLFC_PFC_CHANGE": \
9848 	((x) == 0x35 ? "DEFAULT_VNIC_CHANGE": \
9849 	((x) == 0x36 ? "HW_FLOW_AGED": \
9850 	((x) == 0x37 ? "DEBUG_NOTIFICATION": \
9851 	((x) == 0x38 ? "EEM_CACHE_FLUSH_REQ": \
9852 	((x) == 0x39 ? "EEM_CACHE_FLUSH_DONE": \
9853 	((x) == 0x3a ? "TCP_FLAG_ACTION_CHANGE": \
9854 	((x) == 0x3b ? "EEM_FLOW_ACTIVE": \
9855 	((x) == 0x3c ? "EEM_CFG_CHANGE": \
9856 	((x) == 0x3d ? "TFLIB_DEFAULT_VNIC_CHANGE": \
9857 	((x) == 0x3e ? "TFLIB_LINK_STATUS_CHANGE": \
9858 	((x) == 0x3f ? "QUIESCE_DONE": \
9859 	((x) == 0x40 ? "DEFERRED_RESPONSE": \
9860 	((x) == 0x41 ? "PFC_WATCHDOG_CFG_CHANGE": \
9861 	((x) == 0x42 ? "ECHO_REQUEST": \
9862 	((x) == 0x43 ? "PHC_UPDATE": \
9863 	((x) == 0x44 ? "PPS_TIMESTAMP": \
9864 	((x) == 0x45 ? "ERROR_REPORT": \
9865 	((x) == 0x46 ? "DOORBELL_PACING_THRESHOLD": \
9866 	((x) == 0x47 ? "RSS_CHANGE": \
9867 	((x) == 0x48 ? "DOORBELL_PACING_NQ_UPDATE": \
9868 	((x) == 0x49 ? "HW_DOORBELL_RECOVERY_READ_ERROR": \
9869 	((x) == 0x4a ? "CTX_ERROR": \
9870 	((x) == 0x4b ? "UDCC_SESSION_CHANGE": \
9871 	((x) == 0x4c ? "DBG_BUF_PRODUCER": \
9872 	((x) == 0x4d ? "MAX_RGTR_EVENT_ID": \
9873 	"Unknown decode" )))))))))))))))))))))))))))))))))))))))))))))) : \
9874 	(((x) < 0x100) ? \
9875 	((x) == 0xfe ? "FW_TRACE_MSG": \
9876 	((x) == 0xff ? "HWRM_ERROR": \
9877 	"Unknown decode" )) : \
9878 	"Unknown decode" ))
9879 
9880 
9881 /* hwrm_async_event_cmpl_link_status_change (size:128b/16B) */
9882 
9883 typedef struct hwrm_async_event_cmpl_link_status_change {
9884 	uint16_t	type;
9885 	/*
9886 	 * This field indicates the exact type of the completion.
9887 	 * By convention, the LSB identifies the length of the
9888 	 * record in 16B units. Even values indicate 16B
9889 	 * records. Odd values indicate 32B
9890 	 * records.
9891 	 */
9892 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_MASK		UINT32_C(0x3f)
9893 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_SFT		0
9894 	/* HWRM Asynchronous Event Information */
9895 		#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
9896 		#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT
9897 	/* Identifiers of events. */
9898 	uint16_t	event_id;
9899 	/* Link status changed */
9900 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE UINT32_C(0x0)
9901 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE
9902 	/* Event specific data */
9903 	uint32_t	event_data2;
9904 	uint8_t	opaque_v;
9905 	/*
9906 	 * This value is written by the NIC such that it will be different
9907 	 * for each pass through the completion queue. The even passes
9908 	 * will write 1. The odd passes will write 0.
9909 	 */
9910 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_V	UINT32_C(0x1)
9911 	/* opaque is 7 b */
9912 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
9913 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_SFT 1
9914 	/* 8-lsb timestamp from POR (100-msec resolution) */
9915 	uint8_t	timestamp_lo;
9916 	/* 16-lsb timestamp from POR (100-msec resolution) */
9917 	uint16_t	timestamp_hi;
9918 	/* Event specific data */
9919 	uint32_t	event_data1;
9920 	/* Indicates link status change */
9921 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE	UINT32_C(0x1)
9922 	/*
9923 	 * If this bit set to 0, then it indicates that the link
9924 	 * was up and it went down.
9925 	 */
9926 		#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_DOWN  UINT32_C(0x0)
9927 	/*
9928 	 * If this bit is set to 1, then it indicates that the link
9929 	 * was down and it went up.
9930 	 */
9931 		#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP	UINT32_C(0x1)
9932 		#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_LAST HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP
9933 	/* Indicates the physical port this link status change occur */
9934 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_MASK	UINT32_C(0xe)
9935 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_SFT	1
9936 	/* PORT ID */
9937 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_MASK	UINT32_C(0xffff0)
9938 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_SFT	4
9939 	/* Indicates the physical function this event occurred on. */
9940 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PF_ID_MASK	UINT32_C(0xff00000)
9941 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PF_ID_SFT	20
9942 } hwrm_async_event_cmpl_link_status_change_t, *phwrm_async_event_cmpl_link_status_change_t;
9943 
9944 /* hwrm_async_event_cmpl_link_mtu_change (size:128b/16B) */
9945 
9946 typedef struct hwrm_async_event_cmpl_link_mtu_change {
9947 	uint16_t	type;
9948 	/*
9949 	 * This field indicates the exact type of the completion.
9950 	 * By convention, the LSB identifies the length of the
9951 	 * record in 16B units. Even values indicate 16B
9952 	 * records. Odd values indicate 32B
9953 	 * records.
9954 	 */
9955 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_MASK		UINT32_C(0x3f)
9956 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_SFT		0
9957 	/* HWRM Asynchronous Event Information */
9958 		#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
9959 		#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_HWRM_ASYNC_EVENT
9960 	/* Identifiers of events. */
9961 	uint16_t	event_id;
9962 	/* Link MTU changed */
9963 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LINK_MTU_CHANGE UINT32_C(0x1)
9964 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LINK_MTU_CHANGE
9965 	/* Event specific data */
9966 	uint32_t	event_data2;
9967 	uint8_t	opaque_v;
9968 	/*
9969 	 * This value is written by the NIC such that it will be different
9970 	 * for each pass through the completion queue. The even passes
9971 	 * will write 1. The odd passes will write 0.
9972 	 */
9973 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_V	UINT32_C(0x1)
9974 	/* opaque is 7 b */
9975 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
9976 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_SFT 1
9977 	/* 8-lsb timestamp from POR (100-msec resolution) */
9978 	uint8_t	timestamp_lo;
9979 	/* 16-lsb timestamp from POR (100-msec resolution) */
9980 	uint16_t	timestamp_hi;
9981 	/* Event specific data */
9982 	uint32_t	event_data1;
9983 	/* The new MTU of the link in bytes. */
9984 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_MASK UINT32_C(0xffff)
9985 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_SFT 0
9986 } hwrm_async_event_cmpl_link_mtu_change_t, *phwrm_async_event_cmpl_link_mtu_change_t;
9987 
9988 /* hwrm_async_event_cmpl_link_speed_change (size:128b/16B) */
9989 
9990 typedef struct hwrm_async_event_cmpl_link_speed_change {
9991 	uint16_t	type;
9992 	/*
9993 	 * This field indicates the exact type of the completion.
9994 	 * By convention, the LSB identifies the length of the
9995 	 * record in 16B units. Even values indicate 16B
9996 	 * records. Odd values indicate 32B
9997 	 * records.
9998 	 */
9999 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_MASK		UINT32_C(0x3f)
10000 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_SFT		0
10001 	/* HWRM Asynchronous Event Information */
10002 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10003 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_HWRM_ASYNC_EVENT
10004 	/* Identifiers of events. */
10005 	uint16_t	event_id;
10006 	/* Link speed changed */
10007 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LINK_SPEED_CHANGE UINT32_C(0x2)
10008 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LINK_SPEED_CHANGE
10009 	/* Event specific data */
10010 	uint32_t	event_data2;
10011 	uint8_t	opaque_v;
10012 	/*
10013 	 * This value is written by the NIC such that it will be different
10014 	 * for each pass through the completion queue. The even passes
10015 	 * will write 1. The odd passes will write 0.
10016 	 */
10017 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_V	UINT32_C(0x1)
10018 	/* opaque is 7 b */
10019 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
10020 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_SFT 1
10021 	/* 8-lsb timestamp from POR (100-msec resolution) */
10022 	uint8_t	timestamp_lo;
10023 	/* 16-lsb timestamp from POR (100-msec resolution) */
10024 	uint16_t	timestamp_hi;
10025 	/* Event specific data */
10026 	uint32_t	event_data1;
10027 	/*
10028 	 * When this bit is '1', the link was forced to the
10029 	 * force_link_speed value.
10030 	 */
10031 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_FORCE			UINT32_C(0x1)
10032 	/* The new link speed in 100 Mbps units. */
10033 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_MASK UINT32_C(0xfffe)
10034 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_SFT  1
10035 	/* 100Mb link speed */
10036 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100MB  (UINT32_C(0x1) << 1)
10037 	/* 1Gb link speed */
10038 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_1GB	(UINT32_C(0xa) << 1)
10039 	/* 2Gb link speed */
10040 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2GB	(UINT32_C(0x14) << 1)
10041 	/* 25Gb link speed */
10042 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2_5GB  (UINT32_C(0x19) << 1)
10043 	/* 10Gb link speed */
10044 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_10GB   (UINT32_C(0x64) << 1)
10045 	/* 20Mb link speed */
10046 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_20GB   (UINT32_C(0xc8) << 1)
10047 	/* 25Gb link speed */
10048 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_25GB   (UINT32_C(0xfa) << 1)
10049 	/* 40Gb link speed */
10050 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_40GB   (UINT32_C(0x190) << 1)
10051 	/* 50Gb link speed */
10052 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_50GB   (UINT32_C(0x1f4) << 1)
10053 	/* 100Gb link speed */
10054 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB  (UINT32_C(0x3e8) << 1)
10055 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_LAST  HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB
10056 	/* PORT ID */
10057 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_MASK		UINT32_C(0xffff0000)
10058 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_SFT		16
10059 } hwrm_async_event_cmpl_link_speed_change_t, *phwrm_async_event_cmpl_link_speed_change_t;
10060 
10061 /* hwrm_async_event_cmpl_dcb_config_change (size:128b/16B) */
10062 
10063 typedef struct hwrm_async_event_cmpl_dcb_config_change {
10064 	uint16_t	type;
10065 	/*
10066 	 * This field indicates the exact type of the completion.
10067 	 * By convention, the LSB identifies the length of the
10068 	 * record in 16B units. Even values indicate 16B
10069 	 * records. Odd values indicate 32B
10070 	 * records.
10071 	 */
10072 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_MASK		UINT32_C(0x3f)
10073 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_SFT		0
10074 	/* HWRM Asynchronous Event Information */
10075 		#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10076 		#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_HWRM_ASYNC_EVENT
10077 	/* Identifiers of events. */
10078 	uint16_t	event_id;
10079 	/* DCB Configuration changed */
10080 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_DCB_CONFIG_CHANGE UINT32_C(0x3)
10081 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_DCB_CONFIG_CHANGE
10082 	/* Event specific data */
10083 	uint32_t	event_data2;
10084 	/* ETS configuration change */
10085 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_ETS	UINT32_C(0x1)
10086 	/* PFC configuration change */
10087 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_PFC	UINT32_C(0x2)
10088 	/* APP configuration change */
10089 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_APP	UINT32_C(0x4)
10090 	/* DSCP configuration change */
10091 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_DSCP	UINT32_C(0x8)
10092 	uint8_t	opaque_v;
10093 	/*
10094 	 * This value is written by the NIC such that it will be different
10095 	 * for each pass through the completion queue. The even passes
10096 	 * will write 1. The odd passes will write 0.
10097 	 */
10098 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_V	UINT32_C(0x1)
10099 	/* opaque is 7 b */
10100 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
10101 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_SFT 1
10102 	/* 8-lsb timestamp from POR (100-msec resolution) */
10103 	uint8_t	timestamp_lo;
10104 	/* 16-lsb timestamp from POR (100-msec resolution) */
10105 	uint16_t	timestamp_hi;
10106 	/* Event specific data */
10107 	uint32_t	event_data1;
10108 	/* PORT ID */
10109 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_MASK		UINT32_C(0xffff)
10110 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_SFT		0
10111 	/* Priority recommended for RoCE traffic */
10112 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_MASK UINT32_C(0xff0000)
10113 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_SFT 16
10114 	/* none is 255 */
10115 		#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_NONE  (UINT32_C(0xff) << 16)
10116 		#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_LAST HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_NONE
10117 	/* Priority recommended for L2 traffic */
10118 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_MASK  UINT32_C(0xff000000)
10119 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_SFT   24
10120 	/* none is 255 */
10121 		#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_NONE	(UINT32_C(0xff) << 24)
10122 		#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_LAST   HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_NONE
10123 } hwrm_async_event_cmpl_dcb_config_change_t, *phwrm_async_event_cmpl_dcb_config_change_t;
10124 
10125 /* hwrm_async_event_cmpl_port_conn_not_allowed (size:128b/16B) */
10126 
10127 typedef struct hwrm_async_event_cmpl_port_conn_not_allowed {
10128 	uint16_t	type;
10129 	/*
10130 	 * This field indicates the exact type of the completion.
10131 	 * By convention, the LSB identifies the length of the
10132 	 * record in 16B units. Even values indicate 16B
10133 	 * records. Odd values indicate 32B
10134 	 * records.
10135 	 */
10136 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_MASK		UINT32_C(0x3f)
10137 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_SFT		0
10138 	/* HWRM Asynchronous Event Information */
10139 		#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10140 		#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT
10141 	/* Identifiers of events. */
10142 	uint16_t	event_id;
10143 	/* Port connection not allowed */
10144 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED UINT32_C(0x4)
10145 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED
10146 	/* Event specific data */
10147 	uint32_t	event_data2;
10148 	uint8_t	opaque_v;
10149 	/*
10150 	 * This value is written by the NIC such that it will be different
10151 	 * for each pass through the completion queue. The even passes
10152 	 * will write 1. The odd passes will write 0.
10153 	 */
10154 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_V	UINT32_C(0x1)
10155 	/* opaque is 7 b */
10156 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_MASK UINT32_C(0xfe)
10157 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_SFT 1
10158 	/* 8-lsb timestamp from POR (100-msec resolution) */
10159 	uint8_t	timestamp_lo;
10160 	/* 16-lsb timestamp from POR (100-msec resolution) */
10161 	uint16_t	timestamp_hi;
10162 	/* Event specific data */
10163 	uint32_t	event_data1;
10164 	/* PORT ID */
10165 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK		UINT32_C(0xffff)
10166 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT		0
10167 	/*
10168 	 * This value indicates the current port level enforcement policy
10169 	 * for the optics module when there is an optical module mismatch
10170 	 * and port is not connected.
10171 	 */
10172 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_MASK	UINT32_C(0xff0000)
10173 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_SFT	16
10174 	/* No enforcement */
10175 		#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_NONE	(UINT32_C(0x0) << 16)
10176 	/* Disable Transmit side Laser. */
10177 		#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_DISABLETX   (UINT32_C(0x1) << 16)
10178 	/* Raise a warning message. */
10179 		#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_WARNINGMSG  (UINT32_C(0x2) << 16)
10180 	/* Power down the module. */
10181 		#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN	(UINT32_C(0x3) << 16)
10182 		#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_LAST	HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN
10183 } hwrm_async_event_cmpl_port_conn_not_allowed_t, *phwrm_async_event_cmpl_port_conn_not_allowed_t;
10184 
10185 /* hwrm_async_event_cmpl_link_speed_cfg_not_allowed (size:128b/16B) */
10186 
10187 typedef struct hwrm_async_event_cmpl_link_speed_cfg_not_allowed {
10188 	uint16_t	type;
10189 	/*
10190 	 * This field indicates the exact type of the completion.
10191 	 * By convention, the LSB identifies the length of the
10192 	 * record in 16B units. Even values indicate 16B
10193 	 * records. Odd values indicate 32B
10194 	 * records.
10195 	 */
10196 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_MASK		UINT32_C(0x3f)
10197 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_SFT		0
10198 	/* HWRM Asynchronous Event Information */
10199 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10200 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT
10201 	/* Identifiers of events. */
10202 	uint16_t	event_id;
10203 	/* Link speed configuration was not allowed */
10204 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED UINT32_C(0x5)
10205 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LAST			HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED
10206 	/* Event specific data */
10207 	uint32_t	event_data2;
10208 	uint8_t	opaque_v;
10209 	/*
10210 	 * This value is written by the NIC such that it will be different
10211 	 * for each pass through the completion queue. The even passes
10212 	 * will write 1. The odd passes will write 0.
10213 	 */
10214 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_V	UINT32_C(0x1)
10215 	/* opaque is 7 b */
10216 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_MASK UINT32_C(0xfe)
10217 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_SFT 1
10218 	/* 8-lsb timestamp from POR (100-msec resolution) */
10219 	uint8_t	timestamp_lo;
10220 	/* 16-lsb timestamp from POR (100-msec resolution) */
10221 	uint16_t	timestamp_hi;
10222 	/* Event specific data */
10223 	uint32_t	event_data1;
10224 	/* PORT ID */
10225 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK UINT32_C(0xffff)
10226 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT 0
10227 } hwrm_async_event_cmpl_link_speed_cfg_not_allowed_t, *phwrm_async_event_cmpl_link_speed_cfg_not_allowed_t;
10228 
10229 /* hwrm_async_event_cmpl_link_speed_cfg_change (size:128b/16B) */
10230 
10231 typedef struct hwrm_async_event_cmpl_link_speed_cfg_change {
10232 	uint16_t	type;
10233 	/*
10234 	 * This field indicates the exact type of the completion.
10235 	 * By convention, the LSB identifies the length of the
10236 	 * record in 16B units. Even values indicate 16B
10237 	 * records. Odd values indicate 32B
10238 	 * records.
10239 	 */
10240 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_MASK		UINT32_C(0x3f)
10241 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_SFT		0
10242 	/* HWRM Asynchronous Event Information */
10243 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10244 		#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
10245 	/* Identifiers of events. */
10246 	uint16_t	event_id;
10247 	/* Link speed configuration change */
10248 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE UINT32_C(0x6)
10249 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE
10250 	/* Event specific data */
10251 	uint32_t	event_data2;
10252 	uint8_t	opaque_v;
10253 	/*
10254 	 * This value is written by the NIC such that it will be different
10255 	 * for each pass through the completion queue. The even passes
10256 	 * will write 1. The odd passes will write 0.
10257 	 */
10258 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_V	UINT32_C(0x1)
10259 	/* opaque is 7 b */
10260 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
10261 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_SFT 1
10262 	/* 8-lsb timestamp from POR (100-msec resolution) */
10263 	uint8_t	timestamp_lo;
10264 	/* 16-lsb timestamp from POR (100-msec resolution) */
10265 	uint16_t	timestamp_hi;
10266 	/* Event specific data */
10267 	uint32_t	event_data1;
10268 	/* PORT ID */
10269 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK			UINT32_C(0xffff)
10270 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT			0
10271 	/*
10272 	 * If set to 1, it indicates that the supported link speeds
10273 	 * configuration on the port has changed.
10274 	 * If set to 0, then there is no change in supported link speeds
10275 	 * configuration.
10276 	 */
10277 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_SUPPORTED_LINK_SPEEDS_CHANGE	UINT32_C(0x10000)
10278 	/*
10279 	 * If set to 1, it indicates that the link speed configuration
10280 	 * on the port has become illegal or invalid.
10281 	 * If set to 0, then the link speed configuration on the port is
10282 	 * legal or valid.
10283 	 */
10284 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_ILLEGAL_LINK_SPEED_CFG	UINT32_C(0x20000)
10285 } hwrm_async_event_cmpl_link_speed_cfg_change_t, *phwrm_async_event_cmpl_link_speed_cfg_change_t;
10286 
10287 /* hwrm_async_event_cmpl_port_phy_cfg_change (size:128b/16B) */
10288 
10289 typedef struct hwrm_async_event_cmpl_port_phy_cfg_change {
10290 	uint16_t	type;
10291 	/*
10292 	 * This field indicates the exact type of the completion.
10293 	 * By convention, the LSB identifies the length of the
10294 	 * record in 16B units. Even values indicate 16B
10295 	 * records. Odd values indicate 32B
10296 	 * records.
10297 	 */
10298 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_MASK		UINT32_C(0x3f)
10299 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_SFT		0
10300 	/* HWRM Asynchronous Event Information */
10301 		#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10302 		#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
10303 	/* Identifiers of events. */
10304 	uint16_t	event_id;
10305 	/* Port PHY configuration change */
10306 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_ID_PORT_PHY_CFG_CHANGE UINT32_C(0x7)
10307 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_ID_PORT_PHY_CFG_CHANGE
10308 	/* Event specific data */
10309 	uint32_t	event_data2;
10310 	uint8_t	opaque_v;
10311 	/*
10312 	 * This value is written by the NIC such that it will be different
10313 	 * for each pass through the completion queue. The even passes
10314 	 * will write 1. The odd passes will write 0.
10315 	 */
10316 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_V	UINT32_C(0x1)
10317 	/* opaque is 7 b */
10318 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
10319 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_OPAQUE_SFT 1
10320 	/* 8-lsb timestamp from POR (100-msec resolution) */
10321 	uint8_t	timestamp_lo;
10322 	/* 16-lsb timestamp from POR (100-msec resolution) */
10323 	uint16_t	timestamp_hi;
10324 	/* Event specific data */
10325 	uint32_t	event_data1;
10326 	/* PORT ID */
10327 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK	UINT32_C(0xffff)
10328 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT	0
10329 	/*
10330 	 * If set to 1, it indicates that the FEC
10331 	 * configuration on the port has changed.
10332 	 * If set to 0, then there is no change in FEC configuration.
10333 	 */
10334 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_FEC_CFG_CHANGE	UINT32_C(0x10000)
10335 	/*
10336 	 * If set to 1, it indicates that the EEE configuration
10337 	 * on the port has changed.
10338 	 * If set to 0, then there is no change in EEE configuration
10339 	 * on the port.
10340 	 */
10341 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_EEE_CFG_CHANGE	UINT32_C(0x20000)
10342 	/*
10343 	 * If set to 1, it indicates that the pause configuration
10344 	 * on the PHY has changed.
10345 	 * If set to 0, then there is no change in the pause
10346 	 * configuration on the PHY.
10347 	 */
10348 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PAUSE_CFG_CHANGE	UINT32_C(0x40000)
10349 } hwrm_async_event_cmpl_port_phy_cfg_change_t, *phwrm_async_event_cmpl_port_phy_cfg_change_t;
10350 
10351 /* hwrm_async_event_cmpl_reset_notify (size:128b/16B) */
10352 
10353 typedef struct hwrm_async_event_cmpl_reset_notify {
10354 	uint16_t	type;
10355 	/*
10356 	 * This field indicates the exact type of the completion.
10357 	 * By convention, the LSB identifies the length of the
10358 	 * record in 16B units. Even values indicate 16B
10359 	 * records. Odd values indicate 32B
10360 	 * records.
10361 	 */
10362 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_MASK		UINT32_C(0x3f)
10363 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_SFT		0
10364 	/* HWRM Asynchronous Event Information */
10365 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10366 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_HWRM_ASYNC_EVENT
10367 	/* Identifiers of events. */
10368 	uint16_t	event_id;
10369 	/* Notify clients of imminent reset. */
10370 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_ID_RESET_NOTIFY UINT32_C(0x8)
10371 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_ID_RESET_NOTIFY
10372 	/* Event specific data. The data is for internal debug use only. */
10373 	uint32_t	event_data2;
10374 	/*
10375 	 * These bits indicate the status as being reported by the firmware.
10376 	 * This value is exactly the same as status code in fw_status register.
10377 	 * If the status code is equal to 0x8000, then the reset is initiated
10378 	 * by the Host using the FW_RESET command when the FW is in a healthy
10379 	 * state. If the status code is not equal to 0x8000, then the reset is
10380 	 * initiated by the FW to recover from the error or FATAL state.
10381 	 */
10382 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA2_FW_STATUS_CODE_MASK UINT32_C(0xffff)
10383 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA2_FW_STATUS_CODE_SFT 0
10384 	uint8_t	opaque_v;
10385 	/*
10386 	 * This value is written by the NIC such that it will be different
10387 	 * for each pass through the completion queue. The even passes
10388 	 * will write 1. The odd passes will write 0.
10389 	 */
10390 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_V	UINT32_C(0x1)
10391 	/* opaque is 7 b */
10392 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_OPAQUE_MASK UINT32_C(0xfe)
10393 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_OPAQUE_SFT 1
10394 	/*
10395 	 * 8-lsb timestamp (100-msec resolution)
10396 	 * The Minimum time required for the Firmware readiness after sending
10397 	 * this notification to the driver instances.
10398 	 */
10399 	uint8_t	timestamp_lo;
10400 	/*
10401 	 * 16-lsb timestamp (100-msec resolution)
10402 	 * The Maximum Firmware Reset bail out value in the order of 100
10403 	 * milliseconds. The driver instances will use this value to reinitiate
10404 	 * the registration process again if the core firmware didn't set the
10405 	 * state bit.
10406 	 */
10407 	uint16_t	timestamp_hi;
10408 	/* Event specific data */
10409 	uint32_t	event_data1;
10410 	/* Indicates driver action requested */
10411 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_MASK		UINT32_C(0xff)
10412 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_SFT		0
10413 	/*
10414 	 * If set to 1, it indicates that the l2 client should
10415 	 * stop sending in band traffic to Nitro.
10416 	 * if set to 0, there is no change in L2 client behavior.
10417 	 */
10418 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_DRIVER_STOP_TX_QUEUE	UINT32_C(0x1)
10419 	/*
10420 	 * If set to 1, it indicates that the L2 client should
10421 	 * bring down the interface.
10422 	 * If set to 0, then there is no change in L2 client behavior.
10423 	 */
10424 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_DRIVER_IFDOWN	UINT32_C(0x2)
10425 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_LAST		HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_DRIVER_IFDOWN
10426 	/* Indicates reason for reset. */
10427 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_MASK			UINT32_C(0xff00)
10428 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_SFT			8
10429 	/* A management client has requested reset. */
10430 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_MANAGEMENT_RESET_REQUEST  (UINT32_C(0x1) << 8)
10431 	/* A fatal firmware exception has occurred. */
10432 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_EXCEPTION_FATAL	(UINT32_C(0x2) << 8)
10433 	/* A non-fatal firmware exception has occurred. */
10434 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_EXCEPTION_NON_FATAL	(UINT32_C(0x3) << 8)
10435 	/* Fast reset */
10436 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FAST_RESET		(UINT32_C(0x4) << 8)
10437 	/*
10438 	 * Reset was a result of a firmware activation. That is, the
10439 	 * fw_activation flag was set in a FW_RESET operation.
10440 	 */
10441 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_ACTIVATION		(UINT32_C(0x5) << 8)
10442 		#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_LAST			HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_ACTIVATION
10443 	/*
10444 	 * Minimum time before driver should attempt access - units 100ms
10445 	 * ticks.
10446 	 * Range 0-65535
10447 	 */
10448 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DELAY_IN_100MS_TICKS_MASK	UINT32_C(0xffff0000)
10449 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DELAY_IN_100MS_TICKS_SFT		16
10450 } hwrm_async_event_cmpl_reset_notify_t, *phwrm_async_event_cmpl_reset_notify_t;
10451 
10452 /* hwrm_async_event_cmpl_error_recovery (size:128b/16B) */
10453 
10454 typedef struct hwrm_async_event_cmpl_error_recovery {
10455 	uint16_t	type;
10456 	/*
10457 	 * This field indicates the exact type of the completion.
10458 	 * By convention, the LSB identifies the length of the
10459 	 * record in 16B units. Even values indicate 16B
10460 	 * records. Odd values indicate 32B
10461 	 * records.
10462 	 */
10463 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_MASK		UINT32_C(0x3f)
10464 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_SFT		0
10465 	/* HWRM Asynchronous Event Information */
10466 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10467 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_HWRM_ASYNC_EVENT
10468 	/* Identifiers of events. */
10469 	uint16_t	event_id;
10470 	/*
10471 	 * This async notification message can be used for selecting or
10472 	 * deselecting master function for error recovery,
10473 	 * and to communicate to all the functions whether error recovery
10474 	 * was enabled/disabled.
10475 	 */
10476 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_ID_ERROR_RECOVERY UINT32_C(0x9)
10477 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_ID_ERROR_RECOVERY
10478 	/* Event specific data */
10479 	uint32_t	event_data2;
10480 	uint8_t	opaque_v;
10481 	/*
10482 	 * This value is written by the NIC such that it will be different
10483 	 * for each pass through the completion queue. The even passes
10484 	 * will write 1. The odd passes will write 0.
10485 	 */
10486 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_V	UINT32_C(0x1)
10487 	/* opaque is 7 b */
10488 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_OPAQUE_MASK UINT32_C(0xfe)
10489 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_OPAQUE_SFT 1
10490 	/* 8-lsb timestamp (100-msec resolution) */
10491 	uint8_t	timestamp_lo;
10492 	/* 16-lsb timestamp (100-msec resolution) */
10493 	uint16_t	timestamp_hi;
10494 	/* Event specific data */
10495 	uint32_t	event_data1;
10496 	/* Indicates driver action requested */
10497 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_MASK		UINT32_C(0xff)
10498 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_SFT		0
10499 	/*
10500 	 * If set to 1, this function is selected as Master function.
10501 	 * This function has responsibility to do 'chip reset' when it
10502 	 * detects a fatal error. If set to 0, master function functionality
10503 	 * is disabled on this function.
10504 	 */
10505 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_MASTER_FUNC	UINT32_C(0x1)
10506 	/*
10507 	 * If set to 1, error recovery is enabled.
10508 	 * If set to 0, error recovery is disabled.
10509 	 */
10510 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_RECOVERY_ENABLED	UINT32_C(0x2)
10511 } hwrm_async_event_cmpl_error_recovery_t, *phwrm_async_event_cmpl_error_recovery_t;
10512 
10513 /* hwrm_async_event_cmpl_ring_monitor_msg (size:128b/16B) */
10514 
10515 typedef struct hwrm_async_event_cmpl_ring_monitor_msg {
10516 	uint16_t	type;
10517 	/*
10518 	 * This field indicates the exact type of the completion.
10519 	 * By convention, the LSB identifies the length of the
10520 	 * record in 16B units. Even values indicate 16B
10521 	 * records. Odd values indicate 32B
10522 	 * records.
10523 	 */
10524 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_MASK		UINT32_C(0x3f)
10525 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_SFT		0
10526 	/* HWRM Asynchronous Event Information */
10527 		#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10528 		#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_HWRM_ASYNC_EVENT
10529 	/* Identifiers of events. */
10530 	uint16_t	event_id;
10531 	/* Ring Monitor Message. */
10532 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_ID_RING_MONITOR_MSG UINT32_C(0xa)
10533 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_ID_RING_MONITOR_MSG
10534 	/* Event specific data */
10535 	uint32_t	event_data2;
10536 	/* Type of Ring disabled. */
10537 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_MASK UINT32_C(0xff)
10538 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_SFT 0
10539 	/* tx ring disabled. */
10540 		#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_TX	UINT32_C(0x0)
10541 	/* rx ring disabled. */
10542 		#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_RX	UINT32_C(0x1)
10543 	/* cmpl ring disabled. */
10544 		#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_CMPL  UINT32_C(0x2)
10545 		#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_LAST HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_CMPL
10546 	uint8_t	opaque_v;
10547 	/*
10548 	 * This value is written by the NIC such that it will be different
10549 	 * for each pass through the completion queue. The even passes
10550 	 * will write 1. The odd passes will write 0.
10551 	 */
10552 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_V	UINT32_C(0x1)
10553 	/* opaque is 7 b */
10554 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_OPAQUE_MASK UINT32_C(0xfe)
10555 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_OPAQUE_SFT 1
10556 	/* 8-lsb timestamp from POR (100-msec resolution) */
10557 	uint8_t	timestamp_lo;
10558 	/* 16-lsb timestamp from POR (100-msec resolution) */
10559 	uint16_t	timestamp_hi;
10560 	/*
10561 	 * Event specific data. If ring_type_disabled indicates a tx, rx or cmpl
10562 	 * then this field will indicate the ring id.
10563 	 */
10564 	uint32_t	event_data1;
10565 } hwrm_async_event_cmpl_ring_monitor_msg_t, *phwrm_async_event_cmpl_ring_monitor_msg_t;
10566 
10567 /* hwrm_async_event_cmpl_func_drvr_unload (size:128b/16B) */
10568 
10569 typedef struct hwrm_async_event_cmpl_func_drvr_unload {
10570 	uint16_t	type;
10571 	/*
10572 	 * This field indicates the exact type of the completion.
10573 	 * By convention, the LSB identifies the length of the
10574 	 * record in 16B units. Even values indicate 16B
10575 	 * records. Odd values indicate 32B
10576 	 * records.
10577 	 */
10578 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_MASK		UINT32_C(0x3f)
10579 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_SFT		0
10580 	/* HWRM Asynchronous Event Information */
10581 		#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10582 		#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT
10583 	/* Identifiers of events. */
10584 	uint16_t	event_id;
10585 	/* Function driver unloaded */
10586 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_FUNC_DRVR_UNLOAD UINT32_C(0x10)
10587 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_FUNC_DRVR_UNLOAD
10588 	/* Event specific data */
10589 	uint32_t	event_data2;
10590 	uint8_t	opaque_v;
10591 	/*
10592 	 * This value is written by the NIC such that it will be different
10593 	 * for each pass through the completion queue. The even passes
10594 	 * will write 1. The odd passes will write 0.
10595 	 */
10596 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_V	UINT32_C(0x1)
10597 	/* opaque is 7 b */
10598 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_MASK UINT32_C(0xfe)
10599 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_SFT 1
10600 	/* 8-lsb timestamp from POR (100-msec resolution) */
10601 	uint8_t	timestamp_lo;
10602 	/* 16-lsb timestamp from POR (100-msec resolution) */
10603 	uint16_t	timestamp_hi;
10604 	/* Event specific data */
10605 	uint32_t	event_data1;
10606 	/* Function ID */
10607 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff)
10608 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT 0
10609 } hwrm_async_event_cmpl_func_drvr_unload_t, *phwrm_async_event_cmpl_func_drvr_unload_t;
10610 
10611 /* hwrm_async_event_cmpl_func_drvr_load (size:128b/16B) */
10612 
10613 typedef struct hwrm_async_event_cmpl_func_drvr_load {
10614 	uint16_t	type;
10615 	/*
10616 	 * This field indicates the exact type of the completion.
10617 	 * By convention, the LSB identifies the length of the
10618 	 * record in 16B units. Even values indicate 16B
10619 	 * records. Odd values indicate 32B
10620 	 * records.
10621 	 */
10622 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_MASK		UINT32_C(0x3f)
10623 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_SFT		0
10624 	/* HWRM Asynchronous Event Information */
10625 		#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10626 		#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT
10627 	/* Identifiers of events. */
10628 	uint16_t	event_id;
10629 	/* Function driver loaded */
10630 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_FUNC_DRVR_LOAD UINT32_C(0x11)
10631 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_FUNC_DRVR_LOAD
10632 	/* Event specific data */
10633 	uint32_t	event_data2;
10634 	uint8_t	opaque_v;
10635 	/*
10636 	 * This value is written by the NIC such that it will be different
10637 	 * for each pass through the completion queue. The even passes
10638 	 * will write 1. The odd passes will write 0.
10639 	 */
10640 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_V	UINT32_C(0x1)
10641 	/* opaque is 7 b */
10642 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_MASK UINT32_C(0xfe)
10643 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_SFT 1
10644 	/* 8-lsb timestamp from POR (100-msec resolution) */
10645 	uint8_t	timestamp_lo;
10646 	/* 16-lsb timestamp from POR (100-msec resolution) */
10647 	uint16_t	timestamp_hi;
10648 	/* Event specific data */
10649 	uint32_t	event_data1;
10650 	/* Function ID */
10651 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff)
10652 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0
10653 } hwrm_async_event_cmpl_func_drvr_load_t, *phwrm_async_event_cmpl_func_drvr_load_t;
10654 
10655 /* hwrm_async_event_cmpl_func_flr_proc_cmplt (size:128b/16B) */
10656 
10657 typedef struct hwrm_async_event_cmpl_func_flr_proc_cmplt {
10658 	uint16_t	type;
10659 	/*
10660 	 * This field indicates the exact type of the completion.
10661 	 * By convention, the LSB identifies the length of the
10662 	 * record in 16B units. Even values indicate 16B
10663 	 * records. Odd values indicate 32B
10664 	 * records.
10665 	 */
10666 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_MASK		UINT32_C(0x3f)
10667 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_SFT		0
10668 	/* HWRM Asynchronous Event Information */
10669 		#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10670 		#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_HWRM_ASYNC_EVENT
10671 	/* Identifiers of events. */
10672 	uint16_t	event_id;
10673 	/* Function FLR related processing has completed */
10674 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_ID_FUNC_FLR_PROC_CMPLT UINT32_C(0x12)
10675 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_ID_FUNC_FLR_PROC_CMPLT
10676 	/* Event specific data */
10677 	uint32_t	event_data2;
10678 	uint8_t	opaque_v;
10679 	/*
10680 	 * This value is written by the NIC such that it will be different
10681 	 * for each pass through the completion queue. The even passes
10682 	 * will write 1. The odd passes will write 0.
10683 	 */
10684 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_V	UINT32_C(0x1)
10685 	/* opaque is 7 b */
10686 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_OPAQUE_MASK UINT32_C(0xfe)
10687 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_OPAQUE_SFT 1
10688 	/* 8-lsb timestamp from POR (100-msec resolution) */
10689 	uint8_t	timestamp_lo;
10690 	/* 16-lsb timestamp from POR (100-msec resolution) */
10691 	uint16_t	timestamp_hi;
10692 	/* Event specific data */
10693 	uint32_t	event_data1;
10694 	/* Function ID */
10695 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff)
10696 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_DATA1_FUNC_ID_SFT 0
10697 } hwrm_async_event_cmpl_func_flr_proc_cmplt_t, *phwrm_async_event_cmpl_func_flr_proc_cmplt_t;
10698 
10699 /* hwrm_async_event_cmpl_pf_drvr_unload (size:128b/16B) */
10700 
10701 typedef struct hwrm_async_event_cmpl_pf_drvr_unload {
10702 	uint16_t	type;
10703 	/*
10704 	 * This field indicates the exact type of the completion.
10705 	 * By convention, the LSB identifies the length of the
10706 	 * record in 16B units. Even values indicate 16B
10707 	 * records. Odd values indicate 32B
10708 	 * records.
10709 	 */
10710 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_MASK		UINT32_C(0x3f)
10711 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_SFT		0
10712 	/* HWRM Asynchronous Event Information */
10713 		#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10714 		#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT
10715 	/* Identifiers of events. */
10716 	uint16_t	event_id;
10717 	/* PF driver unloaded */
10718 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_PF_DRVR_UNLOAD UINT32_C(0x20)
10719 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_PF_DRVR_UNLOAD
10720 	/* Event specific data */
10721 	uint32_t	event_data2;
10722 	uint8_t	opaque_v;
10723 	/*
10724 	 * This value is written by the NIC such that it will be different
10725 	 * for each pass through the completion queue. The even passes
10726 	 * will write 1. The odd passes will write 0.
10727 	 */
10728 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_V	UINT32_C(0x1)
10729 	/* opaque is 7 b */
10730 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_MASK UINT32_C(0xfe)
10731 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_SFT 1
10732 	/* 8-lsb timestamp from POR (100-msec resolution) */
10733 	uint8_t	timestamp_lo;
10734 	/* 16-lsb timestamp from POR (100-msec resolution) */
10735 	uint16_t	timestamp_hi;
10736 	/* Event specific data */
10737 	uint32_t	event_data1;
10738 	/* PF ID */
10739 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff)
10740 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT 0
10741 	/* Indicates the physical port this pf belongs to */
10742 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_MASK   UINT32_C(0x70000)
10743 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_SFT	16
10744 } hwrm_async_event_cmpl_pf_drvr_unload_t, *phwrm_async_event_cmpl_pf_drvr_unload_t;
10745 
10746 /* hwrm_async_event_cmpl_pf_drvr_load (size:128b/16B) */
10747 
10748 typedef struct hwrm_async_event_cmpl_pf_drvr_load {
10749 	uint16_t	type;
10750 	/*
10751 	 * This field indicates the exact type of the completion.
10752 	 * By convention, the LSB identifies the length of the
10753 	 * record in 16B units. Even values indicate 16B
10754 	 * records. Odd values indicate 32B
10755 	 * records.
10756 	 */
10757 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_MASK		UINT32_C(0x3f)
10758 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_SFT		0
10759 	/* HWRM Asynchronous Event Information */
10760 		#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10761 		#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT
10762 	/* Identifiers of events. */
10763 	uint16_t	event_id;
10764 	/* PF driver loaded */
10765 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_PF_DRVR_LOAD UINT32_C(0x21)
10766 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_PF_DRVR_LOAD
10767 	/* Event specific data */
10768 	uint32_t	event_data2;
10769 	uint8_t	opaque_v;
10770 	/*
10771 	 * This value is written by the NIC such that it will be different
10772 	 * for each pass through the completion queue. The even passes
10773 	 * will write 1. The odd passes will write 0.
10774 	 */
10775 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_V	UINT32_C(0x1)
10776 	/* opaque is 7 b */
10777 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_MASK UINT32_C(0xfe)
10778 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_SFT 1
10779 	/* 8-lsb timestamp from POR (100-msec resolution) */
10780 	uint8_t	timestamp_lo;
10781 	/* 16-lsb timestamp from POR (100-msec resolution) */
10782 	uint16_t	timestamp_hi;
10783 	/* Event specific data */
10784 	uint32_t	event_data1;
10785 	/* PF ID */
10786 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK UINT32_C(0xffff)
10787 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0
10788 	/* Indicates the physical port this pf belongs to */
10789 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_MASK   UINT32_C(0x70000)
10790 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_SFT	16
10791 } hwrm_async_event_cmpl_pf_drvr_load_t, *phwrm_async_event_cmpl_pf_drvr_load_t;
10792 
10793 /* hwrm_async_event_cmpl_vf_flr (size:128b/16B) */
10794 
10795 typedef struct hwrm_async_event_cmpl_vf_flr {
10796 	uint16_t	type;
10797 	/*
10798 	 * This field indicates the exact type of the completion.
10799 	 * By convention, the LSB identifies the length of the
10800 	 * record in 16B units. Even values indicate 16B
10801 	 * records. Odd values indicate 32B
10802 	 * records.
10803 	 */
10804 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_MASK		UINT32_C(0x3f)
10805 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_SFT		0
10806 	/* HWRM Asynchronous Event Information */
10807 		#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10808 		#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_HWRM_ASYNC_EVENT
10809 	/* Identifiers of events. */
10810 	uint16_t	event_id;
10811 	/* VF Function Level Reset (FLR) */
10812 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_VF_FLR UINT32_C(0x30)
10813 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_LAST  HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_VF_FLR
10814 	/* Event specific data */
10815 	uint32_t	event_data2;
10816 	uint8_t	opaque_v;
10817 	/*
10818 	 * This value is written by the NIC such that it will be different
10819 	 * for each pass through the completion queue. The even passes
10820 	 * will write 1. The odd passes will write 0.
10821 	 */
10822 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_V	UINT32_C(0x1)
10823 	/* opaque is 7 b */
10824 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_MASK UINT32_C(0xfe)
10825 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_SFT 1
10826 	/* 8-lsb timestamp from POR (100-msec resolution) */
10827 	uint8_t	timestamp_lo;
10828 	/* 16-lsb timestamp from POR (100-msec resolution) */
10829 	uint16_t	timestamp_hi;
10830 	/* Event specific data */
10831 	uint32_t	event_data1;
10832 	/* VF ID */
10833 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_MASK UINT32_C(0xffff)
10834 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_SFT 0
10835 	/* Indicates the physical function this event occurred on. */
10836 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_PF_ID_MASK UINT32_C(0xff0000)
10837 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_PF_ID_SFT 16
10838 } hwrm_async_event_cmpl_vf_flr_t, *phwrm_async_event_cmpl_vf_flr_t;
10839 
10840 /* hwrm_async_event_cmpl_vf_mac_addr_change (size:128b/16B) */
10841 
10842 typedef struct hwrm_async_event_cmpl_vf_mac_addr_change {
10843 	uint16_t	type;
10844 	/*
10845 	 * This field indicates the exact type of the completion.
10846 	 * By convention, the LSB identifies the length of the
10847 	 * record in 16B units. Even values indicate 16B
10848 	 * records. Odd values indicate 32B
10849 	 * records.
10850 	 */
10851 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_MASK		UINT32_C(0x3f)
10852 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_SFT		0
10853 	/* HWRM Asynchronous Event Information */
10854 		#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10855 		#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_HWRM_ASYNC_EVENT
10856 	/* Identifiers of events. */
10857 	uint16_t	event_id;
10858 	/* VF MAC Address Change */
10859 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_VF_MAC_ADDR_CHANGE UINT32_C(0x31)
10860 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_VF_MAC_ADDR_CHANGE
10861 	/* Event specific data */
10862 	uint32_t	event_data2;
10863 	uint8_t	opaque_v;
10864 	/*
10865 	 * This value is written by the NIC such that it will be different
10866 	 * for each pass through the completion queue. The even passes
10867 	 * will write 1. The odd passes will write 0.
10868 	 */
10869 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_V	UINT32_C(0x1)
10870 	/* opaque is 7 b */
10871 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
10872 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_SFT 1
10873 	/* 8-lsb timestamp from POR (100-msec resolution) */
10874 	uint8_t	timestamp_lo;
10875 	/* 16-lsb timestamp from POR (100-msec resolution) */
10876 	uint16_t	timestamp_hi;
10877 	/* Event specific data */
10878 	uint32_t	event_data1;
10879 	/* VF ID */
10880 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_MASK UINT32_C(0xffff)
10881 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_SFT 0
10882 } hwrm_async_event_cmpl_vf_mac_addr_change_t, *phwrm_async_event_cmpl_vf_mac_addr_change_t;
10883 
10884 /* hwrm_async_event_cmpl_pf_vf_comm_status_change (size:128b/16B) */
10885 
10886 typedef struct hwrm_async_event_cmpl_pf_vf_comm_status_change {
10887 	uint16_t	type;
10888 	/*
10889 	 * This field indicates the exact type of the completion.
10890 	 * By convention, the LSB identifies the length of the
10891 	 * record in 16B units. Even values indicate 16B
10892 	 * records. Odd values indicate 32B
10893 	 * records.
10894 	 */
10895 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_MASK		UINT32_C(0x3f)
10896 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_SFT		0
10897 	/* HWRM Asynchronous Event Information */
10898 		#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10899 		#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT
10900 	/* Identifiers of events. */
10901 	uint16_t	event_id;
10902 	/* PF-VF communication channel status change. */
10903 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_PF_VF_COMM_STATUS_CHANGE UINT32_C(0x32)
10904 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_LAST			HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_PF_VF_COMM_STATUS_CHANGE
10905 	/* Event specific data */
10906 	uint32_t	event_data2;
10907 	uint8_t	opaque_v;
10908 	/*
10909 	 * This value is written by the NIC such that it will be different
10910 	 * for each pass through the completion queue. The even passes
10911 	 * will write 1. The odd passes will write 0.
10912 	 */
10913 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_V	UINT32_C(0x1)
10914 	/* opaque is 7 b */
10915 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
10916 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_SFT 1
10917 	/* 8-lsb timestamp from POR (100-msec resolution) */
10918 	uint8_t	timestamp_lo;
10919 	/* 16-lsb timestamp from POR (100-msec resolution) */
10920 	uint16_t	timestamp_hi;
10921 	/* Event specific data */
10922 	uint32_t	event_data1;
10923 	/*
10924 	 * If this bit is set to 1, then it indicates that the PF-VF
10925 	 * communication was lost and it is established.
10926 	 * If this bit set to 0, then it indicates that the PF-VF
10927 	 * communication was established and it is lost.
10928 	 */
10929 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_DATA1_COMM_ESTABLISHED	UINT32_C(0x1)
10930 } hwrm_async_event_cmpl_pf_vf_comm_status_change_t, *phwrm_async_event_cmpl_pf_vf_comm_status_change_t;
10931 
10932 /* hwrm_async_event_cmpl_vf_cfg_change (size:128b/16B) */
10933 
10934 typedef struct hwrm_async_event_cmpl_vf_cfg_change {
10935 	uint16_t	type;
10936 	/*
10937 	 * This field indicates the exact type of the completion.
10938 	 * By convention, the LSB identifies the length of the
10939 	 * record in 16B units. Even values indicate 16B
10940 	 * records. Odd values indicate 32B
10941 	 * records.
10942 	 */
10943 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_MASK		UINT32_C(0x3f)
10944 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_SFT		0
10945 	/* HWRM Asynchronous Event Information */
10946 		#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
10947 		#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
10948 	/* Identifiers of events. */
10949 	uint16_t	event_id;
10950 	/* VF Configuration Change */
10951 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE UINT32_C(0x33)
10952 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE
10953 	/* Event specific data */
10954 	uint32_t	event_data2;
10955 	/*
10956 	 * This value indicates the VF ID of the VF whose configuration
10957 	 * is changing if this async. event is sent to the parent PF.
10958 	 * The firmware supports sending this to the parent PF if the
10959 	 * `hwrm_func_qcaps.vf_cfg_async_for_pf_supported` value is 1.
10960 	 * This value is undefined when the async. event is sent to the
10961 	 * VF.
10962 	 */
10963 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA2_VF_ID_MASK UINT32_C(0xffff)
10964 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA2_VF_ID_SFT 0
10965 	uint8_t	opaque_v;
10966 	/*
10967 	 * This value is written by the NIC such that it will be different
10968 	 * for each pass through the completion queue. The even passes
10969 	 * will write 1. The odd passes will write 0.
10970 	 */
10971 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_V	UINT32_C(0x1)
10972 	/* opaque is 7 b */
10973 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
10974 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_SFT 1
10975 	/* 8-lsb timestamp from POR (100-msec resolution) */
10976 	uint8_t	timestamp_lo;
10977 	/* 16-lsb timestamp from POR (100-msec resolution) */
10978 	uint16_t	timestamp_hi;
10979 	/*
10980 	 * Each flag provided in this field indicates a specific VF
10981 	 * configuration change. At least one of these flags shall be set to 1
10982 	 * when an asynchronous event completion of this type is provided
10983 	 * by the HWRM.
10984 	 */
10985 	uint32_t	event_data1;
10986 	/*
10987 	 * If this bit is set to 1, then the value of MTU
10988 	 * was changed on this VF.
10989 	 * If set to 0, then this bit should be ignored.
10990 	 */
10991 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MTU_CHANGE		UINT32_C(0x1)
10992 	/*
10993 	 * If this bit is set to 1, then the value of MRU
10994 	 * was changed on this VF.
10995 	 * If set to 0, then this bit should be ignored.
10996 	 */
10997 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MRU_CHANGE		UINT32_C(0x2)
10998 	/*
10999 	 * If this bit is set to 1, then the value of default MAC
11000 	 * address was changed on this VF.
11001 	 * If set to 0, then this bit should be ignored.
11002 	 */
11003 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_MAC_ADDR_CHANGE	UINT32_C(0x4)
11004 	/*
11005 	 * If this bit is set to 1, then the value of default VLAN
11006 	 * was changed on this VF.
11007 	 * If set to 0, then this bit should be ignored.
11008 	 */
11009 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_VLAN_CHANGE	UINT32_C(0x8)
11010 	/*
11011 	 * If this bit is set to 1, then the value of trusted VF enable
11012 	 * was changed on this VF.
11013 	 * If set to 0, then this bit should be ignored.
11014 	 */
11015 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_TRUSTED_VF_CFG_CHANGE	UINT32_C(0x10)
11016 	/*
11017 	 * If this bit is set to 1, then the control of VF was relinquished
11018 	 * back to the firmware flow manager following the function takeover
11019 	 * by TruFlow.
11020 	 * If set to 0, then this bit should be ignored.
11021 	 */
11022 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_TF_OWNERSHIP_RELEASE	UINT32_C(0x20)
11023 } hwrm_async_event_cmpl_vf_cfg_change_t, *phwrm_async_event_cmpl_vf_cfg_change_t;
11024 
11025 /* hwrm_async_event_cmpl_llfc_pfc_change (size:128b/16B) */
11026 
11027 typedef struct hwrm_async_event_cmpl_llfc_pfc_change {
11028 	uint16_t	type;
11029 	/*
11030 	 * This field indicates the exact type of the completion.
11031 	 * By convention, the LSB identifies the length of the
11032 	 * record in 16B units. Even values indicate 16B
11033 	 * records. Odd values indicate 32B
11034 	 * records.
11035 	 */
11036 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_MASK		UINT32_C(0x3f)
11037 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_SFT		0
11038 	/* HWRM Asynchronous Event Information */
11039 		#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11040 		#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_HWRM_ASYNC_EVENT
11041 	/* unused1 is 10 b */
11042 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_UNUSED1_MASK	UINT32_C(0xffc0)
11043 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_UNUSED1_SFT	6
11044 	/* Identifiers of events. */
11045 	uint16_t	event_id;
11046 	/* LLFC/PFC Configuration Change */
11047 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_ID_LLFC_PFC_CHANGE UINT32_C(0x34)
11048 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_ID_LLFC_PFC_CHANGE
11049 	/* Event specific data */
11050 	uint32_t	event_data2;
11051 	uint8_t	opaque_v;
11052 	/*
11053 	 * This value is written by the NIC such that it will be different
11054 	 * for each pass through the completion queue. The even passes
11055 	 * will write 1. The odd passes will write 0.
11056 	 */
11057 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_V	UINT32_C(0x1)
11058 	/* opaque is 7 b */
11059 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
11060 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_OPAQUE_SFT 1
11061 	/* 8-lsb timestamp from POR (100-msec resolution) */
11062 	uint8_t	timestamp_lo;
11063 	/* 16-lsb timestamp from POR (100-msec resolution) */
11064 	uint16_t	timestamp_hi;
11065 	/* Event specific data */
11066 	uint32_t	event_data1;
11067 	/* Indicates llfc pfc status change */
11068 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_MASK UINT32_C(0x3)
11069 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_SFT 0
11070 	/*
11071 	 * If this field set to 1, then it indicates that llfc is
11072 	 * enabled.
11073 	 */
11074 		#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_LLFC  UINT32_C(0x1)
11075 	/*
11076 	 * If this field is set to 2, then it indicates that pfc
11077 	 * is enabled.
11078 	 */
11079 		#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_PFC   UINT32_C(0x2)
11080 		#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_LAST HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_PFC
11081 	/* Indicates the physical port this llfc pfc change occur */
11082 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_MASK	UINT32_C(0x1c)
11083 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_SFT	2
11084 	/* PORT ID */
11085 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_ID_MASK UINT32_C(0x1fffe0)
11086 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_ID_SFT  5
11087 } hwrm_async_event_cmpl_llfc_pfc_change_t, *phwrm_async_event_cmpl_llfc_pfc_change_t;
11088 
11089 /* hwrm_async_event_cmpl_default_vnic_change (size:128b/16B) */
11090 
11091 typedef struct hwrm_async_event_cmpl_default_vnic_change {
11092 	uint16_t	type;
11093 	/*
11094 	 * This field indicates the exact type of the completion.
11095 	 * By convention, the LSB identifies the length of the
11096 	 * record in 16B units. Even values indicate 16B
11097 	 * records. Odd values indicate 32B
11098 	 * records.
11099 	 */
11100 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_MASK		UINT32_C(0x3f)
11101 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_SFT		0
11102 	/* HWRM Asynchronous Event Information */
11103 		#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11104 		#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_HWRM_ASYNC_EVENT
11105 	/* unused1 is 10 b */
11106 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_UNUSED1_MASK	UINT32_C(0xffc0)
11107 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_UNUSED1_SFT	6
11108 	/* Identifiers of events. */
11109 	uint16_t	event_id;
11110 	/* Notification of a default vnic allocation or free */
11111 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_ID_ALLOC_FREE_NOTIFICATION UINT32_C(0x35)
11112 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_ID_ALLOC_FREE_NOTIFICATION
11113 	/* Event specific data */
11114 	uint32_t	event_data2;
11115 	uint8_t	opaque_v;
11116 	/*
11117 	 * This value is written by the NIC such that it will be different
11118 	 * for each pass through the completion queue. The even passes
11119 	 * will write 1. The odd passes will write 0.
11120 	 */
11121 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_V	UINT32_C(0x1)
11122 	/* opaque is 7 b */
11123 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
11124 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_OPAQUE_SFT 1
11125 	/* 8-lsb timestamp from POR (100-msec resolution) */
11126 	uint8_t	timestamp_lo;
11127 	/* 16-lsb timestamp from POR (100-msec resolution) */
11128 	uint16_t	timestamp_hi;
11129 	/* Event specific data */
11130 	uint32_t	event_data1;
11131 	/* Indicates default vnic configuration change */
11132 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_MASK	UINT32_C(0x3)
11133 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_SFT	0
11134 	/*
11135 	 * If this field is set to 1, then it indicates that
11136 	 * a default VNIC has been allocate.
11137 	 */
11138 		#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_DEF_VNIC_ALLOC  UINT32_C(0x1)
11139 	/*
11140 	 * If this field is set to 2, then it indicates that
11141 	 * a default VNIC has been freed.
11142 	 */
11143 		#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_DEF_VNIC_FREE   UINT32_C(0x2)
11144 		#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_LAST	HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_DEF_VNIC_FREE
11145 	/* Indicates the physical function this event occurred on. */
11146 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_PF_ID_MASK		UINT32_C(0x3fc)
11147 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_PF_ID_SFT			2
11148 	/* Indicates the virtual function this event occurred on */
11149 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_VF_ID_MASK		UINT32_C(0x3fffc00)
11150 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_VF_ID_SFT			10
11151 } hwrm_async_event_cmpl_default_vnic_change_t, *phwrm_async_event_cmpl_default_vnic_change_t;
11152 
11153 /* hwrm_async_event_cmpl_hw_flow_aged (size:128b/16B) */
11154 
11155 typedef struct hwrm_async_event_cmpl_hw_flow_aged {
11156 	uint16_t	type;
11157 	/*
11158 	 * This field indicates the exact type of the completion.
11159 	 * By convention, the LSB identifies the length of the
11160 	 * record in 16B units. Even values indicate 16B
11161 	 * records. Odd values indicate 32B
11162 	 * records.
11163 	 */
11164 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_MASK		UINT32_C(0x3f)
11165 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_SFT		0
11166 	/* HWRM Asynchronous Event Information */
11167 		#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11168 		#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_HWRM_ASYNC_EVENT
11169 	/* Identifiers of events. */
11170 	uint16_t	event_id;
11171 	/* Notification of a hw flow aged */
11172 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_ID_HW_FLOW_AGED UINT32_C(0x36)
11173 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_ID_HW_FLOW_AGED
11174 	/* Event specific data */
11175 	uint32_t	event_data2;
11176 	uint8_t	opaque_v;
11177 	/*
11178 	 * This value is written by the NIC such that it will be different
11179 	 * for each pass through the completion queue. The even passes
11180 	 * will write 1. The odd passes will write 0.
11181 	 */
11182 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_V	UINT32_C(0x1)
11183 	/* opaque is 7 b */
11184 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_OPAQUE_MASK UINT32_C(0xfe)
11185 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_OPAQUE_SFT 1
11186 	/* 8-lsb timestamp from POR (100-msec resolution) */
11187 	uint8_t	timestamp_lo;
11188 	/* 16-lsb timestamp from POR (100-msec resolution) */
11189 	uint16_t	timestamp_hi;
11190 	/* Event specific data */
11191 	uint32_t	event_data1;
11192 	/* Indicates flow ID this event occurred on. */
11193 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_ID_MASK	UINT32_C(0x7fffffff)
11194 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_ID_SFT	0
11195 	/* Indicates flow direction this event occurred on. */
11196 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION	UINT32_C(0x80000000)
11197 	/*
11198 	 * If this bit set to 0, then it indicates that the aged
11199 	 * event was rx flow.
11200 	 */
11201 		#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_RX	(UINT32_C(0x0) << 31)
11202 	/*
11203 	 * If this bit is set to 1, then it indicates that the aged
11204 	 * event was tx flow.
11205 	 */
11206 		#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_TX	(UINT32_C(0x1) << 31)
11207 		#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_LAST HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_TX
11208 } hwrm_async_event_cmpl_hw_flow_aged_t, *phwrm_async_event_cmpl_hw_flow_aged_t;
11209 
11210 /* hwrm_async_event_cmpl_eem_cache_flush_req (size:128b/16B) */
11211 
11212 typedef struct hwrm_async_event_cmpl_eem_cache_flush_req {
11213 	uint16_t	type;
11214 	/*
11215 	 * This field indicates the exact type of the completion.
11216 	 * By convention, the LSB identifies the length of the
11217 	 * record in 16B units. Even values indicate 16B
11218 	 * records. Odd values indicate 32B
11219 	 * records.
11220 	 */
11221 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_MASK		UINT32_C(0x3f)
11222 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_SFT		0
11223 	/* HWRM Asynchronous Event Information */
11224 		#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11225 		#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_HWRM_ASYNC_EVENT
11226 	/* Identifiers of events. */
11227 	uint16_t	event_id;
11228 	/* Notification of a eem_cache_flush request */
11229 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_EVENT_ID_EEM_CACHE_FLUSH_REQ UINT32_C(0x38)
11230 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_EVENT_ID_EEM_CACHE_FLUSH_REQ
11231 	/* Event specific data */
11232 	uint32_t	event_data2;
11233 	uint8_t	opaque_v;
11234 	/*
11235 	 * This value is written by the NIC such that it will be different
11236 	 * for each pass through the completion queue. The even passes
11237 	 * will write 1. The odd passes will write 0.
11238 	 */
11239 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_V	UINT32_C(0x1)
11240 	/* opaque is 7 b */
11241 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_OPAQUE_MASK UINT32_C(0xfe)
11242 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_OPAQUE_SFT 1
11243 	/* 8-lsb timestamp from POR (100-msec resolution) */
11244 	uint8_t	timestamp_lo;
11245 	/* 16-lsb timestamp from POR (100-msec resolution) */
11246 	uint16_t	timestamp_hi;
11247 	/* Event specific data */
11248 	uint32_t	event_data1;
11249 } hwrm_async_event_cmpl_eem_cache_flush_req_t, *phwrm_async_event_cmpl_eem_cache_flush_req_t;
11250 
11251 /* hwrm_async_event_cmpl_eem_cache_flush_done (size:128b/16B) */
11252 
11253 typedef struct hwrm_async_event_cmpl_eem_cache_flush_done {
11254 	uint16_t	type;
11255 	/*
11256 	 * This field indicates the exact type of the completion.
11257 	 * By convention, the LSB identifies the length of the
11258 	 * record in 16B units. Even values indicate 16B
11259 	 * records. Odd values indicate 32B
11260 	 * records.
11261 	 */
11262 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_MASK		UINT32_C(0x3f)
11263 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_SFT		0
11264 	/* HWRM Asynchronous Event Information */
11265 		#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11266 		#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_HWRM_ASYNC_EVENT
11267 	/* Identifiers of events. */
11268 	uint16_t	event_id;
11269 	/*
11270 	 * Notification of a host eem_cache_flush has completed. This event
11271 	 * is generated by the host driver.
11272 	 */
11273 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_ID_EEM_CACHE_FLUSH_DONE UINT32_C(0x39)
11274 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_ID_EEM_CACHE_FLUSH_DONE
11275 	/* Event specific data */
11276 	uint32_t	event_data2;
11277 	uint8_t	opaque_v;
11278 	/*
11279 	 * This value is written by the NIC such that it will be different
11280 	 * for each pass through the completion queue. The even passes
11281 	 * will write 1. The odd passes will write 0.
11282 	 */
11283 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_V	UINT32_C(0x1)
11284 	/* opaque is 7 b */
11285 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_OPAQUE_MASK UINT32_C(0xfe)
11286 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_OPAQUE_SFT 1
11287 	/* 8-lsb timestamp from POR (100-msec resolution) */
11288 	uint8_t	timestamp_lo;
11289 	/* 16-lsb timestamp from POR (100-msec resolution) */
11290 	uint16_t	timestamp_hi;
11291 	/* Event specific data */
11292 	uint32_t	event_data1;
11293 	/* Indicates function ID that this event occurred on. */
11294 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_DATA1_FID_MASK UINT32_C(0xffff)
11295 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_DATA1_FID_SFT 0
11296 } hwrm_async_event_cmpl_eem_cache_flush_done_t, *phwrm_async_event_cmpl_eem_cache_flush_done_t;
11297 
11298 /* hwrm_async_event_cmpl_tcp_flag_action_change (size:128b/16B) */
11299 
11300 typedef struct hwrm_async_event_cmpl_tcp_flag_action_change {
11301 	uint16_t	type;
11302 	/*
11303 	 * This field indicates the exact type of the completion.
11304 	 * By convention, the LSB identifies the length of the
11305 	 * record in 16B units. Even values indicate 16B
11306 	 * records. Odd values indicate 32B
11307 	 * records.
11308 	 */
11309 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_MASK		UINT32_C(0x3f)
11310 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_SFT		0
11311 	/* HWRM Asynchronous Event Information */
11312 		#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11313 		#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_HWRM_ASYNC_EVENT
11314 	/* Identifiers of events. */
11315 	uint16_t	event_id;
11316 	/* Notification of tcp flag action change */
11317 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_EVENT_ID_TCP_FLAG_ACTION_CHANGE UINT32_C(0x3a)
11318 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_EVENT_ID_TCP_FLAG_ACTION_CHANGE
11319 	/* Event specific data */
11320 	uint32_t	event_data2;
11321 	uint8_t	opaque_v;
11322 	/*
11323 	 * This value is written by the NIC such that it will be different
11324 	 * for each pass through the completion queue. The even passes
11325 	 * will write 1. The odd passes will write 0.
11326 	 */
11327 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_V	UINT32_C(0x1)
11328 	/* opaque is 7 b */
11329 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
11330 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_OPAQUE_SFT 1
11331 	/* 8-lsb timestamp from POR (100-msec resolution) */
11332 	uint8_t	timestamp_lo;
11333 	/* 16-lsb timestamp from POR (100-msec resolution) */
11334 	uint16_t	timestamp_hi;
11335 	/* Event specific data */
11336 	uint32_t	event_data1;
11337 } hwrm_async_event_cmpl_tcp_flag_action_change_t, *phwrm_async_event_cmpl_tcp_flag_action_change_t;
11338 
11339 /* hwrm_async_event_cmpl_eem_flow_active (size:128b/16B) */
11340 
11341 typedef struct hwrm_async_event_cmpl_eem_flow_active {
11342 	uint16_t	type;
11343 	/*
11344 	 * This field indicates the exact type of the completion.
11345 	 * By convention, the LSB identifies the length of the
11346 	 * record in 16B units. Even values indicate 16B
11347 	 * records. Odd values indicate 32B
11348 	 * records.
11349 	 */
11350 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_MASK		UINT32_C(0x3f)
11351 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_SFT		0
11352 	/* HWRM Asynchronous Event Information */
11353 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11354 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_HWRM_ASYNC_EVENT
11355 	/* Identifiers of events. */
11356 	uint16_t	event_id;
11357 	/* Notification of an active eem flow */
11358 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_ID_EEM_FLOW_ACTIVE UINT32_C(0x3b)
11359 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_ID_EEM_FLOW_ACTIVE
11360 	/* Event specific data */
11361 	uint32_t	event_data2;
11362 	/* Indicates the 2nd global id this event occurred on. */
11363 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_GLOBAL_ID_2_MASK   UINT32_C(0x3fffffff)
11364 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_GLOBAL_ID_2_SFT	0
11365 	/*
11366 	 * Indicates flow direction of the flow identified by
11367 	 * the global_id_2.
11368 	 */
11369 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION	UINT32_C(0x40000000)
11370 	/* If this bit is set to 0, then it indicates that this rx flow. */
11371 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_RX	(UINT32_C(0x0) << 30)
11372 	/* If this bit is set to 1, then it indicates that this tx flow. */
11373 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_TX	(UINT32_C(0x1) << 30)
11374 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_LAST HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_TX
11375 	uint8_t	opaque_v;
11376 	/*
11377 	 * This value is written by the NIC such that it will be different
11378 	 * for each pass through the completion queue. The even passes
11379 	 * will write 1. The odd passes will write 0.
11380 	 */
11381 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_V	UINT32_C(0x1)
11382 	/* opaque is 7 b */
11383 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_OPAQUE_MASK UINT32_C(0xfe)
11384 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_OPAQUE_SFT 1
11385 	/* 8-lsb timestamp from POR (100-msec resolution) */
11386 	uint8_t	timestamp_lo;
11387 	/* 16-lsb timestamp from POR (100-msec resolution) */
11388 	uint16_t	timestamp_hi;
11389 	/* Event specific data */
11390 	uint32_t	event_data1;
11391 	/* Indicates the 1st global id this event occurred on. */
11392 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_GLOBAL_ID_1_MASK   UINT32_C(0x3fffffff)
11393 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_GLOBAL_ID_1_SFT	0
11394 	/*
11395 	 * Indicates flow direction of the flow identified by the
11396 	 * global_id_1.
11397 	 */
11398 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION	UINT32_C(0x40000000)
11399 	/* If this bit is set to 0, then it indicates that this is rx flow. */
11400 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_RX	(UINT32_C(0x0) << 30)
11401 	/* If this bit is set to 1, then it indicates that this is tx flow. */
11402 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_TX	(UINT32_C(0x1) << 30)
11403 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_LAST HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_TX
11404 	/*
11405 	 * Indicates EEM flow aging mode this event occurred on. If
11406 	 * this bit is set to 0, the event_data1 is the EEM global
11407 	 * ID. If this bit is set to 1, the event_data1 is the number
11408 	 * of global ID in the context memory.
11409 	 */
11410 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE		UINT32_C(0x80000000)
11411 	/* EEM flow aging mode 0. */
11412 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_0		(UINT32_C(0x0) << 31)
11413 	/* EEM flow aging mode 1. */
11414 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_1		(UINT32_C(0x1) << 31)
11415 		#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_LAST	HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_1
11416 } hwrm_async_event_cmpl_eem_flow_active_t, *phwrm_async_event_cmpl_eem_flow_active_t;
11417 
11418 /* hwrm_async_event_cmpl_eem_cfg_change (size:128b/16B) */
11419 
11420 typedef struct hwrm_async_event_cmpl_eem_cfg_change {
11421 	uint16_t	type;
11422 	/*
11423 	 * This field indicates the exact type of the completion.
11424 	 * By convention, the LSB identifies the length of the
11425 	 * record in 16B units. Even values indicate 16B
11426 	 * records. Odd values indicate 32B
11427 	 * records.
11428 	 */
11429 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_MASK		UINT32_C(0x3f)
11430 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_SFT		0
11431 	/* HWRM Asynchronous Event Information */
11432 		#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11433 		#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
11434 	/* Identifiers of events. */
11435 	uint16_t	event_id;
11436 	/* Notification of EEM configuration change */
11437 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_ID_EEM_CFG_CHANGE UINT32_C(0x3c)
11438 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_ID_EEM_CFG_CHANGE
11439 	/* Event specific data */
11440 	uint32_t	event_data2;
11441 	uint8_t	opaque_v;
11442 	/*
11443 	 * This value is written by the NIC such that it will be different
11444 	 * for each pass through the completion queue. The even passes
11445 	 * will write 1. The odd passes will write 0.
11446 	 */
11447 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_V	UINT32_C(0x1)
11448 	/* opaque is 7 b */
11449 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
11450 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_OPAQUE_SFT 1
11451 	/* 8-lsb timestamp from POR (100-msec resolution) */
11452 	uint8_t	timestamp_lo;
11453 	/* 16-lsb timestamp from POR (100-msec resolution) */
11454 	uint16_t	timestamp_hi;
11455 	/* Event specific data */
11456 	uint32_t	event_data1;
11457 	/*
11458 	 * Value of 1 to indicate EEM TX configuration is enabled. Value of
11459 	 * 0 to indicate the EEM TX configuration is disabled.
11460 	 */
11461 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_DATA1_EEM_TX_ENABLE	UINT32_C(0x1)
11462 	/*
11463 	 * Value of 1 to indicate EEM RX configuration is enabled. Value of 0
11464 	 * to indicate the EEM RX configuration is disabled.
11465 	 */
11466 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_DATA1_EEM_RX_ENABLE	UINT32_C(0x2)
11467 } hwrm_async_event_cmpl_eem_cfg_change_t, *phwrm_async_event_cmpl_eem_cfg_change_t;
11468 
11469 /* hwrm_async_event_cmpl_quiesce_done (size:128b/16B) */
11470 
11471 typedef struct hwrm_async_event_cmpl_quiesce_done {
11472 	uint16_t	type;
11473 	/*
11474 	 * This field indicates the exact type of the completion.
11475 	 * By convention, the LSB identifies the length of the
11476 	 * record in 16B units. Even values indicate 16B
11477 	 * records. Odd values indicate 32B
11478 	 * records.
11479 	 */
11480 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_MASK		UINT32_C(0x3f)
11481 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_SFT		0
11482 	/* HWRM Asynchronous Event Information */
11483 		#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11484 		#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_HWRM_ASYNC_EVENT
11485 	/* Identifiers of events. */
11486 	uint16_t	event_id;
11487 	/* An event signifying completion of HWRM_FW_STATE_QUIESCE */
11488 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_ID_QUIESCE_DONE UINT32_C(0x3f)
11489 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_ID_QUIESCE_DONE
11490 	/* Event specific data */
11491 	uint32_t	event_data2;
11492 	/* Status of HWRM_FW_STATE_QUIESCE completion */
11493 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_MASK		UINT32_C(0xff)
11494 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_SFT		0
11495 	/*
11496 	 * The quiesce operation started by HWRM_FW_STATE_QUIESCE
11497 	 * completed successfully.
11498 	 */
11499 		#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_SUCCESS		UINT32_C(0x0)
11500 	/*
11501 	 * The quiesce operation started by HWRM_FW_STATE_QUIESCE timed
11502 	 * out.
11503 	 */
11504 		#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_TIMEOUT		UINT32_C(0x1)
11505 	/*
11506 	 * The quiesce operation started by HWRM_FW_STATE_QUIESCE
11507 	 * encountered an error.
11508 	 */
11509 		#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_ERROR		UINT32_C(0x2)
11510 		#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_LAST		HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_ERROR
11511 	/* opaque is 8 b */
11512 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_OPAQUE_MASK			UINT32_C(0xff00)
11513 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_OPAQUE_SFT			8
11514 	/*
11515 	 * Additional information about internal hardware state related to
11516 	 * idle/quiesce state. QUIESCE may succeed per quiesce_status
11517 	 * regardless of idle_state_flags. If QUIESCE fails, the host may
11518 	 * inspect idle_state_flags to determine whether a retry is warranted.
11519 	 */
11520 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_MASK		UINT32_C(0xff0000)
11521 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_SFT		16
11522 	/*
11523 	 * Failure to quiesce is caused by host not updating the NQ consumer
11524 	 * index.
11525 	 */
11526 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_INCOMPLETE_NQ	UINT32_C(0x10000)
11527 	/* Flag 1 indicating partial non-idle state. */
11528 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_IDLE_STATUS_1	UINT32_C(0x20000)
11529 	/* Flag 2 indicating partial non-idle state. */
11530 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_IDLE_STATUS_2	UINT32_C(0x40000)
11531 	/* Flag 3 indicating partial non-idle state. */
11532 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_IDLE_STATUS_3	UINT32_C(0x80000)
11533 	uint8_t	opaque_v;
11534 	/*
11535 	 * This value is written by the NIC such that it will be different
11536 	 * for each pass through the completion queue. The even passes
11537 	 * will write 1. The odd passes will write 0.
11538 	 */
11539 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_V	UINT32_C(0x1)
11540 	/* opaque is 7 b */
11541 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_OPAQUE_MASK UINT32_C(0xfe)
11542 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_OPAQUE_SFT 1
11543 	/* 8-lsb timestamp from POR (100-msec resolution) */
11544 	uint8_t	timestamp_lo;
11545 	/* 16-lsb timestamp from POR (100-msec resolution) */
11546 	uint16_t	timestamp_hi;
11547 	/* Event specific data */
11548 	uint32_t	event_data1;
11549 	/* Time stamp for error event */
11550 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA1_TIMESTAMP	UINT32_C(0x1)
11551 } hwrm_async_event_cmpl_quiesce_done_t, *phwrm_async_event_cmpl_quiesce_done_t;
11552 
11553 /* hwrm_async_event_cmpl_deferred_response (size:128b/16B) */
11554 
11555 typedef struct hwrm_async_event_cmpl_deferred_response {
11556 	uint16_t	type;
11557 	/*
11558 	 * This field indicates the exact type of the completion.
11559 	 * By convention, the LSB identifies the length of the
11560 	 * record in 16B units. Even values indicate 16B
11561 	 * records. Odd values indicate 32B
11562 	 * records.
11563 	 */
11564 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_MASK		UINT32_C(0x3f)
11565 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_SFT		0
11566 	/* HWRM Asynchronous Event Information */
11567 		#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11568 		#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_HWRM_ASYNC_EVENT
11569 	/* Identifiers of events. */
11570 	uint16_t	event_id;
11571 	/*
11572 	 * An event signifying a HWRM command is in progress and its
11573 	 * response will be deferred
11574 	 */
11575 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_ID_DEFERRED_RESPONSE UINT32_C(0x40)
11576 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_ID_DEFERRED_RESPONSE
11577 	/* Event specific data */
11578 	uint32_t	event_data2;
11579 	/*
11580 	 * The PF's mailbox is clear to issue another command.
11581 	 * A command with this seq_id is still in progress
11582 	 * and will return a regular HWRM completion when done.
11583 	 * 'event_data1' field, if non-zero, contains the estimated
11584 	 * execution time for the command.
11585 	 */
11586 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_DATA2_SEQ_ID_MASK UINT32_C(0xffff)
11587 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_DATA2_SEQ_ID_SFT 0
11588 	uint8_t	opaque_v;
11589 	/*
11590 	 * This value is written by the NIC such that it will be different
11591 	 * for each pass through the completion queue. The even passes
11592 	 * will write 1. The odd passes will write 0.
11593 	 */
11594 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_V	UINT32_C(0x1)
11595 	/* opaque is 7 b */
11596 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_OPAQUE_MASK UINT32_C(0xfe)
11597 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_OPAQUE_SFT 1
11598 	/* 8-lsb timestamp from POR (100-msec resolution) */
11599 	uint8_t	timestamp_lo;
11600 	/* 16-lsb timestamp from POR (100-msec resolution) */
11601 	uint16_t	timestamp_hi;
11602 	/* Estimated remaining time of command execution in ms (if not zero) */
11603 	uint32_t	event_data1;
11604 } hwrm_async_event_cmpl_deferred_response_t, *phwrm_async_event_cmpl_deferred_response_t;
11605 
11606 /* hwrm_async_event_cmpl_pfc_watchdog_cfg_change (size:128b/16B) */
11607 
11608 typedef struct hwrm_async_event_cmpl_pfc_watchdog_cfg_change {
11609 	uint16_t	type;
11610 	/*
11611 	 * This field indicates the exact type of the completion.
11612 	 * By convention, the LSB identifies the length of the
11613 	 * record in 16B units. Even values indicate 16B
11614 	 * records. Odd values indicate 32B
11615 	 * records.
11616 	 */
11617 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_MASK		UINT32_C(0x3f)
11618 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_SFT		0
11619 	/* HWRM Asynchronous Event Information */
11620 		#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11621 		#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
11622 	/* Identifiers of events. */
11623 	uint16_t	event_id;
11624 	/* PFC watchdog configuration change for given port/cos */
11625 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_ID_PFC_WATCHDOG_CFG_CHANGE UINT32_C(0x41)
11626 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_ID_PFC_WATCHDOG_CFG_CHANGE
11627 	/* Event specific data */
11628 	uint32_t	event_data2;
11629 	uint8_t	opaque_v;
11630 	/*
11631 	 * This value is written by the NIC such that it will be different
11632 	 * for each pass through the completion queue. The even passes
11633 	 * will write 1. The odd passes will write 0.
11634 	 */
11635 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_V	UINT32_C(0x1)
11636 	/* opaque is 7 b */
11637 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
11638 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_OPAQUE_SFT 1
11639 	/* 8-lsb timestamp from POR (100-msec resolution) */
11640 	uint8_t	timestamp_lo;
11641 	/* 16-lsb timestamp from POR (100-msec resolution) */
11642 	uint16_t	timestamp_hi;
11643 	/* Event specific data */
11644 	uint32_t	event_data1;
11645 	/*
11646 	 * 1 in bit position X indicates PFC watchdog should
11647 	 * be on for COSX
11648 	 */
11649 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_MASK		UINT32_C(0xff)
11650 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_SFT		0
11651 	/* 1 means PFC WD for COS0 is on, 0 - off. */
11652 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS0	UINT32_C(0x1)
11653 	/* 1 means PFC WD for COS1 is on, 0 - off. */
11654 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS1	UINT32_C(0x2)
11655 	/* 1 means PFC WD for COS2 is on, 0 - off. */
11656 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS2	UINT32_C(0x4)
11657 	/* 1 means PFC WD for COS3 is on, 0 - off. */
11658 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS3	UINT32_C(0x8)
11659 	/* 1 means PFC WD for COS4 is on, 0 - off. */
11660 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS4	UINT32_C(0x10)
11661 	/* 1 means PFC WD for COS5 is on, 0 - off. */
11662 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS5	UINT32_C(0x20)
11663 	/* 1 means PFC WD for COS6 is on, 0 - off. */
11664 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS6	UINT32_C(0x40)
11665 	/* 1 means PFC WD for COS7 is on, 0 - off. */
11666 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS7	UINT32_C(0x80)
11667 	/* PORT ID */
11668 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK		UINT32_C(0xffff00)
11669 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT		8
11670 } hwrm_async_event_cmpl_pfc_watchdog_cfg_change_t, *phwrm_async_event_cmpl_pfc_watchdog_cfg_change_t;
11671 
11672 /* hwrm_async_event_cmpl_echo_request (size:128b/16B) */
11673 
11674 typedef struct hwrm_async_event_cmpl_echo_request {
11675 	uint16_t	type;
11676 	/*
11677 	 * This field indicates the exact type of the completion.
11678 	 * By convention, the LSB identifies the length of the
11679 	 * record in 16B units. Even values indicate 16B
11680 	 * records. Odd values indicate 32B
11681 	 * records.
11682 	 */
11683 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_MASK		UINT32_C(0x3f)
11684 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_SFT		0
11685 	/* HWRM Asynchronous Event Information */
11686 		#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11687 		#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_HWRM_ASYNC_EVENT
11688 	/* Identifiers of events. */
11689 	uint16_t	event_id;
11690 	/*
11691 	 * An echo request from the firmware. An echo response is expected by
11692 	 * the firmware.
11693 	 */
11694 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_EVENT_ID_ECHO_REQUEST UINT32_C(0x42)
11695 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_EVENT_ID_ECHO_REQUEST
11696 	/* Event specific data that should be provided in the echo response */
11697 	uint32_t	event_data2;
11698 	uint8_t	opaque_v;
11699 	/*
11700 	 * This value is written by the NIC such that it will be different
11701 	 * for each pass through the completion queue. The even passes
11702 	 * will write 1. The odd passes will write 0.
11703 	 */
11704 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_V	UINT32_C(0x1)
11705 	/* opaque is 7 b */
11706 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_OPAQUE_MASK UINT32_C(0xfe)
11707 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_OPAQUE_SFT 1
11708 	/* 8-lsb timestamp from POR (100-msec resolution) */
11709 	uint8_t	timestamp_lo;
11710 	/* 16-lsb timestamp from POR (100-msec resolution) */
11711 	uint16_t	timestamp_hi;
11712 	/* Event specific data that should be provided in the echo response */
11713 	uint32_t	event_data1;
11714 } hwrm_async_event_cmpl_echo_request_t, *phwrm_async_event_cmpl_echo_request_t;
11715 
11716 /* hwrm_async_event_cmpl_phc_update (size:128b/16B) */
11717 
11718 typedef struct hwrm_async_event_cmpl_phc_update {
11719 	uint16_t	type;
11720 	/*
11721 	 * This field indicates the exact type of the completion.
11722 	 * By convention, the LSB identifies the length of the
11723 	 * record in 16B units. Even values indicate 16B
11724 	 * records. Odd values indicate 32B
11725 	 * records.
11726 	 */
11727 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_MASK		UINT32_C(0x3f)
11728 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_SFT		0
11729 	/* HWRM Asynchronous Event Information */
11730 		#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11731 		#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_HWRM_ASYNC_EVENT
11732 	/* Identifiers of events. */
11733 	uint16_t	event_id;
11734 	/*
11735 	 * This async event is used to notify driver of changes
11736 	 * in PHC master. Only one master function can configure
11737 	 * PHC.
11738 	 */
11739 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_ID_PHC_UPDATE UINT32_C(0x43)
11740 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_ID_PHC_UPDATE
11741 	/* Event specific data */
11742 	uint32_t	event_data2;
11743 	/* This field provides the current master function. */
11744 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_MASTER_FID_MASK UINT32_C(0xffff)
11745 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_MASTER_FID_SFT 0
11746 	/* This field provides the current secondary function. */
11747 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_SEC_FID_MASK   UINT32_C(0xffff0000)
11748 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_SEC_FID_SFT	16
11749 	uint8_t	opaque_v;
11750 	/*
11751 	 * This value is written by the NIC such that it will be different
11752 	 * for each pass through the completion queue. The even passes
11753 	 * will write 1. The odd passes will write 0.
11754 	 */
11755 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_V	UINT32_C(0x1)
11756 	/* opaque is 7 b */
11757 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_OPAQUE_MASK UINT32_C(0xfe)
11758 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_OPAQUE_SFT 1
11759 	/* 8-lsb timestamp (100-msec resolution) */
11760 	uint8_t	timestamp_lo;
11761 	/* 16-lsb timestamp (100-msec resolution) */
11762 	uint16_t	timestamp_hi;
11763 	/* Event specific data */
11764 	uint32_t	event_data1;
11765 	/* Indicates to the driver the type of PHC event. */
11766 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_MASK	UINT32_C(0xf)
11767 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_SFT	0
11768 	/*
11769 	 * Indicates PHC Master selection event. The master fid is
11770 	 * specified in event_data2.phc_master_fid.
11771 	 */
11772 		#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_MASTER	UINT32_C(0x1)
11773 	/*
11774 	 * Indicates PHC Secondary selection event. The secondary fid is
11775 	 * specified in event_data2.phc_sec_fid.
11776 	 */
11777 		#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_SECONDARY   UINT32_C(0x2)
11778 	/*
11779 	 * Indicates PHC failover event. Failover happens from
11780 	 * event_data2.phc_master_fid to event_data2.phc_sec_fid.
11781 	 */
11782 		#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_FAILOVER	UINT32_C(0x3)
11783 	/*
11784 	 * Indicates that the 64bit Real time clock upper 16bits
11785 	 * have been updated due to PHC rollover. The updated
11786 	 * upper 16bits is in event_data1.phc_time_msb
11787 	 */
11788 		#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_RTC_UPDATE  UINT32_C(0x4)
11789 		#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_LAST	HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_RTC_UPDATE
11790 	/*
11791 	 * This field provides the upper 16bits of the 64bit real
11792 	 * time clock.
11793 	 */
11794 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_PHC_TIME_MSB_MASK   UINT32_C(0xffff0)
11795 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_PHC_TIME_MSB_SFT	4
11796 } hwrm_async_event_cmpl_phc_update_t, *phwrm_async_event_cmpl_phc_update_t;
11797 
11798 /* hwrm_async_event_cmpl_pps_timestamp (size:128b/16B) */
11799 
11800 typedef struct hwrm_async_event_cmpl_pps_timestamp {
11801 	uint16_t	type;
11802 	/*
11803 	 * This field indicates the exact type of the completion.
11804 	 * By convention, the LSB identifies the length of the
11805 	 * record in 16B units. Even values indicate 16B
11806 	 * records. Odd values indicate 32B
11807 	 * records.
11808 	 */
11809 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_MASK		UINT32_C(0x3f)
11810 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_SFT		0
11811 	/* HWRM Asynchronous Event Information */
11812 		#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11813 		#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_HWRM_ASYNC_EVENT
11814 	/* Identifiers of events. */
11815 	uint16_t	event_id;
11816 	/*
11817 	 * This async notification message can be used to inform
11818 	 * driver of the latest PPS timestamp that has been latched.
11819 	 * When driver enables PPS event, Firmware will generate
11820 	 * PPS timestamps every second, Firmware informs driver
11821 	 * of this timestamp through the async event.
11822 	 */
11823 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_ID_PPS_TIMESTAMP UINT32_C(0x44)
11824 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_ID_PPS_TIMESTAMP
11825 	/* Event specific data */
11826 	uint32_t	event_data2;
11827 	/* Indicates the PPS event type */
11828 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE		UINT32_C(0x1)
11829 	/* This is an internal event. */
11830 		#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_INTERNAL	UINT32_C(0x0)
11831 	/* This is an external event. */
11832 		#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_EXTERNAL	UINT32_C(0x1)
11833 		#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_LAST	HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_EXTERNAL
11834 	/*
11835 	 * Indicates the pin number on which the event is
11836 	 * received.
11837 	 */
11838 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PIN_NUMBER_MASK	UINT32_C(0xe)
11839 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PIN_NUMBER_SFT	1
11840 	/*
11841 	 * Contains bits[47:32] of the upper PPS timestamp.
11842 	 * Lower 32 bits are in event_data1. Together they
11843 	 * provide the 48 bit PPS timestamp.
11844 	 */
11845 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PPS_TIMESTAMP_UPPER_MASK UINT32_C(0xffff0)
11846 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PPS_TIMESTAMP_UPPER_SFT 4
11847 	uint8_t	opaque_v;
11848 	/*
11849 	 * This value is written by the NIC such that it will be different
11850 	 * for each pass through the completion queue. The even passes
11851 	 * will write 1. The odd passes will write 0.
11852 	 */
11853 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_V	UINT32_C(0x1)
11854 	/* opaque is 7 b */
11855 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_OPAQUE_MASK UINT32_C(0xfe)
11856 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_OPAQUE_SFT 1
11857 	/* 8-lsb timestamp (100-msec resolution) */
11858 	uint8_t	timestamp_lo;
11859 	/* 16-lsb timestamp (100-msec resolution) */
11860 	uint16_t	timestamp_hi;
11861 	/* Contains the lower 32 bits of the PPS timestamp. */
11862 	uint32_t	event_data1;
11863 	/* Contains the lower 32 bit PPS timestamp */
11864 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA1_PPS_TIMESTAMP_LOWER_MASK UINT32_C(0xffffffff)
11865 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA1_PPS_TIMESTAMP_LOWER_SFT 0
11866 } hwrm_async_event_cmpl_pps_timestamp_t, *phwrm_async_event_cmpl_pps_timestamp_t;
11867 
11868 /* hwrm_async_event_cmpl_error_report (size:128b/16B) */
11869 
11870 typedef struct hwrm_async_event_cmpl_error_report {
11871 	uint16_t	type;
11872 	/*
11873 	 * This field indicates the exact type of the completion.
11874 	 * By convention, the LSB identifies the length of the
11875 	 * record in 16B units. Even values indicate 16B
11876 	 * records. Odd values indicate 32B
11877 	 * records.
11878 	 */
11879 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_MASK		UINT32_C(0x3f)
11880 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_SFT		0
11881 	/* HWRM Asynchronous Event Information */
11882 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11883 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_HWRM_ASYNC_EVENT
11884 	/* Identifiers of events. */
11885 	uint16_t	event_id;
11886 	/*
11887 	 * This async notification message is used to inform
11888 	 * the driver that an error has occurred which may need
11889 	 * the attention of the administrator.
11890 	 */
11891 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
11892 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_ID_ERROR_REPORT
11893 	/* Event specific data. */
11894 	uint32_t	event_data2;
11895 	uint8_t	opaque_v;
11896 	/*
11897 	 * This value is written by the NIC such that it will be different
11898 	 * for each pass through the completion queue. The even passes
11899 	 * will write 1. The odd passes will write 0.
11900 	 */
11901 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_V	UINT32_C(0x1)
11902 	/* opaque is 7 b */
11903 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_OPAQUE_MASK UINT32_C(0xfe)
11904 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_OPAQUE_SFT 1
11905 	/* 8-lsb timestamp (100-msec resolution) */
11906 	uint8_t	timestamp_lo;
11907 	/* 16-lsb timestamp (100-msec resolution) */
11908 	uint16_t	timestamp_hi;
11909 	/* Event specific data */
11910 	uint32_t	event_data1;
11911 	/*
11912 	 * Indicates the type of error being reported. See section on Error
11913 	 * Report event error_types for details on each error.
11914 	 */
11915 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_DATA1_ERROR_TYPE_MASK UINT32_C(0xff)
11916 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_DATA1_ERROR_TYPE_SFT 0
11917 } hwrm_async_event_cmpl_error_report_t, *phwrm_async_event_cmpl_error_report_t;
11918 
11919 /* hwrm_async_event_cmpl_doorbell_pacing_threshold (size:128b/16B) */
11920 
11921 typedef struct hwrm_async_event_cmpl_doorbell_pacing_threshold {
11922 	uint16_t	type;
11923 	/*
11924 	 * This field indicates the exact type of the completion.
11925 	 * By convention, the LSB identifies the length of the
11926 	 * record in 16B units. Even values indicate 16B
11927 	 * records. Odd values indicate 32B
11928 	 * records.
11929 	 */
11930 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_MASK		UINT32_C(0x3f)
11931 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_SFT		0
11932 	/* HWRM Asynchronous Event Information */
11933 		#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11934 		#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_HWRM_ASYNC_EVENT
11935 	/* Identifiers of events. */
11936 	uint16_t	event_id;
11937 	/*
11938 	 * This async notification message is used to inform the driver
11939 	 * that the programmable pacing threshold for the doorbell FIFO is
11940 	 * reached. The driver will take appropriate action to pace the
11941 	 * doorbells when this async event is received from the firmware.
11942 	 */
11943 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_EVENT_ID_DOORBELL_PACING_THRESHOLD UINT32_C(0x46)
11944 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_EVENT_ID_LAST			HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_EVENT_ID_DOORBELL_PACING_THRESHOLD
11945 	/* Event specific data. */
11946 	uint32_t	event_data2;
11947 	uint8_t	opaque_v;
11948 	/*
11949 	 * This value is written by the NIC such that it will be different
11950 	 * for each pass through the completion queue. The even passes
11951 	 * will write 1. The odd passes will write 0.
11952 	 */
11953 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_V	UINT32_C(0x1)
11954 	/* opaque is 7 b */
11955 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_OPAQUE_MASK UINT32_C(0xfe)
11956 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_OPAQUE_SFT 1
11957 	/* 8-lsb timestamp (100-msec resolution) */
11958 	uint8_t	timestamp_lo;
11959 	/* 16-lsb timestamp (100-msec resolution) */
11960 	uint16_t	timestamp_hi;
11961 	/* Event specific data */
11962 	uint32_t	event_data1;
11963 } hwrm_async_event_cmpl_doorbell_pacing_threshold_t, *phwrm_async_event_cmpl_doorbell_pacing_threshold_t;
11964 
11965 /* hwrm_async_event_cmpl_rss_change (size:128b/16B) */
11966 
11967 typedef struct hwrm_async_event_cmpl_rss_change {
11968 	uint16_t	type;
11969 	/*
11970 	 * This field indicates the exact type of the completion.
11971 	 * By convention, the LSB identifies the length of the
11972 	 * record in 16B units. Even values indicate 16B
11973 	 * records. Odd values indicate 32B
11974 	 * records.
11975 	 */
11976 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_MASK		UINT32_C(0x3f)
11977 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_SFT		0
11978 	/* HWRM Asynchronous Event Information */
11979 		#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
11980 		#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_HWRM_ASYNC_EVENT
11981 	/* Identifiers of events. */
11982 	uint16_t	event_id;
11983 	/*
11984 	 * This async notification message is used to inform the driver
11985 	 * that the RSS capabilities have changed. The driver will need
11986 	 * to query hwrm_vnic_qcaps.
11987 	 */
11988 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_RSS_CHANGE UINT32_C(0x47)
11989 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_RSS_CHANGE
11990 	/* Event specific data. */
11991 	uint32_t	event_data2;
11992 	uint8_t	opaque_v;
11993 	/*
11994 	 * This value is written by the NIC such that it will be different
11995 	 * for each pass through the completion queue. The even passes
11996 	 * will write 1. The odd passes will write 0.
11997 	 */
11998 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_V	UINT32_C(0x1)
11999 	/* opaque is 7 b */
12000 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
12001 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_OPAQUE_SFT 1
12002 	/* 8-lsb timestamp (100-msec resolution) */
12003 	uint8_t	timestamp_lo;
12004 	/* 16-lsb timestamp (100-msec resolution) */
12005 	uint16_t	timestamp_hi;
12006 	/* Event specific data */
12007 	uint32_t	event_data1;
12008 } hwrm_async_event_cmpl_rss_change_t, *phwrm_async_event_cmpl_rss_change_t;
12009 
12010 /* hwrm_async_event_cmpl_doorbell_pacing_nq_update (size:128b/16B) */
12011 
12012 typedef struct hwrm_async_event_cmpl_doorbell_pacing_nq_update {
12013 	uint16_t	type;
12014 	/*
12015 	 * This field indicates the exact type of the completion.
12016 	 * By convention, the LSB identifies the length of the
12017 	 * record in 16B units. Even values indicate 16B
12018 	 * records. Odd values indicate 32B
12019 	 * records.
12020 	 */
12021 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_MASK		UINT32_C(0x3f)
12022 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_SFT		0
12023 	/* HWRM Asynchronous Event Information */
12024 		#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12025 		#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_HWRM_ASYNC_EVENT
12026 	/* Identifiers of events. */
12027 	uint16_t	event_id;
12028 	/*
12029 	 * An event from firmware indicating that list of nq ids used for
12030 	 * doorbell pacing DBQ event notification has been updated. The driver
12031 	 * needs to take appropriate action and retrieve the new list when this
12032 	 * event is received from the firmware.
12033 	 */
12034 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_DOORBELL_PACING_NQ_UPDATE UINT32_C(0x48)
12035 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_LAST			HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_DOORBELL_PACING_NQ_UPDATE
12036 	/* Event specific data. */
12037 	uint32_t	event_data2;
12038 	uint8_t	opaque_v;
12039 	/*
12040 	 * This value is written by the NIC such that it will be different
12041 	 * for each pass through the completion queue. The even passes
12042 	 * will write 1. The odd passes will write 0.
12043 	 */
12044 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_V	UINT32_C(0x1)
12045 	/* opaque is 7 b */
12046 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_OPAQUE_MASK UINT32_C(0xfe)
12047 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_OPAQUE_SFT 1
12048 	/* 8-lsb timestamp (100-msec resolution) */
12049 	uint8_t	timestamp_lo;
12050 	/* 16-lsb timestamp (100-msec resolution) */
12051 	uint16_t	timestamp_hi;
12052 	/* Event specific data */
12053 	uint32_t	event_data1;
12054 } hwrm_async_event_cmpl_doorbell_pacing_nq_update_t, *phwrm_async_event_cmpl_doorbell_pacing_nq_update_t;
12055 
12056 /* hwrm_async_event_cmpl_hw_doorbell_recovery_read_error (size:128b/16B) */
12057 
12058 typedef struct hwrm_async_event_cmpl_hw_doorbell_recovery_read_error {
12059 	uint16_t	type;
12060 	/*
12061 	 * This field indicates the exact type of the completion.
12062 	 * By convention, the LSB identifies the length of the
12063 	 * record in 16B units. Even values indicate 16B
12064 	 * records. Odd values indicate 32B
12065 	 * records.
12066 	 */
12067 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_MASK		UINT32_C(0x3f)
12068 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_SFT		0
12069 	/* HWRM Asynchronous Event Information */
12070 		#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12071 		#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_HWRM_ASYNC_EVENT
12072 	/* Identifiers of events. */
12073 	uint16_t	event_id;
12074 	/*
12075 	 * This async notification message is used to inform the driver
12076 	 * that hardware ran into an error while trying to read the host
12077 	 * based doorbell copy region. The driver will take the appropriate
12078 	 * action to maintain the corresponding functions doorbell copy
12079 	 * region in the correct format.
12080 	 */
12081 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR UINT32_C(0x49)
12082 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_LAST			HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR
12083 	/* Event specific data. */
12084 	uint32_t	event_data2;
12085 	uint8_t	opaque_v;
12086 	/*
12087 	 * This value is written by the NIC such that it will be different
12088 	 * for each pass through the completion queue. The even passes
12089 	 * will write 1. The odd passes will write 0.
12090 	 */
12091 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_V	UINT32_C(0x1)
12092 	/* opaque is 7 b */
12093 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_OPAQUE_MASK UINT32_C(0xfe)
12094 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_OPAQUE_SFT 1
12095 	/* 8-lsb timestamp (100-msec resolution) */
12096 	uint8_t	timestamp_lo;
12097 	/* 16-lsb timestamp (100-msec resolution) */
12098 	uint16_t	timestamp_hi;
12099 	/* Event specific data */
12100 	uint32_t	event_data1;
12101 	/*
12102 	 * Indicates that there is an error while reading the doorbell copy
12103 	 * regions.
12104 	 */
12105 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_MASK	UINT32_C(0xf)
12106 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SFT	0
12107 	/*
12108 	 * If set to 1, indicates that there is an error while reading the
12109 	 * SQ doorbell copy region for this function.
12110 	 */
12111 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SQ_ERR	UINT32_C(0x1)
12112 	/*
12113 	 * If set to 1, indicates that there is an error while reading the
12114 	 * RQ doorbell copy region for this function.
12115 	 */
12116 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_RQ_ERR	UINT32_C(0x2)
12117 	/*
12118 	 * If set to 1, indicates that there is an error while reading the
12119 	 * SRQ doorbell copy region for this function.
12120 	 */
12121 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SRQ_ERR	UINT32_C(0x4)
12122 	/*
12123 	 * If set to 1, indicates that there is an error while reading the
12124 	 * CQ doorbell copy region for this function.
12125 	 */
12126 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_CQ_ERR	UINT32_C(0x8)
12127 } hwrm_async_event_cmpl_hw_doorbell_recovery_read_error_t, *phwrm_async_event_cmpl_hw_doorbell_recovery_read_error_t;
12128 
12129 /* hwrm_async_event_cmpl_ctx_error (size:128b/16B) */
12130 
12131 typedef struct hwrm_async_event_cmpl_ctx_error {
12132 	uint16_t	type;
12133 	/*
12134 	 * This field indicates the exact type of the completion.
12135 	 * By convention, the LSB identifies the length of the
12136 	 * record in 16B units. Even values indicate 16B
12137 	 * records. Odd values indicate 32B
12138 	 * records.
12139 	 */
12140 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_MASK		UINT32_C(0x3f)
12141 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_SFT		0
12142 	/* HWRM Asynchronous Event Information */
12143 		#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12144 		#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_HWRM_ASYNC_EVENT
12145 	/* Identifiers of events. */
12146 	uint16_t	event_id;
12147 	/*
12148 	 * This async notification message is used to inform the PF driver
12149 	 * that firmware fails to allocate/free the contexts requested. This
12150 	 * message is only valid in the XID partition scheme. Given the start
12151 	 * xid and the number of contexts in error, the PF driver will figure
12152 	 * out the corresponding XID partition(s) in error.
12153 	 */
12154 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_ID_CTX_ERROR UINT32_C(0x4a)
12155 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_ID_CTX_ERROR
12156 	/* Event specific data */
12157 	uint32_t	event_data2;
12158 	/* Context operation code */
12159 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE	UINT32_C(0x1)
12160 	/* Context alloc failure */
12161 		#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_ALLOC  UINT32_C(0x0)
12162 	/* Context free failure */
12163 		#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_FREE   UINT32_C(0x1)
12164 		#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_LAST  HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_FREE
12165 	/* Number of contexts in error */
12166 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_NUM_CTXS_MASK	UINT32_C(0xfffe)
12167 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_NUM_CTXS_SFT	1
12168 	/* Function ID which the XID partitions are associated with */
12169 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_FID_MASK	UINT32_C(0xffff0000)
12170 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_FID_SFT	16
12171 	uint8_t	opaque_v;
12172 	/*
12173 	 * This value is written by the NIC such that it will be different
12174 	 * for each pass through the completion queue. The even passes
12175 	 * will write 1. The odd passes will write 0.
12176 	 */
12177 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_V	UINT32_C(0x1)
12178 	/* opaque is 7 b */
12179 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_OPAQUE_MASK UINT32_C(0xfe)
12180 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_OPAQUE_SFT 1
12181 	/* 8-lsb timestamp (100-msec resolution) */
12182 	uint8_t	timestamp_lo;
12183 	/* 16-lsb timestamp (100-msec resolution) */
12184 	uint16_t	timestamp_hi;
12185 	/* Event specific data */
12186 	uint32_t	event_data1;
12187 	/* Starting XID that has error */
12188 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA1_START_XID_MASK UINT32_C(0xffffffff)
12189 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA1_START_XID_SFT 0
12190 } hwrm_async_event_cmpl_ctx_error_t, *phwrm_async_event_cmpl_ctx_error_t;
12191 
12192 /* hwrm_async_event_udcc_session_change (size:128b/16B) */
12193 
12194 typedef struct hwrm_async_event_udcc_session_change {
12195 	uint16_t	type;
12196 	/*
12197 	 * This field indicates the exact type of the completion.
12198 	 * By convention, the LSB identifies the length of the
12199 	 * record in 16B units. Even values indicate 16B
12200 	 * records. Odd values indicate 32B
12201 	 * records.
12202 	 */
12203 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_MASK		UINT32_C(0x3f)
12204 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_SFT		0
12205 	/* HWRM Asynchronous Event Information */
12206 		#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12207 		#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_LAST		HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_HWRM_ASYNC_EVENT
12208 	/* Identifiers of events. */
12209 	uint16_t	event_id;
12210 	/*
12211 	 * This async notification message is used to inform the PF driver
12212 	 * that firmware has modified a UDCC session.
12213 	 */
12214 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_ID_UDCC_SESSION_CHANGE UINT32_C(0x4b)
12215 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_ID_LAST		HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_ID_UDCC_SESSION_CHANGE
12216 	/* Event specific data */
12217 	uint32_t	event_data2;
12218 	/* UDCC Session id operation code */
12219 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_MASK   UINT32_C(0xff)
12220 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_SFT	0
12221 	/* session_id has been created */
12222 		#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_CREATED  UINT32_C(0x0)
12223 	/* session_id has been freed */
12224 		#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_FREED	UINT32_C(0x1)
12225 		#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_LAST	HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_FREED
12226 	uint8_t	opaque_v;
12227 	/*
12228 	 * This value is written by the NIC such that it will be different
12229 	 * for each pass through the completion queue. The even passes
12230 	 * will write 1. The odd passes will write 0.
12231 	 */
12232 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_V	UINT32_C(0x1)
12233 	/* opaque is 7 b */
12234 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
12235 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_OPAQUE_SFT 1
12236 	/* 8-lsb timestamp (100-msec resolution) */
12237 	uint8_t	timestamp_lo;
12238 	/* 16-lsb timestamp (100-msec resolution) */
12239 	uint16_t	timestamp_hi;
12240 	/* Event specific data */
12241 	uint32_t	event_data1;
12242 	/* UDCC session id which was modified */
12243 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA1_UDCC_SESSION_ID_MASK UINT32_C(0xffff)
12244 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA1_UDCC_SESSION_ID_SFT 0
12245 } hwrm_async_event_udcc_session_change_t, *phwrm_async_event_udcc_session_change_t;
12246 
12247 /* hwrm_async_event_cmpl_dbg_buf_producer (size:128b/16B) */
12248 
12249 typedef struct hwrm_async_event_cmpl_dbg_buf_producer {
12250 	uint16_t	type;
12251 	/*
12252 	 * This field indicates the exact type of the completion.
12253 	 * By convention, the LSB identifies the length of the
12254 	 * record in 16B units. Even values indicate 16B
12255 	 * records. Odd values indicate 32B
12256 	 * records.
12257 	 */
12258 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_MASK		UINT32_C(0x3f)
12259 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_SFT		0
12260 	/* HWRM Asynchronous Event Information */
12261 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12262 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_HWRM_ASYNC_EVENT
12263 	/* Identifiers of events. */
12264 	uint16_t	event_id;
12265 	/*
12266 	 * Used to notify the host that the firmware has DMA-ed additional
12267 	 * debug data to the host buffer. This is effectively a producer index
12268 	 * update. The host driver can utilize this information to determine
12269 	 * how much of its host buffer has been populated by the firmware.
12270 	 */
12271 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_ID_DBG_BUF_PRODUCER UINT32_C(0x4c)
12272 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_ID_LAST		HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_ID_DBG_BUF_PRODUCER
12273 	/* Event specific data */
12274 	uint32_t	event_data2;
12275 	/*
12276 	 * Specifies the current host buffer offset. Data up to this offset
12277 	 * has been populated by the firmware. For example, if the firmware
12278 	 * has DMA-ed 8192 bytes to the host buffer, then this field has a
12279 	 * value of 8192. This field rolls over to zero once the firmware
12280 	 * writes the last page of the host buffer
12281 	 */
12282 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURRENT_BUFFER_OFFSET_MASK UINT32_C(0xffffffff)
12283 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURRENT_BUFFER_OFFSET_SFT 0
12284 	uint8_t	opaque_v;
12285 	/*
12286 	 * This value is written by the NIC such that it will be different
12287 	 * for each pass through the completion queue. The even passes
12288 	 * will write 1. The odd passes will write 0.
12289 	 */
12290 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_V	UINT32_C(0x1)
12291 	/* opaque is 7 b */
12292 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_OPAQUE_MASK UINT32_C(0xfe)
12293 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_OPAQUE_SFT 1
12294 	/* 8-lsb timestamp from POR (100-msec resolution) */
12295 	uint8_t	timestamp_lo;
12296 	/* 16-lsb timestamp from POR (100-msec resolution) */
12297 	uint16_t	timestamp_hi;
12298 	/* Event specific data */
12299 	uint32_t	event_data1;
12300 	/* Type of trace buffer that has been updated. */
12301 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_MASK	UINT32_C(0xffff)
12302 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SFT		0
12303 	/* SRT trace. */
12304 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SRT_TRACE	UINT32_C(0x0)
12305 	/* SRT2 trace. */
12306 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SRT2_TRACE	UINT32_C(0x1)
12307 	/* CRT trace. */
12308 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CRT_TRACE	UINT32_C(0x2)
12309 	/* CRT2 trace. */
12310 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CRT2_TRACE	UINT32_C(0x3)
12311 	/* RIGP0 trace. */
12312 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_RIGP0_TRACE	UINT32_C(0x4)
12313 	/* L2 HWRM trace. */
12314 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_L2_HWRM_TRACE	UINT32_C(0x5)
12315 	/* RoCE HWRM trace. */
12316 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ROCE_HWRM_TRACE  UINT32_C(0x6)
12317 		#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ROCE_HWRM_TRACE
12318 } hwrm_async_event_cmpl_dbg_buf_producer_t, *phwrm_async_event_cmpl_dbg_buf_producer_t;
12319 
12320 /* hwrm_async_event_cmpl_fw_trace_msg (size:128b/16B) */
12321 
12322 typedef struct hwrm_async_event_cmpl_fw_trace_msg {
12323 	uint16_t	type;
12324 	/*
12325 	 * This field indicates the exact type of the completion.
12326 	 * By convention, the LSB identifies the length of the
12327 	 * record in 16B units. Even values indicate 16B
12328 	 * records. Odd values indicate 32B
12329 	 * records.
12330 	 */
12331 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_MASK		UINT32_C(0x3f)
12332 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_SFT		0
12333 	/* HWRM Asynchronous Event Information */
12334 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12335 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_HWRM_ASYNC_EVENT
12336 	/* Identifiers of events. */
12337 	uint16_t	event_id;
12338 	/* Firmware trace log message */
12339 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_ID_FW_TRACE_MSG UINT32_C(0xfe)
12340 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_ID_FW_TRACE_MSG
12341 	/* Trace byte 0 to 3 */
12342 	uint32_t	event_data2;
12343 	/* Trace byte0 */
12344 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE0_MASK UINT32_C(0xff)
12345 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE0_SFT 0
12346 	/* Trace byte1 */
12347 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE1_MASK UINT32_C(0xff00)
12348 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE1_SFT 8
12349 	/* Trace byte2 */
12350 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE2_MASK UINT32_C(0xff0000)
12351 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE2_SFT 16
12352 	/* Trace byte3 */
12353 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE3_MASK UINT32_C(0xff000000)
12354 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE3_SFT 24
12355 	uint8_t	opaque_v;
12356 	/*
12357 	 * This value is written by the NIC such that it will be different
12358 	 * for each pass through the completion queue. The even passes
12359 	 * will write 1. The odd passes will write 0.
12360 	 */
12361 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_V	UINT32_C(0x1)
12362 	/* opaque is 7 b */
12363 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_OPAQUE_MASK UINT32_C(0xfe)
12364 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_OPAQUE_SFT 1
12365 	/* Trace flags */
12366 	uint8_t	timestamp_lo;
12367 	/* Indicates if the string is partial or complete. */
12368 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING		UINT32_C(0x1)
12369 	/* Complete string */
12370 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_COMPLETE	UINT32_C(0x0)
12371 	/* Partial string */
12372 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_PARTIAL	UINT32_C(0x1)
12373 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_LAST	HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_PARTIAL
12374 	/* Indicates the firmware that sent the trace message. */
12375 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE	UINT32_C(0x2)
12376 	/* Primary firmware */
12377 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_PRIMARY	(UINT32_C(0x0) << 1)
12378 	/* Secondary firmware */
12379 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_SECONDARY  (UINT32_C(0x1) << 1)
12380 		#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_LAST	HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_SECONDARY
12381 	/* Trace byte 4 to 5 */
12382 	uint16_t	timestamp_hi;
12383 	/* Trace byte4 */
12384 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE4_MASK UINT32_C(0xff)
12385 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE4_SFT 0
12386 	/* Trace byte5 */
12387 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE5_MASK UINT32_C(0xff00)
12388 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE5_SFT 8
12389 	/* Trace byte 6 to 9 */
12390 	uint32_t	event_data1;
12391 	/* Trace byte6 */
12392 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE6_MASK UINT32_C(0xff)
12393 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE6_SFT 0
12394 	/* Trace byte7 */
12395 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE7_MASK UINT32_C(0xff00)
12396 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE7_SFT 8
12397 	/* Trace byte8 */
12398 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE8_MASK UINT32_C(0xff0000)
12399 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE8_SFT 16
12400 	/* Trace byte9 */
12401 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE9_MASK UINT32_C(0xff000000)
12402 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE9_SFT 24
12403 } hwrm_async_event_cmpl_fw_trace_msg_t, *phwrm_async_event_cmpl_fw_trace_msg_t;
12404 
12405 /* hwrm_async_event_cmpl_hwrm_error (size:128b/16B) */
12406 
12407 typedef struct hwrm_async_event_cmpl_hwrm_error {
12408 	uint16_t	type;
12409 	/*
12410 	 * This field indicates the exact type of the completion.
12411 	 * By convention, the LSB identifies the length of the
12412 	 * record in 16B units. Even values indicate 16B
12413 	 * records. Odd values indicate 32B
12414 	 * records.
12415 	 */
12416 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_MASK		UINT32_C(0x3f)
12417 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_SFT		0
12418 	/* HWRM Asynchronous Event Information */
12419 		#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12420 		#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_HWRM_ASYNC_EVENT
12421 	/* Identifiers of events. */
12422 	uint16_t	event_id;
12423 	/* HWRM Error */
12424 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_HWRM_ERROR UINT32_C(0xff)
12425 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_HWRM_ERROR
12426 	/* Event specific data */
12427 	uint32_t	event_data2;
12428 	/* Severity of HWRM Error */
12429 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_MASK	UINT32_C(0xff)
12430 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_SFT	0
12431 	/* Warning */
12432 		#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_WARNING   UINT32_C(0x0)
12433 	/* Non-fatal Error */
12434 		#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_NONFATAL  UINT32_C(0x1)
12435 	/* Fatal Error */
12436 		#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL	UINT32_C(0x2)
12437 		#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_LAST	HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL
12438 	uint8_t	opaque_v;
12439 	/*
12440 	 * This value is written by the NIC such that it will be different
12441 	 * for each pass through the completion queue. The even passes
12442 	 * will write 1. The odd passes will write 0.
12443 	 */
12444 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_V	UINT32_C(0x1)
12445 	/* opaque is 7 b */
12446 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_MASK UINT32_C(0xfe)
12447 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_SFT 1
12448 	/* 8-lsb timestamp from POR (100-msec resolution) */
12449 	uint8_t	timestamp_lo;
12450 	/* 16-lsb timestamp from POR (100-msec resolution) */
12451 	uint16_t	timestamp_hi;
12452 	/* Event specific data */
12453 	uint32_t	event_data1;
12454 	/* Time stamp for error event */
12455 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA1_TIMESTAMP	UINT32_C(0x1)
12456 } hwrm_async_event_cmpl_hwrm_error_t, *phwrm_async_event_cmpl_hwrm_error_t;
12457 
12458 /* hwrm_async_event_cmpl_error_report_base (size:128b/16B) */
12459 
12460 typedef struct hwrm_async_event_cmpl_error_report_base {
12461 	uint16_t	type;
12462 	/*
12463 	 * This field indicates the exact type of the completion.
12464 	 * By convention, the LSB identifies the length of the
12465 	 * record in 16B units. Even values indicate 16B
12466 	 * records. Odd values indicate 32B
12467 	 * records.
12468 	 */
12469 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_MASK		UINT32_C(0x3f)
12470 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_SFT		0
12471 	/* HWRM Asynchronous Event Information */
12472 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12473 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_HWRM_ASYNC_EVENT
12474 	/* Identifiers of events. */
12475 	uint16_t	event_id;
12476 	/*
12477 	 * This async notification message is used to inform
12478 	 * the driver that an error has occurred which may need
12479 	 * the attention of the administrator.
12480 	 */
12481 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
12482 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_ID_ERROR_REPORT
12483 	/* Event specific data. */
12484 	uint32_t	event_data2;
12485 	uint8_t	opaque_v;
12486 	/*
12487 	 * This value is written by the NIC such that it will be different
12488 	 * for each pass through the completion queue. The even passes
12489 	 * will write 1. The odd passes will write 0.
12490 	 */
12491 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_V	UINT32_C(0x1)
12492 	/* opaque is 7 b */
12493 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_OPAQUE_MASK UINT32_C(0xfe)
12494 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_OPAQUE_SFT 1
12495 	/* 8-lsb timestamp (100-msec resolution) */
12496 	uint8_t	timestamp_lo;
12497 	/* 16-lsb timestamp (100-msec resolution) */
12498 	uint16_t	timestamp_hi;
12499 	/* Event specific data */
12500 	uint32_t	event_data1;
12501 	/* Indicates the type of error being reported. */
12502 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_MASK			UINT32_C(0xff)
12503 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_SFT			0
12504 	/* Reserved */
12505 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_RESERVED			UINT32_C(0x0)
12506 	/*
12507 	 * The NIC was subjected to an extended pause storm which caused it
12508 	 * to disable flow control in order to avoid stalling the Tx path.
12509 	 */
12510 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM		UINT32_C(0x1)
12511 	/*
12512 	 * The NIC received an interrupt storm on a TSIO pin being used as
12513 	 * PPS_IN which caused it to disable the interrupt. The signal
12514 	 * should be fixed to be a proper 1 PPS signal before re-enabling
12515 	 * it. The pin number on which this signal was received is stored
12516 	 * in event_data2 as pin_id.
12517 	 */
12518 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_INVALID_SIGNAL		UINT32_C(0x2)
12519 	/*
12520 	 * There was a low level error with an NVM write or erase.
12521 	 * See nvm_err_type for more details.
12522 	 */
12523 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_NVM			UINT32_C(0x3)
12524 	/*
12525 	 * This indicates doorbell drop threshold was hit. When this
12526 	 * threshold is crossed, it indicates one or more doorbells for
12527 	 * the function were dropped by hardware.
12528 	 */
12529 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DOORBELL_DROP_THRESHOLD	UINT32_C(0x4)
12530 	/*
12531 	 * Indicates the NIC's temperature has crossed one of the thermal
12532 	 * thresholds.
12533 	 */
12534 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_THERMAL_THRESHOLD		UINT32_C(0x5)
12535 	/*
12536 	 * Speed change not supported with dual rate transceivers
12537 	 * on this board.
12538 	 */
12539 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED  UINT32_C(0x6)
12540 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_LAST			HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED
12541 } hwrm_async_event_cmpl_error_report_base_t, *phwrm_async_event_cmpl_error_report_base_t;
12542 
12543 #define GET_ERROR_REPORT_TYPE(x) \
12544 	(((x) < 0x80) ? \
12545 	((x) == 0x0 ? "RESERVED": \
12546 	((x) == 0x1 ? "PAUSE_STORM": \
12547 	((x) == 0x2 ? "INVALID_SIGNAL": \
12548 	((x) == 0x3 ? "NVM": \
12549 	((x) == 0x4 ? "DOORBELL_DROP_THRESHOLD": \
12550 	((x) == 0x5 ? "THERMAL_THRESHOLD": \
12551 	((x) == 0x6 ? "DUAL_DATA_RATE_NOT_SUPPORTED": \
12552 	"Unknown decode" ))))))) : \
12553 	"Unknown decode" )
12554 
12555 
12556 /* hwrm_async_event_cmpl_error_report_pause_storm (size:128b/16B) */
12557 
12558 typedef struct hwrm_async_event_cmpl_error_report_pause_storm {
12559 	uint16_t	type;
12560 	/*
12561 	 * This field indicates the exact type of the completion.
12562 	 * By convention, the LSB identifies the length of the
12563 	 * record in 16B units. Even values indicate 16B
12564 	 * records. Odd values indicate 32B
12565 	 * records.
12566 	 */
12567 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_MASK		UINT32_C(0x3f)
12568 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_SFT		0
12569 	/* HWRM Asynchronous Event Information */
12570 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12571 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_HWRM_ASYNC_EVENT
12572 	/* Identifiers of events. */
12573 	uint16_t	event_id;
12574 	/*
12575 	 * This async notification message is used to inform
12576 	 * the driver that an error has occurred which may need
12577 	 * the attention of the administrator.
12578 	 */
12579 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
12580 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_ID_ERROR_REPORT
12581 	/* Event specific data. */
12582 	uint32_t	event_data2;
12583 	uint8_t	opaque_v;
12584 	/*
12585 	 * This value is written by the NIC such that it will be different
12586 	 * for each pass through the completion queue. The even passes
12587 	 * will write 1. The odd passes will write 0.
12588 	 */
12589 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_V	UINT32_C(0x1)
12590 	/* opaque is 7 b */
12591 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_OPAQUE_MASK UINT32_C(0xfe)
12592 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_OPAQUE_SFT 1
12593 	/* 8-lsb timestamp (100-msec resolution) */
12594 	uint8_t	timestamp_lo;
12595 	/* 16-lsb timestamp (100-msec resolution) */
12596 	uint16_t	timestamp_hi;
12597 	/* Event specific data */
12598 	uint32_t	event_data1;
12599 	/* Indicates the type of error being reported. */
12600 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_MASK	UINT32_C(0xff)
12601 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_SFT	0
12602 	/*
12603 	 * The NIC was subjected to an extended pause storm which caused it
12604 	 * to disable flow control in order to avoid stalling the Tx path.
12605 	 */
12606 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM  UINT32_C(0x1)
12607 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM
12608 } hwrm_async_event_cmpl_error_report_pause_storm_t, *phwrm_async_event_cmpl_error_report_pause_storm_t;
12609 
12610 /* hwrm_async_event_cmpl_error_report_invalid_signal (size:128b/16B) */
12611 
12612 typedef struct hwrm_async_event_cmpl_error_report_invalid_signal {
12613 	uint16_t	type;
12614 	/*
12615 	 * This field indicates the exact type of the completion.
12616 	 * By convention, the LSB identifies the length of the
12617 	 * record in 16B units. Even values indicate 16B
12618 	 * records. Odd values indicate 32B
12619 	 * records.
12620 	 */
12621 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_MASK		UINT32_C(0x3f)
12622 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_SFT		0
12623 	/* HWRM Asynchronous Event Information */
12624 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12625 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_HWRM_ASYNC_EVENT
12626 	/* Identifiers of events. */
12627 	uint16_t	event_id;
12628 	/*
12629 	 * This async notification message is used to inform
12630 	 * the driver that an error has occurred which may need
12631 	 * the attention of the administrator.
12632 	 */
12633 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
12634 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_ID_ERROR_REPORT
12635 	/* Event specific data. */
12636 	uint32_t	event_data2;
12637 	/* Indicates the TSIO pin on which invalid signal is detected. */
12638 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA2_PIN_ID_MASK UINT32_C(0xff)
12639 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA2_PIN_ID_SFT 0
12640 	uint8_t	opaque_v;
12641 	/*
12642 	 * This value is written by the NIC such that it will be different
12643 	 * for each pass through the completion queue. The even passes
12644 	 * will write 1. The odd passes will write 0.
12645 	 */
12646 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_V	UINT32_C(0x1)
12647 	/* opaque is 7 b */
12648 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_OPAQUE_MASK UINT32_C(0xfe)
12649 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_OPAQUE_SFT 1
12650 	/* 8-lsb timestamp (100-msec resolution) */
12651 	uint8_t	timestamp_lo;
12652 	/* 16-lsb timestamp (100-msec resolution) */
12653 	uint16_t	timestamp_hi;
12654 	/* Event specific data */
12655 	uint32_t	event_data1;
12656 	/* Indicates the type of error being reported. */
12657 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_MASK	UINT32_C(0xff)
12658 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_SFT	0
12659 	/*
12660 	 * The NIC received an interrupt storm on a TSIO pin being used as
12661 	 * PPS_IN which caused it to disable the interrupt. The signal
12662 	 * should be fixed to be a proper 1 PPS signal before re-enabling
12663 	 * it. The pin number on which this signal was received is stored
12664 	 * in event_data2 as pin_id.
12665 	 */
12666 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_INVALID_SIGNAL  UINT32_C(0x2)
12667 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_INVALID_SIGNAL
12668 } hwrm_async_event_cmpl_error_report_invalid_signal_t, *phwrm_async_event_cmpl_error_report_invalid_signal_t;
12669 
12670 /* hwrm_async_event_cmpl_error_report_nvm (size:128b/16B) */
12671 
12672 typedef struct hwrm_async_event_cmpl_error_report_nvm {
12673 	uint16_t	type;
12674 	/*
12675 	 * This field indicates the exact type of the completion.
12676 	 * By convention, the LSB identifies the length of the
12677 	 * record in 16B units. Even values indicate 16B
12678 	 * records. Odd values indicate 32B
12679 	 * records.
12680 	 */
12681 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_MASK		UINT32_C(0x3f)
12682 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_SFT		0
12683 	/* HWRM Asynchronous Event Information */
12684 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12685 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_HWRM_ASYNC_EVENT
12686 	/* Identifiers of events. */
12687 	uint16_t	event_id;
12688 	/*
12689 	 * This async notification message is used to inform
12690 	 * the driver that an error has occurred which may need
12691 	 * the attention of the administrator.
12692 	 */
12693 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
12694 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_ID_ERROR_REPORT
12695 	/* Event specific data. */
12696 	uint32_t	event_data2;
12697 	/* Indicates the address where error was detected */
12698 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA2_ERR_ADDR_MASK UINT32_C(0xffffffff)
12699 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA2_ERR_ADDR_SFT 0
12700 	uint8_t	opaque_v;
12701 	/*
12702 	 * This value is written by the NIC such that it will be different
12703 	 * for each pass through the completion queue. The even passes
12704 	 * will write 1. The odd passes will write 0.
12705 	 */
12706 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_V	UINT32_C(0x1)
12707 	/* opaque is 7 b */
12708 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_OPAQUE_MASK UINT32_C(0xfe)
12709 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_OPAQUE_SFT 1
12710 	/* 8-lsb timestamp (100-msec resolution) */
12711 	uint8_t	timestamp_lo;
12712 	/* 16-lsb timestamp (100-msec resolution) */
12713 	uint16_t	timestamp_hi;
12714 	/* Event specific data */
12715 	uint32_t	event_data1;
12716 	/* Indicates the type of error being reported. */
12717 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_MASK	UINT32_C(0xff)
12718 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_SFT	0
12719 	/*
12720 	 * There was a low level error with an NVM operation.
12721 	 * See nvm_err_type for more details.
12722 	 */
12723 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_NVM_ERROR  UINT32_C(0x3)
12724 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_NVM_ERROR
12725 	/* The specific type of NVM error */
12726 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_MASK   UINT32_C(0xff00)
12727 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_SFT	8
12728 	/*
12729 	 * There was a low level error with an NVM write operation.
12730 	 * Verification of written data did not match.
12731 	 * event_data2 will be the failing address.
12732 	 */
12733 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_WRITE	(UINT32_C(0x1) << 8)
12734 	/*
12735 	 * There was a low level error with an NVM erase operation.
12736 	 * All the bits were not erased.
12737 	 * event_data2 will be the failing address.
12738 	 */
12739 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_ERASE	(UINT32_C(0x2) << 8)
12740 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_ERASE
12741 } hwrm_async_event_cmpl_error_report_nvm_t, *phwrm_async_event_cmpl_error_report_nvm_t;
12742 
12743 /* hwrm_async_event_cmpl_error_report_doorbell_drop_threshold (size:128b/16B) */
12744 
12745 typedef struct hwrm_async_event_cmpl_error_report_doorbell_drop_threshold {
12746 	uint16_t	type;
12747 	/*
12748 	 * This field indicates the exact type of the completion.
12749 	 * By convention, the LSB identifies the length of the
12750 	 * record in 16B units. Even values indicate 16B
12751 	 * records. Odd values indicate 32B
12752 	 * records.
12753 	 */
12754 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_MASK		UINT32_C(0x3f)
12755 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_SFT		0
12756 	/* HWRM Asynchronous Event Information */
12757 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12758 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_HWRM_ASYNC_EVENT
12759 	/* Identifiers of events. */
12760 	uint16_t	event_id;
12761 	/*
12762 	 * This async notification message is used to inform
12763 	 * the driver that an error has occurred which may need
12764 	 * the attention of the administrator.
12765 	 */
12766 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
12767 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_ID_ERROR_REPORT
12768 	/* Event specific data. */
12769 	uint32_t	event_data2;
12770 	uint8_t	opaque_v;
12771 	/*
12772 	 * This value is written by the NIC such that it will be different
12773 	 * for each pass through the completion queue. The even passes
12774 	 * will write 1. The odd passes will write 0.
12775 	 */
12776 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_V	UINT32_C(0x1)
12777 	/* opaque is 7 b */
12778 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_OPAQUE_MASK UINT32_C(0xfe)
12779 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_OPAQUE_SFT 1
12780 	/* 8-lsb timestamp (100-msec resolution) */
12781 	uint8_t	timestamp_lo;
12782 	/* 16-lsb timestamp (100-msec resolution) */
12783 	uint16_t	timestamp_hi;
12784 	/* Event specific data */
12785 	uint32_t	event_data1;
12786 	/* Indicates the type of error being reported. */
12787 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_MASK		UINT32_C(0xff)
12788 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_SFT			0
12789 	/*
12790 	 * This indicates doorbell drop threshold was hit. When this
12791 	 * threshold is crossed, it indicates one or more doorbells for
12792 	 * the function were dropped by hardware.
12793 	 */
12794 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_DOORBELL_DROP_THRESHOLD  UINT32_C(0x4)
12795 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_LAST			HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_DOORBELL_DROP_THRESHOLD
12796 	/*
12797 	 * The epoch value to be sent from firmware to the driver to track
12798 	 * a doorbell recovery cycle.
12799 	 */
12800 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_EPOCH_MASK			UINT32_C(0xffffff00)
12801 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_EPOCH_SFT			8
12802 } hwrm_async_event_cmpl_error_report_doorbell_drop_threshold_t, *phwrm_async_event_cmpl_error_report_doorbell_drop_threshold_t;
12803 
12804 /* hwrm_async_event_cmpl_error_report_thermal (size:128b/16B) */
12805 
12806 typedef struct hwrm_async_event_cmpl_error_report_thermal {
12807 	uint16_t	type;
12808 	/*
12809 	 * This field indicates the exact type of the completion.
12810 	 * By convention, the LSB identifies the length of the
12811 	 * record in 16B units. Even values indicate 16B
12812 	 * records. Odd values indicate 32B
12813 	 * records.
12814 	 */
12815 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_MASK		UINT32_C(0x3f)
12816 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_SFT		0
12817 	/* HWRM Asynchronous Event Information */
12818 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12819 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_HWRM_ASYNC_EVENT
12820 	/* Identifiers of events. */
12821 	uint16_t	event_id;
12822 	/*
12823 	 * This async notification message is used to inform
12824 	 * the driver that an error has occurred which may need
12825 	 * the attention of the administrator.
12826 	 */
12827 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
12828 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_ID_ERROR_REPORT
12829 	/* Event specific data. */
12830 	uint32_t	event_data2;
12831 	/* Current temperature. In Celsius */
12832 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_CURRENT_TEMP_MASK  UINT32_C(0xff)
12833 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_CURRENT_TEMP_SFT   0
12834 	/*
12835 	 * The temperature setting of the threshold that was just crossed.
12836 	 * In Celsius
12837 	 */
12838 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_THRESHOLD_TEMP_MASK UINT32_C(0xff00)
12839 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_THRESHOLD_TEMP_SFT 8
12840 	uint8_t	opaque_v;
12841 	/*
12842 	 * This value is written by the NIC such that it will be different
12843 	 * for each pass through the completion queue. The even passes
12844 	 * will write 1. The odd passes will write 0.
12845 	 */
12846 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_V	UINT32_C(0x1)
12847 	/* opaque is 7 b */
12848 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_OPAQUE_MASK UINT32_C(0xfe)
12849 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_OPAQUE_SFT 1
12850 	/* 8-lsb timestamp (100-msec resolution) */
12851 	uint8_t	timestamp_lo;
12852 	/* 16-lsb timestamp (100-msec resolution) */
12853 	uint16_t	timestamp_hi;
12854 	/* Event specific data */
12855 	uint32_t	event_data1;
12856 	/* Indicates the type of error being reported. */
12857 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_MASK	UINT32_C(0xff)
12858 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_SFT	0
12859 	/*
12860 	 * There was thermal event. The type will be specified in the
12861 	 * field threshold_type. event_data2 will contain the current
12862 	 * temperature and the configured value for the threshold that
12863 	 * was just crossed. The threshold values are lower thresholds,
12864 	 * so the event will trigger with an active flag when the
12865 	 * temperature is on an increasing trajectory.
12866 	 */
12867 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_THERMAL_EVENT   UINT32_C(0x5)
12868 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_THERMAL_EVENT
12869 	/* The specific type of thermal threshold error */
12870 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_MASK	UINT32_C(0x700)
12871 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_SFT	8
12872 	/* Warning thermal threshold was crossed */
12873 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_WARN	(UINT32_C(0x0) << 8)
12874 	/* Critical thermal threshold was crossed */
12875 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_CRITICAL	(UINT32_C(0x1) << 8)
12876 	/* Fatal thermal threshold was crossed */
12877 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_FATAL	(UINT32_C(0x2) << 8)
12878 	/*
12879 	 * Thermal shutdown threshold was crossed and a shutdown is
12880 	 * imminent. This event will not occur if self shutdown
12881 	 * is disabled.
12882 	 */
12883 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_SHUTDOWN	(UINT32_C(0x3) << 8)
12884 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_SHUTDOWN
12885 	/*
12886 	 * Indicates if the thermal crossing occurs while the temperature is
12887 	 * increasing or decreasing.
12888 	 */
12889 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR	UINT32_C(0x800)
12890 	/* Threshold is crossed while the temperature is falling. */
12891 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_DECREASING  (UINT32_C(0x0) << 11)
12892 	/* Threshold is crossed while the temperature is rising. */
12893 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_INCREASING  (UINT32_C(0x1) << 11)
12894 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_INCREASING
12895 } hwrm_async_event_cmpl_error_report_thermal_t, *phwrm_async_event_cmpl_error_report_thermal_t;
12896 
12897 /* hwrm_async_event_cmpl_error_report_dual_data_rate_not_supported (size:128b/16B) */
12898 
12899 typedef struct hwrm_async_event_cmpl_error_report_dual_data_rate_not_supported {
12900 	uint16_t	type;
12901 	/*
12902 	 * This field indicates the exact type of the completion.
12903 	 * By convention, the LSB identifies the length of the
12904 	 * record in 16B units. Even values indicate 16B
12905 	 * records. Odd values indicate 32B
12906 	 * records.
12907 	 */
12908 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_MASK		UINT32_C(0x3f)
12909 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_SFT		0
12910 	/* HWRM Asynchronous Event Information */
12911 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
12912 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_LAST		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_HWRM_ASYNC_EVENT
12913 	/* Identifiers of events. */
12914 	uint16_t	event_id;
12915 	/*
12916 	 * This async notification message is used to inform
12917 	 * the driver that an error has occurred which may need
12918 	 * the attention of the administrator.
12919 	 */
12920 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_ID_ERROR_REPORT UINT32_C(0x45)
12921 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_ID_LAST	HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_ID_ERROR_REPORT
12922 	/* Event specific data. */
12923 	uint32_t	event_data2;
12924 	uint8_t	opaque_v;
12925 	/*
12926 	 * This value is written by the NIC such that it will be different
12927 	 * for each pass through the completion queue. The even passes
12928 	 * will write 1. The odd passes will write 0.
12929 	 */
12930 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_V	UINT32_C(0x1)
12931 	/* opaque is 7 b */
12932 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_OPAQUE_MASK UINT32_C(0xfe)
12933 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_OPAQUE_SFT 1
12934 	/* 8-lsb timestamp (100-msec resolution) */
12935 	uint8_t	timestamp_lo;
12936 	/* 16-lsb timestamp (100-msec resolution) */
12937 	uint16_t	timestamp_hi;
12938 	/* Event specific data */
12939 	uint32_t	event_data1;
12940 	/* Indicates the type of error being reported. */
12941 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_MASK			UINT32_C(0xff)
12942 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_SFT			0
12943 	/*
12944 	 * Speed change not supported with dual rate transceivers
12945 	 * on this board.
12946 	 */
12947 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED  UINT32_C(0x6)
12948 		#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_LAST			HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED
12949 } hwrm_async_event_cmpl_error_report_dual_data_rate_not_supported_t, *phwrm_async_event_cmpl_error_report_dual_data_rate_not_supported_t;
12950 
12951 /* metadata_base_msg (size:64b/8B) */
12952 
12953 typedef struct metadata_base_msg {
12954 	uint16_t	md_type_link;
12955 	/* This field classifies the data present in the meta-data. */
12956 	#define METADATA_BASE_MSG_MD_TYPE_MASK	UINT32_C(0x1f)
12957 	#define METADATA_BASE_MSG_MD_TYPE_SFT	0
12958 	/* Meta data fields are not valid */
12959 		#define METADATA_BASE_MSG_MD_TYPE_NONE	UINT32_C(0x0)
12960 	/*
12961 	 * This setting is used when packets are coming in-order. Depending on
12962 	 * the state of the receive context, the meta-data will carry
12963 	 * different information.
12964 	 */
12965 		#define METADATA_BASE_MSG_MD_TYPE_TLS_INSYNC  UINT32_C(0x1)
12966 	/*
12967 	 * With this setting HW passes the TCP sequence number of the TLS
12968 	 * record that it is requesting a resync on in the meta data.
12969 	 */
12970 		#define METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC  UINT32_C(0x2)
12971 	/* This setting is used for QUIC packets. */
12972 		#define METADATA_BASE_MSG_MD_TYPE_QUIC	UINT32_C(0x3)
12973 	/*
12974 	 * This setting is used for crypto packets with an unsupported
12975 	 * protocol.
12976 	 */
12977 		#define METADATA_BASE_MSG_MD_TYPE_ILLEGAL	UINT32_C(0x1f)
12978 		#define METADATA_BASE_MSG_MD_TYPE_LAST	METADATA_BASE_MSG_MD_TYPE_ILLEGAL
12979 	/*
12980 	 * This field indicates where the next metadata block starts, relative
12981 	 * to the current metadata block. It is the offset to the next metadata
12982 	 * header, counted in 16B units. A value of zero indicates that there is
12983 	 * no additional metadata, and that the current metadata block is the
12984 	 * last one.
12985 	 */
12986 	#define METADATA_BASE_MSG_LINK_MASK	UINT32_C(0x1e0)
12987 	#define METADATA_BASE_MSG_LINK_SFT	5
12988 	uint16_t	unused0;
12989 	uint32_t	unused1;
12990 } metadata_base_msg_t, *pmetadata_base_msg_t;
12991 
12992 /* tls_metadata_base_msg (size:64b/8B) */
12993 
12994 typedef struct tls_metadata_base_msg {
12995 	uint32_t	md_type_link_flags_kid_lo;
12996 	/* This field classifies the data present in the meta-data. */
12997 	#define TLS_METADATA_BASE_MSG_MD_TYPE_MASK				UINT32_C(0x1f)
12998 	#define TLS_METADATA_BASE_MSG_MD_TYPE_SFT				0
12999 	/*
13000 	 * This setting is used when packets are coming in-order. Depending
13001 	 * on the state of the receive context, the meta-data will carry
13002 	 * different information.
13003 	 */
13004 		#define TLS_METADATA_BASE_MSG_MD_TYPE_TLS_INSYNC				UINT32_C(0x1)
13005 	/*
13006 	 * With this setting HW passes the TCP sequence number of the TLS
13007 	 * record that it is requesting a resync on in the meta data.
13008 	 */
13009 		#define TLS_METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC				UINT32_C(0x2)
13010 		#define TLS_METADATA_BASE_MSG_MD_TYPE_LAST				TLS_METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC
13011 	/*
13012 	 * This field indicates where the next metadata block starts. It is
13013 	 * counted in 16B units. A value of zero indicates that there is no
13014 	 * metadata.
13015 	 */
13016 	#define TLS_METADATA_BASE_MSG_LINK_MASK					UINT32_C(0x1e0)
13017 	#define TLS_METADATA_BASE_MSG_LINK_SFT					5
13018 	/* These are flags present in the metadata. */
13019 	#define TLS_METADATA_BASE_MSG_FLAGS_MASK				UINT32_C(0x1fffe00)
13020 	#define TLS_METADATA_BASE_MSG_FLAGS_SFT					9
13021 	/*
13022 	 * A value of 1 implies that the packet was decrypted by HW. Otherwise
13023 	 * the packet is passed on as it came in on the wire.
13024 	 */
13025 	#define TLS_METADATA_BASE_MSG_FLAGS_DECRYPTED				UINT32_C(0x200)
13026 	/*
13027 	 * This field indicates the state of the ghash field passed in the
13028 	 * meta-data.
13029 	 */
13030 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_MASK				UINT32_C(0xc00)
13031 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_SFT				10
13032 	/*
13033 	 * This enumeration states that the ghash is not valid in the
13034 	 * meta-data.
13035 	 */
13036 		#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_NOT_VALID			(UINT32_C(0x0) << 10)
13037 	/*
13038 	 * This enumeration indicates that this pkt contains the record's
13039 	 * tag and this pkt was received ooo, the partial_ghash field
13040 	 * contains the ghash.
13041 	 */
13042 		#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_CUR_REC				(UINT32_C(0x1) << 10)
13043 	/*
13044 	 * This enumeration indicates that the current record's tag wasn't
13045 	 * seen and the chip is moving on to the next record, the
13046 	 * partial_ghash field contains the ghash.
13047 	 */
13048 		#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_PRIOR_REC			(UINT32_C(0x2) << 10)
13049 		#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_LAST				TLS_METADATA_BASE_MSG_FLAGS_GHASH_PRIOR_REC
13050 	/* This field indicates the status of tag authentication. */
13051 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_MASK			UINT32_C(0x3000)
13052 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_SFT			12
13053 	/*
13054 	 * This enumeration is set when HW was not able to authenticate a
13055 	 * TAG.
13056 	 */
13057 		#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED		(UINT32_C(0x0) << 12)
13058 	/*
13059 	 * This enumeration states that there is at least one tag in the
13060 	 * packet and every tag is valid.
13061 	 */
13062 		#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_SUCCESS		(UINT32_C(0x1) << 12)
13063 	/*
13064 	 * This enumeration states that there is at least one tag in the
13065 	 * packet and at least one of the tag is invalid. The entire packet
13066 	 * is sent decrypted to the host.
13067 	 */
13068 		#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE		(UINT32_C(0x2) << 12)
13069 		#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_LAST			TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE
13070 	/*
13071 	 * A value of 1 indicates that this packet contains a record that
13072 	 * starts in the packet and extends beyond the packet.
13073 	 */
13074 	#define TLS_METADATA_BASE_MSG_FLAGS_HEADER_FLDS_VALID			UINT32_C(0x4000)
13075 	/*
13076 	 * A value of 1 indicates that the packet experienced a context load
13077 	 * error. In this case, the packet is sent to the host without the
13078 	 * header or payload decrypted and the context is not updated.
13079 	 */
13080 	#define TLS_METADATA_BASE_MSG_FLAGS_CTX_LOAD_ERR				UINT32_C(0x8000)
13081 	/* This field indicates the packet operation state. */
13082 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_MASK		UINT32_C(0x70000)
13083 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_SFT		16
13084 	/* Packet is in order. */
13085 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER		(UINT32_C(0x0) << 16)
13086 	/* Packet is out of order, no header loss. */
13087 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER	(UINT32_C(0x1) << 16)
13088 	/* Packet is header search (out of order with header loss). */
13089 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH	(UINT32_C(0x2) << 16)
13090 	/* Packet is resync (resync record ongoing). */
13091 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC		(UINT32_C(0x3) << 16)
13092 	/*
13093 	 * Packet is resync wait (resync record completes, waiting for
13094 	 * result).
13095 	 */
13096 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT	(UINT32_C(0x4) << 16)
13097 	/*
13098 	 * Packet is resync wait for partial tag (waiting for resync record
13099 	 * tag).
13100 	 */
13101 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL   (UINT32_C(0x5) << 16)
13102 	/* Packet is resync success (got resync record success). */
13103 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS	(UINT32_C(0x6) << 16)
13104 	/*
13105 	 * Packet is resync success wait (got midpath ACK, waiting for
13106 	 * resync record success).
13107 	 */
13108 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT   (UINT32_C(0x7) << 16)
13109 		#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_LAST		TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT
13110 	/*
13111 	 * This value indicates the lower 7-bit of the Crypto Key ID
13112 	 * associated with this operation.
13113 	 */
13114 	#define TLS_METADATA_BASE_MSG_KID_LO_MASK				UINT32_C(0xfe000000)
13115 	#define TLS_METADATA_BASE_MSG_KID_LO_SFT				25
13116 	uint16_t	kid_hi;
13117 	/*
13118 	 * This value indicates the upper 13-bit of the Crypto Key ID
13119 	 * associated with this operation.
13120 	 */
13121 	#define TLS_METADATA_BASE_MSG_KID_HI_MASK UINT32_C(0x1fff)
13122 	#define TLS_METADATA_BASE_MSG_KID_HI_SFT 0
13123 	uint16_t	unused0;
13124 } tls_metadata_base_msg_t, *ptls_metadata_base_msg_t;
13125 
13126 /* tls_metadata_insync_msg (size:192b/24B) */
13127 
13128 typedef struct tls_metadata_insync_msg {
13129 	uint32_t	md_type_link_flags_kid_lo;
13130 	/* This field classifies the data present in the meta-data. */
13131 	#define TLS_METADATA_INSYNC_MSG_MD_TYPE_MASK				UINT32_C(0x1f)
13132 	#define TLS_METADATA_INSYNC_MSG_MD_TYPE_SFT				0
13133 	/*
13134 	 * This setting is used when packets are coming in-order. Depending on
13135 	 * the state of the receive context, the meta-data will carry
13136 	 * different information.
13137 	 */
13138 		#define TLS_METADATA_INSYNC_MSG_MD_TYPE_TLS_INSYNC				UINT32_C(0x1)
13139 		#define TLS_METADATA_INSYNC_MSG_MD_TYPE_LAST				TLS_METADATA_INSYNC_MSG_MD_TYPE_TLS_INSYNC
13140 	/*
13141 	 * This field indicates where the next metadata block starts. It is
13142 	 * counted in 16B units. A value of zero indicates that there is no
13143 	 * metadata.
13144 	 */
13145 	#define TLS_METADATA_INSYNC_MSG_LINK_MASK					UINT32_C(0x1e0)
13146 	#define TLS_METADATA_INSYNC_MSG_LINK_SFT					5
13147 	/* These are flags present in the metadata. */
13148 	#define TLS_METADATA_INSYNC_MSG_FLAGS_MASK				UINT32_C(0x1fffe00)
13149 	#define TLS_METADATA_INSYNC_MSG_FLAGS_SFT					9
13150 	/*
13151 	 * A value of 1 implies that the packet was decrypted by HW. Otherwise
13152 	 * the packet is passed on as it came in on the wire.
13153 	 */
13154 	#define TLS_METADATA_INSYNC_MSG_FLAGS_DECRYPTED				UINT32_C(0x200)
13155 	/*
13156 	 * This field indicates the state of the ghash field passed in the
13157 	 * meta-data.
13158 	 */
13159 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_MASK				UINT32_C(0xc00)
13160 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_SFT				10
13161 	/*
13162 	 * This enumeration states that the ghash is not valid in the
13163 	 * meta-data.
13164 	 */
13165 		#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_NOT_VALID			(UINT32_C(0x0) << 10)
13166 	/*
13167 	 * This enumeration indicates that this pkt contains the record's
13168 	 * tag and this pkt was received ooo, the partial_ghash field
13169 	 * contains the ghash.
13170 	 */
13171 		#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_CUR_REC				(UINT32_C(0x1) << 10)
13172 	/*
13173 	 * This enumeration indicates that the current record's tag wasn't
13174 	 * seen and the chip is moving on to the next record, the
13175 	 * partial_ghash field contains the ghash.
13176 	 */
13177 		#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_PRIOR_REC			(UINT32_C(0x2) << 10)
13178 		#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_LAST				TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_PRIOR_REC
13179 	/* This field indicates the status of tag authentication. */
13180 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_MASK			UINT32_C(0x3000)
13181 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT			12
13182 	/*
13183 	 * This enumeration is set when HW was not able to authenticate a
13184 	 * TAG.
13185 	 */
13186 		#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED		(UINT32_C(0x0) << 12)
13187 	/*
13188 	 * This enumeration states that there is at least one tag in the
13189 	 * packet and every tag is valid.
13190 	 */
13191 		#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_SUCCESS		(UINT32_C(0x1) << 12)
13192 	/*
13193 	 * This enumeration states that there is at least one tag in the
13194 	 * packet and at least one of the tag is invalid. The entire packet
13195 	 * is sent decrypted to the host.
13196 	 */
13197 		#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE		(UINT32_C(0x2) << 12)
13198 		#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_LAST			TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE
13199 	/*
13200 	 * A value of 1 indicates that this packet contains a record that
13201 	 * starts in the packet and extends beyond the packet.
13202 	 */
13203 	#define TLS_METADATA_INSYNC_MSG_FLAGS_HEADER_FLDS_VALID			UINT32_C(0x4000)
13204 	/*
13205 	 * A value of 1 indicates that the packet experienced a context load
13206 	 * error. In this case, the packet is sent to the host without the
13207 	 * header or payload decrypted and the context is not updated.
13208 	 */
13209 	#define TLS_METADATA_INSYNC_MSG_FLAGS_CTX_LOAD_ERR				UINT32_C(0x8000)
13210 	/* This field indicates the packet operation state. */
13211 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_MASK		UINT32_C(0x70000)
13212 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_SFT		16
13213 	/* Packet is in order. */
13214 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER		(UINT32_C(0x0) << 16)
13215 	/* Packet is out of order, no header loss. */
13216 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER	(UINT32_C(0x1) << 16)
13217 	/* Packet is header search (out of order with header loss). */
13218 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH	(UINT32_C(0x2) << 16)
13219 	/* Packet is resync (resync record ongoing). */
13220 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC		(UINT32_C(0x3) << 16)
13221 	/*
13222 	 * Packet is resync wait (resync record completes, waiting for
13223 	 * result).
13224 	 */
13225 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT	(UINT32_C(0x4) << 16)
13226 	/*
13227 	 * Packet is resync wait for partial tag (waiting for resync record
13228 	 * tag).
13229 	 */
13230 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL   (UINT32_C(0x5) << 16)
13231 	/* Packet is resync success (got resync record success). */
13232 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS	(UINT32_C(0x6) << 16)
13233 	/*
13234 	 * Packet is resync success wait (got midpath ACK, waiting for
13235 	 * resync record success).
13236 	 */
13237 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT   (UINT32_C(0x7) << 16)
13238 		#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_LAST		TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT
13239 	/*
13240 	 * This value indicates the lower 7-bit of the Crypto Key ID
13241 	 * associated with this operation.
13242 	 */
13243 	#define TLS_METADATA_INSYNC_MSG_KID_LO_MASK				UINT32_C(0xfe000000)
13244 	#define TLS_METADATA_INSYNC_MSG_KID_LO_SFT				25
13245 	uint16_t	kid_hi;
13246 	/*
13247 	 * This value indicates the upper 13-bit of the Crypto Key ID
13248 	 * associated with this operation.
13249 	 */
13250 	#define TLS_METADATA_INSYNC_MSG_KID_HI_MASK UINT32_C(0x1fff)
13251 	#define TLS_METADATA_INSYNC_MSG_KID_HI_SFT 0
13252 	/*
13253 	 * This field is only valid when md_type is set to tls_insync. This
13254 	 * field indicates the offset within the current TCP packet where the
13255 	 * TLS header starts. If there are multiple TLS headers in the packet,
13256 	 * this provides the offset of the last TLS header.
13257 	 *
13258 	 * The field is calculated by subtracting TCP sequence number of the
13259 	 * first byte of the TCP payload of the packet from the TCP sequence
13260 	 * number of the last TLS header in the packet.
13261 	 */
13262 	uint16_t	tls_header_offset;
13263 	/*
13264 	 * This is the sequence Number of the record that was processed by the HW.
13265 	 * If there are multiple records in a packet, this would be the sequence
13266 	 * number of the last record.
13267 	 */
13268 	uint64_t	record_seq_num;
13269 	/*
13270 	 * This field contains cumulative partial GHASH value of all the packets
13271 	 * decrypted by the HW associated with a TLS record. This field is valid
13272 	 * on when packets belonging to have arrived out-of-order and HW could
13273 	 * not decrypt every packet and authenticate the record. Partial GHASH is
13274 	 * only sent out with packet having the TAG field.
13275 	 */
13276 	uint8_t	partial_ghash[8];
13277 } tls_metadata_insync_msg_t, *ptls_metadata_insync_msg_t;
13278 
13279 /* tls_metadata_resync_msg (size:256b/32B) */
13280 
13281 typedef struct tls_metadata_resync_msg {
13282 	uint32_t	md_type_link_flags_kid_lo;
13283 	/* This field classifies the data present in the meta-data. */
13284 	#define TLS_METADATA_RESYNC_MSG_MD_TYPE_MASK				UINT32_C(0x1f)
13285 	#define TLS_METADATA_RESYNC_MSG_MD_TYPE_SFT				0
13286 	/*
13287 	 * With this setting HW passes the TCP sequence number of the TLS
13288 	 * record that it is requesting a resync on in the meta data.
13289 	 */
13290 		#define TLS_METADATA_RESYNC_MSG_MD_TYPE_TLS_RESYNC				UINT32_C(0x2)
13291 		#define TLS_METADATA_RESYNC_MSG_MD_TYPE_LAST				TLS_METADATA_RESYNC_MSG_MD_TYPE_TLS_RESYNC
13292 	/*
13293 	 * This field indicates where the next metadata block starts. It is
13294 	 * counted in 16B units. A value of zero indicates that there is no
13295 	 * metadata.
13296 	 */
13297 	#define TLS_METADATA_RESYNC_MSG_LINK_MASK					UINT32_C(0x1e0)
13298 	#define TLS_METADATA_RESYNC_MSG_LINK_SFT					5
13299 	/* These are flags present in the metadata. */
13300 	#define TLS_METADATA_RESYNC_MSG_FLAGS_MASK				UINT32_C(0x1fffe00)
13301 	#define TLS_METADATA_RESYNC_MSG_FLAGS_SFT					9
13302 	/*
13303 	 * A value of 1 implies that the packet was decrypted by HW. Otherwise
13304 	 * the packet is passed on as it came in on the wire.
13305 	 */
13306 	#define TLS_METADATA_RESYNC_MSG_FLAGS_DECRYPTED				UINT32_C(0x200)
13307 	/*
13308 	 * This field indicates the state of the ghash field passed in the
13309 	 * meta-data.
13310 	 */
13311 	#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_MASK				UINT32_C(0xc00)
13312 	#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_SFT				10
13313 	/*
13314 	 * This enumeration states that the ghash is not valid in the
13315 	 * meta-data.
13316 	 */
13317 		#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_NOT_VALID			(UINT32_C(0x0) << 10)
13318 		#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_LAST				TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_NOT_VALID
13319 	/* This field indicates the status of tag authentication. */
13320 	#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_MASK			UINT32_C(0x3000)
13321 	#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT			12
13322 	/*
13323 	 * This enumeration is set when HW was not able to authenticate a
13324 	 * TAG.
13325 	 */
13326 		#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED		(UINT32_C(0x0) << 12)
13327 		#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_LAST			TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED
13328 	/*
13329 	 * A value of 1 indicates that this packet contains a record that
13330 	 * starts in the packet and extends beyond the packet.
13331 	 */
13332 	#define TLS_METADATA_RESYNC_MSG_FLAGS_HEADER_FLDS_VALID			UINT32_C(0x4000)
13333 	/*
13334 	 * A value of 1 indicates that the packet experienced a context load
13335 	 * error. In this case, the packet is sent to the host without the
13336 	 * header or payload decrypted and the context is not updated.
13337 	 */
13338 	#define TLS_METADATA_RESYNC_MSG_FLAGS_CTX_LOAD_ERR				UINT32_C(0x8000)
13339 	/* This field indicates the packet operation state. */
13340 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_MASK		UINT32_C(0x70000)
13341 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_SFT		16
13342 	/* Packet is in order. */
13343 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER		(UINT32_C(0x0) << 16)
13344 	/* Packet is out of order, no header loss. */
13345 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER	(UINT32_C(0x1) << 16)
13346 	/* Packet is header search (out of order with header loss). */
13347 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH	(UINT32_C(0x2) << 16)
13348 	/* Packet is resync (resync record ongoing). */
13349 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC		(UINT32_C(0x3) << 16)
13350 	/*
13351 	 * Packet is resync wait (resync record completes, waiting for
13352 	 * result).
13353 	 */
13354 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT	(UINT32_C(0x4) << 16)
13355 	/*
13356 	 * Packet is resync wait for partial tag (waiting for resync record
13357 	 * tag).
13358 	 */
13359 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL   (UINT32_C(0x5) << 16)
13360 	/* Packet is resync success (got resync record success). */
13361 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS	(UINT32_C(0x6) << 16)
13362 	/*
13363 	 * Packet is resync success wait (got midpath ACK, waiting for
13364 	 * resync record success).
13365 	 */
13366 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT   (UINT32_C(0x7) << 16)
13367 		#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_LAST		TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT
13368 	/*
13369 	 * This value indicates the lower 7-bit of the Crypto Key ID
13370 	 * associated with this operation.
13371 	 */
13372 	#define TLS_METADATA_RESYNC_MSG_KID_LO_MASK				UINT32_C(0xfe000000)
13373 	#define TLS_METADATA_RESYNC_MSG_KID_LO_SFT				25
13374 	uint16_t	kid_hi;
13375 	/*
13376 	 * This value indicates the upper 13-bit of the Crypto Key ID
13377 	 * associated with this operation.
13378 	 */
13379 	#define TLS_METADATA_RESYNC_MSG_KID_HI_MASK UINT32_C(0x1fff)
13380 	#define TLS_METADATA_RESYNC_MSG_KID_HI_SFT 0
13381 	/* This field is unused in this context. */
13382 	uint16_t	metadata_0;
13383 	/*
13384 	 * This field indicates the TCP sequence number of the TLS record that HW
13385 	 * is requesting a resync on from the Driver. HW will keep a count of the
13386 	 * TLS records it found after this record (delta_records). Driver will
13387 	 * provide the TLS Record Sequence Number associated with the record. HW
13388 	 * will add the delta_records to the Record Sequence Number provided by
13389 	 * the driver and get back on sync.
13390 	 */
13391 	uint32_t	resync_record_tcp_seq_num;
13392 	uint32_t	unused0;
13393 	/* This field is unused in this context. */
13394 	uint64_t	metadata_2;
13395 	/* This field is unused in this context. */
13396 	uint64_t	metadata_3;
13397 } tls_metadata_resync_msg_t, *ptls_metadata_resync_msg_t;
13398 
13399 /* tx_doorbell (size:32b/4B) */
13400 
13401 typedef struct tx_doorbell {
13402 	uint32_t	key_idx;
13403 	/*
13404 	 * BD Index of next BD that will be used to transmit data
13405 	 * on the TX ring mapped to this door bell. NIC may
13406 	 * read and process all BDs up to, but not including this
13407 	 * index.
13408 	 */
13409 	#define TX_DOORBELL_IDX_MASK UINT32_C(0xffffff)
13410 	#define TX_DOORBELL_IDX_SFT 0
13411 	/*
13412 	 * This value indicates the type of door bell operation
13413 	 * that is begin requested. This value is '0' for TX
13414 	 * door bell operations.
13415 	 */
13416 	#define TX_DOORBELL_KEY_MASK UINT32_C(0xf0000000)
13417 	#define TX_DOORBELL_KEY_SFT 28
13418 	/* TX Operation */
13419 		#define TX_DOORBELL_KEY_TX	(UINT32_C(0x0) << 28)
13420 		#define TX_DOORBELL_KEY_LAST TX_DOORBELL_KEY_TX
13421 } tx_doorbell_t, *ptx_doorbell_t;
13422 
13423 /* rx_doorbell (size:32b/4B) */
13424 
13425 typedef struct rx_doorbell {
13426 	uint32_t	key_idx;
13427 	/*
13428 	 * BD Index of next BD that will be used for an empty receive
13429 	 * buffer on the RX ring mapped to this door bell. NIC may
13430 	 * read and process all BDs up to, but not including this
13431 	 * index.
13432 	 */
13433 	#define RX_DOORBELL_IDX_MASK UINT32_C(0xffffff)
13434 	#define RX_DOORBELL_IDX_SFT 0
13435 	/*
13436 	 * This value indicates the type of door bell operation
13437 	 * that is begin requested. This value is '1' for RX
13438 	 * door bell operations.
13439 	 */
13440 	#define RX_DOORBELL_KEY_MASK UINT32_C(0xf0000000)
13441 	#define RX_DOORBELL_KEY_SFT 28
13442 	/* RX Operation */
13443 		#define RX_DOORBELL_KEY_RX	(UINT32_C(0x1) << 28)
13444 		#define RX_DOORBELL_KEY_LAST RX_DOORBELL_KEY_RX
13445 } rx_doorbell_t, *prx_doorbell_t;
13446 
13447 /* cmpl_doorbell (size:32b/4B) */
13448 
13449 typedef struct cmpl_doorbell {
13450 	uint32_t	key_mask_valid_idx;
13451 	/*
13452 	 * BD Index of the most recently handed completion record
13453 	 * on the completion ring mapped to this door bell.
13454 	 * NIC may
13455 	 * write this location again with a new completion.
13456 	 */
13457 	#define CMPL_DOORBELL_IDX_MASK	UINT32_C(0xffffff)
13458 	#define CMPL_DOORBELL_IDX_SFT	0
13459 	/*
13460 	 * This indicates if the BDIDX value is valid for this
13461 	 * update when it is '1'. When it is '0', the BDIDX
13462 	 * value should be ignored.
13463 	 */
13464 	#define CMPL_DOORBELL_IDX_VALID	UINT32_C(0x4000000)
13465 	/*
13466 	 * This bit indicates the new interrupt mask state for the
13467 	 * interrupt associated with the BDIDX. A '1', means the
13468 	 * interrupt is to be masked. A '0' indicates the interrupt
13469 	 * is to be unmasked.
13470 	 */
13471 	#define CMPL_DOORBELL_MASK	UINT32_C(0x8000000)
13472 	/*
13473 	 * This value indicates the type of door bell operation
13474 	 * that is begin requested. This value is '2' for CMP
13475 	 * door bell operations.
13476 	 */
13477 	#define CMPL_DOORBELL_KEY_MASK	UINT32_C(0xf0000000)
13478 	#define CMPL_DOORBELL_KEY_SFT	28
13479 	/* Completion Operation */
13480 		#define CMPL_DOORBELL_KEY_CMPL	(UINT32_C(0x2) << 28)
13481 		#define CMPL_DOORBELL_KEY_LAST	CMPL_DOORBELL_KEY_CMPL
13482 } cmpl_doorbell_t, *pcmpl_doorbell_t;
13483 
13484 /* status_doorbell (size:32b/4B) */
13485 
13486 typedef struct status_doorbell {
13487 	uint32_t	key_idx;
13488 	/*
13489 	 * BD Index of the status record for which space is now
13490 	 * available to the NIC.
13491 	 */
13492 	/*
13493 	 * While there is no actual BD associated with the index,
13494 	 * the similar scheme is being used to communicate to
13495 	 * the NIC that space is available for status completions.
13496 	 */
13497 	#define STATUS_DOORBELL_IDX_MASK UINT32_C(0xffffff)
13498 	#define STATUS_DOORBELL_IDX_SFT 0
13499 	/*
13500 	 * This value indicates the type of door bell operation
13501 	 * that is begin requested. This value is '3' for Status
13502 	 * door bell operations.
13503 	 */
13504 	#define STATUS_DOORBELL_KEY_MASK UINT32_C(0xf0000000)
13505 	#define STATUS_DOORBELL_KEY_SFT 28
13506 	/* Status Operation */
13507 		#define STATUS_DOORBELL_KEY_STAT  (UINT32_C(0x3) << 28)
13508 		#define STATUS_DOORBELL_KEY_LAST STATUS_DOORBELL_KEY_STAT
13509 } status_doorbell_t, *pstatus_doorbell_t;
13510 
13511 /* push32_doorbell (size:1024b/128B) */
13512 
13513 typedef struct push32_doorbell {
13514 	uint32_t	key_sz_idx;
13515 	/*
13516 	 * This is the BD Index of last BD of the push packet
13517 	 * that will be used to transmit data on the TX ring mapped
13518 	 * to this door bell.
13519 	 */
13520 	#define PUSH32_DOORBELL_IDX_MASK UINT32_C(0xffffff)
13521 	#define PUSH32_DOORBELL_IDX_SFT 0
13522 	/*
13523 	 * This is the number of 16B BDs spaces consumed in the TX
13524 	 * Ring by the "backup" version of the packet being pushed.
13525 	 * A value of 1 is invalid since backup must start with a
13526 	 * long 32B BE.
13527 	 * A value of 2 indicates just the first 32B BE.
13528 	 * A value of 3 indicates 32B+16B BD. etc.
13529 	 * A value of 0 indicates 16x16B BD spaces are consumed.
13530 	 */
13531 	#define PUSH32_DOORBELL_SZ_MASK UINT32_C(0xf000000)
13532 	#define PUSH32_DOORBELL_SZ_SFT  24
13533 	/*
13534 	 * This value indicates the type of door bell operation
13535 	 * that is begin requested. This value is 4 for push
13536 	 * door bell operations.
13537 	 */
13538 	#define PUSH32_DOORBELL_KEY_MASK UINT32_C(0xf0000000)
13539 	#define PUSH32_DOORBELL_KEY_SFT 28
13540 	/* Push Operation */
13541 		#define PUSH32_DOORBELL_KEY_PUSH  (UINT32_C(0x4) << 28)
13542 		#define PUSH32_DOORBELL_KEY_LAST PUSH32_DOORBELL_KEY_PUSH
13543 	uint16_t	flags_type;
13544 	/* This value identifies the type of buffer descriptor. */
13545 	#define PUSH32_DOORBELL_TYPE_MASK		UINT32_C(0x3f)
13546 	#define PUSH32_DOORBELL_TYPE_SFT		0
13547 	/*
13548 	 * Indicates that this BD is 32B long and is used for
13549 	 * normal L2 packet transmission.
13550 	 */
13551 		#define PUSH32_DOORBELL_TYPE_TX_BD_LONG	UINT32_C(0x10)
13552 		#define PUSH32_DOORBELL_TYPE_LAST		PUSH32_DOORBELL_TYPE_TX_BD_LONG
13553 	/*
13554 	 * All bits in this field must be valid on the first BD of a packet.
13555 	 * Only the packet_end bit must be valid for the remaining BDs
13556 	 * of a packet.
13557 	 */
13558 	#define PUSH32_DOORBELL_FLAGS_MASK	UINT32_C(0xffc0)
13559 	#define PUSH32_DOORBELL_FLAGS_SFT		6
13560 	/*
13561 	 * If set to 1, the packet ends with the data in the buffer
13562 	 * pointed to by this descriptor. This flag must be
13563 	 * valid on every BD.
13564 	 *
13565 	 *	This bit must be set on all push doorbells.
13566 	 */
13567 	#define PUSH32_DOORBELL_FLAGS_PACKET_END	UINT32_C(0x40)
13568 	/*
13569 	 * If set to 1, the device will not generate a completion for
13570 	 * this transmit packet unless there is an error in it's
13571 	 * processing.
13572 	 * If this bit
13573 	 * is set to 0, then the packet will be completed normally.
13574 	 *
13575 	 * This bit must be valid only on the first BD of a packet.
13576 	 */
13577 	#define PUSH32_DOORBELL_FLAGS_NO_CMPL	UINT32_C(0x80)
13578 	/*
13579 	 * This value must match the sz field in the first
13580 	 * 32b of the push operation except that if
13581 	 * 16x16B BD locations
13582 	 * are consumed in the ring by this packet, then
13583 	 * this value must be 16 (not zero).
13584 	 */
13585 	#define PUSH32_DOORBELL_FLAGS_BD_CNT_MASK	UINT32_C(0x1f00)
13586 	#define PUSH32_DOORBELL_FLAGS_BD_CNT_SFT	8
13587 	/*
13588 	 * This value is a hint for the length of the entire packet.
13589 	 * It is used by the chip to optimize internal processing.
13590 	 *
13591 	 * The packet will be dropped if the hint is too short.
13592 	 *
13593 	 * This field is valid only on the first BD of a packet.
13594 	 */
13595 	#define PUSH32_DOORBELL_FLAGS_LHINT_MASK	UINT32_C(0x6000)
13596 	#define PUSH32_DOORBELL_FLAGS_LHINT_SFT	13
13597 	/* indicates packet length < 512B */
13598 		#define PUSH32_DOORBELL_FLAGS_LHINT_LT512	(UINT32_C(0x0) << 13)
13599 	/* indicates 512 <= packet length < 1KB */
13600 		#define PUSH32_DOORBELL_FLAGS_LHINT_LT1K	(UINT32_C(0x1) << 13)
13601 	/* indicates 1KB <= packet length < 2KB */
13602 		#define PUSH32_DOORBELL_FLAGS_LHINT_LT2K	(UINT32_C(0x2) << 13)
13603 	/* indicates packet length >= 2KB */
13604 		#define PUSH32_DOORBELL_FLAGS_LHINT_GTE2K	(UINT32_C(0x3) << 13)
13605 		#define PUSH32_DOORBELL_FLAGS_LHINT_LAST	PUSH32_DOORBELL_FLAGS_LHINT_GTE2K
13606 	/*
13607 	 * If set to 1, the device immediately updates the Send Consumer
13608 	 * Index after the buffer associated with this descriptor has
13609 	 * been transferred via DMA to NIC memory from host memory. An
13610 	 * interrupt may or may not be generated according to the state
13611 	 * of the interrupt avoidance mechanisms. If this bit
13612 	 * is set to 0, then the Consumer Index is only updated as soon
13613 	 * as one of the host interrupt coalescing conditions has been met.
13614 	 *
13615 	 * This bit must be valid on the first BD of a packet.
13616 	 */
13617 	#define PUSH32_DOORBELL_FLAGS_COAL_NOW	UINT32_C(0x8000)
13618 	/*
13619 	 * This is the length of the host physical buffer this BD describes
13620 	 * in bytes.
13621 	 *
13622 	 * This field must be valid on all BDs of a packet.
13623 	 */
13624 	uint16_t	len;
13625 	/*
13626 	 * The opaque data field is pass through to the completion and can be
13627 	 * used for any data that the driver wants to associate with the
13628 	 * transmit BD.
13629 	 *
13630 	 * This field must be valid on the first BD of a packet.
13631 	 */
13632 	uint32_t	opaque;
13633 	/*
13634 	 * All bits in this field must be valid on the first BD of a packet.
13635 	 * Their value on other BDs of the packet will be ignored.
13636 	 */
13637 	uint16_t	lflags;
13638 	/*
13639 	 * If set to 1, the controller replaces the TCP/UPD checksum
13640 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
13641 	 * checksum field of the encapsulated TCP/UDP packets with the
13642 	 * hardware calculated TCP/UDP checksum for the packet associated
13643 	 * with this descriptor. The flag is ignored if the LSO flag is set.
13644 	 *
13645 	 * This bit must be valid on the first BD of a packet.
13646 	 */
13647 	#define PUSH32_DOORBELL_LFLAGS_TCP_UDP_CHKSUM	UINT32_C(0x1)
13648 	/*
13649 	 * If set to 1, the controller replaces the IP checksum of the
13650 	 * normal packets, or the inner IP checksum of the encapsulated
13651 	 * packets with the hardware calculated IP checksum for the
13652 	 * packet associated with this descriptor.
13653 	 *
13654 	 * This bit must be valid on the first BD of a packet.
13655 	 */
13656 	#define PUSH32_DOORBELL_LFLAGS_IP_CHKSUM	UINT32_C(0x2)
13657 	/*
13658 	 * If set to 1, the controller will not append an Ethernet CRC
13659 	 * to the end of the frame.
13660 	 *
13661 	 * This bit must be valid on the first BD of a packet.
13662 	 *
13663 	 * Packet must be 64B or longer when this flag is set. It is not
13664 	 * useful to use this bit with any form of TX offload such as
13665 	 * CSO or LSO. The intent is that the packet from the host already
13666 	 * has a valid Ethernet CRC on the packet.
13667 	 */
13668 	#define PUSH32_DOORBELL_LFLAGS_NOCRC		UINT32_C(0x4)
13669 	/*
13670 	 * If set to 1, the device will record the time at which the packet
13671 	 * was actually transmitted at the TX MAC.
13672 	 *
13673 	 * This bit must be valid on the first BD of a packet.
13674 	 */
13675 	#define PUSH32_DOORBELL_LFLAGS_STAMP		UINT32_C(0x8)
13676 	/*
13677 	 * If set to 1, The controller replaces the tunnel IP checksum
13678 	 * field with hardware calculated IP checksum for the IP header
13679 	 * of the packet associated with this descriptor.
13680 	 *
13681 	 * For outer UDP checksum, global outer UDP checksum TE_NIC register
13682 	 * needs to be enabled. If the global outer UDP checksum TE_NIC
13683 	 * register bit is set, outer UDP checksum will be calculated for the
13684 	 * following cases:
13685 	 * 1. Packets with tcp_udp_chksum flag set to offload checksum for
13686 	 * inner packet AND the inner packet is TCP/UDP. If the inner packet is
13687 	 * ICMP for example (non-TCP/UDP), even if the tcp_udp_chksum is set,
13688 	 * the outer UDP checksum will not be calculated.
13689 	 * 2. Packets with lso flag set which implies inner TCP checksum
13690 	 * calculation as part of LSO operation.
13691 	 */
13692 	#define PUSH32_DOORBELL_LFLAGS_T_IP_CHKSUM	UINT32_C(0x10)
13693 	/*
13694 	 * If set to 1, the device will treat this packet with LSO(Large
13695 	 * Send Offload) processing for both normal or encapsulated
13696 	 * packets, which is a form of TCP segmentation. When this bit
13697 	 * is 1, the hdr_size and mss fields must be valid. The driver
13698 	 * doesn't need to set t_ip_chksum, ip_chksum, and tcp_udp_chksum
13699 	 * flags since the controller will replace the appropriate
13700 	 * checksum fields for segmented packets.
13701 	 *
13702 	 * When this bit is 1, the hdr_size and mss fields must be valid.
13703 	 */
13704 	#define PUSH32_DOORBELL_LFLAGS_LSO		UINT32_C(0x20)
13705 	/*
13706 	 * If set to zero when LSO is '1', then the IPID will be treated
13707 	 * as a 16b number and will be wrapped if it exceeds a value of
13708 	 * 0xffff.
13709 	 *
13710 	 * If set to one when LSO is '1', then the IPID will be treated
13711 	 * as a 15b number and will be wrapped if it exceeds a value of
13712 	 * 0x7fff.
13713 	 */
13714 	#define PUSH32_DOORBELL_LFLAGS_IPID_FMT	UINT32_C(0x40)
13715 	/*
13716 	 * If set to zero when LSO is '1', then the IPID of the tunnel
13717 	 * IP header will not be modified during LSO operations.
13718 	 *
13719 	 * If set to one when LSO is '1', then the IPID of the tunnel
13720 	 * IP header will be incremented for each subsequent segment of an
13721 	 * LSO operation.
13722 	 *
13723 	 * The flag is ignored if the LSO packet is a normal (non-tunneled)
13724 	 * TCP packet.
13725 	 */
13726 	#define PUSH32_DOORBELL_LFLAGS_T_IPID		UINT32_C(0x80)
13727 	/*
13728 	 * If set to '1', then the RoCE ICRC will be appended to the
13729 	 * packet. Packet must be a valid RoCE format packet.
13730 	 */
13731 	#define PUSH32_DOORBELL_LFLAGS_ROCE_CRC	UINT32_C(0x100)
13732 	/*
13733 	 * If set to '1', then the FCoE CRC will be appended to the
13734 	 * packet. Packet must be a valid FCoE format packet.
13735 	 */
13736 	#define PUSH32_DOORBELL_LFLAGS_FCOE_CRC	UINT32_C(0x200)
13737 	uint16_t	hdr_size;
13738 	/*
13739 	 * When LSO is '1', this field must contain the offset of the
13740 	 * TCP payload from the beginning of the packet in as
13741 	 * 16b words. In case of encapsulated/tunneling packet, this field
13742 	 * contains the offset of the inner TCP payload from beginning of the
13743 	 * packet as 16-bit words.
13744 	 *
13745 	 * This value must be valid on the first BD of a packet.
13746 	 */
13747 	#define PUSH32_DOORBELL_HDR_SIZE_MASK UINT32_C(0x1ff)
13748 	#define PUSH32_DOORBELL_HDR_SIZE_SFT 0
13749 	uint32_t	mss;
13750 	/*
13751 	 * This is the MSS value that will be used to do the LSO processing.
13752 	 * The value is the length in bytes of the TCP payload for each
13753 	 * segment generated by the LSO operation.
13754 	 *
13755 	 * This value must be valid on the first BD of a packet.
13756 	 */
13757 	#define PUSH32_DOORBELL_MSS_MASK UINT32_C(0x7fff)
13758 	#define PUSH32_DOORBELL_MSS_SFT 0
13759 	uint16_t	unused_2;
13760 	/*
13761 	 * This value selects a CFA action to perform on the packet.
13762 	 * Set this value to zero if no CFA action is desired.
13763 	 *
13764 	 * This value must be valid on the first BD of a packet.
13765 	 */
13766 	uint16_t	cfa_action;
13767 	/*
13768 	 * This value is action meta-data that defines CFA edit operations
13769 	 * that are done in addition to any action editing.
13770 	 */
13771 	uint32_t	cfa_meta;
13772 	/* When key=1, This is the VLAN tag VID value. */
13773 	#define PUSH32_DOORBELL_CFA_META_VLAN_VID_MASK	UINT32_C(0xfff)
13774 	#define PUSH32_DOORBELL_CFA_META_VLAN_VID_SFT	0
13775 	/* When key=1, This is the VLAN tag DE value. */
13776 	#define PUSH32_DOORBELL_CFA_META_VLAN_DE	UINT32_C(0x1000)
13777 	/* When key=1, This is the VLAN tag PRI value. */
13778 	#define PUSH32_DOORBELL_CFA_META_VLAN_PRI_MASK	UINT32_C(0xe000)
13779 	#define PUSH32_DOORBELL_CFA_META_VLAN_PRI_SFT	13
13780 	/* When key=1, This is the VLAN tag TPID select value. */
13781 	#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_MASK	UINT32_C(0x70000)
13782 	#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_SFT	16
13783 	/* 0x88a8 */
13784 		#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID88A8  (UINT32_C(0x0) << 16)
13785 	/* 0x8100 */
13786 		#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID8100  (UINT32_C(0x1) << 16)
13787 	/* 0x9100 */
13788 		#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID9100  (UINT32_C(0x2) << 16)
13789 	/* 0x9200 */
13790 		#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID9200  (UINT32_C(0x3) << 16)
13791 	/* 0x9300 */
13792 		#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPID9300  (UINT32_C(0x4) << 16)
13793 	/* Value programmed in CFA VLANTPID register. */
13794 		#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPIDCFG   (UINT32_C(0x5) << 16)
13795 		#define PUSH32_DOORBELL_CFA_META_VLAN_TPID_LAST	PUSH32_DOORBELL_CFA_META_VLAN_TPID_TPIDCFG
13796 	/* When key=1, This is the VLAN tag TPID select value. */
13797 	#define PUSH32_DOORBELL_CFA_META_VLAN_RESERVED_MASK UINT32_C(0xff80000)
13798 	#define PUSH32_DOORBELL_CFA_META_VLAN_RESERVED_SFT 19
13799 	/*
13800 	 * This field identifies the type of edit to be performed
13801 	 * on the packet.
13802 	 *
13803 	 * This value must be valid on the first BD of a packet.
13804 	 */
13805 	#define PUSH32_DOORBELL_CFA_META_KEY_MASK	UINT32_C(0xf0000000)
13806 	#define PUSH32_DOORBELL_CFA_META_KEY_SFT	28
13807 	/* No editing */
13808 		#define PUSH32_DOORBELL_CFA_META_KEY_NONE		(UINT32_C(0x0) << 28)
13809 	/*
13810 	 * - meta[17:16] - TPID select value (0 = 0x8100).
13811 	 * - meta[15:12] - PRI/DE value.
13812 	 * - meta[11:0] - VID value.
13813 	 */
13814 		#define PUSH32_DOORBELL_CFA_META_KEY_VLAN_TAG	(UINT32_C(0x1) << 28)
13815 		#define PUSH32_DOORBELL_CFA_META_KEY_LAST	PUSH32_DOORBELL_CFA_META_KEY_VLAN_TAG
13816 	/*
13817 	 * This is the data for the push packet. If the packet
13818 	 * data does not fit in the first pass, data writing
13819 	 * can continue at offset 4 of the doorbell for up to 4 additional
13820 	 * passes for a total data size of 512B maximum.
13821 	 */
13822 	uint32_t	data[25];
13823 } push32_doorbell_t, *ppush32_doorbell_t;
13824 
13825 /*******************
13826  * hwrm_func_reset *
13827  *******************/
13828 
13829 
13830 /* hwrm_func_reset_input (size:192b/24B) */
13831 
13832 typedef struct hwrm_func_reset_input {
13833 	/* The HWRM command request type. */
13834 	uint16_t	req_type;
13835 	/*
13836 	 * The completion ring to send the completion event on. This should
13837 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
13838 	 */
13839 	uint16_t	cmpl_ring;
13840 	/*
13841 	 * The sequence ID is used by the driver for tracking multiple
13842 	 * commands. This ID is treated as opaque data by the firmware and
13843 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
13844 	 */
13845 	uint16_t	seq_id;
13846 	/*
13847 	 * The target ID of the command:
13848 	 * * 0x0-0xFFF8 - The function ID
13849 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
13850 	 * * 0xFFFD - Reserved for user-space HWRM interface
13851 	 * * 0xFFFF - HWRM
13852 	 */
13853 	uint16_t	target_id;
13854 	/*
13855 	 * A physical address pointer pointing to a host buffer that the
13856 	 * command's response data will be written. This can be either a host
13857 	 * physical address (HPA) or a guest physical address (GPA) and must
13858 	 * point to a physically contiguous block of memory.
13859 	 */
13860 	uint64_t	resp_addr;
13861 	uint32_t	enables;
13862 	/*
13863 	 * This bit must be '1' for the vf_id_valid field to be
13864 	 * configured.
13865 	 */
13866 	#define HWRM_FUNC_RESET_INPUT_ENABLES_VF_ID_VALID	UINT32_C(0x1)
13867 	/*
13868 	 * The ID of the VF that this PF is trying to reset.
13869 	 * Only the parent PF shall be allowed to reset a child VF.
13870 	 *
13871 	 * A parent PF driver shall use this field only when a specific child
13872 	 * VF is requested to be reset.
13873 	 */
13874 	uint16_t	vf_id;
13875 	/* This value indicates the level of a function reset. */
13876 	uint8_t	func_reset_level;
13877 	/*
13878 	 * Reset the caller function and its children VFs (if any). If no
13879 	 * children functions exist, then reset the caller function only.
13880 	 */
13881 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETALL	UINT32_C(0x0)
13882 	/* Reset the caller function only */
13883 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETME	UINT32_C(0x1)
13884 	/*
13885 	 * Reset all children VFs of the caller function driver if the
13886 	 * caller is a PF driver.
13887 	 * It is an error to specify this level by a VF driver.
13888 	 * It is an error to specify this level by a PF driver with
13889 	 * no children VFs.
13890 	 */
13891 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETCHILDREN UINT32_C(0x2)
13892 	/*
13893 	 * Reset a specific VF of the caller function driver if the caller
13894 	 * is the parent PF driver.
13895 	 * It is an error to specify this level by a VF driver.
13896 	 * It is an error to specify this level by a PF driver that is not
13897 	 * the parent of the VF that is being requested to reset.
13898 	 */
13899 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETVF	UINT32_C(0x3)
13900 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_LAST	HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETVF
13901 	uint8_t	unused_0;
13902 } hwrm_func_reset_input_t, *phwrm_func_reset_input_t;
13903 
13904 /* hwrm_func_reset_output (size:128b/16B) */
13905 
13906 typedef struct hwrm_func_reset_output {
13907 	/* The specific error status for the command. */
13908 	uint16_t	error_code;
13909 	/* The HWRM command request type. */
13910 	uint16_t	req_type;
13911 	/* The sequence ID from the original command. */
13912 	uint16_t	seq_id;
13913 	/* The length of the response data in number of bytes. */
13914 	uint16_t	resp_len;
13915 	uint8_t	unused_0[7];
13916 	/*
13917 	 * This field is used in Output records to indicate that the output
13918 	 * is completely written to RAM. This field should be read as '1'
13919 	 * to indicate that the output has been completely written. When
13920 	 * writing a command completion or response to an internal processor,
13921 	 * the order of writes has to be such that this field is written last.
13922 	 */
13923 	uint8_t	valid;
13924 } hwrm_func_reset_output_t, *phwrm_func_reset_output_t;
13925 
13926 /********************
13927  * hwrm_func_getfid *
13928  ********************/
13929 
13930 
13931 /* hwrm_func_getfid_input (size:192b/24B) */
13932 
13933 typedef struct hwrm_func_getfid_input {
13934 	/* The HWRM command request type. */
13935 	uint16_t	req_type;
13936 	/*
13937 	 * The completion ring to send the completion event on. This should
13938 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
13939 	 */
13940 	uint16_t	cmpl_ring;
13941 	/*
13942 	 * The sequence ID is used by the driver for tracking multiple
13943 	 * commands. This ID is treated as opaque data by the firmware and
13944 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
13945 	 */
13946 	uint16_t	seq_id;
13947 	/*
13948 	 * The target ID of the command:
13949 	 * * 0x0-0xFFF8 - The function ID
13950 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
13951 	 * * 0xFFFD - Reserved for user-space HWRM interface
13952 	 * * 0xFFFF - HWRM
13953 	 */
13954 	uint16_t	target_id;
13955 	/*
13956 	 * A physical address pointer pointing to a host buffer that the
13957 	 * command's response data will be written. This can be either a host
13958 	 * physical address (HPA) or a guest physical address (GPA) and must
13959 	 * point to a physically contiguous block of memory.
13960 	 */
13961 	uint64_t	resp_addr;
13962 	uint32_t	enables;
13963 	/*
13964 	 * This bit must be '1' for the pci_id field to be
13965 	 * configured.
13966 	 */
13967 	#define HWRM_FUNC_GETFID_INPUT_ENABLES_PCI_ID	UINT32_C(0x1)
13968 	/*
13969 	 * This value is the PCI ID of the queried function.
13970 	 * If ARI is enabled, then it is
13971 	 * Bus Number (8b):Function Number(8b). Otherwise, it is
13972 	 * Bus Number (8b):Device Number (5b):Function Number(3b).
13973 	 */
13974 	uint16_t	pci_id;
13975 	uint8_t	unused_0[2];
13976 } hwrm_func_getfid_input_t, *phwrm_func_getfid_input_t;
13977 
13978 /* hwrm_func_getfid_output (size:128b/16B) */
13979 
13980 typedef struct hwrm_func_getfid_output {
13981 	/* The specific error status for the command. */
13982 	uint16_t	error_code;
13983 	/* The HWRM command request type. */
13984 	uint16_t	req_type;
13985 	/* The sequence ID from the original command. */
13986 	uint16_t	seq_id;
13987 	/* The length of the response data in number of bytes. */
13988 	uint16_t	resp_len;
13989 	/*
13990 	 * FID value. This value is used to identify operations on the PCI
13991 	 * bus as belonging to a particular PCI function.
13992 	 */
13993 	uint16_t	fid;
13994 	uint8_t	unused_0[5];
13995 	/*
13996 	 * This field is used in Output records to indicate that the output
13997 	 * is completely written to RAM. This field should be read as '1'
13998 	 * to indicate that the output has been completely written. When
13999 	 * writing a command completion or response to an internal processor,
14000 	 * the order of writes has to be such that this field is written last.
14001 	 */
14002 	uint8_t	valid;
14003 } hwrm_func_getfid_output_t, *phwrm_func_getfid_output_t;
14004 
14005 /**********************
14006  * hwrm_func_vf_alloc *
14007  **********************/
14008 
14009 
14010 /* hwrm_func_vf_alloc_input (size:192b/24B) */
14011 
14012 typedef struct hwrm_func_vf_alloc_input {
14013 	/* The HWRM command request type. */
14014 	uint16_t	req_type;
14015 	/*
14016 	 * The completion ring to send the completion event on. This should
14017 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14018 	 */
14019 	uint16_t	cmpl_ring;
14020 	/*
14021 	 * The sequence ID is used by the driver for tracking multiple
14022 	 * commands. This ID is treated as opaque data by the firmware and
14023 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14024 	 */
14025 	uint16_t	seq_id;
14026 	/*
14027 	 * The target ID of the command:
14028 	 * * 0x0-0xFFF8 - The function ID
14029 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14030 	 * * 0xFFFD - Reserved for user-space HWRM interface
14031 	 * * 0xFFFF - HWRM
14032 	 */
14033 	uint16_t	target_id;
14034 	/*
14035 	 * A physical address pointer pointing to a host buffer that the
14036 	 * command's response data will be written. This can be either a host
14037 	 * physical address (HPA) or a guest physical address (GPA) and must
14038 	 * point to a physically contiguous block of memory.
14039 	 */
14040 	uint64_t	resp_addr;
14041 	uint32_t	enables;
14042 	/*
14043 	 * This bit must be '1' for the first_vf_id field to be
14044 	 * configured.
14045 	 */
14046 	#define HWRM_FUNC_VF_ALLOC_INPUT_ENABLES_FIRST_VF_ID	UINT32_C(0x1)
14047 	/*
14048 	 * This value is used to identify a Virtual Function (VF).
14049 	 * The scope of VF ID is local within a PF.
14050 	 */
14051 	uint16_t	first_vf_id;
14052 	/* The number of virtual functions requested. */
14053 	uint16_t	num_vfs;
14054 } hwrm_func_vf_alloc_input_t, *phwrm_func_vf_alloc_input_t;
14055 
14056 /* hwrm_func_vf_alloc_output (size:128b/16B) */
14057 
14058 typedef struct hwrm_func_vf_alloc_output {
14059 	/* The specific error status for the command. */
14060 	uint16_t	error_code;
14061 	/* The HWRM command request type. */
14062 	uint16_t	req_type;
14063 	/* The sequence ID from the original command. */
14064 	uint16_t	seq_id;
14065 	/* The length of the response data in number of bytes. */
14066 	uint16_t	resp_len;
14067 	/* The ID of the first VF allocated. */
14068 	uint16_t	first_vf_id;
14069 	uint8_t	unused_0[5];
14070 	/*
14071 	 * This field is used in Output records to indicate that the output
14072 	 * is completely written to RAM. This field should be read as '1'
14073 	 * to indicate that the output has been completely written. When
14074 	 * writing a command completion or response to an internal processor,
14075 	 * the order of writes has to be such that this field is written last.
14076 	 */
14077 	uint8_t	valid;
14078 } hwrm_func_vf_alloc_output_t, *phwrm_func_vf_alloc_output_t;
14079 
14080 /*********************
14081  * hwrm_func_vf_free *
14082  *********************/
14083 
14084 
14085 /* hwrm_func_vf_free_input (size:192b/24B) */
14086 
14087 typedef struct hwrm_func_vf_free_input {
14088 	/* The HWRM command request type. */
14089 	uint16_t	req_type;
14090 	/*
14091 	 * The completion ring to send the completion event on. This should
14092 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14093 	 */
14094 	uint16_t	cmpl_ring;
14095 	/*
14096 	 * The sequence ID is used by the driver for tracking multiple
14097 	 * commands. This ID is treated as opaque data by the firmware and
14098 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14099 	 */
14100 	uint16_t	seq_id;
14101 	/*
14102 	 * The target ID of the command:
14103 	 * * 0x0-0xFFF8 - The function ID
14104 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14105 	 * * 0xFFFD - Reserved for user-space HWRM interface
14106 	 * * 0xFFFF - HWRM
14107 	 */
14108 	uint16_t	target_id;
14109 	/*
14110 	 * A physical address pointer pointing to a host buffer that the
14111 	 * command's response data will be written. This can be either a host
14112 	 * physical address (HPA) or a guest physical address (GPA) and must
14113 	 * point to a physically contiguous block of memory.
14114 	 */
14115 	uint64_t	resp_addr;
14116 	uint32_t	enables;
14117 	/*
14118 	 * This bit must be '1' for the first_vf_id field to be
14119 	 * configured.
14120 	 */
14121 	#define HWRM_FUNC_VF_FREE_INPUT_ENABLES_FIRST_VF_ID	UINT32_C(0x1)
14122 	/*
14123 	 * This value is used to identify a Virtual Function (VF).
14124 	 * The scope of VF ID is local within a PF.
14125 	 */
14126 	uint16_t	first_vf_id;
14127 	/*
14128 	 * The number of virtual functions requested.
14129 	 * 0xFFFF - Cleanup all children of this PF.
14130 	 */
14131 	uint16_t	num_vfs;
14132 } hwrm_func_vf_free_input_t, *phwrm_func_vf_free_input_t;
14133 
14134 /* hwrm_func_vf_free_output (size:128b/16B) */
14135 
14136 typedef struct hwrm_func_vf_free_output {
14137 	/* The specific error status for the command. */
14138 	uint16_t	error_code;
14139 	/* The HWRM command request type. */
14140 	uint16_t	req_type;
14141 	/* The sequence ID from the original command. */
14142 	uint16_t	seq_id;
14143 	/* The length of the response data in number of bytes. */
14144 	uint16_t	resp_len;
14145 	uint8_t	unused_0[7];
14146 	/*
14147 	 * This field is used in Output records to indicate that the output
14148 	 * is completely written to RAM. This field should be read as '1'
14149 	 * to indicate that the output has been completely written. When
14150 	 * writing a command completion or response to an internal processor,
14151 	 * the order of writes has to be such that this field is written last.
14152 	 */
14153 	uint8_t	valid;
14154 } hwrm_func_vf_free_output_t, *phwrm_func_vf_free_output_t;
14155 
14156 /********************
14157  * hwrm_func_vf_cfg *
14158  ********************/
14159 
14160 
14161 /* hwrm_func_vf_cfg_input (size:576b/72B) */
14162 
14163 typedef struct hwrm_func_vf_cfg_input {
14164 	/* The HWRM command request type. */
14165 	uint16_t	req_type;
14166 	/*
14167 	 * The completion ring to send the completion event on. This should
14168 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14169 	 */
14170 	uint16_t	cmpl_ring;
14171 	/*
14172 	 * The sequence ID is used by the driver for tracking multiple
14173 	 * commands. This ID is treated as opaque data by the firmware and
14174 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14175 	 */
14176 	uint16_t	seq_id;
14177 	/*
14178 	 * The target ID of the command:
14179 	 * * 0x0-0xFFF8 - The function ID
14180 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14181 	 * * 0xFFFD - Reserved for user-space HWRM interface
14182 	 * * 0xFFFF - HWRM
14183 	 */
14184 	uint16_t	target_id;
14185 	/*
14186 	 * A physical address pointer pointing to a host buffer that the
14187 	 * command's response data will be written. This can be either a host
14188 	 * physical address (HPA) or a guest physical address (GPA) and must
14189 	 * point to a physically contiguous block of memory.
14190 	 */
14191 	uint64_t	resp_addr;
14192 	uint32_t	enables;
14193 	/*
14194 	 * This bit must be '1' for the mtu field to be
14195 	 * configured.
14196 	 */
14197 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_MTU			UINT32_C(0x1)
14198 	/*
14199 	 * This bit must be '1' for the guest_vlan field to be
14200 	 * configured.
14201 	 */
14202 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_GUEST_VLAN		UINT32_C(0x2)
14203 	/*
14204 	 * This bit must be '1' for the async_event_cr field to be
14205 	 * configured.
14206 	 */
14207 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR	UINT32_C(0x4)
14208 	/*
14209 	 * This bit must be '1' for the dflt_mac_addr field to be
14210 	 * configured.
14211 	 */
14212 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_DFLT_MAC_ADDR		UINT32_C(0x8)
14213 	/*
14214 	 * This bit must be '1' for the num_rsscos_ctxs field to be
14215 	 * configured.
14216 	 */
14217 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS	UINT32_C(0x10)
14218 	/*
14219 	 * This bit must be '1' for the num_cmpl_rings field to be
14220 	 * configured.
14221 	 */
14222 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_CMPL_RINGS	UINT32_C(0x20)
14223 	/*
14224 	 * This bit must be '1' for the num_tx_rings field to be
14225 	 * configured.
14226 	 */
14227 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS		UINT32_C(0x40)
14228 	/*
14229 	 * This bit must be '1' for the num_rx_rings field to be
14230 	 * configured.
14231 	 */
14232 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS		UINT32_C(0x80)
14233 	/*
14234 	 * This bit must be '1' for the num_l2_ctxs field to be
14235 	 * configured.
14236 	 */
14237 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_L2_CTXS		UINT32_C(0x100)
14238 	/*
14239 	 * This bit must be '1' for the num_vnics field to be
14240 	 * configured.
14241 	 */
14242 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_VNICS		UINT32_C(0x200)
14243 	/*
14244 	 * This bit must be '1' for the num_stat_ctxs field to be
14245 	 * configured.
14246 	 */
14247 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_STAT_CTXS		UINT32_C(0x400)
14248 	/*
14249 	 * This bit must be '1' for the num_hw_ring_grps field to be
14250 	 * configured.
14251 	 */
14252 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS	UINT32_C(0x800)
14253 	/*
14254 	 * This bit must be '1' for the num_ktls_tx_key_ctxs field to
14255 	 * be configured.
14256 	 */
14257 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_KTLS_TX_KEY_CTXS	UINT32_C(0x1000)
14258 	/*
14259 	 * This bit must be '1' for the num_ktls_rx_key_ctxs field to
14260 	 * be configured.
14261 	 */
14262 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_KTLS_RX_KEY_CTXS	UINT32_C(0x2000)
14263 	/*
14264 	 * This bit must be '1' for the num_quic_tx_key_ctxs field to
14265 	 * be configured.
14266 	 */
14267 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_QUIC_TX_KEY_CTXS	UINT32_C(0x4000)
14268 	/*
14269 	 * This bit must be '1' for the num_quic_rx_key_ctxs field to
14270 	 * be configured.
14271 	 */
14272 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_QUIC_RX_KEY_CTXS	UINT32_C(0x8000)
14273 	/*
14274 	 * The maximum transmission unit requested on the function.
14275 	 * The HWRM should make sure that the mtu of
14276 	 * the function does not exceed the mtu of the physical
14277 	 * port that this function is associated with.
14278 	 *
14279 	 * In addition to requesting mtu per function, it is
14280 	 * possible to configure mtu per transmit ring.
14281 	 * By default, the mtu of each transmit ring associated
14282 	 * with a function is equal to the mtu of the function.
14283 	 * The HWRM should make sure that the mtu of each transmit
14284 	 * ring that is assigned to a function has a valid mtu.
14285 	 */
14286 	uint16_t	mtu;
14287 	/*
14288 	 * The guest VLAN for the function being configured.
14289 	 * This field's format is same as 802.1Q Tag's
14290 	 * Tag Control Information (TCI) format that includes both
14291 	 * Priority Code Point (PCP) and VLAN Identifier (VID).
14292 	 */
14293 	uint16_t	guest_vlan;
14294 	/*
14295 	 * ID of the target completion ring for receiving asynchronous
14296 	 * event completions. If this field is not valid, then the
14297 	 * HWRM shall use the default completion ring of the function
14298 	 * that is being configured as the target completion ring for
14299 	 * providing any asynchronous event completions for that
14300 	 * function.
14301 	 * If this field is valid, then the HWRM shall use the
14302 	 * completion ring identified by this ID as the target
14303 	 * completion ring for providing any asynchronous event
14304 	 * completions for the function that is being configured.
14305 	 */
14306 	uint16_t	async_event_cr;
14307 	/*
14308 	 * This value is the current MAC address requested by the VF
14309 	 * driver to be configured on this VF. A value of
14310 	 * 00-00-00-00-00-00 indicates no MAC address configuration
14311 	 * is requested by the VF driver.
14312 	 * The parent PF driver may reject or overwrite this
14313 	 * MAC address.
14314 	 */
14315 	uint8_t	dflt_mac_addr[6];
14316 	uint32_t	flags;
14317 	/*
14318 	 * This bit requests that the firmware test to see if all the assets
14319 	 * requested in this command (i.e. number of TX rings) are available.
14320 	 * The firmware will return an error if the requested assets are
14321 	 * not available. The firmware will NOT reserve the assets if they
14322 	 * are available.
14323 	 */
14324 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_TX_ASSETS_TEST		UINT32_C(0x1)
14325 	/*
14326 	 * This bit requests that the firmware test to see if all the assets
14327 	 * requested in this command (i.e. number of RX rings) are available.
14328 	 * The firmware will return an error if the requested assets are
14329 	 * not available. The firmware will NOT reserve the assets if they
14330 	 * are available.
14331 	 */
14332 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RX_ASSETS_TEST		UINT32_C(0x2)
14333 	/*
14334 	 * This bit requests that the firmware test to see if all the assets
14335 	 * requested in this command (i.e. number of CMPL rings) are
14336 	 * available. The firmware will return an error if the requested
14337 	 * assets are not available. The firmware will NOT reserve the assets
14338 	 * if they are available.
14339 	 */
14340 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_CMPL_ASSETS_TEST	UINT32_C(0x4)
14341 	/*
14342 	 * This bit requests that the firmware test to see if all the assets
14343 	 * requested in this command (i.e. number of RSS ctx) are available.
14344 	 * The firmware will return an error if the requested assets are
14345 	 * not available. The firmware will NOT reserve the assets if they
14346 	 * are available.
14347 	 */
14348 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RSSCOS_CTX_ASSETS_TEST	UINT32_C(0x8)
14349 	/*
14350 	 * This bit requests that the firmware test to see if all the assets
14351 	 * requested in this command (i.e. number of ring groups) are
14352 	 * available. The firmware will return an error if the requested
14353 	 * assets are not available. The firmware will NOT reserve the assets
14354 	 * if they are available.
14355 	 */
14356 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RING_GRP_ASSETS_TEST	UINT32_C(0x10)
14357 	/*
14358 	 * This bit requests that the firmware test to see if all the assets
14359 	 * requested in this command (i.e. number of stat ctx) are available.
14360 	 * The firmware will return an error if the requested assets are
14361 	 * not available. The firmware will NOT reserve the assets if they
14362 	 * are available.
14363 	 */
14364 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_STAT_CTX_ASSETS_TEST	UINT32_C(0x20)
14365 	/*
14366 	 * This bit requests that the firmware test to see if all the assets
14367 	 * requested in this command (i.e. number of VNICs) are available.
14368 	 * The firmware will return an error if the requested assets are
14369 	 * not available. The firmware will NOT reserve the assets if they
14370 	 * are available.
14371 	 */
14372 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_VNIC_ASSETS_TEST	UINT32_C(0x40)
14373 	/*
14374 	 * This bit requests that the firmware test to see if all the assets
14375 	 * requested in this command (i.e. number of L2 ctx) are available.
14376 	 * The firmware will return an error if the requested assets are
14377 	 * not available. The firmware will NOT reserve the assets if they
14378 	 * are available.
14379 	 */
14380 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_L2_CTX_ASSETS_TEST	UINT32_C(0x80)
14381 	/*
14382 	 * If this bit is set to 1, the VF driver is requesting FW to enable
14383 	 * PPP TX PUSH feature on all the TX rings specified in the
14384 	 * num_tx_rings field. By default, the PPP TX push feature is
14385 	 * disabled for all the TX rings of the VF. This flag is ignored if
14386 	 * the num_tx_rings field is not specified or the VF doesn't support
14387 	 * PPP tx push feature.
14388 	 */
14389 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE	UINT32_C(0x100)
14390 	/*
14391 	 * If this bit is set to 1, the VF driver is requesting FW to disable
14392 	 * PPP TX PUSH feature on all the TX rings of the VF. This flag is
14393 	 * ignored if the VF doesn't support PPP tx push feature.
14394 	 */
14395 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE	UINT32_C(0x200)
14396 	/* The number of RSS/COS contexts requested for the VF. */
14397 	uint16_t	num_rsscos_ctxs;
14398 	/* The number of completion rings requested for the VF. */
14399 	uint16_t	num_cmpl_rings;
14400 	/* The number of transmit rings requested for the VF. */
14401 	uint16_t	num_tx_rings;
14402 	/* The number of receive rings requested for the VF. */
14403 	uint16_t	num_rx_rings;
14404 	/* The number of L2 contexts requested for the VF. */
14405 	uint16_t	num_l2_ctxs;
14406 	/* The number of vnics requested for the VF. */
14407 	uint16_t	num_vnics;
14408 	/* The number of statistic contexts requested for the VF. */
14409 	uint16_t	num_stat_ctxs;
14410 	/* The number of HW ring groups requested for the VF. */
14411 	uint16_t	num_hw_ring_grps;
14412 	/* Number of KTLS Tx Key Contexts requested. */
14413 	uint32_t	num_ktls_tx_key_ctxs;
14414 	/* Number of KTLS Rx Key Contexts requested. */
14415 	uint32_t	num_ktls_rx_key_ctxs;
14416 	/* The number of MSI-X vectors requested for the VF. */
14417 	uint16_t	num_msix;
14418 	uint8_t	unused[2];
14419 	/* Number of QUIC Tx Key Contexts requested. */
14420 	uint32_t	num_quic_tx_key_ctxs;
14421 	/* Number of QUIC Rx Key Contexts requested. */
14422 	uint32_t	num_quic_rx_key_ctxs;
14423 } hwrm_func_vf_cfg_input_t, *phwrm_func_vf_cfg_input_t;
14424 
14425 /* hwrm_func_vf_cfg_output (size:128b/16B) */
14426 
14427 typedef struct hwrm_func_vf_cfg_output {
14428 	/* The specific error status for the command. */
14429 	uint16_t	error_code;
14430 	/* The HWRM command request type. */
14431 	uint16_t	req_type;
14432 	/* The sequence ID from the original command. */
14433 	uint16_t	seq_id;
14434 	/* The length of the response data in number of bytes. */
14435 	uint16_t	resp_len;
14436 	uint8_t	unused_0[7];
14437 	/*
14438 	 * This field is used in Output records to indicate that the output
14439 	 * is completely written to RAM. This field should be read as '1'
14440 	 * to indicate that the output has been completely written. When
14441 	 * writing a command completion or response to an internal processor,
14442 	 * the order of writes has to be such that this field is written last.
14443 	 */
14444 	uint8_t	valid;
14445 } hwrm_func_vf_cfg_output_t, *phwrm_func_vf_cfg_output_t;
14446 
14447 /*******************
14448  * hwrm_func_qcaps *
14449  *******************/
14450 
14451 
14452 /* hwrm_func_qcaps_input (size:192b/24B) */
14453 
14454 typedef struct hwrm_func_qcaps_input {
14455 	/* The HWRM command request type. */
14456 	uint16_t	req_type;
14457 	/*
14458 	 * The completion ring to send the completion event on. This should
14459 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14460 	 */
14461 	uint16_t	cmpl_ring;
14462 	/*
14463 	 * The sequence ID is used by the driver for tracking multiple
14464 	 * commands. This ID is treated as opaque data by the firmware and
14465 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14466 	 */
14467 	uint16_t	seq_id;
14468 	/*
14469 	 * The target ID of the command:
14470 	 * * 0x0-0xFFF8 - The function ID
14471 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14472 	 * * 0xFFFD - Reserved for user-space HWRM interface
14473 	 * * 0xFFFF - HWRM
14474 	 */
14475 	uint16_t	target_id;
14476 	/*
14477 	 * A physical address pointer pointing to a host buffer that the
14478 	 * command's response data will be written. This can be either a host
14479 	 * physical address (HPA) or a guest physical address (GPA) and must
14480 	 * point to a physically contiguous block of memory.
14481 	 */
14482 	uint64_t	resp_addr;
14483 	/*
14484 	 * Function ID of the function that is being queried.
14485 	 * 0xFF... (All Fs) if the query is for the requesting
14486 	 * function.
14487 	 * 0xFFFE (REQUESTING_PARENT_FID) This is a special FID
14488 	 * to be used by a trusted VF to query its parent PF.
14489 	 */
14490 	uint16_t	fid;
14491 	uint8_t	unused_0[6];
14492 } hwrm_func_qcaps_input_t, *phwrm_func_qcaps_input_t;
14493 
14494 /* hwrm_func_qcaps_output (size:1088b/136B) */
14495 
14496 typedef struct hwrm_func_qcaps_output {
14497 	/* The specific error status for the command. */
14498 	uint16_t	error_code;
14499 	/* The HWRM command request type. */
14500 	uint16_t	req_type;
14501 	/* The sequence ID from the original command. */
14502 	uint16_t	seq_id;
14503 	/* The length of the response data in number of bytes. */
14504 	uint16_t	resp_len;
14505 	/*
14506 	 * FID value. This value is used to identify operations on the PCI
14507 	 * bus as belonging to a particular PCI function.
14508 	 */
14509 	uint16_t	fid;
14510 	/*
14511 	 * Port ID of port that this function is associated with.
14512 	 * Valid only for the PF.
14513 	 * 0xFF... (All Fs) if this function is not associated with
14514 	 * any port.
14515 	 * 0xFF... (All Fs) if this function is called from a VF.
14516 	 */
14517 	uint16_t	port_id;
14518 	uint32_t	flags;
14519 	/* If 1, then Push mode is supported on this function. */
14520 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PUSH_MODE_SUPPORTED		UINT32_C(0x1)
14521 	/*
14522 	 * If 1, then the global MSI-X auto-masking is enabled for the
14523 	 * device.
14524 	 */
14525 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_GLOBAL_MSIX_AUTOMASKING		UINT32_C(0x2)
14526 	/*
14527 	 * If 1, then the Precision Time Protocol (PTP) processing
14528 	 * is supported on this function.
14529 	 * The HWRM should enable PTP on only a single Physical
14530 	 * Function (PF) per port.
14531 	 */
14532 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED			UINT32_C(0x4)
14533 	/*
14534 	 * If 1, then RDMA over Converged Ethernet (RoCE) v1
14535 	 * is supported on this function.
14536 	 */
14537 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ROCE_V1_SUPPORTED			UINT32_C(0x8)
14538 	/*
14539 	 * If 1, then RDMA over Converged Ethernet (RoCE) v2
14540 	 * is supported on this function.
14541 	 */
14542 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ROCE_V2_SUPPORTED			UINT32_C(0x10)
14543 	/*
14544 	 * If 1, then control and configuration of WoL magic packet
14545 	 * are supported on this function.
14546 	 */
14547 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WOL_MAGICPKT_SUPPORTED		UINT32_C(0x20)
14548 	/*
14549 	 * If 1, then control and configuration of bitmap pattern
14550 	 * packet are supported on this function.
14551 	 */
14552 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WOL_BMP_SUPPORTED			UINT32_C(0x40)
14553 	/*
14554 	 * If set to 1, then the control and configuration of rate limit
14555 	 * of an allocated TX ring on the queried function is supported.
14556 	 */
14557 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_TX_RING_RL_SUPPORTED		UINT32_C(0x80)
14558 	/*
14559 	 * If 1, then control and configuration of minimum and
14560 	 * maximum bandwidths are supported on the queried function.
14561 	 */
14562 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_TX_BW_CFG_SUPPORTED		UINT32_C(0x100)
14563 	/*
14564 	 * If the query is for a VF, then this flag shall be ignored.
14565 	 * If this query is for a PF and this flag is set to 1,
14566 	 * then the PF has the capability to set the rate limits
14567 	 * on the TX rings of its children VFs.
14568 	 * If this query is for a PF and this flag is set to 0, then
14569 	 * the PF does not have the capability to set the rate limits
14570 	 * on the TX rings of its children VFs.
14571 	 */
14572 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VF_TX_RING_RL_SUPPORTED		UINT32_C(0x200)
14573 	/*
14574 	 * If the query is for a VF, then this flag shall be ignored.
14575 	 * If this query is for a PF and this flag is set to 1,
14576 	 * then the PF has the capability to set the minimum and/or
14577 	 * maximum bandwidths for its children VFs.
14578 	 * If this query is for a PF and this flag is set to 0, then
14579 	 * the PF does not have the capability to set the minimum or
14580 	 * maximum bandwidths for its children VFs.
14581 	 */
14582 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VF_BW_CFG_SUPPORTED		UINT32_C(0x400)
14583 	/*
14584 	 * Standard TX Ring mode is used for the allocation of TX ring
14585 	 * and underlying scheduling resources that allow bandwidth
14586 	 * reservation and limit settings on the queried function.
14587 	 * If set to 1, then standard TX ring mode is supported
14588 	 * on the queried function.
14589 	 * If set to 0, then standard TX ring mode is not available
14590 	 * on the queried function.
14591 	 */
14592 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_STD_TX_RING_MODE_SUPPORTED		UINT32_C(0x800)
14593 	/*
14594 	 * If the query is for a VF, then this flag shall be ignored,
14595 	 * If this query is for a PF and this flag is set to 1,
14596 	 * then the PF has the capability to detect GENEVE tunnel
14597 	 * flags.
14598 	 */
14599 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_GENEVE_TUN_FLAGS_SUPPORTED		UINT32_C(0x1000)
14600 	/*
14601 	 * If the query is for a VF, then this flag shall be ignored,
14602 	 * If this query is for a PF and this flag is set to 1,
14603 	 * then the PF has the capability to detect NVGRE tunnel
14604 	 * flags.
14605 	 */
14606 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_NVGRE_TUN_FLAGS_SUPPORTED		UINT32_C(0x2000)
14607 	/*
14608 	 * If the query is for a VF, then this flag shall be ignored,
14609 	 * If this query is for a PF and this flag is set to 1,
14610 	 * then the PF has the capability to detect GRE tunnel
14611 	 * flags.
14612 	 */
14613 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_GRE_TUN_FLAGS_SUPPORTED		UINT32_C(0x4000)
14614 	/*
14615 	 * If the query is for a VF, then this flag shall be ignored,
14616 	 * If this query is for a PF and this flag is set to 1,
14617 	 * then the PF has the capability to detect MPLS tunnel
14618 	 * flags.
14619 	 */
14620 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_MPLS_TUN_FLAGS_SUPPORTED		UINT32_C(0x8000)
14621 	/*
14622 	 * If the query is for a VF, then this flag shall be ignored,
14623 	 * If this query is for a PF and this flag is set to 1,
14624 	 * then the PF has the capability to support pcie stats.
14625 	 */
14626 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PCIE_STATS_SUPPORTED		UINT32_C(0x10000)
14627 	/*
14628 	 * If the query is for a VF, then this flag shall be ignored,
14629 	 * If this query is for a PF and this flag is set to 1,
14630 	 * then the PF has the capability to adopt the VF's belonging
14631 	 * to another PF.
14632 	 */
14633 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ADOPTED_PF_SUPPORTED		UINT32_C(0x20000)
14634 	/*
14635 	 * If the query is for a VF, then this flag shall be ignored,
14636 	 * If this query is for a PF and this flag is set to 1,
14637 	 * then the PF has the administrative privilege to configure another
14638 	 * PF.
14639 	 */
14640 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ADMIN_PF_SUPPORTED			UINT32_C(0x40000)
14641 	/*
14642 	 * If the query is for a VF, then this flag shall be ignored.
14643 	 * If this query is for a PF and this flag is set to 1, then
14644 	 * the PF will know that the firmware has the capability to track
14645 	 * the virtual link status.
14646 	 */
14647 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_LINK_ADMIN_STATUS_SUPPORTED	UINT32_C(0x80000)
14648 	/*
14649 	 * If 1, then this function supports the push mode that uses
14650 	 * write combine buffers and the long inline tx buffer descriptor.
14651 	 */
14652 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WCB_PUSH_MODE			UINT32_C(0x100000)
14653 	/*
14654 	 * If 1, then FW has capability to allocate TX rings dynamically
14655 	 * in ring alloc even if PF reserved pool is zero.
14656 	 * This bit will be used only for PFs.
14657 	 */
14658 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_DYNAMIC_TX_RING_ALLOC		UINT32_C(0x200000)
14659 	/*
14660 	 * When this bit is '1', it indicates that core firmware is
14661 	 * capable of Hot Reset.
14662 	 */
14663 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_HOT_RESET_CAPABLE			UINT32_C(0x400000)
14664 	/*
14665 	 * This flag will be set to 1 by the FW if FW supports adapter error
14666 	 * recovery.
14667 	 */
14668 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERROR_RECOVERY_CAPABLE		UINT32_C(0x800000)
14669 	/*
14670 	 * If the query is for a VF, then this flag shall be ignored.
14671 	 * If this query is for a PF and this flag is set to 1, then
14672 	 * the PF has the capability to support extended stats.
14673 	 */
14674 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_STATS_SUPPORTED		UINT32_C(0x1000000)
14675 	/*
14676 	 * If the query is for a VF, then this flag shall be ignored.
14677 	 * If this query is for a PF and this flag is set to 1, then host
14678 	 * must initiate reset or reload (or fastboot) the firmware image
14679 	 * upon detection of device shutdown state.
14680 	 */
14681 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERR_RECOVER_RELOAD			UINT32_C(0x2000000)
14682 	/*
14683 	 * If the query is for a VF, then this flag (always set to 0) shall
14684 	 * be ignored. If this query is for a PF and this flag is set to 1,
14685 	 * host, when registered for the default vnic change async event,
14686 	 * receives async notification whenever a default vnic state is
14687 	 * changed for any of child or adopted VFs.
14688 	 */
14689 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_NOTIFY_VF_DEF_VNIC_CHNG_SUPPORTED	UINT32_C(0x4000000)
14690 	/* If set to 1, then the vlan acceleration for TX is disabled. */
14691 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VLAN_ACCELERATION_TX_DISABLED	UINT32_C(0x8000000)
14692 	/*
14693 	 * When this bit is '1', it indicates that core firmware supports
14694 	 * DBG_COREDUMP_XXX commands.
14695 	 */
14696 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_COREDUMP_CMD_SUPPORTED		UINT32_C(0x10000000)
14697 	/*
14698 	 * When this bit is '1', it indicates that core firmware supports
14699 	 * DBG_CRASHDUMP_XXX commands.
14700 	 */
14701 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_CRASHDUMP_CMD_SUPPORTED		UINT32_C(0x20000000)
14702 	/*
14703 	 * If the query is for a VF, then this flag should be ignored.
14704 	 * If the query is for a PF and this flag is set to 1, then
14705 	 * the PF has the capability to support retrieval of
14706 	 * rx_port_stats_ext_pfc_wd statistics (supported by the PFC
14707 	 * WatchDog feature) via the hwrm_port_qstats_ext_pfc_wd command.
14708 	 * If this flag is set to 1, only that (supported) command should
14709 	 * be used for retrieval of PFC related statistics (rather than
14710 	 * hwrm_port_qstats_ext command, which could previously be used).
14711 	 */
14712 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PFC_WD_STATS_SUPPORTED		UINT32_C(0x40000000)
14713 	/*
14714 	 * When this bit is '1', it indicates that core firmware supports
14715 	 * DBG_QCAPS command
14716 	 */
14717 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_DBG_QCAPS_CMD_SUPPORTED		UINT32_C(0x80000000)
14718 	/*
14719 	 * This value is current MAC address configured for this
14720 	 * function. A value of 00-00-00-00-00-00 indicates no
14721 	 * MAC address is currently configured.
14722 	 */
14723 	uint8_t	mac_address[6];
14724 	/*
14725 	 * The maximum number of RSS/COS contexts that can be
14726 	 * allocated to the function.
14727 	 */
14728 	uint16_t	max_rsscos_ctx;
14729 	/*
14730 	 * The maximum number of completion rings that can be
14731 	 * allocated to the function.
14732 	 */
14733 	uint16_t	max_cmpl_rings;
14734 	/*
14735 	 * The maximum number of transmit rings that can be
14736 	 * allocated to the function.
14737 	 */
14738 	uint16_t	max_tx_rings;
14739 	/*
14740 	 * The maximum number of receive rings that can be
14741 	 * allocated to the function.
14742 	 */
14743 	uint16_t	max_rx_rings;
14744 	/*
14745 	 * The maximum number of L2 contexts that can be
14746 	 * allocated to the function.
14747 	 */
14748 	uint16_t	max_l2_ctxs;
14749 	/*
14750 	 * The maximum number of VNICs that can be
14751 	 * allocated to the function.
14752 	 */
14753 	uint16_t	max_vnics;
14754 	/*
14755 	 * The identifier for the first VF enabled on a PF. This
14756 	 * is valid only on the PF with SR-IOV enabled.
14757 	 * 0xFF... (All Fs) if this command is called on a PF with
14758 	 * SR-IOV disabled or on a VF.
14759 	 */
14760 	uint16_t	first_vf_id;
14761 	/*
14762 	 * The maximum number of VFs that can be
14763 	 * allocated to the function. This is valid only on the
14764 	 * PF with SR-IOV enabled. 0xFF... (All Fs) if this
14765 	 * command is called on a PF with SR-IOV disabled or
14766 	 * on a VF.
14767 	 */
14768 	uint16_t	max_vfs;
14769 	/*
14770 	 * The maximum number of statistic contexts that can be
14771 	 * allocated to the function.
14772 	 */
14773 	uint16_t	max_stat_ctx;
14774 	/*
14775 	 * The maximum number of Encapsulation records that can be
14776 	 * offloaded by this function.
14777 	 */
14778 	uint32_t	max_encap_records;
14779 	/*
14780 	 * The maximum number of decapsulation records that can
14781 	 * be offloaded by this function.
14782 	 */
14783 	uint32_t	max_decap_records;
14784 	/*
14785 	 * The maximum number of Exact Match (EM) flows that can be
14786 	 * offloaded by this function on the TX side.
14787 	 */
14788 	uint32_t	max_tx_em_flows;
14789 	/*
14790 	 * The maximum number of Wildcard Match (WM) flows that can
14791 	 * be offloaded by this function on the TX side.
14792 	 */
14793 	uint32_t	max_tx_wm_flows;
14794 	/*
14795 	 * The maximum number of Exact Match (EM) flows that can be
14796 	 * offloaded by this function on the RX side.
14797 	 */
14798 	uint32_t	max_rx_em_flows;
14799 	/*
14800 	 * The maximum number of Wildcard Match (WM) flows that can
14801 	 * be offloaded by this function on the RX side.
14802 	 */
14803 	uint32_t	max_rx_wm_flows;
14804 	/*
14805 	 * The maximum number of multicast filters that can
14806 	 * be supported by this function on the RX side.
14807 	 */
14808 	uint32_t	max_mcast_filters;
14809 	/*
14810 	 * The maximum value of flow_id that can be supported
14811 	 * in completion records.
14812 	 */
14813 	uint32_t	max_flow_id;
14814 	/*
14815 	 * The maximum number of HW ring groups that can be
14816 	 * supported on this function.
14817 	 */
14818 	uint32_t	max_hw_ring_grps;
14819 	/*
14820 	 * The maximum number of strict priority transmit rings
14821 	 * that can be allocated to the function.
14822 	 * This number indicates the maximum number of TX rings
14823 	 * that can be assigned strict priorities out of the
14824 	 * maximum number of TX rings that can be allocated
14825 	 * (max_tx_rings) to the function.
14826 	 */
14827 	uint16_t	max_sp_tx_rings;
14828 	/*
14829 	 * The maximum number of MSI-X vectors that may be allocated across
14830 	 * all VFs for the function. This is valid only on the PF with SR-IOV
14831 	 * enabled. Returns zero if this command is called on a PF with
14832 	 * SR-IOV disabled or on a VF.
14833 	 */
14834 	uint16_t	max_msix_vfs;
14835 	uint32_t	flags_ext;
14836 	/*
14837 	 * If 1, the device can be configured to set the ECN bits in the
14838 	 * IP header of received packets if the receive queue length
14839 	 * exceeds a given threshold.
14840 	 */
14841 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_ECN_MARK_SUPPORTED			UINT32_C(0x1)
14842 	/*
14843 	 * If 1, the device can report the number of received packets
14844 	 * that it marked as having experienced congestion.
14845 	 */
14846 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_ECN_STATS_SUPPORTED			UINT32_C(0x2)
14847 	/*
14848 	 * If 1, the device can report extended hw statistics (including
14849 	 * additional tpa statistics).
14850 	 */
14851 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_EXT_HW_STATS_SUPPORTED			UINT32_C(0x4)
14852 	/*
14853 	 * If set to 1, then the core firmware has support to enable/
14854 	 * disable hot reset support for interface dynamically through
14855 	 * HWRM_FUNC_CFG.
14856 	 */
14857 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_HOT_RESET_IF_SUPPORT			UINT32_C(0x8)
14858 	/* If 1, the proxy mode is supported on this function */
14859 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PROXY_MODE_SUPPORT			UINT32_C(0x10)
14860 	/*
14861 	 * If 1, the tx rings source interface override feature is supported
14862 	 * on this function.
14863 	 */
14864 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_PROXY_SRC_INTF_OVERRIDE_SUPPORT	UINT32_C(0x20)
14865 	/*
14866 	 * If 1, the device supports scheduler queues. SCHQs can be managed
14867 	 * using RING_SCHQ_ALLOC/CFG/FREE commands.
14868 	 */
14869 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SCHQ_SUPPORTED				UINT32_C(0x40)
14870 	/*
14871 	 * If set to 1, then this function supports the TX push mode that
14872 	 * uses ping-pong buffers from the push pages.
14873 	 */
14874 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PPP_PUSH_MODE_SUPPORTED			UINT32_C(0x80)
14875 	/*
14876 	 * If set to 1, then this function doesn't have the privilege to
14877 	 * configure the EVB mode of the port it uses.
14878 	 */
14879 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_EVB_MODE_CFG_NOT_SUPPORTED		UINT32_C(0x100)
14880 	/*
14881 	 * If set to 1, then the HW and FW support the SoC packet DMA
14882 	 * datapath between SoC and NIC. This function can act as the
14883 	 * HWRM communication transport agent on behalf of the SoC SPD
14884 	 * software module. This capability is only advertised to the
14885 	 * SoC PFs.
14886 	 */
14887 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SOC_SPD_SUPPORTED			UINT32_C(0x200)
14888 	/*
14889 	 * If set to 1, then this function supports FW_LIVEPATCH for
14890 	 * firmware livepatch commands.
14891 	 */
14892 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_FW_LIVEPATCH_SUPPORTED			UINT32_C(0x400)
14893 	/*
14894 	 * When this bit is '1', it indicates that core firmware is
14895 	 * capable of fast Reset.
14896 	 */
14897 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_FAST_RESET_CAPABLE			UINT32_C(0x800)
14898 	/*
14899 	 * When this bit is '1', it indicates that firmware and hardware
14900 	 * are capable of updating tx_metadata via hwrm_ring_cfg command.
14901 	 */
14902 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_METADATA_CFG_CAPABLE			UINT32_C(0x1000)
14903 	/*
14904 	 * If set to 1, then the device can report the action
14905 	 * needed to activate set nvm options.
14906 	 */
14907 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_NVM_OPTION_ACTION_SUPPORTED		UINT32_C(0x2000)
14908 	/*
14909 	 * When this bit is '1', it indicates that the BD metadata feature
14910 	 * is supported for this function.
14911 	 */
14912 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BD_METADATA_SUPPORTED			UINT32_C(0x4000)
14913 	/*
14914 	 * When this bit is '1', it indicates that the echo request feature
14915 	 * is supported for this function. If the driver registers for the
14916 	 * echo request asynchronous event, then the firmware can send an
14917 	 * unsolicited echo request to the driver and expect an echo
14918 	 * response.
14919 	 */
14920 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_ECHO_REQUEST_SUPPORTED			UINT32_C(0x8000)
14921 	/*
14922 	 * When this bit is '1', it indicates that core firmware supports
14923 	 * NPAR 1.2 on this function.
14924 	 */
14925 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_NPAR_1_2_SUPPORTED			UINT32_C(0x10000)
14926 	/* When this bit is '1', it indicates that PTM feature is supported. */
14927 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PTP_PTM_SUPPORTED			UINT32_C(0x20000)
14928 	/* When this bit is '1', it indicates that PPS feature is supported. */
14929 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PTP_PPS_SUPPORTED			UINT32_C(0x40000)
14930 	/*
14931 	 * When this bit is '1', it indicates that VF config. change
14932 	 * async event is supported on the parent PF if the async.
14933 	 * event is registered by the PF.
14934 	 */
14935 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_VF_CFG_ASYNC_FOR_PF_SUPPORTED		UINT32_C(0x80000)
14936 	/*
14937 	 * When this bit is '1', the NIC supports configuration of
14938 	 * partition_min_bw and partition_max_bw. Configuration of a
14939 	 * minimum guaranteed bandwidth is only supported if the
14940 	 * min_bw_supported flag is also set.
14941 	 */
14942 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PARTITION_BW_SUPPORTED			UINT32_C(0x100000)
14943 	/*
14944 	 * When this bit is '1', the FW supports configuration of
14945 	 * PCP and TPID values of the default VLAN.
14946 	 */
14947 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DFLT_VLAN_TPID_PCP_SUPPORTED		UINT32_C(0x200000)
14948 	/* When this bit is '1', it indicates that HW and FW support KTLS. */
14949 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_KTLS_SUPPORTED				UINT32_C(0x400000)
14950 	/*
14951 	 * When this bit is '1', the firmware supports HWRM_PORT_EP_TX_CFG
14952 	 * and HWRM_PORT_EP_TX_QCFG for endpoint rate control, and additions
14953 	 * to HWRM_QUEUE_GLOBAL_CFG and HWRM_QUEUE_GLOBAL_QCFG for receive
14954 	 * rate control. Configuration of a minimum guaranteed bandwidth
14955 	 * is only supported if the min_bw_supported flag is also set.
14956 	 */
14957 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_EP_RATE_CONTROL				UINT32_C(0x800000)
14958 	/*
14959 	 * When this bit is '1', the firmware supports enforcement of
14960 	 * minimum guaranteed bandwidth. A minimum guaranteed bandwidth
14961 	 * could be configured for a partition or for an endpoint. Firmware
14962 	 * only sets this flag if one or both of the ep_rate_control and
14963 	 * partition_bw_supported flags are set.
14964 	 */
14965 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_MIN_BW_SUPPORTED				UINT32_C(0x1000000)
14966 	/*
14967 	 * When this bit is '1', HW supports TX coalesced completion
14968 	 * records.
14969 	 */
14970 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_COAL_CMPL_CAP				UINT32_C(0x2000000)
14971 	/*
14972 	 * When this bit is '1', it indicates the FW has full support
14973 	 * for all backing store types with the BACKING_STORE_CFG/QCFG
14974 	 * V2 APIs.
14975 	 */
14976 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BS_V2_SUPPORTED				UINT32_C(0x4000000)
14977 	/*
14978 	 * When this bit is '1', it indicates the FW forces to use the
14979 	 * BACKING_STORE_CFG/QCFG V2 APIs.
14980 	 */
14981 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BS_V2_REQUIRED				UINT32_C(0x8000000)
14982 	/*
14983 	 * When this bit is '1', it indicates that FW will support a single
14984 	 * 64bit real time clock for PTP.
14985 	 */
14986 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PTP_64BIT_RTC_SUPPORTED			UINT32_C(0x10000000)
14987 	/*
14988 	 * When this bit is '1', it indicates the FW is capable of
14989 	 * supporting Doorbell Pacing.
14990 	 */
14991 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DBR_PACING_SUPPORTED			UINT32_C(0x20000000)
14992 	/*
14993 	 * When this bit is '1', it indicates the FW is capable of
14994 	 * supporting HW based doorbell drop recovery.
14995 	 */
14996 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_HW_DBR_DROP_RECOV_SUPPORTED		UINT32_C(0x40000000)
14997 	/*
14998 	 * When this bit is '1', it indicates the driver can disable the CQ
14999 	 * overflow detection and can also skip the index updates for CQ.
15000 	 */
15001 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DISABLE_CQ_OVERFLOW_DETECTION_SUPPORTED	UINT32_C(0x80000000)
15002 	/* The maximum number of SCHQs supported by this device. */
15003 	uint8_t	max_schqs;
15004 	uint8_t	mpc_chnls_cap;
15005 	/*
15006 	 * When this bit is '1', it indicates that HW and firmware
15007 	 * supports the use of a MPC channel with destination set
15008 	 * to the TX crypto engine block.
15009 	 */
15010 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_TCE	UINT32_C(0x1)
15011 	/*
15012 	 * When this bit is '1', it indicates that HW and firmware
15013 	 * supports the use of a MPC channel with destination set
15014 	 * to the RX crypto engine block.
15015 	 */
15016 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_RCE	UINT32_C(0x2)
15017 	/*
15018 	 * When this bit is '1', it indicates that HW and firmware
15019 	 * supports the use of a MPC channel with destination set
15020 	 * to the TX configurable flow processing block.
15021 	 */
15022 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_TE_CFA	UINT32_C(0x4)
15023 	/*
15024 	 * When this bit is '1', it indicates that HW and firmware
15025 	 * supports the use of a MPC channel with destination set
15026 	 * to the RX configurable flow processing block.
15027 	 */
15028 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_RE_CFA	UINT32_C(0x8)
15029 	/*
15030 	 * When this bit is '1', it indicates that HW and firmware
15031 	 * supports the use of a MPC channel with destination set
15032 	 * to the primate processor block.
15033 	 */
15034 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_PRIMATE	UINT32_C(0x10)
15035 	/*
15036 	 * Maximum number of Key Contexts supported per HWRM
15037 	 * function call for allocating Key Contexts.
15038 	 */
15039 	uint16_t	max_key_ctxs_alloc;
15040 	uint32_t	flags_ext2;
15041 	/*
15042 	 * When this bit is '1', it indicates that FW will support
15043 	 * timestamping on all RX packets, not just PTP type packets.
15044 	 */
15045 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED	UINT32_C(0x1)
15046 	/* When this bit is '1', it indicates that HW and FW support QUIC. */
15047 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_QUIC_SUPPORTED			UINT32_C(0x2)
15048 	/*
15049 	 * When this bit is '1', it indicates that KDNet mode is
15050 	 * supported on the port for this function. This bit is
15051 	 * never set for a VF.
15052 	 */
15053 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_KDNET_SUPPORTED			UINT32_C(0x4)
15054 	/*
15055 	 * When this bit is '1', it indicates the FW is capable of
15056 	 * supporting Enhanced Doorbell Pacing.
15057 	 */
15058 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DBR_PACING_EXT_SUPPORTED		UINT32_C(0x8)
15059 	/*
15060 	 * When this bit is '1', it indicates that FW is capable of
15061 	 * supporting software based doorbell drop recovery.
15062 	 */
15063 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_DBR_DROP_RECOVERY_SUPPORTED	UINT32_C(0x10)
15064 	/*
15065 	 * When this bit is '1', it indicates the FW supports collection
15066 	 * and query of the generic statistics.
15067 	 */
15068 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_GENERIC_STATS_SUPPORTED		UINT32_C(0x20)
15069 	/*
15070 	 * When this bit is '1', it indicates that the HW is capable of
15071 	 * supporting UDP GSO on the function.
15072 	 */
15073 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_UDP_GSO_SUPPORTED			UINT32_C(0x40)
15074 	/*
15075 	 * When this bit is '1', it indicates that SyncE feature is
15076 	 * supported.
15077 	 */
15078 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SYNCE_SUPPORTED			UINT32_C(0x80)
15079 	/*
15080 	 * When this bit is '1', it indicates the FW is capable of
15081 	 * supporting doorbell pacing version 0. As doorbell pacing
15082 	 * notification from hardware for Thor2 is completely different
15083 	 * from Thor1, this flag is used to differentiate the doorbell
15084 	 * pacing notification between Thor1 and Thor2. Thor1 uses
15085 	 * dbr_pacing_supported and dbr_pacing_ext_supported flags for
15086 	 * doorbell pacing whereas Thor2 uses dbr_pacing_v0_supported flag.
15087 	 * These flags will never be set at the same time for Thor2.
15088 	 * Based on this flag, host drivers assume doorbell pacing is needed
15089 	 * for Thor2.
15090 	 */
15091 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DBR_PACING_V0_SUPPORTED		UINT32_C(0x100)
15092 	/*
15093 	 * When this bit is '1', it indicates that the HW supports
15094 	 * two-completion TX packet timestamp feature, a second completion
15095 	 * carrying packet TX timestamp in addition to the standard
15096 	 * completion returned for packets. Host driver should not use
15097 	 * HWRM port timestamp query (HWRM_PORT_TS_QUERY) command for
15098 	 * TX timestamp read when two-completion timestamp feature is
15099 	 * supported.
15100 	 */
15101 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_TX_PKT_TS_CMPL_SUPPORTED		UINT32_C(0x200)
15102 	/*
15103 	 * When this bit is '1', it indicates that the hardware based
15104 	 * link aggregation group (L2 and RoCE) feature is supported.
15105 	 * This LAG feature is only supported on the THOR2 or newer NIC
15106 	 * with multiple ports.
15107 	 */
15108 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_HW_LAG_SUPPORTED			UINT32_C(0x400)
15109 	/*
15110 	 * When this bit is '1', it indicates all contexts can be stored
15111 	 * on chip instead of using host based backing store memory.
15112 	 */
15113 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_ON_CHIP_CTX_SUPPORTED		UINT32_C(0x800)
15114 	/*
15115 	 * When this bit is '1', it indicates that the HW supports
15116 	 * using a steering tag in the memory transactions targeting
15117 	 * L2 or RoCE ring resources.
15118 	 * Steering Tags are system-specific values that must follow the
15119 	 * encoding requirements of the hardware platform. On devices that
15120 	 * support steering to multiple address domains, a value of 0 in
15121 	 * bit 0 of the steering tag specifies the address is associated
15122 	 * with the SOC address space, and a value of 1 indicates the
15123 	 * address is associated with the host address space.
15124 	 */
15125 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_STEERING_TAG_SUPPORTED		UINT32_C(0x1000)
15126 	/*
15127 	 * When this bit is '1', it indicates that driver can enable
15128 	 * support for an enhanced VF scale.
15129 	 */
15130 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_ENHANCED_VF_SCALE_SUPPORTED	UINT32_C(0x2000)
15131 	/*
15132 	 * When this bit is '1', it indicates that FW is capable of
15133 	 * supporting partition based XID management for KTLS/QUIC
15134 	 * Tx/Rx Key Context types.
15135 	 */
15136 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_KEY_XID_PARTITION_SUPPORTED	UINT32_C(0x4000)
15137 	/*
15138 	 * This bit is only valid on the condition that both
15139 	 * 'ktls_supported' and 'quic_supported' flags are set. When this
15140 	 * bit is valid, it conveys information below:
15141 	 * 1. If it is set to '1', it indicates that the firmware allows the
15142 	 *	driver to run KTLS and QUIC concurrently;
15143 	 * 2. If it is cleared to '0', it indicates that the driver has to
15144 	 *	make sure all crypto connections on all functions are of the
15145 	 *	same type, i.e., either KTLS or QUIC.
15146 	 */
15147 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_CONCURRENT_KTLS_QUIC_SUPPORTED	UINT32_C(0x8000)
15148 	/*
15149 	 * When this bit is '1', it indicates that the device supports
15150 	 * setting a cross TC cap on a scheduler queue.
15151 	 */
15152 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SCHQ_CROSS_TC_CAP_SUPPORTED	UINT32_C(0x10000)
15153 	/*
15154 	 * When this bit is '1', it indicates that the device supports
15155 	 * setting a per TC cap on a scheduler queue.
15156 	 */
15157 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SCHQ_PER_TC_CAP_SUPPORTED		UINT32_C(0x20000)
15158 	/*
15159 	 * When this bit is '1', it indicates that the device supports
15160 	 * setting a per TC reservation on a scheduler queues.
15161 	 */
15162 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SCHQ_PER_TC_RESERVATION_SUPPORTED	UINT32_C(0x40000)
15163 	/*
15164 	 * When this bit is '1', it indicates that firmware supports query
15165 	 * for statistics related to invalid doorbell errors and drops.
15166 	 */
15167 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DB_ERROR_STATS_SUPPORTED		UINT32_C(0x80000)
15168 	/*
15169 	 * When this bit is '1', it indicates that the device supports
15170 	 * VF RoCE resource management.
15171 	 */
15172 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_ROCE_VF_RESOURCE_MGMT_SUPPORTED	UINT32_C(0x100000)
15173 	/*
15174 	 * When this bit is '1', it indicates that the device supports
15175 	 * UDCC management.
15176 	 */
15177 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_UDCC_SUPPORTED			UINT32_C(0x200000)
15178 	/*
15179 	 * When this bit is '1', it indicates that the device supports Timed
15180 	 * Transmit TxTime scheduling; this is applicable to L2 flows only.
15181 	 * It is expected that host software assigns each packet a transmit
15182 	 * time and posts packets for transmit in time order. NIC hardware
15183 	 * transmits the packet at time assigned by software.
15184 	 */
15185 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_TIMED_TX_SO_TXTIME_SUPPORTED	UINT32_C(0x400000)
15186 	/*
15187 	 * This bit indicates the method used for the advertisement of the
15188 	 * max resource limit for the PF and its VFs.
15189 	 * When this bit is '1', it indicates that the maximum resource
15190 	 * limits for both RoCE and L2 are software defined. These limits
15191 	 * are queried using the HWRM backing store qcaps v1
15192 	 * and v2(max_num_entries). For RoCE, the resource limits are
15193 	 * derived from nvm options. For L2, the resources will continue
15194 	 * to use FW enforced SW limits based on chip config and per PF
15195 	 * function NVM resource parameters.
15196 	 * If this bit is '0', the FW will use to legacy behavior.
15197 	 * For RoCE, the maximum resource values supported by the chip will
15198 	 * be returned. For L2, the maximum resource values returned will
15199 	 * be the FW enforced SW limits based on chip config and per PF
15200 	 * function NVM resource parameters.
15201 	 */
15202 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED	UINT32_C(0x800000)
15203 	/*
15204 	 * When this bit is '1', it indicates that the device supports
15205 	 * migrating ingress NIC flows to Truflow.
15206 	 */
15207 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_TF_INGRESS_NIC_FLOW_SUPPORTED	UINT32_C(0x1000000)
15208 	/*
15209 	 * When this bit is '1', it indicates that the Firmware supports
15210 	 * query and clear of the port loopback statistics.
15211 	 */
15212 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_LPBK_STATS_SUPPORTED		UINT32_C(0x2000000)
15213 	uint16_t	tunnel_disable_flag;
15214 	/*
15215 	 * When this bit is '1', it indicates that the VXLAN parsing
15216 	 * is disabled in hardware
15217 	 */
15218 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN	UINT32_C(0x1)
15219 	/*
15220 	 * When this bit is '1', it indicates that the NGE parsing
15221 	 * is disabled in hardware
15222 	 */
15223 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NGE	UINT32_C(0x2)
15224 	/*
15225 	 * When this bit is '1', it indicates that the NVGRE parsing
15226 	 * is disabled in hardware
15227 	 */
15228 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NVGRE	UINT32_C(0x4)
15229 	/*
15230 	 * When this bit is '1', it indicates that the L2GRE parsing
15231 	 * is disabled in hardware
15232 	 */
15233 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_L2GRE	UINT32_C(0x8)
15234 	/*
15235 	 * When this bit is '1', it indicates that the GRE parsing
15236 	 * is disabled in hardware
15237 	 */
15238 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_GRE	UINT32_C(0x10)
15239 	/*
15240 	 * When this bit is '1', it indicates that the IPINIP parsing
15241 	 * is disabled in hardware
15242 	 */
15243 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_IPINIP	UINT32_C(0x20)
15244 	/*
15245 	 * When this bit is '1', it indicates that the MPLS parsing
15246 	 * is disabled in hardware
15247 	 */
15248 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_MPLS	UINT32_C(0x40)
15249 	/*
15250 	 * When this bit is '1', it indicates that the PPPOE parsing
15251 	 * is disabled in hardware
15252 	 */
15253 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_PPPOE	UINT32_C(0x80)
15254 	uint16_t	xid_partition_cap;
15255 	/*
15256 	 * When this bit is '1', it indicates that FW is capable of
15257 	 * supporting partition based XID management for Tx crypto
15258 	 * key contexts.
15259 	 */
15260 	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_TX_CK	UINT32_C(0x1)
15261 	/*
15262 	 * When this bit is '1', it indicates that FW is capable of
15263 	 * supporting partition based XID management for Rx crypto
15264 	 * key contexts.
15265 	 */
15266 	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_RX_CK	UINT32_C(0x2)
15267 	/*
15268 	 * This value uniquely identifies the hardware NIC used by the
15269 	 * function. The value returned will be the same for all functions.
15270 	 * A value of 00-00-00-00-00-00-00-00 indicates no device serial number
15271 	 * is currently configured. This is the same value that is returned by
15272 	 * PCIe Capability Device Serial Number.
15273 	 */
15274 	uint8_t	device_serial_number[8];
15275 	/*
15276 	 * This field is only valid in the XID partition mode. It indicates
15277 	 * the number contexts per partition.
15278 	 */
15279 	uint16_t	ctxs_per_partition;
15280 	uint8_t	unused_2[2];
15281 	/*
15282 	 * The maximum number of address vectors that may be allocated across
15283 	 * all VFs for the function. This is valid only on the PF with VF RoCE
15284 	 * (SR-IOV) enabled. Returns zero if this command is called on a PF
15285 	 * with VF RoCE (SR-IOV) disabled or on a VF.
15286 	 */
15287 	uint32_t	roce_vf_max_av;
15288 	/*
15289 	 * The maximum number of completion queues that may be allocated across
15290 	 * all VFs for the function. This is valid only on the PF with VF RoCE
15291 	 * (SR-IOV) enabled. Returns zero if this command is called on a PF
15292 	 * with VF RoCE (SR-IOV) disabled or on a VF.
15293 	 */
15294 	uint32_t	roce_vf_max_cq;
15295 	/*
15296 	 * The maximum number of memory regions plus memory windows that may be
15297 	 * allocated across all VFs for the function. This is valid only on the
15298 	 * PF with VF RoCE (SR-IOV) enabled. Returns zero if this command is
15299 	 * called on a PF with VF RoCE (SR-IOV) disabled or on a VF.
15300 	 */
15301 	uint32_t	roce_vf_max_mrw;
15302 	/*
15303 	 * The maximum number of queue pairs that may be allocated across
15304 	 * all VFs for the function. This is valid only on the PF with VF RoCE
15305 	 * (SR-IOV) enabled. Returns zero if this command is called on a PF
15306 	 * with VF RoCE (SR-IOV) disabled or on a VF.
15307 	 */
15308 	uint32_t	roce_vf_max_qp;
15309 	/*
15310 	 * The maximum number of shared receive queues that may be allocated
15311 	 * across all VFs for the function. This is valid only on the PF with
15312 	 * VF RoCE (SR-IOV) enabled. Returns zero if this command is called on
15313 	 * a PF with VF RoCE (SR-IOV) disabled or on a VF.
15314 	 */
15315 	uint32_t	roce_vf_max_srq;
15316 	/*
15317 	 * The maximum number of GIDs that may be allocated across all VFs for
15318 	 * the function. This is valid only on the PF with VF RoCE (SR-IOV)
15319 	 * enabled. Returns zero if this command is called on a PF with VF RoCE
15320 	 * (SR-IOV) disabled or on a VF.
15321 	 */
15322 	uint32_t	roce_vf_max_gid;
15323 	uint8_t	unused_3[3];
15324 	/*
15325 	 * This field is used in Output records to indicate that the output
15326 	 * is completely written to RAM. This field should be read as '1'
15327 	 * to indicate that the output has been completely written.
15328 	 * When writing a command completion or response to an internal
15329 	 * processor, the order of writes has to be such that this field is
15330 	 * written last.
15331 	 */
15332 	uint8_t	valid;
15333 } hwrm_func_qcaps_output_t, *phwrm_func_qcaps_output_t;
15334 
15335 /******************
15336  * hwrm_func_qcfg *
15337  ******************/
15338 
15339 
15340 /* hwrm_func_qcfg_input (size:192b/24B) */
15341 
15342 typedef struct hwrm_func_qcfg_input {
15343 	/* The HWRM command request type. */
15344 	uint16_t	req_type;
15345 	/*
15346 	 * The completion ring to send the completion event on. This should
15347 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
15348 	 */
15349 	uint16_t	cmpl_ring;
15350 	/*
15351 	 * The sequence ID is used by the driver for tracking multiple
15352 	 * commands. This ID is treated as opaque data by the firmware and
15353 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
15354 	 */
15355 	uint16_t	seq_id;
15356 	/*
15357 	 * The target ID of the command:
15358 	 * * 0x0-0xFFF8 - The function ID
15359 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
15360 	 * * 0xFFFD - Reserved for user-space HWRM interface
15361 	 * * 0xFFFF - HWRM
15362 	 */
15363 	uint16_t	target_id;
15364 	/*
15365 	 * A physical address pointer pointing to a host buffer that the
15366 	 * command's response data will be written. This can be either a host
15367 	 * physical address (HPA) or a guest physical address (GPA) and must
15368 	 * point to a physically contiguous block of memory.
15369 	 */
15370 	uint64_t	resp_addr;
15371 	/*
15372 	 * Function ID of the function that is being queried.
15373 	 * 0xFF... (All Fs) if the query is for the requesting
15374 	 * function.
15375 	 * 0xFFFE (REQUESTING_PARENT_FID) This is a special FID
15376 	 * to be used by a trusted VF to query its parent PF.
15377 	 */
15378 	uint16_t	fid;
15379 	uint8_t	unused_0[6];
15380 } hwrm_func_qcfg_input_t, *phwrm_func_qcfg_input_t;
15381 
15382 /* hwrm_func_qcfg_output (size:1280b/160B) */
15383 
15384 typedef struct hwrm_func_qcfg_output {
15385 	/* The specific error status for the command. */
15386 	uint16_t	error_code;
15387 	/* The HWRM command request type. */
15388 	uint16_t	req_type;
15389 	/* The sequence ID from the original command. */
15390 	uint16_t	seq_id;
15391 	/* The length of the response data in number of bytes. */
15392 	uint16_t	resp_len;
15393 	/*
15394 	 * FID value. This value is used to identify operations on the PCI
15395 	 * bus as belonging to a particular PCI function.
15396 	 */
15397 	uint16_t	fid;
15398 	/*
15399 	 * Port ID of port that this function is associated with.
15400 	 * 0xFF... (All Fs) if this function is not associated with
15401 	 * any port.
15402 	 */
15403 	uint16_t	port_id;
15404 	/*
15405 	 * This value is the current VLAN setting for this
15406 	 * function. The value of 0 for this field indicates
15407 	 * no priority tagging or VLAN is used.
15408 	 * This field's format is same as 802.1Q Tag's
15409 	 * Tag Control Information (TCI) format that includes both
15410 	 * Priority Code Point (PCP) and VLAN Identifier (VID).
15411 	 */
15412 	uint16_t	vlan;
15413 	uint16_t	flags;
15414 	/*
15415 	 * If 1, then magic packet based Out-Of-Box WoL is enabled on
15416 	 * the port associated with this function.
15417 	 */
15418 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_OOB_WOL_MAGICPKT_ENABLED	UINT32_C(0x1)
15419 	/*
15420 	 * If 1, then bitmap pattern based Out-Of-Box WoL packet is enabled
15421 	 * on the port associated with this function.
15422 	 */
15423 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_OOB_WOL_BMP_ENABLED	UINT32_C(0x2)
15424 	/*
15425 	 * If set to 1, then FW based DCBX agent is enabled and running on
15426 	 * the port associated with this function.
15427 	 * If set to 0, then DCBX agent is not running in the firmware.
15428 	 */
15429 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_FW_DCBX_AGENT_ENABLED	UINT32_C(0x4)
15430 	/*
15431 	 * Standard TX Ring mode is used for the allocation of TX ring
15432 	 * and underlying scheduling resources that allow bandwidth
15433 	 * reservation and limit settings on the queried function.
15434 	 * If set to 1, then standard TX ring mode is enabled
15435 	 * on the queried function.
15436 	 * If set to 0, then the standard TX ring mode is disabled
15437 	 * on the queried function. In this extended TX ring resource
15438 	 * mode, the minimum and maximum bandwidth settings are not
15439 	 * supported to allow the allocation of TX rings to span multiple
15440 	 * scheduler nodes.
15441 	 */
15442 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_STD_TX_RING_MODE_ENABLED	UINT32_C(0x8)
15443 	/*
15444 	 * If set to 1 then FW based LLDP agent is enabled and running on
15445 	 * the port associated with this function.
15446 	 * If set to 0 then the LLDP agent is not running in the firmware.
15447 	 */
15448 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_FW_LLDP_AGENT_ENABLED	UINT32_C(0x10)
15449 	/*
15450 	 * If set to 1, then multi-host mode is active for this function.
15451 	 * The NIC is attached to two or more independent host systems
15452 	 * through two or more PCIe endpoints.
15453 	 * If set to 0, then multi-host mode is inactive for this function
15454 	 * or not applicable for this device.
15455 	 */
15456 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST		UINT32_C(0x20)
15457 	/*
15458 	 * If the function that is being queried is a PF, then the HWRM shall
15459 	 * set this field to 0 and the HWRM client shall ignore this field.
15460 	 * If the function that is being queried is a VF, then the HWRM shall
15461 	 * set this field to 1 if the queried VF is trusted, otherwise the
15462 	 * HWRM shall set this field to 0.
15463 	 */
15464 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF		UINT32_C(0x40)
15465 	/*
15466 	 * If set to 1, then secure mode is enabled for this function or
15467 	 * device. If set to 0, then secure mode is disabled (or normal mode)
15468 	 * for this function or device.
15469 	 */
15470 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_SECURE_MODE_ENABLED	UINT32_C(0x80)
15471 	/*
15472 	 * If set to 1, then this PF is enabled with a preboot driver that
15473 	 * requires access to the legacy L2 ring model and legacy 32b
15474 	 * doorbells. If set to 0, then this PF is not allowed to use
15475 	 * the legacy L2 rings. This feature is not allowed on VFs and
15476 	 * is only relevant for devices that require a context backing
15477 	 * store.
15478 	 */
15479 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_PREBOOT_LEGACY_L2_RINGS	UINT32_C(0x100)
15480 	/*
15481 	 * If set to 1, then the firmware and all currently registered driver
15482 	 * instances support hot reset. The hot reset support will be updated
15483 	 * dynamically based on the driver interface advertisement.
15484 	 * If set to 0, then the adapter is not currently able to initiate
15485 	 * hot reset.
15486 	 */
15487 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_HOT_RESET_ALLOWED		UINT32_C(0x200)
15488 	/*
15489 	 * If set to 1, then the PPP tx push mode is enabled for all the
15490 	 * reserved TX rings of this function. If set to 0, then PPP tx push
15491 	 * mode is disabled for all the reserved TX rings of this function.
15492 	 */
15493 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_PPP_PUSH_MODE_ENABLED	UINT32_C(0x400)
15494 	/*
15495 	 * If set to 1, then the firmware will notify driver using async
15496 	 * event when a ring is disabled due to a Hardware error.
15497 	 */
15498 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_RING_MONITOR_ENABLED	UINT32_C(0x800)
15499 	/*
15500 	 * If set to 1, then the firmware and all currently registered driver
15501 	 * instances support fast reset. The fast reset support will be
15502 	 * updated dynamically based on the driver interface advertisement.
15503 	 * If set to 0, then the adapter is not currently able to initiate
15504 	 * fast reset.
15505 	 */
15506 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_FAST_RESET_ALLOWED	UINT32_C(0x1000)
15507 	/*
15508 	 * If set to 1, then multi-root mode is active for this function.
15509 	 * The NIC is attached to a single host with a single operating
15510 	 * system, but through two or more PCIe endpoints.
15511 	 * If set to 0, then multi-root mode is inactive for this function
15512 	 * or not applicable for this device.
15513 	 */
15514 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_ROOT		UINT32_C(0x2000)
15515 	/*
15516 	 * This flag indicates RDMA support for child VFS of
15517 	 * a physical function.
15518 	 * If set to 1, RoCE is supported on all child VFs.
15519 	 * If set to 0, RoCE is disabled on all child VFs.
15520 	 */
15521 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_ENABLE_RDMA_SRIOV		UINT32_C(0x4000)
15522 	/*
15523 	 * When set to 1, indicates the field roce_vnic_id in the structure
15524 	 * is valid. If this bit is 0, the driver should not use the
15525 	 * 'roce_vnic_id' field.
15526 	 */
15527 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_ROCE_VNIC_ID_VALID	UINT32_C(0x8000)
15528 	/*
15529 	 * This value is current MAC address configured for this
15530 	 * function. A value of 00-00-00-00-00-00 indicates no
15531 	 * MAC address is currently configured.
15532 	 */
15533 	uint8_t	mac_address[6];
15534 	/*
15535 	 * This value is current PCI ID of this
15536 	 * function. If ARI is enabled, then it is
15537 	 * Bus Number (8b):Function Number(8b). Otherwise, it is
15538 	 * Bus Number (8b):Device Number (4b):Function Number(4b).
15539 	 * If multi-host mode is active, the 4 lsb will indicate
15540 	 * the PF index for this function.
15541 	 */
15542 	uint16_t	pci_id;
15543 	/*
15544 	 * The number of RSS/COS contexts currently
15545 	 * allocated to the function.
15546 	 */
15547 	uint16_t	alloc_rsscos_ctx;
15548 	/*
15549 	 * The number of completion rings currently allocated to
15550 	 * the function. This does not include the rings allocated
15551 	 * to any children functions if any.
15552 	 */
15553 	uint16_t	alloc_cmpl_rings;
15554 	/*
15555 	 * The number of transmit rings currently allocated to
15556 	 * the function. This does not include the rings allocated
15557 	 * to any children functions if any.
15558 	 */
15559 	uint16_t	alloc_tx_rings;
15560 	/*
15561 	 * The number of receive rings currently allocated to
15562 	 * the function. This does not include the rings allocated
15563 	 * to any children functions if any.
15564 	 */
15565 	uint16_t	alloc_rx_rings;
15566 	/* The allocated number of L2 contexts to the function. */
15567 	uint16_t	alloc_l2_ctx;
15568 	/* The allocated number of vnics to the function. */
15569 	uint16_t	alloc_vnics;
15570 	/*
15571 	 * The maximum transmission unit of the function
15572 	 * configured by the admin pf.
15573 	 * If the reported mtu value is non-zero then it will be used for the
15574 	 * rings allocated on this function, otherwise the default
15575 	 * value is used if ring MTU is not specified.
15576 	 * The driver cannot use any MTU bigger than this value
15577 	 * if it is non-zero.
15578 	 */
15579 	uint16_t	admin_mtu;
15580 	/*
15581 	 * The maximum receive unit of the function.
15582 	 * For vnics allocated on this function, this default
15583 	 * value is used if vnic MRU is not specified.
15584 	 */
15585 	uint16_t	mru;
15586 	/* The statistics context assigned to a function. */
15587 	uint16_t	stat_ctx_id;
15588 	/*
15589 	 * The HWRM shall return Unknown value for this field
15590 	 * when this command is used to query VF's configuration.
15591 	 */
15592 	uint8_t	port_partition_type;
15593 	/* Single physical function */
15594 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_SPF	UINT32_C(0x0)
15595 	/* Multiple physical functions */
15596 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_MPFS	UINT32_C(0x1)
15597 	/* Network Partitioning 1.0 */
15598 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0 UINT32_C(0x2)
15599 	/* Network Partitioning 1.5 */
15600 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5 UINT32_C(0x3)
15601 	/* Network Partitioning 2.0 */
15602 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0 UINT32_C(0x4)
15603 	/* Network Partitioning 1.2 */
15604 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_2 UINT32_C(0x5)
15605 	/* Unknown */
15606 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_UNKNOWN UINT32_C(0xff)
15607 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_LAST   HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_UNKNOWN
15608 	/*
15609 	 * This field will indicate number of physical functions on this
15610 	 * port_partition. HWRM shall return unavail (i.e. value of 0) for this
15611 	 * field when this command is used to query VF's configuration or from
15612 	 * older firmware that doesn't support this field.
15613 	 */
15614 	uint8_t	port_pf_cnt;
15615 	/* number of PFs is not available */
15616 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PF_CNT_UNAVAIL UINT32_C(0x0)
15617 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PF_CNT_LAST   HWRM_FUNC_QCFG_OUTPUT_PORT_PF_CNT_UNAVAIL
15618 	/*
15619 	 * The default VNIC ID assigned to a function that is
15620 	 * being queried.
15621 	 */
15622 	uint16_t	dflt_vnic_id;
15623 	uint16_t	max_mtu_configured;
15624 	/*
15625 	 * Minimum guaranteed transmit bandwidth for this function. When
15626 	 * specified for a PF, does not affect traffic from the PF's child VFs.
15627 	 * A value of 0 indicates the minimum bandwidth is not configured.
15628 	 */
15629 	uint32_t	min_bw;
15630 	/* The bandwidth value. */
15631 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
15632 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_SFT		0
15633 	/* The granularity of the value (bits or bytes). */
15634 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE			UINT32_C(0x10000000)
15635 	/* Value is in bits. */
15636 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
15637 	/* Value is in bytes. */
15638 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
15639 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_LAST		HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_BYTES
15640 	/* bw_value_unit is 3 b */
15641 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
15642 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_SFT	29
15643 	/* Value is in Mb or MB (base 10). */
15644 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
15645 	/* Value is in Kb or KB (base 10). */
15646 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
15647 	/* Value is in bits or bytes. */
15648 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
15649 	/* Value is in Gb or GB (base 10). */
15650 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
15651 	/* Value is in 1/100th of a percentage of link bandwidth. */
15652 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
15653 	/* Invalid unit */
15654 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
15655 		#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_INVALID
15656 	/*
15657 	 * Maximum transmit rate for this function. When specified for a PF,
15658 	 * does not affect traffic from the PF's child VFs.
15659 	 * A value of 0 indicates that the maximum bandwidth is not configured.
15660 	 */
15661 	uint32_t	max_bw;
15662 	/* The bandwidth value. */
15663 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
15664 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_SFT		0
15665 	/* The granularity of the value (bits or bytes). */
15666 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE			UINT32_C(0x10000000)
15667 	/* Value is in bits. */
15668 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
15669 	/* Value is in bytes. */
15670 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
15671 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_LAST		HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_BYTES
15672 	/* bw_value_unit is 3 b */
15673 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
15674 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_SFT	29
15675 	/* Value is in Mb or MB (base 10). */
15676 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
15677 	/* Value is in Kb or KB (base 10). */
15678 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
15679 	/* Value is in bits or bytes. */
15680 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
15681 	/* Value is in Gb or GB (base 10). */
15682 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
15683 	/* Value is in 1/100th of a percentage of link bandwidth. */
15684 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
15685 	/* Invalid unit */
15686 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
15687 		#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_INVALID
15688 	/*
15689 	 * This value indicates the Edge virtual bridge mode for the
15690 	 * domain that this function belongs to.
15691 	 */
15692 	uint8_t	evb_mode;
15693 	/* No Edge Virtual Bridging (EVB) */
15694 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_NO_EVB UINT32_C(0x0)
15695 	/* Virtual Ethernet Bridge (VEB) */
15696 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEB	UINT32_C(0x1)
15697 	/* Virtual Ethernet Port Aggregator (VEPA) */
15698 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEPA   UINT32_C(0x2)
15699 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_LAST  HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEPA
15700 	uint8_t	options;
15701 	/*
15702 	 * This value indicates the PCIE device cache line size.
15703 	 * The cache line size allows the DMA writes to terminate and
15704 	 * start at the cache boundary.
15705 	 */
15706 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_MASK	UINT32_C(0x3)
15707 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SFT	0
15708 	/* Cache Line Size 64 bytes */
15709 		#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SIZE_64	UINT32_C(0x0)
15710 	/* Cache Line Size 128 bytes */
15711 		#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SIZE_128	UINT32_C(0x1)
15712 		#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_LAST	HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SIZE_128
15713 	/* This value is the virtual link admin state setting. */
15714 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_MASK	UINT32_C(0xc)
15715 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_SFT	2
15716 	/* Admin link state is in forced down mode. */
15717 		#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_DOWN  (UINT32_C(0x0) << 2)
15718 	/* Admin link state is in forced up mode. */
15719 		#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_UP	(UINT32_C(0x1) << 2)
15720 	/*
15721 	 * Admin link state is in auto mode - follows the physical link
15722 	 * state.
15723 	 */
15724 		#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_AUTO	(UINT32_C(0x2) << 2)
15725 		#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_LAST	HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_AUTO
15726 	/* Reserved for future. */
15727 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_RSVD_MASK		UINT32_C(0xf0)
15728 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_RSVD_SFT			4
15729 	/*
15730 	 * The number of VFs that are allocated to the function.
15731 	 * This is valid only on the PF with SR-IOV enabled.
15732 	 * 0xFF... (All Fs) if this command is called on a PF with
15733 	 * SR-IOV disabled or on a VF.
15734 	 */
15735 	uint16_t	alloc_vfs;
15736 	/*
15737 	 * The number of allocated multicast filters for this
15738 	 * function on the RX side.
15739 	 */
15740 	uint32_t	alloc_mcast_filters;
15741 	/*
15742 	 * The number of allocated HW ring groups for this
15743 	 * function.
15744 	 */
15745 	uint32_t	alloc_hw_ring_grps;
15746 	/*
15747 	 * The number of strict priority transmit rings out of
15748 	 * currently allocated TX rings to the function
15749 	 * (alloc_tx_rings).
15750 	 */
15751 	uint16_t	alloc_sp_tx_rings;
15752 	/*
15753 	 * The number of statistics contexts
15754 	 * currently reserved for the function.
15755 	 */
15756 	uint16_t	alloc_stat_ctx;
15757 	/*
15758 	 * This field specifies how many NQs are reserved for the PF.
15759 	 * Remaining NQs that belong to the PF are available for VFs.
15760 	 * Once a PF has created VFs, it cannot change how many NQs are
15761 	 * reserved for itself (since the NQs must be contiguous in HW).
15762 	 */
15763 	uint16_t	alloc_msix;
15764 	/*
15765 	 * The number of registered VF's associated with the PF. This field
15766 	 * should be ignored when the request received on the VF interface.
15767 	 * This field will be updated on the PF interface to initiate
15768 	 * the unregister request on PF in the HOT Reset Process.
15769 	 */
15770 	uint16_t	registered_vfs;
15771 	/*
15772 	 * The size of the doorbell BAR in KBytes reserved for L2 including
15773 	 * any area that is shared between L2 and RoCE. The L2 driver
15774 	 * should only map the L2 portion of the doorbell BAR. Any rounding
15775 	 * of the BAR size to the native CPU page size should be performed
15776 	 * by the driver. If the value is zero, no special partitioning
15777 	 * of the doorbell BAR between L2 and RoCE is required.
15778 	 */
15779 	uint16_t	l2_doorbell_bar_size_kb;
15780 	/*
15781 	 * A bitmask indicating the active endpoints. Each bit represents a
15782 	 * specific endpoint, with bit 0 indicating EP 0 and bit 3 indicating
15783 	 * EP 3. For example:
15784 	 * - a single root system would return 0x1
15785 	 * - a 2x8 system (where EPs 0 and 2 are active) would return 0x5
15786 	 * - a 4x4 system (where EPs 0-3 are active) would return 0xF
15787 	 */
15788 	uint8_t	active_endpoints;
15789 	/*
15790 	 * For backward compatibility this field must be set to 1.
15791 	 * Older drivers might look for this field to be 1 before
15792 	 * processing the message.
15793 	 */
15794 	uint8_t	always_1;
15795 	/*
15796 	 * This GRC address location is used by the Host driver interfaces to
15797 	 * poll the adapter ready state to re-initiate the registration process
15798 	 * again after receiving the RESET Notify event.
15799 	 */
15800 	uint32_t	reset_addr_poll;
15801 	/*
15802 	 * This field specifies legacy L2 doorbell size in KBytes. Drivers
15803 	 * should use this value to find out the doorbell page offset from the
15804 	 * BAR.
15805 	 */
15806 	uint16_t	legacy_l2_db_size_kb;
15807 	uint16_t	svif_info;
15808 	/*
15809 	 * This field specifies the source virtual interface of the function
15810 	 * being queried. Drivers can use this to program svif field in the
15811 	 * L2 context table
15812 	 */
15813 	#define HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_MASK	UINT32_C(0x7fff)
15814 	#define HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_SFT	0
15815 	/* This field specifies whether svif is valid or not */
15816 	#define HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_VALID	UINT32_C(0x8000)
15817 	uint8_t	mpc_chnls;
15818 	/*
15819 	 * When this bit is '1', it indicates that a MPC channel with
15820 	 * destination set to the TX crypto engine block is enabled.
15821 	 */
15822 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_TCE_ENABLED	UINT32_C(0x1)
15823 	/*
15824 	 * When this bit is '1', it indicates that a MPC channel with
15825 	 * destination set to the RX crypto engine block is enabled.
15826 	 */
15827 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_RCE_ENABLED	UINT32_C(0x2)
15828 	/*
15829 	 * When this bit is '1', it indicates that a MPC channel with
15830 	 * destination set to the TX configurable flow processing block is
15831 	 * enabled.
15832 	 */
15833 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_TE_CFA_ENABLED	UINT32_C(0x4)
15834 	/*
15835 	 * When this bit is '1', it indicates that a MPC channel with
15836 	 * destination set to the RX configurable flow processing block is
15837 	 * enabled.
15838 	 */
15839 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_RE_CFA_ENABLED	UINT32_C(0x8)
15840 	/*
15841 	 * When this bit is '1', it indicates that a MPC channel with
15842 	 * destination set to the primate processor block is enabled.
15843 	 */
15844 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_PRIMATE_ENABLED	UINT32_C(0x10)
15845 	/*
15846 	 * Configured doorbell page size for this function.
15847 	 * This field is valid for PF only.
15848 	 */
15849 	uint8_t	db_page_size;
15850 	/* DB page size is 4KB. */
15851 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4KB   UINT32_C(0x0)
15852 	/* DB page size is 8KB. */
15853 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_8KB   UINT32_C(0x1)
15854 	/* DB page size is 16KB. */
15855 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_16KB  UINT32_C(0x2)
15856 	/* DB page size is 32KB. */
15857 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_32KB  UINT32_C(0x3)
15858 	/* DB page size is 64KB. */
15859 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_64KB  UINT32_C(0x4)
15860 	/* DB page size is 128KB. */
15861 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_128KB UINT32_C(0x5)
15862 	/* DB page size is 256KB. */
15863 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_256KB UINT32_C(0x6)
15864 	/* DB page size is 512KB. */
15865 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_512KB UINT32_C(0x7)
15866 	/* DB page size is 1MB. */
15867 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_1MB   UINT32_C(0x8)
15868 	/* DB page size is 2MB. */
15869 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_2MB   UINT32_C(0x9)
15870 	/* DB page size is 4MB. */
15871 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4MB   UINT32_C(0xa)
15872 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_LAST HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4MB
15873 	/*
15874 	 * RoCE VNIC ID for the function. If the function does not have a valid
15875 	 * RoCE vnic id, then the roce_vnic_id_valid bit in flags is set to 0.
15876 	 */
15877 	uint16_t	roce_vnic_id;
15878 	/*
15879 	 * Minimum guaranteed bandwidth for the network partition made up
15880 	 * of the caller physical function and all its child virtual
15881 	 * functions. The rate is specified as a percentage of the bandwidth
15882 	 * of the link the partition is associated with. A value of 0
15883 	 * indicates that no minimum bandwidth is configured.
15884 	 * The format of this field is defined to match min_bw, even though
15885 	 * the partition minimum rate is always specified as a percentage.
15886 	 */
15887 	uint32_t	partition_min_bw;
15888 	/* The bandwidth value. */
15889 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
15890 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_SFT		0
15891 	/*
15892 	 * The granularity of the value (bits or bytes). Firmware never sets
15893 	 * this field.
15894 	 */
15895 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE			UINT32_C(0x10000000)
15896 	/* Value is in bits. */
15897 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
15898 	/* Value is in bytes. */
15899 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
15900 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_LAST		HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_BYTES
15901 	/* Always percentage of link bandwidth. */
15902 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
15903 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_SFT	29
15904 	/* Bandwidth value is in hundredths of a percent of link bandwidth. */
15905 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
15906 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100
15907 	/*
15908 	 * The maximum bandwidth that may be used by the network partition
15909 	 * made up of the caller physical function and all its child virtual
15910 	 * functions. The rate is specified as a percentage of the bandwidth
15911 	 * of the link the partition is associated with. A value of 0
15912 	 * indicates that no maximum bandwidth is configured.
15913 	 * The format of this field is defined to match max_bw, even though
15914 	 * the partition bandwidth must be specified as a percentage.
15915 	 */
15916 	uint32_t	partition_max_bw;
15917 	/* The bandwidth value. */
15918 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
15919 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_SFT		0
15920 	/*
15921 	 * The granularity of the value (bits or bytes). Firmware never sets
15922 	 * this field.
15923 	 */
15924 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE			UINT32_C(0x10000000)
15925 	/* Value is in bits. */
15926 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
15927 	/* Value is in bytes. */
15928 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
15929 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_LAST		HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_BYTES
15930 	/* Always a percentage of link bandwidth. */
15931 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
15932 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_SFT	29
15933 	/* Value is in hundredths of a percent of link bandwidth. */
15934 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
15935 		#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100
15936 	/*
15937 	 * The maximum transmission unit of the function
15938 	 * configured by the host pf/vf.
15939 	 * If the reported mtu value is non-zero then it will be used for the
15940 	 * rings allocated on this function, otherwise the default
15941 	 * value is used if ring MTU is not specified.
15942 	 */
15943 	uint16_t	host_mtu;
15944 	uint8_t	unused_3[2];
15945 	uint8_t	unused_4[2];
15946 	/*
15947 	 * KDNet mode for the port for this function. If a VF, KDNet
15948 	 * mode is always disabled.
15949 	 */
15950 	uint8_t	port_kdnet_mode;
15951 	/* KDNet mode is not enabled on the port for this function. */
15952 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_DISABLED UINT32_C(0x0)
15953 	/* KDNet mode is enabled on the port for this function. */
15954 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_ENABLED  UINT32_C(0x1)
15955 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_LAST	HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_ENABLED
15956 	/*
15957 	 * If KDNet mode is enabled, the PCI function number of the
15958 	 * KDNet partition.
15959 	 */
15960 	uint8_t	kdnet_pcie_function;
15961 	/*
15962 	 * Function ID of the KDNET function on this port. If the
15963 	 * KDNET partition does not exist and the FW supports this
15964 	 * feature, 0xffff will be returned.
15965 	 */
15966 	uint16_t	port_kdnet_fid;
15967 	uint8_t	unused_5[2];
15968 	/* Number of KTLS Tx Key Contexts allocated. */
15969 	uint32_t	num_ktls_tx_key_ctxs;
15970 	/* Number of KTLS Rx Key Contexts allocated. */
15971 	uint32_t	num_ktls_rx_key_ctxs;
15972 	/*
15973 	 * The LAG idx of this function. The lag_id is per port and the
15974 	 * valid lag_id is from 0 to 7, if there is no valid lag_id,
15975 	 * 0xff will be returned.
15976 	 * This HW lag id is used for Truflow programming only.
15977 	 */
15978 	uint8_t	lag_id;
15979 	/* Partition interface for this function. */
15980 	uint8_t	parif;
15981 	/*
15982 	 * The LAG ID of a hardware link aggregation group (LAG) whose
15983 	 * member ports include the port of this function. The LAG was
15984 	 * previously created using HWRM_FUNC_LAG_CREATE. If the port of this
15985 	 * function is not a member of any LAG, the fw_lag_id will be 0xff.
15986 	 */
15987 	uint8_t	fw_lag_id;
15988 	uint8_t	unused_6;
15989 	/* Number of QUIC Tx Key Contexts allocated. */
15990 	uint32_t	num_quic_tx_key_ctxs;
15991 	/* Number of QUIC Rx Key Contexts allocated. */
15992 	uint32_t	num_quic_rx_key_ctxs;
15993 	/*
15994 	 * Number of AVs per VF. Only valid for PF. This field is ignored
15995 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
15996 	 * initialize_fw.
15997 	 */
15998 	uint32_t	roce_max_av_per_vf;
15999 	/*
16000 	 * Number of CQs per VF. Only valid for PF. This field is ignored when
16001 	 * the flag, l2_vf_resource_mgmt, is not set in RoCE initialize_fw.
16002 	 */
16003 	uint32_t	roce_max_cq_per_vf;
16004 	/*
16005 	 * Number of MR/MWs per VF. Only valid for PF. This field is ignored
16006 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
16007 	 * initialize_fw.
16008 	 */
16009 	uint32_t	roce_max_mrw_per_vf;
16010 	/*
16011 	 * Number of QPs per VF. Only valid for PF. This field is ignored when
16012 	 * the flag, l2_vf_resource_mgmt, is not set in RoCE initialize_fw.
16013 	 */
16014 	uint32_t	roce_max_qp_per_vf;
16015 	/*
16016 	 * Number of SRQs per VF. Only valid for PF. This field is ignored
16017 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
16018 	 * initialize_fw.
16019 	 */
16020 	uint32_t	roce_max_srq_per_vf;
16021 	/*
16022 	 * Number of GIDs per VF. Only valid for PF. This field is ignored
16023 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
16024 	 * initialize_fw.
16025 	 */
16026 	uint32_t	roce_max_gid_per_vf;
16027 	/*
16028 	 * Bitmap of context types that have XID partition enabled.
16029 	 * Only valid for PF.
16030 	 */
16031 	uint16_t	xid_partition_cfg;
16032 	/*
16033 	 * When this bit is '1', it indicates that driver enables XID
16034 	 * partition on Tx crypto key contexts.
16035 	 */
16036 	#define HWRM_FUNC_QCFG_OUTPUT_XID_PARTITION_CFG_TX_CK	UINT32_C(0x1)
16037 	/*
16038 	 * When this bit is '1', it indicates that driver enables XID
16039 	 * partition on Rx crypto key contexts.
16040 	 */
16041 	#define HWRM_FUNC_QCFG_OUTPUT_XID_PARTITION_CFG_RX_CK	UINT32_C(0x2)
16042 	uint8_t	unused_7;
16043 	/*
16044 	 * This field is used in Output records to indicate that the output
16045 	 * is completely written to RAM. This field should be read as '1'
16046 	 * to indicate that the output has been completely written. When
16047 	 * writing a command completion or response to an internal processor,
16048 	 * the order of writes has to be such that this field is written last.
16049 	 */
16050 	uint8_t	valid;
16051 } hwrm_func_qcfg_output_t, *phwrm_func_qcfg_output_t;
16052 
16053 /*****************
16054  * hwrm_func_cfg *
16055  *****************/
16056 
16057 
16058 /* hwrm_func_cfg_input (size:1280b/160B) */
16059 
16060 typedef struct hwrm_func_cfg_input {
16061 	/* The HWRM command request type. */
16062 	uint16_t	req_type;
16063 	/*
16064 	 * The completion ring to send the completion event on. This should
16065 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
16066 	 */
16067 	uint16_t	cmpl_ring;
16068 	/*
16069 	 * The sequence ID is used by the driver for tracking multiple
16070 	 * commands. This ID is treated as opaque data by the firmware and
16071 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
16072 	 */
16073 	uint16_t	seq_id;
16074 	/*
16075 	 * The target ID of the command:
16076 	 * * 0x0-0xFFF8 - The function ID
16077 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
16078 	 * * 0xFFFD - Reserved for user-space HWRM interface
16079 	 * * 0xFFFF - HWRM
16080 	 */
16081 	uint16_t	target_id;
16082 	/*
16083 	 * A physical address pointer pointing to a host buffer that the
16084 	 * command's response data will be written. This can be either a host
16085 	 * physical address (HPA) or a guest physical address (GPA) and must
16086 	 * point to a physically contiguous block of memory.
16087 	 */
16088 	uint64_t	resp_addr;
16089 	/*
16090 	 * Function ID of the function that is being
16091 	 * configured.
16092 	 * If set to 0xFF... (All Fs), then the configuration is
16093 	 * for the requesting function.
16094 	 */
16095 	uint16_t	fid;
16096 	/*
16097 	 * This field specifies how many NQs will be reserved for the PF.
16098 	 * Remaining NQs that belong to the PF become available for VFs.
16099 	 * Once a PF has created VFs, it cannot change how many NQs are
16100 	 * reserved for itself (since the NQs must be contiguous in HW).
16101 	 */
16102 	uint16_t	num_msix;
16103 	uint32_t	flags;
16104 	/*
16105 	 * When this bit is '1', the function is disabled with
16106 	 * source MAC address check.
16107 	 * This is an anti-spoofing check. If this flag is set,
16108 	 * then the function shall be configured to disallow
16109 	 * transmission of frames with the source MAC address that
16110 	 * is configured for this function.
16111 	 */
16112 	#define HWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_DISABLE	UINT32_C(0x1)
16113 	/*
16114 	 * When this bit is '1', the function is enabled with
16115 	 * source MAC address check.
16116 	 * This is an anti-spoofing check. If this flag is set,
16117 	 * then the function shall be configured to allow
16118 	 * transmission of frames with the source MAC address that
16119 	 * is configured for this function.
16120 	 */
16121 	#define HWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_ENABLE	UINT32_C(0x2)
16122 	/* reserved. */
16123 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RSVD_MASK			UINT32_C(0x1fc)
16124 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RSVD_SFT			2
16125 	/*
16126 	 * Standard TX Ring mode is used for the allocation of TX ring
16127 	 * and underlying scheduling resources that allow bandwidth
16128 	 * reservation and limit settings on the queried function.
16129 	 * If set to 1, then standard TX ring mode is requested to be
16130 	 * enabled on the function being configured.
16131 	 */
16132 	#define HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_ENABLE	UINT32_C(0x200)
16133 	/*
16134 	 * Standard TX Ring mode is used for the allocation of TX ring
16135 	 * and underlying scheduling resources that allow bandwidth
16136 	 * reservation and limit settings on the queried function.
16137 	 * If set to 1, then the standard TX ring mode is requested to
16138 	 * be disabled on the function being configured. In this extended
16139 	 * TX ring resource mode, the minimum and maximum bandwidth settings
16140 	 * are not supported to allow the allocation of TX rings to
16141 	 * span multiple scheduler nodes.
16142 	 */
16143 	#define HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_DISABLE	UINT32_C(0x400)
16144 	/*
16145 	 * If this bit is set, virtual mac address configured
16146 	 * in this command will be persistent over warm boot.
16147 	 */
16148 	#define HWRM_FUNC_CFG_INPUT_FLAGS_VIRT_MAC_PERSIST		UINT32_C(0x800)
16149 	/*
16150 	 * This bit only applies to the VF. If this bit is set, the statistic
16151 	 * context counters will not be cleared when the statistic context is
16152 	 * freed or a function reset is called on VF. This bit will be
16153 	 * cleared when the PF is unloaded or a function reset is called on
16154 	 * the PF.
16155 	 */
16156 	#define HWRM_FUNC_CFG_INPUT_FLAGS_NO_AUTOCLEAR_STATISTIC	UINT32_C(0x1000)
16157 	/*
16158 	 * This bit requests that the firmware test to see if all the assets
16159 	 * requested in this command (i.e. number of TX rings) are available.
16160 	 * The firmware will return an error if the requested assets are
16161 	 * not available. The firmware will NOT reserve the assets if they
16162 	 * are available.
16163 	 */
16164 	#define HWRM_FUNC_CFG_INPUT_FLAGS_TX_ASSETS_TEST		UINT32_C(0x2000)
16165 	/*
16166 	 * This bit requests that the firmware test to see if all the assets
16167 	 * requested in this command (i.e. number of RX rings) are available.
16168 	 * The firmware will return an error if the requested assets are
16169 	 * not available. The firmware will NOT reserve the assets if they
16170 	 * are available.
16171 	 */
16172 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RX_ASSETS_TEST		UINT32_C(0x4000)
16173 	/*
16174 	 * This bit requests that the firmware test to see if all the assets
16175 	 * requested in this command (i.e. number of CMPL rings) are
16176 	 * available. The firmware will return an error if the requested
16177 	 * assets are not available. The firmware will NOT reserve the assets
16178 	 * if they are available.
16179 	 */
16180 	#define HWRM_FUNC_CFG_INPUT_FLAGS_CMPL_ASSETS_TEST		UINT32_C(0x8000)
16181 	/*
16182 	 * This bit requests that the firmware test to see if all the assets
16183 	 * requested in this command (i.e. number of RSS ctx) are available.
16184 	 * The firmware will return an error if the requested assets are
16185 	 * not available. The firmware will NOT reserve the assets if they
16186 	 * are available.
16187 	 */
16188 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RSSCOS_CTX_ASSETS_TEST	UINT32_C(0x10000)
16189 	/*
16190 	 * This bit requests that the firmware test to see if all the assets
16191 	 * requested in this command (i.e. number of ring groups) are
16192 	 * available. The firmware will return an error if the requested
16193 	 * assets are not available. The firmware will NOT reserve the assets
16194 	 * if they are available.
16195 	 */
16196 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RING_GRP_ASSETS_TEST	UINT32_C(0x20000)
16197 	/*
16198 	 * This bit requests that the firmware test to see if all the assets
16199 	 * requested in this command (i.e. number of stat ctx) are available.
16200 	 * The firmware will return an error if the requested assets are
16201 	 * not available. The firmware will NOT reserve the assets if they
16202 	 * are available.
16203 	 */
16204 	#define HWRM_FUNC_CFG_INPUT_FLAGS_STAT_CTX_ASSETS_TEST	UINT32_C(0x40000)
16205 	/*
16206 	 * This bit requests that the firmware test to see if all the assets
16207 	 * requested in this command (i.e. number of VNICs) are available.
16208 	 * The firmware will return an error if the requested assets are
16209 	 * not available. The firmware will NOT reserve the assets if they
16210 	 * are available.
16211 	 */
16212 	#define HWRM_FUNC_CFG_INPUT_FLAGS_VNIC_ASSETS_TEST		UINT32_C(0x80000)
16213 	/*
16214 	 * This bit requests that the firmware test to see if all the assets
16215 	 * requested in this command (i.e. number of L2 ctx) are available.
16216 	 * The firmware will return an error if the requested assets are
16217 	 * not available. The firmware will NOT reserve the assets if they
16218 	 * are available.
16219 	 */
16220 	#define HWRM_FUNC_CFG_INPUT_FLAGS_L2_CTX_ASSETS_TEST		UINT32_C(0x100000)
16221 	/*
16222 	 * This configuration change can be initiated by a PF driver. This
16223 	 * configuration request shall be targeted to a VF. From local host
16224 	 * resident HWRM clients, only the parent PF driver shall be allowed
16225 	 * to initiate this change on one of its children VFs. If this bit is
16226 	 * set to 1, then the VF that is being configured is requested to be
16227 	 * trusted.
16228 	 */
16229 	#define HWRM_FUNC_CFG_INPUT_FLAGS_TRUSTED_VF_ENABLE		UINT32_C(0x200000)
16230 	/*
16231 	 * When this bit it set, even if PF reserved pool size is zero,
16232 	 * FW will allow driver to create TX rings in ring alloc,
16233 	 * by reserving TX ring, S3 node dynamically.
16234 	 */
16235 	#define HWRM_FUNC_CFG_INPUT_FLAGS_DYNAMIC_TX_RING_ALLOC	UINT32_C(0x400000)
16236 	/*
16237 	 * This bit requests that the firmware test to see if all the assets
16238 	 * requested in this command (i.e. number of NQ rings) are available.
16239 	 * The firmware will return an error if the requested assets are
16240 	 * not available. The firmware will NOT reserve the assets if they
16241 	 * are available.
16242 	 */
16243 	#define HWRM_FUNC_CFG_INPUT_FLAGS_NQ_ASSETS_TEST		UINT32_C(0x800000)
16244 	/*
16245 	 * This configuration change can be initiated by a PF driver. This
16246 	 * configuration request shall be targeted to a VF. From local host
16247 	 * resident HWRM clients, only the parent PF driver shall be allowed
16248 	 * to initiate this change on one of its children VFs. If this bit is
16249 	 * set to 1, then the VF that is being configured is requested to be
16250 	 * untrusted.
16251 	 */
16252 	#define HWRM_FUNC_CFG_INPUT_FLAGS_TRUSTED_VF_DISABLE		UINT32_C(0x1000000)
16253 	/*
16254 	 * This bit is used by preboot drivers on a PF that require access
16255 	 * to the legacy L2 ring model and legacy 32b doorbells. This
16256 	 * feature is not allowed on VFs and is only relevant for devices
16257 	 * that require a context backing store.
16258 	 */
16259 	#define HWRM_FUNC_CFG_INPUT_FLAGS_PREBOOT_LEGACY_L2_RINGS	UINT32_C(0x2000000)
16260 	/*
16261 	 * If this bit is set to 0, then the interface does not support hot
16262 	 * reset capability which it advertised with the hot_reset_support
16263 	 * flag in HWRM_FUNC_DRV_RGTR. If any of the function has set this
16264 	 * flag to 0, adapter cannot do the hot reset. In this state, if the
16265 	 * firmware receives a hot reset request, firmware must fail the
16266 	 * request. If this bit is set to 1, then interface is renabling the
16267 	 * hot reset capability.
16268 	 */
16269 	#define HWRM_FUNC_CFG_INPUT_FLAGS_HOT_RESET_IF_EN_DIS		UINT32_C(0x4000000)
16270 	/*
16271 	 * If this bit is set to 1, the PF driver is requesting FW
16272 	 * to enable PPP TX PUSH feature on all the TX rings specified in
16273 	 * the num_tx_rings field. By default, the PPP TX push feature is
16274 	 * disabled for all the TX rings of the function. This flag is
16275 	 * ignored if num_tx_rings field is not specified or the function
16276 	 * doesn't support PPP tx push feature.
16277 	 */
16278 	#define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE	UINT32_C(0x8000000)
16279 	/*
16280 	 * If this bit is set to 1, the PF driver is requesting FW
16281 	 * to disable PPP TX PUSH feature on all the TX rings specified in
16282 	 * the num_tx_rings field. This flag is ignored if num_tx_rings
16283 	 * field is not specified or the function doesn't support PPP tx
16284 	 * push feature.
16285 	 */
16286 	#define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE	UINT32_C(0x10000000)
16287 	/*
16288 	 * If this bit is set to 1, the driver is requesting FW to enable
16289 	 * the BD_METADATA feature for this function. The FW returns error
16290 	 * on this request if the TX_METADATA is enabled for this function.
16291 	 */
16292 	#define HWRM_FUNC_CFG_INPUT_FLAGS_BD_METADATA_ENABLE		UINT32_C(0x20000000)
16293 	/*
16294 	 * If this bit is set to 1, the driver is requesting FW to disable
16295 	 * the BD_METADATA feature for this function. The FW returns error
16296 	 * on this request if the TX_METADATA is enabled for this function.
16297 	 */
16298 	#define HWRM_FUNC_CFG_INPUT_FLAGS_BD_METADATA_DISABLE		UINT32_C(0x40000000)
16299 	uint32_t	enables;
16300 	/*
16301 	 * This bit must be '1' for the admin_mtu field to be
16302 	 * configured.
16303 	 */
16304 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ADMIN_MTU		UINT32_C(0x1)
16305 	/*
16306 	 * This bit must be '1' for the mru field to be
16307 	 * configured.
16308 	 */
16309 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MRU			UINT32_C(0x2)
16310 	/*
16311 	 * This bit must be '1' for the num_rsscos_ctxs field to be
16312 	 * configured.
16313 	 */
16314 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS	UINT32_C(0x4)
16315 	/*
16316 	 * This bit must be '1' for the num_cmpl_rings field to be
16317 	 * configured.
16318 	 */
16319 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_CMPL_RINGS	UINT32_C(0x8)
16320 	/*
16321 	 * This bit must be '1' for the num_tx_rings field to be
16322 	 * configured.
16323 	 */
16324 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_TX_RINGS		UINT32_C(0x10)
16325 	/*
16326 	 * This bit must be '1' for the num_rx_rings field to be
16327 	 * configured.
16328 	 */
16329 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_RX_RINGS		UINT32_C(0x20)
16330 	/*
16331 	 * This bit must be '1' for the num_l2_ctxs field to be
16332 	 * configured.
16333 	 */
16334 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_L2_CTXS		UINT32_C(0x40)
16335 	/*
16336 	 * This bit must be '1' for the num_vnics field to be
16337 	 * configured.
16338 	 */
16339 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_VNICS		UINT32_C(0x80)
16340 	/*
16341 	 * This bit must be '1' for the num_stat_ctxs field to be
16342 	 * configured.
16343 	 */
16344 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_STAT_CTXS		UINT32_C(0x100)
16345 	/*
16346 	 * This bit must be '1' for the dflt_mac_addr field to be
16347 	 * configured.
16348 	 */
16349 	#define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR		UINT32_C(0x200)
16350 	/*
16351 	 * This bit must be '1' for the dflt_vlan field to be
16352 	 * configured.
16353 	 */
16354 	#define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_VLAN		UINT32_C(0x400)
16355 	/*
16356 	 * This bit must be '1' for the dflt_ip_addr field to be
16357 	 * configured.
16358 	 */
16359 	#define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_IP_ADDR		UINT32_C(0x800)
16360 	/*
16361 	 * This bit must be '1' for the min_bw field to be
16362 	 * configured.
16363 	 */
16364 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MIN_BW		UINT32_C(0x1000)
16365 	/*
16366 	 * This bit must be '1' for the max_bw field to be
16367 	 * configured.
16368 	 */
16369 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MAX_BW		UINT32_C(0x2000)
16370 	/*
16371 	 * This bit must be '1' for the async_event_cr field to be
16372 	 * configured.
16373 	 */
16374 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR	UINT32_C(0x4000)
16375 	/*
16376 	 * This bit must be '1' for the vlan_antispoof_mode field to be
16377 	 * configured.
16378 	 */
16379 	#define HWRM_FUNC_CFG_INPUT_ENABLES_VLAN_ANTISPOOF_MODE	UINT32_C(0x8000)
16380 	/*
16381 	 * This bit must be '1' for the allowed_vlan_pris field to be
16382 	 * configured.
16383 	 */
16384 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ALLOWED_VLAN_PRIS	UINT32_C(0x10000)
16385 	/*
16386 	 * This bit must be '1' for the evb_mode field to be
16387 	 * configured.
16388 	 */
16389 	#define HWRM_FUNC_CFG_INPUT_ENABLES_EVB_MODE		UINT32_C(0x20000)
16390 	/*
16391 	 * This bit must be '1' for the num_mcast_filters field to be
16392 	 * configured.
16393 	 */
16394 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_MCAST_FILTERS	UINT32_C(0x40000)
16395 	/*
16396 	 * This bit must be '1' for the num_hw_ring_grps field to be
16397 	 * configured.
16398 	 */
16399 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS	UINT32_C(0x80000)
16400 	/*
16401 	 * This bit must be '1' for the cache_linesize field to be
16402 	 * configured.
16403 	 */
16404 	#define HWRM_FUNC_CFG_INPUT_ENABLES_CACHE_LINESIZE	UINT32_C(0x100000)
16405 	/*
16406 	 * This bit must be '1' for the num_msix field to be
16407 	 * configured.
16408 	 */
16409 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_MSIX		UINT32_C(0x200000)
16410 	/*
16411 	 * This bit must be '1' for the link admin state field to be
16412 	 * configured.
16413 	 */
16414 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ADMIN_LINK_STATE	UINT32_C(0x400000)
16415 	/*
16416 	 * This bit must be '1' for the hot_reset_if_en_dis field to be
16417 	 * configured.
16418 	 */
16419 	#define HWRM_FUNC_CFG_INPUT_ENABLES_HOT_RESET_IF_SUPPORT	UINT32_C(0x800000)
16420 	/*
16421 	 * This bit must be '1' for the schq_id field to be
16422 	 * configured.
16423 	 */
16424 	#define HWRM_FUNC_CFG_INPUT_ENABLES_SCHQ_ID		UINT32_C(0x1000000)
16425 	/*
16426 	 * This bit must be '1' for the mpc_chnls field to be
16427 	 * configured.
16428 	 */
16429 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MPC_CHNLS		UINT32_C(0x2000000)
16430 	/*
16431 	 * This bit must be '1' for the partition_min_bw field to be
16432 	 * configured.
16433 	 */
16434 	#define HWRM_FUNC_CFG_INPUT_ENABLES_PARTITION_MIN_BW	UINT32_C(0x4000000)
16435 	/*
16436 	 * This bit must be '1' for the partition_max_bw field to be
16437 	 * configured.
16438 	 */
16439 	#define HWRM_FUNC_CFG_INPUT_ENABLES_PARTITION_MAX_BW	UINT32_C(0x8000000)
16440 	/*
16441 	 * This bit must be '1' for the tpid field to be
16442 	 * configured. This bit is only valid when dflt_vlan enable
16443 	 * bit is set.
16444 	 */
16445 	#define HWRM_FUNC_CFG_INPUT_ENABLES_TPID			UINT32_C(0x10000000)
16446 	/*
16447 	 * This bit must be '1' for the host_mtu field to be
16448 	 * configured.
16449 	 */
16450 	#define HWRM_FUNC_CFG_INPUT_ENABLES_HOST_MTU		UINT32_C(0x20000000)
16451 	/*
16452 	 * This bit must be '1' for the num_ktls_tx_key_ctxs field to be
16453 	 * configured.
16454 	 */
16455 	#define HWRM_FUNC_CFG_INPUT_ENABLES_KTLS_TX_KEY_CTXS	UINT32_C(0x40000000)
16456 	/*
16457 	 * This bit must be '1' for the num_ktls_rx_key_ctxs field to be
16458 	 * configured.
16459 	 */
16460 	#define HWRM_FUNC_CFG_INPUT_ENABLES_KTLS_RX_KEY_CTXS	UINT32_C(0x80000000)
16461 	/*
16462 	 * This field can be used by the admin PF to configure
16463 	 * mtu of foster PFs.
16464 	 * The maximum transmission unit of the function.
16465 	 * The HWRM should make sure that the mtu of
16466 	 * the function does not exceed the mtu of the physical
16467 	 * port that this function is associated with.
16468 	 *
16469 	 * In addition to configuring mtu per function, it is
16470 	 * possible to configure mtu per transmit ring.
16471 	 * By default, the mtu of each transmit ring associated
16472 	 * with a function is equal to the mtu of the function.
16473 	 * The HWRM should make sure that the mtu of each transmit
16474 	 * ring that is assigned to a function has a valid mtu.
16475 	 */
16476 	uint16_t	admin_mtu;
16477 	/*
16478 	 * The maximum receive unit of the function.
16479 	 * The HWRM should make sure that the mru of
16480 	 * the function does not exceed the mru of the physical
16481 	 * port that this function is associated with.
16482 	 *
16483 	 * In addition to configuring mru per function, it is
16484 	 * possible to configure mru per vnic.
16485 	 * By default, the mru of each vnic associated
16486 	 * with a function is equal to the mru of the function.
16487 	 * The HWRM should make sure that the mru of each vnic
16488 	 * that is assigned to a function has a valid mru.
16489 	 */
16490 	uint16_t	mru;
16491 	/*
16492 	 * The number of RSS/COS contexts requested for the
16493 	 * function.
16494 	 */
16495 	uint16_t	num_rsscos_ctxs;
16496 	/*
16497 	 * The number of completion rings requested for the
16498 	 * function. This does not include the rings allocated
16499 	 * to any children functions if any.
16500 	 */
16501 	uint16_t	num_cmpl_rings;
16502 	/*
16503 	 * The number of transmit rings requested for the function.
16504 	 * This does not include the rings allocated to any
16505 	 * children functions if any.
16506 	 */
16507 	uint16_t	num_tx_rings;
16508 	/*
16509 	 * The number of receive rings requested for the function.
16510 	 * This does not include the rings allocated
16511 	 * to any children functions if any.
16512 	 */
16513 	uint16_t	num_rx_rings;
16514 	/* The requested number of L2 contexts for the function. */
16515 	uint16_t	num_l2_ctxs;
16516 	/* The requested number of vnics for the function. */
16517 	uint16_t	num_vnics;
16518 	/* The requested number of statistic contexts for the function. */
16519 	uint16_t	num_stat_ctxs;
16520 	/*
16521 	 * The number of HW ring groups that should
16522 	 * be reserved for this function.
16523 	 */
16524 	uint16_t	num_hw_ring_grps;
16525 	/* The default MAC address for the function being configured. */
16526 	uint8_t	dflt_mac_addr[6];
16527 	/*
16528 	 * The default VLAN for the function being configured.
16529 	 * This field's format is same as 802.1Q Tag's
16530 	 * Tag Control Information (TCI) format that includes both
16531 	 * Priority Code Point (PCP) and VLAN Identifier (VID).
16532 	 */
16533 	uint16_t	dflt_vlan;
16534 	/*
16535 	 * The default IP address for the function being configured.
16536 	 * This address is only used in enabling source property check.
16537 	 */
16538 	uint32_t	dflt_ip_addr[4];
16539 	/*
16540 	 * Minimum guaranteed transmit bandwidth for this function. When
16541 	 * specified for a PF, does not affect traffic from the PF's child VFs.
16542 	 * A value of 0 indicates the minimum bandwidth is not configured.
16543 	 */
16544 	uint32_t	min_bw;
16545 	/* The bandwidth value. */
16546 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
16547 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_SFT		0
16548 	/* The granularity of the value (bits or bytes). */
16549 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE			UINT32_C(0x10000000)
16550 	/* Value is in bits. */
16551 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
16552 	/* Value is in bytes. */
16553 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
16554 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_LAST		HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_BYTES
16555 	/* bw_value_unit is 3 b */
16556 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
16557 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_SFT	29
16558 	/* Value is in Mb or MB (base 10). */
16559 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
16560 	/* Value is in Kb or KB (base 10). */
16561 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
16562 	/* Value is in bits or bytes. */
16563 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
16564 	/* Value is in Gb or GB (base 10). */
16565 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
16566 	/* Value is in 1/100th of a percentage of total bandwidth. */
16567 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
16568 	/* Invalid unit */
16569 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
16570 		#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_INVALID
16571 	/*
16572 	 * Maximum transmit rate for this function. When specified for a PF,
16573 	 * does not affect traffic from the PF's child VFs.
16574 	 * A value of 0 indicates that the maximum bandwidth is not configured.
16575 	 */
16576 	uint32_t	max_bw;
16577 	/* The bandwidth value. */
16578 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
16579 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_SFT		0
16580 	/* The granularity of the value (bits or bytes). */
16581 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE			UINT32_C(0x10000000)
16582 	/* Value is in bits. */
16583 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
16584 	/* Value is in bytes. */
16585 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
16586 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_LAST		HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_BYTES
16587 	/* bw_value_unit is 3 b */
16588 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
16589 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_SFT	29
16590 	/* Value is in Mb or MB (base 10). */
16591 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
16592 	/* Value is in Kb or KB (base 10). */
16593 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
16594 	/* Value is in bits or bytes. */
16595 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
16596 	/* Value is in Gb or GB (base 10). */
16597 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
16598 	/* Value is in 1/100th of a percentage of total bandwidth. */
16599 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
16600 	/* Invalid unit */
16601 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
16602 		#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID
16603 	/*
16604 	 * ID of the target completion ring for receiving asynchronous
16605 	 * event completions. If this field is not valid, then the
16606 	 * HWRM shall use the default completion ring of the function
16607 	 * that is being configured as the target completion ring for
16608 	 * providing any asynchronous event completions for that
16609 	 * function.
16610 	 * If this field is valid, then the HWRM shall use the
16611 	 * completion ring identified by this ID as the target
16612 	 * completion ring for providing any asynchronous event
16613 	 * completions for the function that is being configured.
16614 	 */
16615 	uint16_t	async_event_cr;
16616 	/* VLAN Anti-spoofing mode. */
16617 	uint8_t	vlan_antispoof_mode;
16618 	/* No VLAN anti-spoofing checks are enabled */
16619 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_NOCHECK		UINT32_C(0x0)
16620 	/* Validate VLAN against the configured VLAN(s) */
16621 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_VALIDATE_VLAN	UINT32_C(0x1)
16622 	/* Insert VLAN if it does not exist, otherwise discard */
16623 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_IF_VLANDNE	UINT32_C(0x2)
16624 	/* Insert VLAN if it does not exist, override VLAN if it exists */
16625 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN UINT32_C(0x3)
16626 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_LAST		HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN
16627 	/*
16628 	 * This bit field defines VLAN PRIs that are allowed on
16629 	 * this function.
16630 	 * If nth bit is set, then VLAN PRI n is allowed on this
16631 	 * function.
16632 	 */
16633 	uint8_t	allowed_vlan_pris;
16634 	/*
16635 	 * The evb_mode is configured on a per port basis. The default evb_mode
16636 	 * is configured based on the NVM EVB mode setting upon firmware
16637 	 * initialization. The HWRM allows a PF driver to change EVB mode for a
16638 	 * port used by the PF only when one of the following conditions is
16639 	 * satisfied.
16640 	 * 1. The current operating mode is single function mode.
16641 	 *	(ie. one PF per port)
16642 	 * 2. For SmartNIC, any one of the PAXC PFs is permitted to change the
16643 	 *	EVB mode of the port used by the PAXC PF. None of the X86 PFs
16644 	 *	should have privileges.
16645 	 * The HWRM doesn't permit any PFs to change the underlying EVB mode
16646 	 * when running as MHB or NPAR mode in performance NIC configuration.
16647 	 * The HWRM doesn't permit a VF driver to change the EVB mode.
16648 	 * Once the HWRM determines a function doesn't meet the conditions
16649 	 * to configure the EVB mode, it sets the evb_mode_cfg_not_supported
16650 	 * flag in HWRM_FUNC_QCAPS command response for the function.
16651 	 * The HWRM takes into account the switching of EVB mode from one to
16652 	 * another and reconfigure hardware resources as required. The
16653 	 * switching from VEB to VEPA mode requires the disabling of the
16654 	 * loopback traffic. Additionally, source knockouts are handled
16655 	 * differently in VEB and VEPA modes.
16656 	 */
16657 	uint8_t	evb_mode;
16658 	/* No Edge Virtual Bridging (EVB) */
16659 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_NO_EVB UINT32_C(0x0)
16660 	/* Virtual Ethernet Bridge (VEB) */
16661 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_VEB	UINT32_C(0x1)
16662 	/* Virtual Ethernet Port Aggregator (VEPA) */
16663 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_VEPA   UINT32_C(0x2)
16664 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_LAST  HWRM_FUNC_CFG_INPUT_EVB_MODE_VEPA
16665 	uint8_t	options;
16666 	/*
16667 	 * This value indicates the PCIE device cache line size.
16668 	 * The cache line size allows the DMA writes to terminate and
16669 	 * start at the cache boundary.
16670 	 */
16671 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_MASK	UINT32_C(0x3)
16672 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SFT	0
16673 	/* Cache Line Size 64 bytes */
16674 		#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SIZE_64	UINT32_C(0x0)
16675 	/* Cache Line Size 128 bytes */
16676 		#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SIZE_128	UINT32_C(0x1)
16677 		#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_LAST	HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SIZE_128
16678 	/* This value is the virtual link admin state setting. */
16679 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_MASK	UINT32_C(0xc)
16680 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_SFT	2
16681 	/* Admin state is forced down. */
16682 		#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_DOWN  (UINT32_C(0x0) << 2)
16683 	/* Admin state is forced up. */
16684 		#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_UP	(UINT32_C(0x1) << 2)
16685 	/*
16686 	 * Admin state is in auto mode - is to follow the physical link
16687 	 * state.
16688 	 */
16689 		#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_AUTO	(UINT32_C(0x2) << 2)
16690 		#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_LAST	HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_AUTO
16691 	/* Reserved for future. */
16692 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_RSVD_MASK		UINT32_C(0xf0)
16693 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_RSVD_SFT			4
16694 	/*
16695 	 * The number of multicast filters that should
16696 	 * be reserved for this function on the RX side.
16697 	 */
16698 	uint16_t	num_mcast_filters;
16699 	/* Used by a PF driver to associate a SCHQ with a VF. */
16700 	uint16_t	schq_id;
16701 	uint16_t	mpc_chnls;
16702 	/*
16703 	 * When this bit is '1', the caller requests to enable a MPC
16704 	 * channel with destination to the TX crypto engine block.
16705 	 * When this bit is '0', this flag has no effect.
16706 	 */
16707 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TCE_ENABLE	UINT32_C(0x1)
16708 	/*
16709 	 * When this bit is '1', the caller requests to disable a MPC
16710 	 * channel with destination to the TX crypto engine block.
16711 	 * When this bit is '0', this flag has no effect.
16712 	 */
16713 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TCE_DISABLE	UINT32_C(0x2)
16714 	/*
16715 	 * When this bit is '1', the caller requests to enable a MPC
16716 	 * channel with destination to the RX crypto engine block.
16717 	 * When this bit is '0', this flag has no effect.
16718 	 */
16719 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RCE_ENABLE	UINT32_C(0x4)
16720 	/*
16721 	 * When this bit is '1', the caller requests to disable a MPC
16722 	 * channel with destination to the RX crypto engine block.
16723 	 * When this bit is '0', this flag has no effect.
16724 	 */
16725 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RCE_DISABLE	UINT32_C(0x8)
16726 	/*
16727 	 * When this bit is '1', the caller requests to enable a MPC
16728 	 * channel with destination to the TX configurable flow processing
16729 	 * block. When this bit is '0', this flag has no effect.
16730 	 */
16731 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TE_CFA_ENABLE	UINT32_C(0x10)
16732 	/*
16733 	 * When this bit is '1', the caller requests to disable a MPC
16734 	 * channel with destination to the TX configurable flow processing
16735 	 * block. When this bit is '0', this flag has no effect.
16736 	 */
16737 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TE_CFA_DISABLE	UINT32_C(0x20)
16738 	/*
16739 	 * When this bit is '1', the caller requests to enable a MPC
16740 	 * channel with destination to the RX configurable flow processing
16741 	 * block. When this bit is '0', this flag has no effect.
16742 	 */
16743 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RE_CFA_ENABLE	UINT32_C(0x40)
16744 	/*
16745 	 * When this bit is '1', the caller requests to disable a MPC
16746 	 * channel with destination to the RX configurable flow processing
16747 	 * block. When this bit is '0', this flag has no effect.
16748 	 */
16749 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RE_CFA_DISABLE	UINT32_C(0x80)
16750 	/*
16751 	 * When this bit is '1', the caller requests to enable a MPC
16752 	 * channel with destination to the primate processor block.
16753 	 * When this bit is '0', this flag has no effect.
16754 	 */
16755 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_PRIMATE_ENABLE	UINT32_C(0x100)
16756 	/*
16757 	 * When this bit is '1', the caller requests to disable a MPC
16758 	 * channel with destination to the primate processor block.
16759 	 * When this bit is '0', this flag has no effect.
16760 	 */
16761 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_PRIMATE_DISABLE	UINT32_C(0x200)
16762 	/*
16763 	 * Minimum guaranteed bandwidth for the network partition made up
16764 	 * of the caller physical function and all its child virtual
16765 	 * functions. The rate is specified as a percentage of the bandwidth
16766 	 * of the link the partition is associated with. A value of 0
16767 	 * indicates that no minimum bandwidth is configured. The sum of the
16768 	 * minimum bandwidths for all partitions on a link must not exceed
16769 	 * 100%.
16770 	 * The format of this field is defined to match min_bw, even though
16771 	 * it does not allow all the options for min_bw at this time.
16772 	 */
16773 	uint32_t	partition_min_bw;
16774 	/* The bandwidth value. */
16775 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
16776 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_SFT		0
16777 	/*
16778 	 * The granularity of the value (bits or bytes). Firmware ignores
16779 	 * this field.
16780 	 */
16781 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE			UINT32_C(0x10000000)
16782 	/* Value is in bits. */
16783 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
16784 	/* Value is in bytes. */
16785 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
16786 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_LAST		HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_BYTES
16787 	/* Bandwidth units. Must be set to percent1_100. */
16788 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
16789 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_SFT	29
16790 	/* Value is in hundredths of a percent of link bandwidth. */
16791 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
16792 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100
16793 	/*
16794 	 * The maximum bandwidth that may be used by the network partition
16795 	 * made up of the caller physical function and all its child virtual
16796 	 * functions. The rate is specified as a percentage of the bandwidth
16797 	 * of the link the partition is associated with. A value of 0
16798 	 * indicates that no maximum bandwidth is configured.
16799 	 * The format of this field is defined to match max_bw, even though it
16800 	 * does not allow all the options for max_bw at this time.
16801 	 */
16802 	uint32_t	partition_max_bw;
16803 	/* The bandwidth value. */
16804 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
16805 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_SFT		0
16806 	/*
16807 	 * The granularity of the value (bits or bytes). Firmware ignores
16808 	 * this field.
16809 	 */
16810 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE			UINT32_C(0x10000000)
16811 	/* Value is in bits. */
16812 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
16813 	/* Value is in bytes. */
16814 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
16815 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_LAST		HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_BYTES
16816 	/* Bandwidth units. Must be set to percent1_100. */
16817 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
16818 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_SFT	29
16819 	/* Value is in hundredths of a percent of link bandwidth. */
16820 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
16821 		#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100
16822 	/*
16823 	 * The TPID for the function for which default VLAN
16824 	 * is configured. If the dflt_vlan is not specified
16825 	 * with the TPID, FW returns error. If the TPID is
16826 	 * not specified with dflt_vlan, the default TPID of
16827 	 * 0x8100 will be used. This field is specified in
16828 	 * network byte order.
16829 	 */
16830 	uint16_t	tpid;
16831 	/*
16832 	 * This field can be used by the host PF to configure
16833 	 * mtu value.
16834 	 * The maximum transmission unit of the function.
16835 	 * The HWRM should make sure that the mtu of
16836 	 * the function does not exceed the mtu of the physical
16837 	 * port that this function is associated with.
16838 	 *
16839 	 * In addition to configuring mtu per function, it is
16840 	 * possible to configure mtu per transmit ring.
16841 	 * By default, the mtu of each transmit ring associated
16842 	 * with a function is equal to the mtu of the function.
16843 	 * The HWRM should make sure that the mtu of each transmit
16844 	 * ring that is assigned to a function has a valid mtu.
16845 	 */
16846 	uint16_t	host_mtu;
16847 	uint32_t	flags2;
16848 	/*
16849 	 * If this bit is set to 1, the driver is requesting the firmware
16850 	 * to see if the assets (i.e., the number of KTLS key contexts)
16851 	 * requested in this command are available. The firmware will return
16852 	 * an error if the requested assets are not available. The firmware
16853 	 * will NOT reserve the assets if they are available.
16854 	 */
16855 	#define HWRM_FUNC_CFG_INPUT_FLAGS2_KTLS_KEY_CTX_ASSETS_TEST	UINT32_C(0x1)
16856 	/*
16857 	 * If this bit is set to 1, the driver is requesting the firmware
16858 	 * to see if the assets (i.e., the number of QUIC key contexts)
16859 	 * requested in this command are available. The firmware will return
16860 	 * an error if the requested assets are not available. The firmware
16861 	 * will NOT reserve the assets if they are available.
16862 	 */
16863 	#define HWRM_FUNC_CFG_INPUT_FLAGS2_QUIC_KEY_CTX_ASSETS_TEST	UINT32_C(0x2)
16864 	uint32_t	enables2;
16865 	/*
16866 	 * This bit must be '1' for the kdnet_mode field to be
16867 	 * configured.
16868 	 */
16869 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_KDNET		UINT32_C(0x1)
16870 	/*
16871 	 * This bit must be '1' for the db_page_size field to be
16872 	 * configured. Legacy controller core FW may silently ignore
16873 	 * the db_page_size programming request through this command.
16874 	 */
16875 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_DB_PAGE_SIZE		UINT32_C(0x2)
16876 	/*
16877 	 * This bit must be '1' for the num_quic_tx_key_ctxs field to be
16878 	 * configured.
16879 	 */
16880 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_QUIC_TX_KEY_CTXS	UINT32_C(0x4)
16881 	/*
16882 	 * This bit must be '1' for the num_quic_rx_key_ctxs field to be
16883 	 * configured.
16884 	 */
16885 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_QUIC_RX_KEY_CTXS	UINT32_C(0x8)
16886 	/*
16887 	 * This bit must be '1' for the roce_max_av_per_vf field to be
16888 	 * configured.
16889 	 */
16890 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_AV_PER_VF	UINT32_C(0x10)
16891 	/*
16892 	 * This bit must be '1' for the roce_max_cq_per_vf field to be
16893 	 * configured. Only valid for PF.
16894 	 */
16895 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_CQ_PER_VF	UINT32_C(0x20)
16896 	/*
16897 	 * This bit must be '1' for the roce_max_mrw_per_vf field to be
16898 	 * configured. Only valid for PF.
16899 	 */
16900 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_MRW_PER_VF	UINT32_C(0x40)
16901 	/*
16902 	 * This bit must be '1' for the roce_max_qp_per_vf field to be
16903 	 * configured.
16904 	 */
16905 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_QP_PER_VF	UINT32_C(0x80)
16906 	/*
16907 	 * This bit must be '1' for the roce_max_srq_per_vf field to be
16908 	 * configured. Only valid for PF.
16909 	 */
16910 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_SRQ_PER_VF	UINT32_C(0x100)
16911 	/*
16912 	 * This bit must be '1' for the roce_max_gid_per_vf field to be
16913 	 * configured. Only valid for PF.
16914 	 */
16915 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_GID_PER_VF	UINT32_C(0x200)
16916 	/*
16917 	 * This bit must be '1' for the xid_partition_cfg field to be
16918 	 * configured. Only valid for PF.
16919 	 */
16920 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_XID_PARTITION_CFG	UINT32_C(0x400)
16921 	/*
16922 	 * KDNet mode for the port for this function. If NPAR is
16923 	 * also configured on this port, it takes precedence. KDNet
16924 	 * mode is ignored for a VF.
16925 	 */
16926 	uint8_t	port_kdnet_mode;
16927 	/* KDNet mode is not enabled. */
16928 	#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_DISABLED UINT32_C(0x0)
16929 	/* KDNet mode enabled. */
16930 	#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_ENABLED  UINT32_C(0x1)
16931 	#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_LAST	HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_ENABLED
16932 	/*
16933 	 * This field can be used by the PF driver to configure the doorbell
16934 	 * page size. L2 driver can use different pages to ring the doorbell
16935 	 * for L2 push operation. The doorbell page size should be configured
16936 	 * to match the native CPU page size for proper RoCE and L2 doorbell
16937 	 * operations. This value supersedes the older method of configuring
16938 	 * the doorbell page size by the RoCE driver using the command queue
16939 	 * method. The default is 4K.
16940 	 */
16941 	uint8_t	db_page_size;
16942 	/* DB page size is 4KB. */
16943 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4KB   UINT32_C(0x0)
16944 	/* DB page size is 8KB. */
16945 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_8KB   UINT32_C(0x1)
16946 	/* DB page size is 16KB. */
16947 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_16KB  UINT32_C(0x2)
16948 	/* DB page size is 32KB. */
16949 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_32KB  UINT32_C(0x3)
16950 	/* DB page size is 64KB. */
16951 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_64KB  UINT32_C(0x4)
16952 	/* DB page size is 128KB. */
16953 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_128KB UINT32_C(0x5)
16954 	/* DB page size is 256KB. */
16955 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_256KB UINT32_C(0x6)
16956 	/* DB page size is 512KB. */
16957 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_512KB UINT32_C(0x7)
16958 	/* DB page size is 1MB. */
16959 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_1MB   UINT32_C(0x8)
16960 	/* DB page size is 2MB. */
16961 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_2MB   UINT32_C(0x9)
16962 	/* DB page size is 4MB. */
16963 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4MB   UINT32_C(0xa)
16964 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_LAST HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4MB
16965 	uint8_t	unused_1[2];
16966 	/* Number of KTLS Tx Key Contexts requested. */
16967 	uint32_t	num_ktls_tx_key_ctxs;
16968 	/* Number of KTLS Rx Key Contexts requested. */
16969 	uint32_t	num_ktls_rx_key_ctxs;
16970 	/* Number of QUIC Tx Key Contexts requested. */
16971 	uint32_t	num_quic_tx_key_ctxs;
16972 	/* Number of QUIC Rx Key Contexts requested. */
16973 	uint32_t	num_quic_rx_key_ctxs;
16974 	/* Number of AVs per VF. Only valid for PF. */
16975 	uint32_t	roce_max_av_per_vf;
16976 	/* Number of CQs per VF. Only valid for PF. */
16977 	uint32_t	roce_max_cq_per_vf;
16978 	/* Number of MR/MWs per VF. Only valid for PF. */
16979 	uint32_t	roce_max_mrw_per_vf;
16980 	/* Number of QPs per VF. Only valid for PF. */
16981 	uint32_t	roce_max_qp_per_vf;
16982 	/* Number of SRQs per VF. Only valid for PF. */
16983 	uint32_t	roce_max_srq_per_vf;
16984 	/* Number of GIDs per VF. Only valid for PF. */
16985 	uint32_t	roce_max_gid_per_vf;
16986 	/*
16987 	 * Bitmap of context types that have XID partition enabled.
16988 	 * Only valid for PF.
16989 	 */
16990 	uint16_t	xid_partition_cfg;
16991 	/*
16992 	 * When this bit is '1', it indicates that driver enables XID
16993 	 * partition on Tx crypto key contexts.
16994 	 */
16995 	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_TX_CK	UINT32_C(0x1)
16996 	/*
16997 	 * When this bit is '1', it indicates that driver enables XID
16998 	 * partition on Rx crypto key contexts.
16999 	 */
17000 	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_RX_CK	UINT32_C(0x2)
17001 	uint16_t	unused_2;
17002 } hwrm_func_cfg_input_t, *phwrm_func_cfg_input_t;
17003 
17004 /* hwrm_func_cfg_output (size:128b/16B) */
17005 
17006 typedef struct hwrm_func_cfg_output {
17007 	/* The specific error status for the command. */
17008 	uint16_t	error_code;
17009 	/* The HWRM command request type. */
17010 	uint16_t	req_type;
17011 	/* The sequence ID from the original command. */
17012 	uint16_t	seq_id;
17013 	/* The length of the response data in number of bytes. */
17014 	uint16_t	resp_len;
17015 	uint8_t	unused_0[7];
17016 	/*
17017 	 * This field is used in Output records to indicate that the output
17018 	 * is completely written to RAM. This field should be read as '1'
17019 	 * to indicate that the output has been completely written. When
17020 	 * writing a command completion or response to an internal processor,
17021 	 * the order of writes has to be such that this field is written last.
17022 	 */
17023 	uint8_t	valid;
17024 } hwrm_func_cfg_output_t, *phwrm_func_cfg_output_t;
17025 
17026 /* hwrm_func_cfg_cmd_err (size:64b/8B) */
17027 
17028 typedef struct hwrm_func_cfg_cmd_err {
17029 	/* command specific error codes for the cmd_err field in hwrm_err_output */
17030 	uint8_t	code;
17031 	/* Unknown error. */
17032 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_UNKNOWN			UINT32_C(0x0)
17033 	/* The partition minimum bandwidth is out of range. */
17034 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_MIN_BW_RANGE	UINT32_C(0x1)
17035 	/* The minimum bandwidth is more than the maximum bandwidth. */
17036 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_MIN_MORE_THAN_MAX  UINT32_C(0x2)
17037 	/*
17038 	 * The NIC does not support enforcement of a minimum guaranteed
17039 	 * bandwidth for a partition.
17040 	 */
17041 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_MIN_BW_UNSUPPORTED UINT32_C(0x3)
17042 	/* Partition bandwidths must be specified as a percentage. */
17043 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_BW_PERCENT	UINT32_C(0x4)
17044 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_LAST			HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_BW_PERCENT
17045 	uint8_t	unused_0[7];
17046 } hwrm_func_cfg_cmd_err_t, *phwrm_func_cfg_cmd_err_t;
17047 
17048 /********************
17049  * hwrm_func_qstats *
17050  ********************/
17051 
17052 
17053 /* hwrm_func_qstats_input (size:192b/24B) */
17054 
17055 typedef struct hwrm_func_qstats_input {
17056 	/* The HWRM command request type. */
17057 	uint16_t	req_type;
17058 	/*
17059 	 * The completion ring to send the completion event on. This should
17060 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17061 	 */
17062 	uint16_t	cmpl_ring;
17063 	/*
17064 	 * The sequence ID is used by the driver for tracking multiple
17065 	 * commands. This ID is treated as opaque data by the firmware and
17066 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17067 	 */
17068 	uint16_t	seq_id;
17069 	/*
17070 	 * The target ID of the command:
17071 	 * * 0x0-0xFFF8 - The function ID
17072 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17073 	 * * 0xFFFD - Reserved for user-space HWRM interface
17074 	 * * 0xFFFF - HWRM
17075 	 */
17076 	uint16_t	target_id;
17077 	/*
17078 	 * A physical address pointer pointing to a host buffer that the
17079 	 * command's response data will be written. This can be either a host
17080 	 * physical address (HPA) or a guest physical address (GPA) and must
17081 	 * point to a physically contiguous block of memory.
17082 	 */
17083 	uint64_t	resp_addr;
17084 	/*
17085 	 * Function ID of the function that is being queried.
17086 	 * 0xFF... (All Fs) if the query is for the requesting
17087 	 * function.
17088 	 * A privileged PF can query for other function's statistics.
17089 	 */
17090 	uint16_t	fid;
17091 	uint8_t	flags;
17092 	/*
17093 	 * This bit should be set to 1 when request is for only RoCE
17094 	 * statistics. This will be honored only if the caller_fid is
17095 	 * a privileged PF. In all other cases FID and caller_fid should
17096 	 * be the same.
17097 	 */
17098 	#define HWRM_FUNC_QSTATS_INPUT_FLAGS_ROCE_ONLY	UINT32_C(0x1)
17099 	/*
17100 	 * This bit should be set to 1 when request is for the counter mask,
17101 	 * representing the width of each of the stats counters, rather
17102 	 * than counters themselves.
17103 	 */
17104 	#define HWRM_FUNC_QSTATS_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x2)
17105 	/*
17106 	 * This bit should be set to 1 when request is for only L2
17107 	 * statistics. This will be honored only if the caller_fid is
17108 	 * a privileged PF. In all other cases FID and caller_fid should
17109 	 * be the same.
17110 	 */
17111 	#define HWRM_FUNC_QSTATS_INPUT_FLAGS_L2_ONLY	UINT32_C(0x4)
17112 	uint8_t	unused_0[5];
17113 } hwrm_func_qstats_input_t, *phwrm_func_qstats_input_t;
17114 
17115 /* hwrm_func_qstats_output (size:1408b/176B) */
17116 
17117 typedef struct hwrm_func_qstats_output {
17118 	/* The specific error status for the command. */
17119 	uint16_t	error_code;
17120 	/* The HWRM command request type. */
17121 	uint16_t	req_type;
17122 	/* The sequence ID from the original command. */
17123 	uint16_t	seq_id;
17124 	/* The length of the response data in number of bytes. */
17125 	uint16_t	resp_len;
17126 	/* Number of transmitted unicast packets on the function. */
17127 	uint64_t	tx_ucast_pkts;
17128 	/* Number of transmitted multicast packets on the function. */
17129 	uint64_t	tx_mcast_pkts;
17130 	/* Number of transmitted broadcast packets on the function. */
17131 	uint64_t	tx_bcast_pkts;
17132 	/*
17133 	 * Number of transmitted packets that were discarded due to
17134 	 * internal NIC resource problems. For transmit, this
17135 	 * can only happen if TMP is configured to allow dropping
17136 	 * in HOL blocking conditions, which is not a normal
17137 	 * configuration.
17138 	 */
17139 	uint64_t	tx_discard_pkts;
17140 	/*
17141 	 * Number of dropped packets on transmit path on the function.
17142 	 * These are packets that have been marked for drop by
17143 	 * the TE CFA block or are packets that exceeded the
17144 	 * transmit MTU limit for the function.
17145 	 */
17146 	uint64_t	tx_drop_pkts;
17147 	/* Number of transmitted bytes for unicast traffic on the function. */
17148 	uint64_t	tx_ucast_bytes;
17149 	/* Number of transmitted bytes for multicast traffic on the function. */
17150 	uint64_t	tx_mcast_bytes;
17151 	/* Number of transmitted bytes for broadcast traffic on the function. */
17152 	uint64_t	tx_bcast_bytes;
17153 	/* Number of received unicast packets on the function. */
17154 	uint64_t	rx_ucast_pkts;
17155 	/* Number of received multicast packets on the function. */
17156 	uint64_t	rx_mcast_pkts;
17157 	/* Number of received broadcast packets on the function. */
17158 	uint64_t	rx_bcast_pkts;
17159 	/*
17160 	 * Number of received packets that were discarded on the function
17161 	 * due to resource limitations. This can happen for 3 reasons.
17162 	 * # The BD used for the packet has a bad format.
17163 	 * # There were no BDs available in the ring for the packet.
17164 	 * # There were no BDs available on-chip for the packet.
17165 	 */
17166 	uint64_t	rx_discard_pkts;
17167 	/*
17168 	 * Number of dropped packets on received path on the function.
17169 	 * These are packets that have been marked for drop by the
17170 	 * RE CFA.
17171 	 */
17172 	uint64_t	rx_drop_pkts;
17173 	/* Number of received bytes for unicast traffic on the function. */
17174 	uint64_t	rx_ucast_bytes;
17175 	/* Number of received bytes for multicast traffic on the function. */
17176 	uint64_t	rx_mcast_bytes;
17177 	/* Number of received bytes for broadcast traffic on the function. */
17178 	uint64_t	rx_bcast_bytes;
17179 	/* Number of aggregated unicast packets on the function. */
17180 	uint64_t	rx_agg_pkts;
17181 	/* Number of aggregated unicast bytes on the function. */
17182 	uint64_t	rx_agg_bytes;
17183 	/* Number of aggregation events on the function. */
17184 	uint64_t	rx_agg_events;
17185 	/* Number of aborted aggregations on the function. */
17186 	uint64_t	rx_agg_aborts;
17187 	/*
17188 	 * This field is the sequence of the statistics of a function being
17189 	 * cleared. Firmware starts the sequence from zero. It increments
17190 	 * the sequence number every time the statistics of the function
17191 	 * are cleared, which can be triggered by a clear statistics request
17192 	 * or by freeing all statistics contexts of the function. If a user
17193 	 * is interested in knowing if the statistics have been cleared
17194 	 * since the last query, it can keep track of this sequence number
17195 	 * between queries.
17196 	 */
17197 	uint8_t	clear_seq;
17198 	uint8_t	unused_0[6];
17199 	/*
17200 	 * This field is used in Output records to indicate that the output
17201 	 * is completely written to RAM. This field should be read as '1'
17202 	 * to indicate that the output has been completely written. When
17203 	 * writing a command completion or response to an internal processor,
17204 	 * the order of writes has to be such that this field is written last.
17205 	 */
17206 	uint8_t	valid;
17207 } hwrm_func_qstats_output_t, *phwrm_func_qstats_output_t;
17208 
17209 /************************
17210  * hwrm_func_qstats_ext *
17211  ************************/
17212 
17213 
17214 /* hwrm_func_qstats_ext_input (size:256b/32B) */
17215 
17216 typedef struct hwrm_func_qstats_ext_input {
17217 	/* The HWRM command request type. */
17218 	uint16_t	req_type;
17219 	/*
17220 	 * The completion ring to send the completion event on. This should
17221 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17222 	 */
17223 	uint16_t	cmpl_ring;
17224 	/*
17225 	 * The sequence ID is used by the driver for tracking multiple
17226 	 * commands. This ID is treated as opaque data by the firmware and
17227 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17228 	 */
17229 	uint16_t	seq_id;
17230 	/*
17231 	 * The target ID of the command:
17232 	 * * 0x0-0xFFF8 - The function ID
17233 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17234 	 * * 0xFFFD - Reserved for user-space HWRM interface
17235 	 * * 0xFFFF - HWRM
17236 	 */
17237 	uint16_t	target_id;
17238 	/*
17239 	 * A physical address pointer pointing to a host buffer that the
17240 	 * command's response data will be written. This can be either a host
17241 	 * physical address (HPA) or a guest physical address (GPA) and must
17242 	 * point to a physically contiguous block of memory.
17243 	 */
17244 	uint64_t	resp_addr;
17245 	/*
17246 	 * Function ID of the function that is being queried.
17247 	 * 0xFF... (All Fs) if the query is for the requesting
17248 	 * function.
17249 	 * A privileged PF can query for other function's statistics.
17250 	 */
17251 	uint16_t	fid;
17252 	uint8_t	flags;
17253 	/*
17254 	 * This bit should be set to 1 when request is for only RoCE
17255 	 * statistics. This will be honored only if the caller_fid is
17256 	 * a privileged PF. In all other cases FID and caller_fid should
17257 	 * be the same.
17258 	 */
17259 	#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_ROCE_ONLY	UINT32_C(0x1)
17260 	/*
17261 	 * This bit should be set to 1 when request is for the counter mask
17262 	 * representing the width of each of the stats counters, rather
17263 	 * than counters themselves.
17264 	 */
17265 	#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x2)
17266 	uint8_t	unused_0[1];
17267 	uint32_t	enables;
17268 	/*
17269 	 * This bit must be '1' for the schq_id and traffic_class fields to
17270 	 * be configured.
17271 	 */
17272 	#define HWRM_FUNC_QSTATS_EXT_INPUT_ENABLES_SCHQ_ID	UINT32_C(0x1)
17273 	/* Specifies the SCHQ for which to gather statistics */
17274 	uint16_t	schq_id;
17275 	/*
17276 	 * Specifies the traffic class for which to gather statistics. Valid
17277 	 * values are 0 through (max_configurable_queues - 1), where
17278 	 * max_configurable_queues is in the response of HWRM_QUEUE_QPORTCFG
17279 	 */
17280 	uint16_t	traffic_class;
17281 	uint8_t	unused_1[4];
17282 } hwrm_func_qstats_ext_input_t, *phwrm_func_qstats_ext_input_t;
17283 
17284 /* hwrm_func_qstats_ext_output (size:1536b/192B) */
17285 
17286 typedef struct hwrm_func_qstats_ext_output {
17287 	/* The specific error status for the command. */
17288 	uint16_t	error_code;
17289 	/* The HWRM command request type. */
17290 	uint16_t	req_type;
17291 	/* The sequence ID from the original command. */
17292 	uint16_t	seq_id;
17293 	/* The length of the response data in number of bytes. */
17294 	uint16_t	resp_len;
17295 	/* Number of received unicast packets */
17296 	uint64_t	rx_ucast_pkts;
17297 	/* Number of received multicast packets */
17298 	uint64_t	rx_mcast_pkts;
17299 	/* Number of received broadcast packets */
17300 	uint64_t	rx_bcast_pkts;
17301 	/* Number of discarded packets on received path */
17302 	uint64_t	rx_discard_pkts;
17303 	/* Number of packets on receive path with error */
17304 	uint64_t	rx_error_pkts;
17305 	/* Number of received bytes for unicast traffic */
17306 	uint64_t	rx_ucast_bytes;
17307 	/* Number of received bytes for multicast traffic */
17308 	uint64_t	rx_mcast_bytes;
17309 	/* Number of received bytes for broadcast traffic */
17310 	uint64_t	rx_bcast_bytes;
17311 	/* Number of transmitted unicast packets */
17312 	uint64_t	tx_ucast_pkts;
17313 	/* Number of transmitted multicast packets */
17314 	uint64_t	tx_mcast_pkts;
17315 	/* Number of transmitted broadcast packets */
17316 	uint64_t	tx_bcast_pkts;
17317 	/* Number of packets on transmit path with error */
17318 	uint64_t	tx_error_pkts;
17319 	/* Number of discarded packets on transmit path */
17320 	uint64_t	tx_discard_pkts;
17321 	/* Number of transmitted bytes for unicast traffic */
17322 	uint64_t	tx_ucast_bytes;
17323 	/* Number of transmitted bytes for multicast traffic */
17324 	uint64_t	tx_mcast_bytes;
17325 	/* Number of transmitted bytes for broadcast traffic */
17326 	uint64_t	tx_bcast_bytes;
17327 	/* Number of TPA eligible packets */
17328 	uint64_t	rx_tpa_eligible_pkt;
17329 	/* Number of TPA eligible bytes */
17330 	uint64_t	rx_tpa_eligible_bytes;
17331 	/* Number of TPA packets */
17332 	uint64_t	rx_tpa_pkt;
17333 	/* Number of TPA bytes */
17334 	uint64_t	rx_tpa_bytes;
17335 	/* Number of TPA errors */
17336 	uint64_t	rx_tpa_errors;
17337 	/* Number of TPA errors */
17338 	uint64_t	rx_tpa_events;
17339 	uint8_t	unused_0[7];
17340 	/*
17341 	 * This field is used in Output records to indicate that the output
17342 	 * is completely written to RAM. This field should be read as '1'
17343 	 * to indicate that the output has been completely written. When
17344 	 * writing a command completion or response to an internal processor,
17345 	 * the order of writes has to be such that this field is written last.
17346 	 */
17347 	uint8_t	valid;
17348 } hwrm_func_qstats_ext_output_t, *phwrm_func_qstats_ext_output_t;
17349 
17350 /***********************
17351  * hwrm_func_clr_stats *
17352  ***********************/
17353 
17354 
17355 /* hwrm_func_clr_stats_input (size:192b/24B) */
17356 
17357 typedef struct hwrm_func_clr_stats_input {
17358 	/* The HWRM command request type. */
17359 	uint16_t	req_type;
17360 	/*
17361 	 * The completion ring to send the completion event on. This should
17362 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17363 	 */
17364 	uint16_t	cmpl_ring;
17365 	/*
17366 	 * The sequence ID is used by the driver for tracking multiple
17367 	 * commands. This ID is treated as opaque data by the firmware and
17368 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17369 	 */
17370 	uint16_t	seq_id;
17371 	/*
17372 	 * The target ID of the command:
17373 	 * * 0x0-0xFFF8 - The function ID
17374 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17375 	 * * 0xFFFD - Reserved for user-space HWRM interface
17376 	 * * 0xFFFF - HWRM
17377 	 */
17378 	uint16_t	target_id;
17379 	/*
17380 	 * A physical address pointer pointing to a host buffer that the
17381 	 * command's response data will be written. This can be either a host
17382 	 * physical address (HPA) or a guest physical address (GPA) and must
17383 	 * point to a physically contiguous block of memory.
17384 	 */
17385 	uint64_t	resp_addr;
17386 	/*
17387 	 * Function ID of the function.
17388 	 * 0xFF... (All Fs) if the query is for the requesting
17389 	 * function.
17390 	 */
17391 	uint16_t	fid;
17392 	uint8_t	unused_0[6];
17393 } hwrm_func_clr_stats_input_t, *phwrm_func_clr_stats_input_t;
17394 
17395 /* hwrm_func_clr_stats_output (size:128b/16B) */
17396 
17397 typedef struct hwrm_func_clr_stats_output {
17398 	/* The specific error status for the command. */
17399 	uint16_t	error_code;
17400 	/* The HWRM command request type. */
17401 	uint16_t	req_type;
17402 	/* The sequence ID from the original command. */
17403 	uint16_t	seq_id;
17404 	/* The length of the response data in number of bytes. */
17405 	uint16_t	resp_len;
17406 	uint8_t	unused_0[7];
17407 	/*
17408 	 * This field is used in Output records to indicate that the output
17409 	 * is completely written to RAM. This field should be read as '1'
17410 	 * to indicate that the output has been completely written. When
17411 	 * writing a command completion or response to an internal processor,
17412 	 * the order of writes has to be such that this field is written last.
17413 	 */
17414 	uint8_t	valid;
17415 } hwrm_func_clr_stats_output_t, *phwrm_func_clr_stats_output_t;
17416 
17417 /**************************
17418  * hwrm_func_vf_resc_free *
17419  **************************/
17420 
17421 
17422 /* hwrm_func_vf_resc_free_input (size:192b/24B) */
17423 
17424 typedef struct hwrm_func_vf_resc_free_input {
17425 	/* The HWRM command request type. */
17426 	uint16_t	req_type;
17427 	/*
17428 	 * The completion ring to send the completion event on. This should
17429 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17430 	 */
17431 	uint16_t	cmpl_ring;
17432 	/*
17433 	 * The sequence ID is used by the driver for tracking multiple
17434 	 * commands. This ID is treated as opaque data by the firmware and
17435 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17436 	 */
17437 	uint16_t	seq_id;
17438 	/*
17439 	 * The target ID of the command:
17440 	 * * 0x0-0xFFF8 - The function ID
17441 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17442 	 * * 0xFFFD - Reserved for user-space HWRM interface
17443 	 * * 0xFFFF - HWRM
17444 	 */
17445 	uint16_t	target_id;
17446 	/*
17447 	 * A physical address pointer pointing to a host buffer that the
17448 	 * command's response data will be written. This can be either a host
17449 	 * physical address (HPA) or a guest physical address (GPA) and must
17450 	 * point to a physically contiguous block of memory.
17451 	 */
17452 	uint64_t	resp_addr;
17453 	/*
17454 	 * This value is used to identify a Virtual Function (VF).
17455 	 * The scope of VF ID is local within a PF.
17456 	 */
17457 	uint16_t	vf_id;
17458 	uint8_t	unused_0[6];
17459 } hwrm_func_vf_resc_free_input_t, *phwrm_func_vf_resc_free_input_t;
17460 
17461 /* hwrm_func_vf_resc_free_output (size:128b/16B) */
17462 
17463 typedef struct hwrm_func_vf_resc_free_output {
17464 	/* The specific error status for the command. */
17465 	uint16_t	error_code;
17466 	/* The HWRM command request type. */
17467 	uint16_t	req_type;
17468 	/* The sequence ID from the original command. */
17469 	uint16_t	seq_id;
17470 	/* The length of the response data in number of bytes. */
17471 	uint16_t	resp_len;
17472 	uint8_t	unused_0[7];
17473 	/*
17474 	 * This field is used in Output records to indicate that the output
17475 	 * is completely written to RAM. This field should be read as '1'
17476 	 * to indicate that the output has been completely written. When
17477 	 * writing a command completion or response to an internal processor,
17478 	 * the order of writes has to be such that this field is written last.
17479 	 */
17480 	uint8_t	valid;
17481 } hwrm_func_vf_resc_free_output_t, *phwrm_func_vf_resc_free_output_t;
17482 
17483 /**********************
17484  * hwrm_func_drv_rgtr *
17485  **********************/
17486 
17487 
17488 /* hwrm_func_drv_rgtr_input (size:896b/112B) */
17489 
17490 typedef struct hwrm_func_drv_rgtr_input {
17491 	/* The HWRM command request type. */
17492 	uint16_t	req_type;
17493 	/*
17494 	 * The completion ring to send the completion event on. This should
17495 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17496 	 */
17497 	uint16_t	cmpl_ring;
17498 	/*
17499 	 * The sequence ID is used by the driver for tracking multiple
17500 	 * commands. This ID is treated as opaque data by the firmware and
17501 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17502 	 */
17503 	uint16_t	seq_id;
17504 	/*
17505 	 * The target ID of the command:
17506 	 * * 0x0-0xFFF8 - The function ID
17507 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17508 	 * * 0xFFFD - Reserved for user-space HWRM interface
17509 	 * * 0xFFFF - HWRM
17510 	 */
17511 	uint16_t	target_id;
17512 	/*
17513 	 * A physical address pointer pointing to a host buffer that the
17514 	 * command's response data will be written. This can be either a host
17515 	 * physical address (HPA) or a guest physical address (GPA) and must
17516 	 * point to a physically contiguous block of memory.
17517 	 */
17518 	uint64_t	resp_addr;
17519 	uint32_t	flags;
17520 	/*
17521 	 * When this bit is '1', the function driver is requesting
17522 	 * all requests from its children VF drivers to be
17523 	 * forwarded to itself.
17524 	 * This flag can only be set by the PF driver.
17525 	 * If a VF driver sets this flag, it should be ignored
17526 	 * by the HWRM.
17527 	 */
17528 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FWD_ALL_MODE			UINT32_C(0x1)
17529 	/*
17530 	 * When this bit is '1', the function is requesting none of
17531 	 * the requests from its children VF drivers to be
17532 	 * forwarded to itself.
17533 	 * This flag can only be set by the PF driver.
17534 	 * If a VF driver sets this flag, it should be ignored
17535 	 * by the HWRM.
17536 	 */
17537 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FWD_NONE_MODE			UINT32_C(0x2)
17538 	/*
17539 	 * When this bit is '1', then ver_maj_8b, ver_min_8b, ver_upd_8b
17540 	 * fields shall be ignored and ver_maj, ver_min, ver_upd
17541 	 * and ver_patch shall be used for the driver version information.
17542 	 * When this bit is '0', then ver_maj_8b, ver_min_8b, ver_upd_8b
17543 	 * fields shall be used for the driver version information and
17544 	 * ver_maj, ver_min, ver_upd and ver_patch shall be ignored.
17545 	 */
17546 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_16BIT_VER_MODE		UINT32_C(0x4)
17547 	/*
17548 	 * When this bit is '1', the function is indicating support of
17549 	 * 64bit flow handle. The firmware that only supports 64bit flow
17550 	 * handle should check this bit before allowing processing of
17551 	 * HWRM_CFA_FLOW_XXX commands from the requesting function as
17552 	 * firmware with 64bit flow handle support can only be compatible
17553 	 * with drivers that support 64bit flow handle. The legacy drivers
17554 	 * that don't support 64bit flow handle won't be able to use
17555 	 * HWRM_CFA_FLOW_XXX commands when running with new firmware that
17556 	 * only supports 64bit flow handle. The new firmware support 64bit
17557 	 * flow handle returns HWRM_ERR_CODE_CMD_NOT_SUPPORTED
17558 	 * status to the legacy driver when encounters these commands.
17559 	 */
17560 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FLOW_HANDLE_64BIT_MODE	UINT32_C(0x8)
17561 	/*
17562 	 * When this bit is '1', the function is indicating support of
17563 	 * Hot Reset. The driver interface will destroy the resources,
17564 	 * unregister the function and register again up on receiving
17565 	 * the RESET_NOTIFY Async notification from the core firmware.
17566 	 * The core firmware will this use flag and trigger the Hot Reset
17567 	 * process only if all the registered driver instances are capable
17568 	 * of this support.
17569 	 */
17570 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT		UINT32_C(0x10)
17571 	/*
17572 	 * When this bit is 1, the function is indicating the support of the
17573 	 * error recovery capability. Error recovery support will be used by
17574 	 * firmware only if all the driver instances support error recovery
17575 	 * process. By setting this bit, driver is indicating support for
17576 	 * corresponding async event completion message. These will be
17577 	 * delivered to the driver even if they did not register for it.
17578 	 * If supported, after receiving reset notify async event with fatal
17579 	 * flag set in event data1, then all the drivers have to tear down
17580 	 * their resources without sending any HWRM commands to FW.
17581 	 */
17582 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ERROR_RECOVERY_SUPPORT	UINT32_C(0x20)
17583 	/*
17584 	 * When this bit is 1, the function is indicating the support of the
17585 	 * Master capability. The Firmware will use this capability to select
17586 	 * the Master function. The master function will be used to initiate
17587 	 * designated functionality like error recovery etc. If none of the
17588 	 * registered PF's or trusted VF's indicate this support, then
17589 	 * firmware will select the 1st registered PF as Master capable
17590 	 * instance.
17591 	 */
17592 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_MASTER_SUPPORT		UINT32_C(0x40)
17593 	/*
17594 	 * When this bit is 1, the function is indicating the support of the
17595 	 * fast reset capability. Fast reset support will be used by
17596 	 * firmware only if all the driver instances support fast reset
17597 	 * process. By setting this bit, driver is indicating support for
17598 	 * corresponding async event completion message. These will be
17599 	 * delivered to the driver even if they did not register for it.
17600 	 * If supported, after receiving reset notify async event with fast
17601 	 * reset flag set in event data1, then all the drivers have to tear
17602 	 * down their resources without sending any HWRM commands to FW.
17603 	 */
17604 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FAST_RESET_SUPPORT		UINT32_C(0x80)
17605 	/*
17606 	 * When this bit is 1, the function's driver is indicating the
17607 	 * support of handling the vnic_rss_cfg's INVALID_PARAM error
17608 	 * returned by firmware. Firmware returns error, if host driver
17609 	 * configures the invalid hash_types bit combination for a given
17610 	 * IP version.
17611 	 */
17612 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_RSS_STRICT_HASH_TYPE_SUPPORT	UINT32_C(0x100)
17613 	/*
17614 	 * When this bit is 1, the function's driver is indicating the
17615 	 * support of handling the NPAR 1.2 feature where the s-tag may be
17616 	 * a value other than 0x8100 or 0x88a8.
17617 	 */
17618 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_NPAR_1_2_SUPPORT		UINT32_C(0x200)
17619 	/*
17620 	 * When this bit is 1, the function's driver is indicating the
17621 	 * support for asymmetric queue configuration, such that queue
17622 	 * ids and service profiles on TX side are not the same as the
17623 	 * corresponding queue configuration on the RX side
17624 	 */
17625 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ASYM_QUEUE_CFG_SUPPORT	UINT32_C(0x400)
17626 	/*
17627 	 * When this bit is 1, the function's driver is indicating to the
17628 	 * firmware that the Ingress NIC flows will be programmed by the
17629 	 * TruFlow application and the firmware flow manager should reject
17630 	 * flow-create commands that programs ingress lookup flows for this
17631 	 * function.
17632 	 */
17633 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_TF_INGRESS_NIC_FLOW_MODE	UINT32_C(0x800)
17634 	uint32_t	enables;
17635 	/*
17636 	 * This bit must be '1' for the os_type field to be
17637 	 * configured.
17638 	 */
17639 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_OS_TYPE		UINT32_C(0x1)
17640 	/*
17641 	 * This bit must be '1' for the ver field to be
17642 	 * configured.
17643 	 */
17644 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER		UINT32_C(0x2)
17645 	/*
17646 	 * This bit must be '1' for the timestamp field to be
17647 	 * configured.
17648 	 */
17649 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_TIMESTAMP	UINT32_C(0x4)
17650 	/*
17651 	 * This bit must be '1' for the vf_req_fwd field to be
17652 	 * configured.
17653 	 */
17654 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VF_REQ_FWD	UINT32_C(0x8)
17655 	/*
17656 	 * This bit must be '1' for the async_event_fwd field to be
17657 	 * configured.
17658 	 */
17659 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_ASYNC_EVENT_FWD	UINT32_C(0x10)
17660 	/*
17661 	 * This value indicates the type of OS. The values are based on
17662 	 * CIM_OperatingSystem.mof file as published by the DMTF.
17663 	 */
17664 	uint16_t	os_type;
17665 	/* Unknown */
17666 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_UNKNOWN   UINT32_C(0x0)
17667 	/* Other OS not listed below. */
17668 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_OTHER	UINT32_C(0x1)
17669 	/* MSDOS OS. */
17670 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_MSDOS	UINT32_C(0xe)
17671 	/* Windows OS. */
17672 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WINDOWS   UINT32_C(0x12)
17673 	/* Solaris OS. */
17674 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_SOLARIS   UINT32_C(0x1d)
17675 	/* Linux OS. */
17676 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_LINUX	UINT32_C(0x24)
17677 	/* FreeBSD OS. */
17678 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_FREEBSD   UINT32_C(0x2a)
17679 	/* VMware ESXi OS. */
17680 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_ESXI	UINT32_C(0x68)
17681 	/* Microsoft Windows 8 64-bit OS. */
17682 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WIN864	UINT32_C(0x73)
17683 	/* Microsoft Windows Server 2012 R2 OS. */
17684 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WIN2012R2 UINT32_C(0x74)
17685 	/* UEFI driver. */
17686 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_UEFI	UINT32_C(0x8000)
17687 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_LAST	HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_UEFI
17688 	/* This is the 8bit major version of the driver. */
17689 	uint8_t	ver_maj_8b;
17690 	/* This is the 8bit minor version of the driver. */
17691 	uint8_t	ver_min_8b;
17692 	/* This is the 8bit update version of the driver. */
17693 	uint8_t	ver_upd_8b;
17694 	uint8_t	unused_0[3];
17695 	/*
17696 	 * This is a 32-bit timestamp provided by the driver for
17697 	 * keep alive.
17698 	 * The timestamp is in multiples of 1ms.
17699 	 */
17700 	uint32_t	timestamp;
17701 	uint8_t	unused_1[4];
17702 	/*
17703 	 * This is a 256-bit bit mask provided by the PF driver for
17704 	 * letting the HWRM know what commands issued by the VF driver
17705 	 * to the HWRM should be forwarded to the PF driver.
17706 	 * Nth bit refers to the Nth req_type.
17707 	 *
17708 	 * Setting Nth bit to 1 indicates that requests from the
17709 	 * VF driver with req_type equal to N shall be forwarded to
17710 	 * the parent PF driver.
17711 	 *
17712 	 * This field is not valid for the VF driver.
17713 	 */
17714 	uint32_t	vf_req_fwd[8];
17715 	/*
17716 	 * This is a 256-bit bit mask provided by the function driver
17717 	 * (PF or VF driver) to indicate the list of asynchronous event
17718 	 * completions to be forwarded.
17719 	 *
17720 	 * Nth bit refers to the Nth event_id.
17721 	 *
17722 	 * Setting Nth bit to 1 by the function driver shall result in
17723 	 * the HWRM forwarding asynchronous event completion with
17724 	 * event_id equal to N.
17725 	 *
17726 	 * If all bits are set to 0 (value of 0), then the HWRM shall
17727 	 * not forward any asynchronous event completion to this
17728 	 * function driver.
17729 	 */
17730 	uint32_t	async_event_fwd[8];
17731 	/* This is the 16bit major version of the driver. */
17732 	uint16_t	ver_maj;
17733 	/* This is the 16bit minor version of the driver. */
17734 	uint16_t	ver_min;
17735 	/* This is the 16bit update version of the driver. */
17736 	uint16_t	ver_upd;
17737 	/* This is the 16bit patch version of the driver. */
17738 	uint16_t	ver_patch;
17739 } hwrm_func_drv_rgtr_input_t, *phwrm_func_drv_rgtr_input_t;
17740 
17741 /* hwrm_func_drv_rgtr_output (size:128b/16B) */
17742 
17743 typedef struct hwrm_func_drv_rgtr_output {
17744 	/* The specific error status for the command. */
17745 	uint16_t	error_code;
17746 	/* The HWRM command request type. */
17747 	uint16_t	req_type;
17748 	/* The sequence ID from the original command. */
17749 	uint16_t	seq_id;
17750 	/* The length of the response data in number of bytes. */
17751 	uint16_t	resp_len;
17752 	uint32_t	flags;
17753 	/*
17754 	 * When this bit is '1', it indicates that the
17755 	 * HWRM_FUNC_DRV_IF_CHANGE call is supported.
17756 	 */
17757 	#define HWRM_FUNC_DRV_RGTR_OUTPUT_FLAGS_IF_CHANGE_SUPPORTED	UINT32_C(0x1)
17758 	uint8_t	unused_0[3];
17759 	/*
17760 	 * This field is used in Output records to indicate that the output
17761 	 * is completely written to RAM. This field should be read as '1'
17762 	 * to indicate that the output has been completely written. When
17763 	 * writing a command completion or response to an internal processor,
17764 	 * the order of writes has to be such that this field is written last.
17765 	 */
17766 	uint8_t	valid;
17767 } hwrm_func_drv_rgtr_output_t, *phwrm_func_drv_rgtr_output_t;
17768 
17769 /************************
17770  * hwrm_func_drv_unrgtr *
17771  ************************/
17772 
17773 
17774 /* hwrm_func_drv_unrgtr_input (size:192b/24B) */
17775 
17776 typedef struct hwrm_func_drv_unrgtr_input {
17777 	/* The HWRM command request type. */
17778 	uint16_t	req_type;
17779 	/*
17780 	 * The completion ring to send the completion event on. This should
17781 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17782 	 */
17783 	uint16_t	cmpl_ring;
17784 	/*
17785 	 * The sequence ID is used by the driver for tracking multiple
17786 	 * commands. This ID is treated as opaque data by the firmware and
17787 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17788 	 */
17789 	uint16_t	seq_id;
17790 	/*
17791 	 * The target ID of the command:
17792 	 * * 0x0-0xFFF8 - The function ID
17793 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17794 	 * * 0xFFFD - Reserved for user-space HWRM interface
17795 	 * * 0xFFFF - HWRM
17796 	 */
17797 	uint16_t	target_id;
17798 	/*
17799 	 * A physical address pointer pointing to a host buffer that the
17800 	 * command's response data will be written. This can be either a host
17801 	 * physical address (HPA) or a guest physical address (GPA) and must
17802 	 * point to a physically contiguous block of memory.
17803 	 */
17804 	uint64_t	resp_addr;
17805 	uint32_t	flags;
17806 	/*
17807 	 * When this bit is '1', the function driver is notifying
17808 	 * the HWRM to prepare for the shutdown.
17809 	 */
17810 	#define HWRM_FUNC_DRV_UNRGTR_INPUT_FLAGS_PREPARE_FOR_SHUTDOWN	UINT32_C(0x1)
17811 	uint8_t	unused_0[4];
17812 } hwrm_func_drv_unrgtr_input_t, *phwrm_func_drv_unrgtr_input_t;
17813 
17814 /* hwrm_func_drv_unrgtr_output (size:128b/16B) */
17815 
17816 typedef struct hwrm_func_drv_unrgtr_output {
17817 	/* The specific error status for the command. */
17818 	uint16_t	error_code;
17819 	/* The HWRM command request type. */
17820 	uint16_t	req_type;
17821 	/* The sequence ID from the original command. */
17822 	uint16_t	seq_id;
17823 	/* The length of the response data in number of bytes. */
17824 	uint16_t	resp_len;
17825 	uint8_t	unused_0[7];
17826 	/*
17827 	 * This field is used in Output records to indicate that the output
17828 	 * is completely written to RAM. This field should be read as '1'
17829 	 * to indicate that the output has been completely written. When
17830 	 * writing a command completion or response to an internal processor,
17831 	 * the order of writes has to be such that this field is written last.
17832 	 */
17833 	uint8_t	valid;
17834 } hwrm_func_drv_unrgtr_output_t, *phwrm_func_drv_unrgtr_output_t;
17835 
17836 /**********************
17837  * hwrm_func_buf_rgtr *
17838  **********************/
17839 
17840 
17841 /* hwrm_func_buf_rgtr_input (size:1024b/128B) */
17842 
17843 typedef struct hwrm_func_buf_rgtr_input {
17844 	/* The HWRM command request type. */
17845 	uint16_t	req_type;
17846 	/*
17847 	 * The completion ring to send the completion event on. This should
17848 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17849 	 */
17850 	uint16_t	cmpl_ring;
17851 	/*
17852 	 * The sequence ID is used by the driver for tracking multiple
17853 	 * commands. This ID is treated as opaque data by the firmware and
17854 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17855 	 */
17856 	uint16_t	seq_id;
17857 	/*
17858 	 * The target ID of the command:
17859 	 * * 0x0-0xFFF8 - The function ID
17860 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17861 	 * * 0xFFFD - Reserved for user-space HWRM interface
17862 	 * * 0xFFFF - HWRM
17863 	 */
17864 	uint16_t	target_id;
17865 	/*
17866 	 * A physical address pointer pointing to a host buffer that the
17867 	 * command's response data will be written. This can be either a host
17868 	 * physical address (HPA) or a guest physical address (GPA) and must
17869 	 * point to a physically contiguous block of memory.
17870 	 */
17871 	uint64_t	resp_addr;
17872 	uint32_t	enables;
17873 	/*
17874 	 * This bit must be '1' for the vf_id field to be
17875 	 * configured.
17876 	 */
17877 	#define HWRM_FUNC_BUF_RGTR_INPUT_ENABLES_VF_ID		UINT32_C(0x1)
17878 	/*
17879 	 * This bit must be '1' for the err_buf_addr field to be
17880 	 * configured.
17881 	 */
17882 	#define HWRM_FUNC_BUF_RGTR_INPUT_ENABLES_ERR_BUF_ADDR	UINT32_C(0x2)
17883 	/*
17884 	 * This value is used to identify a Virtual Function (VF).
17885 	 * The scope of VF ID is local within a PF.
17886 	 */
17887 	uint16_t	vf_id;
17888 	/*
17889 	 * This field represents the number of pages used for request
17890 	 * buffer(s).
17891 	 */
17892 	uint16_t	req_buf_num_pages;
17893 	/*
17894 	 * This field represents the page size used for request
17895 	 * buffer(s).
17896 	 */
17897 	uint16_t	req_buf_page_size;
17898 	/* 16 bytes */
17899 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_16B UINT32_C(0x4)
17900 	/* 4 Kbytes */
17901 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_4K  UINT32_C(0xc)
17902 	/* 8 Kbytes */
17903 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_8K  UINT32_C(0xd)
17904 	/* 64 Kbytes */
17905 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_64K UINT32_C(0x10)
17906 	/* 2 Mbytes */
17907 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_2M  UINT32_C(0x15)
17908 	/* 4 Mbytes */
17909 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_4M  UINT32_C(0x16)
17910 	/* 1 Gbytes */
17911 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_1G  UINT32_C(0x1e)
17912 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_LAST HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_1G
17913 	/* The length of the request buffer per VF in bytes. */
17914 	uint16_t	req_buf_len;
17915 	/* The length of the response buffer in bytes. */
17916 	uint16_t	resp_buf_len;
17917 	uint8_t	unused_0[2];
17918 	/* This field represents the page address of page #0. */
17919 	uint64_t	req_buf_page_addr0;
17920 	/* This field represents the page address of page #1. */
17921 	uint64_t	req_buf_page_addr1;
17922 	/* This field represents the page address of page #2. */
17923 	uint64_t	req_buf_page_addr2;
17924 	/* This field represents the page address of page #3. */
17925 	uint64_t	req_buf_page_addr3;
17926 	/* This field represents the page address of page #4. */
17927 	uint64_t	req_buf_page_addr4;
17928 	/* This field represents the page address of page #5. */
17929 	uint64_t	req_buf_page_addr5;
17930 	/* This field represents the page address of page #6. */
17931 	uint64_t	req_buf_page_addr6;
17932 	/* This field represents the page address of page #7. */
17933 	uint64_t	req_buf_page_addr7;
17934 	/* This field represents the page address of page #8. */
17935 	uint64_t	req_buf_page_addr8;
17936 	/* This field represents the page address of page #9. */
17937 	uint64_t	req_buf_page_addr9;
17938 	/*
17939 	 * This field is used to receive the error reporting from
17940 	 * the chipset. Only applicable for PFs.
17941 	 */
17942 	uint64_t	error_buf_addr;
17943 	/*
17944 	 * This field is used to receive the response forwarded by the
17945 	 * HWRM.
17946 	 */
17947 	uint64_t	resp_buf_addr;
17948 } hwrm_func_buf_rgtr_input_t, *phwrm_func_buf_rgtr_input_t;
17949 
17950 /* hwrm_func_buf_rgtr_output (size:128b/16B) */
17951 
17952 typedef struct hwrm_func_buf_rgtr_output {
17953 	/* The specific error status for the command. */
17954 	uint16_t	error_code;
17955 	/* The HWRM command request type. */
17956 	uint16_t	req_type;
17957 	/* The sequence ID from the original command. */
17958 	uint16_t	seq_id;
17959 	/* The length of the response data in number of bytes. */
17960 	uint16_t	resp_len;
17961 	uint8_t	unused_0[7];
17962 	/*
17963 	 * This field is used in Output records to indicate that the output
17964 	 * is completely written to RAM. This field should be read as '1'
17965 	 * to indicate that the output has been completely written. When
17966 	 * writing a command completion or response to an internal processor,
17967 	 * the order of writes has to be such that this field is written last.
17968 	 */
17969 	uint8_t	valid;
17970 } hwrm_func_buf_rgtr_output_t, *phwrm_func_buf_rgtr_output_t;
17971 
17972 /************************
17973  * hwrm_func_buf_unrgtr *
17974  ************************/
17975 
17976 
17977 /* hwrm_func_buf_unrgtr_input (size:192b/24B) */
17978 
17979 typedef struct hwrm_func_buf_unrgtr_input {
17980 	/* The HWRM command request type. */
17981 	uint16_t	req_type;
17982 	/*
17983 	 * The completion ring to send the completion event on. This should
17984 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17985 	 */
17986 	uint16_t	cmpl_ring;
17987 	/*
17988 	 * The sequence ID is used by the driver for tracking multiple
17989 	 * commands. This ID is treated as opaque data by the firmware and
17990 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17991 	 */
17992 	uint16_t	seq_id;
17993 	/*
17994 	 * The target ID of the command:
17995 	 * * 0x0-0xFFF8 - The function ID
17996 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17997 	 * * 0xFFFD - Reserved for user-space HWRM interface
17998 	 * * 0xFFFF - HWRM
17999 	 */
18000 	uint16_t	target_id;
18001 	/*
18002 	 * A physical address pointer pointing to a host buffer that the
18003 	 * command's response data will be written. This can be either a host
18004 	 * physical address (HPA) or a guest physical address (GPA) and must
18005 	 * point to a physically contiguous block of memory.
18006 	 */
18007 	uint64_t	resp_addr;
18008 	uint32_t	enables;
18009 	/*
18010 	 * This bit must be '1' for the vf_id field to be
18011 	 * configured.
18012 	 */
18013 	#define HWRM_FUNC_BUF_UNRGTR_INPUT_ENABLES_VF_ID	UINT32_C(0x1)
18014 	/*
18015 	 * This value is used to identify a Virtual Function (VF).
18016 	 * The scope of VF ID is local within a PF.
18017 	 */
18018 	uint16_t	vf_id;
18019 	uint8_t	unused_0[2];
18020 } hwrm_func_buf_unrgtr_input_t, *phwrm_func_buf_unrgtr_input_t;
18021 
18022 /* hwrm_func_buf_unrgtr_output (size:128b/16B) */
18023 
18024 typedef struct hwrm_func_buf_unrgtr_output {
18025 	/* The specific error status for the command. */
18026 	uint16_t	error_code;
18027 	/* The HWRM command request type. */
18028 	uint16_t	req_type;
18029 	/* The sequence ID from the original command. */
18030 	uint16_t	seq_id;
18031 	/* The length of the response data in number of bytes. */
18032 	uint16_t	resp_len;
18033 	uint8_t	unused_0[7];
18034 	/*
18035 	 * This field is used in Output records to indicate that the output
18036 	 * is completely written to RAM. This field should be read as '1'
18037 	 * to indicate that the output has been completely written. When
18038 	 * writing a command completion or response to an internal processor,
18039 	 * the order of writes has to be such that this field is written last.
18040 	 */
18041 	uint8_t	valid;
18042 } hwrm_func_buf_unrgtr_output_t, *phwrm_func_buf_unrgtr_output_t;
18043 
18044 /**********************
18045  * hwrm_func_drv_qver *
18046  **********************/
18047 
18048 
18049 /* hwrm_func_drv_qver_input (size:192b/24B) */
18050 
18051 typedef struct hwrm_func_drv_qver_input {
18052 	/* The HWRM command request type. */
18053 	uint16_t	req_type;
18054 	/*
18055 	 * The completion ring to send the completion event on. This should
18056 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18057 	 */
18058 	uint16_t	cmpl_ring;
18059 	/*
18060 	 * The sequence ID is used by the driver for tracking multiple
18061 	 * commands. This ID is treated as opaque data by the firmware and
18062 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18063 	 */
18064 	uint16_t	seq_id;
18065 	/*
18066 	 * The target ID of the command:
18067 	 * * 0x0-0xFFF8 - The function ID
18068 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18069 	 * * 0xFFFD - Reserved for user-space HWRM interface
18070 	 * * 0xFFFF - HWRM
18071 	 */
18072 	uint16_t	target_id;
18073 	/*
18074 	 * A physical address pointer pointing to a host buffer that the
18075 	 * command's response data will be written. This can be either a host
18076 	 * physical address (HPA) or a guest physical address (GPA) and must
18077 	 * point to a physically contiguous block of memory.
18078 	 */
18079 	uint64_t	resp_addr;
18080 	/* Reserved for future use. */
18081 	uint32_t	reserved;
18082 	/*
18083 	 * Function ID of the function that is being queried.
18084 	 * 0xFF... (All Fs) if the query is for the requesting
18085 	 * function.
18086 	 */
18087 	uint16_t	fid;
18088 	/*
18089 	 * This field is used to indicate the driver type.
18090 	 * L2 or RoCE
18091 	 */
18092 	uint8_t	driver_type;
18093 	/* L2 driver version */
18094 	#define HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_L2   UINT32_C(0x0)
18095 	/* RoCE driver version */
18096 	#define HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_ROCE UINT32_C(0x1)
18097 	#define HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_LAST HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_ROCE
18098 	uint8_t	unused_0;
18099 } hwrm_func_drv_qver_input_t, *phwrm_func_drv_qver_input_t;
18100 
18101 /* hwrm_func_drv_qver_output (size:256b/32B) */
18102 
18103 typedef struct hwrm_func_drv_qver_output {
18104 	/* The specific error status for the command. */
18105 	uint16_t	error_code;
18106 	/* The HWRM command request type. */
18107 	uint16_t	req_type;
18108 	/* The sequence ID from the original command. */
18109 	uint16_t	seq_id;
18110 	/* The length of the response data in number of bytes. */
18111 	uint16_t	resp_len;
18112 	/*
18113 	 * This value indicates the type of OS. The values are based on
18114 	 * CIM_OperatingSystem.mof file as published by the DMTF.
18115 	 */
18116 	uint16_t	os_type;
18117 	/* Unknown */
18118 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_UNKNOWN   UINT32_C(0x0)
18119 	/* Other OS not listed below. */
18120 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_OTHER	UINT32_C(0x1)
18121 	/* MSDOS OS. */
18122 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_MSDOS	UINT32_C(0xe)
18123 	/* Windows OS. */
18124 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WINDOWS   UINT32_C(0x12)
18125 	/* Solaris OS. */
18126 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_SOLARIS   UINT32_C(0x1d)
18127 	/* Linux OS. */
18128 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_LINUX	UINT32_C(0x24)
18129 	/* FreeBSD OS. */
18130 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_FREEBSD   UINT32_C(0x2a)
18131 	/* VMware ESXi OS. */
18132 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_ESXI	UINT32_C(0x68)
18133 	/* Microsoft Windows 8 64-bit OS. */
18134 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WIN864	UINT32_C(0x73)
18135 	/* Microsoft Windows Server 2012 R2 OS. */
18136 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WIN2012R2 UINT32_C(0x74)
18137 	/* UEFI driver. */
18138 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_UEFI	UINT32_C(0x8000)
18139 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_LAST	HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_UEFI
18140 	/* This is the 8bit major version of the driver. */
18141 	uint8_t	ver_maj_8b;
18142 	/* This is the 8bit minor version of the driver. */
18143 	uint8_t	ver_min_8b;
18144 	/* This is the 8bit update version of the driver. */
18145 	uint8_t	ver_upd_8b;
18146 	uint8_t	unused_0[3];
18147 	/* This is the 16bit major version of the driver. */
18148 	uint16_t	ver_maj;
18149 	/* This is the 16bit minor version of the driver. */
18150 	uint16_t	ver_min;
18151 	/* This is the 16bit update version of the driver. */
18152 	uint16_t	ver_upd;
18153 	/* This is the 16bit patch version of the driver. */
18154 	uint16_t	ver_patch;
18155 	uint8_t	unused_1[7];
18156 	/*
18157 	 * This field is used in Output records to indicate that the output
18158 	 * is completely written to RAM. This field should be read as '1'
18159 	 * to indicate that the output has been completely written. When
18160 	 * writing a command completion or response to an internal processor,
18161 	 * the order of writes has to be such that this field is written last.
18162 	 */
18163 	uint8_t	valid;
18164 } hwrm_func_drv_qver_output_t, *phwrm_func_drv_qver_output_t;
18165 
18166 /****************************
18167  * hwrm_func_resource_qcaps *
18168  ****************************/
18169 
18170 
18171 /* hwrm_func_resource_qcaps_input (size:192b/24B) */
18172 
18173 typedef struct hwrm_func_resource_qcaps_input {
18174 	/* The HWRM command request type. */
18175 	uint16_t	req_type;
18176 	/*
18177 	 * The completion ring to send the completion event on. This should
18178 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18179 	 */
18180 	uint16_t	cmpl_ring;
18181 	/*
18182 	 * The sequence ID is used by the driver for tracking multiple
18183 	 * commands. This ID is treated as opaque data by the firmware and
18184 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18185 	 */
18186 	uint16_t	seq_id;
18187 	/*
18188 	 * The target ID of the command:
18189 	 * * 0x0-0xFFF8 - The function ID
18190 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18191 	 * * 0xFFFD - Reserved for user-space HWRM interface
18192 	 * * 0xFFFF - HWRM
18193 	 */
18194 	uint16_t	target_id;
18195 	/*
18196 	 * A physical address pointer pointing to a host buffer that the
18197 	 * command's response data will be written. This can be either a host
18198 	 * physical address (HPA) or a guest physical address (GPA) and must
18199 	 * point to a physically contiguous block of memory.
18200 	 */
18201 	uint64_t	resp_addr;
18202 	/*
18203 	 * Function ID of the function that is being queried.
18204 	 * 0xFF... (All Fs) if the query is for the requesting
18205 	 * function.
18206 	 */
18207 	uint16_t	fid;
18208 	uint8_t	unused_0[6];
18209 } hwrm_func_resource_qcaps_input_t, *phwrm_func_resource_qcaps_input_t;
18210 
18211 /* hwrm_func_resource_qcaps_output (size:704b/88B) */
18212 
18213 typedef struct hwrm_func_resource_qcaps_output {
18214 	/* The specific error status for the command. */
18215 	uint16_t	error_code;
18216 	/* The HWRM command request type. */
18217 	uint16_t	req_type;
18218 	/* The sequence ID from the original command. */
18219 	uint16_t	seq_id;
18220 	/* The length of the response data in number of bytes. */
18221 	uint16_t	resp_len;
18222 	/*
18223 	 * Maximum guaranteed number of VFs supported by PF. Not applicable for
18224 	 * VFs.
18225 	 */
18226 	uint16_t	max_vfs;
18227 	/* Maximum guaranteed number of MSI-X vectors supported by function. */
18228 	uint16_t	max_msix;
18229 	/*
18230 	 * Hint of strategy to be used by PF driver to reserve resources for
18231 	 * its VF.
18232 	 */
18233 	uint16_t	vf_reservation_strategy;
18234 	/*
18235 	 * The PF driver should evenly divide its remaining resources among
18236 	 * all VFs.
18237 	 */
18238 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MAXIMAL	UINT32_C(0x0)
18239 	/* The PF driver should only reserve minimal resources for each VF. */
18240 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL	UINT32_C(0x1)
18241 	/*
18242 	 * The PF driver should not reserve any resources for each VF until
18243 	 * the VF interface is brought up.
18244 	 */
18245 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC UINT32_C(0x2)
18246 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_LAST	HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC
18247 	/* Minimum guaranteed number of RSS/COS contexts. */
18248 	uint16_t	min_rsscos_ctx;
18249 	/* Maximum non-guaranteed number of RSS/COS contexts */
18250 	uint16_t	max_rsscos_ctx;
18251 	/* Minimum guaranteed number of completion rings */
18252 	uint16_t	min_cmpl_rings;
18253 	/* Maximum non-guaranteed number of completion rings */
18254 	uint16_t	max_cmpl_rings;
18255 	/* Minimum guaranteed number of transmit rings */
18256 	uint16_t	min_tx_rings;
18257 	/* Maximum non-guaranteed number of transmit rings */
18258 	uint16_t	max_tx_rings;
18259 	/* Minimum guaranteed number of receive rings */
18260 	uint16_t	min_rx_rings;
18261 	/* Maximum non-guaranteed number of receive rings */
18262 	uint16_t	max_rx_rings;
18263 	/* Minimum guaranteed number of L2 contexts */
18264 	uint16_t	min_l2_ctxs;
18265 	/* Maximum non-guaranteed number of L2 contexts */
18266 	uint16_t	max_l2_ctxs;
18267 	/* Minimum guaranteed number of VNICs */
18268 	uint16_t	min_vnics;
18269 	/* Maximum non-guaranteed number of VNICs */
18270 	uint16_t	max_vnics;
18271 	/* Minimum guaranteed number of statistic contexts */
18272 	uint16_t	min_stat_ctx;
18273 	/* Maximum non-guaranteed number of statistic contexts */
18274 	uint16_t	max_stat_ctx;
18275 	/* Minimum guaranteed number of ring groups */
18276 	uint16_t	min_hw_ring_grps;
18277 	/* Maximum non-guaranteed number of ring groups */
18278 	uint16_t	max_hw_ring_grps;
18279 	/*
18280 	 * Maximum number of inputs into the transmit scheduler for this
18281 	 * function. The number of TX rings assigned to the function cannot
18282 	 * exceed this value.
18283 	 */
18284 	uint16_t	max_tx_scheduler_inputs;
18285 	uint16_t	flags;
18286 	/*
18287 	 * When this bit is '1', it indicates that VF_RESOURCE_CFG supports
18288 	 * feature to reserve all minimum resources when minimum >= 1,
18289 	 * otherwise returns an error.
18290 	 */
18291 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_FLAGS_MIN_GUARANTEED	UINT32_C(0x1)
18292 	/* Minimum guaranteed number of MSI-X vectors supported by function */
18293 	uint16_t	min_msix;
18294 	/* Minimum guaranteed number of KTLS Tx Key Contexts */
18295 	uint32_t	min_ktls_tx_key_ctxs;
18296 	/* Maximum non-guaranteed number of KTLS Tx Key Contexts */
18297 	uint32_t	max_ktls_tx_key_ctxs;
18298 	/* Minimum guaranteed number of KTLS Rx Key Contexts */
18299 	uint32_t	min_ktls_rx_key_ctxs;
18300 	/* Maximum non-guaranteed number of KTLS Rx Key Contexts */
18301 	uint32_t	max_ktls_rx_key_ctxs;
18302 	/* Minimum guaranteed number of QUIC Tx Key Contexts */
18303 	uint32_t	min_quic_tx_key_ctxs;
18304 	/* Maximum non-guaranteed number of QUIC Tx Key Contexts */
18305 	uint32_t	max_quic_tx_key_ctxs;
18306 	/* Minimum guaranteed number of QUIC Rx Key Contexts */
18307 	uint32_t	min_quic_rx_key_ctxs;
18308 	/* Maximum non-guaranteed number of QUIC Rx Key Contexts */
18309 	uint32_t	max_quic_rx_key_ctxs;
18310 	uint8_t	unused_0[3];
18311 	/*
18312 	 * This field is used in Output records to indicate that the output
18313 	 * is completely written to RAM. This field should be read as '1'
18314 	 * to indicate that the output has been completely written. When
18315 	 * writing a command completion or response to an internal processor,
18316 	 * the order of writes has to be such that this field is written last.
18317 	 */
18318 	uint8_t	valid;
18319 } hwrm_func_resource_qcaps_output_t, *phwrm_func_resource_qcaps_output_t;
18320 
18321 /*****************************
18322  * hwrm_func_vf_resource_cfg *
18323  *****************************/
18324 
18325 
18326 /* hwrm_func_vf_resource_cfg_input (size:704b/88B) */
18327 
18328 typedef struct hwrm_func_vf_resource_cfg_input {
18329 	/* The HWRM command request type. */
18330 	uint16_t	req_type;
18331 	/*
18332 	 * The completion ring to send the completion event on. This should
18333 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18334 	 */
18335 	uint16_t	cmpl_ring;
18336 	/*
18337 	 * The sequence ID is used by the driver for tracking multiple
18338 	 * commands. This ID is treated as opaque data by the firmware and
18339 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18340 	 */
18341 	uint16_t	seq_id;
18342 	/*
18343 	 * The target ID of the command:
18344 	 * * 0x0-0xFFF8 - The function ID
18345 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18346 	 * * 0xFFFD - Reserved for user-space HWRM interface
18347 	 * * 0xFFFF - HWRM
18348 	 */
18349 	uint16_t	target_id;
18350 	/*
18351 	 * A physical address pointer pointing to a host buffer that the
18352 	 * command's response data will be written. This can be either a host
18353 	 * physical address (HPA) or a guest physical address (GPA) and must
18354 	 * point to a physically contiguous block of memory.
18355 	 */
18356 	uint64_t	resp_addr;
18357 	/* VF ID that is being configured by PF */
18358 	uint16_t	vf_id;
18359 	/* Maximum guaranteed number of MSI-X vectors for the function */
18360 	uint16_t	max_msix;
18361 	/* Minimum guaranteed number of RSS/COS contexts */
18362 	uint16_t	min_rsscos_ctx;
18363 	/* Maximum non-guaranteed number of RSS/COS contexts */
18364 	uint16_t	max_rsscos_ctx;
18365 	/* Minimum guaranteed number of completion rings */
18366 	uint16_t	min_cmpl_rings;
18367 	/* Maximum non-guaranteed number of completion rings */
18368 	uint16_t	max_cmpl_rings;
18369 	/* Minimum guaranteed number of transmit rings */
18370 	uint16_t	min_tx_rings;
18371 	/* Maximum non-guaranteed number of transmit rings */
18372 	uint16_t	max_tx_rings;
18373 	/* Minimum guaranteed number of receive rings */
18374 	uint16_t	min_rx_rings;
18375 	/* Maximum non-guaranteed number of receive rings */
18376 	uint16_t	max_rx_rings;
18377 	/* Minimum guaranteed number of L2 contexts */
18378 	uint16_t	min_l2_ctxs;
18379 	/* Maximum non-guaranteed number of L2 contexts */
18380 	uint16_t	max_l2_ctxs;
18381 	/* Minimum guaranteed number of VNICs */
18382 	uint16_t	min_vnics;
18383 	/* Maximum non-guaranteed number of VNICs */
18384 	uint16_t	max_vnics;
18385 	/* Minimum guaranteed number of statistic contexts */
18386 	uint16_t	min_stat_ctx;
18387 	/* Maximum non-guaranteed number of statistic contexts */
18388 	uint16_t	max_stat_ctx;
18389 	/* Minimum guaranteed number of ring groups */
18390 	uint16_t	min_hw_ring_grps;
18391 	/* Maximum non-guaranteed number of ring groups */
18392 	uint16_t	max_hw_ring_grps;
18393 	uint16_t	flags;
18394 	/*
18395 	 * If this bit is set, all minimum resources requested should be
18396 	 * reserved if minimum >= 1, otherwise return error. In case of
18397 	 * error, keep all existing reservations before the call.
18398 	 */
18399 	#define HWRM_FUNC_VF_RESOURCE_CFG_INPUT_FLAGS_MIN_GUARANTEED	UINT32_C(0x1)
18400 	/* Minimum guaranteed number of MSI-X vectors for the function */
18401 	uint16_t	min_msix;
18402 	/* Minimum guaranteed number of KTLS Tx Key Contexts */
18403 	uint32_t	min_ktls_tx_key_ctxs;
18404 	/* Maximum non-guaranteed number of KTLS Tx Key Contexts */
18405 	uint32_t	max_ktls_tx_key_ctxs;
18406 	/* Minimum guaranteed number of KTLS Rx Key Contexts */
18407 	uint32_t	min_ktls_rx_key_ctxs;
18408 	/* Maximum non-guaranteed number of KTLS Rx Key Contexts */
18409 	uint32_t	max_ktls_rx_key_ctxs;
18410 	/* Minimum guaranteed number of QUIC Tx Key Contexts */
18411 	uint32_t	min_quic_tx_key_ctxs;
18412 	/* Maximum non-guaranteed number of QUIC Tx Key Contexts */
18413 	uint32_t	max_quic_tx_key_ctxs;
18414 	/* Minimum guaranteed number of QUIC Rx Key Contexts */
18415 	uint32_t	min_quic_rx_key_ctxs;
18416 	/* Maximum non-guaranteed number of QUIC Rx Key Contexts */
18417 	uint32_t	max_quic_rx_key_ctxs;
18418 } hwrm_func_vf_resource_cfg_input_t, *phwrm_func_vf_resource_cfg_input_t;
18419 
18420 /* hwrm_func_vf_resource_cfg_output (size:384b/48B) */
18421 
18422 typedef struct hwrm_func_vf_resource_cfg_output {
18423 	/* The specific error status for the command. */
18424 	uint16_t	error_code;
18425 	/* The HWRM command request type. */
18426 	uint16_t	req_type;
18427 	/* The sequence ID from the original command. */
18428 	uint16_t	seq_id;
18429 	/* The length of the response data in number of bytes. */
18430 	uint16_t	resp_len;
18431 	/* Reserved number of RSS/COS contexts */
18432 	uint16_t	reserved_rsscos_ctx;
18433 	/* Reserved number of completion rings */
18434 	uint16_t	reserved_cmpl_rings;
18435 	/* Reserved number of transmit rings */
18436 	uint16_t	reserved_tx_rings;
18437 	/* Reserved number of receive rings */
18438 	uint16_t	reserved_rx_rings;
18439 	/* Reserved number of L2 contexts */
18440 	uint16_t	reserved_l2_ctxs;
18441 	/* Reserved number of VNICs */
18442 	uint16_t	reserved_vnics;
18443 	/* Reserved number of statistic contexts */
18444 	uint16_t	reserved_stat_ctx;
18445 	/* Reserved number of ring groups */
18446 	uint16_t	reserved_hw_ring_grps;
18447 	/* Actual number of KTLS Tx Key Contexts reserved */
18448 	uint32_t	reserved_ktls_tx_key_ctxs;
18449 	/* Actual number of KTLS Rx Key Contexts reserved */
18450 	uint32_t	reserved_ktls_rx_key_ctxs;
18451 	/* Actual number of QUIC Tx Key Contexts reserved */
18452 	uint32_t	reserved_quic_tx_key_ctxs;
18453 	/* Actual number of QUIC Rx Key Contexts reserved */
18454 	uint32_t	reserved_quic_rx_key_ctxs;
18455 	uint8_t	unused_0[7];
18456 	/*
18457 	 * This field is used in Output records to indicate that the output
18458 	 * is completely written to RAM. This field should be read as '1'
18459 	 * to indicate that the output has been completely written. When
18460 	 * writing a command completion or response to an internal processor,
18461 	 * the order of writes has to be such that this field is written last.
18462 	 */
18463 	uint8_t	valid;
18464 } hwrm_func_vf_resource_cfg_output_t, *phwrm_func_vf_resource_cfg_output_t;
18465 
18466 /*********************************
18467  * hwrm_func_backing_store_qcaps *
18468  *********************************/
18469 
18470 
18471 /* hwrm_func_backing_store_qcaps_input (size:128b/16B) */
18472 
18473 typedef struct hwrm_func_backing_store_qcaps_input {
18474 	/* The HWRM command request type. */
18475 	uint16_t	req_type;
18476 	/*
18477 	 * The completion ring to send the completion event on. This should
18478 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18479 	 */
18480 	uint16_t	cmpl_ring;
18481 	/*
18482 	 * The sequence ID is used by the driver for tracking multiple
18483 	 * commands. This ID is treated as opaque data by the firmware and
18484 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18485 	 */
18486 	uint16_t	seq_id;
18487 	/*
18488 	 * The target ID of the command:
18489 	 * * 0x0-0xFFF8 - The function ID
18490 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18491 	 * * 0xFFFD - Reserved for user-space HWRM interface
18492 	 * * 0xFFFF - HWRM
18493 	 */
18494 	uint16_t	target_id;
18495 	/*
18496 	 * A physical address pointer pointing to a host buffer that the
18497 	 * command's response data will be written. This can be either a host
18498 	 * physical address (HPA) or a guest physical address (GPA) and must
18499 	 * point to a physically contiguous block of memory.
18500 	 */
18501 	uint64_t	resp_addr;
18502 } hwrm_func_backing_store_qcaps_input_t, *phwrm_func_backing_store_qcaps_input_t;
18503 
18504 /* hwrm_func_backing_store_qcaps_output (size:832b/104B) */
18505 
18506 typedef struct hwrm_func_backing_store_qcaps_output {
18507 	/* The specific error status for the command. */
18508 	uint16_t	error_code;
18509 	/* The HWRM command request type. */
18510 	uint16_t	req_type;
18511 	/* The sequence ID from the original command. */
18512 	uint16_t	seq_id;
18513 	/* The length of the response data in number of bytes. */
18514 	uint16_t	resp_len;
18515 	/* Maximum number of QP context entries supported for this function. */
18516 	uint32_t	qp_max_entries;
18517 	/*
18518 	 * Minimum number of QP context entries that are needed to be reserved
18519 	 * for QP1 for the PF and its VFs. PF drivers must allocate at least
18520 	 * this many QP context entries, even if RoCE will not be used.
18521 	 */
18522 	uint16_t	qp_min_qp1_entries;
18523 	/*
18524 	 * Maximum number of QP context entries that can be used for L2 and
18525 	 * mid-path.
18526 	 */
18527 	uint16_t	qp_max_l2_entries;
18528 	/* Number of bytes that must be allocated for each context entry. */
18529 	uint16_t	qp_entry_size;
18530 	/* Maximum number of SRQ context entries that can be used for L2. */
18531 	uint16_t	srq_max_l2_entries;
18532 	/* Maximum number of SRQ context entries supported for this function. */
18533 	uint32_t	srq_max_entries;
18534 	/* Number of bytes that must be allocated for each context entry. */
18535 	uint16_t	srq_entry_size;
18536 	/* Maximum number of CQ context entries that can be used for L2. */
18537 	uint16_t	cq_max_l2_entries;
18538 	/* Maximum number of CQ context entries supported for this function. */
18539 	uint32_t	cq_max_entries;
18540 	/* Number of bytes that must be allocated for each context entry. */
18541 	uint16_t	cq_entry_size;
18542 	/* Maximum number of VNIC context entries supported for this function. */
18543 	uint16_t	vnic_max_vnic_entries;
18544 	/*
18545 	 * Maximum number of Ring table context entries supported for this
18546 	 * function.
18547 	 */
18548 	uint16_t	vnic_max_ring_table_entries;
18549 	/* Number of bytes that must be allocated for each context entry. */
18550 	uint16_t	vnic_entry_size;
18551 	/*
18552 	 * Maximum number of statistic context entries supported for this
18553 	 * function.
18554 	 */
18555 	uint32_t	stat_max_entries;
18556 	/* Number of bytes that must be allocated for each context entry. */
18557 	uint16_t	stat_entry_size;
18558 	/* Number of bytes that must be allocated for each context entry. */
18559 	uint16_t	tqm_entry_size;
18560 	/* Minimum number of TQM context entries required per ring. */
18561 	uint32_t	tqm_min_entries_per_ring;
18562 	/*
18563 	 * Maximum number of TQM context entries supported per ring. This is
18564 	 * actually a recommended TQM queue size based on worst case usage of
18565 	 * the TQM queue.
18566 	 *
18567 	 * TQM fastpath rings should be sized large enough to accommodate the
18568 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
18569 	 * that can be enqueued to the TQM ring.
18570 	 *
18571 	 * TQM slowpath rings should be sized as follows:
18572 	 *
18573 	 * num_entries = num_vnics + num_l2_tx_rings + 2 * num_roce_qps + tqm_min_size
18574 	 *
18575 	 * Where:
18576 	 *   num_vnics is the number of VNICs allocated in the VNIC backing
18577 	 *   store
18578 	 *   num_l2_tx_rings is the number of L2 rings in the QP backing store
18579 	 *   num_roce_qps is the number of RoCE QPs in the QP backing store
18580 	 *   tqm_min_size is tqm_min_entries_per_ring reported by
18581 	 *	HWRM_FUNC_BACKING_STORE_QCAPS
18582 	 *
18583 	 * Note that TQM ring sizes cannot be extended while the system is
18584 	 * operational. If a PF driver needs to extend a TQM ring, it needs
18585 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
18586 	 * the backing store.
18587 	 */
18588 	uint32_t	tqm_max_entries_per_ring;
18589 	/*
18590 	 * Maximum number of MR plus AV context entries supported for this
18591 	 * function.
18592 	 */
18593 	uint32_t	mrav_max_entries;
18594 	/* Number of bytes that must be allocated for each context entry. */
18595 	uint16_t	mrav_entry_size;
18596 	/* Number of bytes that must be allocated for each context entry. */
18597 	uint16_t	tim_entry_size;
18598 	/* Maximum number of Timer context entries supported for this function. */
18599 	uint32_t	tim_max_entries;
18600 	/*
18601 	 * When this field is zero, the 32b `mrav_num_entries` field in the
18602 	 * `backing_store_cfg` and `backing_store_qcfg` commands represents
18603 	 * the total number of MR plus AV entries allowed in the MR/AV backing
18604 	 * store PBL.
18605 	 *
18606 	 * When this field is non-zero, the 32b `mrav_num_entries` field in
18607 	 * the `backing_store_cfg` and `backing_store_qcfg` commands is
18608 	 * logically divided into two 16b fields. Bits `[31:16]` represents
18609 	 * the `mr_num_entries` and bits `[15:0]` represents `av_num_entries`.
18610 	 * Both of these values are represented in a unit granularity
18611 	 * specified by this field. For example, if this field is 16 and
18612 	 * `mrav_num_entries` is `0x02000100`, then the number of MR entries
18613 	 * is 8192 and the number of AV entries is 4096.
18614 	 */
18615 	uint16_t	mrav_num_entries_units;
18616 	/*
18617 	 * The number of entries specified for any TQM ring must be a
18618 	 * multiple of this value to prevent any resource allocation
18619 	 * limitations.
18620 	 */
18621 	uint8_t	tqm_entries_multiple;
18622 	/*
18623 	 * Initializer to be used by drivers
18624 	 * to initialize context memory to ensure
18625 	 * context subsystem flags an error for an attack
18626 	 * before the first time context load.
18627 	 */
18628 	uint8_t	ctx_kind_initializer;
18629 	/*
18630 	 * Specifies which context kinds need to be initialized with the
18631 	 * ctx_kind_initializer.
18632 	 */
18633 	uint16_t	ctx_init_mask;
18634 	/*
18635 	 * If this bit is '1' then this context type should be initialized
18636 	 * with the ctx_kind_initializer at the specified offset.
18637 	 */
18638 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_QP	UINT32_C(0x1)
18639 	/*
18640 	 * If this bit is '1' then this context type should be initialized
18641 	 * with the ctx_kind_initializer at the specified offset.
18642 	 */
18643 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_SRQ	UINT32_C(0x2)
18644 	/*
18645 	 * If this bit is '1' then this context type should be initialized
18646 	 * with the ctx_kind_initializer at the specified offset.
18647 	 */
18648 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_CQ	UINT32_C(0x4)
18649 	/*
18650 	 * If this bit is '1' then this context type should be initialized
18651 	 * with the ctx_kind_initializer at the specified offset.
18652 	 */
18653 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_VNIC	UINT32_C(0x8)
18654 	/*
18655 	 * If this bit is '1' then this context type should be initialized
18656 	 * with the ctx_kind_initializer at the specified offset.
18657 	 */
18658 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_STAT	UINT32_C(0x10)
18659 	/*
18660 	 * If this bit is '1' then this context type should be initialized
18661 	 * with the ctx_kind_initializer at the specified offset.
18662 	 */
18663 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_MRAV	UINT32_C(0x20)
18664 	/*
18665 	 * If this bit is '1' then the Tx KTLS context type should be
18666 	 * initialized with the ctx_kind_initializer at the specified offset.
18667 	 */
18668 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_TKC	UINT32_C(0x40)
18669 	/*
18670 	 * If this bit is '1' then the Rx KTLS context type should be
18671 	 * initialized with the ctx_kind_initializer at the specified offset.
18672 	 */
18673 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_RKC	UINT32_C(0x80)
18674 	/*
18675 	 * Specifies the doubleword offset of ctx_kind_initializer for this
18676 	 * context type.
18677 	 */
18678 	uint8_t	qp_init_offset;
18679 	/*
18680 	 * Specifies the doubleword offset of ctx_kind_initializer for this
18681 	 * context type.
18682 	 */
18683 	uint8_t	srq_init_offset;
18684 	/*
18685 	 * Specifies the doubleword offset of ctx_kind_initializer for this
18686 	 * context type.
18687 	 */
18688 	uint8_t	cq_init_offset;
18689 	/*
18690 	 * Specifies the doubleword offset of ctx_kind_initializer for this
18691 	 * context type.
18692 	 */
18693 	uint8_t	vnic_init_offset;
18694 	/*
18695 	 * Count of TQM fastpath rings to be used for allocating backing store.
18696 	 * Backing store configuration must be specified for each TQM ring from
18697 	 * this count in `backing_store_cfg`.
18698 	 * Only first 8 TQM FP rings will be advertised with this field.
18699 	 */
18700 	uint8_t	tqm_fp_rings_count;
18701 	/*
18702 	 * Specifies the doubleword offset of ctx_kind_initializer for this
18703 	 * context type.
18704 	 */
18705 	uint8_t	stat_init_offset;
18706 	/*
18707 	 * Specifies the doubleword offset of ctx_kind_initializer for this
18708 	 * context type.
18709 	 */
18710 	uint8_t	mrav_init_offset;
18711 	/*
18712 	 * Count of TQM extended fastpath rings to be used for allocating
18713 	 * backing store beyond 8 rings(rings 9,10,11)
18714 	 * Backing store configuration must be specified for each TQM ring from
18715 	 * this count in `backing_store_cfg`.
18716 	 */
18717 	uint8_t	tqm_fp_rings_count_ext;
18718 	/*
18719 	 * Specifies the doubleword offset of ctx_kind_initializer for Tx
18720 	 * KTLS context type.
18721 	 */
18722 	uint8_t	tkc_init_offset;
18723 	/*
18724 	 * Specifies the doubleword offset of ctx_kind_initializer for Rx
18725 	 * KTLS context type.
18726 	 */
18727 	uint8_t	rkc_init_offset;
18728 	/* Tx KTLS context entry size in bytes. */
18729 	uint16_t	tkc_entry_size;
18730 	/* Rx KTLS context entry size in bytes. */
18731 	uint16_t	rkc_entry_size;
18732 	/*
18733 	 * Maximum number of Tx KTLS context entries supported for this
18734 	 * function.
18735 	 */
18736 	uint32_t	tkc_max_entries;
18737 	/*
18738 	 * Maximum number of Rx KTLS context entries supported for this
18739 	 * function.
18740 	 */
18741 	uint32_t	rkc_max_entries;
18742 	/*
18743 	 * Additional number of RoCE QP context entries required for this
18744 	 * function to support fast QP destroy feature.
18745 	 */
18746 	uint16_t	fast_qpmd_qp_num_entries;
18747 	/* Reserved for future. */
18748 	uint8_t	rsvd1[5];
18749 	/*
18750 	 * This field is used in Output records to indicate that the output
18751 	 * is completely written to RAM. This field should be read as '1'
18752 	 * to indicate that the output has been completely written. When
18753 	 * writing a command completion or response to an internal processor,
18754 	 * the order of writes has to be such that this field is written last.
18755 	 */
18756 	uint8_t	valid;
18757 } hwrm_func_backing_store_qcaps_output_t, *phwrm_func_backing_store_qcaps_output_t;
18758 
18759 /* tqm_fp_ring_cfg (size:128b/16B) */
18760 
18761 typedef struct tqm_fp_ring_cfg {
18762 	/* TQM ring page size and level. */
18763 	uint8_t	tqm_ring_pg_size_tqm_ring_lvl;
18764 	/* TQM ring PBL indirect levels. */
18765 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_MASK	UINT32_C(0xf)
18766 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_SFT	0
18767 	/* PBL pointer is physical start address. */
18768 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_0	UINT32_C(0x0)
18769 	/* PBL pointer points to PTE table. */
18770 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_1	UINT32_C(0x1)
18771 	/*
18772 	 * PBL pointer points to PDE table with each entry pointing to
18773 	 * PTE tables.
18774 	 */
18775 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_2	UINT32_C(0x2)
18776 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LAST	TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_2
18777 	/* TQM ring page size. */
18778 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_MASK  UINT32_C(0xf0)
18779 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_SFT   4
18780 	/* 4KB. */
18781 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
18782 	/* 8KB. */
18783 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
18784 	/* 64KB. */
18785 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
18786 	/* 2MB. */
18787 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
18788 	/* 8MB. */
18789 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
18790 	/* 1GB. */
18791 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
18792 		#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_LAST   TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_1G
18793 	uint8_t	unused[3];
18794 	/* Number of TQM ring entries. */
18795 	uint32_t	tqm_ring_num_entries;
18796 	/* TQM ring page directory. */
18797 	uint64_t	tqm_ring_page_dir;
18798 } tqm_fp_ring_cfg_t, *ptqm_fp_ring_cfg_t;
18799 
18800 /*******************************
18801  * hwrm_func_backing_store_cfg *
18802  *******************************/
18803 
18804 
18805 /* hwrm_func_backing_store_cfg_input (size:2688b/336B) */
18806 
18807 typedef struct hwrm_func_backing_store_cfg_input {
18808 	/* The HWRM command request type. */
18809 	uint16_t	req_type;
18810 	/*
18811 	 * The completion ring to send the completion event on. This should
18812 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18813 	 */
18814 	uint16_t	cmpl_ring;
18815 	/*
18816 	 * The sequence ID is used by the driver for tracking multiple
18817 	 * commands. This ID is treated as opaque data by the firmware and
18818 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18819 	 */
18820 	uint16_t	seq_id;
18821 	/*
18822 	 * The target ID of the command:
18823 	 * * 0x0-0xFFF8 - The function ID
18824 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18825 	 * * 0xFFFD - Reserved for user-space HWRM interface
18826 	 * * 0xFFFF - HWRM
18827 	 */
18828 	uint16_t	target_id;
18829 	/*
18830 	 * A physical address pointer pointing to a host buffer that the
18831 	 * command's response data will be written. This can be either a host
18832 	 * physical address (HPA) or a guest physical address (GPA) and must
18833 	 * point to a physically contiguous block of memory.
18834 	 */
18835 	uint64_t	resp_addr;
18836 	uint32_t	flags;
18837 	/*
18838 	 * When set, the firmware only uses on-chip resources and does not
18839 	 * expect any backing store to be provided by the host driver. This
18840 	 * mode provides minimal L2 functionality (e.g. limited L2 resources,
18841 	 * no RoCE).
18842 	 */
18843 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_FLAGS_PREBOOT_MODE		UINT32_C(0x1)
18844 	/*
18845 	 * When set, the 32b `mrav_num_entries` field is logically divided
18846 	 * into two 16b fields, `mr_num_entries` and `av_num_entries`.
18847 	 */
18848 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_FLAGS_MRAV_RESERVATION_SPLIT	UINT32_C(0x2)
18849 	uint32_t	enables;
18850 	/*
18851 	 * This bit must be '1' for the qp fields to be
18852 	 * configured.
18853 	 */
18854 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_QP		UINT32_C(0x1)
18855 	/*
18856 	 * This bit must be '1' for the srq fields to be
18857 	 * configured.
18858 	 */
18859 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_SRQ		UINT32_C(0x2)
18860 	/*
18861 	 * This bit must be '1' for the cq fields to be
18862 	 * configured.
18863 	 */
18864 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_CQ		UINT32_C(0x4)
18865 	/*
18866 	 * This bit must be '1' for the vnic fields to be
18867 	 * configured.
18868 	 */
18869 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_VNIC		UINT32_C(0x8)
18870 	/*
18871 	 * This bit must be '1' for the stat fields to be
18872 	 * configured.
18873 	 */
18874 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_STAT		UINT32_C(0x10)
18875 	/*
18876 	 * This bit must be '1' for the tqm_sp fields to be
18877 	 * configured.
18878 	 */
18879 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_SP	UINT32_C(0x20)
18880 	/*
18881 	 * This bit must be '1' for the tqm_ring0 fields to be
18882 	 * configured.
18883 	 */
18884 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING0	UINT32_C(0x40)
18885 	/*
18886 	 * This bit must be '1' for the tqm_ring1 fields to be
18887 	 * configured.
18888 	 */
18889 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING1	UINT32_C(0x80)
18890 	/*
18891 	 * This bit must be '1' for the tqm_ring2 fields to be
18892 	 * configured.
18893 	 */
18894 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING2	UINT32_C(0x100)
18895 	/*
18896 	 * This bit must be '1' for the tqm_ring3 fields to be
18897 	 * configured.
18898 	 */
18899 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING3	UINT32_C(0x200)
18900 	/*
18901 	 * This bit must be '1' for the tqm_ring4 fields to be
18902 	 * configured.
18903 	 */
18904 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING4	UINT32_C(0x400)
18905 	/*
18906 	 * This bit must be '1' for the tqm_ring5 fields to be
18907 	 * configured.
18908 	 */
18909 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING5	UINT32_C(0x800)
18910 	/*
18911 	 * This bit must be '1' for the tqm_ring6 fields to be
18912 	 * configured.
18913 	 */
18914 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING6	UINT32_C(0x1000)
18915 	/*
18916 	 * This bit must be '1' for the tqm_ring7 fields to be
18917 	 * configured.
18918 	 */
18919 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING7	UINT32_C(0x2000)
18920 	/*
18921 	 * This bit must be '1' for the mrav fields to be
18922 	 * configured.
18923 	 */
18924 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_MRAV		UINT32_C(0x4000)
18925 	/*
18926 	 * This bit must be '1' for the tim fields to be
18927 	 * configured.
18928 	 */
18929 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TIM		UINT32_C(0x8000)
18930 	/*
18931 	 * This bit must be '1' for the tqm_ring8 fields to be
18932 	 * configured.
18933 	 */
18934 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING8	UINT32_C(0x10000)
18935 	/*
18936 	 * This bit must be '1' for the tqm_ring9 fields to be
18937 	 * configured.
18938 	 */
18939 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING9	UINT32_C(0x20000)
18940 	/*
18941 	 * This bit must be '1' for the tqm_ring10 fields to be
18942 	 * configured.
18943 	 */
18944 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING10	UINT32_C(0x40000)
18945 	/*
18946 	 * This bit must be '1' for the Tx KTLS context
18947 	 * fields to be configured.
18948 	 */
18949 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TKC		UINT32_C(0x80000)
18950 	/*
18951 	 * This bit must be '1' for the Rx KTLS context
18952 	 * fields to be configured.
18953 	 */
18954 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_RKC		UINT32_C(0x100000)
18955 	/*
18956 	 * This bit must be '1' for the number of QPs reserved for fast
18957 	 * qp modify destroy feature to be configured.
18958 	 */
18959 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_QP_FAST_QPMD	UINT32_C(0x200000)
18960 	/* QPC page size and level. */
18961 	uint8_t	qpc_pg_size_qpc_lvl;
18962 	/* QPC PBL indirect levels. */
18963 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_MASK	UINT32_C(0xf)
18964 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_SFT	0
18965 	/* PBL pointer is physical start address. */
18966 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_0	UINT32_C(0x0)
18967 	/* PBL pointer points to PTE table. */
18968 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_1	UINT32_C(0x1)
18969 	/*
18970 	 * PBL pointer points to PDE table with each entry pointing to PTE
18971 	 * tables.
18972 	 */
18973 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_2	UINT32_C(0x2)
18974 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_2
18975 	/* QPC page size. */
18976 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_MASK  UINT32_C(0xf0)
18977 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_SFT   4
18978 	/* 4KB. */
18979 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
18980 	/* 8KB. */
18981 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
18982 	/* 64KB. */
18983 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
18984 	/* 2MB. */
18985 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
18986 	/* 8MB. */
18987 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
18988 	/* 1GB. */
18989 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
18990 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_1G
18991 	/* SRQ page size and level. */
18992 	uint8_t	srq_pg_size_srq_lvl;
18993 	/* SRQ PBL indirect levels. */
18994 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_MASK	UINT32_C(0xf)
18995 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_SFT	0
18996 	/* PBL pointer is physical start address. */
18997 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_0	UINT32_C(0x0)
18998 	/* PBL pointer points to PTE table. */
18999 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_1	UINT32_C(0x1)
19000 	/*
19001 	 * PBL pointer points to PDE table with each entry pointing to PTE
19002 	 * tables.
19003 	 */
19004 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_2	UINT32_C(0x2)
19005 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_2
19006 	/* SRQ page size. */
19007 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_MASK  UINT32_C(0xf0)
19008 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_SFT   4
19009 	/* 4KB. */
19010 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19011 	/* 8KB. */
19012 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19013 	/* 64KB. */
19014 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19015 	/* 2MB. */
19016 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19017 	/* 8MB. */
19018 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19019 	/* 1GB. */
19020 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19021 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_1G
19022 	/* CQ page size and level. */
19023 	uint8_t	cq_pg_size_cq_lvl;
19024 	/* CQ PBL indirect levels. */
19025 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_MASK	UINT32_C(0xf)
19026 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_SFT	0
19027 	/* PBL pointer is physical start address. */
19028 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_0	UINT32_C(0x0)
19029 	/* PBL pointer points to PTE table. */
19030 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_1	UINT32_C(0x1)
19031 	/*
19032 	 * PBL pointer points to PDE table with each entry pointing to PTE
19033 	 * tables.
19034 	 */
19035 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_2	UINT32_C(0x2)
19036 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_2
19037 	/* CQ page size. */
19038 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_MASK  UINT32_C(0xf0)
19039 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_SFT   4
19040 	/* 4KB. */
19041 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19042 	/* 8KB. */
19043 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19044 	/* 64KB. */
19045 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19046 	/* 2MB. */
19047 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19048 	/* 8MB. */
19049 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19050 	/* 1GB. */
19051 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19052 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_1G
19053 	/* VNIC page size and level. */
19054 	uint8_t	vnic_pg_size_vnic_lvl;
19055 	/* VNIC PBL indirect levels. */
19056 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_MASK	UINT32_C(0xf)
19057 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_SFT	0
19058 	/* PBL pointer is physical start address. */
19059 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_0	UINT32_C(0x0)
19060 	/* PBL pointer points to PTE table. */
19061 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_1	UINT32_C(0x1)
19062 	/*
19063 	 * PBL pointer points to PDE table with each entry pointing to PTE
19064 	 * tables.
19065 	 */
19066 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_2	UINT32_C(0x2)
19067 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_2
19068 	/* VNIC page size. */
19069 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_MASK  UINT32_C(0xf0)
19070 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_SFT   4
19071 	/* 4KB. */
19072 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19073 	/* 8KB. */
19074 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19075 	/* 64KB. */
19076 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19077 	/* 2MB. */
19078 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19079 	/* 8MB. */
19080 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19081 	/* 1GB. */
19082 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19083 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_1G
19084 	/* Stat page size and level. */
19085 	uint8_t	stat_pg_size_stat_lvl;
19086 	/* Stat PBL indirect levels. */
19087 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_MASK	UINT32_C(0xf)
19088 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_SFT	0
19089 	/* PBL pointer is physical start address. */
19090 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_0	UINT32_C(0x0)
19091 	/* PBL pointer points to PTE table. */
19092 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_1	UINT32_C(0x1)
19093 	/*
19094 	 * PBL pointer points to PDE table with each entry pointing to PTE
19095 	 * tables.
19096 	 */
19097 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_2	UINT32_C(0x2)
19098 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_2
19099 	/* Stat page size. */
19100 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_MASK  UINT32_C(0xf0)
19101 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_SFT   4
19102 	/* 4KB. */
19103 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19104 	/* 8KB. */
19105 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19106 	/* 64KB. */
19107 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19108 	/* 2MB. */
19109 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19110 	/* 8MB. */
19111 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19112 	/* 1GB. */
19113 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19114 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_1G
19115 	/* TQM slow path page size and level. */
19116 	uint8_t	tqm_sp_pg_size_tqm_sp_lvl;
19117 	/* TQM slow path PBL indirect levels. */
19118 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_MASK	UINT32_C(0xf)
19119 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_SFT	0
19120 	/* PBL pointer is physical start address. */
19121 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_0	UINT32_C(0x0)
19122 	/* PBL pointer points to PTE table. */
19123 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_1	UINT32_C(0x1)
19124 	/*
19125 	 * PBL pointer points to PDE table with each entry pointing to PTE
19126 	 * tables.
19127 	 */
19128 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_2	UINT32_C(0x2)
19129 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_2
19130 	/* TQM slow path page size. */
19131 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_MASK  UINT32_C(0xf0)
19132 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_SFT   4
19133 	/* 4KB. */
19134 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19135 	/* 8KB. */
19136 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19137 	/* 64KB. */
19138 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19139 	/* 2MB. */
19140 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19141 	/* 8MB. */
19142 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19143 	/* 1GB. */
19144 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19145 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_1G
19146 	/* TQM ring 0 page size and level. */
19147 	uint8_t	tqm_ring0_pg_size_tqm_ring0_lvl;
19148 	/* TQM ring 0 PBL indirect levels. */
19149 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_MASK	UINT32_C(0xf)
19150 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_SFT	0
19151 	/* PBL pointer is physical start address. */
19152 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_0	UINT32_C(0x0)
19153 	/* PBL pointer points to PTE table. */
19154 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_1	UINT32_C(0x1)
19155 	/*
19156 	 * PBL pointer points to PDE table with each entry pointing to PTE
19157 	 * tables.
19158 	 */
19159 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_2	UINT32_C(0x2)
19160 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_2
19161 	/* TQM ring 0 page size. */
19162 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_MASK  UINT32_C(0xf0)
19163 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_SFT   4
19164 	/* 4KB. */
19165 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19166 	/* 8KB. */
19167 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19168 	/* 64KB. */
19169 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19170 	/* 2MB. */
19171 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19172 	/* 8MB. */
19173 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19174 	/* 1GB. */
19175 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19176 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_1G
19177 	/* TQM ring 1 page size and level. */
19178 	uint8_t	tqm_ring1_pg_size_tqm_ring1_lvl;
19179 	/* TQM ring 1 PBL indirect levels. */
19180 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_MASK	UINT32_C(0xf)
19181 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_SFT	0
19182 	/* PBL pointer is physical start address. */
19183 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_0	UINT32_C(0x0)
19184 	/* PBL pointer points to PTE table. */
19185 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_1	UINT32_C(0x1)
19186 	/*
19187 	 * PBL pointer points to PDE table with each entry pointing to PTE
19188 	 * tables.
19189 	 */
19190 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_2	UINT32_C(0x2)
19191 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_2
19192 	/* TQM ring 1 page size. */
19193 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_MASK  UINT32_C(0xf0)
19194 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_SFT   4
19195 	/* 4KB. */
19196 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19197 	/* 8KB. */
19198 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19199 	/* 64KB. */
19200 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19201 	/* 2MB. */
19202 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19203 	/* 8MB. */
19204 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19205 	/* 1GB. */
19206 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19207 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_1G
19208 	/* TQM ring 2 page size and level. */
19209 	uint8_t	tqm_ring2_pg_size_tqm_ring2_lvl;
19210 	/* TQM ring 2 PBL indirect levels. */
19211 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_MASK	UINT32_C(0xf)
19212 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_SFT	0
19213 	/* PBL pointer is physical start address. */
19214 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_0	UINT32_C(0x0)
19215 	/* PBL pointer points to PTE table. */
19216 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_1	UINT32_C(0x1)
19217 	/*
19218 	 * PBL pointer points to PDE table with each entry pointing to PTE
19219 	 * tables.
19220 	 */
19221 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_2	UINT32_C(0x2)
19222 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_2
19223 	/* TQM ring 2 page size. */
19224 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_MASK  UINT32_C(0xf0)
19225 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_SFT   4
19226 	/* 4KB. */
19227 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19228 	/* 8KB. */
19229 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19230 	/* 64KB. */
19231 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19232 	/* 2MB. */
19233 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19234 	/* 8MB. */
19235 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19236 	/* 1GB. */
19237 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19238 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_1G
19239 	/* TQM ring 3 page size and level. */
19240 	uint8_t	tqm_ring3_pg_size_tqm_ring3_lvl;
19241 	/* TQM ring 3 PBL indirect levels. */
19242 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_MASK	UINT32_C(0xf)
19243 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_SFT	0
19244 	/* PBL pointer is physical start address. */
19245 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_0	UINT32_C(0x0)
19246 	/* PBL pointer points to PTE table. */
19247 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_1	UINT32_C(0x1)
19248 	/*
19249 	 * PBL pointer points to PDE table with each entry pointing to PTE
19250 	 * tables.
19251 	 */
19252 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_2	UINT32_C(0x2)
19253 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_2
19254 	/* TQM ring 3 page size. */
19255 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_MASK  UINT32_C(0xf0)
19256 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_SFT   4
19257 	/* 4KB. */
19258 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19259 	/* 8KB. */
19260 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19261 	/* 64KB. */
19262 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19263 	/* 2MB. */
19264 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19265 	/* 8MB. */
19266 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19267 	/* 1GB. */
19268 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19269 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_1G
19270 	/* TQM ring 4 page size and level. */
19271 	uint8_t	tqm_ring4_pg_size_tqm_ring4_lvl;
19272 	/* TQM ring 4 PBL indirect levels. */
19273 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_MASK	UINT32_C(0xf)
19274 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_SFT	0
19275 	/* PBL pointer is physical start address. */
19276 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_0	UINT32_C(0x0)
19277 	/* PBL pointer points to PTE table. */
19278 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_1	UINT32_C(0x1)
19279 	/*
19280 	 * PBL pointer points to PDE table with each entry pointing to PTE
19281 	 * tables.
19282 	 */
19283 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_2	UINT32_C(0x2)
19284 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_2
19285 	/* TQM ring 4 page size. */
19286 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_MASK  UINT32_C(0xf0)
19287 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_SFT   4
19288 	/* 4KB. */
19289 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19290 	/* 8KB. */
19291 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19292 	/* 64KB. */
19293 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19294 	/* 2MB. */
19295 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19296 	/* 8MB. */
19297 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19298 	/* 1GB. */
19299 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19300 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_1G
19301 	/* TQM ring 5 page size and level. */
19302 	uint8_t	tqm_ring5_pg_size_tqm_ring5_lvl;
19303 	/* TQM ring 5 PBL indirect levels. */
19304 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_MASK	UINT32_C(0xf)
19305 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_SFT	0
19306 	/* PBL pointer is physical start address. */
19307 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_0	UINT32_C(0x0)
19308 	/* PBL pointer points to PTE table. */
19309 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_1	UINT32_C(0x1)
19310 	/*
19311 	 * PBL pointer points to PDE table with each entry pointing to PTE
19312 	 * tables.
19313 	 */
19314 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_2	UINT32_C(0x2)
19315 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_2
19316 	/* TQM ring 5 page size. */
19317 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_MASK  UINT32_C(0xf0)
19318 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_SFT   4
19319 	/* 4KB. */
19320 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19321 	/* 8KB. */
19322 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19323 	/* 64KB. */
19324 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19325 	/* 2MB. */
19326 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19327 	/* 8MB. */
19328 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19329 	/* 1GB. */
19330 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19331 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_1G
19332 	/* TQM ring 6 page size and level. */
19333 	uint8_t	tqm_ring6_pg_size_tqm_ring6_lvl;
19334 	/* TQM ring 6 PBL indirect levels. */
19335 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_MASK	UINT32_C(0xf)
19336 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_SFT	0
19337 	/* PBL pointer is physical start address. */
19338 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_0	UINT32_C(0x0)
19339 	/* PBL pointer points to PTE table. */
19340 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_1	UINT32_C(0x1)
19341 	/*
19342 	 * PBL pointer points to PDE table with each entry pointing to PTE
19343 	 * tables.
19344 	 */
19345 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_2	UINT32_C(0x2)
19346 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_2
19347 	/* TQM ring 6 page size. */
19348 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_MASK  UINT32_C(0xf0)
19349 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_SFT   4
19350 	/* 4KB. */
19351 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19352 	/* 8KB. */
19353 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19354 	/* 64KB. */
19355 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19356 	/* 2MB. */
19357 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19358 	/* 8MB. */
19359 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19360 	/* 1GB. */
19361 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19362 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_1G
19363 	/* TQM ring 7 page size and level. */
19364 	uint8_t	tqm_ring7_pg_size_tqm_ring7_lvl;
19365 	/* TQM ring 7 PBL indirect levels. */
19366 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_MASK	UINT32_C(0xf)
19367 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_SFT	0
19368 	/* PBL pointer is physical start address. */
19369 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_0	UINT32_C(0x0)
19370 	/* PBL pointer points to PTE table. */
19371 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_1	UINT32_C(0x1)
19372 	/*
19373 	 * PBL pointer points to PDE table with each entry pointing to PTE
19374 	 * tables.
19375 	 */
19376 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_2	UINT32_C(0x2)
19377 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_2
19378 	/* TQM ring 7 page size. */
19379 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_MASK  UINT32_C(0xf0)
19380 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_SFT   4
19381 	/* 4KB. */
19382 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19383 	/* 8KB. */
19384 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19385 	/* 64KB. */
19386 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19387 	/* 2MB. */
19388 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19389 	/* 8MB. */
19390 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19391 	/* 1GB. */
19392 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19393 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_1G
19394 	/* MR/AV page size and level. */
19395 	uint8_t	mrav_pg_size_mrav_lvl;
19396 	/* MR/AV PBL indirect levels. */
19397 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_MASK	UINT32_C(0xf)
19398 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_SFT	0
19399 	/* PBL pointer is physical start address. */
19400 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_0	UINT32_C(0x0)
19401 	/* PBL pointer points to PTE table. */
19402 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_1	UINT32_C(0x1)
19403 	/*
19404 	 * PBL pointer points to PDE table with each entry pointing to PTE
19405 	 * tables.
19406 	 */
19407 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_2	UINT32_C(0x2)
19408 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_2
19409 	/* MR/AV page size. */
19410 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_MASK  UINT32_C(0xf0)
19411 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_SFT   4
19412 	/* 4KB. */
19413 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19414 	/* 8KB. */
19415 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19416 	/* 64KB. */
19417 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19418 	/* 2MB. */
19419 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19420 	/* 8MB. */
19421 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19422 	/* 1GB. */
19423 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19424 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_1G
19425 	/* Timer page size and level. */
19426 	uint8_t	tim_pg_size_tim_lvl;
19427 	/* Timer PBL indirect levels. */
19428 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_MASK	UINT32_C(0xf)
19429 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_SFT	0
19430 	/* PBL pointer is physical start address. */
19431 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_0	UINT32_C(0x0)
19432 	/* PBL pointer points to PTE table. */
19433 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_1	UINT32_C(0x1)
19434 	/*
19435 	 * PBL pointer points to PDE table with each entry pointing to PTE
19436 	 * tables.
19437 	 */
19438 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_2	UINT32_C(0x2)
19439 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_2
19440 	/* Timer page size. */
19441 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_MASK  UINT32_C(0xf0)
19442 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_SFT   4
19443 	/* 4KB. */
19444 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19445 	/* 8KB. */
19446 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19447 	/* 64KB. */
19448 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19449 	/* 2MB. */
19450 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19451 	/* 8MB. */
19452 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19453 	/* 1GB. */
19454 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19455 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_1G
19456 	/* QP page directory. */
19457 	uint64_t	qpc_page_dir;
19458 	/* SRQ page directory. */
19459 	uint64_t	srq_page_dir;
19460 	/* CQ page directory. */
19461 	uint64_t	cq_page_dir;
19462 	/* VNIC page directory. */
19463 	uint64_t	vnic_page_dir;
19464 	/* Stat page directory. */
19465 	uint64_t	stat_page_dir;
19466 	/* TQM slowpath page directory. */
19467 	uint64_t	tqm_sp_page_dir;
19468 	/* TQM ring 0 page directory. */
19469 	uint64_t	tqm_ring0_page_dir;
19470 	/* TQM ring 1 page directory. */
19471 	uint64_t	tqm_ring1_page_dir;
19472 	/* TQM ring 2 page directory. */
19473 	uint64_t	tqm_ring2_page_dir;
19474 	/* TQM ring 3 page directory. */
19475 	uint64_t	tqm_ring3_page_dir;
19476 	/* TQM ring 4 page directory. */
19477 	uint64_t	tqm_ring4_page_dir;
19478 	/* TQM ring 5 page directory. */
19479 	uint64_t	tqm_ring5_page_dir;
19480 	/* TQM ring 6 page directory. */
19481 	uint64_t	tqm_ring6_page_dir;
19482 	/* TQM ring 7 page directory. */
19483 	uint64_t	tqm_ring7_page_dir;
19484 	/* MR/AV page directory. */
19485 	uint64_t	mrav_page_dir;
19486 	/* Timer page directory. */
19487 	uint64_t	tim_page_dir;
19488 	/* Number of QPs. */
19489 	uint32_t	qp_num_entries;
19490 	/* Number of SRQs. */
19491 	uint32_t	srq_num_entries;
19492 	/* Number of CQs. */
19493 	uint32_t	cq_num_entries;
19494 	/* Number of Stats. */
19495 	uint32_t	stat_num_entries;
19496 	/*
19497 	 * Number of TQM slowpath entries.
19498 	 *
19499 	 * TQM slowpath rings should be sized as follows:
19500 	 *
19501 	 * num_entries = num_vnics + num_l2_tx_rings + 2 * num_roce_qps + tqm_min_size
19502 	 *
19503 	 * Where:
19504 	 *   num_vnics is the number of VNICs allocated in the VNIC backing
19505 	 *   store num_l2_tx_rings is the number of L2 rings in the QP backing
19506 	 *   store num_roce_qps is the number of RoCE QPs in the QP backing
19507 	 *   store tqm_min_size is tqm_min_entries_per_ring reported by
19508 	 *   HWRM_FUNC_BACKING_STORE_QCAPS
19509 	 *
19510 	 * Note that TQM ring sizes cannot be extended while the system is
19511 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19512 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19513 	 * the backing store.
19514 	 */
19515 	uint32_t	tqm_sp_num_entries;
19516 	/*
19517 	 * Number of TQM ring 0 entries.
19518 	 *
19519 	 * TQM fastpath rings should be sized large enough to accommodate the
19520 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19521 	 * that can be enqueued to the TQM ring.
19522 	 *
19523 	 * Note that TQM ring sizes cannot be extended while the system is
19524 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19525 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19526 	 * the backing store.
19527 	 */
19528 	uint32_t	tqm_ring0_num_entries;
19529 	/*
19530 	 * Number of TQM ring 1 entries.
19531 	 *
19532 	 * TQM fastpath rings should be sized large enough to accommodate the
19533 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19534 	 * that can be enqueued to the TQM ring.
19535 	 *
19536 	 * Note that TQM ring sizes cannot be extended while the system is
19537 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19538 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19539 	 * the backing store.
19540 	 */
19541 	uint32_t	tqm_ring1_num_entries;
19542 	/*
19543 	 * Number of TQM ring 2 entries.
19544 	 *
19545 	 * TQM fastpath rings should be sized large enough to accommodate the
19546 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19547 	 * that can be enqueued to the TQM ring.
19548 	 *
19549 	 * Note that TQM ring sizes cannot be extended while the system is
19550 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19551 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19552 	 * the backing store.
19553 	 */
19554 	uint32_t	tqm_ring2_num_entries;
19555 	/*
19556 	 * Number of TQM ring 3 entries.
19557 	 *
19558 	 * TQM fastpath rings should be sized large enough to accommodate the
19559 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19560 	 * that can be enqueued to the TQM ring.
19561 	 *
19562 	 * Note that TQM ring sizes cannot be extended while the system is
19563 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19564 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19565 	 * the backing store.
19566 	 */
19567 	uint32_t	tqm_ring3_num_entries;
19568 	/*
19569 	 * Number of TQM ring 4 entries.
19570 	 *
19571 	 * TQM fastpath rings should be sized large enough to accommodate the
19572 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19573 	 * that can be enqueued to the TQM ring.
19574 	 *
19575 	 * Note that TQM ring sizes cannot be extended while the system is
19576 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19577 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19578 	 * the backing store.
19579 	 */
19580 	uint32_t	tqm_ring4_num_entries;
19581 	/*
19582 	 * Number of TQM ring 5 entries.
19583 	 *
19584 	 * TQM fastpath rings should be sized large enough to accommodate the
19585 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19586 	 * that can be enqueued to the TQM ring.
19587 	 *
19588 	 * Note that TQM ring sizes cannot be extended while the system is
19589 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19590 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19591 	 * the backing store.
19592 	 */
19593 	uint32_t	tqm_ring5_num_entries;
19594 	/*
19595 	 * Number of TQM ring 6 entries.
19596 	 *
19597 	 * TQM fastpath rings should be sized large enough to accommodate the
19598 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19599 	 * that can be enqueued to the TQM ring.
19600 	 *
19601 	 * Note that TQM ring sizes cannot be extended while the system is
19602 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19603 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19604 	 * the backing store.
19605 	 */
19606 	uint32_t	tqm_ring6_num_entries;
19607 	/*
19608 	 * Number of TQM ring 7 entries.
19609 	 *
19610 	 * TQM fastpath rings should be sized large enough to accommodate the
19611 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19612 	 * that can be enqueued to the TQM ring.
19613 	 *
19614 	 * Note that TQM ring sizes cannot be extended while the system is
19615 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19616 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19617 	 * the backing store.
19618 	 */
19619 	uint32_t	tqm_ring7_num_entries;
19620 	/*
19621 	 * If the MR/AV split reservation flag is not set, then this field
19622 	 * represents the total number of MR plus AV entries. For versions
19623 	 * of firmware that support the split reservation, when it is not
19624 	 * specified half of the entries will be reserved for MRs and the
19625 	 * other half for AVs.
19626 	 *
19627 	 * If the MR/AV split reservation flag is set, then this
19628 	 * field is logically divided into two 16b fields. Bits `[31:16]`
19629 	 * represents the `mr_num_entries` and bits `[15:0]` represents
19630 	 * `av_num_entries`. The granularity of these values is defined by
19631 	 * the `mrav_num_entries_unit` field returned by the
19632 	 * `backing_store_qcaps` command.
19633 	 */
19634 	uint32_t	mrav_num_entries;
19635 	/* Number of Timer entries. */
19636 	uint32_t	tim_num_entries;
19637 	/* Number of entries to reserve for QP1 */
19638 	uint16_t	qp_num_qp1_entries;
19639 	/* Number of entries to reserve for L2 */
19640 	uint16_t	qp_num_l2_entries;
19641 	/* Number of bytes that have been allocated for each context entry. */
19642 	uint16_t	qp_entry_size;
19643 	/* Number of entries to reserve for L2 */
19644 	uint16_t	srq_num_l2_entries;
19645 	/* Number of bytes that have been allocated for each context entry. */
19646 	uint16_t	srq_entry_size;
19647 	/* Number of entries to reserve for L2 */
19648 	uint16_t	cq_num_l2_entries;
19649 	/* Number of bytes that have been allocated for each context entry. */
19650 	uint16_t	cq_entry_size;
19651 	/* Number of entries to reserve for VNIC entries */
19652 	uint16_t	vnic_num_vnic_entries;
19653 	/* Number of entries to reserve for Ring table entries */
19654 	uint16_t	vnic_num_ring_table_entries;
19655 	/* Number of bytes that have been allocated for each context entry. */
19656 	uint16_t	vnic_entry_size;
19657 	/* Number of bytes that have been allocated for each context entry. */
19658 	uint16_t	stat_entry_size;
19659 	/* Number of bytes that have been allocated for each context entry. */
19660 	uint16_t	tqm_entry_size;
19661 	/* Number of bytes that have been allocated for each context entry. */
19662 	uint16_t	mrav_entry_size;
19663 	/* Number of bytes that have been allocated for each context entry. */
19664 	uint16_t	tim_entry_size;
19665 	/* TQM ring page size and level. */
19666 	uint8_t	tqm_ring8_pg_size_tqm_ring_lvl;
19667 	/* TQM ring PBL indirect levels. */
19668 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_MASK	UINT32_C(0xf)
19669 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_SFT	0
19670 	/* PBL pointer is physical start address. */
19671 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_0	UINT32_C(0x0)
19672 	/* PBL pointer points to PTE table. */
19673 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_1	UINT32_C(0x1)
19674 	/*
19675 	 * PBL pointer points to PDE table with each entry pointing to
19676 	 * PTE tables.
19677 	 */
19678 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_2	UINT32_C(0x2)
19679 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_2
19680 	/* TQM ring page size. */
19681 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_MASK  UINT32_C(0xf0)
19682 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_SFT   4
19683 	/* 4KB. */
19684 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19685 	/* 8KB. */
19686 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19687 	/* 64KB. */
19688 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19689 	/* 2MB. */
19690 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19691 	/* 8MB. */
19692 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19693 	/* 1GB. */
19694 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19695 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_1G
19696 	uint8_t	ring8_unused[3];
19697 	/* Number of TQM ring entries. */
19698 	uint32_t	tqm_ring8_num_entries;
19699 	/* TQM ring page directory. */
19700 	uint64_t	tqm_ring8_page_dir;
19701 	/* TQM ring page size and level. */
19702 	uint8_t	tqm_ring9_pg_size_tqm_ring_lvl;
19703 	/* TQM ring PBL indirect levels. */
19704 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_MASK	UINT32_C(0xf)
19705 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_SFT	0
19706 	/* PBL pointer is physical start address. */
19707 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_0	UINT32_C(0x0)
19708 	/* PBL pointer points to PTE table. */
19709 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_1	UINT32_C(0x1)
19710 	/*
19711 	 * PBL pointer points to PDE table with each entry pointing to
19712 	 * PTE tables.
19713 	 */
19714 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_2	UINT32_C(0x2)
19715 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_2
19716 	/* TQM ring page size. */
19717 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_MASK  UINT32_C(0xf0)
19718 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_SFT   4
19719 	/* 4KB. */
19720 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19721 	/* 8KB. */
19722 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19723 	/* 64KB. */
19724 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19725 	/* 2MB. */
19726 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19727 	/* 8MB. */
19728 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19729 	/* 1GB. */
19730 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19731 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_1G
19732 	uint8_t	ring9_unused[3];
19733 	/* Number of TQM ring entries. */
19734 	uint32_t	tqm_ring9_num_entries;
19735 	/* TQM ring page directory. */
19736 	uint64_t	tqm_ring9_page_dir;
19737 	/* TQM ring page size and level. */
19738 	uint8_t	tqm_ring10_pg_size_tqm_ring_lvl;
19739 	/* TQM ring PBL indirect levels. */
19740 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_MASK	UINT32_C(0xf)
19741 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_SFT	0
19742 	/* PBL pointer is physical start address. */
19743 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_0	UINT32_C(0x0)
19744 	/* PBL pointer points to PTE table. */
19745 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_1	UINT32_C(0x1)
19746 	/*
19747 	 * PBL pointer points to PDE table with each entry pointing to
19748 	 * PTE tables.
19749 	 */
19750 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_2	UINT32_C(0x2)
19751 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_2
19752 	/* TQM ring page size. */
19753 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_MASK  UINT32_C(0xf0)
19754 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_SFT   4
19755 	/* 4KB. */
19756 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19757 	/* 8KB. */
19758 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19759 	/* 64KB. */
19760 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19761 	/* 2MB. */
19762 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19763 	/* 8MB. */
19764 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19765 	/* 1GB. */
19766 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19767 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_1G
19768 	uint8_t	ring10_unused[3];
19769 	/* Number of TQM ring entries. */
19770 	uint32_t	tqm_ring10_num_entries;
19771 	/* TQM ring page directory. */
19772 	uint64_t	tqm_ring10_page_dir;
19773 	/* Number of Tx KTLS context entries allocated. */
19774 	uint32_t	tkc_num_entries;
19775 	/* Number of Rx KTLS context entries allocated. */
19776 	uint32_t	rkc_num_entries;
19777 	/* Tx KTLS context page directory. */
19778 	uint64_t	tkc_page_dir;
19779 	/* Rx KTLS context page directory. */
19780 	uint64_t	rkc_page_dir;
19781 	/* Number of bytes allocated for each Tx KTLS context entry. */
19782 	uint16_t	tkc_entry_size;
19783 	/* Number of bytes allocated for each Rx KTLS context entry. */
19784 	uint16_t	rkc_entry_size;
19785 	/* Tx KTLS context page size and level. */
19786 	uint8_t	tkc_pg_size_tkc_lvl;
19787 	/* Tx KTLS context PBL indirect levels. */
19788 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_MASK	UINT32_C(0xf)
19789 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_SFT	0
19790 	/* PBL pointer is physical start address. */
19791 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_0	UINT32_C(0x0)
19792 	/* PBL pointer points to PTE table. */
19793 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_1	UINT32_C(0x1)
19794 	/*
19795 	 * PBL pointer points to PDE table with each entry pointing to PTE
19796 	 * tables.
19797 	 */
19798 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_2	UINT32_C(0x2)
19799 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_2
19800 	/* Tx KTLS context page size. */
19801 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_MASK  UINT32_C(0xf0)
19802 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_SFT   4
19803 	/* 4KB. */
19804 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19805 	/* 8KB. */
19806 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19807 	/* 64KB. */
19808 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19809 	/* 2MB. */
19810 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19811 	/* 8MB. */
19812 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19813 	/* 1GB. */
19814 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19815 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_1G
19816 	/* Rx KTLS context page size and level. */
19817 	uint8_t	rkc_pg_size_rkc_lvl;
19818 	/* Rx KTLS context PBL indirect levels. */
19819 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_MASK	UINT32_C(0xf)
19820 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_SFT	0
19821 	/* PBL pointer is physical start address. */
19822 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_0	UINT32_C(0x0)
19823 	/* PBL pointer points to PTE table. */
19824 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_1	UINT32_C(0x1)
19825 	/*
19826 	 * PBL pointer points to PDE table with each entry pointing to
19827 	 * PTE tables.
19828 	 */
19829 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_2	UINT32_C(0x2)
19830 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LAST	HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_2
19831 	/* Rx KTLS context page size. */
19832 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_MASK  UINT32_C(0xf0)
19833 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_SFT   4
19834 	/* 4KB. */
19835 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
19836 	/* 8KB. */
19837 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
19838 	/* 64KB. */
19839 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
19840 	/* 2MB. */
19841 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
19842 	/* 8MB. */
19843 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
19844 	/* 1GB. */
19845 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
19846 		#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_1G
19847 	/*
19848 	 * Number of RoCE QP context entries reserved for this
19849 	 * function to support fast QP modify destroy feature.
19850 	 */
19851 	uint16_t	qp_num_fast_qpmd_entries;
19852 } hwrm_func_backing_store_cfg_input_t, *phwrm_func_backing_store_cfg_input_t;
19853 
19854 /* hwrm_func_backing_store_cfg_output (size:128b/16B) */
19855 
19856 typedef struct hwrm_func_backing_store_cfg_output {
19857 	/* The specific error status for the command. */
19858 	uint16_t	error_code;
19859 	/* The HWRM command request type. */
19860 	uint16_t	req_type;
19861 	/* The sequence ID from the original command. */
19862 	uint16_t	seq_id;
19863 	/* The length of the response data in number of bytes. */
19864 	uint16_t	resp_len;
19865 	uint8_t	unused_0[7];
19866 	/*
19867 	 * This field is used in Output records to indicate that the output
19868 	 * is completely written to RAM. This field should be read as '1'
19869 	 * to indicate that the output has been completely written. When
19870 	 * writing a command completion or response to an internal processor,
19871 	 * the order of writes has to be such that this field is written last.
19872 	 */
19873 	uint8_t	valid;
19874 } hwrm_func_backing_store_cfg_output_t, *phwrm_func_backing_store_cfg_output_t;
19875 
19876 /********************************
19877  * hwrm_func_backing_store_qcfg *
19878  ********************************/
19879 
19880 
19881 /* hwrm_func_backing_store_qcfg_input (size:128b/16B) */
19882 
19883 typedef struct hwrm_func_backing_store_qcfg_input {
19884 	/* The HWRM command request type. */
19885 	uint16_t	req_type;
19886 	/*
19887 	 * The completion ring to send the completion event on. This should
19888 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
19889 	 */
19890 	uint16_t	cmpl_ring;
19891 	/*
19892 	 * The sequence ID is used by the driver for tracking multiple
19893 	 * commands. This ID is treated as opaque data by the firmware and
19894 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
19895 	 */
19896 	uint16_t	seq_id;
19897 	/*
19898 	 * The target ID of the command:
19899 	 * * 0x0-0xFFF8 - The function ID
19900 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
19901 	 * * 0xFFFD - Reserved for user-space HWRM interface
19902 	 * * 0xFFFF - HWRM
19903 	 */
19904 	uint16_t	target_id;
19905 	/*
19906 	 * A physical address pointer pointing to a host buffer that the
19907 	 * command's response data will be written. This can be either a host
19908 	 * physical address (HPA) or a guest physical address (GPA) and must
19909 	 * point to a physically contiguous block of memory.
19910 	 */
19911 	uint64_t	resp_addr;
19912 } hwrm_func_backing_store_qcfg_input_t, *phwrm_func_backing_store_qcfg_input_t;
19913 
19914 /* hwrm_func_backing_store_qcfg_output (size:2496b/312B) */
19915 
19916 typedef struct hwrm_func_backing_store_qcfg_output {
19917 	/* The specific error status for the command. */
19918 	uint16_t	error_code;
19919 	/* The HWRM command request type. */
19920 	uint16_t	req_type;
19921 	/* The sequence ID from the original command. */
19922 	uint16_t	seq_id;
19923 	/* The length of the response data in number of bytes. */
19924 	uint16_t	resp_len;
19925 	uint32_t	flags;
19926 	/*
19927 	 * When set, the firmware only uses on-chip resources and does not
19928 	 * expect any backing store to be provided by the host driver. This
19929 	 * mode provides minimal L2 functionality (e.g. limited L2 resources,
19930 	 * no RoCE).
19931 	 */
19932 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_FLAGS_PREBOOT_MODE		UINT32_C(0x1)
19933 	/*
19934 	 * When set, the 32b `mrav_num_entries` field is logically divided
19935 	 * into two 16b fields, `mr_num_entries` and `av_num_entries`.
19936 	 */
19937 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_FLAGS_MRAV_RESERVATION_SPLIT	UINT32_C(0x2)
19938 	uint32_t	enables;
19939 	/*
19940 	 * This bit must be '1' for the qp fields to be
19941 	 * configured.
19942 	 */
19943 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_QP		UINT32_C(0x1)
19944 	/*
19945 	 * This bit must be '1' for the srq fields to be
19946 	 * configured.
19947 	 */
19948 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_SRQ		UINT32_C(0x2)
19949 	/*
19950 	 * This bit must be '1' for the cq fields to be
19951 	 * configured.
19952 	 */
19953 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_CQ		UINT32_C(0x4)
19954 	/*
19955 	 * This bit must be '1' for the vnic fields to be
19956 	 * configured.
19957 	 */
19958 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_VNIC		UINT32_C(0x8)
19959 	/*
19960 	 * This bit must be '1' for the stat fields to be
19961 	 * configured.
19962 	 */
19963 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_STAT		UINT32_C(0x10)
19964 	/*
19965 	 * This bit must be '1' for the tqm_sp fields to be
19966 	 * configured.
19967 	 */
19968 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_SP	UINT32_C(0x20)
19969 	/*
19970 	 * This bit must be '1' for the tqm_ring0 fields to be
19971 	 * configured.
19972 	 */
19973 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING0	UINT32_C(0x40)
19974 	/*
19975 	 * This bit must be '1' for the tqm_ring1 fields to be
19976 	 * configured.
19977 	 */
19978 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING1	UINT32_C(0x80)
19979 	/*
19980 	 * This bit must be '1' for the tqm_ring2 fields to be
19981 	 * configured.
19982 	 */
19983 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING2	UINT32_C(0x100)
19984 	/*
19985 	 * This bit must be '1' for the tqm_ring3 fields to be
19986 	 * configured.
19987 	 */
19988 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING3	UINT32_C(0x200)
19989 	/*
19990 	 * This bit must be '1' for the tqm_ring4 fields to be
19991 	 * configured.
19992 	 */
19993 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING4	UINT32_C(0x400)
19994 	/*
19995 	 * This bit must be '1' for the tqm_ring5 fields to be
19996 	 * configured.
19997 	 */
19998 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING5	UINT32_C(0x800)
19999 	/*
20000 	 * This bit must be '1' for the tqm_ring6 fields to be
20001 	 * configured.
20002 	 */
20003 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING6	UINT32_C(0x1000)
20004 	/*
20005 	 * This bit must be '1' for the tqm_ring7 fields to be
20006 	 * configured.
20007 	 */
20008 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING7	UINT32_C(0x2000)
20009 	/*
20010 	 * This bit must be '1' for the mrav fields to be
20011 	 * configured.
20012 	 */
20013 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_MRAV		UINT32_C(0x4000)
20014 	/*
20015 	 * This bit must be '1' for the tim fields to be
20016 	 * configured.
20017 	 */
20018 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TIM		UINT32_C(0x8000)
20019 	/*
20020 	 * This bit must be '1' for the tqm_ring8 fields to be
20021 	 * configured.
20022 	 */
20023 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING8	UINT32_C(0x10000)
20024 	/*
20025 	 * This bit must be '1' for the tqm_ring9 fields to be
20026 	 * configured.
20027 	 */
20028 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING9	UINT32_C(0x20000)
20029 	/*
20030 	 * This bit must be '1' for the tqm_ring10 fields to be
20031 	 * configured.
20032 	 */
20033 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING10	UINT32_C(0x40000)
20034 	/*
20035 	 * This bit must be '1' for the Tx KTLS context
20036 	 * fields to be configured.
20037 	 */
20038 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TKC		UINT32_C(0x80000)
20039 	/*
20040 	 * This bit must be '1' for the Rx KTLS context
20041 	 * fields to be configured.
20042 	 */
20043 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_RKC		UINT32_C(0x100000)
20044 	/*
20045 	 * This bit must be '1' for the number of QPs reserved for fast
20046 	 * qp modify destroy feature to be configured.
20047 	 */
20048 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_QP_FAST_QPMD	UINT32_C(0x200000)
20049 	/* QPC page size and level. */
20050 	uint8_t	qpc_pg_size_qpc_lvl;
20051 	/* QPC PBL indirect levels. */
20052 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_MASK	UINT32_C(0xf)
20053 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_SFT	0
20054 	/* PBL pointer is physical start address. */
20055 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_0	UINT32_C(0x0)
20056 	/* PBL pointer points to PTE table. */
20057 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_1	UINT32_C(0x1)
20058 	/*
20059 	 * PBL pointer points to PDE table with each entry pointing to PTE
20060 	 * tables.
20061 	 */
20062 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_2	UINT32_C(0x2)
20063 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_2
20064 	/* QPC page size. */
20065 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_MASK  UINT32_C(0xf0)
20066 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_SFT   4
20067 	/* 4KB. */
20068 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20069 	/* 8KB. */
20070 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20071 	/* 64KB. */
20072 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20073 	/* 2MB. */
20074 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20075 	/* 8MB. */
20076 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20077 	/* 1GB. */
20078 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20079 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_1G
20080 	/* SRQ page size and level. */
20081 	uint8_t	srq_pg_size_srq_lvl;
20082 	/* SRQ PBL indirect levels. */
20083 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_MASK	UINT32_C(0xf)
20084 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_SFT	0
20085 	/* PBL pointer is physical start address. */
20086 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_0	UINT32_C(0x0)
20087 	/* PBL pointer points to PTE table. */
20088 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_1	UINT32_C(0x1)
20089 	/*
20090 	 * PBL pointer points to PDE table with each entry pointing to PTE
20091 	 * tables.
20092 	 */
20093 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_2	UINT32_C(0x2)
20094 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_2
20095 	/* SRQ page size. */
20096 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_MASK  UINT32_C(0xf0)
20097 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_SFT   4
20098 	/* 4KB. */
20099 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20100 	/* 8KB. */
20101 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20102 	/* 64KB. */
20103 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20104 	/* 2MB. */
20105 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20106 	/* 8MB. */
20107 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20108 	/* 1GB. */
20109 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20110 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_1G
20111 	/* CQ page size and level. */
20112 	uint8_t	cq_pg_size_cq_lvl;
20113 	/* CQ PBL indirect levels. */
20114 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_MASK	UINT32_C(0xf)
20115 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_SFT	0
20116 	/* PBL pointer is physical start address. */
20117 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_0	UINT32_C(0x0)
20118 	/* PBL pointer points to PTE table. */
20119 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_1	UINT32_C(0x1)
20120 	/*
20121 	 * PBL pointer points to PDE table with each entry pointing to PTE
20122 	 * tables.
20123 	 */
20124 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_2	UINT32_C(0x2)
20125 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_2
20126 	/* CQ page size. */
20127 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_MASK  UINT32_C(0xf0)
20128 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_SFT   4
20129 	/* 4KB. */
20130 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20131 	/* 8KB. */
20132 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20133 	/* 64KB. */
20134 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20135 	/* 2MB. */
20136 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20137 	/* 8MB. */
20138 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20139 	/* 1GB. */
20140 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20141 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_1G
20142 	/* VNIC page size and level. */
20143 	uint8_t	vnic_pg_size_vnic_lvl;
20144 	/* VNIC PBL indirect levels. */
20145 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_MASK	UINT32_C(0xf)
20146 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_SFT	0
20147 	/* PBL pointer is physical start address. */
20148 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_0	UINT32_C(0x0)
20149 	/* PBL pointer points to PTE table. */
20150 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_1	UINT32_C(0x1)
20151 	/*
20152 	 * PBL pointer points to PDE table with each entry pointing to PTE
20153 	 * tables.
20154 	 */
20155 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_2	UINT32_C(0x2)
20156 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_2
20157 	/* VNIC page size. */
20158 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_MASK  UINT32_C(0xf0)
20159 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_SFT   4
20160 	/* 4KB. */
20161 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20162 	/* 8KB. */
20163 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20164 	/* 64KB. */
20165 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20166 	/* 2MB. */
20167 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20168 	/* 8MB. */
20169 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20170 	/* 1GB. */
20171 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20172 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_1G
20173 	/* Stat page size and level. */
20174 	uint8_t	stat_pg_size_stat_lvl;
20175 	/* Stat PBL indirect levels. */
20176 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_MASK	UINT32_C(0xf)
20177 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_SFT	0
20178 	/* PBL pointer is physical start address. */
20179 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_0	UINT32_C(0x0)
20180 	/* PBL pointer points to PTE table. */
20181 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_1	UINT32_C(0x1)
20182 	/*
20183 	 * PBL pointer points to PDE table with each entry pointing to PTE
20184 	 * tables.
20185 	 */
20186 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_2	UINT32_C(0x2)
20187 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_2
20188 	/* Stat page size. */
20189 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_MASK  UINT32_C(0xf0)
20190 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_SFT   4
20191 	/* 4KB. */
20192 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20193 	/* 8KB. */
20194 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20195 	/* 64KB. */
20196 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20197 	/* 2MB. */
20198 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20199 	/* 8MB. */
20200 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20201 	/* 1GB. */
20202 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20203 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_1G
20204 	/* TQM slow path page size and level. */
20205 	uint8_t	tqm_sp_pg_size_tqm_sp_lvl;
20206 	/* TQM slow path PBL indirect levels. */
20207 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_MASK	UINT32_C(0xf)
20208 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_SFT	0
20209 	/* PBL pointer is physical start address. */
20210 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_0	UINT32_C(0x0)
20211 	/* PBL pointer points to PTE table. */
20212 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_1	UINT32_C(0x1)
20213 	/*
20214 	 * PBL pointer points to PDE table with each entry pointing to PTE
20215 	 * tables.
20216 	 */
20217 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_2	UINT32_C(0x2)
20218 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_2
20219 	/* TQM slow path page size. */
20220 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_MASK  UINT32_C(0xf0)
20221 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_SFT   4
20222 	/* 4KB. */
20223 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20224 	/* 8KB. */
20225 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20226 	/* 64KB. */
20227 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20228 	/* 2MB. */
20229 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20230 	/* 8MB. */
20231 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20232 	/* 1GB. */
20233 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20234 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_1G
20235 	/* TQM ring 0 page size and level. */
20236 	uint8_t	tqm_ring0_pg_size_tqm_ring0_lvl;
20237 	/* TQM ring 0 PBL indirect levels. */
20238 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_MASK	UINT32_C(0xf)
20239 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_SFT	0
20240 	/* PBL pointer is physical start address. */
20241 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_0	UINT32_C(0x0)
20242 	/* PBL pointer points to PTE table. */
20243 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_1	UINT32_C(0x1)
20244 	/*
20245 	 * PBL pointer points to PDE table with each entry pointing to PTE
20246 	 * tables.
20247 	 */
20248 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_2	UINT32_C(0x2)
20249 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_2
20250 	/* TQM ring 0 page size. */
20251 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_MASK  UINT32_C(0xf0)
20252 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_SFT   4
20253 	/* 4KB. */
20254 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20255 	/* 8KB. */
20256 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20257 	/* 64KB. */
20258 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20259 	/* 2MB. */
20260 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20261 	/* 8MB. */
20262 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20263 	/* 1GB. */
20264 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20265 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_1G
20266 	/* TQM ring 1 page size and level. */
20267 	uint8_t	tqm_ring1_pg_size_tqm_ring1_lvl;
20268 	/* TQM ring 1 PBL indirect levels. */
20269 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_MASK	UINT32_C(0xf)
20270 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_SFT	0
20271 	/* PBL pointer is physical start address. */
20272 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_0	UINT32_C(0x0)
20273 	/* PBL pointer points to PTE table. */
20274 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_1	UINT32_C(0x1)
20275 	/*
20276 	 * PBL pointer points to PDE table with each entry pointing to PTE
20277 	 * tables.
20278 	 */
20279 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_2	UINT32_C(0x2)
20280 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_2
20281 	/* TQM ring 1 page size. */
20282 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_MASK  UINT32_C(0xf0)
20283 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_SFT   4
20284 	/* 4KB. */
20285 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20286 	/* 8KB. */
20287 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20288 	/* 64KB. */
20289 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20290 	/* 2MB. */
20291 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20292 	/* 8MB. */
20293 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20294 	/* 1GB. */
20295 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20296 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_1G
20297 	/* TQM ring 2 page size and level. */
20298 	uint8_t	tqm_ring2_pg_size_tqm_ring2_lvl;
20299 	/* TQM ring 2 PBL indirect levels. */
20300 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_MASK	UINT32_C(0xf)
20301 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_SFT	0
20302 	/* PBL pointer is physical start address. */
20303 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_0	UINT32_C(0x0)
20304 	/* PBL pointer points to PTE table. */
20305 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_1	UINT32_C(0x1)
20306 	/*
20307 	 * PBL pointer points to PDE table with each entry pointing to PTE
20308 	 * tables.
20309 	 */
20310 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_2	UINT32_C(0x2)
20311 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_2
20312 	/* TQM ring 2 page size. */
20313 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_MASK  UINT32_C(0xf0)
20314 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_SFT   4
20315 	/* 4KB. */
20316 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20317 	/* 8KB. */
20318 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20319 	/* 64KB. */
20320 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20321 	/* 2MB. */
20322 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20323 	/* 8MB. */
20324 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20325 	/* 1GB. */
20326 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20327 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_1G
20328 	/* TQM ring 3 page size and level. */
20329 	uint8_t	tqm_ring3_pg_size_tqm_ring3_lvl;
20330 	/* TQM ring 3 PBL indirect levels. */
20331 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_MASK	UINT32_C(0xf)
20332 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_SFT	0
20333 	/* PBL pointer is physical start address. */
20334 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_0	UINT32_C(0x0)
20335 	/* PBL pointer points to PTE table. */
20336 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_1	UINT32_C(0x1)
20337 	/*
20338 	 * PBL pointer points to PDE table with each entry pointing to PTE
20339 	 * tables.
20340 	 */
20341 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_2	UINT32_C(0x2)
20342 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_2
20343 	/* TQM ring 3 page size. */
20344 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_MASK  UINT32_C(0xf0)
20345 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_SFT   4
20346 	/* 4KB. */
20347 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20348 	/* 8KB. */
20349 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20350 	/* 64KB. */
20351 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20352 	/* 2MB. */
20353 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20354 	/* 8MB. */
20355 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20356 	/* 1GB. */
20357 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20358 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_1G
20359 	/* TQM ring 4 page size and level. */
20360 	uint8_t	tqm_ring4_pg_size_tqm_ring4_lvl;
20361 	/* TQM ring 4 PBL indirect levels. */
20362 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_MASK	UINT32_C(0xf)
20363 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_SFT	0
20364 	/* PBL pointer is physical start address. */
20365 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_0	UINT32_C(0x0)
20366 	/* PBL pointer points to PTE table. */
20367 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_1	UINT32_C(0x1)
20368 	/*
20369 	 * PBL pointer points to PDE table with each entry pointing to PTE
20370 	 * tables.
20371 	 */
20372 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_2	UINT32_C(0x2)
20373 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_2
20374 	/* TQM ring 4 page size. */
20375 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_MASK  UINT32_C(0xf0)
20376 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_SFT   4
20377 	/* 4KB. */
20378 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20379 	/* 8KB. */
20380 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20381 	/* 64KB. */
20382 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20383 	/* 2MB. */
20384 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20385 	/* 8MB. */
20386 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20387 	/* 1GB. */
20388 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20389 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_1G
20390 	/* TQM ring 5 page size and level. */
20391 	uint8_t	tqm_ring5_pg_size_tqm_ring5_lvl;
20392 	/* TQM ring 5 PBL indirect levels. */
20393 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_MASK	UINT32_C(0xf)
20394 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_SFT	0
20395 	/* PBL pointer is physical start address. */
20396 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_0	UINT32_C(0x0)
20397 	/* PBL pointer points to PTE table. */
20398 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_1	UINT32_C(0x1)
20399 	/*
20400 	 * PBL pointer points to PDE table with each entry pointing to PTE
20401 	 * tables.
20402 	 */
20403 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_2	UINT32_C(0x2)
20404 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_2
20405 	/* TQM ring 5 page size. */
20406 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_MASK  UINT32_C(0xf0)
20407 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_SFT   4
20408 	/* 4KB. */
20409 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20410 	/* 8KB. */
20411 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20412 	/* 64KB. */
20413 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20414 	/* 2MB. */
20415 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20416 	/* 8MB. */
20417 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20418 	/* 1GB. */
20419 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20420 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_1G
20421 	/* TQM ring 6 page size and level. */
20422 	uint8_t	tqm_ring6_pg_size_tqm_ring6_lvl;
20423 	/* TQM ring 6 PBL indirect levels. */
20424 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_MASK	UINT32_C(0xf)
20425 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_SFT	0
20426 	/* PBL pointer is physical start address. */
20427 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_0	UINT32_C(0x0)
20428 	/* PBL pointer points to PTE table. */
20429 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_1	UINT32_C(0x1)
20430 	/*
20431 	 * PBL pointer points to PDE table with each entry pointing to PTE
20432 	 * tables.
20433 	 */
20434 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_2	UINT32_C(0x2)
20435 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_2
20436 	/* TQM ring 6 page size. */
20437 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_MASK  UINT32_C(0xf0)
20438 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_SFT   4
20439 	/* 4KB. */
20440 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20441 	/* 8KB. */
20442 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20443 	/* 64KB. */
20444 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20445 	/* 2MB. */
20446 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20447 	/* 8MB. */
20448 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20449 	/* 1GB. */
20450 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20451 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_1G
20452 	/* TQM ring 7 page size and level. */
20453 	uint8_t	tqm_ring7_pg_size_tqm_ring7_lvl;
20454 	/* TQM ring 7 PBL indirect levels. */
20455 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_MASK	UINT32_C(0xf)
20456 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_SFT	0
20457 	/* PBL pointer is physical start address. */
20458 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_0	UINT32_C(0x0)
20459 	/* PBL pointer points to PTE table. */
20460 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_1	UINT32_C(0x1)
20461 	/*
20462 	 * PBL pointer points to PDE table with each entry pointing to PTE
20463 	 * tables.
20464 	 */
20465 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_2	UINT32_C(0x2)
20466 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_2
20467 	/* TQM ring 7 page size. */
20468 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_MASK  UINT32_C(0xf0)
20469 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_SFT   4
20470 	/* 4KB. */
20471 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20472 	/* 8KB. */
20473 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20474 	/* 64KB. */
20475 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20476 	/* 2MB. */
20477 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20478 	/* 8MB. */
20479 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20480 	/* 1GB. */
20481 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20482 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_1G
20483 	/* MR/AV page size and level. */
20484 	uint8_t	mrav_pg_size_mrav_lvl;
20485 	/* MR/AV PBL indirect levels. */
20486 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_MASK	UINT32_C(0xf)
20487 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_SFT	0
20488 	/* PBL pointer is physical start address. */
20489 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_0	UINT32_C(0x0)
20490 	/* PBL pointer points to PTE table. */
20491 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_1	UINT32_C(0x1)
20492 	/*
20493 	 * PBL pointer points to PDE table with each entry pointing to PTE
20494 	 * tables.
20495 	 */
20496 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_2	UINT32_C(0x2)
20497 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_2
20498 	/* MR/AV page size. */
20499 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_MASK  UINT32_C(0xf0)
20500 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_SFT   4
20501 	/* 4KB. */
20502 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20503 	/* 8KB. */
20504 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20505 	/* 64KB. */
20506 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20507 	/* 2MB. */
20508 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20509 	/* 8MB. */
20510 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20511 	/* 1GB. */
20512 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20513 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_1G
20514 	/* Timer page size and level. */
20515 	uint8_t	tim_pg_size_tim_lvl;
20516 	/* Timer PBL indirect levels. */
20517 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_MASK	UINT32_C(0xf)
20518 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_SFT	0
20519 	/* PBL pointer is physical start address. */
20520 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_0	UINT32_C(0x0)
20521 	/* PBL pointer points to PTE table. */
20522 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_1	UINT32_C(0x1)
20523 	/*
20524 	 * PBL pointer points to PDE table with each entry pointing to PTE
20525 	 * tables.
20526 	 */
20527 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_2	UINT32_C(0x2)
20528 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_2
20529 	/* Timer page size. */
20530 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_MASK  UINT32_C(0xf0)
20531 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_SFT   4
20532 	/* 4KB. */
20533 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20534 	/* 8KB. */
20535 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20536 	/* 64KB. */
20537 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20538 	/* 2MB. */
20539 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20540 	/* 8MB. */
20541 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20542 	/* 1GB. */
20543 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20544 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_1G
20545 	/* QP page directory. */
20546 	uint64_t	qpc_page_dir;
20547 	/* SRQ page directory. */
20548 	uint64_t	srq_page_dir;
20549 	/* CQ page directory. */
20550 	uint64_t	cq_page_dir;
20551 	/* VNIC page directory. */
20552 	uint64_t	vnic_page_dir;
20553 	/* Stat page directory. */
20554 	uint64_t	stat_page_dir;
20555 	/* TQM slowpath page directory. */
20556 	uint64_t	tqm_sp_page_dir;
20557 	/* TQM ring 0 page directory. */
20558 	uint64_t	tqm_ring0_page_dir;
20559 	/* TQM ring 1 page directory. */
20560 	uint64_t	tqm_ring1_page_dir;
20561 	/* TQM ring 2 page directory. */
20562 	uint64_t	tqm_ring2_page_dir;
20563 	/* TQM ring 3 page directory. */
20564 	uint64_t	tqm_ring3_page_dir;
20565 	/* TQM ring 4 page directory. */
20566 	uint64_t	tqm_ring4_page_dir;
20567 	/* TQM ring 5 page directory. */
20568 	uint64_t	tqm_ring5_page_dir;
20569 	/* TQM ring 6 page directory. */
20570 	uint64_t	tqm_ring6_page_dir;
20571 	/* TQM ring 7 page directory. */
20572 	uint64_t	tqm_ring7_page_dir;
20573 	/* MR/AV page directory. */
20574 	uint64_t	mrav_page_dir;
20575 	/* Timer page directory. */
20576 	uint64_t	tim_page_dir;
20577 	/* Number of entries to reserve for QP1 */
20578 	uint16_t	qp_num_qp1_entries;
20579 	/* Number of entries to reserve for L2 */
20580 	uint16_t	qp_num_l2_entries;
20581 	/* Number of QPs. */
20582 	uint32_t	qp_num_entries;
20583 	/* Number of SRQs. */
20584 	uint32_t	srq_num_entries;
20585 	/* Number of entries to reserve for L2 */
20586 	uint16_t	srq_num_l2_entries;
20587 	/* Number of entries to reserve for L2 */
20588 	uint16_t	cq_num_l2_entries;
20589 	/* Number of CQs. */
20590 	uint32_t	cq_num_entries;
20591 	/* Number of entries to reserve for VNIC entries */
20592 	uint16_t	vnic_num_vnic_entries;
20593 	/* Number of entries to reserve for Ring table entries */
20594 	uint16_t	vnic_num_ring_table_entries;
20595 	/* Number of Stats. */
20596 	uint32_t	stat_num_entries;
20597 	/* Number of TQM slowpath entries. */
20598 	uint32_t	tqm_sp_num_entries;
20599 	/* Number of TQM ring 0 entries. */
20600 	uint32_t	tqm_ring0_num_entries;
20601 	/* Number of TQM ring 1 entries. */
20602 	uint32_t	tqm_ring1_num_entries;
20603 	/* Number of TQM ring 2 entries. */
20604 	uint32_t	tqm_ring2_num_entries;
20605 	/* Number of TQM ring 3 entries. */
20606 	uint32_t	tqm_ring3_num_entries;
20607 	/* Number of TQM ring 4 entries. */
20608 	uint32_t	tqm_ring4_num_entries;
20609 	/* Number of TQM ring 5 entries. */
20610 	uint32_t	tqm_ring5_num_entries;
20611 	/* Number of TQM ring 6 entries. */
20612 	uint32_t	tqm_ring6_num_entries;
20613 	/* Number of TQM ring 7 entries. */
20614 	uint32_t	tqm_ring7_num_entries;
20615 	/*
20616 	 * If the MR/AV split reservation flag is not set, then this field
20617 	 * represents the total number of MR plus AV entries. For versions
20618 	 * of firmware that support the split reservation, when it is not
20619 	 * specified half of the entries will be reserved for MRs and the
20620 	 * other half for AVs.
20621 	 *
20622 	 * If the MR/AV split reservation flag is set, then this
20623 	 * field is logically divided into two 16b fields. Bits `[31:16]`
20624 	 * represents the `mr_num_entries` and bits `[15:0]` represents
20625 	 * `av_num_entries`. The granularity of these values is defined by
20626 	 * the `mrav_num_entries_unit` field returned by the
20627 	 * `backing_store_qcaps` command.
20628 	 */
20629 	uint32_t	mrav_num_entries;
20630 	/* Number of Timer entries. */
20631 	uint32_t	tim_num_entries;
20632 	/* TQM ring page size and level. */
20633 	uint8_t	tqm_ring8_pg_size_tqm_ring_lvl;
20634 	/* TQM ring PBL indirect levels. */
20635 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_MASK	UINT32_C(0xf)
20636 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_SFT	0
20637 	/* PBL pointer is physical start address. */
20638 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_0	UINT32_C(0x0)
20639 	/* PBL pointer points to PTE table. */
20640 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_1	UINT32_C(0x1)
20641 	/*
20642 	 * PBL pointer points to PDE table with each entry pointing to
20643 	 * PTE tables.
20644 	 */
20645 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_2	UINT32_C(0x2)
20646 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_2
20647 	/* TQM ring page size. */
20648 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_MASK  UINT32_C(0xf0)
20649 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_SFT   4
20650 	/* 4KB. */
20651 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20652 	/* 8KB. */
20653 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20654 	/* 64KB. */
20655 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20656 	/* 2MB. */
20657 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20658 	/* 8MB. */
20659 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20660 	/* 1GB. */
20661 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20662 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_1G
20663 	uint8_t	ring8_unused[3];
20664 	/* Number of TQM ring entries. */
20665 	uint32_t	tqm_ring8_num_entries;
20666 	/* TQM ring page directory. */
20667 	uint64_t	tqm_ring8_page_dir;
20668 	/* TQM ring page size and level. */
20669 	uint8_t	tqm_ring9_pg_size_tqm_ring_lvl;
20670 	/* TQM ring PBL indirect levels. */
20671 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_MASK	UINT32_C(0xf)
20672 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_SFT	0
20673 	/* PBL pointer is physical start address. */
20674 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_0	UINT32_C(0x0)
20675 	/* PBL pointer points to PTE table. */
20676 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_1	UINT32_C(0x1)
20677 	/*
20678 	 * PBL pointer points to PDE table with each entry pointing to
20679 	 * PTE tables.
20680 	 */
20681 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_2	UINT32_C(0x2)
20682 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_2
20683 	/* TQM ring page size. */
20684 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_MASK  UINT32_C(0xf0)
20685 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_SFT   4
20686 	/* 4KB. */
20687 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20688 	/* 8KB. */
20689 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20690 	/* 64KB. */
20691 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20692 	/* 2MB. */
20693 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20694 	/* 8MB. */
20695 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20696 	/* 1GB. */
20697 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20698 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_1G
20699 	uint8_t	ring9_unused[3];
20700 	/* Number of TQM ring entries. */
20701 	uint32_t	tqm_ring9_num_entries;
20702 	/* TQM ring page directory. */
20703 	uint64_t	tqm_ring9_page_dir;
20704 	/* TQM ring page size and level. */
20705 	uint8_t	tqm_ring10_pg_size_tqm_ring_lvl;
20706 	/* TQM ring PBL indirect levels. */
20707 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_MASK	UINT32_C(0xf)
20708 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_SFT	0
20709 	/* PBL pointer is physical start address. */
20710 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_0	UINT32_C(0x0)
20711 	/* PBL pointer points to PTE table. */
20712 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_1	UINT32_C(0x1)
20713 	/*
20714 	 * PBL pointer points to PDE table with each entry pointing to
20715 	 * PTE tables.
20716 	 */
20717 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_2	UINT32_C(0x2)
20718 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_2
20719 	/* TQM ring page size. */
20720 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_MASK  UINT32_C(0xf0)
20721 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_SFT   4
20722 	/* 4KB. */
20723 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20724 	/* 8KB. */
20725 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20726 	/* 64KB. */
20727 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20728 	/* 2MB. */
20729 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20730 	/* 8MB. */
20731 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20732 	/* 1GB. */
20733 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20734 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_1G
20735 	uint8_t	ring10_unused[3];
20736 	/* Number of TQM ring entries. */
20737 	uint32_t	tqm_ring10_num_entries;
20738 	/* TQM ring page directory. */
20739 	uint64_t	tqm_ring10_page_dir;
20740 	/* Number of Tx KTLS context entries. */
20741 	uint32_t	tkc_num_entries;
20742 	/* Number of Rx KTLS context entries. */
20743 	uint32_t	rkc_num_entries;
20744 	/* Tx KTLS context page directory. */
20745 	uint64_t	tkc_page_dir;
20746 	/* Rx KTLS context page directory. */
20747 	uint64_t	rkc_page_dir;
20748 	/* Tx KTLS context page size and level. */
20749 	uint8_t	tkc_pg_size_tkc_lvl;
20750 	/* Tx KTLS context PBL indirect levels. */
20751 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_MASK	UINT32_C(0xf)
20752 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_SFT	0
20753 	/* PBL pointer is physical start address. */
20754 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_0	UINT32_C(0x0)
20755 	/* PBL pointer points to PTE table. */
20756 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_1	UINT32_C(0x1)
20757 	/*
20758 	 * PBL pointer points to PDE table with each entry pointing to
20759 	 * PTE tables.
20760 	 */
20761 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_2	UINT32_C(0x2)
20762 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_2
20763 	/* Tx KTLS context page size. */
20764 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_MASK  UINT32_C(0xf0)
20765 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_SFT   4
20766 	/* 4KB. */
20767 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20768 	/* 8KB. */
20769 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20770 	/* 64KB. */
20771 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20772 	/* 2MB. */
20773 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20774 	/* 8MB. */
20775 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20776 	/* 1GB. */
20777 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20778 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_1G
20779 	/* Rx KTLS context page size and level. */
20780 	uint8_t	rkc_pg_size_rkc_lvl;
20781 	/* Rx KTLS context PBL indirect levels. */
20782 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_MASK	UINT32_C(0xf)
20783 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_SFT	0
20784 	/* PBL pointer is physical start address. */
20785 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_0	UINT32_C(0x0)
20786 	/* PBL pointer points to PTE table. */
20787 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_1	UINT32_C(0x1)
20788 	/*
20789 	 * PBL pointer points to PDE table with each entry pointing to
20790 	 * PTE tables.
20791 	 */
20792 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_2	UINT32_C(0x2)
20793 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LAST	HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_2
20794 	/* Rx KTLS context page size. */
20795 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_MASK  UINT32_C(0xf0)
20796 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_SFT   4
20797 	/* 4KB. */
20798 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
20799 	/* 8KB. */
20800 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
20801 	/* 64KB. */
20802 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
20803 	/* 2MB. */
20804 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
20805 	/* 8MB. */
20806 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
20807 	/* 1GB. */
20808 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
20809 		#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_1G
20810 	/*
20811 	 * Number of RoCE QP context entries required for this
20812 	 * function to support fast QP modify destroy feature.
20813 	 */
20814 	uint16_t	qp_num_fast_qpmd_entries;
20815 	uint8_t	unused_1[3];
20816 	/*
20817 	 * This field is used in Output records to indicate that the output
20818 	 * is completely written to RAM. This field should be read as 1
20819 	 * to indicate that the output has been completely written.
20820 	 * When writing a command completion or response to an internal
20821 	 * processor, the order of writes has to be such that this field
20822 	 * is written last.
20823 	 */
20824 	uint8_t	valid;
20825 } hwrm_func_backing_store_qcfg_output_t, *phwrm_func_backing_store_qcfg_output_t;
20826 
20827 /****************************
20828  * hwrm_error_recovery_qcfg *
20829  ****************************/
20830 
20831 
20832 /* hwrm_error_recovery_qcfg_input (size:192b/24B) */
20833 
20834 typedef struct hwrm_error_recovery_qcfg_input {
20835 	/* The HWRM command request type. */
20836 	uint16_t	req_type;
20837 	/*
20838 	 * The completion ring to send the completion event on. This should
20839 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
20840 	 */
20841 	uint16_t	cmpl_ring;
20842 	/*
20843 	 * The sequence ID is used by the driver for tracking multiple
20844 	 * commands. This ID is treated as opaque data by the firmware and
20845 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
20846 	 */
20847 	uint16_t	seq_id;
20848 	/*
20849 	 * The target ID of the command:
20850 	 * * 0x0-0xFFF8 - The function ID
20851 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
20852 	 * * 0xFFFD - Reserved for user-space HWRM interface
20853 	 * * 0xFFFF - HWRM
20854 	 */
20855 	uint16_t	target_id;
20856 	/*
20857 	 * A physical address pointer pointing to a host buffer that the
20858 	 * command's response data will be written. This can be either a host
20859 	 * physical address (HPA) or a guest physical address (GPA) and must
20860 	 * point to a physically contiguous block of memory.
20861 	 */
20862 	uint64_t	resp_addr;
20863 	uint8_t	unused_0[8];
20864 } hwrm_error_recovery_qcfg_input_t, *phwrm_error_recovery_qcfg_input_t;
20865 
20866 /* hwrm_error_recovery_qcfg_output (size:1664b/208B) */
20867 
20868 typedef struct hwrm_error_recovery_qcfg_output {
20869 	/* The specific error status for the command. */
20870 	uint16_t	error_code;
20871 	/* The HWRM command request type. */
20872 	uint16_t	req_type;
20873 	/* The sequence ID from the original command. */
20874 	uint16_t	seq_id;
20875 	/* The length of the response data in number of bytes. */
20876 	uint16_t	resp_len;
20877 	uint32_t	flags;
20878 	/*
20879 	 * When this flag is set to 1, error recovery will be initiated
20880 	 * through master function driver.
20881 	 */
20882 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FLAGS_HOST	UINT32_C(0x1)
20883 	/*
20884 	 * When this flag is set to 1, error recovery will be performed
20885 	 * through Co processor.
20886 	 */
20887 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FLAGS_CO_CPU	UINT32_C(0x2)
20888 	/*
20889 	 * Driver Polling frequency. This value is in units of 100msec.
20890 	 * Typical value would be 10 to indicate 1sec.
20891 	 * Drivers can poll FW health status, Heartbeat, reset_counter with
20892 	 * this frequency.
20893 	 */
20894 	uint32_t	driver_polling_freq;
20895 	/*
20896 	 * This value is in units of 100msec.
20897 	 * Typical value would be 30 to indicate 3sec.
20898 	 * Master function wait period from detecting a fatal error to
20899 	 * initiating reset. In this time period Master PF expects every
20900 	 * active driver will detect fatal error.
20901 	 */
20902 	uint32_t	master_func_wait_period;
20903 	/*
20904 	 * This value is in units of 100msec.
20905 	 * Typical value would be 50 to indicate 5sec.
20906 	 * Normal function wait period from fatal error detection to
20907 	 * polling FW health status. In this time period, drivers should not
20908 	 * do any PCIe MMIO transaction and should not send any HWRM commands.
20909 	 */
20910 	uint32_t	normal_func_wait_period;
20911 	/*
20912 	 * This value is in units of 100msec.
20913 	 * Typical value would be 20 to indicate 2sec.
20914 	 * This field indicates that, master function wait period after chip
20915 	 * reset. After this time, master function should reinitialize with
20916 	 * FW.
20917 	 */
20918 	uint32_t	master_func_wait_period_after_reset;
20919 	/*
20920 	 * This value is in units of 100msec.
20921 	 * Typical value would be 60 to indicate 6sec.
20922 	 * This field is applicable to both master and normal functions.
20923 	 * Even after chip reset, if FW status not changed to ready,
20924 	 * then all the functions can poll for this much time and bailout.
20925 	 */
20926 	uint32_t	max_bailout_time_after_reset;
20927 	/*
20928 	 * FW health status register.
20929 	 * Lower 2 bits indicates address space location and upper 30 bits
20930 	 * indicates upper 30bits of the register address.
20931 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
20932 	 */
20933 	uint32_t	fw_health_status_reg;
20934 	/* Lower 2 bits indicates address space location. */
20935 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
20936 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_SFT	0
20937 	/*
20938 	 * If value is 0, this register is located in PCIe config space.
20939 	 * Drivers have to map appropriate window to access this
20940 	 * register.
20941 	 */
20942 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
20943 	/*
20944 	 * If value is 1, this register is located in GRC address space.
20945 	 * Drivers have to map appropriate window to access this
20946 	 * register.
20947 	 */
20948 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
20949 	/*
20950 	 * If value is 2, this register is located in first BAR address
20951 	 * space. Drivers have to map appropriate window to access this
20952 	 * register.
20953 	 */
20954 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
20955 	/*
20956 	 * If value is 3, this register is located in second BAR address
20957 	 * space. Drivers have to map appropriate window to access this
20958 	 * Drivers have to map appropriate window to access this
20959 	 * register.
20960 	 */
20961 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
20962 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_LAST	HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_BAR1
20963 	/* Upper 30bits of the register address. */
20964 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_MASK	UINT32_C(0xfffffffc)
20965 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SFT	2
20966 	/*
20967 	 * FW HeartBeat register.
20968 	 * Lower 2 bits indicates address space location and upper 30 bits
20969 	 * indicates actual address.
20970 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
20971 	 */
20972 	uint32_t	fw_heartbeat_reg;
20973 	/* Lower 2 bits indicates address space location. */
20974 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
20975 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_SFT	0
20976 	/*
20977 	 * If value is 0, this register is located in PCIe config space.
20978 	 * Drivers have to map appropriate window to access this
20979 	 * register.
20980 	 */
20981 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
20982 	/*
20983 	 * If value is 1, this register is located in GRC address space.
20984 	 * Drivers have to map appropriate window to access this
20985 	 * register.
20986 	 */
20987 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
20988 	/*
20989 	 * If value is 2, this register is located in first BAR address
20990 	 * space. Drivers have to map appropriate window to access this
20991 	 * register.
20992 	 */
20993 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
20994 	/*
20995 	 * If value is 3, this register is located in second BAR address
20996 	 * space. Drivers have to map appropriate window to access this
20997 	 * register.
20998 	 */
20999 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
21000 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_LAST	HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_BAR1
21001 	/* Upper 30bits of the register address. */
21002 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_MASK	UINT32_C(0xfffffffc)
21003 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SFT	2
21004 	/*
21005 	 * FW reset counter.
21006 	 * Lower 2 bits indicates address space location and upper 30 bits
21007 	 * indicates actual address.
21008 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
21009 	 */
21010 	uint32_t	fw_reset_cnt_reg;
21011 	/* Lower 2 bits indicates address space location. */
21012 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
21013 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_SFT	0
21014 	/*
21015 	 * If value is 0, this register is located in PCIe config space.
21016 	 * Drivers have to map appropriate window to access this
21017 	 * register.
21018 	 */
21019 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
21020 	/*
21021 	 * If value is 1, this register is located in GRC address space.
21022 	 * Drivers have to map appropriate window to access this
21023 	 * register.
21024 	 */
21025 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
21026 	/*
21027 	 * If value is 2, this register is located in first BAR address
21028 	 * space. Drivers have to map appropriate window to access this
21029 	 * register.
21030 	 */
21031 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
21032 	/*
21033 	 * If value is 3, this register is located in second BAR address
21034 	 * space. Drivers have to map appropriate window to access this
21035 	 * register.
21036 	 */
21037 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
21038 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_LAST	HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_BAR1
21039 	/* Upper 30bits of the register address. */
21040 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_MASK	UINT32_C(0xfffffffc)
21041 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SFT	2
21042 	/*
21043 	 * Reset Inprogress Register address for PFs.
21044 	 * Lower 2 bits indicates address space location and upper 30 bits
21045 	 * indicates actual address.
21046 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
21047 	 */
21048 	uint32_t	reset_inprogress_reg;
21049 	/* Lower 2 bits indicates address space location. */
21050 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
21051 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_SFT	0
21052 	/*
21053 	 * If value is 0, this register is located in PCIe config space.
21054 	 * Drivers have to map appropriate window to access this
21055 	 * register.
21056 	 */
21057 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
21058 	/*
21059 	 * If value is 1, this register is located in GRC address space.
21060 	 * Drivers have to map appropriate window to access this
21061 	 * register.
21062 	 */
21063 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
21064 	/*
21065 	 * If value is 2, this register is located in first BAR address
21066 	 * space. Drivers have to map appropriate window to access this
21067 	 * register.
21068 	 */
21069 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
21070 	/*
21071 	 * If value is 3, this register is located in second BAR address
21072 	 * space. Drivers have to map appropriate window to access this
21073 	 * register.
21074 	 */
21075 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
21076 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_LAST	HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_BAR1
21077 	/* Upper 30bits of the register address. */
21078 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_MASK	UINT32_C(0xfffffffc)
21079 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SFT	2
21080 	/* This field indicates the mask value for reset_inprogress_reg. */
21081 	uint32_t	reset_inprogress_reg_mask;
21082 	uint8_t	unused_0[3];
21083 	/*
21084 	 * Array of registers and value count to reset the Chip
21085 	 * Each array count has reset_reg, reset_reg_val, delay_after_reset
21086 	 * in TLV format. Depending upon Chip type, number of reset registers
21087 	 * will vary. Drivers have to write reset_reg_val in the reset_reg
21088 	 * location in the same sequence in order to recover from a fatal
21089 	 * error.
21090 	 */
21091 	uint8_t	reg_array_cnt;
21092 	/*
21093 	 * Reset register.
21094 	 * Lower 2 bits indicates address space location and upper 30 bits
21095 	 * indicates actual address.
21096 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
21097 	 */
21098 	uint32_t	reset_reg[16];
21099 	/* Lower 2 bits indicates address space location. */
21100 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
21101 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_SFT	0
21102 	/*
21103 	 * If value is 0, this register is located in PCIe config space.
21104 	 * Drivers have to map appropriate window to access this
21105 	 * register.
21106 	 */
21107 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
21108 	/*
21109 	 * If value is 1, this register is located in GRC address space.
21110 	 * Drivers have to map appropriate window to access this
21111 	 * register.
21112 	 */
21113 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
21114 	/*
21115 	 * If value is 2, this register is located in first BAR address
21116 	 * space. Drivers have to map appropriate window to access this
21117 	 * register.
21118 	 */
21119 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
21120 	/*
21121 	 * If value is 3, this register is located in second BAR address
21122 	 * space. Drivers have to map appropriate window to access this
21123 	 * register.
21124 	 */
21125 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
21126 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_LAST	HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_BAR1
21127 	/* Upper 30bits of the register address. */
21128 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_MASK	UINT32_C(0xfffffffc)
21129 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SFT	2
21130 	/* Value to be written in reset_reg to reset the controller. */
21131 	uint32_t	reset_reg_val[16];
21132 	/*
21133 	 * This value is in units of 1msec.
21134 	 * Typical value would be 10 to indicate 10msec.
21135 	 * Some of the operations like Core reset require delay before
21136 	 * accessing PCIE MMIO register space.
21137 	 * If this value is non-zero, drivers have to wait for
21138 	 * this much time after writing reset_reg_val in reset_reg.
21139 	 */
21140 	uint8_t	delay_after_reset[16];
21141 	/*
21142 	 * Error recovery counter.
21143 	 * Lower 2 bits indicates address space location and upper 30 bits
21144 	 * indicates actual address.
21145 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
21146 	 */
21147 	uint32_t	err_recovery_cnt_reg;
21148 	/* Lower 2 bits indicates address space location. */
21149 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
21150 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_SFT	0
21151 	/*
21152 	 * If value is 0, this register is located in PCIe config space.
21153 	 * Drivers have to map appropriate window to access this
21154 	 * register.
21155 	 */
21156 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
21157 	/*
21158 	 * If value is 1, this register is located in GRC address space.
21159 	 * Drivers have to map appropriate window to access this
21160 	 * register.
21161 	 */
21162 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
21163 	/*
21164 	 * If value is 2, this register is located in first BAR address
21165 	 * space. Drivers have to map appropriate window to access this
21166 	 * register.
21167 	 */
21168 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
21169 	/*
21170 	 * If value is 3, this register is located in second BAR address
21171 	 * space. Drivers have to map appropriate window to access this
21172 	 * register.
21173 	 */
21174 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
21175 		#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_LAST	HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_BAR1
21176 	/* Upper 30bits of the register address. */
21177 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_MASK	UINT32_C(0xfffffffc)
21178 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SFT	2
21179 	uint8_t	unused_1[3];
21180 	/*
21181 	 * This field is used in Output records to indicate that the output
21182 	 * is completely written to RAM. This field should be read as '1'
21183 	 * to indicate that the output has been completely written.
21184 	 * When writing a command completion or response to an internal
21185 	 * processor, the order of writes has to be such that this field
21186 	 * is written last.
21187 	 */
21188 	uint8_t	valid;
21189 } hwrm_error_recovery_qcfg_output_t, *phwrm_error_recovery_qcfg_output_t;
21190 
21191 /***************************
21192  * hwrm_func_echo_response *
21193  ***************************/
21194 
21195 
21196 /* hwrm_func_echo_response_input (size:192b/24B) */
21197 
21198 typedef struct hwrm_func_echo_response_input {
21199 	/* The HWRM command request type. */
21200 	uint16_t	req_type;
21201 	/*
21202 	 * The completion ring to send the completion event on. This should
21203 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
21204 	 */
21205 	uint16_t	cmpl_ring;
21206 	/*
21207 	 * The sequence ID is used by the driver for tracking multiple
21208 	 * commands. This ID is treated as opaque data by the firmware and
21209 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
21210 	 */
21211 	uint16_t	seq_id;
21212 	/*
21213 	 * The target ID of the command:
21214 	 * * 0x0-0xFFF8 - The function ID
21215 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
21216 	 * * 0xFFFD - Reserved for user-space HWRM interface
21217 	 * * 0xFFFF - HWRM
21218 	 */
21219 	uint16_t	target_id;
21220 	/*
21221 	 * A physical address pointer pointing to a host buffer that the
21222 	 * command's response data will be written. This can be either a host
21223 	 * physical address (HPA) or a guest physical address (GPA) and must
21224 	 * point to a physically contiguous block of memory.
21225 	 */
21226 	uint64_t	resp_addr;
21227 	uint32_t	event_data1;
21228 	uint32_t	event_data2;
21229 } hwrm_func_echo_response_input_t, *phwrm_func_echo_response_input_t;
21230 
21231 /* hwrm_func_echo_response_output (size:128b/16B) */
21232 
21233 typedef struct hwrm_func_echo_response_output {
21234 	/* The specific error status for the command. */
21235 	uint16_t	error_code;
21236 	/* The HWRM command request type. */
21237 	uint16_t	req_type;
21238 	/* The sequence ID from the original command. */
21239 	uint16_t	seq_id;
21240 	/* The length of the response data in number of bytes. */
21241 	uint16_t	resp_len;
21242 	uint8_t	unused_0[7];
21243 	/*
21244 	 * This field is used in Output records to indicate that the output
21245 	 * is completely written to RAM. This field should be read as '1'
21246 	 * to indicate that the output has been completely written. When
21247 	 * writing a command completion or response to an internal processor,
21248 	 * the order of writes has to be such that this field is written last.
21249 	 */
21250 	uint8_t	valid;
21251 } hwrm_func_echo_response_output_t, *phwrm_func_echo_response_output_t;
21252 
21253 /**************************
21254  * hwrm_func_ptp_pin_qcfg *
21255  **************************/
21256 
21257 
21258 /* hwrm_func_ptp_pin_qcfg_input (size:192b/24B) */
21259 
21260 typedef struct hwrm_func_ptp_pin_qcfg_input {
21261 	/* The HWRM command request type. */
21262 	uint16_t	req_type;
21263 	/*
21264 	 * The completion ring to send the completion event on. This should
21265 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
21266 	 */
21267 	uint16_t	cmpl_ring;
21268 	/*
21269 	 * The sequence ID is used by the driver for tracking multiple
21270 	 * commands. This ID is treated as opaque data by the firmware and
21271 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
21272 	 */
21273 	uint16_t	seq_id;
21274 	/*
21275 	 * The target ID of the command:
21276 	 * * 0x0-0xFFF8 - The function ID
21277 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
21278 	 * * 0xFFFD - Reserved for user-space HWRM interface
21279 	 * * 0xFFFF - HWRM
21280 	 */
21281 	uint16_t	target_id;
21282 	/*
21283 	 * A physical address pointer pointing to a host buffer that the
21284 	 * command's response data will be written. This can be either a host
21285 	 * physical address (HPA) or a guest physical address (GPA) and must
21286 	 * point to a physically contiguous block of memory.
21287 	 */
21288 	uint64_t	resp_addr;
21289 	uint8_t	unused_0[8];
21290 } hwrm_func_ptp_pin_qcfg_input_t, *phwrm_func_ptp_pin_qcfg_input_t;
21291 
21292 /* hwrm_func_ptp_pin_qcfg_output (size:128b/16B) */
21293 
21294 typedef struct hwrm_func_ptp_pin_qcfg_output {
21295 	/* The specific error status for the command. */
21296 	uint16_t	error_code;
21297 	/* The HWRM command request type. */
21298 	uint16_t	req_type;
21299 	/* The sequence ID from the original command. */
21300 	uint16_t	seq_id;
21301 	/* The length of the response data in number of bytes. */
21302 	uint16_t	resp_len;
21303 	/*
21304 	 * The number of TSIO pins that are configured on this board
21305 	 * Up to 4 pins can be returned in the response.
21306 	 */
21307 	uint8_t	num_pins;
21308 	/* Pin state */
21309 	uint8_t	state;
21310 	/*
21311 	 * When this bit is '1', TSIO pin 0 is enabled.
21312 	 * When this bit is '0', TSIO pin 0 is disabled.
21313 	 */
21314 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN0_ENABLED	UINT32_C(0x1)
21315 	/*
21316 	 * When this bit is '1', TSIO pin 1 is enabled.
21317 	 * When this bit is '0', TSIO pin 1 is disabled.
21318 	 */
21319 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN1_ENABLED	UINT32_C(0x2)
21320 	/*
21321 	 * When this bit is '1', TSIO pin 2 is enabled.
21322 	 * When this bit is '0', TSIO pin 2 is disabled.
21323 	 */
21324 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN2_ENABLED	UINT32_C(0x4)
21325 	/*
21326 	 * When this bit is '1', TSIO pin 3 is enabled.
21327 	 * When this bit is '0', TSIO pin 3 is disabled.
21328 	 */
21329 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN3_ENABLED	UINT32_C(0x8)
21330 	/* Type of function for Pin #0. */
21331 	uint8_t	pin0_usage;
21332 	/* No function is configured. */
21333 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_NONE	UINT32_C(0x0)
21334 	/* PPS IN is configured. */
21335 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_PPS_IN   UINT32_C(0x1)
21336 	/* PPS OUT is configured. */
21337 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_PPS_OUT  UINT32_C(0x2)
21338 	/* SYNC IN is configured. */
21339 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_SYNC_IN  UINT32_C(0x3)
21340 	/* SYNC OUT is configured. */
21341 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_SYNC_OUT UINT32_C(0x4)
21342 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_LAST	HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_SYNC_OUT
21343 	/* Type of function for Pin #1. */
21344 	uint8_t	pin1_usage;
21345 	/* No function is configured. */
21346 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_NONE	UINT32_C(0x0)
21347 	/* PPS IN is configured. */
21348 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_PPS_IN   UINT32_C(0x1)
21349 	/* PPS OUT is configured. */
21350 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_PPS_OUT  UINT32_C(0x2)
21351 	/* SYNC IN is configured. */
21352 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_SYNC_IN  UINT32_C(0x3)
21353 	/* SYNC OUT is configured. */
21354 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_SYNC_OUT UINT32_C(0x4)
21355 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_LAST	HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_SYNC_OUT
21356 	/* Type of function for Pin #2. */
21357 	uint8_t	pin2_usage;
21358 	/* No function is configured. */
21359 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_NONE			UINT32_C(0x0)
21360 	/* PPS IN is configured. */
21361 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_IN			UINT32_C(0x1)
21362 	/* PPS OUT is configured. */
21363 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_OUT		UINT32_C(0x2)
21364 	/* SYNC IN is configured. */
21365 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_IN		UINT32_C(0x3)
21366 	/* SYNC OUT is configured. */
21367 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_OUT		UINT32_C(0x4)
21368 	/* SYNCE primary clock OUT is configured. */
21369 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_PRIMARY_CLOCK_OUT   UINT32_C(0x5)
21370 	/* SYNCE secondary clock OUT is configured. */
21371 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT UINT32_C(0x6)
21372 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_LAST			HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT
21373 	/* Type of function for Pin #3. */
21374 	uint8_t	pin3_usage;
21375 	/* No function is configured. */
21376 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_NONE			UINT32_C(0x0)
21377 	/* PPS IN is configured. */
21378 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_IN			UINT32_C(0x1)
21379 	/* PPS OUT is configured. */
21380 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_OUT		UINT32_C(0x2)
21381 	/* SYNC IN is configured. */
21382 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_IN		UINT32_C(0x3)
21383 	/* SYNC OUT is configured. */
21384 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_OUT		UINT32_C(0x4)
21385 	/* SYNCE primary clock OUT is configured. */
21386 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_PRIMARY_CLOCK_OUT   UINT32_C(0x5)
21387 	/* SYNCE secondary OUT is configured. */
21388 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT UINT32_C(0x6)
21389 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_LAST			HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT
21390 	uint8_t	unused_0;
21391 	/*
21392 	 * This field is used in Output records to indicate that the output
21393 	 * is completely written to RAM. This field should be read as '1'
21394 	 * to indicate that the output has been completely written. When
21395 	 * writing a command completion or response to an internal processor,
21396 	 * the order of writes has to be such that this field is written last.
21397 	 */
21398 	uint8_t	valid;
21399 } hwrm_func_ptp_pin_qcfg_output_t, *phwrm_func_ptp_pin_qcfg_output_t;
21400 
21401 /*************************
21402  * hwrm_func_ptp_pin_cfg *
21403  *************************/
21404 
21405 
21406 /* hwrm_func_ptp_pin_cfg_input (size:256b/32B) */
21407 
21408 typedef struct hwrm_func_ptp_pin_cfg_input {
21409 	/* The HWRM command request type. */
21410 	uint16_t	req_type;
21411 	/*
21412 	 * The completion ring to send the completion event on. This should
21413 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
21414 	 */
21415 	uint16_t	cmpl_ring;
21416 	/*
21417 	 * The sequence ID is used by the driver for tracking multiple
21418 	 * commands. This ID is treated as opaque data by the firmware and
21419 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
21420 	 */
21421 	uint16_t	seq_id;
21422 	/*
21423 	 * The target ID of the command:
21424 	 * * 0x0-0xFFF8 - The function ID
21425 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
21426 	 * * 0xFFFD - Reserved for user-space HWRM interface
21427 	 * * 0xFFFF - HWRM
21428 	 */
21429 	uint16_t	target_id;
21430 	/*
21431 	 * A physical address pointer pointing to a host buffer that the
21432 	 * command's response data will be written. This can be either a host
21433 	 * physical address (HPA) or a guest physical address (GPA) and must
21434 	 * point to a physically contiguous block of memory.
21435 	 */
21436 	uint64_t	resp_addr;
21437 	uint32_t	enables;
21438 	/*
21439 	 * This bit must be '1' for the pin0_state field to be
21440 	 * configured.
21441 	 */
21442 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN0_STATE	UINT32_C(0x1)
21443 	/*
21444 	 * This bit must be '1' for the pin0_usage field to be
21445 	 * configured.
21446 	 */
21447 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN0_USAGE	UINT32_C(0x2)
21448 	/*
21449 	 * This bit must be '1' for the pin1_state field to be
21450 	 * configured.
21451 	 */
21452 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN1_STATE	UINT32_C(0x4)
21453 	/*
21454 	 * This bit must be '1' for the pin1_usage field to be
21455 	 * configured.
21456 	 */
21457 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN1_USAGE	UINT32_C(0x8)
21458 	/*
21459 	 * This bit must be '1' for the pin2_state field to be
21460 	 * configured.
21461 	 */
21462 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN2_STATE	UINT32_C(0x10)
21463 	/*
21464 	 * This bit must be '1' for the pin2_usage field to be
21465 	 * configured.
21466 	 */
21467 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN2_USAGE	UINT32_C(0x20)
21468 	/*
21469 	 * This bit must be '1' for the pin3_state field to be
21470 	 * configured.
21471 	 */
21472 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN3_STATE	UINT32_C(0x40)
21473 	/*
21474 	 * This bit must be '1' for the pin3_usage field to be
21475 	 * configured.
21476 	 */
21477 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN3_USAGE	UINT32_C(0x80)
21478 	/* Enable or disable functionality of Pin #0. */
21479 	uint8_t	pin0_state;
21480 	/* Disabled */
21481 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_DISABLED UINT32_C(0x0)
21482 	/* Enabled */
21483 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_ENABLED  UINT32_C(0x1)
21484 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_LAST	HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_ENABLED
21485 	/* Configure function for TSIO pin#0. */
21486 	uint8_t	pin0_usage;
21487 	/* No function is configured. */
21488 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_NONE	UINT32_C(0x0)
21489 	/* PPS IN is configured. */
21490 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_PPS_IN   UINT32_C(0x1)
21491 	/* PPS OUT is configured. */
21492 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_PPS_OUT  UINT32_C(0x2)
21493 	/* SYNC IN is configured. */
21494 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_SYNC_IN  UINT32_C(0x3)
21495 	/* SYNC OUT is configured. */
21496 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_SYNC_OUT UINT32_C(0x4)
21497 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_LAST	HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_SYNC_OUT
21498 	/* Enable or disable functionality of Pin #1. */
21499 	uint8_t	pin1_state;
21500 	/* Disabled */
21501 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_DISABLED UINT32_C(0x0)
21502 	/* Enabled */
21503 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_ENABLED  UINT32_C(0x1)
21504 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_LAST	HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_ENABLED
21505 	/* Configure function for TSIO pin#1. */
21506 	uint8_t	pin1_usage;
21507 	/* No function is configured. */
21508 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_NONE	UINT32_C(0x0)
21509 	/* PPS IN is configured. */
21510 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_PPS_IN   UINT32_C(0x1)
21511 	/* PPS OUT is configured. */
21512 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_PPS_OUT  UINT32_C(0x2)
21513 	/* SYNC IN is configured. */
21514 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_SYNC_IN  UINT32_C(0x3)
21515 	/* SYNC OUT is configured. */
21516 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_SYNC_OUT UINT32_C(0x4)
21517 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_LAST	HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_SYNC_OUT
21518 	/* Enable or disable functionality of Pin #2. */
21519 	uint8_t	pin2_state;
21520 	/* Disabled */
21521 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_DISABLED UINT32_C(0x0)
21522 	/* Enabled */
21523 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_ENABLED  UINT32_C(0x1)
21524 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_LAST	HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_ENABLED
21525 	/* Configure function for TSIO pin#2. */
21526 	uint8_t	pin2_usage;
21527 	/* No function is configured. */
21528 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_NONE			UINT32_C(0x0)
21529 	/* PPS IN is configured. */
21530 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_IN			UINT32_C(0x1)
21531 	/* PPS OUT is configured. */
21532 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_OUT		UINT32_C(0x2)
21533 	/* SYNC IN is configured. */
21534 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_IN		UINT32_C(0x3)
21535 	/* SYNC OUT is configured. */
21536 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_OUT		UINT32_C(0x4)
21537 	/* SYNCE primary clock OUT is configured. */
21538 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_PRIMARY_CLOCK_OUT   UINT32_C(0x5)
21539 	/* SYNCE secondary clock OUT is configured. */
21540 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT UINT32_C(0x6)
21541 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_LAST			HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT
21542 	/* Enable or disable functionality of Pin #3. */
21543 	uint8_t	pin3_state;
21544 	/* Disabled */
21545 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_DISABLED UINT32_C(0x0)
21546 	/* Enabled */
21547 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_ENABLED  UINT32_C(0x1)
21548 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_LAST	HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_ENABLED
21549 	/* Configure function for TSIO pin#3. */
21550 	uint8_t	pin3_usage;
21551 	/* No function is configured. */
21552 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_NONE			UINT32_C(0x0)
21553 	/* PPS IN is configured. */
21554 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_IN			UINT32_C(0x1)
21555 	/* PPS OUT is configured. */
21556 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_OUT		UINT32_C(0x2)
21557 	/* SYNC IN is configured. */
21558 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_IN		UINT32_C(0x3)
21559 	/* SYNC OUT is configured. */
21560 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_OUT		UINT32_C(0x4)
21561 	/* SYNCE primary clock OUT is configured. */
21562 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_PRIMARY_CLOCK_OUT   UINT32_C(0x5)
21563 	/* SYNCE secondary clock OUT is configured. */
21564 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT UINT32_C(0x6)
21565 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_LAST			HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT
21566 	uint8_t	unused_0[4];
21567 } hwrm_func_ptp_pin_cfg_input_t, *phwrm_func_ptp_pin_cfg_input_t;
21568 
21569 /* hwrm_func_ptp_pin_cfg_output (size:128b/16B) */
21570 
21571 typedef struct hwrm_func_ptp_pin_cfg_output {
21572 	/* The specific error status for the command. */
21573 	uint16_t	error_code;
21574 	/* The HWRM command request type. */
21575 	uint16_t	req_type;
21576 	/* The sequence ID from the original command. */
21577 	uint16_t	seq_id;
21578 	/* The length of the response data in number of bytes. */
21579 	uint16_t	resp_len;
21580 	uint8_t	unused_0[7];
21581 	/*
21582 	 * This field is used in Output records to indicate that the output
21583 	 * is completely written to RAM. This field should be read as '1'
21584 	 * to indicate that the output has been completely written. When
21585 	 * writing a command completion or response to an internal processor,
21586 	 * the order of writes has to be such that this field is written last.
21587 	 */
21588 	uint8_t	valid;
21589 } hwrm_func_ptp_pin_cfg_output_t, *phwrm_func_ptp_pin_cfg_output_t;
21590 
21591 /*********************
21592  * hwrm_func_ptp_cfg *
21593  *********************/
21594 
21595 
21596 /* hwrm_func_ptp_cfg_input (size:384b/48B) */
21597 
21598 typedef struct hwrm_func_ptp_cfg_input {
21599 	/* The HWRM command request type. */
21600 	uint16_t	req_type;
21601 	/*
21602 	 * The completion ring to send the completion event on. This should
21603 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
21604 	 */
21605 	uint16_t	cmpl_ring;
21606 	/*
21607 	 * The sequence ID is used by the driver for tracking multiple
21608 	 * commands. This ID is treated as opaque data by the firmware and
21609 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
21610 	 */
21611 	uint16_t	seq_id;
21612 	/*
21613 	 * The target ID of the command:
21614 	 * * 0x0-0xFFF8 - The function ID
21615 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
21616 	 * * 0xFFFD - Reserved for user-space HWRM interface
21617 	 * * 0xFFFF - HWRM
21618 	 */
21619 	uint16_t	target_id;
21620 	/*
21621 	 * A physical address pointer pointing to a host buffer that the
21622 	 * command's response data will be written. This can be either a host
21623 	 * physical address (HPA) or a guest physical address (GPA) and must
21624 	 * point to a physically contiguous block of memory.
21625 	 */
21626 	uint64_t	resp_addr;
21627 	uint16_t	enables;
21628 	/*
21629 	 * This bit must be '1' for the ptp_pps_event field to be
21630 	 * configured.
21631 	 */
21632 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_PPS_EVENT		UINT32_C(0x1)
21633 	/*
21634 	 * This bit must be '1' for the ptp_freq_adj_dll_source field to be
21635 	 * configured.
21636 	 */
21637 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_DLL_SOURCE	UINT32_C(0x2)
21638 	/*
21639 	 * This bit must be '1' for the ptp_freq_adj_dll_phase field to be
21640 	 * configured.
21641 	 */
21642 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_DLL_PHASE	UINT32_C(0x4)
21643 	/*
21644 	 * This bit must be '1' for the ptp_freq_adj_ext_period field to be
21645 	 * configured.
21646 	 */
21647 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_EXT_PERIOD	UINT32_C(0x8)
21648 	/*
21649 	 * This bit must be '1' for the ptp_freq_adj_ext_up field to be
21650 	 * configured.
21651 	 */
21652 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_EXT_UP	UINT32_C(0x10)
21653 	/*
21654 	 * This bit must be '1' for the ptp_freq_adj_ext_phase field to be
21655 	 * configured.
21656 	 */
21657 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_EXT_PHASE	UINT32_C(0x20)
21658 	/* This bit must be '1' for ptp_set_time field to be configured. */
21659 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_SET_TIME		UINT32_C(0x40)
21660 	/* This field is used to enable interrupt for a specific PPS event. */
21661 	uint8_t	ptp_pps_event;
21662 	/*
21663 	 * When this bit is set to '1', interrupt is enabled for internal
21664 	 * PPS event. Latches timestamp on PPS_OUT TSIO Pin. If user does
21665 	 * not configure PPS_OUT on a TSIO pin, then firmware will allocate
21666 	 * PPS_OUT to an unallocated pin.
21667 	 */
21668 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_PPS_EVENT_INTERNAL	UINT32_C(0x1)
21669 	/*
21670 	 * When this bit is set to '1', interrupt is enabled for external
21671 	 * PPS event. Latches timestamp on PPS_IN TSIO pin.
21672 	 */
21673 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_PPS_EVENT_EXTERNAL	UINT32_C(0x2)
21674 	/*
21675 	 * This field is used to set the source signal used to discipline
21676 	 * PHC (PTP Hardware Clock)
21677 	 */
21678 	uint8_t	ptp_freq_adj_dll_source;
21679 	/* No source is selected. Use servo to discipline PHC */
21680 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_NONE	UINT32_C(0x0)
21681 	/* TSIO Pin #0 is selected as source signal. */
21682 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_0  UINT32_C(0x1)
21683 	/* TSIO Pin #1 is selected as source signal. */
21684 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_1  UINT32_C(0x2)
21685 	/* TSIO Pin #2 is selected as source signal. */
21686 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_2  UINT32_C(0x3)
21687 	/* TSIO Pin #3 is selected as source signal. */
21688 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_3  UINT32_C(0x4)
21689 	/* Port #0 is selected as source signal. */
21690 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_0  UINT32_C(0x5)
21691 	/* Port #1 is selected as source signal. */
21692 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_1  UINT32_C(0x6)
21693 	/* Port #2 is selected as source signal. */
21694 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_2  UINT32_C(0x7)
21695 	/* Port #3 is selected as source signal. */
21696 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_3  UINT32_C(0x8)
21697 	/* Invalid signal. */
21698 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_INVALID UINT32_C(0xff)
21699 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_LAST   HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_INVALID
21700 	/*
21701 	 * This field is used to provide phase adjustment for DLL
21702 	 * used to discipline PHC (PTP Hardware clock)
21703 	 */
21704 	uint8_t	ptp_freq_adj_dll_phase;
21705 	/* No Phase adjustment. */
21706 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_NONE UINT32_C(0x0)
21707 	/* 4Khz sync in frequency. */
21708 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_4K   UINT32_C(0x1)
21709 	/* 8Khz sync in frequency. */
21710 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_8K   UINT32_C(0x2)
21711 	/* 10Mhz sync in frequency. */
21712 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_10M  UINT32_C(0x3)
21713 	/* 25Mhz sync in frequency. */
21714 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_25M  UINT32_C(0x4)
21715 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_LAST HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_25M
21716 	uint8_t	unused_0[3];
21717 	/*
21718 	 * Period in nanoseconds (ns) for external signal
21719 	 * input.
21720 	 */
21721 	uint32_t	ptp_freq_adj_ext_period;
21722 	/*
21723 	 * Up time in nanoseconds (ns) of the duty cycle
21724 	 * of the external signal. This value should be
21725 	 * less than ptp_freq_adj_ext_period.
21726 	 */
21727 	uint32_t	ptp_freq_adj_ext_up;
21728 	/*
21729 	 * Phase value is provided. This field provides the
21730 	 * least significant 32 bits of the phase input. The
21731 	 * most significant 16 bits come from
21732 	 * ptp_freq_adj_ext_phase_upper field. Setting this
21733 	 * field requires setting ptp_freq_adj_ext_period
21734 	 * field as well to identify the external signal
21735 	 * pin.
21736 	 */
21737 	uint32_t	ptp_freq_adj_ext_phase_lower;
21738 	/*
21739 	 * Phase value is provided. The lower 16 bits of this field is used
21740 	 * with the 32 bit value from ptp_freq_adj_ext_phase_lower
21741 	 * to provide a 48 bit value input for Phase.
21742 	 */
21743 	uint32_t	ptp_freq_adj_ext_phase_upper;
21744 	/*
21745 	 * Allows driver to set the full 64bit time in FW. The upper 16 bits
21746 	 * will be stored in FW and the lower 48bits will be programmed in
21747 	 * PHC. Firmware will send a broadcast async event to all functions
21748 	 * to indicate the programmed upper 16 bits.
21749 	 */
21750 	uint64_t	ptp_set_time;
21751 } hwrm_func_ptp_cfg_input_t, *phwrm_func_ptp_cfg_input_t;
21752 
21753 /* hwrm_func_ptp_cfg_output (size:128b/16B) */
21754 
21755 typedef struct hwrm_func_ptp_cfg_output {
21756 	/* The specific error status for the command. */
21757 	uint16_t	error_code;
21758 	/* The HWRM command request type. */
21759 	uint16_t	req_type;
21760 	/* The sequence ID from the original command. */
21761 	uint16_t	seq_id;
21762 	/* The length of the response data in number of bytes. */
21763 	uint16_t	resp_len;
21764 	uint8_t	unused_0[7];
21765 	/*
21766 	 * This field is used in Output records to indicate that the output
21767 	 * is completely written to RAM. This field should be read as '1'
21768 	 * to indicate that the output has been completely written. When
21769 	 * writing a command completion or response to an internal processor,
21770 	 * the order of writes has to be such that this field is written last.
21771 	 */
21772 	uint8_t	valid;
21773 } hwrm_func_ptp_cfg_output_t, *phwrm_func_ptp_cfg_output_t;
21774 
21775 /**************************
21776  * hwrm_func_ptp_ts_query *
21777  **************************/
21778 
21779 
21780 /* hwrm_func_ptp_ts_query_input (size:192b/24B) */
21781 
21782 typedef struct hwrm_func_ptp_ts_query_input {
21783 	/* The HWRM command request type. */
21784 	uint16_t	req_type;
21785 	/*
21786 	 * The completion ring to send the completion event on. This should
21787 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
21788 	 */
21789 	uint16_t	cmpl_ring;
21790 	/*
21791 	 * The sequence ID is used by the driver for tracking multiple
21792 	 * commands. This ID is treated as opaque data by the firmware and
21793 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
21794 	 */
21795 	uint16_t	seq_id;
21796 	/*
21797 	 * The target ID of the command:
21798 	 * * 0x0-0xFFF8 - The function ID
21799 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
21800 	 * * 0xFFFD - Reserved for user-space HWRM interface
21801 	 * * 0xFFFF - HWRM
21802 	 */
21803 	uint16_t	target_id;
21804 	/*
21805 	 * A physical address pointer pointing to a host buffer that the
21806 	 * command's response data will be written. This can be either a host
21807 	 * physical address (HPA) or a guest physical address (GPA) and must
21808 	 * point to a physically contiguous block of memory.
21809 	 */
21810 	uint64_t	resp_addr;
21811 	uint32_t	flags;
21812 	/* If set, the response includes PPS event timestamps */
21813 	#define HWRM_FUNC_PTP_TS_QUERY_INPUT_FLAGS_PPS_TIME	UINT32_C(0x1)
21814 	/* If set, the response includes PTM timestamps */
21815 	#define HWRM_FUNC_PTP_TS_QUERY_INPUT_FLAGS_PTM_TIME	UINT32_C(0x2)
21816 	uint8_t	unused_0[4];
21817 } hwrm_func_ptp_ts_query_input_t, *phwrm_func_ptp_ts_query_input_t;
21818 
21819 /* hwrm_func_ptp_ts_query_output (size:320b/40B) */
21820 
21821 typedef struct hwrm_func_ptp_ts_query_output {
21822 	/* The specific error status for the command. */
21823 	uint16_t	error_code;
21824 	/* The HWRM command request type. */
21825 	uint16_t	req_type;
21826 	/* The sequence ID from the original command. */
21827 	uint16_t	seq_id;
21828 	/* The length of the response data in number of bytes. */
21829 	uint16_t	resp_len;
21830 	/* Timestamp value of last PPS event latched. */
21831 	uint64_t	pps_event_ts;
21832 	/*
21833 	 * PHC timestamp value when PTM responseD request is received
21834 	 * at downstream port (t4'). This is a 48 bit timestamp in nanoseconds.
21835 	 */
21836 	uint64_t	ptm_local_ts;
21837 	/*
21838 	 * PTM System timestamp value corresponding to t4' at
21839 	 * root complex (T4'). Together with ptm_local_ts, these
21840 	 * two timestamps provide the cross-trigger timestamps.
21841 	 * Driver can directly use these values for cross-trigger.
21842 	 * This is a 48 bit timestamp in nanoseconds.
21843 	 */
21844 	uint64_t	ptm_system_ts;
21845 	/*
21846 	 * PTM Link delay. This is the time taken at root complex (RC)
21847 	 * between receiving PTM request and sending PTM response to
21848 	 * downstream port. This is a 32 bit value in nanoseconds.
21849 	 */
21850 	uint32_t	ptm_link_delay;
21851 	uint8_t	unused_0[3];
21852 	/*
21853 	 * This field is used in Output records to indicate that the output
21854 	 * is completely written to RAM. This field should be read as '1'
21855 	 * to indicate that the output has been completely written. When
21856 	 * writing a command completion or response to an internal processor,
21857 	 * the order of writes has to be such that this field is written last.
21858 	 */
21859 	uint8_t	valid;
21860 } hwrm_func_ptp_ts_query_output_t, *phwrm_func_ptp_ts_query_output_t;
21861 
21862 /*************************
21863  * hwrm_func_ptp_ext_cfg *
21864  *************************/
21865 
21866 
21867 /* hwrm_func_ptp_ext_cfg_input (size:256b/32B) */
21868 
21869 typedef struct hwrm_func_ptp_ext_cfg_input {
21870 	/* The HWRM command request type. */
21871 	uint16_t	req_type;
21872 	/*
21873 	 * The completion ring to send the completion event on. This should
21874 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
21875 	 */
21876 	uint16_t	cmpl_ring;
21877 	/*
21878 	 * The sequence ID is used by the driver for tracking multiple
21879 	 * commands. This ID is treated as opaque data by the firmware and
21880 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
21881 	 */
21882 	uint16_t	seq_id;
21883 	/*
21884 	 * The target ID of the command:
21885 	 * * 0x0-0xFFF8 - The function ID
21886 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
21887 	 * * 0xFFFD - Reserved for user-space HWRM interface
21888 	 * * 0xFFFF - HWRM
21889 	 */
21890 	uint16_t	target_id;
21891 	/*
21892 	 * A physical address pointer pointing to a host buffer that the
21893 	 * command's response data will be written. This can be either a host
21894 	 * physical address (HPA) or a guest physical address (GPA) and must
21895 	 * point to a physically contiguous block of memory.
21896 	 */
21897 	uint64_t	resp_addr;
21898 	uint16_t	enables;
21899 	/*
21900 	 * This bit must be '1' for the phc_master_fid field to be
21901 	 * configured.
21902 	 */
21903 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_PHC_MASTER_FID	UINT32_C(0x1)
21904 	/*
21905 	 * This bit must be '1' for the phc_sec_fid field to be
21906 	 * configured.
21907 	 */
21908 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_PHC_SEC_FID	UINT32_C(0x2)
21909 	/*
21910 	 * This bit must be '1' for the phc_sec_mode field to be
21911 	 * configured.
21912 	 */
21913 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_PHC_SEC_MODE	UINT32_C(0x4)
21914 	/*
21915 	 * This bit must be '1' for the failover_timer field to be
21916 	 * configured.
21917 	 */
21918 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_FAILOVER_TIMER	UINT32_C(0x8)
21919 	/*
21920 	 * This field is used to configure the Master function. Only this
21921 	 * function can modify or condition the PHC. Only driver calls from
21922 	 * this function are allowed to adjust frequency of PHC or configure
21923 	 * PPS functionality.
21924 	 * If driver does not specify this FID, then firmware will auto select
21925 	 * the first function that makes the call to modify PHC as the Master.
21926 	 */
21927 	uint16_t	phc_master_fid;
21928 	/*
21929 	 * This field is used to configure the secondary function. This
21930 	 * function becomes the Master function in case of failover from
21931 	 * Master function.
21932 	 * If driver does not specify this FID, firmware will auto select
21933 	 * the last non-master function to make a call to condition PHC as
21934 	 * secondary.
21935 	 */
21936 	uint16_t	phc_sec_fid;
21937 	/*
21938 	 * This field is used to configure conditions under which a function
21939 	 * can become a secondary function.
21940 	 */
21941 	uint8_t	phc_sec_mode;
21942 	/*
21943 	 * Immediately failover to the current secondary function. If there
21944 	 * is no secondary function available, failover does not happen.
21945 	 */
21946 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_SWITCH  UINT32_C(0x0)
21947 	/*
21948 	 * All functions (PF and VF) can be used during auto selection
21949 	 * of a secondary function. This is not used in case of admin
21950 	 * configured secondary function.
21951 	 */
21952 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_ALL	UINT32_C(0x1)
21953 	/*
21954 	 * Only PF's can be selected as a secondary function during auto
21955 	 * selection. This is not used in case of admin configured secondary
21956 	 * function.
21957 	 */
21958 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_PF_ONLY UINT32_C(0x2)
21959 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_LAST   HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_PF_ONLY
21960 	uint8_t	unused_0;
21961 	/*
21962 	 * This field indicates the failover time is milliseconds. If the
21963 	 * timeout expires, firmware will failover PTP configurability from
21964 	 * current master to secondary fid.
21965 	 * 0 - Failover timer is automatically selected based on the last
21966 	 * adjFreq() call. If adjFreq() is not called for 3 * (last interval)
21967 	 * the failover kicks in. For example, if last interval between
21968 	 * adjFreq() calls was 2 seconds and the next adjFreq() is not made for
21969 	 * at least 6 seconds, then secondary takes over as master to condition
21970 	 * PHC. Firmware rounds up the failover timer to be a multiple of 250
21971 	 * ms. Firmware checks every 250 ms to see if timer expired.
21972 	 * 0xFFFFFFFF - If driver specifies this value, then failover never
21973 	 * happens. Admin or auto selected Master will always be used for
21974 	 * conditioning PHC.
21975 	 * X - If driver specifies any other value, this is admin indicated
21976 	 * failover timeout. If no adjFreq() call is made within this timeout
21977 	 * value, then failover happens. This value should be a multiple of
21978 	 * 250 ms. Firmware checks every 250 ms to see if timer expired.
21979 	 */
21980 	uint32_t	failover_timer;
21981 	uint8_t	unused_1[4];
21982 } hwrm_func_ptp_ext_cfg_input_t, *phwrm_func_ptp_ext_cfg_input_t;
21983 
21984 /* hwrm_func_ptp_ext_cfg_output (size:128b/16B) */
21985 
21986 typedef struct hwrm_func_ptp_ext_cfg_output {
21987 	/* The specific error status for the command. */
21988 	uint16_t	error_code;
21989 	/* The HWRM command request type. */
21990 	uint16_t	req_type;
21991 	/* The sequence ID from the original command. */
21992 	uint16_t	seq_id;
21993 	/* The length of the response data in number of bytes. */
21994 	uint16_t	resp_len;
21995 	uint8_t	unused_0[7];
21996 	/*
21997 	 * This field is used in Output records to indicate that the output
21998 	 * is completely written to RAM. This field should be read as '1'
21999 	 * to indicate that the output has been completely written. When
22000 	 * writing a command completion or response to an internal processor,
22001 	 * the order of writes has to be such that this field is written last.
22002 	 */
22003 	uint8_t	valid;
22004 } hwrm_func_ptp_ext_cfg_output_t, *phwrm_func_ptp_ext_cfg_output_t;
22005 
22006 /**************************
22007  * hwrm_func_ptp_ext_qcfg *
22008  **************************/
22009 
22010 
22011 /* hwrm_func_ptp_ext_qcfg_input (size:192b/24B) */
22012 
22013 typedef struct hwrm_func_ptp_ext_qcfg_input {
22014 	/* The HWRM command request type. */
22015 	uint16_t	req_type;
22016 	/*
22017 	 * The completion ring to send the completion event on. This should
22018 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22019 	 */
22020 	uint16_t	cmpl_ring;
22021 	/*
22022 	 * The sequence ID is used by the driver for tracking multiple
22023 	 * commands. This ID is treated as opaque data by the firmware and
22024 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22025 	 */
22026 	uint16_t	seq_id;
22027 	/*
22028 	 * The target ID of the command:
22029 	 * * 0x0-0xFFF8 - The function ID
22030 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22031 	 * * 0xFFFD - Reserved for user-space HWRM interface
22032 	 * * 0xFFFF - HWRM
22033 	 */
22034 	uint16_t	target_id;
22035 	/*
22036 	 * A physical address pointer pointing to a host buffer that the
22037 	 * command's response data will be written. This can be either a host
22038 	 * physical address (HPA) or a guest physical address (GPA) and must
22039 	 * point to a physically contiguous block of memory.
22040 	 */
22041 	uint64_t	resp_addr;
22042 	uint8_t	unused_0[8];
22043 } hwrm_func_ptp_ext_qcfg_input_t, *phwrm_func_ptp_ext_qcfg_input_t;
22044 
22045 /* hwrm_func_ptp_ext_qcfg_output (size:256b/32B) */
22046 
22047 typedef struct hwrm_func_ptp_ext_qcfg_output {
22048 	/* The specific error status for the command. */
22049 	uint16_t	error_code;
22050 	/* The HWRM command request type. */
22051 	uint16_t	req_type;
22052 	/* The sequence ID from the original command. */
22053 	uint16_t	seq_id;
22054 	/* The length of the response data in number of bytes. */
22055 	uint16_t	resp_len;
22056 	/*
22057 	 * Firmware returns the current PHC master function. This function
22058 	 * could either be admin selected or auto selected.
22059 	 */
22060 	uint16_t	phc_master_fid;
22061 	/*
22062 	 * Firmware returns the current PHC secondary function. This function
22063 	 * could either be admin selected or auto selected.
22064 	 */
22065 	uint16_t	phc_sec_fid;
22066 	/*
22067 	 * Firmware returns the last non-master/non-secondary function to
22068 	 * make a call to condition PHC.
22069 	 */
22070 	uint16_t	phc_active_fid0;
22071 	/*
22072 	 * Firmware returns the second last non-master/non-secondary function
22073 	 * to make a call to condition PHC.
22074 	 */
22075 	uint16_t	phc_active_fid1;
22076 	/*
22077 	 * Timestamp indicating the last time a failover happened. The master
22078 	 * and secondary functions in the failover event is indicated in the
22079 	 * next two fields.
22080 	 */
22081 	uint32_t	last_failover_event;
22082 	/*
22083 	 * Last failover happened from this function. This was the master
22084 	 * function at the time of failover.
22085 	 */
22086 	uint16_t	from_fid;
22087 	/*
22088 	 * Last failover happened to this function. This was the secondary
22089 	 * function at the time of failover.
22090 	 */
22091 	uint16_t	to_fid;
22092 	uint8_t	unused_0[7];
22093 	/*
22094 	 * This field is used in Output records to indicate that the output
22095 	 * is completely written to RAM. This field should be read as '1'
22096 	 * to indicate that the output has been completely written. When
22097 	 * writing a command completion or response to an internal processor,
22098 	 * the order of writes has to be such that this field is written last.
22099 	 */
22100 	uint8_t	valid;
22101 } hwrm_func_ptp_ext_qcfg_output_t, *phwrm_func_ptp_ext_qcfg_output_t;
22102 
22103 /***************************
22104  * hwrm_func_key_ctx_alloc *
22105  ***************************/
22106 
22107 
22108 /* hwrm_func_key_ctx_alloc_input (size:384b/48B) */
22109 
22110 typedef struct hwrm_func_key_ctx_alloc_input {
22111 	/* The HWRM command request type. */
22112 	uint16_t	req_type;
22113 	/*
22114 	 * The completion ring to send the completion event on. This should
22115 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22116 	 */
22117 	uint16_t	cmpl_ring;
22118 	/*
22119 	 * The sequence ID is used by the driver for tracking multiple
22120 	 * commands. This ID is treated as opaque data by the firmware and
22121 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22122 	 */
22123 	uint16_t	seq_id;
22124 	/*
22125 	 * The target ID of the command:
22126 	 * * 0x0-0xFFF8 - The function ID
22127 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22128 	 * * 0xFFFD - Reserved for user-space HWRM interface
22129 	 * * 0xFFFF - HWRM
22130 	 */
22131 	uint16_t	target_id;
22132 	/*
22133 	 * A physical address pointer pointing to a host buffer that the
22134 	 * command's response data will be written. This can be either a host
22135 	 * physical address (HPA) or a guest physical address (GPA) and must
22136 	 * point to a physically contiguous block of memory.
22137 	 */
22138 	uint64_t	resp_addr;
22139 	/* Function ID. */
22140 	uint16_t	fid;
22141 	/*
22142 	 * Number of Key Contexts to be allocated.
22143 	 * When running in the XID partition mode, if the call is made by
22144 	 * a VF driver, this field specifies the number of XIDs requested
22145 	 * by the VF driver. The XID partitions are managed by the PF
22146 	 * driver in XID partition mode and the VF command will be
22147 	 * redirected to the PF driver. The PF driver may reduce this
22148 	 * number if it cannot allocate a big enough block of XID
22149 	 * partitions to satisfy the request.
22150 	 * This field must not exceed the maximum batch size specified in
22151 	 * the max_key_ctxs_alloc field of the HWRM_FUNC_QCAPS response,
22152 	 * must not be zero, and must be integer multiples of the
22153 	 * partition size specified in the ctxs_per_partition field of
22154 	 * the HWRM_FUNC_QCAPS response.
22155 	 */
22156 	uint16_t	num_key_ctxs;
22157 	/*
22158 	 * DMA buffer size in bytes. This field in invalid in the XID
22159 	 * partition mode.
22160 	 */
22161 	uint32_t	dma_bufr_size_bytes;
22162 	/* Key Context type. */
22163 	uint8_t	key_ctx_type;
22164 	/* KTLS Tx Key Context type. */
22165 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_TX	UINT32_C(0x0)
22166 	/* KTLS Rx Key Context type. */
22167 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_RX	UINT32_C(0x1)
22168 	/* QUIC Tx Key Context type. */
22169 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_QUIC_TX UINT32_C(0x2)
22170 	/* QUIC Rx Key Context type. */
22171 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_QUIC_RX UINT32_C(0x3)
22172 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_LAST   HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_QUIC_RX
22173 	uint8_t	unused_0[7];
22174 	/*
22175 	 * Host DMA address to send back KTLS context IDs. This field is
22176 	 * invalid in the XID partition mode.
22177 	 */
22178 	uint64_t	host_dma_addr;
22179 	/*
22180 	 * This field is only used by the PF driver that manages the XID
22181 	 * partitions. This field specifies the starting XID of one or
22182 	 * more contiguous XID partitions allocated by the PF driver.
22183 	 * This field is not used by the VF driver.
22184 	 * If the call is successful, this starting XID value will be
22185 	 * returned in the partition_start_xid field of the response.
22186 	 */
22187 	uint32_t	partition_start_xid;
22188 	uint8_t	unused_1[4];
22189 } hwrm_func_key_ctx_alloc_input_t, *phwrm_func_key_ctx_alloc_input_t;
22190 
22191 /* hwrm_func_key_ctx_alloc_output (size:192b/24B) */
22192 
22193 typedef struct hwrm_func_key_ctx_alloc_output {
22194 	/* The specific error status for the command. */
22195 	uint16_t	error_code;
22196 	/* The HWRM command request type. */
22197 	uint16_t	req_type;
22198 	/* The sequence ID from the original command. */
22199 	uint16_t	seq_id;
22200 	/* The length of the response data in number of bytes. */
22201 	uint16_t	resp_len;
22202 	/* Number of Key Contexts that have been allocated. */
22203 	uint16_t	num_key_ctxs_allocated;
22204 	/* Control flags. */
22205 	uint8_t	flags;
22206 	/*
22207 	 * When set, it indicates that all key contexts allocated by this
22208 	 * command are contiguous. As a result, the driver has to read the
22209 	 * start context ID from the first entry of the DMA data buffer
22210 	 * and figures out the end context ID by 'start context ID +
22211 	 * num_key_ctxs_allocated - 1'. In XID partition mode,
22212 	 * this bit should always be set.
22213 	 */
22214 	#define HWRM_FUNC_KEY_CTX_ALLOC_OUTPUT_FLAGS_KEY_CTXS_CONTIGUOUS	UINT32_C(0x1)
22215 	uint8_t	unused_0;
22216 	/*
22217 	 * This field is only valid in the XID partition mode. It indicates
22218 	 * the starting XID that has been allocated.
22219 	 */
22220 	uint32_t	partition_start_xid;
22221 	uint8_t	unused_1[7];
22222 	/*
22223 	 * This field is used in Output records to indicate that the output
22224 	 * is completely written to RAM. This field should be read as '1'
22225 	 * to indicate that the output has been completely written. When
22226 	 * writing a command completion or response to an internal processor,
22227 	 * the order of writes has to be such that this field is written last.
22228 	 */
22229 	uint8_t	valid;
22230 } hwrm_func_key_ctx_alloc_output_t, *phwrm_func_key_ctx_alloc_output_t;
22231 
22232 /**************************
22233  * hwrm_func_key_ctx_free *
22234  **************************/
22235 
22236 
22237 /* hwrm_func_key_ctx_free_input (size:256b/32B) */
22238 
22239 typedef struct hwrm_func_key_ctx_free_input {
22240 	/* The HWRM command request type. */
22241 	uint16_t	req_type;
22242 	/*
22243 	 * The completion ring to send the completion event on. This should
22244 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22245 	 */
22246 	uint16_t	cmpl_ring;
22247 	/*
22248 	 * The sequence ID is used by the driver for tracking multiple
22249 	 * commands. This ID is treated as opaque data by the firmware and
22250 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22251 	 */
22252 	uint16_t	seq_id;
22253 	/*
22254 	 * The target ID of the command:
22255 	 * * 0x0-0xFFF8 - The function ID
22256 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22257 	 * * 0xFFFD - Reserved for user-space HWRM interface
22258 	 * * 0xFFFF - HWRM
22259 	 */
22260 	uint16_t	target_id;
22261 	/*
22262 	 * A physical address pointer pointing to a host buffer that the
22263 	 * command's response data will be written. This can be either a host
22264 	 * physical address (HPA) or a guest physical address (GPA) and must
22265 	 * point to a physically contiguous block of memory.
22266 	 */
22267 	uint64_t	resp_addr;
22268 	/* Function ID. */
22269 	uint16_t	fid;
22270 	/* Key Context type. */
22271 	uint8_t	key_ctx_type;
22272 	/* KTLS Tx Key Context type. */
22273 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_TX	UINT32_C(0x0)
22274 	/* KTLS Rx Key Context type. */
22275 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_RX	UINT32_C(0x1)
22276 	/* QUIC Tx Key Context type. */
22277 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_QUIC_TX UINT32_C(0x2)
22278 	/* QUIC Rx Key Context type. */
22279 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_QUIC_RX UINT32_C(0x3)
22280 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_LAST   HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_QUIC_RX
22281 	uint8_t	unused_0;
22282 	/* Starting XID of the partition that needs to be freed. */
22283 	uint32_t	partition_start_xid;
22284 	/*
22285 	 * Number of entries to be freed.
22286 	 * When running in the XID partition mode, this field is only
22287 	 * used by the PF driver that manages the XID partitions.
22288 	 * The PF driver specifies the number of XIDs to be freed and
22289 	 * this number is always equal to the number of XIDs previously
22290 	 * allocated successfully using HWRM_FUNC_KEY_CTX_ALLOC.
22291 	 * This field is not used by the VF driver.
22292 	 */
22293 	uint16_t	num_entries;
22294 	uint8_t	unused_1[6];
22295 } hwrm_func_key_ctx_free_input_t, *phwrm_func_key_ctx_free_input_t;
22296 
22297 /* hwrm_func_key_ctx_free_output (size:128b/16B) */
22298 
22299 typedef struct hwrm_func_key_ctx_free_output {
22300 	/* The specific error status for the command. */
22301 	uint16_t	error_code;
22302 	/* The HWRM command request type. */
22303 	uint16_t	req_type;
22304 	/* The sequence ID from the original command. */
22305 	uint16_t	seq_id;
22306 	/* The length of the response data in number of bytes. */
22307 	uint16_t	resp_len;
22308 	uint8_t	rsvd0[7];
22309 	/*
22310 	 * This field is used in Output records to indicate that the
22311 	 * output is completely written to RAM. This field should be
22312 	 * read as '1' to indicate that the output has been completely
22313 	 * written. When writing a command completion or response to
22314 	 * an internal processor, the order of writes has to be such
22315 	 * that this field is written last.
22316 	 */
22317 	uint8_t	valid;
22318 } hwrm_func_key_ctx_free_output_t, *phwrm_func_key_ctx_free_output_t;
22319 
22320 /**********************************
22321  * hwrm_func_backing_store_cfg_v2 *
22322  **********************************/
22323 
22324 
22325 /* hwrm_func_backing_store_cfg_v2_input (size:448b/56B) */
22326 
22327 typedef struct hwrm_func_backing_store_cfg_v2_input {
22328 	/* The HWRM command request type. */
22329 	uint16_t	req_type;
22330 	/*
22331 	 * The completion ring to send the completion event on. This should
22332 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22333 	 */
22334 	uint16_t	cmpl_ring;
22335 	/*
22336 	 * The sequence ID is used by the driver for tracking multiple
22337 	 * commands. This ID is treated as opaque data by the firmware and
22338 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22339 	 */
22340 	uint16_t	seq_id;
22341 	/*
22342 	 * The target ID of the command:
22343 	 * * 0x0-0xFFF8 - The function ID
22344 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22345 	 * * 0xFFFD - Reserved for user-space HWRM interface
22346 	 * * 0xFFFF - HWRM
22347 	 */
22348 	uint16_t	target_id;
22349 	/*
22350 	 * A physical address pointer pointing to a host buffer that the
22351 	 * command's response data will be written. This can be either a host
22352 	 * physical address (HPA) or a guest physical address (GPA) and must
22353 	 * point to a physically contiguous block of memory.
22354 	 */
22355 	uint64_t	resp_addr;
22356 	/* Type of backing store to be configured. */
22357 	uint16_t	type;
22358 	/* Queue pair. */
22359 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_QP		UINT32_C(0x0)
22360 	/* Shared receive queue. */
22361 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRQ		UINT32_C(0x1)
22362 	/* Completion queue. */
22363 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CQ		UINT32_C(0x2)
22364 	/* Virtual NIC. */
22365 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_VNIC		UINT32_C(0x3)
22366 	/* Statistic context. */
22367 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_STAT		UINT32_C(0x4)
22368 	/* Slow-path TQM ring. */
22369 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SP_TQM_RING	UINT32_C(0x5)
22370 	/* Fast-path TQM ring. */
22371 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_FP_TQM_RING	UINT32_C(0x6)
22372 	/* Memory Region and Memory Address Vector Context. */
22373 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_MRAV		UINT32_C(0xe)
22374 	/* TIM. */
22375 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TIM		UINT32_C(0xf)
22376 	/* Tx crypto key. */
22377 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TX_CK	UINT32_C(0x13)
22378 	/* Rx crypto key. */
22379 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RX_CK	UINT32_C(0x14)
22380 	/* Mid-path TQM ring. */
22381 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_MP_TQM_RING	UINT32_C(0x15)
22382 	/* SQ Doorbell shadow region. */
22383 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SQ_DB_SHADOW	UINT32_C(0x16)
22384 	/* RQ Doorbell shadow region. */
22385 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RQ_DB_SHADOW	UINT32_C(0x17)
22386 	/* SRQ Doorbell shadow region. */
22387 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRQ_DB_SHADOW   UINT32_C(0x18)
22388 	/* CQ Doorbell shadow region. */
22389 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CQ_DB_SHADOW	UINT32_C(0x19)
22390 	/* CFA table scope context. */
22391 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TBL_SCOPE	UINT32_C(0x1c)
22392 	/* XID partition context. */
22393 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_XID_PARTITION   UINT32_C(0x1d)
22394 	/* SRT trace. */
22395 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRT_TRACE	UINT32_C(0x1e)
22396 	/* SRT2 trace. */
22397 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRT2_TRACE	UINT32_C(0x1f)
22398 	/* CRT trace. */
22399 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CRT_TRACE	UINT32_C(0x20)
22400 	/* CRT2 trace. */
22401 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CRT2_TRACE	UINT32_C(0x21)
22402 	/* RIGP0 trace. */
22403 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RIGP0_TRACE	UINT32_C(0x22)
22404 	/* L2 HWRM trace. */
22405 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_L2_HWRM_TRACE   UINT32_C(0x23)
22406 	/* RoCE HWRM trace. */
22407 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_ROCE_HWRM_TRACE UINT32_C(0x24)
22408 	/* Invalid type. */
22409 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_INVALID	UINT32_C(0xffff)
22410 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_LAST	HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_INVALID
22411 	/*
22412 	 * Instance of the backing store type. It is zero-based,
22413 	 * which means "0" indicates the first instance. For backing
22414 	 * stores with single instance only, leave this field to 0.
22415 	 * 1. If the backing store type is MPC TQM ring, use the following
22416 	 *	instance value to map to MPC clients:
22417 	 *	TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
22418 	 * 2. If the backing store type is TBL_SCOPE, use the following
22419 	 *	instance value to map to table scope regions:
22420 	 *	RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
22421 	 * 3. If the backing store type is XID partition, use the following
22422 	 *	instance value to map to context types:
22423 	 *	TX_CK (0), RX_CK (1)
22424 	 */
22425 	uint16_t	instance;
22426 	/* Control flags. */
22427 	uint32_t	flags;
22428 	/*
22429 	 * When set, the firmware only uses on-chip resources and
22430 	 * does not expect any backing store to be provided by the
22431 	 * host driver. This mode provides minimal L2 functionality
22432 	 * (e.g. limited L2 resources, no RoCE).
22433 	 */
22434 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_PREBOOT_MODE	UINT32_C(0x1)
22435 	/*
22436 	 * When set, the driver indicates that the backing store type
22437 	 * to be configured in this command is the last one to do for
22438 	 * the associated PF. That means all backing store type
22439 	 * configurations are done for the corresponding PF after this
22440 	 * command. As a result, the firmware has to do the necessary
22441 	 * post configurations.
22442 	 */
22443 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_BS_CFG_ALL_DONE	UINT32_C(0x2)
22444 	/*
22445 	 * When set, the driver indicates extending the size of the specific
22446 	 * backing store type instead of configuring the corresponding PBLs.
22447 	 * The size specified in the command will be the new size to be
22448 	 * configured. The operation is only valid when the specific backing
22449 	 * store has been configured before. Otherwise, the firmware will
22450 	 * return an error. The driver needs to zero out the 'entry_size',
22451 	 * 'flags', 'page_dir', and 'page_size_pbl_level' fields, and the
22452 	 * firmware will ignore these inputs. Further, the firmware expects
22453 	 * the 'num_entries' and any valid split entries to be no less than
22454 	 * the initial value that has been configured. If not, it will
22455 	 * return an error code.
22456 	 */
22457 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_BS_EXTEND	UINT32_C(0x4)
22458 	/* Page directory. */
22459 	uint64_t	page_dir;
22460 	/* Number of entries */
22461 	uint32_t	num_entries;
22462 	/* Number of bytes allocated for each entry */
22463 	uint16_t	entry_size;
22464 	/* Page size and pbl level. */
22465 	uint8_t	page_size_pbl_level;
22466 	/* PBL indirect levels. */
22467 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_MASK  UINT32_C(0xf)
22468 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_SFT   0
22469 	/* PBL pointer is physical start address. */
22470 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_0   UINT32_C(0x0)
22471 	/* PBL pointer points to PTE table. */
22472 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_1   UINT32_C(0x1)
22473 	/*
22474 	 * PBL pointer points to PDE table with each entry pointing to
22475 	 * PTE tables.
22476 	 */
22477 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_2   UINT32_C(0x2)
22478 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LAST   HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_2
22479 	/* Page size. */
22480 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_MASK  UINT32_C(0xf0)
22481 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_SFT   4
22482 	/* 4KB. */
22483 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_4K   (UINT32_C(0x0) << 4)
22484 	/* 8KB. */
22485 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_8K   (UINT32_C(0x1) << 4)
22486 	/* 64KB. */
22487 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_64K  (UINT32_C(0x2) << 4)
22488 	/* 2MB. */
22489 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_2M   (UINT32_C(0x3) << 4)
22490 	/* 8MB. */
22491 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_8M   (UINT32_C(0x4) << 4)
22492 	/* 1GB. */
22493 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_1G   (UINT32_C(0x5) << 4)
22494 		#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_LAST   HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_1G
22495 	/*
22496 	 * This field counts how many split entries contain valid data.
22497 	 * Below is the table that maps the count value:
22498 	 * | Count |			Indication			|
22499 	 * | ----- | -------------------------------------------------- |
22500 	 * |   0   | None of the split entries has valid data.	|
22501 	 * |   1   | Only "split_entry_0" contains valid data.	|
22502 	 * |   2   | Only "split_entry_0" and "1" have valid data.	|
22503 	 * |   3   | Only "split_entry_0", "1" and "2" have valid data. |
22504 	 * |   4   | All four split entries have valid data.		|
22505 	 */
22506 	uint8_t	subtype_valid_cnt;
22507 	/*
22508 	 * Split entry #0. Note that the four split entries (as a group)
22509 	 * must be cast to a type-specific data structure first before
22510 	 * accessing it! Below is the table that maps a backing store
22511 	 * type to the associated split entry casting data structure.
22512 	 * | Type |	Split Entry Casting Data Structure	|
22513 	 * | ---- | -------------------------------------------------- |
22514 	 * | QPC  |		qpc_split_entries			|
22515 	 * | SRQ  |		srq_split_entries			|
22516 	 * | CQ   |		cq_split_entries			|
22517 	 * | VINC |		vnic_split_entries			|
22518 	 * | MRAV |		mrav_split_entries			|
22519 	 * | TS   |		ts_split_entries			|
22520 	 * | CK   |		ck_split_entries			|
22521 	 */
22522 	uint32_t	split_entry_0;
22523 	/* Split entry #1. */
22524 	uint32_t	split_entry_1;
22525 	/* Split entry #2. */
22526 	uint32_t	split_entry_2;
22527 	/* Split entry #3. */
22528 	uint32_t	split_entry_3;
22529 } hwrm_func_backing_store_cfg_v2_input_t, *phwrm_func_backing_store_cfg_v2_input_t;
22530 
22531 /* hwrm_func_backing_store_cfg_v2_output (size:128b/16B) */
22532 
22533 typedef struct hwrm_func_backing_store_cfg_v2_output {
22534 	/* The specific error status for the command. */
22535 	uint16_t	error_code;
22536 	/* The HWRM command request type. */
22537 	uint16_t	req_type;
22538 	/* The sequence ID from the original command. */
22539 	uint16_t	seq_id;
22540 	/* The length of the response data in number of bytes. */
22541 	uint16_t	resp_len;
22542 	uint8_t	rsvd0[7];
22543 	/*
22544 	 * This field is used in Output records to indicate that the
22545 	 * output is completely written to RAM. This field should be
22546 	 * read as '1' to indicate that the output has been completely
22547 	 * written. When writing a command completion or response to
22548 	 * an internal processor, the order of writes has to be such
22549 	 * that this field is written last.
22550 	 */
22551 	uint8_t	valid;
22552 } hwrm_func_backing_store_cfg_v2_output_t, *phwrm_func_backing_store_cfg_v2_output_t;
22553 
22554 /***********************************
22555  * hwrm_func_backing_store_qcfg_v2 *
22556  ***********************************/
22557 
22558 
22559 /* hwrm_func_backing_store_qcfg_v2_input (size:192b/24B) */
22560 
22561 typedef struct hwrm_func_backing_store_qcfg_v2_input {
22562 	/* The HWRM command request type. */
22563 	uint16_t	req_type;
22564 	/*
22565 	 * The completion ring to send the completion event on. This should
22566 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22567 	 */
22568 	uint16_t	cmpl_ring;
22569 	/*
22570 	 * The sequence ID is used by the driver for tracking multiple
22571 	 * commands. This ID is treated as opaque data by the firmware and
22572 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22573 	 */
22574 	uint16_t	seq_id;
22575 	/*
22576 	 * The target ID of the command:
22577 	 * * 0x0-0xFFF8 - The function ID
22578 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22579 	 * * 0xFFFD - Reserved for user-space HWRM interface
22580 	 * * 0xFFFF - HWRM
22581 	 */
22582 	uint16_t	target_id;
22583 	/*
22584 	 * A physical address pointer pointing to a host buffer that the
22585 	 * command's response data will be written. This can be either a host
22586 	 * physical address (HPA) or a guest physical address (GPA) and must
22587 	 * point to a physically contiguous block of memory.
22588 	 */
22589 	uint64_t	resp_addr;
22590 	/* Type of backing store to be configured. */
22591 	uint16_t	type;
22592 	/* Queue pair. */
22593 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_QP		UINT32_C(0x0)
22594 	/* Shared receive queue. */
22595 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRQ		UINT32_C(0x1)
22596 	/* Completion queue. */
22597 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CQ		UINT32_C(0x2)
22598 	/* Virtual NIC. */
22599 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_VNIC		UINT32_C(0x3)
22600 	/* Statistic context. */
22601 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_STAT		UINT32_C(0x4)
22602 	/* Slow-path TQM ring. */
22603 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SP_TQM_RING	UINT32_C(0x5)
22604 	/* Fast-path TQM ring. */
22605 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_FP_TQM_RING	UINT32_C(0x6)
22606 	/* Memory Region and Memory Address Vector Context. */
22607 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_MRAV		UINT32_C(0xe)
22608 	/* TIM. */
22609 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TIM		UINT32_C(0xf)
22610 	/* Tx crypto key. */
22611 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TX_CK		UINT32_C(0x13)
22612 	/* Rx crypto key. */
22613 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RX_CK		UINT32_C(0x14)
22614 	/* Mid-path TQM ring. */
22615 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_MP_TQM_RING	UINT32_C(0x15)
22616 	/* SQ Doorbell shadow region. */
22617 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SQ_DB_SHADOW	UINT32_C(0x16)
22618 	/* RQ Doorbell shadow region. */
22619 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RQ_DB_SHADOW	UINT32_C(0x17)
22620 	/* SRQ Doorbell shadow region. */
22621 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRQ_DB_SHADOW	UINT32_C(0x18)
22622 	/* CQ Doorbell shadow region. */
22623 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CQ_DB_SHADOW	UINT32_C(0x19)
22624 	/* CFA table scope context. */
22625 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TBL_SCOPE	UINT32_C(0x1c)
22626 	/* VF XID partition in-use table. */
22627 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_XID_PARTITION_TABLE UINT32_C(0x1d)
22628 	/* SRT trace. */
22629 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRT_TRACE	UINT32_C(0x1e)
22630 	/* SRT2 trace. */
22631 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRT2_TRACE	UINT32_C(0x1f)
22632 	/* CRT trace. */
22633 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CRT_TRACE	UINT32_C(0x20)
22634 	/* CRT2 trace. */
22635 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CRT2_TRACE	UINT32_C(0x21)
22636 	/* RIGP0 trace. */
22637 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RIGP0_TRACE	UINT32_C(0x22)
22638 	/* L2 HWRM trace. */
22639 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_L2_HWRM_TRACE	UINT32_C(0x23)
22640 	/* RoCE HWRM trace. */
22641 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_ROCE_HWRM_TRACE	UINT32_C(0x24)
22642 	/* Invalid type. */
22643 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_INVALID		UINT32_C(0xffff)
22644 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_LAST		HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_INVALID
22645 	/*
22646 	 * Instance of the backing store type. It is zero-based,
22647 	 * which means "0" indicates the first instance. For backing
22648 	 * stores with single instance only, leave this field to 0.
22649 	 * 1. If the backing store type is MPC TQM ring, use the following
22650 	 *	instance value to map to MPC clients:
22651 	 *	TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
22652 	 * 2. If the backing store type is TBL_SCOPE, use the following
22653 	 *	instance value to map to table scope regions:
22654 	 *	RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
22655 	 * 3. If the backing store type is XID partition, use the following
22656 	 *	instance value to map to context types:
22657 	 *	TX_CK (0), RX_CK (1)
22658 	 */
22659 	uint16_t	instance;
22660 	uint8_t	rsvd[4];
22661 } hwrm_func_backing_store_qcfg_v2_input_t, *phwrm_func_backing_store_qcfg_v2_input_t;
22662 
22663 /* hwrm_func_backing_store_qcfg_v2_output (size:448b/56B) */
22664 
22665 typedef struct hwrm_func_backing_store_qcfg_v2_output {
22666 	/* The specific error status for the command. */
22667 	uint16_t	error_code;
22668 	/* The HWRM command request type. */
22669 	uint16_t	req_type;
22670 	/* The sequence ID from the original command. */
22671 	uint16_t	seq_id;
22672 	/* The length of the response data in number of bytes. */
22673 	uint16_t	resp_len;
22674 	/* Type of backing store to be configured. */
22675 	uint16_t	type;
22676 	/* Queue pair. */
22677 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_QP		UINT32_C(0x0)
22678 	/* Shared receive queue. */
22679 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRQ		UINT32_C(0x1)
22680 	/* Completion queue. */
22681 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CQ		UINT32_C(0x2)
22682 	/* Virtual NIC. */
22683 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_VNIC		UINT32_C(0x3)
22684 	/* Statistic context. */
22685 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_STAT		UINT32_C(0x4)
22686 	/* Slow-path TQM ring. */
22687 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SP_TQM_RING	UINT32_C(0x5)
22688 	/* Fast-path TQM ring. */
22689 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_FP_TQM_RING	UINT32_C(0x6)
22690 	/* Memory Region and Memory Address Vector Context. */
22691 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_MRAV		UINT32_C(0xe)
22692 	/* TIM. */
22693 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_TIM		UINT32_C(0xf)
22694 	/* Tx crypto key. */
22695 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_TX_CK	UINT32_C(0x13)
22696 	/* Rx crypto key. */
22697 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_RX_CK	UINT32_C(0x14)
22698 	/* Mid-path TQM ring. */
22699 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_MP_TQM_RING	UINT32_C(0x15)
22700 	/* CFA table scope context. */
22701 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_TBL_SCOPE	UINT32_C(0x1c)
22702 	/* XID partition context. */
22703 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_XID_PARTITION   UINT32_C(0x1d)
22704 	/* SRT trace. */
22705 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRT_TRACE	UINT32_C(0x1e)
22706 	/* SRT2 trace. */
22707 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRT2_TRACE	UINT32_C(0x1f)
22708 	/* CRT trace. */
22709 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CRT_TRACE	UINT32_C(0x20)
22710 	/* CRT2 trace. */
22711 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CRT2_TRACE	UINT32_C(0x21)
22712 	/* RIGP0 trace. */
22713 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_RIGP0_TRACE	UINT32_C(0x22)
22714 	/* L2 HWRM trace. */
22715 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_L2_HWRM_TRACE   UINT32_C(0x23)
22716 	/* RoCE HWRM trace. */
22717 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_ROCE_HWRM_TRACE UINT32_C(0x24)
22718 	/* Invalid type. */
22719 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_INVALID	UINT32_C(0xffff)
22720 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_LAST	HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_INVALID
22721 	/*
22722 	 * Instance of the backing store type. It is zero-based,
22723 	 * which means "0" indicates the first instance. For backing
22724 	 * stores with single instance only, leave this field to 0.
22725 	 * 1. If the backing store type is MPC TQM ring, use the following
22726 	 *	instance value to map to MPC clients:
22727 	 *	TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
22728 	 * 2. If the backing store type is TBL_SCOPE, use the following
22729 	 *	instance value to map to table scope regions:
22730 	 *	RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
22731 	 * 3. If the backing store type is XID partition, use the following
22732 	 *	instance value to map to context types:
22733 	 *	TX_CK (0), RX_CK (1)
22734 	 */
22735 	uint16_t	instance;
22736 	/* Control flags. */
22737 	uint32_t	flags;
22738 	/* Page directory. */
22739 	uint64_t	page_dir;
22740 	/* Number of entries */
22741 	uint32_t	num_entries;
22742 	/* Page size and pbl level. */
22743 	uint8_t	page_size_pbl_level;
22744 	/* PBL indirect levels. */
22745 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_MASK  UINT32_C(0xf)
22746 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_SFT   0
22747 	/* PBL pointer is physical start address. */
22748 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_0   UINT32_C(0x0)
22749 	/* PBL pointer points to PTE table. */
22750 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_1   UINT32_C(0x1)
22751 	/*
22752 	 * PBL pointer points to PDE table with each entry pointing to
22753 	 * PTE tables.
22754 	 */
22755 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_2   UINT32_C(0x2)
22756 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LAST   HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_2
22757 	/* Page size. */
22758 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_MASK  UINT32_C(0xf0)
22759 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_SFT   4
22760 	/* 4KB. */
22761 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_4K   (UINT32_C(0x0) << 4)
22762 	/* 8KB. */
22763 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_8K   (UINT32_C(0x1) << 4)
22764 	/* 64KB. */
22765 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_64K  (UINT32_C(0x2) << 4)
22766 	/* 2MB. */
22767 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_2M   (UINT32_C(0x3) << 4)
22768 	/* 8MB. */
22769 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_8M   (UINT32_C(0x4) << 4)
22770 	/* 1GB. */
22771 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_1G   (UINT32_C(0x5) << 4)
22772 		#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_LAST   HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_1G
22773 	/*
22774 	 * This field counts how many split entries contain valid data.
22775 	 * Below is the table that maps the count value:
22776 	 * | count |			Indication			|
22777 	 * | ----- | -------------------------------------------------- |
22778 	 * |   0   | None of the split entries has valid data.	|
22779 	 * |   1   | Only "split_entry_0" contains valid data.	|
22780 	 * |   2   | Only "split_entry_0" and "1" have valid data.	|
22781 	 * |   3   | Only "split_entry_0", "1" and "2" have valid data. |
22782 	 * |   4   | All four split entries have valid data.		|
22783 	 */
22784 	uint8_t	subtype_valid_cnt;
22785 	uint8_t	rsvd[2];
22786 	/*
22787 	 * Split entry #0. Note that the four split entries (as a group)
22788 	 * must be cast to a type-specific data structure first before
22789 	 * accessing it! Below is the table that maps a backing store
22790 	 * type to the associated split entry casting data structure.
22791 	 * | Type |	Split Entry Casting Data Structure	|
22792 	 * | ---- | -------------------------------------------------- |
22793 	 * | QPC  |		qpc_split_entries			|
22794 	 * | SRQ  |		srq_split_entries			|
22795 	 * | CQ   |		cq_split_entries			|
22796 	 * | VINC |		vnic_split_entries			|
22797 	 * | MRAV |		mrav_split_entries			|
22798 	 * | TS   |		ts_split_entries			|
22799 	 * | CK   |		ck_split_entries			|
22800 	 */
22801 	uint32_t	split_entry_0;
22802 	/* Split entry #1. */
22803 	uint32_t	split_entry_1;
22804 	/* Split entry #2. */
22805 	uint32_t	split_entry_2;
22806 	/* Split entry #3. */
22807 	uint32_t	split_entry_3;
22808 	uint8_t	rsvd2[7];
22809 	/*
22810 	 * This field is used in Output records to indicate that the
22811 	 * output is completely written to RAM. This field should be
22812 	 * read as '1' to indicate that the output has been completely
22813 	 * written. When writing a command completion or response to
22814 	 * an internal processor, the order of writes has to be such
22815 	 * that this field is written last.
22816 	 */
22817 	uint8_t	valid;
22818 } hwrm_func_backing_store_qcfg_v2_output_t, *phwrm_func_backing_store_qcfg_v2_output_t;
22819 
22820 /* Common structure to cast QPC split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is QPC. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
22821 /* qpc_split_entries (size:128b/16B) */
22822 
22823 typedef struct qpc_split_entries {
22824 	/* Number of L2 QP backing store entries. */
22825 	uint32_t	qp_num_l2_entries;
22826 	/* Number of QP1 entries. */
22827 	uint32_t	qp_num_qp1_entries;
22828 	/*
22829 	 * Number of RoCE QP context entries required for this
22830 	 * function to support fast QP modify destroy feature.
22831 	 */
22832 	uint32_t	qp_num_fast_qpmd_entries;
22833 	uint32_t	rsvd;
22834 } qpc_split_entries_t, *pqpc_split_entries_t;
22835 
22836 /* Common structure to cast SRQ split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is SRQ. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
22837 /* srq_split_entries (size:128b/16B) */
22838 
22839 typedef struct srq_split_entries {
22840 	/* Number of L2 SRQ backing store entries. */
22841 	uint32_t	srq_num_l2_entries;
22842 	uint32_t	rsvd;
22843 	uint64_t	rsvd2;
22844 } srq_split_entries_t, *psrq_split_entries_t;
22845 
22846 /* Common structure to cast CQ split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is CQ. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
22847 /* cq_split_entries (size:128b/16B) */
22848 
22849 typedef struct cq_split_entries {
22850 	/* Number of L2 CQ backing store entries. */
22851 	uint32_t	cq_num_l2_entries;
22852 	uint32_t	rsvd;
22853 	uint64_t	rsvd2;
22854 } cq_split_entries_t, *pcq_split_entries_t;
22855 
22856 /* Common structure to cast VNIC split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is VNIC. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
22857 /* vnic_split_entries (size:128b/16B) */
22858 
22859 typedef struct vnic_split_entries {
22860 	/* Number of VNIC backing store entries. */
22861 	uint32_t	vnic_num_vnic_entries;
22862 	uint32_t	rsvd;
22863 	uint64_t	rsvd2;
22864 } vnic_split_entries_t, *pvnic_split_entries_t;
22865 
22866 /* Common structure to cast MRAV split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is MRAV. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
22867 /* mrav_split_entries (size:128b/16B) */
22868 
22869 typedef struct mrav_split_entries {
22870 	/* Number of AV backing store entries. */
22871 	uint32_t	mrav_num_av_entries;
22872 	uint32_t	rsvd;
22873 	uint64_t	rsvd2;
22874 } mrav_split_entries_t, *pmrav_split_entries_t;
22875 
22876 /* Common structure to cast TBL_SCOPE split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is TBL_SCOPE. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
22877 /* ts_split_entries (size:128b/16B) */
22878 
22879 typedef struct ts_split_entries {
22880 	/* Max number of TBL_SCOPE region entries (QCAPS). */
22881 	uint32_t	region_num_entries;
22882 	/* tsid to configure (CFG). */
22883 	uint8_t	tsid;
22884 	/*
22885 	 * Lkup static bucket count (power of 2).
22886 	 * Array is indexed by enum cfa_dir
22887 	 */
22888 	uint8_t	lkup_static_bkt_cnt_exp[2];
22889 	uint8_t	rsvd;
22890 	uint64_t	rsvd2;
22891 } ts_split_entries_t, *pts_split_entries_t;
22892 
22893 /* Common structure to cast crypto key split entries. This casting is required in the following HWRM command inputs/outputs if the backing store type is TX_CK or RX_CK. 1. hwrm_func_backing_store_cfg_v2_input 2. hwrm_func_backing_store_qcfg_v2_output 3. hwrm_func_backing_store_qcaps_v2_output */
22894 /* ck_split_entries (size:128b/16B) */
22895 
22896 typedef struct ck_split_entries {
22897 	/*
22898 	 * Number of QUIC backing store entries. That means the number of KTLS
22899 	 * backing store entries is the difference between this number and the
22900 	 * total number of crypto key entries.
22901 	 */
22902 	uint32_t	num_quic_entries;
22903 	uint32_t	rsvd;
22904 	uint64_t	rsvd2;
22905 } ck_split_entries_t, *pck_split_entries_t;
22906 
22907 /************************************
22908  * hwrm_func_backing_store_qcaps_v2 *
22909  ************************************/
22910 
22911 
22912 /* hwrm_func_backing_store_qcaps_v2_input (size:192b/24B) */
22913 
22914 typedef struct hwrm_func_backing_store_qcaps_v2_input {
22915 	/* The HWRM command request type. */
22916 	uint16_t	req_type;
22917 	/*
22918 	 * The completion ring to send the completion event on. This should
22919 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22920 	 */
22921 	uint16_t	cmpl_ring;
22922 	/*
22923 	 * The sequence ID is used by the driver for tracking multiple
22924 	 * commands. This ID is treated as opaque data by the firmware and
22925 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22926 	 */
22927 	uint16_t	seq_id;
22928 	/*
22929 	 * The target ID of the command:
22930 	 * * 0x0-0xFFF8 - The function ID
22931 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22932 	 * * 0xFFFD - Reserved for user-space HWRM interface
22933 	 * * 0xFFFF - HWRM
22934 	 */
22935 	uint16_t	target_id;
22936 	/*
22937 	 * A physical address pointer pointing to a host buffer that the
22938 	 * command's response data will be written. This can be either a host
22939 	 * physical address (HPA) or a guest physical address (GPA) and must
22940 	 * point to a physically contiguous block of memory.
22941 	 */
22942 	uint64_t	resp_addr;
22943 	/* Type of backing store to be queried. */
22944 	uint16_t	type;
22945 	/* Queue pair. */
22946 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_QP		UINT32_C(0x0)
22947 	/* Shared receive queue. */
22948 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRQ		UINT32_C(0x1)
22949 	/* Completion queue. */
22950 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CQ		UINT32_C(0x2)
22951 	/* Virtual NIC. */
22952 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_VNIC		UINT32_C(0x3)
22953 	/* Statistic context. */
22954 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_STAT		UINT32_C(0x4)
22955 	/* Slow-path TQM ring. */
22956 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SP_TQM_RING	UINT32_C(0x5)
22957 	/* Fast-path TQM ring. */
22958 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_FP_TQM_RING	UINT32_C(0x6)
22959 	/* Memory Region and Memory Address Vector Context. */
22960 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_MRAV		UINT32_C(0xe)
22961 	/* TIM. */
22962 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_TIM		UINT32_C(0xf)
22963 	/* Tx crypto key. */
22964 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_TX_CK	UINT32_C(0x13)
22965 	/* Rx crypto key. */
22966 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_RX_CK	UINT32_C(0x14)
22967 	/* Mid-path TQM ring. */
22968 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_MP_TQM_RING	UINT32_C(0x15)
22969 	/* SQ Doorbell shadow region. */
22970 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SQ_DB_SHADOW	UINT32_C(0x16)
22971 	/* RQ Doorbell shadow region. */
22972 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_RQ_DB_SHADOW	UINT32_C(0x17)
22973 	/* SRQ Doorbell shadow region. */
22974 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRQ_DB_SHADOW   UINT32_C(0x18)
22975 	/* CQ Doorbell shadow region. */
22976 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CQ_DB_SHADOW	UINT32_C(0x19)
22977 	/* CFA table scope context. */
22978 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_TBL_SCOPE	UINT32_C(0x1c)
22979 	/* XID partition context. */
22980 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_XID_PARTITION   UINT32_C(0x1d)
22981 	/* SRT trace. */
22982 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRT_TRACE	UINT32_C(0x1e)
22983 	/* SRT2 trace. */
22984 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRT2_TRACE	UINT32_C(0x1f)
22985 	/* CRT trace. */
22986 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CRT_TRACE	UINT32_C(0x20)
22987 	/* CRT2 trace. */
22988 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CRT2_TRACE	UINT32_C(0x21)
22989 	/* RIGP0 trace. */
22990 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_RIGP0_TRACE	UINT32_C(0x22)
22991 	/* L2 HWRM trace. */
22992 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_L2_HWRM_TRACE   UINT32_C(0x23)
22993 	/* RoCE HWRM trace. */
22994 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_ROCE_HWRM_TRACE UINT32_C(0x24)
22995 	/* Invalid type. */
22996 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_INVALID	UINT32_C(0xffff)
22997 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_LAST	HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_INVALID
22998 	uint8_t	rsvd[6];
22999 } hwrm_func_backing_store_qcaps_v2_input_t, *phwrm_func_backing_store_qcaps_v2_input_t;
23000 
23001 /* hwrm_func_backing_store_qcaps_v2_output (size:448b/56B) */
23002 
23003 typedef struct hwrm_func_backing_store_qcaps_v2_output {
23004 	/* The specific error status for the command. */
23005 	uint16_t	error_code;
23006 	/* The HWRM command request type. */
23007 	uint16_t	req_type;
23008 	/* The sequence ID from the original command. */
23009 	uint16_t	seq_id;
23010 	/* The length of the response data in number of bytes. */
23011 	uint16_t	resp_len;
23012 	/* Type of backing store to be queried. */
23013 	uint16_t	type;
23014 	/* Queue pair. */
23015 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_QP		UINT32_C(0x0)
23016 	/* Shared receive queue. */
23017 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRQ		UINT32_C(0x1)
23018 	/* Completion queue. */
23019 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CQ		UINT32_C(0x2)
23020 	/* Virtual NIC. */
23021 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_VNIC		UINT32_C(0x3)
23022 	/* Statistic context. */
23023 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_STAT		UINT32_C(0x4)
23024 	/* Slow-path TQM ring. */
23025 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SP_TQM_RING	UINT32_C(0x5)
23026 	/* Fast-path TQM ring. */
23027 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_FP_TQM_RING	UINT32_C(0x6)
23028 	/* Memory Region and Memory Address Vector Context. */
23029 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_MRAV		UINT32_C(0xe)
23030 	/* TIM. */
23031 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_TIM		UINT32_C(0xf)
23032 	/* Tx crypto key. */
23033 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_TX_CK	UINT32_C(0x13)
23034 	/* Rx crypto key. */
23035 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_RX_CK	UINT32_C(0x14)
23036 	/* Mid-path TQM ring. */
23037 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_MP_TQM_RING	UINT32_C(0x15)
23038 	/* SQ Doorbell shadow region. */
23039 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SQ_DB_SHADOW	UINT32_C(0x16)
23040 	/* RQ Doorbell shadow region. */
23041 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_RQ_DB_SHADOW	UINT32_C(0x17)
23042 	/* SRQ Doorbell shadow region. */
23043 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRQ_DB_SHADOW   UINT32_C(0x18)
23044 	/* CQ Doorbell shadow region. */
23045 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CQ_DB_SHADOW	UINT32_C(0x19)
23046 	/* CFA table scope context. */
23047 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_TBL_SCOPE	UINT32_C(0x1c)
23048 	/* XID partition context. */
23049 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_XID_PARTITION   UINT32_C(0x1d)
23050 	/* SRT trace. */
23051 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRT_TRACE	UINT32_C(0x1e)
23052 	/* SRT2 trace. */
23053 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRT2_TRACE	UINT32_C(0x1f)
23054 	/* CRT trace. */
23055 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CRT_TRACE	UINT32_C(0x20)
23056 	/* CRT2 trace. */
23057 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CRT2_TRACE	UINT32_C(0x21)
23058 	/* RIGP0 trace. */
23059 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_RIGP0_TRACE	UINT32_C(0x22)
23060 	/* L2 HWRM trace. */
23061 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_L2_HWRM_TRACE   UINT32_C(0x23)
23062 	/* RoCE HWRM trace. */
23063 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_ROCE_HWRM_TRACE UINT32_C(0x24)
23064 	/* Invalid type. */
23065 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_INVALID	UINT32_C(0xffff)
23066 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_LAST	HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_INVALID
23067 	/* Number of bytes per backing store entry. */
23068 	uint16_t	entry_size;
23069 	/* Control flags. */
23070 	uint32_t	flags;
23071 	/*
23072 	 * When set, it indicates the context type should be initialized
23073 	 * with the 'ctx_init_value' at the specified offset.
23074 	 */
23075 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_ENABLE_CTX_KIND_INIT		UINT32_C(0x1)
23076 	/* When set, it indicates the context type is valid. */
23077 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_TYPE_VALID			UINT32_C(0x2)
23078 	/*
23079 	 * When set, it indicates the region for this type is not a regular
23080 	 * context memory but a driver managed memory that is created,
23081 	 * initialized and managed by the driver.
23082 	 */
23083 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_DRIVER_MANAGED_MEMORY	UINT32_C(0x4)
23084 	/*
23085 	 * When set, it indicates the support of the following capability
23086 	 * that is specific to the QP type:
23087 	 * - For 2-port adapters, the ability to extend the RoCE QP
23088 	 *   entries configured on a PF, during some network events such as
23089 	 *   Link Down. These additional entries count is included in the
23090 	 *   advertised 'max_num_entries'.
23091 	 * - The count of RoCE QP entries, derived from 'max_num_entries'
23092 	 *   (max_num_entries - qp_num_qp1_entries - qp_num_l2_entries -
23093 	 *   qp_num_fast_qpmd_entries, note qp_num_fast_qpmd_entries is
23094 	 *   always zero when QPs are pseudo-statically allocated), includes
23095 	 *   the count of QPs that can be migrated from the other PF (e.g.,
23096 	 *   during network link down). Therefore, during normal operation
23097 	 *   when both PFs are active, the supported number of RoCE QPs for
23098 	 *   each of the PF is half of the advertised value.
23099 	 */
23100 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_ROCE_QP_PSEUDO_STATIC_ALLOC	UINT32_C(0x8)
23101 	/*
23102 	 * Bit map of the valid instances associated with the
23103 	 * backing store type.
23104 	 * 1. If the backing store type is MPC TQM ring, use the following
23105 	 *	bits to map to MPC clients:
23106 	 *	TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
23107 	 * 2. If the backing store type is TBL_SCOPE, use the following
23108 	 *	bits to map to table scope regions:
23109 	 *	RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
23110 	 * 3. If the backing store type is VF XID partition in-use table, use
23111 	 *	the following bits to map to context types:
23112 	 *	TX_CK (0), RX_CK (1)
23113 	 */
23114 	uint32_t	instance_bit_map;
23115 	/*
23116 	 * Initializer to be used by drivers to initialize context memory
23117 	 * to ensure context subsystem flags an error for an attack before
23118 	 * the first time context load.
23119 	 */
23120 	uint8_t	ctx_init_value;
23121 	/*
23122 	 * Specifies the doubleword offset of ctx_init_value for this
23123 	 * context type.
23124 	 */
23125 	uint8_t	ctx_init_offset;
23126 	/*
23127 	 * Some backing store types, e.g., TQM rings, require the number
23128 	 * of entries to be a multiple of this value to prevent any
23129 	 * resource allocation limitations. If not applicable, leave
23130 	 * this field with "0".
23131 	 */
23132 	uint8_t	entry_multiple;
23133 	uint8_t	rsvd;
23134 	/* Maximum number of backing store entries supported for this type. */
23135 	uint32_t	max_num_entries;
23136 	/*
23137 	 * Minimum number of backing store entries required for this type.
23138 	 * This field is only valid for some backing store types, e.g.,
23139 	 * TQM rings. If not applicable, leave this field with "0".
23140 	 */
23141 	uint32_t	min_num_entries;
23142 	/*
23143 	 * Next valid backing store type. If current type queried is already
23144 	 * the last valid type, firmware must set this field to invalid type.
23145 	 */
23146 	uint16_t	next_valid_type;
23147 	/*
23148 	 * This field counts how many split entries contain valid data.
23149 	 * Below is the table that maps the count value:
23150 	 * | count |			Indication			|
23151 	 * | ----- | -------------------------------------------------- |
23152 	 * |   0   | None of the split entries has valid data.	|
23153 	 * |   1   | Only "split_entry_0" contains valid data.	|
23154 	 * |   2   | Only "split_entry_0" and "1" have valid data.	|
23155 	 * |   3   | Only "split_entry_0", "1" and "2" have valid data. |
23156 	 * |   4   | All four split entries have valid data.		|
23157 	 */
23158 	uint8_t	subtype_valid_cnt;
23159 	/*
23160 	 * Bitmap that indicates if each of the 'split_entry' denotes an
23161 	 * exact count (i.e., min = max). When the exact count bit is set,
23162 	 * it indicates the exact number of entries as advertised has to be
23163 	 * configured. The 'split_entry' to be set to contain exact count by
23164 	 * this bitmap needs to be a valid split entry specified by
23165 	 * 'subtype_valid_cnt'.
23166 	 */
23167 	uint8_t	exact_cnt_bit_map;
23168 	/*
23169 	 * When this bit is '1', it indicates 'split_entry_0' contains
23170 	 * an exact count.
23171 	 */
23172 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_0_EXACT	UINT32_C(0x1)
23173 	/*
23174 	 * When this bit is '1', it indicates 'split_entry_1' contains
23175 	 * an exact count.
23176 	 */
23177 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_1_EXACT	UINT32_C(0x2)
23178 	/*
23179 	 * When this bit is '1', it indicates 'split_entry_2' contains
23180 	 * an exact count.
23181 	 */
23182 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_2_EXACT	UINT32_C(0x4)
23183 	/*
23184 	 * When this bit is '1', it indicates 'split_entry_3' contains
23185 	 * an exact count.
23186 	 */
23187 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_3_EXACT	UINT32_C(0x8)
23188 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_UNUSED_MASK		UINT32_C(0xf0)
23189 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_UNUSED_SFT		4
23190 	/*
23191 	 * Split entry #0. Note that the four split entries (as a group)
23192 	 * must be cast to a type-specific data structure first before
23193 	 * accessing it! Below is the table that maps a backing store
23194 	 * type to the associated split entry casting data structure.
23195 	 * | Type |	Split Entry Casting Data Structure	|
23196 	 * | ---- | -------------------------------------------------- |
23197 	 * | QPC  |		qpc_split_entries			|
23198 	 * | SRQ  |		srq_split_entries			|
23199 	 * | CQ   |		cq_split_entries			|
23200 	 * | VINC |		vnic_split_entries			|
23201 	 * | MRAV |		mrav_split_entries			|
23202 	 * | TS   |		ts_split_entries			|
23203 	 */
23204 	uint32_t	split_entry_0;
23205 	/* Split entry #1. */
23206 	uint32_t	split_entry_1;
23207 	/* Split entry #2. */
23208 	uint32_t	split_entry_2;
23209 	/* Split entry #3. */
23210 	uint32_t	split_entry_3;
23211 	uint8_t	rsvd3[3];
23212 	/*
23213 	 * This field is used in Output records to indicate that the
23214 	 * output is completely written to RAM. This field should be
23215 	 * read as '1' to indicate that the output has been completely
23216 	 * written. When writing a command completion or response to
23217 	 * an internal processor, the order of writes has to be such
23218 	 * that this field is written last.
23219 	 */
23220 	uint8_t	valid;
23221 } hwrm_func_backing_store_qcaps_v2_output_t, *phwrm_func_backing_store_qcaps_v2_output_t;
23222 
23223 /****************************
23224  * hwrm_func_dbr_pacing_cfg *
23225  ****************************/
23226 
23227 
23228 /* hwrm_func_dbr_pacing_cfg_input (size:320b/40B) */
23229 
23230 typedef struct hwrm_func_dbr_pacing_cfg_input {
23231 	/* The HWRM command request type. */
23232 	uint16_t	req_type;
23233 	/*
23234 	 * The completion ring to send the completion event on. This should
23235 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23236 	 */
23237 	uint16_t	cmpl_ring;
23238 	/*
23239 	 * The sequence ID is used by the driver for tracking multiple
23240 	 * commands. This ID is treated as opaque data by the firmware and
23241 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23242 	 */
23243 	uint16_t	seq_id;
23244 	/*
23245 	 * The target ID of the command:
23246 	 * * 0x0-0xFFF8 - The function ID
23247 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23248 	 * * 0xFFFD - Reserved for user-space HWRM interface
23249 	 * * 0xFFFF - HWRM
23250 	 */
23251 	uint16_t	target_id;
23252 	/*
23253 	 * A physical address pointer pointing to a host buffer that the
23254 	 * command's response data will be written. This can be either a host
23255 	 * physical address (HPA) or a guest physical address (GPA) and must
23256 	 * point to a physically contiguous block of memory.
23257 	 */
23258 	uint64_t	resp_addr;
23259 	uint8_t	flags;
23260 	/*
23261 	 * This bit must be '1' to enable DBR NQ events. The NQ ID to
23262 	 * receive the events must be specified in the primary_nq_id
23263 	 * field.
23264 	 */
23265 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_FLAGS_DBR_NQ_EVENT_ENABLE	UINT32_C(0x1)
23266 	/* This bit must be '1' to disable DBR NQ events. */
23267 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_FLAGS_DBR_NQ_EVENT_DISABLE	UINT32_C(0x2)
23268 	uint8_t	unused_0[7];
23269 	uint32_t	enables;
23270 	/*
23271 	 * This bit must be '1' for the primary_nq_id field to be
23272 	 * configured.
23273 	 */
23274 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_ENABLES_PRIMARY_NQ_ID_VALID	UINT32_C(0x1)
23275 	/*
23276 	 * This bit must be '1' for the pacing_threshold field to be
23277 	 * configured.
23278 	 */
23279 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_ENABLES_PACING_THRESHOLD_VALID	UINT32_C(0x2)
23280 	/*
23281 	 * Specify primary function's NQ ID to receive the doorbell pacing
23282 	 * threshold crossing events.
23283 	 */
23284 	uint32_t	primary_nq_id;
23285 	/*
23286 	 * Specify pacing threshold value, as a percentage of the max
23287 	 * doorbell FIFO depth. The range is 1 to 36.
23288 	 */
23289 	uint32_t	pacing_threshold;
23290 	uint8_t	unused_1[4];
23291 } hwrm_func_dbr_pacing_cfg_input_t, *phwrm_func_dbr_pacing_cfg_input_t;
23292 
23293 /* hwrm_func_dbr_pacing_cfg_output (size:128b/16B) */
23294 
23295 typedef struct hwrm_func_dbr_pacing_cfg_output {
23296 	/* The specific error status for the command. */
23297 	uint16_t	error_code;
23298 	/* The HWRM command request type. */
23299 	uint16_t	req_type;
23300 	/* The sequence ID from the original command. */
23301 	uint16_t	seq_id;
23302 	/* The length of the response data in number of bytes. */
23303 	uint16_t	resp_len;
23304 	uint8_t	unused_0[7];
23305 	/*
23306 	 * This field is used in Output records to indicate that the output
23307 	 * is completely written to RAM. This field should be read as '1'
23308 	 * to indicate that the output has been completely written.
23309 	 * When writing a command completion or response to an internal
23310 	 * processor, the order of writes has to be such that this field is
23311 	 * written last.
23312 	 */
23313 	uint8_t	valid;
23314 } hwrm_func_dbr_pacing_cfg_output_t, *phwrm_func_dbr_pacing_cfg_output_t;
23315 
23316 /*****************************
23317  * hwrm_func_dbr_pacing_qcfg *
23318  *****************************/
23319 
23320 
23321 /* hwrm_func_dbr_pacing_qcfg_input (size:128b/16B) */
23322 
23323 typedef struct hwrm_func_dbr_pacing_qcfg_input {
23324 	/* The HWRM command request type. */
23325 	uint16_t	req_type;
23326 	/*
23327 	 * The completion ring to send the completion event on. This should
23328 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23329 	 */
23330 	uint16_t	cmpl_ring;
23331 	/*
23332 	 * The sequence ID is used by the driver for tracking multiple
23333 	 * commands. This ID is treated as opaque data by the firmware and
23334 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23335 	 */
23336 	uint16_t	seq_id;
23337 	/*
23338 	 * The target ID of the command:
23339 	 * * 0x0-0xFFF8 - The function ID
23340 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23341 	 * * 0xFFFD - Reserved for user-space HWRM interface
23342 	 * * 0xFFFF - HWRM
23343 	 */
23344 	uint16_t	target_id;
23345 	/*
23346 	 * A physical address pointer pointing to a host buffer that the
23347 	 * command's response data will be written. This can be either a host
23348 	 * physical address (HPA) or a guest physical address (GPA) and must
23349 	 * point to a physically contiguous block of memory.
23350 	 */
23351 	uint64_t	resp_addr;
23352 } hwrm_func_dbr_pacing_qcfg_input_t, *phwrm_func_dbr_pacing_qcfg_input_t;
23353 
23354 /* hwrm_func_dbr_pacing_qcfg_output (size:512b/64B) */
23355 
23356 typedef struct hwrm_func_dbr_pacing_qcfg_output {
23357 	/* The specific error status for the command. */
23358 	uint16_t	error_code;
23359 	/* The HWRM command request type. */
23360 	uint16_t	req_type;
23361 	/* The sequence ID from the original command. */
23362 	uint16_t	seq_id;
23363 	/* The length of the response data in number of bytes. */
23364 	uint16_t	resp_len;
23365 	uint8_t	flags;
23366 	/* When this bit is '1', it indicates DBR NQ events are enabled. */
23367 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_FLAGS_DBR_NQ_EVENT_ENABLED	UINT32_C(0x1)
23368 	uint8_t	unused_0[7];
23369 	/*
23370 	 * The Doorbell global FIFO occupancy register. This field should be
23371 	 * used by the driver and user library in the doorbell pacing
23372 	 * algorithm. Lower 2 bits indicates address space location and upper
23373 	 * 30 bits indicates upper 30bits of the register address. A value of
23374 	 * 0xFFFF-FFFF indicates this register does not exist.
23375 	 */
23376 	uint32_t	dbr_stat_db_fifo_reg;
23377 	/* Lower 2 bits indicates address space location. */
23378 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
23379 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_SFT	0
23380 	/*
23381 	 * If value is 0, this register is located in PCIe config space.
23382 	 * Drivers have to map appropriate window to access this
23383 	 * register.
23384 	 */
23385 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
23386 	/*
23387 	 * If value is 1, this register is located in GRC address space.
23388 	 * Drivers have to map appropriate window to access this
23389 	 * register.
23390 	 */
23391 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
23392 	/*
23393 	 * If value is 2, this register is located in first BAR address
23394 	 * space. Drivers have to map appropriate window to access this
23395 	 * register.
23396 	 */
23397 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
23398 	/*
23399 	 * If value is 3, this register is located in second BAR address
23400 	 * space. Drivers have to map appropriate window to access this
23401 	 * Drivers have to map appropriate window to access this
23402 	 * register.
23403 	 */
23404 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
23405 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_LAST	HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_BAR1
23406 	/* Upper 30bits of the register address. */
23407 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_MASK	UINT32_C(0xfffffffc)
23408 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SFT	2
23409 	/*
23410 	 * This field indicates the mask value for dbr_stat_db_fifo_reg
23411 	 * to get the high watermark for doorbell FIFO.
23412 	 */
23413 	uint32_t	dbr_stat_db_fifo_reg_watermark_mask;
23414 	/*
23415 	 * This field indicates the shift value for dbr_stat_db_fifo_reg
23416 	 * to get the high watermark for doorbell FIFO.
23417 	 */
23418 	uint8_t	dbr_stat_db_fifo_reg_watermark_shift;
23419 	uint8_t	unused_1[3];
23420 	/*
23421 	 * This field indicates the mask value for dbr_stat_db_fifo_reg
23422 	 * to get the amount of room left for doorbell FIFO.
23423 	 */
23424 	uint32_t	dbr_stat_db_fifo_reg_fifo_room_mask;
23425 	/*
23426 	 * This field indicates the shift value for dbr_stat_db_fifo_reg
23427 	 * to get the amount of room left for doorbell FIFO.
23428 	 */
23429 	uint8_t	dbr_stat_db_fifo_reg_fifo_room_shift;
23430 	uint8_t	unused_2[3];
23431 	/*
23432 	 * DBR_REG_AEQ_ARM register. This field should be used by the driver
23433 	 * to rearm the interrupt for regeneration of a notification to the
23434 	 * host from the hardware when the global doorbell occupancy threshold
23435 	 * is above the threshold value. Lower 2 bits indicates address space
23436 	 * location and upper 30 bits indicates upper 30bits of the register
23437 	 * address. A value of 0xFFFF-FFFF indicates this register does not
23438 	 * exist.
23439 	 */
23440 	uint32_t	dbr_throttling_aeq_arm_reg;
23441 	/* Lower 2 bits indicates address space location. */
23442 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_MASK	UINT32_C(0x3)
23443 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_SFT	0
23444 	/*
23445 	 * If value is 0, this register is located in PCIe config space.
23446 	 * Drivers have to map appropriate window to access this
23447 	 * register.
23448 	 */
23449 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
23450 	/*
23451 	 * If value is 1, this register is located in GRC address space.
23452 	 * Drivers have to map appropriate window to access this
23453 	 * register.
23454 	 */
23455 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_GRC	UINT32_C(0x1)
23456 	/*
23457 	 * If value is 2, this register is located in first BAR address
23458 	 * space. Drivers have to map appropriate window to access this
23459 	 * register.
23460 	 */
23461 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_BAR0	UINT32_C(0x2)
23462 	/*
23463 	 * If value is 3, this register is located in second BAR address
23464 	 * space. Drivers have to map appropriate window to access this
23465 	 * Drivers have to map appropriate window to access this
23466 	 * register.
23467 	 */
23468 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_BAR1	UINT32_C(0x3)
23469 		#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_LAST	HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_BAR1
23470 	/* Upper 30bits of the register address. */
23471 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_MASK	UINT32_C(0xfffffffc)
23472 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SFT	2
23473 	/*
23474 	 * This field indicates the value to be written for
23475 	 * dbr_throttling_aeq_arm_reg register.
23476 	 */
23477 	uint8_t	dbr_throttling_aeq_arm_reg_val;
23478 	uint8_t	unused_3[3];
23479 	/* This field indicates the maximum depth of the doorbell FIFO. */
23480 	uint32_t	dbr_stat_db_max_fifo_depth;
23481 	/*
23482 	 * Specifies primary function's NQ ID.
23483 	 * A value of 0xFFFF FFFF indicates NQ ID is invalid.
23484 	 */
23485 	uint32_t	primary_nq_id;
23486 	/*
23487 	 * Specifies the pacing threshold value, as a percentage of the
23488 	 * max doorbell FIFO depth. The range is 1 to 100.
23489 	 */
23490 	uint32_t	pacing_threshold;
23491 	uint8_t	unused_4[7];
23492 	/*
23493 	 * This field is used in Output records to indicate that the output
23494 	 * is completely written to RAM. This field should be read as '1'
23495 	 * to indicate that the output has been completely written.
23496 	 * When writing a command completion or response to an internal
23497 	 * processor, the order of writes has to be such that this field is
23498 	 * written last.
23499 	 */
23500 	uint8_t	valid;
23501 } hwrm_func_dbr_pacing_qcfg_output_t, *phwrm_func_dbr_pacing_qcfg_output_t;
23502 
23503 /****************************************
23504  * hwrm_func_dbr_pacing_broadcast_event *
23505  ****************************************/
23506 
23507 
23508 /* hwrm_func_dbr_pacing_broadcast_event_input (size:128b/16B) */
23509 
23510 typedef struct hwrm_func_dbr_pacing_broadcast_event_input {
23511 	/* The HWRM command request type. */
23512 	uint16_t	req_type;
23513 	/*
23514 	 * The completion ring to send the completion event on. This should
23515 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23516 	 */
23517 	uint16_t	cmpl_ring;
23518 	/*
23519 	 * The sequence ID is used by the driver for tracking multiple
23520 	 * commands. This ID is treated as opaque data by the firmware and
23521 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23522 	 */
23523 	uint16_t	seq_id;
23524 	/*
23525 	 * The target ID of the command:
23526 	 * * 0x0-0xFFF8 - The function ID
23527 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23528 	 * * 0xFFFD - Reserved for user-space HWRM interface
23529 	 * * 0xFFFF - HWRM
23530 	 */
23531 	uint16_t	target_id;
23532 	/*
23533 	 * A physical address pointer pointing to a host buffer that the
23534 	 * command's response data will be written. This can be either a host
23535 	 * physical address (HPA) or a guest physical address (GPA) and must
23536 	 * point to a physically contiguous block of memory.
23537 	 */
23538 	uint64_t	resp_addr;
23539 } hwrm_func_dbr_pacing_broadcast_event_input_t, *phwrm_func_dbr_pacing_broadcast_event_input_t;
23540 
23541 /* hwrm_func_dbr_pacing_broadcast_event_output (size:128b/16B) */
23542 
23543 typedef struct hwrm_func_dbr_pacing_broadcast_event_output {
23544 	/* The specific error status for the command. */
23545 	uint16_t	error_code;
23546 	/* The HWRM command request type. */
23547 	uint16_t	req_type;
23548 	/* The sequence ID from the original command. */
23549 	uint16_t	seq_id;
23550 	/* The length of the response data in number of bytes. */
23551 	uint16_t	resp_len;
23552 	uint8_t	unused_0[7];
23553 	/*
23554 	 * This field is used in Output records to indicate that the output
23555 	 * is completely written to RAM. This field should be read as '1'
23556 	 * to indicate that the output has been completely written.
23557 	 * When writing a command completion or response to an internal
23558 	 * processor, the order of writes has to be such that this field is
23559 	 * written last.
23560 	 */
23561 	uint8_t	valid;
23562 } hwrm_func_dbr_pacing_broadcast_event_output_t, *phwrm_func_dbr_pacing_broadcast_event_output_t;
23563 
23564 /*************************************
23565  * hwrm_func_dbr_pacing_nqlist_query *
23566  *************************************/
23567 
23568 
23569 /* hwrm_func_dbr_pacing_nqlist_query_input (size:128b/16B) */
23570 
23571 typedef struct hwrm_func_dbr_pacing_nqlist_query_input {
23572 	/* The HWRM command request type. */
23573 	uint16_t	req_type;
23574 	/*
23575 	 * The completion ring to send the completion event on. This should
23576 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23577 	 */
23578 	uint16_t	cmpl_ring;
23579 	/*
23580 	 * The sequence ID is used by the driver for tracking multiple
23581 	 * commands. This ID is treated as opaque data by the firmware and
23582 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23583 	 */
23584 	uint16_t	seq_id;
23585 	/*
23586 	 * The target ID of the command:
23587 	 * * 0x0-0xFFF8 - The function ID
23588 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23589 	 * * 0xFFFD - Reserved for user-space HWRM interface
23590 	 * * 0xFFFF - HWRM
23591 	 */
23592 	uint16_t	target_id;
23593 	/*
23594 	 * A physical address pointer pointing to a host buffer that the
23595 	 * command's response data will be written. This can be either a host
23596 	 * physical address (HPA) or a guest physical address (GPA) and must
23597 	 * point to a physically contiguous block of memory.
23598 	 */
23599 	uint64_t	resp_addr;
23600 } hwrm_func_dbr_pacing_nqlist_query_input_t, *phwrm_func_dbr_pacing_nqlist_query_input_t;
23601 
23602 /* hwrm_func_dbr_pacing_nqlist_query_output (size:384b/48B) */
23603 
23604 typedef struct hwrm_func_dbr_pacing_nqlist_query_output {
23605 	/* The specific error status for the command. */
23606 	uint16_t	error_code;
23607 	/* The HWRM command request type. */
23608 	uint16_t	req_type;
23609 	/* The sequence ID from the original command. */
23610 	uint16_t	seq_id;
23611 	/* The length of the response data in number of bytes. */
23612 	uint16_t	resp_len;
23613 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23614 	uint16_t	nq_ring_id0;
23615 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23616 	uint16_t	nq_ring_id1;
23617 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23618 	uint16_t	nq_ring_id2;
23619 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23620 	uint16_t	nq_ring_id3;
23621 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23622 	uint16_t	nq_ring_id4;
23623 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23624 	uint16_t	nq_ring_id5;
23625 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23626 	uint16_t	nq_ring_id6;
23627 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23628 	uint16_t	nq_ring_id7;
23629 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23630 	uint16_t	nq_ring_id8;
23631 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23632 	uint16_t	nq_ring_id9;
23633 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23634 	uint16_t	nq_ring_id10;
23635 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23636 	uint16_t	nq_ring_id11;
23637 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23638 	uint16_t	nq_ring_id12;
23639 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23640 	uint16_t	nq_ring_id13;
23641 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23642 	uint16_t	nq_ring_id14;
23643 	/* ID of an NQ ring allocated for DBR pacing notifications. */
23644 	uint16_t	nq_ring_id15;
23645 	/* Number of consecutive NQ ring IDs populated in the response. */
23646 	uint32_t	num_nqs;
23647 	uint8_t	unused_0[3];
23648 	/*
23649 	 * This field is used in Output records to indicate that the output
23650 	 * is completely written to RAM. This field should be read as '1'
23651 	 * to indicate that the output has been completely written. When
23652 	 * writing a command completion or response to an internal processor,
23653 	 * the order of writes has to be such that this field is written last.
23654 	 */
23655 	uint8_t	valid;
23656 } hwrm_func_dbr_pacing_nqlist_query_output_t, *phwrm_func_dbr_pacing_nqlist_query_output_t;
23657 
23658 /************************************
23659  * hwrm_func_dbr_recovery_completed *
23660  ************************************/
23661 
23662 
23663 /* hwrm_func_dbr_recovery_completed_input (size:192b/24B) */
23664 
23665 typedef struct hwrm_func_dbr_recovery_completed_input {
23666 	/* The HWRM command request type. */
23667 	uint16_t	req_type;
23668 	/*
23669 	 * The completion ring to send the completion event on. This should
23670 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23671 	 */
23672 	uint16_t	cmpl_ring;
23673 	/*
23674 	 * The sequence ID is used by the driver for tracking multiple
23675 	 * commands. This ID is treated as opaque data by the firmware and
23676 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23677 	 */
23678 	uint16_t	seq_id;
23679 	/*
23680 	 * The target ID of the command:
23681 	 * * 0x0-0xFFF8 - The function ID
23682 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23683 	 * * 0xFFFD - Reserved for user-space HWRM interface
23684 	 * * 0xFFFF - HWRM
23685 	 */
23686 	uint16_t	target_id;
23687 	/*
23688 	 * A physical address pointer pointing to a host buffer that the
23689 	 * command's response data will be written. This can be either a host
23690 	 * physical address (HPA) or a guest physical address (GPA) and must
23691 	 * point to a physically contiguous block of memory.
23692 	 */
23693 	uint64_t	resp_addr;
23694 	/*
23695 	 * Specifies the epoch value with the one that was specified by the
23696 	 * firmware in the error_report_doorbell_drop_threshold async event
23697 	 * corresponding to the specific recovery cycle.
23698 	 */
23699 	uint32_t	epoch;
23700 	/* The epoch value. */
23701 	#define HWRM_FUNC_DBR_RECOVERY_COMPLETED_INPUT_EPOCH_VALUE_MASK UINT32_C(0xffffff)
23702 	#define HWRM_FUNC_DBR_RECOVERY_COMPLETED_INPUT_EPOCH_VALUE_SFT 0
23703 	uint8_t	unused_0[4];
23704 } hwrm_func_dbr_recovery_completed_input_t, *phwrm_func_dbr_recovery_completed_input_t;
23705 
23706 /* hwrm_func_dbr_recovery_completed_output (size:128b/16B) */
23707 
23708 typedef struct hwrm_func_dbr_recovery_completed_output {
23709 	/* The specific error status for the command. */
23710 	uint16_t	error_code;
23711 	/* The HWRM command request type. */
23712 	uint16_t	req_type;
23713 	/* The sequence ID from the original command. */
23714 	uint16_t	seq_id;
23715 	/* The length of the response data in number of bytes. */
23716 	uint16_t	resp_len;
23717 	uint8_t	unused_0[7];
23718 	/*
23719 	 * This field is used in Output records to indicate that the output
23720 	 * is completely written to RAM. This field should be read as '1'
23721 	 * to indicate that the output has been completely written.
23722 	 * When writing a command completion or response to an internal
23723 	 * processor, the order of writes has to be such that this field is
23724 	 * written last.
23725 	 */
23726 	uint8_t	valid;
23727 } hwrm_func_dbr_recovery_completed_output_t, *phwrm_func_dbr_recovery_completed_output_t;
23728 
23729 /***********************
23730  * hwrm_func_synce_cfg *
23731  ***********************/
23732 
23733 
23734 /* hwrm_func_synce_cfg_input (size:192b/24B) */
23735 
23736 typedef struct hwrm_func_synce_cfg_input {
23737 	/* The HWRM command request type. */
23738 	uint16_t	req_type;
23739 	/*
23740 	 * The completion ring to send the completion event on. This should
23741 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23742 	 */
23743 	uint16_t	cmpl_ring;
23744 	/*
23745 	 * The sequence ID is used by the driver for tracking multiple
23746 	 * commands. This ID is treated as opaque data by the firmware and
23747 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23748 	 */
23749 	uint16_t	seq_id;
23750 	/*
23751 	 * The target ID of the command:
23752 	 * * 0x0-0xFFF8 - The function ID
23753 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23754 	 * * 0xFFFD - Reserved for user-space HWRM interface
23755 	 * * 0xFFFF - HWRM
23756 	 */
23757 	uint16_t	target_id;
23758 	/*
23759 	 * A physical address pointer pointing to a host buffer that the
23760 	 * command's response data will be written. This can be either a host
23761 	 * physical address (HPA) or a guest physical address (GPA) and must
23762 	 * point to a physically contiguous block of memory.
23763 	 */
23764 	uint64_t	resp_addr;
23765 	uint8_t	enables;
23766 	/*
23767 	 * This bit must be '1' for the freq_profile field to be
23768 	 * configured.
23769 	 */
23770 	#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_FREQ_PROFILE	UINT32_C(0x1)
23771 	/*
23772 	 * This bit must be '1' for the primary_clock_state field to be
23773 	 * configured.
23774 	 */
23775 	#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_PRIMARY_CLOCK	UINT32_C(0x2)
23776 	/*
23777 	 * This bit must be '1' for the secondary_clock_state field to be
23778 	 * configured.
23779 	 */
23780 	#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_SECONDARY_CLOCK	UINT32_C(0x4)
23781 	/* Frequency profile for SyncE recovered clock. */
23782 	uint8_t	freq_profile;
23783 	/* Invalid frequency profile */
23784 	#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_INVALID UINT32_C(0x0)
23785 	/* 25MHz SyncE clock profile */
23786 	#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_25MHZ   UINT32_C(0x1)
23787 	#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_LAST   HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_25MHZ
23788 	/*
23789 	 * Enable or disable primary clock for PF/port, overriding previous
23790 	 * primary clock setting.
23791 	 */
23792 	uint8_t	primary_clock_state;
23793 	/* Disable clock */
23794 	#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_DISABLE UINT32_C(0x0)
23795 	/* Enable clock */
23796 	#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_ENABLE  UINT32_C(0x1)
23797 	#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_LAST   HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_ENABLE
23798 	/*
23799 	 * Enable or disable secondary clock for PF/port, overriding previous
23800 	 * secondary clock setting.
23801 	 */
23802 	uint8_t	secondary_clock_state;
23803 	/* Clock disabled */
23804 	#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_DISABLE UINT32_C(0x0)
23805 	/* Clock enabled */
23806 	#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_ENABLE  UINT32_C(0x1)
23807 	#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_LAST   HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_ENABLE
23808 	uint8_t	unused_0[4];
23809 } hwrm_func_synce_cfg_input_t, *phwrm_func_synce_cfg_input_t;
23810 
23811 /* hwrm_func_synce_cfg_output (size:128b/16B) */
23812 
23813 typedef struct hwrm_func_synce_cfg_output {
23814 	/* The specific error status for the command. */
23815 	uint16_t	error_code;
23816 	/* The HWRM command request type. */
23817 	uint16_t	req_type;
23818 	/* The sequence ID from the original command. */
23819 	uint16_t	seq_id;
23820 	/* The length of the response data in number of bytes. */
23821 	uint16_t	resp_len;
23822 	uint8_t	unused_0[7];
23823 	/*
23824 	 * This field is used in Output records to indicate that the output
23825 	 * is completely written to RAM. This field should be read as '1'
23826 	 * to indicate that the output has been completely written. When
23827 	 * writing a command completion or response to an internal processor,
23828 	 * the order of writes has to be such that this field is written last.
23829 	 */
23830 	uint8_t	valid;
23831 } hwrm_func_synce_cfg_output_t, *phwrm_func_synce_cfg_output_t;
23832 
23833 /************************
23834  * hwrm_func_synce_qcfg *
23835  ************************/
23836 
23837 
23838 /* hwrm_func_synce_qcfg_input (size:192b/24B) */
23839 
23840 typedef struct hwrm_func_synce_qcfg_input {
23841 	/* The HWRM command request type. */
23842 	uint16_t	req_type;
23843 	/*
23844 	 * The completion ring to send the completion event on. This should
23845 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23846 	 */
23847 	uint16_t	cmpl_ring;
23848 	/*
23849 	 * The sequence ID is used by the driver for tracking multiple
23850 	 * commands. This ID is treated as opaque data by the firmware and
23851 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23852 	 */
23853 	uint16_t	seq_id;
23854 	/*
23855 	 * The target ID of the command:
23856 	 * * 0x0-0xFFF8 - The function ID
23857 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23858 	 * * 0xFFFD - Reserved for user-space HWRM interface
23859 	 * * 0xFFFF - HWRM
23860 	 */
23861 	uint16_t	target_id;
23862 	/*
23863 	 * A physical address pointer pointing to a host buffer that the
23864 	 * command's response data will be written. This can be either a host
23865 	 * physical address (HPA) or a guest physical address (GPA) and must
23866 	 * point to a physically contiguous block of memory.
23867 	 */
23868 	uint64_t	resp_addr;
23869 	uint8_t	unused_0[8];
23870 } hwrm_func_synce_qcfg_input_t, *phwrm_func_synce_qcfg_input_t;
23871 
23872 /* hwrm_func_synce_qcfg_output (size:128b/16B) */
23873 
23874 typedef struct hwrm_func_synce_qcfg_output {
23875 	/* The specific error status for the command. */
23876 	uint16_t	error_code;
23877 	/* The HWRM command request type. */
23878 	uint16_t	req_type;
23879 	/* The sequence ID from the original command. */
23880 	uint16_t	seq_id;
23881 	/* The length of the response data in number of bytes. */
23882 	uint16_t	resp_len;
23883 	/* Frequency profile for SyncE recovered clock. */
23884 	uint8_t	freq_profile;
23885 	/* Invalid frequency profile */
23886 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_INVALID UINT32_C(0x0)
23887 	/* 25MHz SyncE clock profile */
23888 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_25MHZ   UINT32_C(0x1)
23889 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_LAST   HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_25MHZ
23890 	/* SyncE recovered clock state */
23891 	uint8_t	state;
23892 	/*
23893 	 * When this bit is '1', primary clock is enabled for this PF/port.
23894 	 * When this bit is '0', primary clock is disabled for this PF/port.
23895 	 */
23896 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_STATE_PRIMARY_CLOCK_ENABLED	UINT32_C(0x1)
23897 	/*
23898 	 * When this bit is '1', secondary clock is enabled for this
23899 	 * PF/port.
23900 	 * When this bit is '0', secondary clock is disabled for this
23901 	 * PF/port.
23902 	 */
23903 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_STATE_SECONDARY_CLOCK_ENABLED	UINT32_C(0x2)
23904 	uint8_t	unused_0[5];
23905 	/*
23906 	 * This field is used in Output records to indicate that the output
23907 	 * is completely written to RAM. This field should be read as '1'
23908 	 * to indicate that the output has been completely written. When
23909 	 * writing a command completion or response to an internal processor,
23910 	 * the order of writes has to be such that this field is written last.
23911 	 */
23912 	uint8_t	valid;
23913 } hwrm_func_synce_qcfg_output_t, *phwrm_func_synce_qcfg_output_t;
23914 
23915 /************************
23916  * hwrm_func_lag_create *
23917  ************************/
23918 
23919 
23920 /* hwrm_func_lag_create_input (size:192b/24B) */
23921 
23922 typedef struct hwrm_func_lag_create_input {
23923 	/* The HWRM command request type. */
23924 	uint16_t	req_type;
23925 	/*
23926 	 * The completion ring to send the completion event on. This should
23927 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23928 	 */
23929 	uint16_t	cmpl_ring;
23930 	/*
23931 	 * The sequence ID is used by the driver for tracking multiple
23932 	 * commands. This ID is treated as opaque data by the firmware and
23933 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23934 	 */
23935 	uint16_t	seq_id;
23936 	/*
23937 	 * The target ID of the command:
23938 	 * * 0x0-0xFFF8 - The function ID
23939 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23940 	 * * 0xFFFD - Reserved for user-space HWRM interface
23941 	 * * 0xFFFF - HWRM
23942 	 */
23943 	uint16_t	target_id;
23944 	/*
23945 	 * A physical address pointer pointing to a host buffer that the
23946 	 * command's response data will be written. This can be either a host
23947 	 * physical address (HPA) or a guest physical address (GPA) and must
23948 	 * point to a physically contiguous block of memory.
23949 	 */
23950 	uint64_t	resp_addr;
23951 	uint8_t	enables;
23952 	/*
23953 	 * This bit must be '1' for the active_port_map field to be
23954 	 * configured.
23955 	 */
23956 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_ACTIVE_PORT_MAP	UINT32_C(0x1)
23957 	/*
23958 	 * This bit must be '1' for the member_port_map field to be
23959 	 * configured.
23960 	 */
23961 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_MEMBER_PORT_MAP	UINT32_C(0x2)
23962 	/* This bit must be '1' for the aggr_mode field to be configured. */
23963 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_AGGR_MODE	UINT32_C(0x4)
23964 	/* rsvd1 is 5 b */
23965 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_RSVD1_MASK	UINT32_C(0xf8)
23966 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_RSVD1_SFT	3
23967 	/*
23968 	 * This is the bitmap of all active ports in the LAG. Each bit
23969 	 * represents a front panel port of the device. Ports are numbered
23970 	 * from 0 to n - 1 on a device with n ports. The number of front panel
23971 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
23972 	 * response. The active_port_map must always be a subset of the
23973 	 * member_port_map. An active port is eligible to send and receive
23974 	 * traffic.
23975 	 *
23976 	 * If the LAG mode is active-backup, only one port can be an active
23977 	 * port at a given time. All other ports in the member_port_map that
23978 	 * are not the active port are backup port. When the active port
23979 	 * fails, another member port takes over to become the active port.
23980 	 * The driver should use HWRM_FUNC_LAG_UPDATE to update
23981 	 * the active_port_map by only setting the port bit of the new active
23982 	 * port.
23983 	 *
23984 	 * In active-active, balance_xor or 802_3_ad mode, all member ports
23985 	 * can be active ports. If the driver determines that an active
23986 	 * port is down or unable to function, it should use
23987 	 * HWRM_FUNC_LAG_UPDATE to update the active_port_map by clearing
23988 	 * the port bit that has failed.
23989 	 */
23990 	uint8_t	active_port_map;
23991 	/* If this bit is set to '1', the port0 is a lag active port. */
23992 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_0	UINT32_C(0x1)
23993 	/* If this bit is set to '1', the port1 is a lag active port. */
23994 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_1	UINT32_C(0x2)
23995 	/* If this bit is set to '1', the port2 is a lag active port. */
23996 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_2	UINT32_C(0x4)
23997 	/* If this bit is set to '1', the port3 is a lag active port. */
23998 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_3	UINT32_C(0x8)
23999 	/* rsvd3 is 4 b */
24000 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_RSVD3_MASK UINT32_C(0xf0)
24001 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
24002 	/*
24003 	 * This is the bitmap of all member ports in the LAG. Each bit
24004 	 * represents a front panel port of the device. Ports are numbered
24005 	 * from 0 to n - 1 on a device with n ports. The number of front panel
24006 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
24007 	 * response. There must be at least 2 ports in the member ports and
24008 	 * each must not be a member of another LAG. Note that on a 4-port
24009 	 * device, there can be either 2 ports or 4 ports in the member ports.
24010 	 * Using 3 member ports is not supported.
24011 	 */
24012 	uint8_t	member_port_map;
24013 	/* If this bit is set to '1', the port0 is a lag member port. */
24014 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_0	UINT32_C(0x1)
24015 	/* If this bit is set to '1', the port1 is a lag member port. */
24016 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_1	UINT32_C(0x2)
24017 	/* If this bit is set to '1', the port2 is a lag member port. */
24018 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_2	UINT32_C(0x4)
24019 	/* If this bit is set to '1', the port3 is a lag member port. */
24020 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_3	UINT32_C(0x8)
24021 	/* rsvd4 is 4 b */
24022 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_RSVD4_MASK UINT32_C(0xf0)
24023 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
24024 	/* Link aggregation mode being used. */
24025 	uint8_t	link_aggr_mode;
24026 	/* active active mode. */
24027 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_ACTIVE_ACTIVE UINT32_C(0x1)
24028 	/* active backup mode. */
24029 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_ACTIVE_BACKUP UINT32_C(0x2)
24030 	/* Balance XOR mode. */
24031 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_BALANCE_XOR   UINT32_C(0x3)
24032 	/* 802.3AD mode. */
24033 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_802_3_AD	UINT32_C(0x4)
24034 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_LAST	HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_802_3_AD
24035 	uint8_t	unused_0[4];
24036 } hwrm_func_lag_create_input_t, *phwrm_func_lag_create_input_t;
24037 
24038 /* hwrm_func_lag_create_output (size:128b/16B) */
24039 
24040 typedef struct hwrm_func_lag_create_output {
24041 	/* The specific error status for the command. */
24042 	uint16_t	error_code;
24043 	/* The HWRM command request type. */
24044 	uint16_t	req_type;
24045 	/* The sequence ID from the original command. */
24046 	uint16_t	seq_id;
24047 	/* The length of the response data in number of bytes. */
24048 	uint16_t	resp_len;
24049 	/*
24050 	 * LAG ID of the created LAG. This LAG ID will also be returned
24051 	 * in the HWRM_FUNC_QCFG response of all member ports.
24052 	 */
24053 	uint8_t	fw_lag_id;
24054 	uint8_t	unused_0[6];
24055 	/*
24056 	 * This field is used in Output records to indicate that the output
24057 	 * is completely written to RAM. This field should be read as '1'
24058 	 * to indicate that the output has been completely written. When
24059 	 * writing a command completion or response to an internal processor,
24060 	 * the order of writes has to be such that this field is written last.
24061 	 */
24062 	uint8_t	valid;
24063 } hwrm_func_lag_create_output_t, *phwrm_func_lag_create_output_t;
24064 
24065 /************************
24066  * hwrm_func_lag_update *
24067  ************************/
24068 
24069 
24070 /* hwrm_func_lag_update_input (size:192b/24B) */
24071 
24072 typedef struct hwrm_func_lag_update_input {
24073 	/* The HWRM command request type. */
24074 	uint16_t	req_type;
24075 	/*
24076 	 * The completion ring to send the completion event on. This should
24077 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24078 	 */
24079 	uint16_t	cmpl_ring;
24080 	/*
24081 	 * The sequence ID is used by the driver for tracking multiple
24082 	 * commands. This ID is treated as opaque data by the firmware and
24083 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24084 	 */
24085 	uint16_t	seq_id;
24086 	/*
24087 	 * The target ID of the command:
24088 	 * * 0x0-0xFFF8 - The function ID
24089 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24090 	 * * 0xFFFD - Reserved for user-space HWRM interface
24091 	 * * 0xFFFF - HWRM
24092 	 */
24093 	uint16_t	target_id;
24094 	/*
24095 	 * A physical address pointer pointing to a host buffer that the
24096 	 * command's response data will be written. This can be either a host
24097 	 * physical address (HPA) or a guest physical address (GPA) and must
24098 	 * point to a physically contiguous block of memory.
24099 	 */
24100 	uint64_t	resp_addr;
24101 	/* Link aggregation group ID of the LAG to be updated. */
24102 	uint8_t	fw_lag_id;
24103 	uint8_t	enables;
24104 	/*
24105 	 * This bit must be '1' for the active_port_map field to be
24106 	 * updated.
24107 	 */
24108 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_ACTIVE_PORT_MAP	UINT32_C(0x1)
24109 	/*
24110 	 * This bit must be '1' for the member_port_map field to be
24111 	 * updated.
24112 	 */
24113 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_MEMBER_PORT_MAP	UINT32_C(0x2)
24114 	/* This bit must be '1' for the aggr_mode field to be updated. */
24115 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_AGGR_MODE	UINT32_C(0x4)
24116 	/* rsvd1 is 5 b */
24117 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_RSVD1_MASK	UINT32_C(0xf8)
24118 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_RSVD1_SFT	3
24119 	/*
24120 	 * This is the bitmap of all active ports in the LAG. Each bit
24121 	 * represents a front panel port of the device. Ports are numbered
24122 	 * from 0 to n - 1 on a device with n ports. The number of front panel
24123 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
24124 	 * response. The active_port_map must always be a subset of the
24125 	 * member_port_map. An active port is eligible to send and receive
24126 	 * traffic.
24127 	 *
24128 	 * If the LAG mode is active-backup, only one port can be an active
24129 	 * port at a given time. All other ports in the member_port_map that
24130 	 * are not the active port are backup port. When the active port
24131 	 * fails, another member port takes over to become the active port.
24132 	 * The driver should use HWRM_FUNC_LAG_UPDATE to update
24133 	 * the active_port_map by only setting the port bit of the new active
24134 	 * port.
24135 	 *
24136 	 * In active-active, balance_xor or 802_3_ad mode, all member ports
24137 	 * can be active ports. If the driver determines that an active
24138 	 * port is down or unable to function, it should use
24139 	 * HWRM_FUNC_LAG_UPDATE to update the active_port_map by clearing
24140 	 * the port bit that has failed.
24141 	 */
24142 	uint8_t	active_port_map;
24143 	/* If this bit is set to '1', the port0 is a lag active port. */
24144 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_0	UINT32_C(0x1)
24145 	/* If this bit is set to '1', the port1 is a lag active port. */
24146 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_1	UINT32_C(0x2)
24147 	/* If this bit is set to '1', the port2 is a lag active port. */
24148 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_2	UINT32_C(0x4)
24149 	/* If this bit is set to '1', the port3 is a lag active port. */
24150 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_3	UINT32_C(0x8)
24151 	/* rsvd3 is 4 b */
24152 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_RSVD3_MASK UINT32_C(0xf0)
24153 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
24154 	/*
24155 	 * This is the bitmap of all member ports in the LAG. Each bit
24156 	 * represents a front panel port of the device. Ports are numbered
24157 	 * from 0 to n - 1 on a device with n ports. The number of front panel
24158 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
24159 	 * response. There must be at least 2 ports in the member ports and
24160 	 * each must not be a member of another LAG. Note that on a 4-port
24161 	 * device, there can be either 2 ports or 4 ports in the member ports.
24162 	 * Using 3 member ports is not supported.
24163 	 */
24164 	uint8_t	member_port_map;
24165 	/* If this bit is set to '1', the port0 is a lag member port. */
24166 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_0	UINT32_C(0x1)
24167 	/* If this bit is set to '1', the port1 is a lag member port. */
24168 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_1	UINT32_C(0x2)
24169 	/* If this bit is set to '1', the port2 is a lag member port. */
24170 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_2	UINT32_C(0x4)
24171 	/* If this bit is set to '1', the port3 is a lag member port. */
24172 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_3	UINT32_C(0x8)
24173 	/* rsvd4 is 4 b */
24174 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_RSVD4_MASK UINT32_C(0xf0)
24175 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
24176 	/* Link aggregation mode being used. */
24177 	uint8_t	link_aggr_mode;
24178 	/* active active mode. */
24179 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_ACTIVE_ACTIVE UINT32_C(0x1)
24180 	/* active backup mode. */
24181 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_ACTIVE_BACKUP UINT32_C(0x2)
24182 	/* Balance XOR mode. */
24183 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_BALANCE_XOR   UINT32_C(0x3)
24184 	/* 802.3AD mode. */
24185 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_802_3_AD	UINT32_C(0x4)
24186 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_LAST	HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_802_3_AD
24187 	uint8_t	unused_0[3];
24188 } hwrm_func_lag_update_input_t, *phwrm_func_lag_update_input_t;
24189 
24190 /* hwrm_func_lag_update_output (size:128b/16B) */
24191 
24192 typedef struct hwrm_func_lag_update_output {
24193 	/* The specific error status for the command. */
24194 	uint16_t	error_code;
24195 	/* The HWRM command request type. */
24196 	uint16_t	req_type;
24197 	/* The sequence ID from the original command. */
24198 	uint16_t	seq_id;
24199 	/* The length of the response data in number of bytes. */
24200 	uint16_t	resp_len;
24201 	uint8_t	unused_0[7];
24202 	/*
24203 	 * This field is used in Output records to indicate that the output
24204 	 * is completely written to RAM. This field should be read as '1'
24205 	 * to indicate that the output has been completely written. When
24206 	 * writing a command completion or response to an internal processor,
24207 	 * the order of writes has to be such that this field is written last.
24208 	 */
24209 	uint8_t	valid;
24210 } hwrm_func_lag_update_output_t, *phwrm_func_lag_update_output_t;
24211 
24212 /**********************
24213  * hwrm_func_lag_free *
24214  **********************/
24215 
24216 
24217 /* hwrm_func_lag_free_input (size:192b/24B) */
24218 
24219 typedef struct hwrm_func_lag_free_input {
24220 	/* The HWRM command request type. */
24221 	uint16_t	req_type;
24222 	/*
24223 	 * The completion ring to send the completion event on. This should
24224 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24225 	 */
24226 	uint16_t	cmpl_ring;
24227 	/*
24228 	 * The sequence ID is used by the driver for tracking multiple
24229 	 * commands. This ID is treated as opaque data by the firmware and
24230 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24231 	 */
24232 	uint16_t	seq_id;
24233 	/*
24234 	 * The target ID of the command:
24235 	 * * 0x0-0xFFF8 - The function ID
24236 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24237 	 * * 0xFFFD - Reserved for user-space HWRM interface
24238 	 * * 0xFFFF - HWRM
24239 	 */
24240 	uint16_t	target_id;
24241 	/*
24242 	 * A physical address pointer pointing to a host buffer that the
24243 	 * command's response data will be written. This can be either a host
24244 	 * physical address (HPA) or a guest physical address (GPA) and must
24245 	 * point to a physically contiguous block of memory.
24246 	 */
24247 	uint64_t	resp_addr;
24248 	/* Link aggregation group ID of the LAG to be freed. */
24249 	uint8_t	fw_lag_id;
24250 	uint8_t	unused_0[7];
24251 } hwrm_func_lag_free_input_t, *phwrm_func_lag_free_input_t;
24252 
24253 /* hwrm_func_lag_free_output (size:128b/16B) */
24254 
24255 typedef struct hwrm_func_lag_free_output {
24256 	/* The specific error status for the command. */
24257 	uint16_t	error_code;
24258 	/* The HWRM command request type. */
24259 	uint16_t	req_type;
24260 	/* The sequence ID from the original command. */
24261 	uint16_t	seq_id;
24262 	/* The length of the response data in number of bytes. */
24263 	uint16_t	resp_len;
24264 	uint8_t	unused_0[7];
24265 	/*
24266 	 * This field is used in Output records to indicate that the output
24267 	 * is completely written to RAM. This field should be read as '1'
24268 	 * to indicate that the output has been completely written. When
24269 	 * writing a command completion or response to an internal processor,
24270 	 * the order of writes has to be such that this field is written last.
24271 	 */
24272 	uint8_t	valid;
24273 } hwrm_func_lag_free_output_t, *phwrm_func_lag_free_output_t;
24274 
24275 /**********************
24276  * hwrm_func_lag_qcfg *
24277  **********************/
24278 
24279 
24280 /* hwrm_func_lag_qcfg_input (size:192b/24B) */
24281 
24282 typedef struct hwrm_func_lag_qcfg_input {
24283 	/* The HWRM command request type. */
24284 	uint16_t	req_type;
24285 	/*
24286 	 * The completion ring to send the completion event on. This should
24287 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24288 	 */
24289 	uint16_t	cmpl_ring;
24290 	/*
24291 	 * The sequence ID is used by the driver for tracking multiple
24292 	 * commands. This ID is treated as opaque data by the firmware and
24293 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24294 	 */
24295 	uint16_t	seq_id;
24296 	/*
24297 	 * The target ID of the command:
24298 	 * * 0x0-0xFFF8 - The function ID
24299 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24300 	 * * 0xFFFD - Reserved for user-space HWRM interface
24301 	 * * 0xFFFF - HWRM
24302 	 */
24303 	uint16_t	target_id;
24304 	/*
24305 	 * A physical address pointer pointing to a host buffer that the
24306 	 * command's response data will be written. This can be either a host
24307 	 * physical address (HPA) or a guest physical address (GPA) and must
24308 	 * point to a physically contiguous block of memory.
24309 	 */
24310 	uint64_t	resp_addr;
24311 	/* Link aggregation group ID of the LAG to be queried. */
24312 	uint8_t	fw_lag_id;
24313 	uint8_t	unused_0[7];
24314 } hwrm_func_lag_qcfg_input_t, *phwrm_func_lag_qcfg_input_t;
24315 
24316 /* hwrm_func_lag_qcfg_output (size:128b/16B) */
24317 
24318 typedef struct hwrm_func_lag_qcfg_output {
24319 	/* The specific error status for the command. */
24320 	uint16_t	error_code;
24321 	/* The HWRM command request type. */
24322 	uint16_t	req_type;
24323 	/* The sequence ID from the original command. */
24324 	uint16_t	seq_id;
24325 	/* The length of the response data in number of bytes. */
24326 	uint16_t	resp_len;
24327 	/*
24328 	 * This is the bitmap of all active ports in the LAG. Each bit
24329 	 * represents a front panel port of the device. Ports are numbered
24330 	 * from 0 to n - 1 on a device with n ports. The number of front panel
24331 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
24332 	 * response. The active_port_map must always be a subset of the
24333 	 * member_port_map. An active port is eligible to send and receive
24334 	 * traffic.
24335 	 *
24336 	 * If the LAG mode is active-backup, only one port can be an active
24337 	 * port at a given time. All other ports in the member_port_map that
24338 	 * are not the active port are backup port. When the active port
24339 	 * fails, another member port takes over to become the active port.
24340 	 * The driver should use HWRM_FUNC_LAG_UPDATE to update
24341 	 * the active_port_map by only setting the port bit of the new active
24342 	 * port.
24343 	 *
24344 	 * In active-active, balance_xor or 802_3_ad mode, all member ports
24345 	 * can be active ports. If the driver determines that an active
24346 	 * port is down or unable to function, it should use
24347 	 * HWRM_FUNC_LAG_UPDATE to update the active_port_map by clearing
24348 	 * the port bit that has failed.
24349 	 */
24350 	uint8_t	active_port_map;
24351 	/* If this bit is set to '1', the port0 is a lag active port. */
24352 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_0	UINT32_C(0x1)
24353 	/* If this bit is set to '1', the port1 is a lag active port. */
24354 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_1	UINT32_C(0x2)
24355 	/* If this bit is set to '1', the port2 is a lag active port. */
24356 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_2	UINT32_C(0x4)
24357 	/* If this bit is set to '1', the port3 is a lag active port. */
24358 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_3	UINT32_C(0x8)
24359 	/* rsvd3 is 4 b */
24360 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD3_MASK UINT32_C(0xf0)
24361 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
24362 	/*
24363 	 * This is the bitmap of all member ports in the LAG. Each bit
24364 	 * represents a front panel port of the device. Ports are numbered
24365 	 * from 0 to n - 1 on a device with n ports. The number of front panel
24366 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
24367 	 * response. There must be at least 2 ports in the member ports and
24368 	 * each must not be a member of another LAG. Note that on a 4-port
24369 	 * device, there can be either 2 ports or 4 ports in the member ports.
24370 	 * Using 3 member ports is not supported.
24371 	 */
24372 	uint8_t	member_port_map;
24373 	/* If this bit is set to '1', the port0 is a lag member port. */
24374 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_0	UINT32_C(0x1)
24375 	/* If this bit is set to '1', the port1 is a lag member port. */
24376 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_1	UINT32_C(0x2)
24377 	/* If this bit is set to '1', the port2 is a lag member port. */
24378 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_2	UINT32_C(0x4)
24379 	/* If this bit is set to '1', the port3 is a lag member port. */
24380 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_3	UINT32_C(0x8)
24381 	/* rsvd4 is 4 b */
24382 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD4_MASK UINT32_C(0xf0)
24383 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
24384 	/* Link aggregation mode being used. */
24385 	uint8_t	link_aggr_mode;
24386 	/* active active mode. */
24387 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_ACTIVE_ACTIVE UINT32_C(0x1)
24388 	/* active backup mode. */
24389 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_ACTIVE_BACKUP UINT32_C(0x2)
24390 	/* Balance XOR mode. */
24391 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_BALANCE_XOR   UINT32_C(0x3)
24392 	/* 802.3AD mode. */
24393 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_802_3_AD	UINT32_C(0x4)
24394 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_LAST	HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_802_3_AD
24395 	uint8_t	unused_0[4];
24396 	/*
24397 	 * This field is used in Output records to indicate that the output
24398 	 * is completely written to RAM. This field should be read as '1'
24399 	 * to indicate that the output has been completely written. When
24400 	 * writing a command completion or response to an internal processor,
24401 	 * the order of writes has to be such that this field is written last.
24402 	 */
24403 	uint8_t	valid;
24404 } hwrm_func_lag_qcfg_output_t, *phwrm_func_lag_qcfg_output_t;
24405 
24406 /**************************
24407  * hwrm_func_lag_mode_cfg *
24408  **************************/
24409 
24410 
24411 /* hwrm_func_lag_mode_cfg_input (size:192b/24B) */
24412 
24413 typedef struct hwrm_func_lag_mode_cfg_input {
24414 	/* The HWRM command request type. */
24415 	uint16_t	req_type;
24416 	/*
24417 	 * The completion ring to send the completion event on. This should
24418 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24419 	 */
24420 	uint16_t	cmpl_ring;
24421 	/*
24422 	 * The sequence ID is used by the driver for tracking multiple
24423 	 * commands. This ID is treated as opaque data by the firmware and
24424 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24425 	 */
24426 	uint16_t	seq_id;
24427 	/*
24428 	 * The target ID of the command:
24429 	 * * 0x0-0xFFF8 - The function ID
24430 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24431 	 * * 0xFFFD - Reserved for user-space HWRM interface
24432 	 * * 0xFFFF - HWRM
24433 	 */
24434 	uint16_t	target_id;
24435 	/*
24436 	 * A physical address pointer pointing to a host buffer that the
24437 	 * command's response data will be written. This can be either a host
24438 	 * physical address (HPA) or a guest physical address (GPA) and must
24439 	 * point to a physically contiguous block of memory.
24440 	 */
24441 	uint64_t	resp_addr;
24442 	uint8_t	enables;
24443 	/*
24444 	 * This bit must be '1' for the link aggregation enable or
24445 	 * disable flags to be configured.
24446 	 */
24447 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_FLAGS		UINT32_C(0x1)
24448 	/*
24449 	 * This bit must be '1' for the active_port_map field to be
24450 	 * configured.
24451 	 */
24452 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_ACTIVE_PORT_MAP	UINT32_C(0x2)
24453 	/*
24454 	 * This bit must be '1' for the member_port_map field to be
24455 	 * configured.
24456 	 */
24457 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_MEMBER_PORT_MAP	UINT32_C(0x4)
24458 	/* This bit must be '1' for the aggr_mode field to be configured. */
24459 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_AGGR_MODE	UINT32_C(0x8)
24460 	/* This bit must be '1' for the lag id field to be configured. */
24461 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_LAG_ID		UINT32_C(0x10)
24462 	/* rsvd1 is 3 b */
24463 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_RSVD1_MASK	UINT32_C(0xe0)
24464 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_RSVD1_SFT	5
24465 	uint8_t	flags;
24466 	/*
24467 	 * If this bit is set to 1, the driver is requesting FW to disable
24468 	 * link aggregation feature during run time.
24469 	 */
24470 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_AGGR_DISABLE	UINT32_C(0x1)
24471 	/*
24472 	 * If this bit is set to 1, the driver is requesting FW to enable
24473 	 * link aggregation feature during run time.
24474 	 */
24475 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_AGGR_ENABLE	UINT32_C(0x2)
24476 	/* rsvd2 is 6 b */
24477 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_RSVD2_MASK	UINT32_C(0xfc)
24478 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_RSVD2_SFT	2
24479 	/*
24480 	 * This is the bitmap of all active ports in the LAG. Each bit
24481 	 * represents a front panel port of the device starting from port 0.
24482 	 * The number of front panel ports is specified in the port_cnt field
24483 	 * of the HWRM_PORT_PHY_QCAPS response.
24484 	 * The term "active port" is one of member ports which is eligible to
24485 	 * send or receive the traffic.
24486 	 * In the active-backup mode, only one member port is active port at
24487 	 * any given time. If the active port fails, another member port
24488 	 * automatically takes over the active role to ensure continuous
24489 	 * network connectivity.
24490 	 * In the active-active, balance_xor or 802_3_ad mode, all member ports
24491 	 * could be active port, if link status on one port is down, driver
24492 	 * needs to send the NIC a new active-port bitmap with marking this
24493 	 * port as not active port.
24494 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
24495 	 * panel ports.
24496 	 */
24497 	uint8_t	active_port_map;
24498 	/* If this bit is set to '1', the port0 is a lag active port. */
24499 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_0	UINT32_C(0x1)
24500 	/* If this bit is set to '1', the port1 is a lag active port. */
24501 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_1	UINT32_C(0x2)
24502 	/* If this bit is set to '1', the port2 is a lag active port. */
24503 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_2	UINT32_C(0x4)
24504 	/* If this bit is set to '1', the port3 is a lag active port. */
24505 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_3	UINT32_C(0x8)
24506 	/* rsvd3 is 4 b */
24507 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_RSVD3_MASK UINT32_C(0xf0)
24508 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
24509 	/*
24510 	 * This is the bitmap of all member ports in the LAG. Each bit
24511 	 * represents a front panel port of the device starting from port 0.
24512 	 * The number of front panel ports is specified in the port_cnt field
24513 	 * of the HWRM_PORT_PHY_QCAPS response.
24514 	 * The term "member port" refers to a front panel port that is added to
24515 	 * the bond group as a slave device. These member ports are combined to
24516 	 * create a logical bond interface.
24517 	 * For a 4-port NIC, the LAG member port combination can consist of
24518 	 * either two ports or four ports. However, it is important to note
24519 	 * that the case with three ports in the same lag group is not
24520 	 * supported.
24521 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
24522 	 * panel ports. There could be a case to use multiple LAG groups,
24523 	 * for example, if the NIC has four front panel ports, the lag feature
24524 	 * can use up to two LAG groups, with two ports assigned to each group.
24525 	 */
24526 	uint8_t	member_port_map;
24527 	/* If this bit is set to '1', the port0 is a lag member port. */
24528 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_0	UINT32_C(0x1)
24529 	/* If this bit is set to '1', the port1 is a lag member port. */
24530 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_1	UINT32_C(0x2)
24531 	/* If this bit is set to '1', the port2 is a lag member port. */
24532 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_2	UINT32_C(0x4)
24533 	/* If this bit is set to '1', the port3 is a lag member port. */
24534 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_3	UINT32_C(0x8)
24535 	/* rsvd4 is 4 b */
24536 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_RSVD4_MASK UINT32_C(0xf0)
24537 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
24538 	/* Link aggregation mode being used. */
24539 	uint8_t	link_aggr_mode;
24540 	/* active active mode. */
24541 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_ACTIVE_ACTIVE UINT32_C(0x1)
24542 	/* active backup mode. */
24543 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_ACTIVE_BACKUP UINT32_C(0x2)
24544 	/* Balance XOR mode. */
24545 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_BALANCE_XOR   UINT32_C(0x3)
24546 	/* 802.3AD mode. */
24547 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_802_3_AD	UINT32_C(0x4)
24548 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_LAST	HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_802_3_AD
24549 	/* Link aggregation group idx being used. */
24550 	uint8_t	lag_id;
24551 	uint8_t	unused_0[2];
24552 } hwrm_func_lag_mode_cfg_input_t, *phwrm_func_lag_mode_cfg_input_t;
24553 
24554 /* hwrm_func_lag_mode_cfg_output (size:128b/16B) */
24555 
24556 typedef struct hwrm_func_lag_mode_cfg_output {
24557 	/* The specific error status for the command. */
24558 	uint16_t	error_code;
24559 	/* The HWRM command request type. */
24560 	uint16_t	req_type;
24561 	/* The sequence ID from the original command. */
24562 	uint16_t	seq_id;
24563 	/* The length of the response data in number of bytes. */
24564 	uint16_t	resp_len;
24565 	/* Link aggregation group idx being used. */
24566 	uint8_t	lag_id;
24567 	uint8_t	unused_0[6];
24568 	/*
24569 	 * This field is used in Output records to indicate that the output
24570 	 * is completely written to RAM. This field should be read as '1'
24571 	 * to indicate that the output has been completely written. When
24572 	 * writing a command completion or response to an internal processor,
24573 	 * the order of writes has to be such that this field is written last.
24574 	 */
24575 	uint8_t	valid;
24576 } hwrm_func_lag_mode_cfg_output_t, *phwrm_func_lag_mode_cfg_output_t;
24577 
24578 /***************************
24579  * hwrm_func_lag_mode_qcfg *
24580  ***************************/
24581 
24582 
24583 /* hwrm_func_lag_mode_qcfg_input (size:192b/24B) */
24584 
24585 typedef struct hwrm_func_lag_mode_qcfg_input {
24586 	/* The HWRM command request type. */
24587 	uint16_t	req_type;
24588 	/*
24589 	 * The completion ring to send the completion event on. This should
24590 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24591 	 */
24592 	uint16_t	cmpl_ring;
24593 	/*
24594 	 * The sequence ID is used by the driver for tracking multiple
24595 	 * commands. This ID is treated as opaque data by the firmware and
24596 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24597 	 */
24598 	uint16_t	seq_id;
24599 	/*
24600 	 * The target ID of the command:
24601 	 * * 0x0-0xFFF8 - The function ID
24602 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24603 	 * * 0xFFFD - Reserved for user-space HWRM interface
24604 	 * * 0xFFFF - HWRM
24605 	 */
24606 	uint16_t	target_id;
24607 	/*
24608 	 * A physical address pointer pointing to a host buffer that the
24609 	 * command's response data will be written. This can be either a host
24610 	 * physical address (HPA) or a guest physical address (GPA) and must
24611 	 * point to a physically contiguous block of memory.
24612 	 */
24613 	uint64_t	resp_addr;
24614 	uint8_t	unused_0[8];
24615 } hwrm_func_lag_mode_qcfg_input_t, *phwrm_func_lag_mode_qcfg_input_t;
24616 
24617 /* hwrm_func_lag_mode_qcfg_output (size:128b/16B) */
24618 
24619 typedef struct hwrm_func_lag_mode_qcfg_output {
24620 	/* The specific error status for the command. */
24621 	uint16_t	error_code;
24622 	/* The HWRM command request type. */
24623 	uint16_t	req_type;
24624 	/* The sequence ID from the original command. */
24625 	uint16_t	seq_id;
24626 	/* The length of the response data in number of bytes. */
24627 	uint16_t	resp_len;
24628 	uint8_t	aggr_enabled;
24629 	/*
24630 	 * This flag is used to query whether link aggregation is enabled
24631 	 * or disabled during run time.
24632 	 */
24633 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_ENABLED	UINT32_C(0x1)
24634 	/* rsvd1 is 7 b */
24635 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_RSVD1_MASK	UINT32_C(0xfe)
24636 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_RSVD1_SFT	1
24637 	/*
24638 	 * This is the bitmap of all active ports in the LAG. Each bit
24639 	 * represents a front panel port of the device starting from port 0.
24640 	 * The number of front panel ports is specified in the port_cnt field
24641 	 * of the HWRM_PORT_PHY_QCAPS response.
24642 	 * The term "active port" is one of member ports which is eligible to
24643 	 * send or receive the traffic.
24644 	 * In the active-backup mode, only one member port is active port at
24645 	 * any given time. If the active port fails, another member port
24646 	 * automatically takes over the active role to ensure continuous
24647 	 * network connectivity.
24648 	 * In the active-active, balance_xor or 802_3_ad mode, all member ports
24649 	 * could be active port, if link status on one port is down, driver
24650 	 * needs to send the NIC a new active-port bitmap with marking this
24651 	 * port as not active port.
24652 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
24653 	 * panel ports.
24654 	 */
24655 	uint8_t	active_port_map;
24656 	/* If this bit is set to '1', the port0 is a lag active port. */
24657 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_0	UINT32_C(0x1)
24658 	/* If this bit is set to '1', the port1 is a lag active port. */
24659 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_1	UINT32_C(0x2)
24660 	/* If this bit is set to '1', the port2 is a lag active port. */
24661 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_2	UINT32_C(0x4)
24662 	/* If this bit is set to '1', the port3 is a lag active port. */
24663 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_3	UINT32_C(0x8)
24664 	/* rsvd2 is 4 b */
24665 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD2_MASK UINT32_C(0xf0)
24666 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD2_SFT  4
24667 	/*
24668 	 * This is the bitmap of all member ports in the LAG. Each bit
24669 	 * represents a front panel port of the device starting from port 0.
24670 	 * The number of front panel ports is specified in the port_cnt field
24671 	 * of the HWRM_PORT_PHY_QCAPS response.
24672 	 * The term "member port" refers to a front panel port that is added to
24673 	 * the bond group as a slave device. These member ports are combined to
24674 	 * create a logical bond interface.
24675 	 * For a 4-port NIC, the LAG member port combination can consist of
24676 	 * either two ports or four ports. However, it is important to note
24677 	 * that the case with three ports in the same lag group is not
24678 	 * supported.
24679 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
24680 	 * panel ports. There could be a case to use multiple LAG groups,
24681 	 * for example, if the NIC has four front panel ports, the lag feature
24682 	 * can use up to two LAG groups, with two ports assigned to each group.
24683 	 */
24684 	uint8_t	member_port_map;
24685 	/* If this bit is set to '1', the port0 is a lag member port. */
24686 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_0	UINT32_C(0x1)
24687 	/* If this bit is set to '1', the port1 is a lag member port. */
24688 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_1	UINT32_C(0x2)
24689 	/* If this bit is set to '1', the port2 is a lag member port. */
24690 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_2	UINT32_C(0x4)
24691 	/* If this bit is set to '1', the port3 is a lag member port. */
24692 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_3	UINT32_C(0x8)
24693 	/* rsvd3 is 4 b */
24694 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD3_MASK UINT32_C(0xf0)
24695 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD3_SFT  4
24696 	/* Link aggregation mode being used. */
24697 	uint8_t	link_aggr_mode;
24698 	/* active active mode. */
24699 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_ACTIVE_ACTIVE UINT32_C(0x1)
24700 	/* active backup mode. */
24701 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_ACTIVE_BACKUP UINT32_C(0x2)
24702 	/* Balance XOR mode. */
24703 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_BALANCE_XOR   UINT32_C(0x3)
24704 	/* 802.3AD mode. */
24705 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_802_3_AD	UINT32_C(0x4)
24706 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_LAST	HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_802_3_AD
24707 	uint8_t	unused_0[3];
24708 	/*
24709 	 * This field is used in Output records to indicate that the output
24710 	 * is completely written to RAM. This field should be read as '1'
24711 	 * to indicate that the output has been completely written. When
24712 	 * writing a command completion or response to an internal processor,
24713 	 * the order of writes has to be such that this field is written last.
24714 	 */
24715 	uint8_t	valid;
24716 } hwrm_func_lag_mode_qcfg_output_t, *phwrm_func_lag_mode_qcfg_output_t;
24717 
24718 /***********************
24719  * hwrm_func_vlan_qcfg *
24720  ***********************/
24721 
24722 
24723 /* hwrm_func_vlan_qcfg_input (size:192b/24B) */
24724 
24725 typedef struct hwrm_func_vlan_qcfg_input {
24726 	/* The HWRM command request type. */
24727 	uint16_t	req_type;
24728 	/*
24729 	 * The completion ring to send the completion event on. This should
24730 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24731 	 */
24732 	uint16_t	cmpl_ring;
24733 	/*
24734 	 * The sequence ID is used by the driver for tracking multiple
24735 	 * commands. This ID is treated as opaque data by the firmware and
24736 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24737 	 */
24738 	uint16_t	seq_id;
24739 	/*
24740 	 * The target ID of the command:
24741 	 * * 0x0-0xFFF8 - The function ID
24742 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24743 	 * * 0xFFFD - Reserved for user-space HWRM interface
24744 	 * * 0xFFFF - HWRM
24745 	 */
24746 	uint16_t	target_id;
24747 	/*
24748 	 * A physical address pointer pointing to a host buffer that the
24749 	 * command's response data will be written. This can be either a host
24750 	 * physical address (HPA) or a guest physical address (GPA) and must
24751 	 * point to a physically contiguous block of memory.
24752 	 */
24753 	uint64_t	resp_addr;
24754 	/*
24755 	 * Function ID of the function that is being
24756 	 * configured.
24757 	 * If set to 0xFF... (All Fs), then the configuration is
24758 	 * for the requesting function.
24759 	 */
24760 	uint16_t	fid;
24761 	uint8_t	unused_0[6];
24762 } hwrm_func_vlan_qcfg_input_t, *phwrm_func_vlan_qcfg_input_t;
24763 
24764 /* hwrm_func_vlan_qcfg_output (size:320b/40B) */
24765 
24766 typedef struct hwrm_func_vlan_qcfg_output {
24767 	/* The specific error status for the command. */
24768 	uint16_t	error_code;
24769 	/* The HWRM command request type. */
24770 	uint16_t	req_type;
24771 	/* The sequence ID from the original command. */
24772 	uint16_t	seq_id;
24773 	/* The length of the response data in number of bytes. */
24774 	uint16_t	resp_len;
24775 	uint64_t	unused_0;
24776 	/* S-TAG VLAN identifier configured for the function. */
24777 	uint16_t	stag_vid;
24778 	/* S-TAG PCP value configured for the function. */
24779 	uint8_t	stag_pcp;
24780 	uint8_t	unused_1;
24781 	/*
24782 	 * S-TAG TPID value configured for the function. This field is
24783 	 * specified in network byte order.
24784 	 */
24785 	uint16_t	stag_tpid;
24786 	/* C-TAG VLAN identifier configured for the function. */
24787 	uint16_t	ctag_vid;
24788 	/* C-TAG PCP value configured for the function. */
24789 	uint8_t	ctag_pcp;
24790 	uint8_t	unused_2;
24791 	/*
24792 	 * C-TAG TPID value configured for the function. This field is
24793 	 * specified in network byte order.
24794 	 */
24795 	uint16_t	ctag_tpid;
24796 	/* Future use. */
24797 	uint32_t	rsvd2;
24798 	/* Future use. */
24799 	uint32_t	rsvd3;
24800 	uint8_t	unused_3[3];
24801 	/*
24802 	 * This field is used in Output records to indicate that the output
24803 	 * is completely written to RAM. This field should be read as '1'
24804 	 * to indicate that the output has been completely written. When
24805 	 * writing a command completion or response to an internal processor,
24806 	 * the order of writes has to be such that this field is written last.
24807 	 */
24808 	uint8_t	valid;
24809 } hwrm_func_vlan_qcfg_output_t, *phwrm_func_vlan_qcfg_output_t;
24810 
24811 /**********************
24812  * hwrm_func_vlan_cfg *
24813  **********************/
24814 
24815 
24816 /* hwrm_func_vlan_cfg_input (size:384b/48B) */
24817 
24818 typedef struct hwrm_func_vlan_cfg_input {
24819 	/* The HWRM command request type. */
24820 	uint16_t	req_type;
24821 	/*
24822 	 * The completion ring to send the completion event on. This should
24823 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24824 	 */
24825 	uint16_t	cmpl_ring;
24826 	/*
24827 	 * The sequence ID is used by the driver for tracking multiple
24828 	 * commands. This ID is treated as opaque data by the firmware and
24829 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24830 	 */
24831 	uint16_t	seq_id;
24832 	/*
24833 	 * The target ID of the command:
24834 	 * * 0x0-0xFFF8 - The function ID
24835 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24836 	 * * 0xFFFD - Reserved for user-space HWRM interface
24837 	 * * 0xFFFF - HWRM
24838 	 */
24839 	uint16_t	target_id;
24840 	/*
24841 	 * A physical address pointer pointing to a host buffer that the
24842 	 * command's response data will be written. This can be either a host
24843 	 * physical address (HPA) or a guest physical address (GPA) and must
24844 	 * point to a physically contiguous block of memory.
24845 	 */
24846 	uint64_t	resp_addr;
24847 	/*
24848 	 * Function ID of the function that is being
24849 	 * configured.
24850 	 * If set to 0xFF... (All Fs), then the configuration is
24851 	 * for the requesting function.
24852 	 */
24853 	uint16_t	fid;
24854 	uint8_t	unused_0[2];
24855 	uint32_t	enables;
24856 	/*
24857 	 * This bit must be '1' for the stag_vid field to be
24858 	 * configured.
24859 	 */
24860 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_STAG_VID	UINT32_C(0x1)
24861 	/*
24862 	 * This bit must be '1' for the ctag_vid field to be
24863 	 * configured.
24864 	 */
24865 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_CTAG_VID	UINT32_C(0x2)
24866 	/*
24867 	 * This bit must be '1' for the stag_pcp field to be
24868 	 * configured.
24869 	 */
24870 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_STAG_PCP	UINT32_C(0x4)
24871 	/*
24872 	 * This bit must be '1' for the ctag_pcp field to be
24873 	 * configured.
24874 	 */
24875 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_CTAG_PCP	UINT32_C(0x8)
24876 	/*
24877 	 * This bit must be '1' for the stag_tpid field to be
24878 	 * configured.
24879 	 */
24880 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_STAG_TPID	UINT32_C(0x10)
24881 	/*
24882 	 * This bit must be '1' for the ctag_tpid field to be
24883 	 * configured.
24884 	 */
24885 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_CTAG_TPID	UINT32_C(0x20)
24886 	/* S-TAG VLAN identifier configured for the function. */
24887 	uint16_t	stag_vid;
24888 	/* S-TAG PCP value configured for the function. */
24889 	uint8_t	stag_pcp;
24890 	uint8_t	unused_1;
24891 	/*
24892 	 * S-TAG TPID value configured for the function. This field is
24893 	 * specified in network byte order.
24894 	 */
24895 	uint16_t	stag_tpid;
24896 	/* C-TAG VLAN identifier configured for the function. */
24897 	uint16_t	ctag_vid;
24898 	/* C-TAG PCP value configured for the function. */
24899 	uint8_t	ctag_pcp;
24900 	uint8_t	unused_2;
24901 	/*
24902 	 * C-TAG TPID value configured for the function. This field is
24903 	 * specified in network byte order.
24904 	 */
24905 	uint16_t	ctag_tpid;
24906 	/* Future use. */
24907 	uint32_t	rsvd1;
24908 	/* Future use. */
24909 	uint32_t	rsvd2;
24910 	uint8_t	unused_3[4];
24911 } hwrm_func_vlan_cfg_input_t, *phwrm_func_vlan_cfg_input_t;
24912 
24913 /* hwrm_func_vlan_cfg_output (size:128b/16B) */
24914 
24915 typedef struct hwrm_func_vlan_cfg_output {
24916 	/* The specific error status for the command. */
24917 	uint16_t	error_code;
24918 	/* The HWRM command request type. */
24919 	uint16_t	req_type;
24920 	/* The sequence ID from the original command. */
24921 	uint16_t	seq_id;
24922 	/* The length of the response data in number of bytes. */
24923 	uint16_t	resp_len;
24924 	uint8_t	unused_0[7];
24925 	/*
24926 	 * This field is used in Output records to indicate that the output
24927 	 * is completely written to RAM. This field should be read as '1'
24928 	 * to indicate that the output has been completely written. When
24929 	 * writing a command completion or response to an internal processor,
24930 	 * the order of writes has to be such that this field is written last.
24931 	 */
24932 	uint8_t	valid;
24933 } hwrm_func_vlan_cfg_output_t, *phwrm_func_vlan_cfg_output_t;
24934 
24935 /*******************************
24936  * hwrm_func_vf_vnic_ids_query *
24937  *******************************/
24938 
24939 
24940 /* hwrm_func_vf_vnic_ids_query_input (size:256b/32B) */
24941 
24942 typedef struct hwrm_func_vf_vnic_ids_query_input {
24943 	/* The HWRM command request type. */
24944 	uint16_t	req_type;
24945 	/*
24946 	 * The completion ring to send the completion event on. This should
24947 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24948 	 */
24949 	uint16_t	cmpl_ring;
24950 	/*
24951 	 * The sequence ID is used by the driver for tracking multiple
24952 	 * commands. This ID is treated as opaque data by the firmware and
24953 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24954 	 */
24955 	uint16_t	seq_id;
24956 	/*
24957 	 * The target ID of the command:
24958 	 * * 0x0-0xFFF8 - The function ID
24959 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24960 	 * * 0xFFFD - Reserved for user-space HWRM interface
24961 	 * * 0xFFFF - HWRM
24962 	 */
24963 	uint16_t	target_id;
24964 	/*
24965 	 * A physical address pointer pointing to a host buffer that the
24966 	 * command's response data will be written. This can be either a host
24967 	 * physical address (HPA) or a guest physical address (GPA) and must
24968 	 * point to a physically contiguous block of memory.
24969 	 */
24970 	uint64_t	resp_addr;
24971 	/*
24972 	 * This value is used to identify a Virtual Function (VF).
24973 	 * The scope of VF ID is local within a PF.
24974 	 */
24975 	uint16_t	vf_id;
24976 	uint8_t	unused_0[2];
24977 	/* Max number of vnic ids in vnic id table */
24978 	uint32_t	max_vnic_id_cnt;
24979 	/* This is the address for VF VNIC ID table */
24980 	uint64_t	vnic_id_tbl_addr;
24981 } hwrm_func_vf_vnic_ids_query_input_t, *phwrm_func_vf_vnic_ids_query_input_t;
24982 
24983 /* hwrm_func_vf_vnic_ids_query_output (size:128b/16B) */
24984 
24985 typedef struct hwrm_func_vf_vnic_ids_query_output {
24986 	/* The specific error status for the command. */
24987 	uint16_t	error_code;
24988 	/* The HWRM command request type. */
24989 	uint16_t	req_type;
24990 	/* The sequence ID from the original command. */
24991 	uint16_t	seq_id;
24992 	/* The length of the response data in number of bytes. */
24993 	uint16_t	resp_len;
24994 	/*
24995 	 * Actual number of vnic ids
24996 	 *
24997 	 * Each VNIC ID is written as a 32-bit number.
24998 	 */
24999 	uint32_t	vnic_id_cnt;
25000 	uint8_t	unused_0[3];
25001 	/*
25002 	 * This field is used in Output records to indicate that the output
25003 	 * is completely written to RAM. This field should be read as '1'
25004 	 * to indicate that the output has been completely written. When
25005 	 * writing a command completion or response to an internal processor,
25006 	 * the order of writes has to be such that this field is written last.
25007 	 */
25008 	uint8_t	valid;
25009 } hwrm_func_vf_vnic_ids_query_output_t, *phwrm_func_vf_vnic_ids_query_output_t;
25010 
25011 /***********************
25012  * hwrm_func_vf_bw_cfg *
25013  ***********************/
25014 
25015 
25016 /* hwrm_func_vf_bw_cfg_input (size:960b/120B) */
25017 
25018 typedef struct hwrm_func_vf_bw_cfg_input {
25019 	/* The HWRM command request type. */
25020 	uint16_t	req_type;
25021 	/*
25022 	 * The completion ring to send the completion event on. This should
25023 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25024 	 */
25025 	uint16_t	cmpl_ring;
25026 	/*
25027 	 * The sequence ID is used by the driver for tracking multiple
25028 	 * commands. This ID is treated as opaque data by the firmware and
25029 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25030 	 */
25031 	uint16_t	seq_id;
25032 	/*
25033 	 * The target ID of the command:
25034 	 * * 0x0-0xFFF8 - The function ID
25035 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25036 	 * * 0xFFFD - Reserved for user-space HWRM interface
25037 	 * * 0xFFFF - HWRM
25038 	 */
25039 	uint16_t	target_id;
25040 	/*
25041 	 * A physical address pointer pointing to a host buffer that the
25042 	 * command's response data will be written. This can be either a host
25043 	 * physical address (HPA) or a guest physical address (GPA) and must
25044 	 * point to a physically contiguous block of memory.
25045 	 */
25046 	uint64_t	resp_addr;
25047 	/*
25048 	 * The number of VF functions that are being configured.
25049 	 * The cmd space allows up to 50 VFs' BW to be configured with one cmd.
25050 	 */
25051 	uint16_t	num_vfs;
25052 	uint16_t	unused[3];
25053 	/* These 16-bit fields contain the VF fid and the rate scale percentage. */
25054 	uint16_t	vfn[48];
25055 	/* The physical VF id the adjustment will be made to. */
25056 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_VFID_MASK	UINT32_C(0xfff)
25057 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_VFID_SFT	0
25058 	/*
25059 	 * This field configures the rate scale percentage of the VF as specified
25060 	 * by the physical VF id.
25061 	 */
25062 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_MASK	UINT32_C(0xf000)
25063 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_SFT	12
25064 	/* 0% of the max tx rate */
25065 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_0	(UINT32_C(0x0) << 12)
25066 	/* 6.66% of the max tx rate */
25067 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_6_66   (UINT32_C(0x1) << 12)
25068 	/* 13.33% of the max tx rate */
25069 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_13_33  (UINT32_C(0x2) << 12)
25070 	/* 20% of the max tx rate */
25071 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_20	(UINT32_C(0x3) << 12)
25072 	/* 26.66% of the max tx rate */
25073 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_26_66  (UINT32_C(0x4) << 12)
25074 	/* 33% of the max tx rate */
25075 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_33_33  (UINT32_C(0x5) << 12)
25076 	/* 40% of the max tx rate */
25077 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_40	(UINT32_C(0x6) << 12)
25078 	/* 46.66% of the max tx rate */
25079 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_46_66  (UINT32_C(0x7) << 12)
25080 	/* 53.33% of the max tx rate */
25081 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_53_33  (UINT32_C(0x8) << 12)
25082 	/* 60% of the max tx rate */
25083 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_60	(UINT32_C(0x9) << 12)
25084 	/* 66.66% of the max tx rate */
25085 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_66_66  (UINT32_C(0xa) << 12)
25086 	/* 53.33% of the max tx rate */
25087 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_73_33  (UINT32_C(0xb) << 12)
25088 	/* 80% of the max tx rate */
25089 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_80	(UINT32_C(0xc) << 12)
25090 	/* 86.66% of the max tx rate */
25091 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_86_66  (UINT32_C(0xd) << 12)
25092 	/* 93.33% of the max tx rate */
25093 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_93_33  (UINT32_C(0xe) << 12)
25094 	/* 100% of the max tx rate */
25095 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_100	(UINT32_C(0xf) << 12)
25096 		#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_LAST	HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_100
25097 } hwrm_func_vf_bw_cfg_input_t, *phwrm_func_vf_bw_cfg_input_t;
25098 
25099 /* hwrm_func_vf_bw_cfg_output (size:128b/16B) */
25100 
25101 typedef struct hwrm_func_vf_bw_cfg_output {
25102 	/* The specific error status for the command. */
25103 	uint16_t	error_code;
25104 	/* The HWRM command request type. */
25105 	uint16_t	req_type;
25106 	/* The sequence ID from the original command. */
25107 	uint16_t	seq_id;
25108 	/* The length of the response data in number of bytes. */
25109 	uint16_t	resp_len;
25110 	uint8_t	unused_0[7];
25111 	/*
25112 	 * This field is used in Output records to indicate that the output
25113 	 * is completely written to RAM. This field should be read as '1'
25114 	 * to indicate that the output has been completely written. When
25115 	 * writing a command completion or response to an internal processor,
25116 	 * the order of writes has to be such that this field is written last.
25117 	 */
25118 	uint8_t	valid;
25119 } hwrm_func_vf_bw_cfg_output_t, *phwrm_func_vf_bw_cfg_output_t;
25120 
25121 /************************
25122  * hwrm_func_vf_bw_qcfg *
25123  ************************/
25124 
25125 
25126 /* hwrm_func_vf_bw_qcfg_input (size:960b/120B) */
25127 
25128 typedef struct hwrm_func_vf_bw_qcfg_input {
25129 	/* The HWRM command request type. */
25130 	uint16_t	req_type;
25131 	/*
25132 	 * The completion ring to send the completion event on. This should
25133 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25134 	 */
25135 	uint16_t	cmpl_ring;
25136 	/*
25137 	 * The sequence ID is used by the driver for tracking multiple
25138 	 * commands. This ID is treated as opaque data by the firmware and
25139 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25140 	 */
25141 	uint16_t	seq_id;
25142 	/*
25143 	 * The target ID of the command:
25144 	 * * 0x0-0xFFF8 - The function ID
25145 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25146 	 * * 0xFFFD - Reserved for user-space HWRM interface
25147 	 * * 0xFFFF - HWRM
25148 	 */
25149 	uint16_t	target_id;
25150 	/*
25151 	 * A physical address pointer pointing to a host buffer that the
25152 	 * command's response data will be written. This can be either a host
25153 	 * physical address (HPA) or a guest physical address (GPA) and must
25154 	 * point to a physically contiguous block of memory.
25155 	 */
25156 	uint64_t	resp_addr;
25157 	/*
25158 	 * The number of VF functions that are being queried.
25159 	 * The inline response space allows the host to query up to 50 VFs'
25160 	 * rate scale percentage
25161 	 */
25162 	uint16_t	num_vfs;
25163 	uint16_t	unused[3];
25164 	/* These 16-bit fields contain the VF fid */
25165 	uint16_t	vfn[48];
25166 	/* The physical VF id of interest */
25167 	#define HWRM_FUNC_VF_BW_QCFG_INPUT_VFN_VFID_MASK UINT32_C(0xfff)
25168 	#define HWRM_FUNC_VF_BW_QCFG_INPUT_VFN_VFID_SFT 0
25169 } hwrm_func_vf_bw_qcfg_input_t, *phwrm_func_vf_bw_qcfg_input_t;
25170 
25171 /* hwrm_func_vf_bw_qcfg_output (size:960b/120B) */
25172 
25173 typedef struct hwrm_func_vf_bw_qcfg_output {
25174 	/* The specific error status for the command. */
25175 	uint16_t	error_code;
25176 	/* The HWRM command request type. */
25177 	uint16_t	req_type;
25178 	/* The sequence ID from the original command. */
25179 	uint16_t	seq_id;
25180 	/* The length of the response data in number of bytes. */
25181 	uint16_t	resp_len;
25182 	/*
25183 	 * The number of VF functions that are being queried.
25184 	 * The inline response space allows the host to query up to 50 VFs'
25185 	 * rate scale percentage.
25186 	 */
25187 	uint16_t	num_vfs;
25188 	uint16_t	unused[3];
25189 	/* These 16-bit fields contain the VF fid and the rate scale percentage. */
25190 	uint16_t	vfn[48];
25191 	/* The physical VF id the adjustment will be made to. */
25192 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_VFID_MASK	UINT32_C(0xfff)
25193 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_VFID_SFT	0
25194 	/*
25195 	 * This field configures the rate scale percentage of the VF as specified
25196 	 * by the physical VF id.
25197 	 */
25198 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_MASK	UINT32_C(0xf000)
25199 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_SFT	12
25200 	/* 0% of the max tx rate */
25201 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_0	(UINT32_C(0x0) << 12)
25202 	/* 6.66% of the max tx rate */
25203 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_6_66   (UINT32_C(0x1) << 12)
25204 	/* 13.33% of the max tx rate */
25205 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_13_33  (UINT32_C(0x2) << 12)
25206 	/* 20% of the max tx rate */
25207 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_20	(UINT32_C(0x3) << 12)
25208 	/* 26.66% of the max tx rate */
25209 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_26_66  (UINT32_C(0x4) << 12)
25210 	/* 33% of the max tx rate */
25211 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_33_33  (UINT32_C(0x5) << 12)
25212 	/* 40% of the max tx rate */
25213 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_40	(UINT32_C(0x6) << 12)
25214 	/* 46.66% of the max tx rate */
25215 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_46_66  (UINT32_C(0x7) << 12)
25216 	/* 53.33% of the max tx rate */
25217 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_53_33  (UINT32_C(0x8) << 12)
25218 	/* 60% of the max tx rate */
25219 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_60	(UINT32_C(0x9) << 12)
25220 	/* 66.66% of the max tx rate */
25221 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_66_66  (UINT32_C(0xa) << 12)
25222 	/* 53.33% of the max tx rate */
25223 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_73_33  (UINT32_C(0xb) << 12)
25224 	/* 80% of the max tx rate */
25225 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_80	(UINT32_C(0xc) << 12)
25226 	/* 86.66% of the max tx rate */
25227 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_86_66  (UINT32_C(0xd) << 12)
25228 	/* 93.33% of the max tx rate */
25229 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_93_33  (UINT32_C(0xe) << 12)
25230 	/* 100% of the max tx rate */
25231 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_100	(UINT32_C(0xf) << 12)
25232 		#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_LAST	HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_100
25233 	uint8_t	unused_0[7];
25234 	/*
25235 	 * This field is used in Output records to indicate that the output
25236 	 * is completely written to RAM. This field should be read as '1'
25237 	 * to indicate that the output has been completely written. When
25238 	 * writing a command completion or response to an internal processor,
25239 	 * the order of writes has to be such that this field is written last.
25240 	 */
25241 	uint8_t	valid;
25242 } hwrm_func_vf_bw_qcfg_output_t, *phwrm_func_vf_bw_qcfg_output_t;
25243 
25244 /***************************
25245  * hwrm_func_drv_if_change *
25246  ***************************/
25247 
25248 
25249 /* hwrm_func_drv_if_change_input (size:192b/24B) */
25250 
25251 typedef struct hwrm_func_drv_if_change_input {
25252 	/* The HWRM command request type. */
25253 	uint16_t	req_type;
25254 	/*
25255 	 * The completion ring to send the completion event on. This should
25256 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25257 	 */
25258 	uint16_t	cmpl_ring;
25259 	/*
25260 	 * The sequence ID is used by the driver for tracking multiple
25261 	 * commands. This ID is treated as opaque data by the firmware and
25262 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25263 	 */
25264 	uint16_t	seq_id;
25265 	/*
25266 	 * The target ID of the command:
25267 	 * * 0x0-0xFFF8 - The function ID
25268 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25269 	 * * 0xFFFD - Reserved for user-space HWRM interface
25270 	 * * 0xFFFF - HWRM
25271 	 */
25272 	uint16_t	target_id;
25273 	/*
25274 	 * A physical address pointer pointing to a host buffer that the
25275 	 * command's response data will be written. This can be either a host
25276 	 * physical address (HPA) or a guest physical address (GPA) and must
25277 	 * point to a physically contiguous block of memory.
25278 	 */
25279 	uint64_t	resp_addr;
25280 	uint32_t	flags;
25281 	/*
25282 	 * When this bit is '1', the function driver is indicating
25283 	 * that the IF state is changing to UP state. The call should
25284 	 * be made at the beginning of the driver's open call before
25285 	 * resources are allocated. After making the call, the driver
25286 	 * should check the response to see if any resources may have
25287 	 * changed (see the response below). If the driver fails
25288 	 * the open call, the driver should make this call again with
25289 	 * this bit cleared to indicate that the IF state is not UP.
25290 	 * During the driver's close call when the IF state is changing
25291 	 * to DOWN, the driver should make this call with the bit cleared
25292 	 * after all resources have been freed.
25293 	 */
25294 	#define HWRM_FUNC_DRV_IF_CHANGE_INPUT_FLAGS_UP	UINT32_C(0x1)
25295 	uint32_t	unused;
25296 } hwrm_func_drv_if_change_input_t, *phwrm_func_drv_if_change_input_t;
25297 
25298 /* hwrm_func_drv_if_change_output (size:128b/16B) */
25299 
25300 typedef struct hwrm_func_drv_if_change_output {
25301 	/* The specific error status for the command. */
25302 	uint16_t	error_code;
25303 	/* The HWRM command request type. */
25304 	uint16_t	req_type;
25305 	/* The sequence ID from the original command. */
25306 	uint16_t	seq_id;
25307 	/* The length of the response data in number of bytes. */
25308 	uint16_t	resp_len;
25309 	uint32_t	flags;
25310 	/*
25311 	 * When this bit is '1', it indicates that the resources reserved
25312 	 * for this function may have changed. The driver should check
25313 	 * resource capabilities and reserve resources again before
25314 	 * allocating resources.
25315 	 */
25316 	#define HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_RESC_CHANGE	UINT32_C(0x1)
25317 	/*
25318 	 * When this bit is '1', it indicates that the firmware got changed /
25319 	 * reset. The driver should do complete re-initialization when that
25320 	 * bit is set.
25321 	 */
25322 	#define HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_HOT_FW_RESET_DONE	UINT32_C(0x2)
25323 	/*
25324 	 * When this bit is '1', it indicates that capabilities
25325 	 * for this function may have changed. The driver should
25326 	 * query for changes to capabilities.
25327 	 * The CAPS_CHANGE bit will only be set when it is safe for the
25328 	 * driver to completely re-initialize all resources for the function
25329 	 * including any children VFs.
25330 	 */
25331 	#define HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_CAPS_CHANGE	UINT32_C(0x4)
25332 	uint8_t	unused_0[3];
25333 	/*
25334 	 * This field is used in Output records to indicate that the output
25335 	 * is completely written to RAM. This field should be read as '1'
25336 	 * to indicate that the output has been completely written. When
25337 	 * writing a command completion or response to an internal processor,
25338 	 * the order of writes has to be such that this field is written last.
25339 	 */
25340 	uint8_t	valid;
25341 } hwrm_func_drv_if_change_output_t, *phwrm_func_drv_if_change_output_t;
25342 
25343 /*******************************
25344  * hwrm_func_host_pf_ids_query *
25345  *******************************/
25346 
25347 
25348 /* hwrm_func_host_pf_ids_query_input (size:192b/24B) */
25349 
25350 typedef struct hwrm_func_host_pf_ids_query_input {
25351 	/* The HWRM command request type. */
25352 	uint16_t	req_type;
25353 	/*
25354 	 * The completion ring to send the completion event on. This should
25355 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25356 	 */
25357 	uint16_t	cmpl_ring;
25358 	/*
25359 	 * The sequence ID is used by the driver for tracking multiple
25360 	 * commands. This ID is treated as opaque data by the firmware and
25361 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25362 	 */
25363 	uint16_t	seq_id;
25364 	/*
25365 	 * The target ID of the command:
25366 	 * * 0x0-0xFFF8 - The function ID
25367 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25368 	 * * 0xFFFD - Reserved for user-space HWRM interface
25369 	 * * 0xFFFF - HWRM
25370 	 */
25371 	uint16_t	target_id;
25372 	/*
25373 	 * A physical address pointer pointing to a host buffer that the
25374 	 * command's response data will be written. This can be either a host
25375 	 * physical address (HPA) or a guest physical address (GPA) and must
25376 	 * point to a physically contiguous block of memory.
25377 	 */
25378 	uint64_t	resp_addr;
25379 	uint8_t	host;
25380 	/*
25381 	 * # If this bit is set to '1', the query will contain PF(s)
25382 	 * belongs to SOC host.
25383 	 */
25384 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_SOC	UINT32_C(0x1)
25385 	/*
25386 	 * # If this bit is set to '1', the query will contain PF(s)
25387 	 * belongs to EP0 host.
25388 	 */
25389 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_0	UINT32_C(0x2)
25390 	/*
25391 	 * # If this bit is set to '1', the query will contain PF(s)
25392 	 * belongs to EP1 host.
25393 	 */
25394 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_1	UINT32_C(0x4)
25395 	/*
25396 	 * # If this bit is set to '1', the query will contain PF(s)
25397 	 * belongs to EP2 host.
25398 	 */
25399 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_2	UINT32_C(0x8)
25400 	/*
25401 	 * # If this bit is set to '1', the query will contain PF(s)
25402 	 * belongs to EP3 host.
25403 	 */
25404 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_3	UINT32_C(0x10)
25405 	/*
25406 	 * This provides a filter of what PF(s) will be returned in the
25407 	 * query..
25408 	 */
25409 	uint8_t	filter;
25410 	/*
25411 	 * all available PF(s) belong to the host(s) (defined in the
25412 	 * host field). This includes the hidden PFs.
25413 	 */
25414 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_ALL  UINT32_C(0x0)
25415 	/*
25416 	 * all available PF(s) belong to the host(s) (defined in the
25417 	 * host field) that is available for L2 traffic.
25418 	 */
25419 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_L2   UINT32_C(0x1)
25420 	/*
25421 	 * all available PF(s) belong to the host(s) (defined in the
25422 	 * host field) that is available for ROCE traffic.
25423 	 */
25424 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_ROCE UINT32_C(0x2)
25425 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_LAST HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_ROCE
25426 	uint8_t	unused_1[6];
25427 } hwrm_func_host_pf_ids_query_input_t, *phwrm_func_host_pf_ids_query_input_t;
25428 
25429 /* hwrm_func_host_pf_ids_query_output (size:128b/16B) */
25430 
25431 typedef struct hwrm_func_host_pf_ids_query_output {
25432 	/* The specific error status for the command. */
25433 	uint16_t	error_code;
25434 	/* The HWRM command request type. */
25435 	uint16_t	req_type;
25436 	/* The sequence ID from the original command. */
25437 	uint16_t	seq_id;
25438 	/* The length of the response data in number of bytes. */
25439 	uint16_t	resp_len;
25440 	/* This provides the first PF ID of the device. */
25441 	uint16_t	first_pf_id;
25442 	uint16_t	pf_ordinal_mask;
25443 	/*
25444 	 * When this bit is '1', it indicates first PF belongs to one of
25445 	 * the hosts defined in the input request.
25446 	 */
25447 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_0	UINT32_C(0x1)
25448 	/*
25449 	 * When this bit is '1', it indicates 2nd PF belongs to one of the
25450 	 * hosts defined in the input request.
25451 	 */
25452 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_1	UINT32_C(0x2)
25453 	/*
25454 	 * When this bit is '1', it indicates 3rd PF belongs to one of the
25455 	 * hosts defined in the input request.
25456 	 */
25457 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_2	UINT32_C(0x4)
25458 	/*
25459 	 * When this bit is '1', it indicates 4th PF belongs to one of the
25460 	 * hosts defined in the input request.
25461 	 */
25462 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_3	UINT32_C(0x8)
25463 	/*
25464 	 * When this bit is '1', it indicates 5th PF belongs to one of the
25465 	 * hosts defined in the input request.
25466 	 */
25467 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_4	UINT32_C(0x10)
25468 	/*
25469 	 * When this bit is '1', it indicates 6th PF belongs to one of the
25470 	 * hosts defined in the input request.
25471 	 */
25472 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_5	UINT32_C(0x20)
25473 	/*
25474 	 * When this bit is '1', it indicates 7th PF belongs to one of the
25475 	 * hosts defined in the input request.
25476 	 */
25477 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_6	UINT32_C(0x40)
25478 	/*
25479 	 * When this bit is '1', it indicates 8th PF belongs to one of the
25480 	 * hosts defined in the input request.
25481 	 */
25482 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_7	UINT32_C(0x80)
25483 	/*
25484 	 * When this bit is '1', it indicates 9th PF belongs to one of the
25485 	 * hosts defined in the input request.
25486 	 */
25487 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_8	UINT32_C(0x100)
25488 	/*
25489 	 * When this bit is '1', it indicates 10th PF belongs to one of the
25490 	 * hosts defined in the input request.
25491 	 */
25492 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_9	UINT32_C(0x200)
25493 	/*
25494 	 * When this bit is '1', it indicates 11th PF belongs to one of the
25495 	 * hosts defined in the input request.
25496 	 */
25497 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_10	UINT32_C(0x400)
25498 	/*
25499 	 * When this bit is '1', it indicates 12th PF belongs to one of the
25500 	 * hosts defined in the input request.
25501 	 */
25502 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_11	UINT32_C(0x800)
25503 	/*
25504 	 * When this bit is '1', it indicates 13th PF belongs to one of the
25505 	 * hosts defined in the input request.
25506 	 */
25507 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_12	UINT32_C(0x1000)
25508 	/*
25509 	 * When this bit is '1', it indicates 14th PF belongs to one of the
25510 	 * hosts defined in the input request.
25511 	 */
25512 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_13	UINT32_C(0x2000)
25513 	/*
25514 	 * When this bit is '1', it indicates 15th PF belongs to one of the
25515 	 * hosts defined in the input request.
25516 	 */
25517 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_14	UINT32_C(0x4000)
25518 	/*
25519 	 * When this bit is '1', it indicates 16th PF belongs to one of the
25520 	 * hosts defined in the input request.
25521 	 */
25522 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_15	UINT32_C(0x8000)
25523 	uint8_t	unused_1[3];
25524 	/*
25525 	 * This field is used in Output records to indicate that the output
25526 	 * is completely written to RAM. This field should be read as '1'
25527 	 * to indicate that the output has been completely written. When
25528 	 * writing a command completion or response to an internal processor,
25529 	 * the order of writes has to be such that this field is written last.
25530 	 */
25531 	uint8_t	valid;
25532 } hwrm_func_host_pf_ids_query_output_t, *phwrm_func_host_pf_ids_query_output_t;
25533 
25534 /*********************
25535  * hwrm_func_spd_cfg *
25536  *********************/
25537 
25538 
25539 /* hwrm_func_spd_cfg_input (size:384b/48B) */
25540 
25541 typedef struct hwrm_func_spd_cfg_input {
25542 	/* The HWRM command request type. */
25543 	uint16_t	req_type;
25544 	/*
25545 	 * The completion ring to send the completion event on. This should
25546 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25547 	 */
25548 	uint16_t	cmpl_ring;
25549 	/*
25550 	 * The sequence ID is used by the driver for tracking multiple
25551 	 * commands. This ID is treated as opaque data by the firmware and
25552 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25553 	 */
25554 	uint16_t	seq_id;
25555 	/*
25556 	 * The target ID of the command:
25557 	 * * 0x0-0xFFF8 - The function ID
25558 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25559 	 * * 0xFFFD - Reserved for user-space HWRM interface
25560 	 * * 0xFFFF - HWRM
25561 	 */
25562 	uint16_t	target_id;
25563 	/*
25564 	 * A physical address pointer pointing to a host buffer that the
25565 	 * command's response data will be written. This can be either a host
25566 	 * physical address (HPA) or a guest physical address (GPA) and must
25567 	 * point to a physically contiguous block of memory.
25568 	 */
25569 	uint64_t	resp_addr;
25570 	uint32_t	flags;
25571 	/* Set this bit is '1' to enable the SPD datapath forwarding. */
25572 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_FWD_ENABLE	UINT32_C(0x1)
25573 	/* Set this bit is '1' to disable the SPD datapath forwarding. */
25574 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_FWD_DISABLE	UINT32_C(0x2)
25575 	/*
25576 	 * Set this bit is '1' to enable the SPD datapath checksum
25577 	 * feature.
25578 	 */
25579 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_CSUM_ENABLE	UINT32_C(0x4)
25580 	/*
25581 	 * Set this bit is '1' to disable the SPD datapath checksum
25582 	 * feature.
25583 	 */
25584 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_CSUM_DISABLE	UINT32_C(0x8)
25585 	/*
25586 	 * Set this bit is '1' to enable the SPD datapath debug
25587 	 * feature.
25588 	 */
25589 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_DBG_ENABLE	UINT32_C(0x10)
25590 	/*
25591 	 * Set this bit is '1' to disable the SPD datapath debug
25592 	 * feature.
25593 	 */
25594 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_DBG_DISABLE	UINT32_C(0x20)
25595 	uint32_t	enables;
25596 	/*
25597 	 * This bit must be '1' for the ethertype field to be
25598 	 * configured.
25599 	 */
25600 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_ETHERTYPE		UINT32_C(0x1)
25601 	/*
25602 	 * This bit must be '1' for the hash_mode_flags field to be
25603 	 * configured.
25604 	 */
25605 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_HASH_MODE_FLAGS	UINT32_C(0x2)
25606 	/*
25607 	 * This bit must be '1' for the hash_type field to be
25608 	 * configured.
25609 	 */
25610 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_HASH_TYPE		UINT32_C(0x4)
25611 	/*
25612 	 * This bit must be '1' for the ring_tbl_addr field to be
25613 	 * configured.
25614 	 */
25615 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_RING_TBL_ADDR	UINT32_C(0x8)
25616 	/*
25617 	 * This bit must be '1' for the hash_key_tbl_addr field to be
25618 	 * configured.
25619 	 */
25620 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_HASH_KEY_TBL_ADDR	UINT32_C(0x10)
25621 	/*
25622 	 * Ethertype value used in the encapsulated SPD packet header.
25623 	 * The user must choose a value that is not conflicting with
25624 	 * publicly defined ethertype values. By default, the ethertype
25625 	 * value of 0xffff is used if there is no user specified value.
25626 	 */
25627 	uint16_t	ethertype;
25628 	/* Flags to specify different RSS hash modes. */
25629 	uint8_t	hash_mode_flags;
25630 	/*
25631 	 * When this bit is '1', it indicates using current RSS
25632 	 * hash mode setting configured in the device.
25633 	 */
25634 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT	UINT32_C(0x1)
25635 	/*
25636 	 * When this bit is '1', it indicates requesting support of
25637 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
25638 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
25639 	 * packets, the RSS hash is computed over the normal
25640 	 * src/dest l3 and src/dest l4 headers.
25641 	 */
25642 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_4	UINT32_C(0x2)
25643 	/*
25644 	 * When this bit is '1', it indicates requesting support of
25645 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
25646 	 * tunnel packets. For none-tunnel packets, the RSS hash is
25647 	 * computed over the normal src/dest l3 headers.
25648 	 */
25649 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_2	UINT32_C(0x4)
25650 	/*
25651 	 * When this bit is '1', it indicates requesting support of
25652 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
25653 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
25654 	 * packets, the RSS hash is computed over the normal
25655 	 * src/dest l3 and src/dest l4 headers.
25656 	 */
25657 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_4	UINT32_C(0x8)
25658 	/*
25659 	 * When this bit is '1', it indicates requesting support of
25660 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
25661 	 * tunnel packets. For none-tunnel packets, the RSS hash is
25662 	 * computed over the normal src/dest l3 headers.
25663 	 */
25664 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_2	UINT32_C(0x10)
25665 	uint8_t	unused_1;
25666 	uint32_t	hash_type;
25667 	/*
25668 	 * When this bit is '1', the RSS hash shall be computed
25669 	 * over source and destination IPv4 addresses of IPv4
25670 	 * packets.
25671 	 */
25672 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_IPV4	UINT32_C(0x1)
25673 	/*
25674 	 * When this bit is '1', the RSS hash shall be computed
25675 	 * over source/destination IPv4 addresses and
25676 	 * source/destination ports of TCP/IPv4 packets.
25677 	 */
25678 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_TCP_IPV4	UINT32_C(0x2)
25679 	/*
25680 	 * When this bit is '1', the RSS hash shall be computed
25681 	 * over source/destination IPv4 addresses and
25682 	 * source/destination ports of UDP/IPv4 packets.
25683 	 */
25684 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_UDP_IPV4	UINT32_C(0x4)
25685 	/*
25686 	 * When this bit is '1', the RSS hash shall be computed
25687 	 * over source and destination IPv4 addresses of IPv6
25688 	 * packets.
25689 	 */
25690 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_IPV6	UINT32_C(0x8)
25691 	/*
25692 	 * When this bit is '1', the RSS hash shall be computed
25693 	 * over source/destination IPv6 addresses and
25694 	 * source/destination ports of TCP/IPv6 packets.
25695 	 */
25696 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_TCP_IPV6	UINT32_C(0x10)
25697 	/*
25698 	 * When this bit is '1', the RSS hash shall be computed
25699 	 * over source/destination IPv6 addresses and
25700 	 * source/destination ports of UDP/IPv6 packets.
25701 	 */
25702 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_UDP_IPV6	UINT32_C(0x20)
25703 	/* This is the address for rss ring group table */
25704 	uint64_t	ring_grp_tbl_addr;
25705 	/* This is the address for rss hash key table */
25706 	uint64_t	hash_key_tbl_addr;
25707 } hwrm_func_spd_cfg_input_t, *phwrm_func_spd_cfg_input_t;
25708 
25709 /* hwrm_func_spd_cfg_output (size:128b/16B) */
25710 
25711 typedef struct hwrm_func_spd_cfg_output {
25712 	/* The specific error status for the command. */
25713 	uint16_t	error_code;
25714 	/* The HWRM command request type. */
25715 	uint16_t	req_type;
25716 	/* The sequence ID from the original command. */
25717 	uint16_t	seq_id;
25718 	/* The length of the response data in number of bytes. */
25719 	uint16_t	resp_len;
25720 	uint8_t	unused_0[7];
25721 	/*
25722 	 * This field is used in Output records to indicate that the output
25723 	 * is completely written to RAM. This field should be read as '1'
25724 	 * to indicate that the output has been completely written. When
25725 	 * writing a command completion or response to an internal processor,
25726 	 * the order of writes has to be such that this field is written last.
25727 	 */
25728 	uint8_t	valid;
25729 } hwrm_func_spd_cfg_output_t, *phwrm_func_spd_cfg_output_t;
25730 
25731 /**********************
25732  * hwrm_func_spd_qcfg *
25733  **********************/
25734 
25735 
25736 /* hwrm_func_spd_qcfg_input (size:128b/16B) */
25737 
25738 typedef struct hwrm_func_spd_qcfg_input {
25739 	/* The HWRM command request type. */
25740 	uint16_t	req_type;
25741 	/*
25742 	 * The completion ring to send the completion event on. This should
25743 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25744 	 */
25745 	uint16_t	cmpl_ring;
25746 	/*
25747 	 * The sequence ID is used by the driver for tracking multiple
25748 	 * commands. This ID is treated as opaque data by the firmware and
25749 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25750 	 */
25751 	uint16_t	seq_id;
25752 	/*
25753 	 * The target ID of the command:
25754 	 * * 0x0-0xFFF8 - The function ID
25755 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25756 	 * * 0xFFFD - Reserved for user-space HWRM interface
25757 	 * * 0xFFFF - HWRM
25758 	 */
25759 	uint16_t	target_id;
25760 	/*
25761 	 * A physical address pointer pointing to a host buffer that the
25762 	 * command's response data will be written. This can be either a host
25763 	 * physical address (HPA) or a guest physical address (GPA) and must
25764 	 * point to a physically contiguous block of memory.
25765 	 */
25766 	uint64_t	resp_addr;
25767 } hwrm_func_spd_qcfg_input_t, *phwrm_func_spd_qcfg_input_t;
25768 
25769 /* hwrm_func_spd_qcfg_output (size:512b/64B) */
25770 
25771 typedef struct hwrm_func_spd_qcfg_output {
25772 	/* The specific error status for the command. */
25773 	uint16_t	error_code;
25774 	/* The HWRM command request type. */
25775 	uint16_t	req_type;
25776 	/* The sequence ID from the original command. */
25777 	uint16_t	seq_id;
25778 	/* The length of the response data in number of bytes. */
25779 	uint16_t	resp_len;
25780 	uint32_t	flags;
25781 	/*
25782 	 * The SPD datapath forwarding is currently enabled when this
25783 	 * flag is set to '1'.
25784 	 */
25785 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_FLAGS_FWD_ENABLED	UINT32_C(0x1)
25786 	/*
25787 	 * The SPD datapath checksum feature is currently enabled when
25788 	 * this flag is set to '1'.
25789 	 */
25790 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_FLAGS_CSUM_ENABLED	UINT32_C(0x2)
25791 	/*
25792 	 * The SPD datapath debug feature is currently enabled when
25793 	 * this flag is set to '1'.
25794 	 */
25795 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_FLAGS_DBG_ENABLED	UINT32_C(0x4)
25796 	uint32_t	hash_type;
25797 	/*
25798 	 * When this bit is '1', the RSS hash shall be computed
25799 	 * over source and destination IPv4 addresses of IPv4
25800 	 * packets.
25801 	 */
25802 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_IPV4	UINT32_C(0x1)
25803 	/*
25804 	 * When this bit is '1', the RSS hash shall be computed
25805 	 * over source/destination IPv4 addresses and
25806 	 * source/destination ports of TCP/IPv4 packets.
25807 	 */
25808 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_TCP_IPV4	UINT32_C(0x2)
25809 	/*
25810 	 * When this bit is '1', the RSS hash shall be computed
25811 	 * over source/destination IPv4 addresses and
25812 	 * source/destination ports of UDP/IPv4 packets.
25813 	 */
25814 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_UDP_IPV4	UINT32_C(0x4)
25815 	/*
25816 	 * When this bit is '1', the RSS hash shall be computed
25817 	 * over source and destination IPv4 addresses of IPv6
25818 	 * packets.
25819 	 */
25820 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_IPV6	UINT32_C(0x8)
25821 	/*
25822 	 * When this bit is '1', the RSS hash shall be computed
25823 	 * over source/destination IPv6 addresses and
25824 	 * source/destination ports of TCP/IPv6 packets.
25825 	 */
25826 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_TCP_IPV6	UINT32_C(0x10)
25827 	/*
25828 	 * When this bit is '1', the RSS hash shall be computed
25829 	 * over source/destination IPv6 addresses and
25830 	 * source/destination ports of UDP/IPv6 packets.
25831 	 */
25832 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_UDP_IPV6	UINT32_C(0x20)
25833 	/* This is the value of rss hash key */
25834 	uint32_t	hash_key[10];
25835 	/* Flags to specify different RSS hash modes. */
25836 	uint8_t	hash_mode_flags;
25837 	/*
25838 	 * When this bit is '1', it indicates using current RSS
25839 	 * hash mode setting configured in the device.
25840 	 */
25841 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_DEFAULT	UINT32_C(0x1)
25842 	/*
25843 	 * When this bit is '1', it indicates requesting support of
25844 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
25845 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
25846 	 * packets, the RSS hash is computed over the normal
25847 	 * src/dest l3 and src/dest l4 headers.
25848 	 */
25849 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_4	UINT32_C(0x2)
25850 	/*
25851 	 * When this bit is '1', it indicates requesting support of
25852 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
25853 	 * tunnel packets. For none-tunnel packets, the RSS hash is
25854 	 * computed over the normal src/dest l3 headers.
25855 	 */
25856 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_2	UINT32_C(0x4)
25857 	/*
25858 	 * When this bit is '1', it indicates requesting support of
25859 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
25860 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
25861 	 * packets, the RSS hash is computed over the normal
25862 	 * src/dest l3 and src/dest l4 headers.
25863 	 */
25864 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_4	UINT32_C(0x8)
25865 	/*
25866 	 * When this bit is '1', it indicates requesting support of
25867 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
25868 	 * tunnel packets. For none-tunnel packets, the RSS hash is
25869 	 * computed over the normal src/dest l3 headers.
25870 	 */
25871 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_2	UINT32_C(0x10)
25872 	uint8_t	unused_1;
25873 	/*
25874 	 * Ethertype value used in the encapsulated SPD packet header.
25875 	 * The user must choose a value that is not conflicting with
25876 	 * publicly defined ethertype values. By default, the ethertype
25877 	 * value of 0xffff is used if there is no user specified value.
25878 	 */
25879 	uint16_t	ethertype;
25880 	uint8_t	unused_2[3];
25881 	/*
25882 	 * This field is used in Output records to indicate that the output
25883 	 * is completely written to RAM. This field should be read as '1'
25884 	 * to indicate that the output has been completely written. When
25885 	 * writing a command completion or response to an internal processor,
25886 	 * the order of writes has to be such that this field is written last.
25887 	 */
25888 	uint8_t	valid;
25889 } hwrm_func_spd_qcfg_output_t, *phwrm_func_spd_qcfg_output_t;
25890 
25891 /*********************
25892  * hwrm_port_phy_cfg *
25893  *********************/
25894 
25895 
25896 /* hwrm_port_phy_cfg_input (size:512b/64B) */
25897 
25898 typedef struct hwrm_port_phy_cfg_input {
25899 	/* The HWRM command request type. */
25900 	uint16_t	req_type;
25901 	/*
25902 	 * The completion ring to send the completion event on. This should
25903 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25904 	 */
25905 	uint16_t	cmpl_ring;
25906 	/*
25907 	 * The sequence ID is used by the driver for tracking multiple
25908 	 * commands. This ID is treated as opaque data by the firmware and
25909 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25910 	 */
25911 	uint16_t	seq_id;
25912 	/*
25913 	 * The target ID of the command:
25914 	 * * 0x0-0xFFF8 - The function ID
25915 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25916 	 * * 0xFFFD - Reserved for user-space HWRM interface
25917 	 * * 0xFFFF - HWRM
25918 	 */
25919 	uint16_t	target_id;
25920 	/*
25921 	 * A physical address pointer pointing to a host buffer that the
25922 	 * command's response data will be written. This can be either a host
25923 	 * physical address (HPA) or a guest physical address (GPA) and must
25924 	 * point to a physically contiguous block of memory.
25925 	 */
25926 	uint64_t	resp_addr;
25927 	uint32_t	flags;
25928 	/*
25929 	 * When this bit is set to '1', the PHY for the port shall
25930 	 * be reset.
25931 	 *
25932 	 * # If this bit is set to 1, then the HWRM shall reset the
25933 	 * PHY after applying PHY configuration changes specified
25934 	 * in this command.
25935 	 * # In order to guarantee that PHY configuration changes
25936 	 * specified in this command take effect, the HWRM
25937 	 * client should set this flag to 1.
25938 	 * # If this bit is not set to 1, then the HWRM may reset
25939 	 * the PHY depending on the current PHY configuration and
25940 	 * settings specified in this command.
25941 	 */
25942 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY		UINT32_C(0x1)
25943 	/* deprecated bit. Do not use!!! */
25944 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_DEPRECATED		UINT32_C(0x2)
25945 	/*
25946 	 * When this bit is set to '1', and the force_pam4_link_speed
25947 	 * bit in the 'enables' field is '0', the link shall be forced
25948 	 * to the force_link_speed value.
25949 	 *
25950 	 * When this bit is set to '1', and the force_pam4_link_speed
25951 	 * bit in the 'enables' field is '1', the link shall be forced
25952 	 * to the force_pam4_link_speed value.
25953 	 *
25954 	 * When this bit is set to '1', the HWRM client should
25955 	 * not enable any of the auto negotiation related
25956 	 * fields represented by auto_XXX fields in this command.
25957 	 * When this bit is set to '1' and the HWRM client has
25958 	 * enabled a auto_XXX field in this command, then the
25959 	 * HWRM shall ignore the enabled auto_XXX field.
25960 	 *
25961 	 * When this bit is set to zero, the link
25962 	 * shall be allowed to autoneg.
25963 	 */
25964 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE			UINT32_C(0x4)
25965 	/*
25966 	 * When this bit is set to '1', the auto-negotiation process
25967 	 * shall be restarted on the link.
25968 	 */
25969 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG		UINT32_C(0x8)
25970 	/*
25971 	 * When this bit is set to '1', Energy Efficient Ethernet
25972 	 * (EEE) is requested to be enabled on this link.
25973 	 * If EEE is not supported on this port, then this flag
25974 	 * shall be ignored by the HWRM.
25975 	 */
25976 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_ENABLE		UINT32_C(0x10)
25977 	/*
25978 	 * When this bit is set to '1', Energy Efficient Ethernet
25979 	 * (EEE) is requested to be disabled on this link.
25980 	 * If EEE is not supported on this port, then this flag
25981 	 * shall be ignored by the HWRM.
25982 	 */
25983 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_DISABLE		UINT32_C(0x20)
25984 	/*
25985 	 * When this bit is set to '1' and EEE is enabled on this
25986 	 * link, then TX LPI is requested to be enabled on the link.
25987 	 * If EEE is not supported on this port, then this flag
25988 	 * shall be ignored by the HWRM.
25989 	 * If EEE is disabled on this port, then this flag shall be
25990 	 * ignored by the HWRM.
25991 	 */
25992 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_TX_LPI_ENABLE	UINT32_C(0x40)
25993 	/*
25994 	 * When this bit is set to '1' and EEE is enabled on this
25995 	 * link, then TX LPI is requested to be disabled on the link.
25996 	 * If EEE is not supported on this port, then this flag
25997 	 * shall be ignored by the HWRM.
25998 	 * If EEE is disabled on this port, then this flag shall be
25999 	 * ignored by the HWRM.
26000 	 */
26001 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_TX_LPI_DISABLE	UINT32_C(0x80)
26002 	/*
26003 	 * When set to 1, then the HWRM shall enable FEC autonegotiation
26004 	 * on this port if supported. When enabled, at least one of the
26005 	 * FEC modes must be advertised by enabling the fec_clause_74_enable,
26006 	 * fec_clause_91_enable, fec_rs544_1xn_enable, fec_rs544_ieee_enable,
26007 	 * fec_rs272_1xn_enable, or fec_rs272_ieee_enable flag. If none
26008 	 * of the FEC mode is currently enabled, the HWRM shall choose
26009 	 * a default advertisement setting.
26010 	 * The default advertisement setting can be queried by calling
26011 	 * hwrm_port_phy_qcfg. Note that the link speed must be
26012 	 * in autonegotiation mode for FEC autonegotiation to take effect.
26013 	 * When set to 0, then this flag shall be ignored.
26014 	 * If FEC autonegotiation is not supported, then the HWRM shall
26015 	 * ignore this flag.
26016 	 */
26017 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_AUTONEG_ENABLE	UINT32_C(0x100)
26018 	/*
26019 	 * When set to 1, then the HWRM shall disable FEC autonegotiation
26020 	 * on this port and use forced FEC mode. In forced FEC mode, one
26021 	 * or more FEC forced settings under the same clause can be set.
26022 	 * When set to 0, then this flag shall be ignored.
26023 	 * If FEC autonegotiation is not supported, then the HWRM shall
26024 	 * ignore this flag.
26025 	 */
26026 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_AUTONEG_DISABLE	UINT32_C(0x200)
26027 	/*
26028 	 * When set to 1, then the HWRM shall enable FEC CLAUSE 74 (Fire
26029 	 * Code) on this port if supported, by advertising FEC CLAUSE 74 if
26030 	 * FEC autonegotiation is enabled or force enabled otherwise.
26031 	 * When set to 0, then this flag shall be ignored.
26032 	 * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this
26033 	 * flag.
26034 	 */
26035 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE74_ENABLE	UINT32_C(0x400)
26036 	/*
26037 	 * When set to 1, then the HWRM shall disable FEC CLAUSE 74 (Fire
26038 	 * Code) on this port if supported, by not advertising FEC CLAUSE 74
26039 	 * if FEC autonegotiation is enabled or force disabled otherwise.
26040 	 * When set to 0, then this flag shall be ignored.
26041 	 * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this
26042 	 * flag.
26043 	 */
26044 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE74_DISABLE	UINT32_C(0x800)
26045 	/*
26046 	 * When set to 1, then the HWRM shall enable FEC CLAUSE 91
26047 	 * (Reed Solomon RS(528,514) for NRZ) on this port if supported,
26048 	 * by advertising FEC RS(528,514) if FEC autonegotiation is enabled
26049 	 * or force enabled otherwise. In forced FEC mode, this flag
26050 	 * will only take effect if the speed is NRZ. Additional
26051 	 * RS544 or RS272 flags (also under clause 91) may be set for PAM4
26052 	 * in forced FEC mode.
26053 	 * When set to 0, then this flag shall be ignored.
26054 	 * If FEC RS(528,514) is not supported, then the HWRM shall ignore
26055 	 * this flag.
26056 	 */
26057 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE91_ENABLE	UINT32_C(0x1000)
26058 	/*
26059 	 * When set to 1, then the HWRM shall disable FEC CLAUSE 91
26060 	 * (Reed Solomon RS(528,514) for NRZ) on this port if supported, by
26061 	 * not advertising RS(528,514) if FEC autonegotiation is enabled or
26062 	 * force disabled otherwise. When set to 0, then this flag shall be
26063 	 * ignored. If FEC RS(528,514) is not supported, then the HWRM
26064 	 * shall ignore this flag.
26065 	 */
26066 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE91_DISABLE	UINT32_C(0x2000)
26067 	/*
26068 	 * When this bit is set to '1', the link shall be forced to
26069 	 * be taken down.
26070 	 *
26071 	 * # When this bit is set to '1", all other
26072 	 * command input settings related to the link speed shall
26073 	 * be ignored.
26074 	 * Once the link state is forced down, it can be
26075 	 * explicitly cleared from that state by setting this flag
26076 	 * to '0'.
26077 	 * # If this flag is set to '0', then the link shall be
26078 	 * cleared from forced down state if the link is in forced
26079 	 * down state.
26080 	 * There may be conditions (e.g. out-of-band or sideband
26081 	 * configuration changes for the link) outside the scope
26082 	 * of the HWRM implementation that may clear forced down
26083 	 * link state.
26084 	 */
26085 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN		UINT32_C(0x4000)
26086 	/*
26087 	 * When set to 1, then the HWRM shall enable FEC RS544_1XN
26088 	 * on this port if supported, by advertising FEC RS544_1XN if
26089 	 * FEC autonegotiation is enabled or force enabled otherwise.
26090 	 * In forced mode, this flag will only take effect if the speed is
26091 	 * PAM4. If this flag and fec_rs544_ieee_enable are set, the
26092 	 * HWRM shall choose one of the RS544 modes.
26093 	 * When set to 0, then this flag shall be ignored.
26094 	 * If FEC RS544_1XN is not supported, then the HWRM shall ignore this
26095 	 * flag.
26096 	 */
26097 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_ENABLE	UINT32_C(0x8000)
26098 	/*
26099 	 * When set to 1, then the HWRM shall disable FEC RS544_1XN
26100 	 * on this port if supported, by not advertising FEC RS544_1XN if
26101 	 * FEC autonegotiation is enabled or force disabled otherwise.
26102 	 * When set to 0, then this flag shall be ignored.
26103 	 * If FEC RS544_1XN is not supported, then the HWRM shall ignore
26104 	 * this flag.
26105 	 */
26106 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_DISABLE	UINT32_C(0x10000)
26107 	/*
26108 	 * When set to 1, then the HWRM shall enable FEC RS(544,514)
26109 	 * on this port if supported, by advertising FEC RS(544,514) if
26110 	 * FEC autonegotiation is enabled or force enabled otherwise.
26111 	 * In forced mode, this flag will only take effect if the speed is
26112 	 * PAM4. If this flag and fec_rs544_1xn_enable are set, the
26113 	 * HWRM shall choose one of the RS544 modes.
26114 	 * When set to 0, then this flag shall be ignored.
26115 	 * If FEC RS(544,514) is not supported, then the HWRM shall ignore
26116 	 * this flag.
26117 	 */
26118 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_IEEE_ENABLE	UINT32_C(0x20000)
26119 	/*
26120 	 * When set to 1, then the HWRM shall disable FEC RS(544,514)
26121 	 * on this port if supported, by not advertising FEC RS(544,514) if
26122 	 * FEC autonegotiation is enabled or force disabled otherwise.
26123 	 * When set to 0, then this flag shall be ignored.
26124 	 * If FEC RS(544,514) is not supported, then the HWRM shall ignore
26125 	 * this flag.
26126 	 */
26127 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_IEEE_DISABLE	UINT32_C(0x40000)
26128 	/*
26129 	 * When set to 1, then the HWRM shall enable FEC RS272_1XN
26130 	 * on this port if supported, by advertising FEC RS272_1XN if
26131 	 * FEC autonegotiation is enabled or force enabled otherwise.
26132 	 * In forced mode, this flag will only take effect if the speed is
26133 	 * PAM4. If this flag and fec_rs272_ieee_enable are set, the
26134 	 * HWRM shall choose one of the RS272 modes. Note that RS272
26135 	 * and RS544 modes cannot be set at the same time in forced FEC mode.
26136 	 * When set to 0, then this flag shall be ignored.
26137 	 * If FEC RS272_1XN is not supported, then the HWRM shall ignore this
26138 	 * flag.
26139 	 */
26140 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_1XN_ENABLE	UINT32_C(0x80000)
26141 	/*
26142 	 * When set to 1, then the HWRM shall disable FEC RS272_1XN
26143 	 * on this port if supported, by not advertising FEC RS272_1XN if
26144 	 * FEC autonegotiation is enabled or force disabled otherwise.
26145 	 * When set to 0, then this flag shall be ignored.
26146 	 * If FEC RS272_1XN is not supported, then the HWRM shall ignore
26147 	 * this flag.
26148 	 */
26149 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_1XN_DISABLE	UINT32_C(0x100000)
26150 	/*
26151 	 * When set to 1, then the HWRM shall enable FEC RS(272,257)
26152 	 * on this port if supported, by advertising FEC RS(272,257) if
26153 	 * FEC autonegotiation is enabled or force enabled otherwise.
26154 	 * In forced mode, this flag will only take effect if the speed is
26155 	 * PAM4. If this flag and fec_rs272_1xn_enable are set, the
26156 	 * HWRM shall choose one of the RS272 modes. Note that RS272
26157 	 * and RS544 modes cannot be set at the same time in forced FEC mode.
26158 	 * When set to 0, then this flag shall be ignored.
26159 	 * If FEC RS(272,257) is not supported, then the HWRM shall ignore
26160 	 * this flag.
26161 	 */
26162 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_IEEE_ENABLE	UINT32_C(0x200000)
26163 	/*
26164 	 * When set to 1, then the HWRM shall disable FEC RS(272,257)
26165 	 * on this port if supported, by not advertising FEC RS(272,257) if
26166 	 * FEC autonegotiation is enabled or force disabled otherwise.
26167 	 * When set to 0, then this flag shall be ignored.
26168 	 * If FEC RS(272,257) is not supported, then the HWRM shall ignore
26169 	 * this flag.
26170 	 */
26171 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_IEEE_DISABLE	UINT32_C(0x400000)
26172 	uint32_t	enables;
26173 	/*
26174 	 * This bit must be '1' for the auto_mode field to be
26175 	 * configured.
26176 	 */
26177 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_MODE			UINT32_C(0x1)
26178 	/*
26179 	 * This bit must be '1' for the auto_duplex field to be
26180 	 * configured.
26181 	 */
26182 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_DUPLEX		UINT32_C(0x2)
26183 	/*
26184 	 * This bit must be '1' for the auto_pause field to be
26185 	 * configured.
26186 	 */
26187 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_PAUSE			UINT32_C(0x4)
26188 	/*
26189 	 * This bit must be '1' for the auto_link_speed field to be
26190 	 * configured.
26191 	 */
26192 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED		UINT32_C(0x8)
26193 	/*
26194 	 * This bit must be '1' for the auto_link_speed_mask field to be
26195 	 * configured.
26196 	 */
26197 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK	UINT32_C(0x10)
26198 	/*
26199 	 * This bit must be '1' for the wirespeed field to be
26200 	 * configured.
26201 	 */
26202 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_WIRESPEED			UINT32_C(0x20)
26203 	/*
26204 	 * This bit must be '1' for the lpbk field to be
26205 	 * configured.
26206 	 */
26207 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_LPBK			UINT32_C(0x40)
26208 	/*
26209 	 * This bit must be '1' for the preemphasis field to be
26210 	 * configured.
26211 	 */
26212 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_PREEMPHASIS		UINT32_C(0x80)
26213 	/*
26214 	 * This bit must be '1' for the force_pause field to be
26215 	 * configured.
26216 	 */
26217 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_PAUSE		UINT32_C(0x100)
26218 	/*
26219 	 * This bit must be '1' for the eee_link_speed_mask field to be
26220 	 * configured.
26221 	 */
26222 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_EEE_LINK_SPEED_MASK	UINT32_C(0x200)
26223 	/*
26224 	 * This bit must be '1' for the tx_lpi_timer field to be
26225 	 * configured.
26226 	 */
26227 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_TX_LPI_TIMER		UINT32_C(0x400)
26228 	/*
26229 	 * This bit must be '1' for the force_pam4_link_speed field to be
26230 	 * configured.
26231 	 */
26232 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_PAM4_LINK_SPEED	UINT32_C(0x800)
26233 	/*
26234 	 * This bit must be '1' for the auto_pam4_link_speed_mask field to
26235 	 * be configured.
26236 	 */
26237 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_PAM4_LINK_SPEED_MASK	UINT32_C(0x1000)
26238 	/*
26239 	 * This bit must be '1' for the force_link_speeds2 field to be
26240 	 * configured.
26241 	 */
26242 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_LINK_SPEEDS2		UINT32_C(0x2000)
26243 	/*
26244 	 * This bit must be '1' for the auto_link_speeds2_mask field to
26245 	 * be configured.
26246 	 */
26247 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEEDS2_MASK	UINT32_C(0x4000)
26248 	/* Port ID of port that is to be configured. */
26249 	uint16_t	port_id;
26250 	/*
26251 	 * This is the speed that will be used if the force
26252 	 * bit is '1'. If unsupported speed is selected, an error
26253 	 * will be generated.
26254 	 */
26255 	uint16_t	force_link_speed;
26256 	/* 100Mb link speed */
26257 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100MB UINT32_C(0x1)
26258 	/* 1Gb link speed */
26259 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_1GB   UINT32_C(0xa)
26260 	/* 2Gb link speed */
26261 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_2GB   UINT32_C(0x14)
26262 	/* 25Gb link speed */
26263 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_2_5GB UINT32_C(0x19)
26264 	/* 10Gb link speed */
26265 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10GB  UINT32_C(0x64)
26266 	/* 20Mb link speed */
26267 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_20GB  UINT32_C(0xc8)
26268 	/* 25Gb link speed */
26269 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_25GB  UINT32_C(0xfa)
26270 	/* 40Gb link speed */
26271 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB  UINT32_C(0x190)
26272 	/* 50Gb link speed */
26273 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB  UINT32_C(0x1f4)
26274 	/* 100Gb link speed */
26275 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB UINT32_C(0x3e8)
26276 	/* 10Mb link speed */
26277 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10MB  UINT32_C(0xffff)
26278 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_LAST HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10MB
26279 	/*
26280 	 * This value is used to identify what autoneg mode is
26281 	 * used when the link speed is not being forced.
26282 	 */
26283 	uint8_t	auto_mode;
26284 	/* Disable autoneg or autoneg disabled. No speeds are selected. */
26285 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_NONE	UINT32_C(0x0)
26286 	/* Select all possible speeds for autoneg mode. */
26287 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ALL_SPEEDS   UINT32_C(0x1)
26288 	/*
26289 	 * Select only the auto_link_speed speed for autoneg mode. This mode
26290 	 * has been DEPRECATED. An HWRM client should not use this mode.
26291 	 */
26292 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ONE_SPEED	UINT32_C(0x2)
26293 	/*
26294 	 * Select the auto_link_speed or any speed below that speed for
26295 	 * autoneg. This mode has been DEPRECATED. An HWRM client should not
26296 	 * use this mode.
26297 	 */
26298 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3)
26299 	/*
26300 	 * Select the speeds based on the corresponding link speed mask
26301 	 * values that are provided. The included speeds are specified in the
26302 	 * auto_link_speed and auto_pam4_link_speed fields.
26303 	 */
26304 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK   UINT32_C(0x4)
26305 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_LAST	HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK
26306 	/*
26307 	 * This is the duplex setting that will be used if the autoneg_mode
26308 	 * is "one_speed" or "one_or_below".
26309 	 */
26310 	uint8_t	auto_duplex;
26311 	/* Half Duplex will be requested. */
26312 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF UINT32_C(0x0)
26313 	/* Full duplex will be requested. */
26314 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_FULL UINT32_C(0x1)
26315 	/* Both Half and Full duplex will be requested. */
26316 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH UINT32_C(0x2)
26317 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_LAST HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH
26318 	/*
26319 	 * This value is used to configure the pause that will be
26320 	 * used for autonegotiation.
26321 	 * Add text on the usage of auto_pause and force_pause.
26322 	 */
26323 	uint8_t	auto_pause;
26324 	/*
26325 	 * When this bit is '1', Generation of tx pause messages
26326 	 * has been requested. Disabled otherwise.
26327 	 */
26328 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_TX		UINT32_C(0x1)
26329 	/*
26330 	 * When this bit is '1', Reception of rx pause messages
26331 	 * has been requested. Disabled otherwise.
26332 	 */
26333 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_RX		UINT32_C(0x2)
26334 	/*
26335 	 * When set to 1, the advertisement of pause is enabled.
26336 	 *
26337 	 * # When the auto_mode is not set to none and this flag is
26338 	 * set to 1, then the auto_pause bits on this port are being
26339 	 * advertised and autoneg pause results are being interpreted.
26340 	 * # When the auto_mode is not set to none and this
26341 	 * flag is set to 0, the pause is forced as indicated in
26342 	 * force_pause, and also advertised as auto_pause bits, but
26343 	 * the autoneg results are not interpreted since the pause
26344 	 * configuration is being forced.
26345 	 * # When the auto_mode is set to none and this flag is set to
26346 	 * 1, auto_pause bits should be ignored and should be set to 0.
26347 	 */
26348 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_AUTONEG_PAUSE	UINT32_C(0x4)
26349 	/*
26350 	 * This field is only used by management firmware to communicate with
26351 	 * core firmware regarding phy_port_cfg.
26352 	 * It mainly used to notify core firmware that management firmware is
26353 	 * using port for NCSI over RMII communication or not.
26354 	 */
26355 	uint8_t	mgmt_flag;
26356 	/*
26357 	 * Bit denoting if management firmware is using the link for
26358 	 * NCSI over RMII communication.
26359 	 * When set to 1, management firmware is no longer using the given
26360 	 * port.
26361 	 * When set to 0, management firmware is using the given port.
26362 	 */
26363 	#define HWRM_PORT_PHY_CFG_INPUT_MGMT_FLAG_LINK_RELEASE	UINT32_C(0x1)
26364 	/*
26365 	 * Validity bit, set to 1 to indicate other bits in mgmt_flags are
26366 	 * valid.
26367 	 */
26368 	#define HWRM_PORT_PHY_CFG_INPUT_MGMT_FLAG_MGMT_VALID	UINT32_C(0x80)
26369 	/*
26370 	 * This is the speed that will be used if the autoneg_mode
26371 	 * is "one_speed" or "one_or_below". If an unsupported speed
26372 	 * is selected, an error will be generated.
26373 	 */
26374 	uint16_t	auto_link_speed;
26375 	/* 100Mb link speed */
26376 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100MB UINT32_C(0x1)
26377 	/* 1Gb link speed */
26378 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_1GB   UINT32_C(0xa)
26379 	/* 2Gb link speed */
26380 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_2GB   UINT32_C(0x14)
26381 	/* 25Gb link speed */
26382 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_2_5GB UINT32_C(0x19)
26383 	/* 10Gb link speed */
26384 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10GB  UINT32_C(0x64)
26385 	/* 20Mb link speed */
26386 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_20GB  UINT32_C(0xc8)
26387 	/* 25Gb link speed */
26388 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB  UINT32_C(0xfa)
26389 	/* 40Gb link speed */
26390 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_40GB  UINT32_C(0x190)
26391 	/* 50Gb link speed */
26392 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_50GB  UINT32_C(0x1f4)
26393 	/* 100Gb link speed */
26394 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100GB UINT32_C(0x3e8)
26395 	/* 10Mb link speed */
26396 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10MB  UINT32_C(0xffff)
26397 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_LAST HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10MB
26398 	/*
26399 	 * This is a mask of link speeds that will be used if
26400 	 * autoneg_mode is "mask". If unsupported speed is enabled
26401 	 * an error will be generated.
26402 	 */
26403 	uint16_t	auto_link_speed_mask;
26404 	/* 100Mb link speed (Half-duplex) */
26405 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100MBHD	UINT32_C(0x1)
26406 	/* 100Mb link speed (Full-duplex) */
26407 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100MB	UINT32_C(0x2)
26408 	/* 1Gb link speed (Half-duplex) */
26409 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_1GBHD	UINT32_C(0x4)
26410 	/* 1Gb link speed (Full-duplex) */
26411 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_1GB	UINT32_C(0x8)
26412 	/* 2Gb link speed */
26413 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_2GB	UINT32_C(0x10)
26414 	/* 25Gb link speed */
26415 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_2_5GB	UINT32_C(0x20)
26416 	/* 10Gb link speed */
26417 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10GB	UINT32_C(0x40)
26418 	/* 20Gb link speed */
26419 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_20GB	UINT32_C(0x80)
26420 	/* 25Gb link speed */
26421 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_25GB	UINT32_C(0x100)
26422 	/* 40Gb link speed */
26423 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_40GB	UINT32_C(0x200)
26424 	/* 50Gb link speed */
26425 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_50GB	UINT32_C(0x400)
26426 	/* 100Gb link speed */
26427 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100GB	UINT32_C(0x800)
26428 	/* 10Mb link speed (Half-duplex) */
26429 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10MBHD	UINT32_C(0x1000)
26430 	/* 10Mb link speed (Full-duplex) */
26431 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10MB	UINT32_C(0x2000)
26432 	/* This value controls the wirespeed feature. */
26433 	uint8_t	wirespeed;
26434 	/* Wirespeed feature is disabled. */
26435 	#define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_OFF UINT32_C(0x0)
26436 	/* Wirespeed feature is enabled. */
26437 	#define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_ON  UINT32_C(0x1)
26438 	#define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_LAST HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_ON
26439 	/* This value controls the loopback setting for the PHY. */
26440 	uint8_t	lpbk;
26441 	/* No loopback is selected. Normal operation. */
26442 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_NONE	UINT32_C(0x0)
26443 	/*
26444 	 * The HW will be configured with local loopback such that
26445 	 * host data is sent back to the host without modification.
26446 	 */
26447 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_LOCAL	UINT32_C(0x1)
26448 	/*
26449 	 * The HW will be configured with remote loopback such that
26450 	 * port logic will send packets back out the transmitter that
26451 	 * are received.
26452 	 */
26453 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_REMOTE   UINT32_C(0x2)
26454 	/*
26455 	 * The HW will be configured with external loopback such that
26456 	 * host data is sent on the transmitter and based on the external
26457 	 * loopback connection the data will be received without
26458 	 * modification.
26459 	 */
26460 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_EXTERNAL UINT32_C(0x3)
26461 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_LAST	HWRM_PORT_PHY_CFG_INPUT_LPBK_EXTERNAL
26462 	/*
26463 	 * This value is used to configure the pause that will be
26464 	 * used for force mode.
26465 	 */
26466 	uint8_t	force_pause;
26467 	/*
26468 	 * When this bit is '1', Generation of tx pause messages
26469 	 * is supported. Disabled otherwise.
26470 	 */
26471 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_TX	UINT32_C(0x1)
26472 	/*
26473 	 * When this bit is '1', Reception of rx pause messages
26474 	 * is supported. Disabled otherwise.
26475 	 */
26476 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_RX	UINT32_C(0x2)
26477 	uint8_t	unused_1;
26478 	/*
26479 	 * This value controls the pre-emphasis to be used for the
26480 	 * link. Driver should not set this value (use
26481 	 * enable.preemphasis = 0) unless driver is sure of setting.
26482 	 * Normally HWRM FW will determine proper pre-emphasis.
26483 	 */
26484 	uint32_t	preemphasis;
26485 	/*
26486 	 * Setting for link speed mask that is used to
26487 	 * advertise speeds during autonegotiation when EEE is enabled.
26488 	 * This field is valid only when EEE is enabled.
26489 	 * The speeds specified in this field shall be a subset of
26490 	 * speeds specified in auto_link_speed_mask.
26491 	 * If EEE is enabled,then at least one speed shall be provided
26492 	 * in this mask.
26493 	 */
26494 	uint16_t	eee_link_speed_mask;
26495 	/* Reserved */
26496 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD1	UINT32_C(0x1)
26497 	/* 100Mb link speed (Full-duplex) */
26498 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_100MB	UINT32_C(0x2)
26499 	/* Reserved */
26500 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD2	UINT32_C(0x4)
26501 	/* 1Gb link speed (Full-duplex) */
26502 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_1GB	UINT32_C(0x8)
26503 	/* Reserved */
26504 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD3	UINT32_C(0x10)
26505 	/* Reserved */
26506 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD4	UINT32_C(0x20)
26507 	/* 10Gb link speed */
26508 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_10GB	UINT32_C(0x40)
26509 	/*
26510 	 * This is the speed that will be used if the force and force_pam4
26511 	 * bits are '1'. If unsupported speed is selected, an error
26512 	 * will be generated.
26513 	 */
26514 	uint16_t	force_pam4_link_speed;
26515 	/* 50Gb link speed */
26516 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB  UINT32_C(0x1f4)
26517 	/* 100Gb link speed */
26518 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB UINT32_C(0x3e8)
26519 	/* 200Gb link speed */
26520 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_200GB UINT32_C(0x7d0)
26521 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_LAST HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_200GB
26522 	/*
26523 	 * Requested setting of TX LPI timer in microseconds.
26524 	 * This field is valid only when EEE is enabled and TX LPI is
26525 	 * enabled.
26526 	 */
26527 	uint32_t	tx_lpi_timer;
26528 	#define HWRM_PORT_PHY_CFG_INPUT_TX_LPI_TIMER_MASK UINT32_C(0xffffff)
26529 	#define HWRM_PORT_PHY_CFG_INPUT_TX_LPI_TIMER_SFT 0
26530 	/* This field specifies which PAM4 speeds are enabled for auto mode. */
26531 	uint16_t	auto_link_pam4_speed_mask;
26532 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_PAM4_SPEED_MASK_50G	UINT32_C(0x1)
26533 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_PAM4_SPEED_MASK_100G	UINT32_C(0x2)
26534 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_PAM4_SPEED_MASK_200G	UINT32_C(0x4)
26535 	/*
26536 	 * This is the speed that will be used if the force_link_speeds2
26537 	 * bit is '1'. If unsupported speed is selected, an error
26538 	 * will be generated.
26539 	 */
26540 	uint16_t	force_link_speeds2;
26541 	/* 1Gb link speed */
26542 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_1GB		UINT32_C(0xa)
26543 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
26544 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_10GB	UINT32_C(0x64)
26545 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
26546 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_25GB	UINT32_C(0xfa)
26547 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
26548 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_40GB	UINT32_C(0x190)
26549 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
26550 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_50GB	UINT32_C(0x1f4)
26551 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
26552 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_100GB	UINT32_C(0x3e8)
26553 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
26554 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_50GB_PAM4_56   UINT32_C(0x1f5)
26555 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
26556 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_56  UINT32_C(0x3e9)
26557 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
26558 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_56  UINT32_C(0x7d1)
26559 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
26560 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_56  UINT32_C(0xfa1)
26561 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
26562 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_112 UINT32_C(0x3ea)
26563 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
26564 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_112 UINT32_C(0x7d2)
26565 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
26566 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_112 UINT32_C(0xfa2)
26567 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
26568 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112 UINT32_C(0x1f42)
26569 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_LAST	HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112
26570 	/*
26571 	 * This is a mask of link speeds that will be used if
26572 	 * auto_link_speeds2_mask bit in the "enables" field is 1.
26573 	 * If unsupported speed is enabled an error will be generated.
26574 	 */
26575 	uint16_t	auto_link_speeds2_mask;
26576 	/* 1Gb link speed */
26577 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_1GB		UINT32_C(0x1)
26578 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
26579 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_10GB		UINT32_C(0x2)
26580 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
26581 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_25GB		UINT32_C(0x4)
26582 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
26583 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_40GB		UINT32_C(0x8)
26584 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
26585 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_50GB		UINT32_C(0x10)
26586 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
26587 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_100GB		UINT32_C(0x20)
26588 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
26589 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_50GB_PAM4_56	UINT32_C(0x40)
26590 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
26591 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_100GB_PAM4_56	UINT32_C(0x80)
26592 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
26593 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_200GB_PAM4_56	UINT32_C(0x100)
26594 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
26595 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_400GB_PAM4_56	UINT32_C(0x200)
26596 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
26597 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_100GB_PAM4_112	UINT32_C(0x400)
26598 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
26599 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_200GB_PAM4_112	UINT32_C(0x800)
26600 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
26601 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_400GB_PAM4_112	UINT32_C(0x1000)
26602 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
26603 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_800GB_PAM4_112	UINT32_C(0x2000)
26604 	uint8_t	unused_2[6];
26605 } hwrm_port_phy_cfg_input_t, *phwrm_port_phy_cfg_input_t;
26606 
26607 /* hwrm_port_phy_cfg_output (size:128b/16B) */
26608 
26609 typedef struct hwrm_port_phy_cfg_output {
26610 	/* The specific error status for the command. */
26611 	uint16_t	error_code;
26612 	/* The HWRM command request type. */
26613 	uint16_t	req_type;
26614 	/* The sequence ID from the original command. */
26615 	uint16_t	seq_id;
26616 	/* The length of the response data in number of bytes. */
26617 	uint16_t	resp_len;
26618 	uint8_t	unused_0[7];
26619 	/*
26620 	 * This field is used in Output records to indicate that the output
26621 	 * is completely written to RAM. This field should be read as '1'
26622 	 * to indicate that the output has been completely written. When
26623 	 * writing a command completion or response to an internal processor,
26624 	 * the order of writes has to be such that this field is written last.
26625 	 */
26626 	uint8_t	valid;
26627 } hwrm_port_phy_cfg_output_t, *phwrm_port_phy_cfg_output_t;
26628 
26629 /* hwrm_port_phy_cfg_cmd_err (size:64b/8B) */
26630 
26631 typedef struct hwrm_port_phy_cfg_cmd_err {
26632 	/*
26633 	 * command specific error codes that goes to
26634 	 * the cmd_err field in Common HWRM Error Response.
26635 	 */
26636 	uint8_t	code;
26637 	/* Unknown error */
26638 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
26639 	/* Unable to complete operation due to invalid speed */
26640 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_ILLEGAL_SPEED UINT32_C(0x1)
26641 	/*
26642 	 * retry the command since the phy is not ready.
26643 	 * retry count is returned in opaque_0.
26644 	 * This is only valid for the first command and
26645 	 * this value will not change for successive calls.
26646 	 * but if a 0 is returned at any time then this should
26647 	 * be treated as an un recoverable failure,
26648 	 *
26649 	 * retry interval in milliseconds is returned in opaque_1.
26650 	 * This specifies the time that user should wait before
26651 	 * issuing the next port_phy_cfg command.
26652 	 */
26653 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_RETRY	UINT32_C(0x2)
26654 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_LAST	HWRM_PORT_PHY_CFG_CMD_ERR_CODE_RETRY
26655 	uint8_t	unused_0[7];
26656 } hwrm_port_phy_cfg_cmd_err_t, *phwrm_port_phy_cfg_cmd_err_t;
26657 
26658 /**********************
26659  * hwrm_port_phy_qcfg *
26660  **********************/
26661 
26662 
26663 /* hwrm_port_phy_qcfg_input (size:192b/24B) */
26664 
26665 typedef struct hwrm_port_phy_qcfg_input {
26666 	/* The HWRM command request type. */
26667 	uint16_t	req_type;
26668 	/*
26669 	 * The completion ring to send the completion event on. This should
26670 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26671 	 */
26672 	uint16_t	cmpl_ring;
26673 	/*
26674 	 * The sequence ID is used by the driver for tracking multiple
26675 	 * commands. This ID is treated as opaque data by the firmware and
26676 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26677 	 */
26678 	uint16_t	seq_id;
26679 	/*
26680 	 * The target ID of the command:
26681 	 * * 0x0-0xFFF8 - The function ID
26682 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26683 	 * * 0xFFFD - Reserved for user-space HWRM interface
26684 	 * * 0xFFFF - HWRM
26685 	 */
26686 	uint16_t	target_id;
26687 	/*
26688 	 * A physical address pointer pointing to a host buffer that the
26689 	 * command's response data will be written. This can be either a host
26690 	 * physical address (HPA) or a guest physical address (GPA) and must
26691 	 * point to a physically contiguous block of memory.
26692 	 */
26693 	uint64_t	resp_addr;
26694 	/* Port ID of port that is to be queried. */
26695 	uint16_t	port_id;
26696 	uint8_t	unused_0[6];
26697 } hwrm_port_phy_qcfg_input_t, *phwrm_port_phy_qcfg_input_t;
26698 
26699 /* hwrm_port_phy_qcfg_output (size:832b/104B) */
26700 
26701 typedef struct hwrm_port_phy_qcfg_output {
26702 	/* The specific error status for the command. */
26703 	uint16_t	error_code;
26704 	/* The HWRM command request type. */
26705 	uint16_t	req_type;
26706 	/* The sequence ID from the original command. */
26707 	uint16_t	seq_id;
26708 	/* The length of the response data in number of bytes. */
26709 	uint16_t	resp_len;
26710 	/* This value indicates the current link status. */
26711 	uint8_t	link;
26712 	/* There is no link or cable detected. */
26713 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_NO_LINK UINT32_C(0x0)
26714 	/* There is no link, but a cable has been detected. */
26715 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SIGNAL  UINT32_C(0x1)
26716 	/* There is a link. */
26717 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK	UINT32_C(0x2)
26718 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LAST   HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK
26719 	uint8_t	active_fec_signal_mode;
26720 	/*
26721 	 * This value indicates the current link signaling mode of the
26722 	 * connection.
26723 	 */
26724 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_MASK		UINT32_C(0xf)
26725 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_SFT		0
26726 	/* NRZ signaling */
26727 		#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_NRZ		UINT32_C(0x0)
26728 	/* PAM4-56 signaling */
26729 		#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4		UINT32_C(0x1)
26730 	/* PAM4-112 signaling */
26731 		#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4_112		UINT32_C(0x2)
26732 		#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_LAST		HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4_112
26733 	/* This value indicates the current active FEC mode. */
26734 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_MASK		UINT32_C(0xf0)
26735 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_SFT		4
26736 	/* No active FEC */
26737 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_NONE_ACTIVE	(UINT32_C(0x0) << 4)
26738 	/* FEC CLAUSE 74 (Fire Code) active, autonegotiated or forced. */
26739 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_CLAUSE74_ACTIVE	(UINT32_C(0x1) << 4)
26740 	/* FEC CLAUSE 91 RS(528,514) active, autonegotiated or forced. */
26741 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_CLAUSE91_ACTIVE	(UINT32_C(0x2) << 4)
26742 	/* FEC RS544_1XN active, autonegotiated or forced. */
26743 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS544_1XN_ACTIVE   (UINT32_C(0x3) << 4)
26744 	/* FEC RS(544,528) active, autonegotiated or forced. */
26745 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS544_IEEE_ACTIVE  (UINT32_C(0x4) << 4)
26746 	/* FEC RS272_1XN active, autonegotiated or forced. */
26747 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS272_1XN_ACTIVE   (UINT32_C(0x5) << 4)
26748 	/* FEC RS(272,257) active, autonegotiated or forced. */
26749 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS272_IEEE_ACTIVE  (UINT32_C(0x6) << 4)
26750 		#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_LAST		HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS272_IEEE_ACTIVE
26751 	/*
26752 	 * This value indicates the current link speed of the connection.
26753 	 * The signal_mode field indicates if the link is using
26754 	 * NRZ or PAM4 signaling.
26755 	 */
26756 	uint16_t	link_speed;
26757 	/* 100Mb link speed */
26758 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB UINT32_C(0x1)
26759 	/* 1Gb link speed */
26760 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_1GB   UINT32_C(0xa)
26761 	/* 2Gb link speed */
26762 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB   UINT32_C(0x14)
26763 	/* 25Gb link speed */
26764 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2_5GB UINT32_C(0x19)
26765 	/* 10Gb link speed */
26766 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10GB  UINT32_C(0x64)
26767 	/* 20Mb link speed */
26768 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_20GB  UINT32_C(0xc8)
26769 	/* 25Gb link speed */
26770 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_25GB  UINT32_C(0xfa)
26771 	/* 40Gb link speed */
26772 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_40GB  UINT32_C(0x190)
26773 	/* 50Gb link speed */
26774 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB  UINT32_C(0x1f4)
26775 	/* 100Gb link speed */
26776 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB UINT32_C(0x3e8)
26777 	/* 200Gb link speed */
26778 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_200GB UINT32_C(0x7d0)
26779 	/* 400Gb link speed */
26780 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_400GB UINT32_C(0xfa0)
26781 	/* 800Gb link speed */
26782 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_800GB UINT32_C(0x1f40)
26783 	/* 10Mb link speed */
26784 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10MB  UINT32_C(0xffff)
26785 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_LAST HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10MB
26786 	/*
26787 	 * This value is indicates the duplex of the current
26788 	 * configuration.
26789 	 */
26790 	uint8_t	duplex_cfg;
26791 	/* Half Duplex connection. */
26792 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_HALF UINT32_C(0x0)
26793 	/* Full duplex connection. */
26794 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_FULL UINT32_C(0x1)
26795 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_LAST HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_FULL
26796 	/*
26797 	 * This value is used to indicate the current
26798 	 * pause configuration. When autoneg is enabled, this value
26799 	 * represents the autoneg results of pause configuration.
26800 	 */
26801 	uint8_t	pause;
26802 	/*
26803 	 * When this bit is '1', Generation of tx pause messages
26804 	 * is supported. Disabled otherwise.
26805 	 */
26806 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX	UINT32_C(0x1)
26807 	/*
26808 	 * When this bit is '1', Reception of rx pause messages
26809 	 * is supported. Disabled otherwise.
26810 	 */
26811 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX	UINT32_C(0x2)
26812 	/*
26813 	 * The supported speeds for the port. This is a bit mask.
26814 	 * For each speed that is supported, the corresponding
26815 	 * bit will be set to '1'.
26816 	 */
26817 	uint16_t	support_speeds;
26818 	/* 100Mb link speed (Half-duplex) */
26819 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD	UINT32_C(0x1)
26820 	/* 100Mb link speed (Full-duplex) */
26821 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MB	UINT32_C(0x2)
26822 	/* 1Gb link speed (Half-duplex) */
26823 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GBHD	UINT32_C(0x4)
26824 	/* 1Gb link speed (Full-duplex) */
26825 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB	UINT32_C(0x8)
26826 	/* 2Gb link speed */
26827 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2GB	UINT32_C(0x10)
26828 	/* 25Gb link speed */
26829 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB	UINT32_C(0x20)
26830 	/* 10Gb link speed */
26831 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB	UINT32_C(0x40)
26832 	/* 20Gb link speed */
26833 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB	UINT32_C(0x80)
26834 	/* 25Gb link speed */
26835 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB	UINT32_C(0x100)
26836 	/* 40Gb link speed */
26837 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB	UINT32_C(0x200)
26838 	/* 50Gb link speed */
26839 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB	UINT32_C(0x400)
26840 	/* 100Gb link speed */
26841 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB	UINT32_C(0x800)
26842 	/* 10Mb link speed (Half-duplex) */
26843 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10MBHD	UINT32_C(0x1000)
26844 	/* 10Mb link speed (Full-duplex) */
26845 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10MB	UINT32_C(0x2000)
26846 	/*
26847 	 * Current setting of forced link speed.
26848 	 * When the link speed is not being forced, this
26849 	 * value shall be set to 0.
26850 	 */
26851 	uint16_t	force_link_speed;
26852 	/* 100Mb link speed */
26853 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_100MB UINT32_C(0x1)
26854 	/* 1Gb link speed */
26855 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_1GB   UINT32_C(0xa)
26856 	/* 2Gb link speed */
26857 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_2GB   UINT32_C(0x14)
26858 	/* 25Gb link speed */
26859 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_2_5GB UINT32_C(0x19)
26860 	/* 10Gb link speed */
26861 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10GB  UINT32_C(0x64)
26862 	/* 20Mb link speed */
26863 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_20GB  UINT32_C(0xc8)
26864 	/* 25Gb link speed */
26865 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_25GB  UINT32_C(0xfa)
26866 	/* 40Gb link speed */
26867 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_40GB  UINT32_C(0x190)
26868 	/* 50Gb link speed */
26869 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_50GB  UINT32_C(0x1f4)
26870 	/* 100Gb link speed */
26871 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_100GB UINT32_C(0x3e8)
26872 	/* 10Mb link speed */
26873 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10MB  UINT32_C(0xffff)
26874 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_LAST HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10MB
26875 	/* Current setting of auto negotiation mode. */
26876 	uint8_t	auto_mode;
26877 	/* Disable autoneg or autoneg disabled. No speeds are selected. */
26878 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE	UINT32_C(0x0)
26879 	/* Select all possible speeds for autoneg mode. */
26880 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ALL_SPEEDS   UINT32_C(0x1)
26881 	/*
26882 	 * Select only the auto_link_speed speed for autoneg mode. This mode
26883 	 * has been DEPRECATED. An HWRM client should not use this mode.
26884 	 */
26885 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ONE_SPEED	UINT32_C(0x2)
26886 	/*
26887 	 * Select the auto_link_speed or any speed below that speed for
26888 	 * autoneg. This mode has been DEPRECATED. An HWRM client should not
26889 	 * use this mode.
26890 	 */
26891 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3)
26892 	/*
26893 	 * Select the speeds based on the corresponding link speed mask value
26894 	 * that is provided.
26895 	 */
26896 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_SPEED_MASK   UINT32_C(0x4)
26897 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_LAST	HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_SPEED_MASK
26898 	/*
26899 	 * Current setting of pause autonegotiation.
26900 	 * Move autoneg_pause flag here.
26901 	 */
26902 	uint8_t	auto_pause;
26903 	/*
26904 	 * When this bit is '1', Generation of tx pause messages
26905 	 * has been requested. Disabled otherwise.
26906 	 */
26907 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_TX		UINT32_C(0x1)
26908 	/*
26909 	 * When this bit is '1', Reception of rx pause messages
26910 	 * has been requested. Disabled otherwise.
26911 	 */
26912 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_RX		UINT32_C(0x2)
26913 	/*
26914 	 * When set to 1, the advertisement of pause is enabled.
26915 	 *
26916 	 * # When the auto_mode is not set to none and this flag is
26917 	 * set to 1, then the auto_pause bits on this port are being
26918 	 * advertised and autoneg pause results are being interpreted.
26919 	 * # When the auto_mode is not set to none and this
26920 	 * flag is set to 0, the pause is forced as indicated in
26921 	 * force_pause, and also advertised as auto_pause bits, but
26922 	 * the autoneg results are not interpreted since the pause
26923 	 * configuration is being forced.
26924 	 * # When the auto_mode is set to none and this flag is set to
26925 	 * 1, auto_pause bits should be ignored and should be set to 0.
26926 	 */
26927 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_AUTONEG_PAUSE	UINT32_C(0x4)
26928 	/*
26929 	 * Current setting for auto_link_speed. This field is only
26930 	 * valid when auto_mode is set to "one_speed" or "one_or_below".
26931 	 */
26932 	uint16_t	auto_link_speed;
26933 	/* 100Mb link speed */
26934 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_100MB UINT32_C(0x1)
26935 	/* 1Gb link speed */
26936 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_1GB   UINT32_C(0xa)
26937 	/* 2Gb link speed */
26938 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_2GB   UINT32_C(0x14)
26939 	/* 25Gb link speed */
26940 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_2_5GB UINT32_C(0x19)
26941 	/* 10Gb link speed */
26942 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10GB  UINT32_C(0x64)
26943 	/* 20Mb link speed */
26944 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_20GB  UINT32_C(0xc8)
26945 	/* 25Gb link speed */
26946 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_25GB  UINT32_C(0xfa)
26947 	/* 40Gb link speed */
26948 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_40GB  UINT32_C(0x190)
26949 	/* 50Gb link speed */
26950 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_50GB  UINT32_C(0x1f4)
26951 	/* 100Gb link speed */
26952 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_100GB UINT32_C(0x3e8)
26953 	/* 10Mb link speed */
26954 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10MB  UINT32_C(0xffff)
26955 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_LAST HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10MB
26956 	/*
26957 	 * Current setting for auto_link_speed_mask that is used to
26958 	 * advertise speeds during autonegotiation.
26959 	 * This field is only valid when auto_mode is set to "mask".
26960 	 * The speeds specified in this field shall be a subset of
26961 	 * supported speeds on this port.
26962 	 */
26963 	uint16_t	auto_link_speed_mask;
26964 	/* 100Mb link speed (Half-duplex) */
26965 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100MBHD	UINT32_C(0x1)
26966 	/* 100Mb link speed (Full-duplex) */
26967 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100MB	UINT32_C(0x2)
26968 	/* 1Gb link speed (Half-duplex) */
26969 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_1GBHD	UINT32_C(0x4)
26970 	/* 1Gb link speed (Full-duplex) */
26971 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_1GB	UINT32_C(0x8)
26972 	/* 2Gb link speed */
26973 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_2GB	UINT32_C(0x10)
26974 	/* 25Gb link speed */
26975 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_2_5GB	UINT32_C(0x20)
26976 	/* 10Gb link speed */
26977 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10GB	UINT32_C(0x40)
26978 	/* 20Gb link speed */
26979 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_20GB	UINT32_C(0x80)
26980 	/* 25Gb link speed */
26981 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_25GB	UINT32_C(0x100)
26982 	/* 40Gb link speed */
26983 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_40GB	UINT32_C(0x200)
26984 	/* 50Gb link speed */
26985 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_50GB	UINT32_C(0x400)
26986 	/* 100Gb link speed */
26987 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100GB	UINT32_C(0x800)
26988 	/* 10Mb link speed (Half-duplex) */
26989 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10MBHD	UINT32_C(0x1000)
26990 	/* 10Mb link speed (Full-duplex) */
26991 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10MB	UINT32_C(0x2000)
26992 	/* Current setting for wirespeed. */
26993 	uint8_t	wirespeed;
26994 	/* Wirespeed feature is disabled. */
26995 	#define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_OFF UINT32_C(0x0)
26996 	/* Wirespeed feature is enabled. */
26997 	#define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_ON  UINT32_C(0x1)
26998 	#define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_LAST HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_ON
26999 	/* Current setting for loopback. */
27000 	uint8_t	lpbk;
27001 	/* No loopback is selected. Normal operation. */
27002 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_NONE	UINT32_C(0x0)
27003 	/*
27004 	 * The HW will be configured with local loopback such that
27005 	 * host data is sent back to the host without modification.
27006 	 */
27007 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_LOCAL	UINT32_C(0x1)
27008 	/*
27009 	 * The HW will be configured with remote loopback such that
27010 	 * port logic will send packets back out the transmitter that
27011 	 * are received.
27012 	 */
27013 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_REMOTE   UINT32_C(0x2)
27014 	/*
27015 	 * The HW will be configured with external loopback such that
27016 	 * host data is sent on the transmitter and based on the external
27017 	 * loopback connection the data will be received without
27018 	 * modification.
27019 	 */
27020 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_EXTERNAL UINT32_C(0x3)
27021 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_LAST	HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_EXTERNAL
27022 	/*
27023 	 * Current setting of forced pause.
27024 	 * When the pause configuration is not being forced, then
27025 	 * this value shall be set to 0.
27026 	 */
27027 	uint8_t	force_pause;
27028 	/*
27029 	 * When this bit is '1', Generation of tx pause messages
27030 	 * is supported. Disabled otherwise.
27031 	 */
27032 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAUSE_TX	UINT32_C(0x1)
27033 	/*
27034 	 * When this bit is '1', Reception of rx pause messages
27035 	 * is supported. Disabled otherwise.
27036 	 */
27037 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAUSE_RX	UINT32_C(0x2)
27038 	/*
27039 	 * This value indicates the current status of the optics module on
27040 	 * this port.
27041 	 */
27042 	uint8_t	module_status;
27043 	/* Module is inserted and accepted */
27044 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NONE	UINT32_C(0x0)
27045 	/* Module is rejected and transmit side Laser is disabled. */
27046 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_DISABLETX	UINT32_C(0x1)
27047 	/* Module mismatch warning. */
27048 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_WARNINGMSG	UINT32_C(0x2)
27049 	/* Module is rejected and powered down. */
27050 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_PWRDOWN	UINT32_C(0x3)
27051 	/* Module is not inserted. */
27052 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTINSERTED   UINT32_C(0x4)
27053 	/* Module is powered down because of over current fault. */
27054 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_CURRENTFAULT  UINT32_C(0x5)
27055 	/* Module status is not applicable. */
27056 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTAPPLICABLE UINT32_C(0xff)
27057 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_LAST	HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTAPPLICABLE
27058 	/* Current setting for preemphasis. */
27059 	uint32_t	preemphasis;
27060 	/* This field represents the major version of the PHY. */
27061 	uint8_t	phy_maj;
27062 	/* This field represents the minor version of the PHY. */
27063 	uint8_t	phy_min;
27064 	/* This field represents the build version of the PHY. */
27065 	uint8_t	phy_bld;
27066 	/* This value represents a PHY type. */
27067 	uint8_t	phy_type;
27068 	/* Unknown */
27069 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN	UINT32_C(0x0)
27070 	/* BASE-CR */
27071 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR	UINT32_C(0x1)
27072 	/* BASE-KR4 (Deprecated) */
27073 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4	UINT32_C(0x2)
27074 	/* BASE-LR */
27075 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR	UINT32_C(0x3)
27076 	/* BASE-SR */
27077 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR	UINT32_C(0x4)
27078 	/* BASE-KR2 (Deprecated) */
27079 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2	UINT32_C(0x5)
27080 	/* BASE-KX */
27081 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX	UINT32_C(0x6)
27082 	/* BASE-KR */
27083 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR	UINT32_C(0x7)
27084 	/* BASE-T */
27085 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET		UINT32_C(0x8)
27086 	/* EEE capable BASE-T */
27087 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE	UINT32_C(0x9)
27088 	/* SGMII connected external PHY */
27089 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY	UINT32_C(0xa)
27090 	/* 25G_BASECR_CA_L */
27091 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_L  UINT32_C(0xb)
27092 	/* 25G_BASECR_CA_S */
27093 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_S  UINT32_C(0xc)
27094 	/* 25G_BASECR_CA_N */
27095 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_N  UINT32_C(0xd)
27096 	/* 25G_BASESR */
27097 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASESR	UINT32_C(0xe)
27098 	/* 100G_BASECR4 */
27099 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASECR4	UINT32_C(0xf)
27100 	/* 100G_BASESR4 */
27101 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR4	UINT32_C(0x10)
27102 	/* 100G_BASELR4 */
27103 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASELR4	UINT32_C(0x11)
27104 	/* 100G_BASEER4 */
27105 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASEER4	UINT32_C(0x12)
27106 	/* 100G_BASESR10 */
27107 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR10	UINT32_C(0x13)
27108 	/* 40G_BASECR4 */
27109 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASECR4	UINT32_C(0x14)
27110 	/* 40G_BASESR4 */
27111 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASESR4	UINT32_C(0x15)
27112 	/* 40G_BASELR4 */
27113 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASELR4	UINT32_C(0x16)
27114 	/* 40G_BASEER4 */
27115 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASEER4	UINT32_C(0x17)
27116 	/* 40G_ACTIVE_CABLE */
27117 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_ACTIVE_CABLE UINT32_C(0x18)
27118 	/* 1G_baseT */
27119 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASET	UINT32_C(0x19)
27120 	/* 1G_baseSX */
27121 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASESX	UINT32_C(0x1a)
27122 	/* 1G_baseCX */
27123 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASECX	UINT32_C(0x1b)
27124 	/* 200G_BASECR4 */
27125 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASECR4	UINT32_C(0x1c)
27126 	/* 200G_BASESR4 */
27127 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASESR4	UINT32_C(0x1d)
27128 	/* 200G_BASELR4 */
27129 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASELR4	UINT32_C(0x1e)
27130 	/* 200G_BASEER4 */
27131 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASEER4	UINT32_C(0x1f)
27132 	/* 50G_BASECR */
27133 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASECR	UINT32_C(0x20)
27134 	/* 50G_BASESR */
27135 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASESR	UINT32_C(0x21)
27136 	/* 50G_BASELR */
27137 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASELR	UINT32_C(0x22)
27138 	/* 50G_BASEER */
27139 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASEER	UINT32_C(0x23)
27140 	/* 100G_BASECR2 */
27141 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASECR2	UINT32_C(0x24)
27142 	/* 100G_BASESR2 */
27143 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR2	UINT32_C(0x25)
27144 	/* 100G_BASELR2 */
27145 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASELR2	UINT32_C(0x26)
27146 	/* 100G_BASEER2 */
27147 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASEER2	UINT32_C(0x27)
27148 	/* 400G_BASECR */
27149 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASECR	UINT32_C(0x28)
27150 	/* 100G_BASESR */
27151 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR	UINT32_C(0x29)
27152 	/* 100G_BASELR */
27153 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASELR	UINT32_C(0x2a)
27154 	/* 100G_BASEER */
27155 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASEER	UINT32_C(0x2b)
27156 	/* 200G_BASECR2 */
27157 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASECR2	UINT32_C(0x2c)
27158 	/* 200G_BASESR2 */
27159 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASESR2	UINT32_C(0x2d)
27160 	/* 200G_BASELR2 */
27161 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASELR2	UINT32_C(0x2e)
27162 	/* 200G_BASEER2 */
27163 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASEER2	UINT32_C(0x2f)
27164 	/* 400G_BASECR8 */
27165 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASECR8	UINT32_C(0x30)
27166 	/* 200G_BASESR8 */
27167 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASESR8	UINT32_C(0x31)
27168 	/* 400G_BASELR8 */
27169 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASELR8	UINT32_C(0x32)
27170 	/* 400G_BASEER8 */
27171 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASEER8	UINT32_C(0x33)
27172 	/* 400G_BASECR4 */
27173 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASECR4	UINT32_C(0x34)
27174 	/* 400G_BASESR4 */
27175 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASESR4	UINT32_C(0x35)
27176 	/* 400G_BASELR4 */
27177 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASELR4	UINT32_C(0x36)
27178 	/* 400G_BASEER4 */
27179 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASEER4	UINT32_C(0x37)
27180 	/* 800G_BASECR8 */
27181 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASECR8	UINT32_C(0x38)
27182 	/* 800G_BASESR8 */
27183 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASESR8	UINT32_C(0x39)
27184 	/* 800G_BASELR8 */
27185 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASELR8	UINT32_C(0x3a)
27186 	/* 800G_BASEER8 */
27187 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEER8	UINT32_C(0x3b)
27188 	/* 800G_BASEFR8 */
27189 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEFR8	UINT32_C(0x3c)
27190 	/* 800G_BASEDR8 */
27191 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEDR8	UINT32_C(0x3d)
27192 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_LAST		HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEDR8
27193 	/* This value represents a media type. */
27194 	uint8_t	media_type;
27195 	/* Unknown */
27196 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_UNKNOWN UINT32_C(0x0)
27197 	/* Twisted Pair */
27198 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP	UINT32_C(0x1)
27199 	/* Direct Attached Copper */
27200 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_DAC	UINT32_C(0x2)
27201 	/* Fiber */
27202 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_FIBRE   UINT32_C(0x3)
27203 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_LAST   HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_FIBRE
27204 	/* This value represents a transceiver type. */
27205 	uint8_t	xcvr_pkg_type;
27206 	/* PHY and MAC are in the same package */
27207 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_INTERNAL UINT32_C(0x1)
27208 	/* PHY and MAC are in different packages */
27209 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_EXTERNAL UINT32_C(0x2)
27210 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_LAST	HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_EXTERNAL
27211 	uint8_t	eee_config_phy_addr;
27212 	/* This field represents PHY address. */
27213 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_ADDR_MASK		UINT32_C(0x1f)
27214 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_ADDR_SFT		0
27215 	/*
27216 	 * This field represents flags related to EEE configuration.
27217 	 * These EEE configuration flags are valid only when the
27218 	 * auto_mode is not set to none (in other words autonegotiation
27219 	 * is enabled).
27220 	 */
27221 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_MASK		UINT32_C(0xe0)
27222 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_SFT		5
27223 	/*
27224 	 * When set to 1, Energy Efficient Ethernet (EEE) mode is
27225 	 * enabled. Speeds for autoneg with EEE mode enabled are based on
27226 	 * eee_link_speed_mask.
27227 	 */
27228 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_ENABLED	UINT32_C(0x20)
27229 	/*
27230 	 * This flag is valid only when eee_enabled is set to 1.
27231 	 *
27232 	 * # If eee_enabled is set to 0, then EEE mode is disabled
27233 	 * and this flag shall be ignored.
27234 	 * # If eee_enabled is set to 1 and this flag is set to 1,
27235 	 * then Energy Efficient Ethernet (EEE) mode is enabled
27236 	 * and in use.
27237 	 * # If eee_enabled is set to 1 and this flag is set to 0,
27238 	 * then Energy Efficient Ethernet (EEE) mode is enabled
27239 	 * but is currently not in use.
27240 	 */
27241 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_ACTIVE	UINT32_C(0x40)
27242 	/*
27243 	 * This flag is valid only when eee_enabled is set to 1.
27244 	 *
27245 	 * # If eee_enabled is set to 0, then EEE mode is disabled
27246 	 * and this flag shall be ignored.
27247 	 * # If eee_enabled is set to 1 and this flag is set to 1,
27248 	 * then Energy Efficient Ethernet (EEE) mode is enabled
27249 	 * and TX LPI is enabled.
27250 	 * # If eee_enabled is set to 1 and this flag is set to 0,
27251 	 * then Energy Efficient Ethernet (EEE) mode is enabled
27252 	 * but TX LPI is disabled.
27253 	 */
27254 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_TX_LPI	UINT32_C(0x80)
27255 	/*
27256 	 * When set to 1, the parallel detection is used to determine
27257 	 * the speed of the link partner.
27258 	 *
27259 	 * Parallel detection is used when a autonegotiation capable
27260 	 * device is connected to a link partner that is not capable
27261 	 * of autonegotiation.
27262 	 */
27263 	uint8_t	parallel_detect;
27264 	/*
27265 	 * When set to 1, the parallel detection is used to determine
27266 	 * the speed of the link partner.
27267 	 *
27268 	 * Parallel detection is used when a autonegotiation capable
27269 	 * device is connected to a link partner that is not capable
27270 	 * of autonegotiation.
27271 	 */
27272 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PARALLEL_DETECT	UINT32_C(0x1)
27273 	/*
27274 	 * The advertised speeds for the port by the link partner.
27275 	 * Each advertised speed will be set to '1'.
27276 	 */
27277 	uint16_t	link_partner_adv_speeds;
27278 	/* 100Mb link speed (Half-duplex) */
27279 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100MBHD	UINT32_C(0x1)
27280 	/* 100Mb link speed (Full-duplex) */
27281 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100MB	UINT32_C(0x2)
27282 	/* 1Gb link speed (Half-duplex) */
27283 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_1GBHD	UINT32_C(0x4)
27284 	/* 1Gb link speed (Full-duplex) */
27285 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_1GB	UINT32_C(0x8)
27286 	/* 2Gb link speed */
27287 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_2GB	UINT32_C(0x10)
27288 	/* 25Gb link speed */
27289 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_2_5GB	UINT32_C(0x20)
27290 	/* 10Gb link speed */
27291 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10GB	UINT32_C(0x40)
27292 	/* 20Gb link speed */
27293 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_20GB	UINT32_C(0x80)
27294 	/* 25Gb link speed */
27295 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_25GB	UINT32_C(0x100)
27296 	/* 40Gb link speed */
27297 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_40GB	UINT32_C(0x200)
27298 	/* 50Gb link speed */
27299 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_50GB	UINT32_C(0x400)
27300 	/* 100Gb link speed */
27301 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100GB	UINT32_C(0x800)
27302 	/* 10Mb link speed (Half-duplex) */
27303 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10MBHD	UINT32_C(0x1000)
27304 	/* 10Mb link speed (Full-duplex) */
27305 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10MB	UINT32_C(0x2000)
27306 	/*
27307 	 * The advertised autoneg for the port by the link partner.
27308 	 * This field is deprecated and should be set to 0.
27309 	 */
27310 	uint8_t	link_partner_adv_auto_mode;
27311 	/* Disable autoneg or autoneg disabled. No speeds are selected. */
27312 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_NONE	UINT32_C(0x0)
27313 	/* Select all possible speeds for autoneg mode. */
27314 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ALL_SPEEDS   UINT32_C(0x1)
27315 	/*
27316 	 * Select only the auto_link_speed speed for autoneg mode. This mode
27317 	 * has been DEPRECATED. An HWRM client should not use this mode.
27318 	 */
27319 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ONE_SPEED	UINT32_C(0x2)
27320 	/*
27321 	 * Select the auto_link_speed or any speed below that speed for
27322 	 * autoneg. This mode has been DEPRECATED. An HWRM client should not
27323 	 * use this mode.
27324 	 */
27325 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3)
27326 	/*
27327 	 * Select the speeds based on the corresponding link speed mask value
27328 	 * that is provided.
27329 	 */
27330 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK   UINT32_C(0x4)
27331 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_LAST	HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK
27332 	/* The advertised pause settings on the port by the link partner. */
27333 	uint8_t	link_partner_adv_pause;
27334 	/*
27335 	 * When this bit is '1', Generation of tx pause messages
27336 	 * is supported. Disabled otherwise.
27337 	 */
27338 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_PAUSE_TX	UINT32_C(0x1)
27339 	/*
27340 	 * When this bit is '1', Reception of rx pause messages
27341 	 * is supported. Disabled otherwise.
27342 	 */
27343 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_PAUSE_RX	UINT32_C(0x2)
27344 	/*
27345 	 * Current setting for link speed mask that is used to
27346 	 * advertise speeds during autonegotiation when EEE is enabled.
27347 	 * This field is valid only when eee_enabled flags is set to 1.
27348 	 * The speeds specified in this field shall be a subset of
27349 	 * speeds specified in auto_link_speed_mask.
27350 	 */
27351 	uint16_t	adv_eee_link_speed_mask;
27352 	/* Reserved */
27353 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD1	UINT32_C(0x1)
27354 	/* 100Mb link speed (Full-duplex) */
27355 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_100MB	UINT32_C(0x2)
27356 	/* Reserved */
27357 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD2	UINT32_C(0x4)
27358 	/* 1Gb link speed (Full-duplex) */
27359 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_1GB	UINT32_C(0x8)
27360 	/* Reserved */
27361 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD3	UINT32_C(0x10)
27362 	/* Reserved */
27363 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD4	UINT32_C(0x20)
27364 	/* 10Gb link speed */
27365 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_10GB	UINT32_C(0x40)
27366 	/*
27367 	 * Current setting for link speed mask that is advertised by
27368 	 * the link partner when EEE is enabled.
27369 	 * This field is valid only when eee_enabled flags is set to 1.
27370 	 */
27371 	uint16_t	link_partner_adv_eee_link_speed_mask;
27372 	/* Reserved */
27373 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD1	UINT32_C(0x1)
27374 	/* 100Mb link speed (Full-duplex) */
27375 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_100MB	UINT32_C(0x2)
27376 	/* Reserved */
27377 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD2	UINT32_C(0x4)
27378 	/* 1Gb link speed (Full-duplex) */
27379 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_1GB	UINT32_C(0x8)
27380 	/* Reserved */
27381 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD3	UINT32_C(0x10)
27382 	/* Reserved */
27383 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD4	UINT32_C(0x20)
27384 	/* 10Gb link speed */
27385 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_10GB	UINT32_C(0x40)
27386 	uint32_t	xcvr_identifier_type_tx_lpi_timer;
27387 	/*
27388 	 * Current setting of TX LPI timer in microseconds.
27389 	 * This field is valid only when_eee_enabled flag is set to 1
27390 	 * and tx_lpi_enabled is set to 1.
27391 	 */
27392 	#define HWRM_PORT_PHY_QCFG_OUTPUT_TX_LPI_TIMER_MASK		UINT32_C(0xffffff)
27393 	#define HWRM_PORT_PHY_QCFG_OUTPUT_TX_LPI_TIMER_SFT		0
27394 	/* This value represents transceiver identifier type. */
27395 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_MASK	UINT32_C(0xff000000)
27396 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFT	24
27397 	/* Unknown */
27398 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_UNKNOWN   (UINT32_C(0x0) << 24)
27399 	/* SFP/SFP+/SFP28 */
27400 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFP	(UINT32_C(0x3) << 24)
27401 	/* QSFP+ */
27402 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP	(UINT32_C(0xc) << 24)
27403 	/* QSFP+ */
27404 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFPPLUS  (UINT32_C(0xd) << 24)
27405 	/* QSFP28/QSFP56 or later */
27406 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP28	(UINT32_C(0x11) << 24)
27407 	/* QSFP-DD */
27408 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFPDD	(UINT32_C(0x18) << 24)
27409 	/* QSFP112 */
27410 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP112   (UINT32_C(0x1e) << 24)
27411 	/* SFP-DD CMIS */
27412 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFPDD	(UINT32_C(0x1f) << 24)
27413 	/* SFP CMIS */
27414 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_CSFP	(UINT32_C(0x20) << 24)
27415 		#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_LAST	HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_CSFP
27416 	/*
27417 	 * This value represents the current configuration of
27418 	 * Forward Error Correction (FEC) on the port.
27419 	 */
27420 	uint16_t	fec_cfg;
27421 	/*
27422 	 * When set to 1, then FEC is not supported on this port. If this
27423 	 * flag is set to 1, then all other FEC configuration flags shall be
27424 	 * ignored. When set to 0, then FEC is supported as indicated by
27425 	 * other configuration flags.
27426 	 */
27427 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_NONE_SUPPORTED	UINT32_C(0x1)
27428 	/*
27429 	 * When set to 1, then FEC autonegotiation is supported on this port.
27430 	 * When set to 0, then FEC autonegotiation is not supported on this
27431 	 * port.
27432 	 */
27433 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_AUTONEG_SUPPORTED	UINT32_C(0x2)
27434 	/*
27435 	 * When set to 1, then FEC autonegotiation is enabled on this port.
27436 	 * When set to 0, then FEC autonegotiation is disabled if supported.
27437 	 * This flag should be ignored if FEC autonegotiation is not
27438 	 * supported on this port.
27439 	 */
27440 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_AUTONEG_ENABLED	UINT32_C(0x4)
27441 	/*
27442 	 * When set to 1, then FEC CLAUSE 74 (Fire Code) is supported on this
27443 	 * port. When set to 0, then FEC CLAUSE 74 (Fire Code) is not
27444 	 * supported on this port.
27445 	 */
27446 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_SUPPORTED	UINT32_C(0x8)
27447 	/*
27448 	 * When set to 1, then FEC CLAUSE 74 (Fire Code) is enabled on this
27449 	 * port. This means that FEC CLAUSE 74 is either advertised if
27450 	 * FEC autonegotiation is enabled or FEC CLAUSE 74 is force enabled.
27451 	 * When set to 0, then FEC CLAUSE 74 (Fire Code) is disabled if
27452 	 * supported. This flag should be ignored if FEC CLAUSE 74 is not
27453 	 * supported on this port.
27454 	 */
27455 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_ENABLED	UINT32_C(0x10)
27456 	/*
27457 	 * When set to 1, then FEC CLAUSE 91 (Reed Solomon RS(528,514) for
27458 	 * NRZ) is supported on this port.
27459 	 * When set to 0, then FEC RS(528,418) is not supported on this port.
27460 	 */
27461 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_SUPPORTED	UINT32_C(0x20)
27462 	/*
27463 	 * When set to 1, then FEC CLAUSE 91 (Reed Solomon RS(528,514) for
27464 	 * NRZ) is enabled on this port. This means that FEC RS(528,514) is
27465 	 * either advertised if FEC autonegotiation is enabled or FEC
27466 	 * RS(528,514) is force enabled. When set to 0, then FEC RS(528,514)
27467 	 * is disabled if supported.
27468 	 * This flag should be ignored if FEC CLAUSE 91 is not supported on
27469 	 * this port.
27470 	 */
27471 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_ENABLED	UINT32_C(0x40)
27472 	/*
27473 	 * When set to 1, then FEC RS544_1XN is supported on this port.
27474 	 * When set to 0, then FEC RS544_1XN is not supported on this port.
27475 	 */
27476 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_SUPPORTED	UINT32_C(0x80)
27477 	/*
27478 	 * When set to 1, then RS544_1XN is enabled on this
27479 	 * port. This means that FEC RS544_1XN is either advertised if
27480 	 * FEC autonegotiation is enabled or FEC RS544_1XN is force enabled.
27481 	 * When set to 0, then FEC RS544_1XN is disabled if supported.
27482 	 * This flag should be ignored if FEC RS544_1XN is not supported on
27483 	 * this port.
27484 	 */
27485 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_ENABLED	UINT32_C(0x100)
27486 	/*
27487 	 * When set to 1, then FEC RS(544,514) is supported on this port.
27488 	 * When set to 0, then FEC RS(544,514) is not supported on this port.
27489 	 */
27490 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_IEEE_SUPPORTED	UINT32_C(0x200)
27491 	/*
27492 	 * When set to 1, then RS(544,514) is enabled on this
27493 	 * port. This means that FEC RS(544,514) is either advertised if
27494 	 * FEC autonegotiation is enabled or FEC RS(544,514) is force
27495 	 * enabled. When set to 0, then FEC RS(544,514) is disabled if
27496 	 * supported. This flag should be ignored if FEC RS(544,514) is not
27497 	 * supported on this port.
27498 	 */
27499 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_IEEE_ENABLED	UINT32_C(0x400)
27500 	/*
27501 	 * When set to 1, then FEC RS272_1XN is supported on this port.
27502 	 * When set to 0, then FEC RS272_1XN is not supported on this port.
27503 	 */
27504 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_1XN_SUPPORTED	UINT32_C(0x800)
27505 	/*
27506 	 * When set to 1, then RS272_1XN is enabled on this
27507 	 * port. This means that FEC RS272_1XN is either advertised if
27508 	 * FEC autonegotiation is enabled or FEC RS272_1XN is force
27509 	 * enabled. When set to 0, then FEC RS272_1XN is disabled if
27510 	 * supported.
27511 	 * This flag should be ignored if FEC RS272_1XN is not supported on
27512 	 * this port.
27513 	 */
27514 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_1XN_ENABLED	UINT32_C(0x1000)
27515 	/*
27516 	 * When set to 1, then FEC RS(272,514) is supported on this port.
27517 	 * When set to 0, then FEC RS(272,514) is not supported on this port.
27518 	 */
27519 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_IEEE_SUPPORTED	UINT32_C(0x2000)
27520 	/*
27521 	 * When set to 1, then RS(272,257) is enabled on this
27522 	 * port. This means that FEC RS(272,257) is either advertised if
27523 	 * FEC autonegotiation is enabled or FEC RS(272,257) is force
27524 	 * enabled. When set to 0, then FEC RS(272,257) is disabled if
27525 	 * supported.
27526 	 * This flag should be ignored if FEC RS(272,257) is not supported on
27527 	 * this port.
27528 	 */
27529 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_IEEE_ENABLED	UINT32_C(0x4000)
27530 	/*
27531 	 * This value is indicates the duplex of the current
27532 	 * connection state.
27533 	 */
27534 	uint8_t	duplex_state;
27535 	/* Half Duplex connection. */
27536 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_HALF UINT32_C(0x0)
27537 	/* Full duplex connection. */
27538 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_FULL UINT32_C(0x1)
27539 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_LAST HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_FULL
27540 	/* Option flags fields. */
27541 	uint8_t	option_flags;
27542 	/* When this bit is '1', Media auto detect is enabled. */
27543 	#define HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_MEDIA_AUTO_DETECT	UINT32_C(0x1)
27544 	/*
27545 	 * When this bit is '1', active_fec_signal_mode can be
27546 	 * trusted.
27547 	 */
27548 	#define HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SIGNAL_MODE_KNOWN	UINT32_C(0x2)
27549 	/*
27550 	 * When this bit is '1', speeds2 fields are used to get
27551 	 * speed details.
27552 	 */
27553 	#define HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SPEEDS2_SUPPORTED	UINT32_C(0x4)
27554 	/*
27555 	 * Up to 16 bytes of null padded ASCII string representing
27556 	 * PHY vendor.
27557 	 * If the string is set to null, then the vendor name is not
27558 	 * available.
27559 	 */
27560 	char	phy_vendor_name[16];
27561 	/*
27562 	 * Up to 16 bytes of null padded ASCII string that
27563 	 * identifies vendor specific part number of the PHY.
27564 	 * If the string is set to null, then the vendor specific
27565 	 * part number is not available.
27566 	 */
27567 	char	phy_vendor_partnumber[16];
27568 	/*
27569 	 * The supported PAM4 speeds for the port. This is a bit mask.
27570 	 * For each speed that is supported, the corresponding
27571 	 * bit will be set to '1'.
27572 	 */
27573 	uint16_t	support_pam4_speeds;
27574 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G	UINT32_C(0x1)
27575 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G	UINT32_C(0x2)
27576 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_200G	UINT32_C(0x4)
27577 	/*
27578 	 * Current setting of forced PAM4 link speed.
27579 	 * When the link speed is not being forced, this
27580 	 * value shall be set to 0.
27581 	 */
27582 	uint16_t	force_pam4_link_speed;
27583 	/* 50Gb link speed */
27584 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_50GB  UINT32_C(0x1f4)
27585 	/* 100Gb link speed */
27586 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_100GB UINT32_C(0x3e8)
27587 	/* 200Gb link speed */
27588 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_200GB UINT32_C(0x7d0)
27589 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_LAST HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_200GB
27590 	/*
27591 	 * Current setting for auto_pam4_link_speed_mask that is used to
27592 	 * advertise speeds during autonegotiation.
27593 	 * This field is only valid when auto_mode is set to "mask".
27594 	 * The speeds specified in this field shall be a subset of
27595 	 * supported speeds on this port.
27596 	 */
27597 	uint16_t	auto_pam4_link_speed_mask;
27598 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAM4_LINK_SPEED_MASK_50G	UINT32_C(0x1)
27599 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAM4_LINK_SPEED_MASK_100G	UINT32_C(0x2)
27600 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAM4_LINK_SPEED_MASK_200G	UINT32_C(0x4)
27601 	/*
27602 	 * The advertised PAM4 speeds for the port by the link partner.
27603 	 * Each advertised speed will be set to '1'.
27604 	 */
27605 	uint8_t	link_partner_pam4_adv_speeds;
27606 	/* 50Gb link speed */
27607 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_PAM4_ADV_SPEEDS_50GB	UINT32_C(0x1)
27608 	/* 100Gb link speed */
27609 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_PAM4_ADV_SPEEDS_100GB	UINT32_C(0x2)
27610 	/* 200Gb link speed */
27611 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_PAM4_ADV_SPEEDS_200GB	UINT32_C(0x4)
27612 	/*
27613 	 * This field is used to indicate the reasons for link down.
27614 	 * This field is set to 0, if the link down reason is unknown.
27615 	 */
27616 	uint8_t	link_down_reason;
27617 	/* Remote fault */
27618 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_DOWN_REASON_RF	UINT32_C(0x1)
27619 	/*
27620 	 * The supported speeds for the port. This is a bit mask.
27621 	 * For each speed that is supported, the corresponding
27622 	 * bit will be set to '1'. This is valid only if speeds2_supported
27623 	 * is set in option_flags
27624 	 */
27625 	uint16_t	support_speeds2;
27626 	/* 1Gb link speed */
27627 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_1GB		UINT32_C(0x1)
27628 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
27629 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_10GB		UINT32_C(0x2)
27630 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
27631 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_25GB		UINT32_C(0x4)
27632 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
27633 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_40GB		UINT32_C(0x8)
27634 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
27635 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_50GB		UINT32_C(0x10)
27636 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
27637 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_100GB		UINT32_C(0x20)
27638 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
27639 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_50GB_PAM4_56	UINT32_C(0x40)
27640 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
27641 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_100GB_PAM4_56	UINT32_C(0x80)
27642 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
27643 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_200GB_PAM4_56	UINT32_C(0x100)
27644 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
27645 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_400GB_PAM4_56	UINT32_C(0x200)
27646 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
27647 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_100GB_PAM4_112	UINT32_C(0x400)
27648 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
27649 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_200GB_PAM4_112	UINT32_C(0x800)
27650 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
27651 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_400GB_PAM4_112	UINT32_C(0x1000)
27652 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
27653 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_800GB_PAM4_112	UINT32_C(0x2000)
27654 	/*
27655 	 * Current setting of forced link speed. When the link speed is not
27656 	 * being forced, this value shall be set to 0.
27657 	 * This field is valid only if speeds2_supported is set in
27658 	 * option_flags.
27659 	 */
27660 	uint16_t	force_link_speeds2;
27661 	/* 1Gb link speed */
27662 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_1GB		UINT32_C(0xa)
27663 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
27664 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_10GB	UINT32_C(0x64)
27665 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
27666 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_25GB	UINT32_C(0xfa)
27667 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
27668 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_40GB	UINT32_C(0x190)
27669 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
27670 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_50GB	UINT32_C(0x1f4)
27671 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
27672 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_100GB	UINT32_C(0x3e8)
27673 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
27674 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_50GB_PAM4_56   UINT32_C(0x1f5)
27675 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
27676 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_56  UINT32_C(0x3e9)
27677 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
27678 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_56  UINT32_C(0x7d1)
27679 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
27680 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_56  UINT32_C(0xfa1)
27681 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
27682 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_112 UINT32_C(0x3ea)
27683 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
27684 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_112 UINT32_C(0x7d2)
27685 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
27686 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_112 UINT32_C(0xfa2)
27687 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
27688 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112 UINT32_C(0x1f42)
27689 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_LAST	HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112
27690 	/*
27691 	 * Current setting of auto_link speed_mask that is used to advertise
27692 	 * speeds during autonegotiation.
27693 	 * This field is only valid when auto_mode is set to "mask".
27694 	 * and if speeds2_supported is set in option_flags
27695 	 * The speeds specified in this field shall be a subset of
27696 	 * supported speeds on this port.
27697 	 */
27698 	uint16_t	auto_link_speeds2;
27699 	/* 1Gb link speed */
27700 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_1GB		UINT32_C(0x1)
27701 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
27702 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_10GB		UINT32_C(0x2)
27703 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
27704 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_25GB		UINT32_C(0x4)
27705 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
27706 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_40GB		UINT32_C(0x8)
27707 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
27708 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_50GB		UINT32_C(0x10)
27709 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
27710 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_100GB		UINT32_C(0x20)
27711 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
27712 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_50GB_PAM4_56	UINT32_C(0x40)
27713 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
27714 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_100GB_PAM4_56	UINT32_C(0x80)
27715 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
27716 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_200GB_PAM4_56	UINT32_C(0x100)
27717 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
27718 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_400GB_PAM4_56	UINT32_C(0x200)
27719 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
27720 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_100GB_PAM4_112	UINT32_C(0x400)
27721 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
27722 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_200GB_PAM4_112	UINT32_C(0x800)
27723 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
27724 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_400GB_PAM4_112	UINT32_C(0x1000)
27725 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
27726 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_800GB_PAM4_112	UINT32_C(0x2000)
27727 	/*
27728 	 * This field is indicate the number of lanes used to transfer
27729 	 * data. If the link is down, the value is zero.
27730 	 * This is valid only if speeds2_supported is set in option_flags.
27731 	 */
27732 	uint8_t	active_lanes;
27733 	/*
27734 	 * This field is used in Output records to indicate that the output
27735 	 * is completely written to RAM. This field should be read as '1'
27736 	 * to indicate that the output has been completely written. When
27737 	 * writing a command completion or response to an internal processor,
27738 	 * the order of writes has to be such that this field is written last.
27739 	 */
27740 	uint8_t	valid;
27741 } hwrm_port_phy_qcfg_output_t, *phwrm_port_phy_qcfg_output_t;
27742 
27743 /*********************
27744  * hwrm_port_mac_cfg *
27745  *********************/
27746 
27747 
27748 /* hwrm_port_mac_cfg_input (size:448b/56B) */
27749 
27750 typedef struct hwrm_port_mac_cfg_input {
27751 	/* The HWRM command request type. */
27752 	uint16_t	req_type;
27753 	/*
27754 	 * The completion ring to send the completion event on. This should
27755 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
27756 	 */
27757 	uint16_t	cmpl_ring;
27758 	/*
27759 	 * The sequence ID is used by the driver for tracking multiple
27760 	 * commands. This ID is treated as opaque data by the firmware and
27761 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
27762 	 */
27763 	uint16_t	seq_id;
27764 	/*
27765 	 * The target ID of the command:
27766 	 * * 0x0-0xFFF8 - The function ID
27767 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
27768 	 * * 0xFFFD - Reserved for user-space HWRM interface
27769 	 * * 0xFFFF - HWRM
27770 	 */
27771 	uint16_t	target_id;
27772 	/*
27773 	 * A physical address pointer pointing to a host buffer that the
27774 	 * command's response data will be written. This can be either a host
27775 	 * physical address (HPA) or a guest physical address (GPA) and must
27776 	 * point to a physically contiguous block of memory.
27777 	 */
27778 	uint64_t	resp_addr;
27779 	/*
27780 	 * In this field, there are a number of CoS mappings related flags
27781 	 * that are used to configure CoS mappings and their corresponding
27782 	 * priorities in the hardware.
27783 	 * For the priorities of CoS mappings, the HWRM uses the following
27784 	 * priority order (high to low) by default:
27785 	 * # vlan pri
27786 	 * # ip_dscp
27787 	 * # tunnel_vlan_pri
27788 	 * # default cos
27789 	 *
27790 	 * A subset of CoS mappings can be enabled.
27791 	 * If a priority is not specified for an enabled CoS mapping, the
27792 	 * priority will be assigned in the above order for the enabled CoS
27793 	 * mappings. For example, if vlan_pri and ip_dscp CoS mappings are
27794 	 * enabled and their priorities are not specified, the following
27795 	 * priority order (high to low) will be used by the HWRM:
27796 	 * # vlan_pri
27797 	 * # ip_dscp
27798 	 * # default cos
27799 	 *
27800 	 * vlan_pri CoS mapping together with default CoS with lower priority
27801 	 * are enabled by default by the HWRM.
27802 	 */
27803 	uint32_t	flags;
27804 	/*
27805 	 * When this bit is '1', this command will configure
27806 	 * the MAC to match the current link state of the PHY.
27807 	 * If the link is not established on the PHY, then this
27808 	 * bit has no effect.
27809 	 */
27810 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_MATCH_LINK			UINT32_C(0x1)
27811 	/*
27812 	 * When this bit is set to '1', the inner VLAN PRI to CoS mapping
27813 	 * is requested to be enabled.
27814 	 */
27815 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_VLAN_PRI2COS_ENABLE	UINT32_C(0x2)
27816 	/*
27817 	 * When this bit is set to '1', tunnel VLAN PRI field to
27818 	 * CoS mapping is requested to be enabled.
27819 	 */
27820 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_TUNNEL_PRI2COS_ENABLE	UINT32_C(0x4)
27821 	/*
27822 	 * When this bit is set to '1', the IP DSCP to CoS mapping is
27823 	 * requested to be enabled.
27824 	 */
27825 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_IP_DSCP2COS_ENABLE		UINT32_C(0x8)
27826 	/*
27827 	 * When this bit is '1', the HWRM is requested to
27828 	 * enable timestamp capture capability on the receive side
27829 	 * of this port.
27830 	 */
27831 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_RX_TS_CAPTURE_ENABLE	UINT32_C(0x10)
27832 	/*
27833 	 * When this bit is '1', the HWRM is requested to
27834 	 * disable timestamp capture capability on the receive side
27835 	 * of this port.
27836 	 */
27837 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_RX_TS_CAPTURE_DISABLE	UINT32_C(0x20)
27838 	/*
27839 	 * When this bit is '1', the HWRM is requested to
27840 	 * enable timestamp capture capability on the transmit side
27841 	 * of this port.
27842 	 */
27843 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_TX_TS_CAPTURE_ENABLE	UINT32_C(0x40)
27844 	/*
27845 	 * When this bit is '1', the HWRM is requested to
27846 	 * disable timestamp capture capability on the transmit side
27847 	 * of this port.
27848 	 */
27849 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_TX_TS_CAPTURE_DISABLE	UINT32_C(0x80)
27850 	/*
27851 	 * When this bit is '1', the Out-Of-Box WoL is requested to
27852 	 * be enabled on this port.
27853 	 */
27854 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_OOB_WOL_ENABLE		UINT32_C(0x100)
27855 	/*
27856 	 * When this bit is '1', the Out-Of-Box WoL is requested to
27857 	 * be disabled on this port.
27858 	 */
27859 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_OOB_WOL_DISABLE		UINT32_C(0x200)
27860 	/*
27861 	 * When this bit is set to '1', the inner VLAN PRI to CoS mapping
27862 	 * is requested to be disabled.
27863 	 */
27864 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_VLAN_PRI2COS_DISABLE	UINT32_C(0x400)
27865 	/*
27866 	 * When this bit is set to '1', tunnel VLAN PRI field to
27867 	 * CoS mapping is requested to be disabled.
27868 	 */
27869 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_TUNNEL_PRI2COS_DISABLE	UINT32_C(0x800)
27870 	/*
27871 	 * When this bit is set to '1', the IP DSCP to CoS mapping is
27872 	 * requested to be disabled.
27873 	 */
27874 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_IP_DSCP2COS_DISABLE	UINT32_C(0x1000)
27875 	/*
27876 	 * When this bit is set to '1', and the ptp_tx_ts_capture_enable
27877 	 * bit is set, then the device uses one step Tx timestamping.
27878 	 * This bit is temporary and used for experimental purposes.
27879 	 */
27880 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_ONE_STEP_TX_TS		UINT32_C(0x2000)
27881 	/*
27882 	 * When this bit is '1', the controller is requested to enable
27883 	 * timestamp capture capability on all packets (not just PTP)
27884 	 * of the receive side of this port.
27885 	 */
27886 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_ALL_RX_TS_CAPTURE_ENABLE	UINT32_C(0x4000)
27887 	/*
27888 	 * When this bit is '1', the controller is requested to disable
27889 	 * timestamp capture capability on all packets (not just PTP)
27890 	 * of the receive side of this port.
27891 	 */
27892 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_ALL_RX_TS_CAPTURE_DISABLE	UINT32_C(0x8000)
27893 	uint32_t	enables;
27894 	/*
27895 	 * This bit must be '1' for the ipg field to be
27896 	 * configured.
27897 	 */
27898 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_IPG				UINT32_C(0x1)
27899 	/*
27900 	 * This bit must be '1' for the lpbk field to be
27901 	 * configured.
27902 	 */
27903 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_LPBK			UINT32_C(0x2)
27904 	/*
27905 	 * This bit must be '1' for the vlan_pri2cos_map_pri field to be
27906 	 * configured.
27907 	 */
27908 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_VLAN_PRI2COS_MAP_PRI	UINT32_C(0x4)
27909 	/*
27910 	 * This bit must be '1' for the tunnel_pri2cos_map_pri field to be
27911 	 * configured.
27912 	 */
27913 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_TUNNEL_PRI2COS_MAP_PRI	UINT32_C(0x10)
27914 	/*
27915 	 * This bit must be '1' for the dscp2cos_map_pri field to be
27916 	 * configured.
27917 	 */
27918 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_DSCP2COS_MAP_PRI		UINT32_C(0x20)
27919 	/*
27920 	 * This bit must be '1' for the rx_ts_capture_ptp_msg_type field to
27921 	 * be configured.
27922 	 */
27923 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_RX_TS_CAPTURE_PTP_MSG_TYPE	UINT32_C(0x40)
27924 	/*
27925 	 * This bit must be '1' for the tx_ts_capture_ptp_msg_type field to
27926 	 * be configured.
27927 	 */
27928 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_TX_TS_CAPTURE_PTP_MSG_TYPE	UINT32_C(0x80)
27929 	/*
27930 	 * This bit must be '1' for the cos_field_cfg field to be
27931 	 * configured.
27932 	 */
27933 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_COS_FIELD_CFG		UINT32_C(0x100)
27934 	/*
27935 	 * This bit must be '1' for the ptp_freq_adj_ppb field to be
27936 	 * configured.
27937 	 */
27938 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_PPB		UINT32_C(0x200)
27939 	/*
27940 	 * This bit must be '1' for the ptp_adj_phase field to be
27941 	 * configured.
27942 	 */
27943 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_PTP_ADJ_PHASE		UINT32_C(0x400)
27944 	/*
27945 	 * This bit must be '1' for the ptp_load_control field to
27946 	 * be configured.
27947 	 */
27948 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_PTP_LOAD_CONTROL		UINT32_C(0x800)
27949 	/* Port ID of port that is to be configured. */
27950 	uint16_t	port_id;
27951 	/*
27952 	 * This value is used to configure the minimum IPG that will
27953 	 * be sent between packets by this port.
27954 	 */
27955 	uint8_t	ipg;
27956 	/* This value controls the loopback setting for the MAC. */
27957 	uint8_t	lpbk;
27958 	/* No loopback is selected. Normal operation. */
27959 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_NONE   UINT32_C(0x0)
27960 	/*
27961 	 * The HW will be configured with local loopback such that
27962 	 * host data is sent back to the host without modification.
27963 	 */
27964 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_LOCAL  UINT32_C(0x1)
27965 	/*
27966 	 * The HW will be configured with remote loopback such that
27967 	 * port logic will send packets back out the transmitter that
27968 	 * are received.
27969 	 */
27970 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_REMOTE UINT32_C(0x2)
27971 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_LAST  HWRM_PORT_MAC_CFG_INPUT_LPBK_REMOTE
27972 	/*
27973 	 * This value controls the priority setting of VLAN PRI to CoS
27974 	 * mapping based on VLAN Tags of inner packet headers of
27975 	 * tunneled packets or packet headers of non-tunneled packets.
27976 	 *
27977 	 * # Each XXX_pri variable shall have a unique priority value
27978 	 * when it is being specified.
27979 	 * # When comparing priorities of mappings, higher value
27980 	 * indicates higher priority.
27981 	 * For example, a value of 0-3 is returned where 0 is being
27982 	 * the lowest priority and 3 is being the highest priority.
27983 	 */
27984 	uint8_t	vlan_pri2cos_map_pri;
27985 	/* Reserved field. */
27986 	uint8_t	reserved1;
27987 	/*
27988 	 * This value controls the priority setting of VLAN PRI to CoS
27989 	 * mapping based on VLAN Tags of tunneled header.
27990 	 * This mapping only applies when tunneled headers
27991 	 * are present.
27992 	 *
27993 	 * # Each XXX_pri variable shall have a unique priority value
27994 	 * when it is being specified.
27995 	 * # When comparing priorities of mappings, higher value
27996 	 * indicates higher priority.
27997 	 * For example, a value of 0-3 is returned where 0 is being
27998 	 * the lowest priority and 3 is being the highest priority.
27999 	 */
28000 	uint8_t	tunnel_pri2cos_map_pri;
28001 	/*
28002 	 * This value controls the priority setting of IP DSCP to CoS
28003 	 * mapping based on inner IP header of tunneled packets or
28004 	 * IP header of non-tunneled packets.
28005 	 *
28006 	 * # Each XXX_pri variable shall have a unique priority value
28007 	 * when it is being specified.
28008 	 * # When comparing priorities of mappings, higher value
28009 	 * indicates higher priority.
28010 	 * For example, a value of 0-3 is returned where 0 is being
28011 	 * the lowest priority and 3 is being the highest priority.
28012 	 */
28013 	uint8_t	dscp2pri_map_pri;
28014 	/*
28015 	 * This is a 16-bit bit mask that is used to request a
28016 	 * specific configuration of time stamp capture of PTP messages
28017 	 * on the receive side of this port.
28018 	 * This field shall be ignored if the ptp_rx_ts_capture_enable
28019 	 * flag is not set in this command.
28020 	 * Otherwise, if bit 'i' is set, then the HWRM is being
28021 	 * requested to configure the receive side of the port to
28022 	 * capture the time stamp of every received PTP message
28023 	 * with messageType field value set to i.
28024 	 */
28025 	uint16_t	rx_ts_capture_ptp_msg_type;
28026 	/*
28027 	 * This is a 16-bit bit mask that is used to request a
28028 	 * specific configuration of time stamp capture of PTP messages
28029 	 * on the transmit side of this port.
28030 	 * This field shall be ignored if the ptp_tx_ts_capture_enable
28031 	 * flag is not set in this command.
28032 	 * Otherwise, if bit 'i' is set, then the HWRM is being
28033 	 * requested to configure the transmit side of the port to
28034 	 * capture the time stamp of every transmitted PTP message
28035 	 * with messageType field value set to i.
28036 	 */
28037 	uint16_t	tx_ts_capture_ptp_msg_type;
28038 	/* Configuration of CoS fields. */
28039 	uint8_t	cos_field_cfg;
28040 	/* Reserved */
28041 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_RSVD1			UINT32_C(0x1)
28042 	/*
28043 	 * This field is used to specify selection of VLAN PRI value
28044 	 * based on whether one or two VLAN Tags are present in
28045 	 * the inner packet headers of tunneled packets or
28046 	 * non-tunneled packets.
28047 	 * This field is valid only if inner VLAN PRI to CoS mapping
28048 	 * is enabled.
28049 	 * If VLAN PRI to CoS mapping is not enabled, then this
28050 	 * field shall be ignored.
28051 	 */
28052 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_MASK	UINT32_C(0x6)
28053 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_SFT	1
28054 	/*
28055 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
28056 	 * present in the inner packet headers
28057 	 */
28058 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_INNERMOST	(UINT32_C(0x0) << 1)
28059 	/*
28060 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
28061 	 * present in the inner packet headers.
28062 	 * No VLAN PRI shall be selected for this configuration
28063 	 * if only one VLAN Tag is present in the inner
28064 	 * packet headers.
28065 	 */
28066 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTER	(UINT32_C(0x1) << 1)
28067 	/*
28068 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
28069 	 * are present in the inner packet headers
28070 	 */
28071 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTERMOST	(UINT32_C(0x2) << 1)
28072 	/* Unspecified */
28073 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED	(UINT32_C(0x3) << 1)
28074 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_LAST	HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED
28075 	/*
28076 	 * This field is used to specify selection of tunnel VLAN
28077 	 * PRI value based on whether one or two VLAN Tags are
28078 	 * present in tunnel headers.
28079 	 * This field is valid only if tunnel VLAN PRI to CoS mapping
28080 	 * is enabled.
28081 	 * If tunnel VLAN PRI to CoS mapping is not enabled, then this
28082 	 * field shall be ignored.
28083 	 */
28084 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_MASK	UINT32_C(0x18)
28085 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_SFT	3
28086 	/*
28087 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
28088 	 * present in the tunnel packet headers
28089 	 */
28090 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_INNERMOST	(UINT32_C(0x0) << 3)
28091 	/*
28092 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
28093 	 * present in the tunnel packet headers.
28094 	 * No tunnel VLAN PRI shall be selected for this
28095 	 * configuration if only one VLAN Tag is present in
28096 	 * the tunnel packet headers.
28097 	 */
28098 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTER	(UINT32_C(0x1) << 3)
28099 	/*
28100 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
28101 	 * are present in the tunnel packet headers
28102 	 */
28103 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTERMOST	(UINT32_C(0x2) << 3)
28104 	/* Unspecified */
28105 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED  (UINT32_C(0x3) << 3)
28106 		#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_LAST	HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED
28107 	/*
28108 	 * This field shall be used to provide default CoS value
28109 	 * that has been configured on this port.
28110 	 * This field is valid only if default CoS mapping
28111 	 * is enabled.
28112 	 * If default CoS mapping is not enabled, then this
28113 	 * field shall be ignored.
28114 	 */
28115 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_DEFAULT_COS_MASK	UINT32_C(0xe0)
28116 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_DEFAULT_COS_SFT	5
28117 	uint8_t	unused_0[3];
28118 	/*
28119 	 * This signed field specifies by how much to adjust the frequency
28120 	 * of sync timer updates (measured in parts per billion).
28121 	 */
28122 	int32_t	ptp_freq_adj_ppb;
28123 	uint8_t	unused_1[3];
28124 	/*
28125 	 * This value controls how PTP configuration like freq_adj and
28126 	 * phase are loaded in the hardware block.
28127 	 */
28128 	uint8_t	ptp_load_control;
28129 	/* PTP configuration is not loaded in hardware. */
28130 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_NONE	UINT32_C(0x0)
28131 	/*
28132 	 * PTP configuration will be loaded immediately in the hardware
28133 	 * block. By default, it will always be immediate.
28134 	 */
28135 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_IMMEDIATE UINT32_C(0x1)
28136 	/*
28137 	 * PTP configuration will loaded at the next Pulse per second (PPS)
28138 	 * event in the hardware block.
28139 	 */
28140 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_PPS_EVENT UINT32_C(0x2)
28141 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_LAST	HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_PPS_EVENT
28142 	/*
28143 	 * This unsigned field specifies the phase offset to be applied
28144 	 * to the PHC (PTP Hardware Clock). This field is specified in
28145 	 * nanoseconds.
28146 	 */
28147 	int64_t	ptp_adj_phase;
28148 } hwrm_port_mac_cfg_input_t, *phwrm_port_mac_cfg_input_t;
28149 
28150 /* hwrm_port_mac_cfg_output (size:128b/16B) */
28151 
28152 typedef struct hwrm_port_mac_cfg_output {
28153 	/* The specific error status for the command. */
28154 	uint16_t	error_code;
28155 	/* The HWRM command request type. */
28156 	uint16_t	req_type;
28157 	/* The sequence ID from the original command. */
28158 	uint16_t	seq_id;
28159 	/* The length of the response data in number of bytes. */
28160 	uint16_t	resp_len;
28161 	/*
28162 	 * This is the configured maximum length of Ethernet packet
28163 	 * payload that is allowed to be received on the port.
28164 	 * This value does not include the number of bytes used by
28165 	 * Ethernet header and trailer (CRC).
28166 	 */
28167 	uint16_t	mru;
28168 	/*
28169 	 * This is the configured maximum length of Ethernet packet
28170 	 * payload that is allowed to be transmitted on the port.
28171 	 * This value does not include the number of bytes used by
28172 	 * Ethernet header and trailer (CRC).
28173 	 */
28174 	uint16_t	mtu;
28175 	/* Current configuration of the IPG value. */
28176 	uint8_t	ipg;
28177 	/* Current value of the loopback value. */
28178 	uint8_t	lpbk;
28179 	/* No loopback is selected. Normal operation. */
28180 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_NONE   UINT32_C(0x0)
28181 	/*
28182 	 * The HW will be configured with local loopback such that
28183 	 * host data is sent back to the host without modification.
28184 	 */
28185 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_LOCAL  UINT32_C(0x1)
28186 	/*
28187 	 * The HW will be configured with remote loopback such that
28188 	 * port logic will send packets back out the transmitter that
28189 	 * are received.
28190 	 */
28191 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_REMOTE UINT32_C(0x2)
28192 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_LAST  HWRM_PORT_MAC_CFG_OUTPUT_LPBK_REMOTE
28193 	uint8_t	unused_0;
28194 	/*
28195 	 * This field is used in Output records to indicate that the output
28196 	 * is completely written to RAM. This field should be read as '1'
28197 	 * to indicate that the output has been completely written. When
28198 	 * writing a command completion or response to an internal processor,
28199 	 * the order of writes has to be such that this field is written last.
28200 	 */
28201 	uint8_t	valid;
28202 } hwrm_port_mac_cfg_output_t, *phwrm_port_mac_cfg_output_t;
28203 
28204 /**********************
28205  * hwrm_port_mac_qcfg *
28206  **********************/
28207 
28208 
28209 /* hwrm_port_mac_qcfg_input (size:192b/24B) */
28210 
28211 typedef struct hwrm_port_mac_qcfg_input {
28212 	/* The HWRM command request type. */
28213 	uint16_t	req_type;
28214 	/*
28215 	 * The completion ring to send the completion event on. This should
28216 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
28217 	 */
28218 	uint16_t	cmpl_ring;
28219 	/*
28220 	 * The sequence ID is used by the driver for tracking multiple
28221 	 * commands. This ID is treated as opaque data by the firmware and
28222 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
28223 	 */
28224 	uint16_t	seq_id;
28225 	/*
28226 	 * The target ID of the command:
28227 	 * * 0x0-0xFFF8 - The function ID
28228 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
28229 	 * * 0xFFFD - Reserved for user-space HWRM interface
28230 	 * * 0xFFFF - HWRM
28231 	 */
28232 	uint16_t	target_id;
28233 	/*
28234 	 * A physical address pointer pointing to a host buffer that the
28235 	 * command's response data will be written. This can be either a host
28236 	 * physical address (HPA) or a guest physical address (GPA) and must
28237 	 * point to a physically contiguous block of memory.
28238 	 */
28239 	uint64_t	resp_addr;
28240 	/* Port ID of port that is to be configured. */
28241 	uint16_t	port_id;
28242 	uint8_t	unused_0[6];
28243 } hwrm_port_mac_qcfg_input_t, *phwrm_port_mac_qcfg_input_t;
28244 
28245 /* hwrm_port_mac_qcfg_output (size:256b/32B) */
28246 
28247 typedef struct hwrm_port_mac_qcfg_output {
28248 	/* The specific error status for the command. */
28249 	uint16_t	error_code;
28250 	/* The HWRM command request type. */
28251 	uint16_t	req_type;
28252 	/* The sequence ID from the original command. */
28253 	uint16_t	seq_id;
28254 	/* The length of the response data in number of bytes. */
28255 	uint16_t	resp_len;
28256 	/*
28257 	 * This is the configured maximum length of Ethernet packet
28258 	 * payload that is allowed to be received on the port.
28259 	 * This value does not include the number of bytes used by the
28260 	 * Ethernet header and trailer (CRC).
28261 	 */
28262 	uint16_t	mru;
28263 	/*
28264 	 * This is the configured maximum length of Ethernet packet
28265 	 * payload that is allowed to be transmitted on the port.
28266 	 * This value does not include the number of bytes used by the
28267 	 * Ethernet header and trailer (CRC).
28268 	 */
28269 	uint16_t	mtu;
28270 	/*
28271 	 * The minimum IPG that will
28272 	 * be sent between packets by this port.
28273 	 */
28274 	uint8_t	ipg;
28275 	/* The loopback setting for the MAC. */
28276 	uint8_t	lpbk;
28277 	/* No loopback is selected. Normal operation. */
28278 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_NONE   UINT32_C(0x0)
28279 	/*
28280 	 * The HW will be configured with local loopback such that
28281 	 * host data is sent back to the host without modification.
28282 	 */
28283 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_LOCAL  UINT32_C(0x1)
28284 	/*
28285 	 * The HW will be configured with remote loopback such that
28286 	 * port logic will send packets back out the transmitter that
28287 	 * are received.
28288 	 */
28289 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_REMOTE UINT32_C(0x2)
28290 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_LAST  HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_REMOTE
28291 	/*
28292 	 * Priority setting for VLAN PRI to CoS mapping.
28293 	 * # Each XXX_pri variable shall have a unique priority value
28294 	 * when it is being used.
28295 	 * # When comparing priorities of mappings, higher value
28296 	 * indicates higher priority.
28297 	 * For example, a value of 0-3 is returned where 0 is being
28298 	 * the lowest priority and 3 is being the highest priority.
28299 	 * # If the corresponding CoS mapping is not enabled, then this
28300 	 * field should be ignored.
28301 	 * # This value indicates the normalized priority value retained
28302 	 * in the HWRM.
28303 	 */
28304 	uint8_t	vlan_pri2cos_map_pri;
28305 	/*
28306 	 * In this field, a number of CoS mappings related flags
28307 	 * are used to indicate configured CoS mappings.
28308 	 */
28309 	uint8_t	flags;
28310 	/*
28311 	 * When this bit is set to '1', the inner VLAN PRI to CoS mapping
28312 	 * is enabled.
28313 	 */
28314 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_VLAN_PRI2COS_ENABLE	UINT32_C(0x1)
28315 	/*
28316 	 * When this bit is set to '1', tunnel VLAN PRI field to
28317 	 * CoS mapping is enabled.
28318 	 */
28319 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_TUNNEL_PRI2COS_ENABLE	UINT32_C(0x2)
28320 	/*
28321 	 * When this bit is set to '1', the IP DSCP to CoS mapping is
28322 	 * enabled.
28323 	 */
28324 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_IP_DSCP2COS_ENABLE	UINT32_C(0x4)
28325 	/*
28326 	 * When this bit is '1', the Out-Of-Box WoL is enabled on this
28327 	 * port.
28328 	 */
28329 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_OOB_WOL_ENABLE		UINT32_C(0x8)
28330 	/* When this bit is '1', PTP is enabled for RX on this port. */
28331 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_PTP_RX_TS_CAPTURE_ENABLE	UINT32_C(0x10)
28332 	/* When this bit is '1', PTP is enabled for TX on this port. */
28333 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_PTP_TX_TS_CAPTURE_ENABLE	UINT32_C(0x20)
28334 	/*
28335 	 * Priority setting for tunnel VLAN PRI to CoS mapping.
28336 	 * # Each XXX_pri variable shall have a unique priority value
28337 	 * when it is being used.
28338 	 * # When comparing priorities of mappings, higher value
28339 	 * indicates higher priority.
28340 	 * For example, a value of 0-3 is returned where 0 is being
28341 	 * the lowest priority and 3 is being the highest priority.
28342 	 * # If the corresponding CoS mapping is not enabled, then this
28343 	 * field should be ignored.
28344 	 * # This value indicates the normalized priority value retained
28345 	 * in the HWRM.
28346 	 */
28347 	uint8_t	tunnel_pri2cos_map_pri;
28348 	/*
28349 	 * Priority setting for DSCP to PRI mapping.
28350 	 * # Each XXX_pri variable shall have a unique priority value
28351 	 * when it is being used.
28352 	 * # When comparing priorities of mappings, higher value
28353 	 * indicates higher priority.
28354 	 * For example, a value of 0-3 is returned where 0 is being
28355 	 * the lowest priority and 3 is being the highest priority.
28356 	 * # If the corresponding CoS mapping is not enabled, then this
28357 	 * field should be ignored.
28358 	 * # This value indicates the normalized priority value retained
28359 	 * in the HWRM.
28360 	 */
28361 	uint8_t	dscp2pri_map_pri;
28362 	/*
28363 	 * This is a 16-bit bit mask that represents the
28364 	 * current configuration of time stamp capture of PTP messages
28365 	 * on the receive side of this port.
28366 	 * If bit 'i' is set, then the receive side of the port
28367 	 * is configured to capture the time stamp of every
28368 	 * received PTP message with messageType field value set
28369 	 * to i.
28370 	 * If all bits are set to 0 (i.e. field value set 0),
28371 	 * then the receive side of the port is not configured
28372 	 * to capture timestamp for PTP messages.
28373 	 * If all bits are set to 1, then the receive side of the
28374 	 * port is configured to capture timestamp for all PTP
28375 	 * messages.
28376 	 */
28377 	uint16_t	rx_ts_capture_ptp_msg_type;
28378 	/*
28379 	 * This is a 16-bit bit mask that represents the
28380 	 * current configuration of time stamp capture of PTP messages
28381 	 * on the transmit side of this port.
28382 	 * If bit 'i' is set, then the transmit side of the port
28383 	 * is configured to capture the time stamp of every
28384 	 * received PTP message with messageType field value set
28385 	 * to i.
28386 	 * If all bits are set to 0 (i.e. field value set 0),
28387 	 * then the transmit side of the port is not configured
28388 	 * to capture timestamp for PTP messages.
28389 	 * If all bits are set to 1, then the transmit side of the
28390 	 * port is configured to capture timestamp for all PTP
28391 	 * messages.
28392 	 */
28393 	uint16_t	tx_ts_capture_ptp_msg_type;
28394 	/* Configuration of CoS fields. */
28395 	uint8_t	cos_field_cfg;
28396 	/* Reserved */
28397 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_RSVD			UINT32_C(0x1)
28398 	/*
28399 	 * This field is used for selecting VLAN PRI value
28400 	 * based on whether one or two VLAN Tags are present in
28401 	 * the inner packet headers of tunneled packets or
28402 	 * non-tunneled packets.
28403 	 */
28404 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_MASK	UINT32_C(0x6)
28405 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_SFT	1
28406 	/*
28407 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
28408 	 * present in the inner packet headers
28409 	 */
28410 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_INNERMOST	(UINT32_C(0x0) << 1)
28411 	/*
28412 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
28413 	 * present in the inner packet headers.
28414 	 * No VLAN PRI is selected for this configuration
28415 	 * if only one VLAN Tag is present in the inner
28416 	 * packet headers.
28417 	 */
28418 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTER	(UINT32_C(0x1) << 1)
28419 	/*
28420 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
28421 	 * are present in the inner packet headers
28422 	 */
28423 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTERMOST	(UINT32_C(0x2) << 1)
28424 	/* Unspecified */
28425 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED	(UINT32_C(0x3) << 1)
28426 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_LAST	HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED
28427 	/*
28428 	 * This field is used for selecting tunnel VLAN PRI value
28429 	 * based on whether one or two VLAN Tags are present in
28430 	 * the tunnel headers of tunneled packets. This selection
28431 	 * does not apply to non-tunneled packets.
28432 	 */
28433 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_MASK	UINT32_C(0x18)
28434 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_SFT	3
28435 	/*
28436 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
28437 	 * present in the tunnel packet headers
28438 	 */
28439 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_INNERMOST	(UINT32_C(0x0) << 3)
28440 	/*
28441 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
28442 	 * present in the tunnel packet headers.
28443 	 * No VLAN PRI is selected for this configuration
28444 	 * if only one VLAN Tag is present in the tunnel
28445 	 * packet headers.
28446 	 */
28447 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTER	(UINT32_C(0x1) << 3)
28448 	/*
28449 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
28450 	 * are present in the tunnel packet headers
28451 	 */
28452 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTERMOST	(UINT32_C(0x2) << 3)
28453 	/* Unspecified */
28454 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED  (UINT32_C(0x3) << 3)
28455 		#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_LAST	HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED
28456 	/*
28457 	 * This field is used to provide default CoS value that
28458 	 * has been configured on this port.
28459 	 */
28460 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_DEFAULT_COS_MASK	UINT32_C(0xe0)
28461 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_DEFAULT_COS_SFT	5
28462 	uint8_t	unused_1;
28463 	uint16_t	port_svif_info;
28464 	/*
28465 	 * This field specifies the source virtual interface of the port
28466 	 * being queried. Drivers can use this to program port svif field in
28467 	 * the L2 context table.
28468 	 */
28469 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_MASK	UINT32_C(0x7fff)
28470 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_SFT	0
28471 	/* This field specifies whether port_svif is valid or not */
28472 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_VALID	UINT32_C(0x8000)
28473 	/*
28474 	 * This field indicates the configured load control for PTP
28475 	 * time of day (TOD) block.
28476 	 */
28477 	uint8_t	ptp_load_control;
28478 	/* Indicates the current load control is none. */
28479 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_NONE	UINT32_C(0x0)
28480 	/* Indicates the current load control is immediate. */
28481 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_IMMEDIATE UINT32_C(0x1)
28482 	/*
28483 	 * Indicates current load control is at next Pulse per Second (PPS)
28484 	 * event.
28485 	 */
28486 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_PPS_EVENT UINT32_C(0x2)
28487 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_LAST	HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_PPS_EVENT
28488 	uint8_t	unused_2[4];
28489 	/*
28490 	 * This field is used in Output records to indicate that the output
28491 	 * is completely written to RAM. This field should be read as '1'
28492 	 * to indicate that the output has been completely written. When
28493 	 * writing a command completion or response to an internal processor,
28494 	 * the order of writes has to be such that this field is written last.
28495 	 */
28496 	uint8_t	valid;
28497 } hwrm_port_mac_qcfg_output_t, *phwrm_port_mac_qcfg_output_t;
28498 
28499 /**************************
28500  * hwrm_port_mac_ptp_qcfg *
28501  **************************/
28502 
28503 
28504 /* hwrm_port_mac_ptp_qcfg_input (size:192b/24B) */
28505 
28506 typedef struct hwrm_port_mac_ptp_qcfg_input {
28507 	/* The HWRM command request type. */
28508 	uint16_t	req_type;
28509 	/*
28510 	 * The completion ring to send the completion event on. This should
28511 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
28512 	 */
28513 	uint16_t	cmpl_ring;
28514 	/*
28515 	 * The sequence ID is used by the driver for tracking multiple
28516 	 * commands. This ID is treated as opaque data by the firmware and
28517 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
28518 	 */
28519 	uint16_t	seq_id;
28520 	/*
28521 	 * The target ID of the command:
28522 	 * * 0x0-0xFFF8 - The function ID
28523 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
28524 	 * * 0xFFFD - Reserved for user-space HWRM interface
28525 	 * * 0xFFFF - HWRM
28526 	 */
28527 	uint16_t	target_id;
28528 	/*
28529 	 * A physical address pointer pointing to a host buffer that the
28530 	 * command's response data will be written. This can be either a host
28531 	 * physical address (HPA) or a guest physical address (GPA) and must
28532 	 * point to a physically contiguous block of memory.
28533 	 */
28534 	uint64_t	resp_addr;
28535 	/* Port ID of port that is being queried. */
28536 	uint16_t	port_id;
28537 	uint8_t	unused_0[6];
28538 } hwrm_port_mac_ptp_qcfg_input_t, *phwrm_port_mac_ptp_qcfg_input_t;
28539 
28540 /* hwrm_port_mac_ptp_qcfg_output (size:704b/88B) */
28541 
28542 typedef struct hwrm_port_mac_ptp_qcfg_output {
28543 	/* The specific error status for the command. */
28544 	uint16_t	error_code;
28545 	/* The HWRM command request type. */
28546 	uint16_t	req_type;
28547 	/* The sequence ID from the original command. */
28548 	uint16_t	seq_id;
28549 	/* The length of the response data in number of bytes. */
28550 	uint16_t	resp_len;
28551 	/*
28552 	 * In this field, a number of PTP related flags
28553 	 * are used to indicate configured PTP capabilities.
28554 	 */
28555 	uint8_t	flags;
28556 	/*
28557 	 * When this bit is set to '1', the PTP related registers are
28558 	 * directly accessible by the host.
28559 	 */
28560 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_DIRECT_ACCESS			UINT32_C(0x1)
28561 	/*
28562 	 * When this bit is set to '1', the device supports one-step
28563 	 * Tx timestamping.
28564 	 */
28565 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_ONE_STEP_TX_TS			UINT32_C(0x4)
28566 	/*
28567 	 * When this bit is set to '1', the PTP information is accessible
28568 	 * via HWRM commands.
28569 	 */
28570 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_HWRM_ACCESS			UINT32_C(0x8)
28571 	/*
28572 	 * When this bit is set to '1', two specific registers for current
28573 	 * time (ts_ref_clock_reg_lower and ts_ref_clock_reg_upper) are
28574 	 * directly accessible by the host.
28575 	 */
28576 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_PARTIAL_DIRECT_ACCESS_REF_CLOCK	UINT32_C(0x10)
28577 	/*
28578 	 * When this bit is set to '1', it indicates that driver has
28579 	 * configured 64bit RTC.
28580 	 */
28581 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_RTC_CONFIGURED			UINT32_C(0x20)
28582 	/*
28583 	 * When this bit is set to '1', it indicates that current time
28584 	 * exposed to driver is 64bit.
28585 	 */
28586 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_64B_PHC_TIME			UINT32_C(0x40)
28587 	uint8_t	unused_0[3];
28588 	/*
28589 	 * Offset of the PTP register for the lower 32 bits of timestamp
28590 	 * for RX.
28591 	 */
28592 	uint32_t	rx_ts_reg_off_lower;
28593 	/*
28594 	 * Offset of the PTP register for the upper 32 bits of timestamp
28595 	 * for RX.
28596 	 */
28597 	uint32_t	rx_ts_reg_off_upper;
28598 	/* Offset of the PTP register for the sequence ID for RX. */
28599 	uint32_t	rx_ts_reg_off_seq_id;
28600 	/* Offset of the first PTP source ID for RX. */
28601 	uint32_t	rx_ts_reg_off_src_id_0;
28602 	/* Offset of the second PTP source ID for RX. */
28603 	uint32_t	rx_ts_reg_off_src_id_1;
28604 	/* Offset of the third PTP source ID for RX. */
28605 	uint32_t	rx_ts_reg_off_src_id_2;
28606 	/* Offset of the domain ID for RX. */
28607 	uint32_t	rx_ts_reg_off_domain_id;
28608 	/* Offset of the PTP FIFO register for RX. */
28609 	uint32_t	rx_ts_reg_off_fifo;
28610 	/* Offset of the PTP advance FIFO register for RX. */
28611 	uint32_t	rx_ts_reg_off_fifo_adv;
28612 	/* PTP timestamp granularity for RX. */
28613 	uint32_t	rx_ts_reg_off_granularity;
28614 	/*
28615 	 * Offset of the PTP register for the lower 32 bits of timestamp
28616 	 * for TX.
28617 	 */
28618 	uint32_t	tx_ts_reg_off_lower;
28619 	/*
28620 	 * Offset of the PTP register for the upper 32 bits of timestamp
28621 	 * for TX.
28622 	 */
28623 	uint32_t	tx_ts_reg_off_upper;
28624 	/* Offset of the PTP register for the sequence ID for TX. */
28625 	uint32_t	tx_ts_reg_off_seq_id;
28626 	/* Offset of the PTP FIFO register for TX. */
28627 	uint32_t	tx_ts_reg_off_fifo;
28628 	/* PTP timestamp granularity for TX. */
28629 	uint32_t	tx_ts_reg_off_granularity;
28630 	/* Offset of register to get lower 32 bits of current time. */
28631 	uint32_t	ts_ref_clock_reg_lower;
28632 	/* Offset of register to get upper 32 bits of current time. */
28633 	uint32_t	ts_ref_clock_reg_upper;
28634 	uint8_t	unused_1[7];
28635 	/*
28636 	 * This field is used in Output records to indicate that the output
28637 	 * is completely written to RAM. This field should be read as '1'
28638 	 * to indicate that the output has been completely written. When
28639 	 * writing a command completion or response to an internal processor,
28640 	 * the order of writes has to be such that this field is written last.
28641 	 */
28642 	uint8_t	valid;
28643 } hwrm_port_mac_ptp_qcfg_output_t, *phwrm_port_mac_ptp_qcfg_output_t;
28644 
28645 /* Port Tx Statistics Format */
28646 /* tx_port_stats (size:3264b/408B) */
28647 
28648 typedef struct tx_port_stats {
28649 	/* Total Number of 64 Bytes frames transmitted */
28650 	uint64_t	tx_64b_frames;
28651 	/* Total Number of 65-127 Bytes frames transmitted */
28652 	uint64_t	tx_65b_127b_frames;
28653 	/* Total Number of 128-255 Bytes frames transmitted */
28654 	uint64_t	tx_128b_255b_frames;
28655 	/* Total Number of 256-511 Bytes frames transmitted */
28656 	uint64_t	tx_256b_511b_frames;
28657 	/* Total Number of 512-1023 Bytes frames transmitted */
28658 	uint64_t	tx_512b_1023b_frames;
28659 	/* Total Number of 1024-1518 Bytes frames transmitted */
28660 	uint64_t	tx_1024b_1518b_frames;
28661 	/*
28662 	 * Total Number of each good VLAN (excludes FCS errors)
28663 	 * frame transmitted which is 1519 to 1522 bytes in length
28664 	 * inclusive (excluding framing bits but including FCS bytes).
28665 	 */
28666 	uint64_t	tx_good_vlan_frames;
28667 	/* Total Number of 1519-2047 Bytes frames transmitted */
28668 	uint64_t	tx_1519b_2047b_frames;
28669 	/* Total Number of 2048-4095 Bytes frames transmitted */
28670 	uint64_t	tx_2048b_4095b_frames;
28671 	/* Total Number of 4096-9216 Bytes frames transmitted */
28672 	uint64_t	tx_4096b_9216b_frames;
28673 	/* Total Number of 9217-16383 Bytes frames transmitted */
28674 	uint64_t	tx_9217b_16383b_frames;
28675 	/* Total Number of good frames transmitted */
28676 	uint64_t	tx_good_frames;
28677 	/* Total Number of frames transmitted */
28678 	uint64_t	tx_total_frames;
28679 	/* Total number of unicast frames transmitted */
28680 	uint64_t	tx_ucast_frames;
28681 	/* Total number of multicast frames transmitted */
28682 	uint64_t	tx_mcast_frames;
28683 	/* Total number of broadcast frames transmitted */
28684 	uint64_t	tx_bcast_frames;
28685 	/* Total number of PAUSE control frames transmitted */
28686 	uint64_t	tx_pause_frames;
28687 	/*
28688 	 * Total number of PFC/per-priority PAUSE
28689 	 * control frames transmitted
28690 	 */
28691 	uint64_t	tx_pfc_frames;
28692 	/* Total number of jabber frames transmitted */
28693 	uint64_t	tx_jabber_frames;
28694 	/* Total number of frames transmitted with FCS error */
28695 	uint64_t	tx_fcs_err_frames;
28696 	/* Total number of control frames transmitted */
28697 	uint64_t	tx_control_frames;
28698 	/* Total number of over-sized frames transmitted */
28699 	uint64_t	tx_oversz_frames;
28700 	/* Total number of frames with single deferral */
28701 	uint64_t	tx_single_dfrl_frames;
28702 	/* Total number of frames with multiple deferrals */
28703 	uint64_t	tx_multi_dfrl_frames;
28704 	/* Total number of frames with single collision */
28705 	uint64_t	tx_single_coll_frames;
28706 	/* Total number of frames with multiple collisions */
28707 	uint64_t	tx_multi_coll_frames;
28708 	/* Total number of frames with late collisions */
28709 	uint64_t	tx_late_coll_frames;
28710 	/* Total number of frames with excessive collisions */
28711 	uint64_t	tx_excessive_coll_frames;
28712 	/* Total number of fragmented frames transmitted */
28713 	uint64_t	tx_frag_frames;
28714 	/* Total number of transmit errors */
28715 	uint64_t	tx_err;
28716 	/* Total number of single VLAN tagged frames transmitted */
28717 	uint64_t	tx_tagged_frames;
28718 	/* Total number of double VLAN tagged frames transmitted */
28719 	uint64_t	tx_dbl_tagged_frames;
28720 	/* Total number of runt frames transmitted */
28721 	uint64_t	tx_runt_frames;
28722 	/* Total number of TX FIFO under runs */
28723 	uint64_t	tx_fifo_underruns;
28724 	/*
28725 	 * Total number of PFC frames with PFC enabled bit for
28726 	 * Pri 0 transmitted
28727 	 */
28728 	uint64_t	tx_pfc_ena_frames_pri0;
28729 	/*
28730 	 * Total number of PFC frames with PFC enabled bit for
28731 	 * Pri 1 transmitted
28732 	 */
28733 	uint64_t	tx_pfc_ena_frames_pri1;
28734 	/*
28735 	 * Total number of PFC frames with PFC enabled bit for
28736 	 * Pri 2 transmitted
28737 	 */
28738 	uint64_t	tx_pfc_ena_frames_pri2;
28739 	/*
28740 	 * Total number of PFC frames with PFC enabled bit for
28741 	 * Pri 3 transmitted
28742 	 */
28743 	uint64_t	tx_pfc_ena_frames_pri3;
28744 	/*
28745 	 * Total number of PFC frames with PFC enabled bit for
28746 	 * Pri 4 transmitted
28747 	 */
28748 	uint64_t	tx_pfc_ena_frames_pri4;
28749 	/*
28750 	 * Total number of PFC frames with PFC enabled bit for
28751 	 * Pri 5 transmitted
28752 	 */
28753 	uint64_t	tx_pfc_ena_frames_pri5;
28754 	/*
28755 	 * Total number of PFC frames with PFC enabled bit for
28756 	 * Pri 6 transmitted
28757 	 */
28758 	uint64_t	tx_pfc_ena_frames_pri6;
28759 	/*
28760 	 * Total number of PFC frames with PFC enabled bit for
28761 	 * Pri 7 transmitted
28762 	 */
28763 	uint64_t	tx_pfc_ena_frames_pri7;
28764 	/* Total number of EEE LPI Events on TX */
28765 	uint64_t	tx_eee_lpi_events;
28766 	/* EEE LPI Duration Counter on TX */
28767 	uint64_t	tx_eee_lpi_duration;
28768 	/*
28769 	 * Total number of Link Level Flow Control (LLFC) messages
28770 	 * transmitted
28771 	 */
28772 	uint64_t	tx_llfc_logical_msgs;
28773 	/* Total number of HCFC messages transmitted */
28774 	uint64_t	tx_hcfc_msgs;
28775 	/* Total number of TX collisions */
28776 	uint64_t	tx_total_collisions;
28777 	/* Total number of transmitted bytes */
28778 	uint64_t	tx_bytes;
28779 	/* Total number of end-to-end HOL frames */
28780 	uint64_t	tx_xthol_frames;
28781 	/* Total Tx Drops per Port reported by STATS block */
28782 	uint64_t	tx_stat_discard;
28783 	/* Total Tx Error Drops per Port reported by STATS block */
28784 	uint64_t	tx_stat_error;
28785 } tx_port_stats_t, *ptx_port_stats_t;
28786 
28787 /* Port Rx Statistics Format */
28788 /* rx_port_stats (size:4224b/528B) */
28789 
28790 typedef struct rx_port_stats {
28791 	/* Total Number of 64 Bytes frames received */
28792 	uint64_t	rx_64b_frames;
28793 	/* Total Number of 65-127 Bytes frames received */
28794 	uint64_t	rx_65b_127b_frames;
28795 	/* Total Number of 128-255 Bytes frames received */
28796 	uint64_t	rx_128b_255b_frames;
28797 	/* Total Number of 256-511 Bytes frames received */
28798 	uint64_t	rx_256b_511b_frames;
28799 	/* Total Number of 512-1023 Bytes frames received */
28800 	uint64_t	rx_512b_1023b_frames;
28801 	/* Total Number of 1024-1518 Bytes frames received */
28802 	uint64_t	rx_1024b_1518b_frames;
28803 	/*
28804 	 * Total Number of each good VLAN (excludes FCS errors)
28805 	 * frame received which is 1519 to 1522 bytes in length
28806 	 * inclusive (excluding framing bits but including FCS bytes).
28807 	 */
28808 	uint64_t	rx_good_vlan_frames;
28809 	/* Total Number of 1519-2047 Bytes frames received */
28810 	uint64_t	rx_1519b_2047b_frames;
28811 	/* Total Number of 2048-4095 Bytes frames received */
28812 	uint64_t	rx_2048b_4095b_frames;
28813 	/* Total Number of 4096-9216 Bytes frames received */
28814 	uint64_t	rx_4096b_9216b_frames;
28815 	/* Total Number of 9217-16383 Bytes frames received */
28816 	uint64_t	rx_9217b_16383b_frames;
28817 	/* Total number of frames received */
28818 	uint64_t	rx_total_frames;
28819 	/* Total number of unicast frames received */
28820 	uint64_t	rx_ucast_frames;
28821 	/* Total number of multicast frames received */
28822 	uint64_t	rx_mcast_frames;
28823 	/* Total number of broadcast frames received */
28824 	uint64_t	rx_bcast_frames;
28825 	/* Total number of received frames with FCS error */
28826 	uint64_t	rx_fcs_err_frames;
28827 	/* Total number of control frames received */
28828 	uint64_t	rx_ctrl_frames;
28829 	/* Total number of PAUSE frames received */
28830 	uint64_t	rx_pause_frames;
28831 	/* Total number of PFC frames received */
28832 	uint64_t	rx_pfc_frames;
28833 	/*
28834 	 * Total number of frames received with an unsupported
28835 	 * opcode
28836 	 */
28837 	uint64_t	rx_unsupported_opcode_frames;
28838 	/*
28839 	 * Total number of frames received with an unsupported
28840 	 * DA for pause and PFC
28841 	 */
28842 	uint64_t	rx_unsupported_da_pausepfc_frames;
28843 	/* Total number of frames received with an unsupported SA */
28844 	uint64_t	rx_wrong_sa_frames;
28845 	/* Total number of received packets with alignment error */
28846 	uint64_t	rx_align_err_frames;
28847 	/* Total number of received frames with out-of-range length */
28848 	uint64_t	rx_oor_len_frames;
28849 	/* Total number of received frames with error termination */
28850 	uint64_t	rx_code_err_frames;
28851 	/*
28852 	 * Total number of received frames with a false carrier is
28853 	 * detected during idle, as defined by RX_ER samples active
28854 	 * and RXD is 0xE. The event is reported along with the
28855 	 * statistics generated on the next received frame. Only
28856 	 * one false carrier condition can be detected and logged
28857 	 * between frames.
28858 	 *
28859 	 * Carrier event, valid for 10M/100M speed modes only.
28860 	 */
28861 	uint64_t	rx_false_carrier_frames;
28862 	/* Total number of over-sized frames received */
28863 	uint64_t	rx_ovrsz_frames;
28864 	/* Total number of jabber packets received */
28865 	uint64_t	rx_jbr_frames;
28866 	/* Total number of received frames with MTU error */
28867 	uint64_t	rx_mtu_err_frames;
28868 	/* Total number of received frames with CRC match */
28869 	uint64_t	rx_match_crc_frames;
28870 	/* Total number of frames received promiscuously */
28871 	uint64_t	rx_promiscuous_frames;
28872 	/*
28873 	 * Total number of received frames with one or two VLAN
28874 	 * tags
28875 	 */
28876 	uint64_t	rx_tagged_frames;
28877 	/* Total number of received frames with two VLAN tags */
28878 	uint64_t	rx_double_tagged_frames;
28879 	/* Total number of truncated frames received */
28880 	uint64_t	rx_trunc_frames;
28881 	/* Total number of good frames (without errors) received */
28882 	uint64_t	rx_good_frames;
28883 	/*
28884 	 * Total number of received PFC frames with transition from
28885 	 * XON to XOFF on Pri 0
28886 	 */
28887 	uint64_t	rx_pfc_xon2xoff_frames_pri0;
28888 	/*
28889 	 * Total number of received PFC frames with transition from
28890 	 * XON to XOFF on Pri 1
28891 	 */
28892 	uint64_t	rx_pfc_xon2xoff_frames_pri1;
28893 	/*
28894 	 * Total number of received PFC frames with transition from
28895 	 * XON to XOFF on Pri 2
28896 	 */
28897 	uint64_t	rx_pfc_xon2xoff_frames_pri2;
28898 	/*
28899 	 * Total number of received PFC frames with transition from
28900 	 * XON to XOFF on Pri 3
28901 	 */
28902 	uint64_t	rx_pfc_xon2xoff_frames_pri3;
28903 	/*
28904 	 * Total number of received PFC frames with transition from
28905 	 * XON to XOFF on Pri 4
28906 	 */
28907 	uint64_t	rx_pfc_xon2xoff_frames_pri4;
28908 	/*
28909 	 * Total number of received PFC frames with transition from
28910 	 * XON to XOFF on Pri 5
28911 	 */
28912 	uint64_t	rx_pfc_xon2xoff_frames_pri5;
28913 	/*
28914 	 * Total number of received PFC frames with transition from
28915 	 * XON to XOFF on Pri 6
28916 	 */
28917 	uint64_t	rx_pfc_xon2xoff_frames_pri6;
28918 	/*
28919 	 * Total number of received PFC frames with transition from
28920 	 * XON to XOFF on Pri 7
28921 	 */
28922 	uint64_t	rx_pfc_xon2xoff_frames_pri7;
28923 	/*
28924 	 * Total number of received PFC frames with PFC enabled
28925 	 * bit for Pri 0
28926 	 */
28927 	uint64_t	rx_pfc_ena_frames_pri0;
28928 	/*
28929 	 * Total number of received PFC frames with PFC enabled
28930 	 * bit for Pri 1
28931 	 */
28932 	uint64_t	rx_pfc_ena_frames_pri1;
28933 	/*
28934 	 * Total number of received PFC frames with PFC enabled
28935 	 * bit for Pri 2
28936 	 */
28937 	uint64_t	rx_pfc_ena_frames_pri2;
28938 	/*
28939 	 * Total number of received PFC frames with PFC enabled
28940 	 * bit for Pri 3
28941 	 */
28942 	uint64_t	rx_pfc_ena_frames_pri3;
28943 	/*
28944 	 * Total number of received PFC frames with PFC enabled
28945 	 * bit for Pri 4
28946 	 */
28947 	uint64_t	rx_pfc_ena_frames_pri4;
28948 	/*
28949 	 * Total number of received PFC frames with PFC enabled
28950 	 * bit for Pri 5
28951 	 */
28952 	uint64_t	rx_pfc_ena_frames_pri5;
28953 	/*
28954 	 * Total number of received PFC frames with PFC enabled
28955 	 * bit for Pri 6
28956 	 */
28957 	uint64_t	rx_pfc_ena_frames_pri6;
28958 	/*
28959 	 * Total number of received PFC frames with PFC enabled
28960 	 * bit for Pri 7
28961 	 */
28962 	uint64_t	rx_pfc_ena_frames_pri7;
28963 	/* Total Number of frames received with SCH CRC error */
28964 	uint64_t	rx_sch_crc_err_frames;
28965 	/* Total Number of under-sized frames received */
28966 	uint64_t	rx_undrsz_frames;
28967 	/* Total Number of fragmented frames received */
28968 	uint64_t	rx_frag_frames;
28969 	/* Total number of RX EEE LPI Events */
28970 	uint64_t	rx_eee_lpi_events;
28971 	/* EEE LPI Duration Counter on RX */
28972 	uint64_t	rx_eee_lpi_duration;
28973 	/*
28974 	 * Total number of physical type Link Level Flow Control
28975 	 * (LLFC) messages received
28976 	 */
28977 	uint64_t	rx_llfc_physical_msgs;
28978 	/*
28979 	 * Total number of logical type Link Level Flow Control
28980 	 * (LLFC) messages received
28981 	 */
28982 	uint64_t	rx_llfc_logical_msgs;
28983 	/*
28984 	 * Total number of logical type Link Level Flow Control
28985 	 * (LLFC) messages received with CRC error
28986 	 */
28987 	uint64_t	rx_llfc_msgs_with_crc_err;
28988 	/* Total number of HCFC messages received */
28989 	uint64_t	rx_hcfc_msgs;
28990 	/* Total number of HCFC messages received with CRC error */
28991 	uint64_t	rx_hcfc_msgs_with_crc_err;
28992 	/* Total number of received bytes */
28993 	uint64_t	rx_bytes;
28994 	/* Total number of bytes received in runt frames */
28995 	uint64_t	rx_runt_bytes;
28996 	/* Total number of runt frames received */
28997 	uint64_t	rx_runt_frames;
28998 	/* Total Rx Discards per Port reported by STATS block */
28999 	uint64_t	rx_stat_discard;
29000 	uint64_t	rx_stat_err;
29001 } rx_port_stats_t, *prx_port_stats_t;
29002 
29003 /********************
29004  * hwrm_port_qstats *
29005  ********************/
29006 
29007 
29008 /* hwrm_port_qstats_input (size:320b/40B) */
29009 
29010 typedef struct hwrm_port_qstats_input {
29011 	/* The HWRM command request type. */
29012 	uint16_t	req_type;
29013 	/*
29014 	 * The completion ring to send the completion event on. This should
29015 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
29016 	 */
29017 	uint16_t	cmpl_ring;
29018 	/*
29019 	 * The sequence ID is used by the driver for tracking multiple
29020 	 * commands. This ID is treated as opaque data by the firmware and
29021 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
29022 	 */
29023 	uint16_t	seq_id;
29024 	/*
29025 	 * The target ID of the command:
29026 	 * * 0x0-0xFFF8 - The function ID
29027 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
29028 	 * * 0xFFFD - Reserved for user-space HWRM interface
29029 	 * * 0xFFFF - HWRM
29030 	 */
29031 	uint16_t	target_id;
29032 	/*
29033 	 * A physical address pointer pointing to a host buffer that the
29034 	 * command's response data will be written. This can be either a host
29035 	 * physical address (HPA) or a guest physical address (GPA) and must
29036 	 * point to a physically contiguous block of memory.
29037 	 */
29038 	uint64_t	resp_addr;
29039 	/* Port ID of port that is being queried. */
29040 	uint16_t	port_id;
29041 	uint8_t	flags;
29042 	/*
29043 	 * This bit is set to 1 when request is for a counter mask,
29044 	 * representing the width of each of the stats counters, rather
29045 	 * than counters themselves.
29046 	 */
29047 	#define HWRM_PORT_QSTATS_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x1)
29048 	uint8_t	unused_0[5];
29049 	/*
29050 	 * This is the host address where
29051 	 * Tx port statistics will be stored
29052 	 */
29053 	uint64_t	tx_stat_host_addr;
29054 	/*
29055 	 * This is the host address where
29056 	 * Rx port statistics will be stored
29057 	 */
29058 	uint64_t	rx_stat_host_addr;
29059 } hwrm_port_qstats_input_t, *phwrm_port_qstats_input_t;
29060 
29061 /* hwrm_port_qstats_output (size:128b/16B) */
29062 
29063 typedef struct hwrm_port_qstats_output {
29064 	/* The specific error status for the command. */
29065 	uint16_t	error_code;
29066 	/* The HWRM command request type. */
29067 	uint16_t	req_type;
29068 	/* The sequence ID from the original command. */
29069 	uint16_t	seq_id;
29070 	/* The length of the response data in number of bytes. */
29071 	uint16_t	resp_len;
29072 	/* The size of TX port statistics block in bytes. */
29073 	uint16_t	tx_stat_size;
29074 	/* The size of RX port statistics block in bytes. */
29075 	uint16_t	rx_stat_size;
29076 	uint8_t	unused_0[3];
29077 	/*
29078 	 * This field is used in Output records to indicate that the output
29079 	 * is completely written to RAM. This field should be read as '1'
29080 	 * to indicate that the output has been completely written. When
29081 	 * writing a command completion or response to an internal processor,
29082 	 * the order of writes has to be such that this field is written last.
29083 	 */
29084 	uint8_t	valid;
29085 } hwrm_port_qstats_output_t, *phwrm_port_qstats_output_t;
29086 
29087 /* Port Tx Statistics extended Format */
29088 /* tx_port_stats_ext (size:2048b/256B) */
29089 
29090 typedef struct tx_port_stats_ext {
29091 	/* Total number of tx bytes count on cos queue 0 */
29092 	uint64_t	tx_bytes_cos0;
29093 	/* Total number of tx bytes count on cos queue 1 */
29094 	uint64_t	tx_bytes_cos1;
29095 	/* Total number of tx bytes count on cos queue 2 */
29096 	uint64_t	tx_bytes_cos2;
29097 	/* Total number of tx bytes count on cos queue 3 */
29098 	uint64_t	tx_bytes_cos3;
29099 	/* Total number of tx bytes count on cos queue 4 */
29100 	uint64_t	tx_bytes_cos4;
29101 	/* Total number of tx bytes count on cos queue 5 */
29102 	uint64_t	tx_bytes_cos5;
29103 	/* Total number of tx bytes count on cos queue 6 */
29104 	uint64_t	tx_bytes_cos6;
29105 	/* Total number of tx bytes count on cos queue 7 */
29106 	uint64_t	tx_bytes_cos7;
29107 	/* Total number of tx packets count on cos queue 0 */
29108 	uint64_t	tx_packets_cos0;
29109 	/* Total number of tx packets count on cos queue 1 */
29110 	uint64_t	tx_packets_cos1;
29111 	/* Total number of tx packets count on cos queue 2 */
29112 	uint64_t	tx_packets_cos2;
29113 	/* Total number of tx packets count on cos queue 3 */
29114 	uint64_t	tx_packets_cos3;
29115 	/* Total number of tx packets count on cos queue 4 */
29116 	uint64_t	tx_packets_cos4;
29117 	/* Total number of tx packets count on cos queue 5 */
29118 	uint64_t	tx_packets_cos5;
29119 	/* Total number of tx packets count on cos queue 6 */
29120 	uint64_t	tx_packets_cos6;
29121 	/* Total number of tx packets count on cos queue 7 */
29122 	uint64_t	tx_packets_cos7;
29123 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 0 */
29124 	uint64_t	pfc_pri0_tx_duration_us;
29125 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 0 */
29126 	uint64_t	pfc_pri0_tx_transitions;
29127 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 1 */
29128 	uint64_t	pfc_pri1_tx_duration_us;
29129 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 1 */
29130 	uint64_t	pfc_pri1_tx_transitions;
29131 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 2 */
29132 	uint64_t	pfc_pri2_tx_duration_us;
29133 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 2 */
29134 	uint64_t	pfc_pri2_tx_transitions;
29135 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 3 */
29136 	uint64_t	pfc_pri3_tx_duration_us;
29137 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 3 */
29138 	uint64_t	pfc_pri3_tx_transitions;
29139 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 4 */
29140 	uint64_t	pfc_pri4_tx_duration_us;
29141 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 4 */
29142 	uint64_t	pfc_pri4_tx_transitions;
29143 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 5 */
29144 	uint64_t	pfc_pri5_tx_duration_us;
29145 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 5 */
29146 	uint64_t	pfc_pri5_tx_transitions;
29147 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 6 */
29148 	uint64_t	pfc_pri6_tx_duration_us;
29149 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 6 */
29150 	uint64_t	pfc_pri6_tx_transitions;
29151 	/* time duration between transmitting a XON -> XOFF and a subsequent XOFF -> XON for priority 7 */
29152 	uint64_t	pfc_pri7_tx_duration_us;
29153 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 7 */
29154 	uint64_t	pfc_pri7_tx_transitions;
29155 } tx_port_stats_ext_t, *ptx_port_stats_ext_t;
29156 
29157 /* Port Rx Statistics extended Format */
29158 /* rx_port_stats_ext (size:3904b/488B) */
29159 
29160 typedef struct rx_port_stats_ext {
29161 	/* Number of times link state changed to down */
29162 	uint64_t	link_down_events;
29163 	/* Number of times the idle rings with pause bit are found */
29164 	uint64_t	continuous_pause_events;
29165 	/* Number of times the active rings pause bit resumed back */
29166 	uint64_t	resume_pause_events;
29167 	/* Number of times, the ROCE cos queue PFC is disabled to avoid pause flood/burst */
29168 	uint64_t	continuous_roce_pause_events;
29169 	/* Number of times, the ROCE cos queue PFC is enabled back */
29170 	uint64_t	resume_roce_pause_events;
29171 	/* Total number of rx bytes count on cos queue 0 */
29172 	uint64_t	rx_bytes_cos0;
29173 	/* Total number of rx bytes count on cos queue 1 */
29174 	uint64_t	rx_bytes_cos1;
29175 	/* Total number of rx bytes count on cos queue 2 */
29176 	uint64_t	rx_bytes_cos2;
29177 	/* Total number of rx bytes count on cos queue 3 */
29178 	uint64_t	rx_bytes_cos3;
29179 	/* Total number of rx bytes count on cos queue 4 */
29180 	uint64_t	rx_bytes_cos4;
29181 	/* Total number of rx bytes count on cos queue 5 */
29182 	uint64_t	rx_bytes_cos5;
29183 	/* Total number of rx bytes count on cos queue 6 */
29184 	uint64_t	rx_bytes_cos6;
29185 	/* Total number of rx bytes count on cos queue 7 */
29186 	uint64_t	rx_bytes_cos7;
29187 	/* Total number of rx packets count on cos queue 0 */
29188 	uint64_t	rx_packets_cos0;
29189 	/* Total number of rx packets count on cos queue 1 */
29190 	uint64_t	rx_packets_cos1;
29191 	/* Total number of rx packets count on cos queue 2 */
29192 	uint64_t	rx_packets_cos2;
29193 	/* Total number of rx packets count on cos queue 3 */
29194 	uint64_t	rx_packets_cos3;
29195 	/* Total number of rx packets count on cos queue 4 */
29196 	uint64_t	rx_packets_cos4;
29197 	/* Total number of rx packets count on cos queue 5 */
29198 	uint64_t	rx_packets_cos5;
29199 	/* Total number of rx packets count on cos queue 6 */
29200 	uint64_t	rx_packets_cos6;
29201 	/* Total number of rx packets count on cos queue 7 */
29202 	uint64_t	rx_packets_cos7;
29203 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 0 */
29204 	uint64_t	pfc_pri0_rx_duration_us;
29205 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 0 */
29206 	uint64_t	pfc_pri0_rx_transitions;
29207 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 1 */
29208 	uint64_t	pfc_pri1_rx_duration_us;
29209 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 1 */
29210 	uint64_t	pfc_pri1_rx_transitions;
29211 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 2 */
29212 	uint64_t	pfc_pri2_rx_duration_us;
29213 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 2 */
29214 	uint64_t	pfc_pri2_rx_transitions;
29215 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 3 */
29216 	uint64_t	pfc_pri3_rx_duration_us;
29217 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 3 */
29218 	uint64_t	pfc_pri3_rx_transitions;
29219 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 4 */
29220 	uint64_t	pfc_pri4_rx_duration_us;
29221 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 4 */
29222 	uint64_t	pfc_pri4_rx_transitions;
29223 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 5 */
29224 	uint64_t	pfc_pri5_rx_duration_us;
29225 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 5 */
29226 	uint64_t	pfc_pri5_rx_transitions;
29227 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 6 */
29228 	uint64_t	pfc_pri6_rx_duration_us;
29229 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 6 */
29230 	uint64_t	pfc_pri6_rx_transitions;
29231 	/* time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for priority 7 */
29232 	uint64_t	pfc_pri7_rx_duration_us;
29233 	/* Number of times, a XON -> XOFF and XOFF -> XON transitions occur for priority 7 */
29234 	uint64_t	pfc_pri7_rx_transitions;
29235 	/* Total number of received bits */
29236 	uint64_t	rx_bits;
29237 	/* The number of events where the port receive buffer was over 85% full */
29238 	uint64_t	rx_buffer_passed_threshold;
29239 	/*
29240 	 * The number of symbol errors that wasn't corrected by FEC correction
29241 	 * algorithm
29242 	 */
29243 	uint64_t	rx_pcs_symbol_err;
29244 	/* The number of corrected bits on the port according to active FEC */
29245 	uint64_t	rx_corrected_bits;
29246 	/* Total number of rx discard bytes count on cos queue 0 */
29247 	uint64_t	rx_discard_bytes_cos0;
29248 	/* Total number of rx discard bytes count on cos queue 1 */
29249 	uint64_t	rx_discard_bytes_cos1;
29250 	/* Total number of rx discard bytes count on cos queue 2 */
29251 	uint64_t	rx_discard_bytes_cos2;
29252 	/* Total number of rx discard bytes count on cos queue 3 */
29253 	uint64_t	rx_discard_bytes_cos3;
29254 	/* Total number of rx discard bytes count on cos queue 4 */
29255 	uint64_t	rx_discard_bytes_cos4;
29256 	/* Total number of rx discard bytes count on cos queue 5 */
29257 	uint64_t	rx_discard_bytes_cos5;
29258 	/* Total number of rx discard bytes count on cos queue 6 */
29259 	uint64_t	rx_discard_bytes_cos6;
29260 	/* Total number of rx discard bytes count on cos queue 7 */
29261 	uint64_t	rx_discard_bytes_cos7;
29262 	/* Total number of rx discard packets count on cos queue 0 */
29263 	uint64_t	rx_discard_packets_cos0;
29264 	/* Total number of rx discard packets count on cos queue 1 */
29265 	uint64_t	rx_discard_packets_cos1;
29266 	/* Total number of rx discard packets count on cos queue 2 */
29267 	uint64_t	rx_discard_packets_cos2;
29268 	/* Total number of rx discard packets count on cos queue 3 */
29269 	uint64_t	rx_discard_packets_cos3;
29270 	/* Total number of rx discard packets count on cos queue 4 */
29271 	uint64_t	rx_discard_packets_cos4;
29272 	/* Total number of rx discard packets count on cos queue 5 */
29273 	uint64_t	rx_discard_packets_cos5;
29274 	/* Total number of rx discard packets count on cos queue 6 */
29275 	uint64_t	rx_discard_packets_cos6;
29276 	/* Total number of rx discard packets count on cos queue 7 */
29277 	uint64_t	rx_discard_packets_cos7;
29278 	/* Total number of FEC blocks corrected by the FEC function in the PHY */
29279 	uint64_t	rx_fec_corrected_blocks;
29280 	/*
29281 	 * Total number of FEC blocks determined to be uncorrectable by the
29282 	 * FEC function in the PHY
29283 	 */
29284 	uint64_t	rx_fec_uncorrectable_blocks;
29285 	/*
29286 	 * Total number of packets that are dropped due to not matching
29287 	 * any RX filter rules. This value is zero on the non supported
29288 	 * controllers. This counter is per controller, Firmware reports the
29289 	 * same value on active ports. This counter does not include the
29290 	 * packet discards because of no available buffers.
29291 	 */
29292 	uint64_t	rx_filter_miss;
29293 	/*
29294 	 * This field represents the number of FEC symbol errors by counting
29295 	 * once for each 10-bit symbol corrected by FEC block.
29296 	 * rx_fec_corrected_blocks will be incremented if all symbol errors in a
29297 	 * codeword gets corrected.
29298 	 */
29299 	uint64_t	rx_fec_symbol_err;
29300 } rx_port_stats_ext_t, *prx_port_stats_ext_t;
29301 
29302 /*
29303  * Port Rx Statistics extended PFC WatchDog Format.
29304  * StormDetect and StormRevert event determination is based
29305  * on an integration period and a percentage threshold.
29306  * StormDetect event - when percentage of XOFF frames received
29307  * within an integration period exceeds the configured threshold.
29308  * StormRevert event - when percentage of XON frames received
29309  * within an integration period exceeds the configured threshold.
29310  * Actual number of XOFF/XON frames for the events to be triggered
29311  * depends on both configured integration period and sampling rate.
29312  * The statistics in this structure represent counts of specified
29313  * events from the moment the feature (PFC WatchDog) is enabled via
29314  * hwrm_queue_pfc_enable_cfg call.
29315  */
29316 /* rx_port_stats_ext_pfc_wd (size:5120b/640B) */
29317 
29318 typedef struct rx_port_stats_ext_pfc_wd {
29319 	/*
29320 	 * Total number of PFC WatchDog StormDetect events detected
29321 	 * for Pri 0
29322 	 */
29323 	uint64_t	rx_pfc_watchdog_storms_detected_pri0;
29324 	/*
29325 	 * Total number of PFC WatchDog StormDetect events detected
29326 	 * for Pri 1
29327 	 */
29328 	uint64_t	rx_pfc_watchdog_storms_detected_pri1;
29329 	/*
29330 	 * Total number of PFC WatchDog StormDetect events detected
29331 	 * for Pri 2
29332 	 */
29333 	uint64_t	rx_pfc_watchdog_storms_detected_pri2;
29334 	/*
29335 	 * Total number of PFC WatchDog StormDetect events detected
29336 	 * for Pri 3
29337 	 */
29338 	uint64_t	rx_pfc_watchdog_storms_detected_pri3;
29339 	/*
29340 	 * Total number of PFC WatchDog StormDetect events detected
29341 	 * for Pri 4
29342 	 */
29343 	uint64_t	rx_pfc_watchdog_storms_detected_pri4;
29344 	/*
29345 	 * Total number of PFC WatchDog StormDetect events detected
29346 	 * for Pri 5
29347 	 */
29348 	uint64_t	rx_pfc_watchdog_storms_detected_pri5;
29349 	/*
29350 	 * Total number of PFC WatchDog StormDetect events detected
29351 	 * for Pri 6
29352 	 */
29353 	uint64_t	rx_pfc_watchdog_storms_detected_pri6;
29354 	/*
29355 	 * Total number of PFC WatchDog StormDetect events detected
29356 	 * for Pri 7
29357 	 */
29358 	uint64_t	rx_pfc_watchdog_storms_detected_pri7;
29359 	/*
29360 	 * Total number of PFC WatchDog StormRevert events detected
29361 	 * for Pri 0
29362 	 */
29363 	uint64_t	rx_pfc_watchdog_storms_reverted_pri0;
29364 	/*
29365 	 * Total number of PFC WatchDog StormRevert events detected
29366 	 * for Pri 1
29367 	 */
29368 	uint64_t	rx_pfc_watchdog_storms_reverted_pri1;
29369 	/*
29370 	 * Total number of PFC WatchDog StormRevert events detected
29371 	 * for Pri 2
29372 	 */
29373 	uint64_t	rx_pfc_watchdog_storms_reverted_pri2;
29374 	/*
29375 	 * Total number of PFC WatchDog StormRevert events detected
29376 	 * for Pri 3
29377 	 */
29378 	uint64_t	rx_pfc_watchdog_storms_reverted_pri3;
29379 	/*
29380 	 * Total number of PFC WatchDog StormRevert events detected
29381 	 * for Pri 4
29382 	 */
29383 	uint64_t	rx_pfc_watchdog_storms_reverted_pri4;
29384 	/*
29385 	 * Total number of PFC WatchDog StormRevert events detected
29386 	 * for Pri 5
29387 	 */
29388 	uint64_t	rx_pfc_watchdog_storms_reverted_pri5;
29389 	/*
29390 	 * Total number of PFC WatchDog StormRevert events detected
29391 	 * for Pri 6
29392 	 */
29393 	uint64_t	rx_pfc_watchdog_storms_reverted_pri6;
29394 	/*
29395 	 * Total number of PFC WatchDog StormRevert events detected
29396 	 * for Pri 7
29397 	 */
29398 	uint64_t	rx_pfc_watchdog_storms_reverted_pri7;
29399 	/*
29400 	 * Total number of packets received during PFC watchdog storm
29401 	 * for pri 0
29402 	 */
29403 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri0;
29404 	/*
29405 	 * Total number of packets received during PFC watchdog storm
29406 	 * for pri 1
29407 	 */
29408 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri1;
29409 	/*
29410 	 * Total number of packets received during PFC watchdog storm
29411 	 *  for pri 2
29412 	 */
29413 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri2;
29414 	/*
29415 	 * Total number of packets received during PFC watchdog storm
29416 	 *  for pri 3
29417 	 */
29418 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri3;
29419 	/*
29420 	 * Total number of packets received during PFC watchdog storm
29421 	 *  for pri 4
29422 	 */
29423 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri4;
29424 	/*
29425 	 * Total number of packets received during PFC watchdog storm
29426 	 *  for pri 5
29427 	 */
29428 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri5;
29429 	/*
29430 	 * Total number of packets received during PFC watchdog storm
29431 	 *  for pri 6
29432 	 */
29433 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri6;
29434 	/*
29435 	 * Total number of packets received during PFC watchdog storm
29436 	 *  for pri 7
29437 	 */
29438 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri7;
29439 	/*
29440 	 * Total number of bytes received during PFC watchdog storm
29441 	 * for pri 0
29442 	 */
29443 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri0;
29444 	/*
29445 	 * Total number of bytes received during PFC watchdog storm
29446 	 * for pri 1
29447 	 */
29448 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri1;
29449 	/*
29450 	 * Total number of bytes received during PFC watchdog storm
29451 	 *  for pri 2
29452 	 */
29453 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri2;
29454 	/*
29455 	 * Total number of bytes received during PFC watchdog storm
29456 	 *  for pri 3
29457 	 */
29458 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri3;
29459 	/*
29460 	 * Total number of bytes received during PFC watchdog storm
29461 	 *  for pri 4
29462 	 */
29463 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri4;
29464 	/*
29465 	 * Total number of bytes received during PFC watchdog storm
29466 	 *  for pri 5
29467 	 */
29468 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri5;
29469 	/*
29470 	 * Total number of bytes received during PFC watchdog storm
29471 	 *  for pri 6
29472 	 */
29473 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri6;
29474 	/*
29475 	 * Total number of bytes received during PFC watchdog storm
29476 	 *  for pri 7
29477 	 */
29478 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri7;
29479 	/*
29480 	 * Total number of packets dropped on rx during PFC watchdog storm
29481 	 * for pri 0
29482 	 */
29483 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri0;
29484 	/*
29485 	 * Total number of packets dropped on rx during PFC watchdog storm
29486 	 * for pri 1
29487 	 */
29488 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri1;
29489 	/*
29490 	 * Total number of packets dropped on rx during PFC watchdog storm
29491 	 *  for pri 2
29492 	 */
29493 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri2;
29494 	/*
29495 	 * Total number of packets dropped on rx during PFC watchdog storm
29496 	 *  for pri 3
29497 	 */
29498 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri3;
29499 	/*
29500 	 * Total number of packets dropped on rx during PFC watchdog storm
29501 	 *  for pri 4
29502 	 */
29503 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri4;
29504 	/*
29505 	 * Total number of packets dropped on rx during PFC watchdog storm
29506 	 *  for pri 5
29507 	 */
29508 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri5;
29509 	/*
29510 	 * Total number of packets dropped on rx during PFC watchdog storm
29511 	 *  for pri 6
29512 	 */
29513 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri6;
29514 	/*
29515 	 * Total number of packets dropped on rx during PFC watchdog storm
29516 	 *  for pri 7
29517 	 */
29518 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri7;
29519 	/*
29520 	 * Total number of bytes dropped on rx during PFC watchdog storm
29521 	 * for pri 0
29522 	 */
29523 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri0;
29524 	/*
29525 	 * Total number of bytes dropped on rx during PFC watchdog storm
29526 	 * for pri 1
29527 	 */
29528 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri1;
29529 	/*
29530 	 * Total number of bytes dropped on rx during PFC watchdog storm
29531 	 *  for pri 2
29532 	 */
29533 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri2;
29534 	/*
29535 	 * Total number of bytes dropped on rx during PFC watchdog storm
29536 	 *  for pri 3
29537 	 */
29538 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri3;
29539 	/*
29540 	 * Total number of bytes dropped on rx during PFC watchdog storm
29541 	 *  for pri 4
29542 	 */
29543 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri4;
29544 	/*
29545 	 * Total number of bytes dropped on rx during PFC watchdog storm
29546 	 *  for pri 5
29547 	 */
29548 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri5;
29549 	/*
29550 	 * Total number of bytes dropped on rx during PFC watchdog storm
29551 	 *  for pri 6
29552 	 */
29553 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri6;
29554 	/*
29555 	 * Total number of bytes dropped on rx during PFC watchdog storm
29556 	 *  for pri 7
29557 	 */
29558 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri7;
29559 	/*
29560 	 * Number of packets received during last PFC watchdog storm
29561 	 * for pri 0
29562 	 */
29563 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri0;
29564 	/*
29565 	 * Number of packets received during last PFC watchdog storm
29566 	 * for pri 1
29567 	 */
29568 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri1;
29569 	/*
29570 	 * Number of packets received during last PFC watchdog storm
29571 	 *  for pri 2
29572 	 */
29573 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri2;
29574 	/*
29575 	 * Number of packets received during last PFC watchdog storm
29576 	 *  for pri 3
29577 	 */
29578 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri3;
29579 	/*
29580 	 * Number of packets received during last PFC watchdog storm
29581 	 *  for pri 4
29582 	 */
29583 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri4;
29584 	/*
29585 	 * Number of packets received during last PFC watchdog storm
29586 	 *  for pri 5
29587 	 */
29588 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri5;
29589 	/*
29590 	 * Number of packets received during last PFC watchdog storm
29591 	 *  for pri 6
29592 	 */
29593 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri6;
29594 	/*
29595 	 * Number of packets received during last PFC watchdog storm
29596 	 *  for pri 7
29597 	 */
29598 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri7;
29599 	/*
29600 	 * Number of bytes received during last PFC watchdog storm
29601 	 * for pri 0
29602 	 */
29603 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri0;
29604 	/*
29605 	 * Number of bytes received during last PFC watchdog storm
29606 	 * for pri 1
29607 	 */
29608 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri1;
29609 	/*
29610 	 * Number of bytes received during last PFC watchdog storm
29611 	 *  for pri 2
29612 	 */
29613 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri2;
29614 	/*
29615 	 * Number of bytes received during last PFC watchdog storm
29616 	 *  for pri 3
29617 	 */
29618 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri3;
29619 	/*
29620 	 * Number of bytes received during last PFC watchdog storm
29621 	 *  for pri 4
29622 	 */
29623 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri4;
29624 	/*
29625 	 * Number of bytes received during last PFC watchdog storm
29626 	 *  for pri 5
29627 	 */
29628 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri5;
29629 	/*
29630 	 * Number of bytes received during last PFC watchdog storm
29631 	 *  for pri 6
29632 	 */
29633 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri6;
29634 	/*
29635 	 * Number of bytes received during last PFC watchdog storm
29636 	 *  for pri 7
29637 	 */
29638 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri7;
29639 	/*
29640 	 * Number of packets dropped on rx during last PFC watchdog storm
29641 	 * for pri 0
29642 	 */
29643 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri0;
29644 	/*
29645 	 * Number of packets dropped on rx during last PFC watchdog storm
29646 	 * for pri 1
29647 	 */
29648 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri1;
29649 	/*
29650 	 * Number of packets dropped on rx during last PFC watchdog storm
29651 	 *  for pri 2
29652 	 */
29653 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri2;
29654 	/*
29655 	 * Number of packets dropped on rx during last PFC watchdog storm
29656 	 *  for pri 3
29657 	 */
29658 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri3;
29659 	/*
29660 	 * Number of packets dropped on rx during last PFC watchdog storm
29661 	 *  for pri 4
29662 	 */
29663 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri4;
29664 	/*
29665 	 * Number of packets dropped on rx during last PFC watchdog storm
29666 	 *  for pri 5
29667 	 */
29668 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri5;
29669 	/*
29670 	 * Number of packets dropped on rx during last PFC watchdog storm
29671 	 *  for pri 6
29672 	 */
29673 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri6;
29674 	/*
29675 	 * Number of packets dropped on rx during last PFC watchdog storm
29676 	 *  for pri 7
29677 	 */
29678 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri7;
29679 	/*
29680 	 * Total number of bytes dropped on rx during PFC watchdog storm
29681 	 * for pri 0
29682 	 */
29683 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri0;
29684 	/*
29685 	 * Number of bytes dropped on rx during last PFC watchdog storm
29686 	 * for pri 1
29687 	 */
29688 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri1;
29689 	/*
29690 	 * Number of bytes dropped on rx during last PFC watchdog storm
29691 	 *  for pri 2
29692 	 */
29693 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri2;
29694 	/*
29695 	 * Number of bytes dropped on rx during last PFC watchdog storm
29696 	 *  for pri 3
29697 	 */
29698 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri3;
29699 	/*
29700 	 * Number of bytes dropped on rx during last PFC watchdog storm
29701 	 *  for pri 4
29702 	 */
29703 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri4;
29704 	/*
29705 	 * Number of bytes dropped on rx during last PFC watchdog storm
29706 	 *  for pri 5
29707 	 */
29708 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri5;
29709 	/*
29710 	 * Number of bytes dropped on rx during last PFC watchdog storm
29711 	 *  for pri 6
29712 	 */
29713 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri6;
29714 	/*
29715 	 * Number of bytes dropped on rx during last PFC watchdog storm
29716 	 *  for pri 7
29717 	 */
29718 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri7;
29719 } rx_port_stats_ext_pfc_wd_t, *prx_port_stats_ext_pfc_wd_t;
29720 
29721 /************************
29722  * hwrm_port_qstats_ext *
29723  ************************/
29724 
29725 
29726 /* hwrm_port_qstats_ext_input (size:320b/40B) */
29727 
29728 typedef struct hwrm_port_qstats_ext_input {
29729 	/* The HWRM command request type. */
29730 	uint16_t	req_type;
29731 	/*
29732 	 * The completion ring to send the completion event on. This should
29733 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
29734 	 */
29735 	uint16_t	cmpl_ring;
29736 	/*
29737 	 * The sequence ID is used by the driver for tracking multiple
29738 	 * commands. This ID is treated as opaque data by the firmware and
29739 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
29740 	 */
29741 	uint16_t	seq_id;
29742 	/*
29743 	 * The target ID of the command:
29744 	 * * 0x0-0xFFF8 - The function ID
29745 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
29746 	 * * 0xFFFD - Reserved for user-space HWRM interface
29747 	 * * 0xFFFF - HWRM
29748 	 */
29749 	uint16_t	target_id;
29750 	/*
29751 	 * A physical address pointer pointing to a host buffer that the
29752 	 * command's response data will be written. This can be either a host
29753 	 * physical address (HPA) or a guest physical address (GPA) and must
29754 	 * point to a physically contiguous block of memory.
29755 	 */
29756 	uint64_t	resp_addr;
29757 	/* Port ID of port that is being queried. */
29758 	uint16_t	port_id;
29759 	/*
29760 	 * The size of TX port extended
29761 	 * statistics block in bytes.
29762 	 */
29763 	uint16_t	tx_stat_size;
29764 	/*
29765 	 * The size of RX port extended
29766 	 * statistics block in bytes
29767 	 */
29768 	uint16_t	rx_stat_size;
29769 	uint8_t	flags;
29770 	/*
29771 	 * This bit is set to 1 when request is for the counter mask,
29772 	 * representing width of each of the stats counters, rather than
29773 	 * counters themselves.
29774 	 */
29775 	#define HWRM_PORT_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x1)
29776 	uint8_t	unused_0;
29777 	/*
29778 	 * This is the host address where
29779 	 * Tx port statistics will be stored
29780 	 */
29781 	uint64_t	tx_stat_host_addr;
29782 	/*
29783 	 * This is the host address where
29784 	 * Rx port statistics will be stored
29785 	 */
29786 	uint64_t	rx_stat_host_addr;
29787 } hwrm_port_qstats_ext_input_t, *phwrm_port_qstats_ext_input_t;
29788 
29789 /* hwrm_port_qstats_ext_output (size:128b/16B) */
29790 
29791 typedef struct hwrm_port_qstats_ext_output {
29792 	/* The specific error status for the command. */
29793 	uint16_t	error_code;
29794 	/* The HWRM command request type. */
29795 	uint16_t	req_type;
29796 	/* The sequence ID from the original command. */
29797 	uint16_t	seq_id;
29798 	/* The length of the response data in number of bytes. */
29799 	uint16_t	resp_len;
29800 	/* The size of TX port statistics block in bytes. */
29801 	uint16_t	tx_stat_size;
29802 	/* The size of RX port statistics block in bytes. */
29803 	uint16_t	rx_stat_size;
29804 	/* Total number of active cos queues available. */
29805 	uint16_t	total_active_cos_queues;
29806 	uint8_t	flags;
29807 	/*
29808 	 * If set to 1, then this field indicates that clear
29809 	 * roce specific counters is supported.
29810 	 */
29811 	#define HWRM_PORT_QSTATS_EXT_OUTPUT_FLAGS_CLEAR_ROCE_COUNTERS_SUPPORTED	UINT32_C(0x1)
29812 	/*
29813 	 * This field is used in Output records to indicate that the output
29814 	 * is completely written to RAM. This field should be read as '1'
29815 	 * to indicate that the output has been completely written. When
29816 	 * writing a command completion or response to an internal processor,
29817 	 * the order of writes has to be such that this field is written last.
29818 	 */
29819 	uint8_t	valid;
29820 } hwrm_port_qstats_ext_output_t, *phwrm_port_qstats_ext_output_t;
29821 
29822 /*******************************
29823  * hwrm_port_qstats_ext_pfc_wd *
29824  *******************************/
29825 
29826 
29827 /* hwrm_port_qstats_ext_pfc_wd_input (size:256b/32B) */
29828 
29829 typedef struct hwrm_port_qstats_ext_pfc_wd_input {
29830 	/* The HWRM command request type. */
29831 	uint16_t	req_type;
29832 	/*
29833 	 * The completion ring to send the completion event on. This should
29834 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
29835 	 */
29836 	uint16_t	cmpl_ring;
29837 	/*
29838 	 * The sequence ID is used by the driver for tracking multiple
29839 	 * commands. This ID is treated as opaque data by the firmware and
29840 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
29841 	 */
29842 	uint16_t	seq_id;
29843 	/*
29844 	 * The target ID of the command:
29845 	 * * 0x0-0xFFF8 - The function ID
29846 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
29847 	 * * 0xFFFD - Reserved for user-space HWRM interface
29848 	 * * 0xFFFF - HWRM
29849 	 */
29850 	uint16_t	target_id;
29851 	/*
29852 	 * A physical address pointer pointing to a host buffer that the
29853 	 * command's response data will be written. This can be either a host
29854 	 * physical address (HPA) or a guest physical address (GPA) and must
29855 	 * point to a physically contiguous block of memory.
29856 	 */
29857 	uint64_t	resp_addr;
29858 	/* Port ID of port that is being queried. */
29859 	uint16_t	port_id;
29860 	/*
29861 	 * The size of rx_port_stats_ext_pfc_wd
29862 	 * block in bytes
29863 	 */
29864 	uint16_t	pfc_wd_stat_size;
29865 	uint8_t	unused_0[4];
29866 	/*
29867 	 * This is the host address where
29868 	 * rx_port_stats_ext_pfc_wd will be stored
29869 	 */
29870 	uint64_t	pfc_wd_stat_host_addr;
29871 } hwrm_port_qstats_ext_pfc_wd_input_t, *phwrm_port_qstats_ext_pfc_wd_input_t;
29872 
29873 /* hwrm_port_qstats_ext_pfc_wd_output (size:128b/16B) */
29874 
29875 typedef struct hwrm_port_qstats_ext_pfc_wd_output {
29876 	/* The specific error status for the command. */
29877 	uint16_t	error_code;
29878 	/* The HWRM command request type. */
29879 	uint16_t	req_type;
29880 	/* The sequence ID from the original command. */
29881 	uint16_t	seq_id;
29882 	/* The length of the response data in number of bytes. */
29883 	uint16_t	resp_len;
29884 	/*
29885 	 * The size of rx_port_stats_ext_pfc_wd
29886 	 * statistics block in bytes.
29887 	 */
29888 	uint16_t	pfc_wd_stat_size;
29889 	uint8_t	unused_0[5];
29890 	/*
29891 	 * This field is used in Output records to indicate that the output
29892 	 * is completely written to RAM. This field should be read as '1'
29893 	 * to indicate that the output has been completely written. When
29894 	 * writing a command completion or response to an internal processor,
29895 	 * the order of writes has to be such that this field is written last.
29896 	 */
29897 	uint8_t	valid;
29898 } hwrm_port_qstats_ext_pfc_wd_output_t, *phwrm_port_qstats_ext_pfc_wd_output_t;
29899 
29900 /*************************
29901  * hwrm_port_lpbk_qstats *
29902  *************************/
29903 
29904 
29905 /* hwrm_port_lpbk_qstats_input (size:256b/32B) */
29906 
29907 typedef struct hwrm_port_lpbk_qstats_input {
29908 	/* The HWRM command request type. */
29909 	uint16_t	req_type;
29910 	/*
29911 	 * The completion ring to send the completion event on. This should
29912 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
29913 	 */
29914 	uint16_t	cmpl_ring;
29915 	/*
29916 	 * The sequence ID is used by the driver for tracking multiple
29917 	 * commands. This ID is treated as opaque data by the firmware and
29918 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
29919 	 */
29920 	uint16_t	seq_id;
29921 	/*
29922 	 * The target ID of the command:
29923 	 * * 0x0-0xFFF8 - The function ID
29924 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
29925 	 * * 0xFFFD - Reserved for user-space HWRM interface
29926 	 * * 0xFFFF - HWRM
29927 	 */
29928 	uint16_t	target_id;
29929 	/*
29930 	 * A physical address pointer pointing to a host buffer that the
29931 	 * command's response data will be written. This can be either a host
29932 	 * physical address (HPA) or a guest physical address (GPA) and must
29933 	 * point to a physically contiguous block of memory.
29934 	 */
29935 	uint64_t	resp_addr;
29936 	/*
29937 	 * The size of the loopback statistics buffer passed in the
29938 	 * loopback_stat_host_addr in bytes.
29939 	 * Firmware will not exceed this size when it DMAs the
29940 	 * statistics structure to the host. The actual DMA size
29941 	 * will be returned in the response.
29942 	 */
29943 	uint16_t	lpbk_stat_size;
29944 	uint8_t	flags;
29945 	/*
29946 	 * This bit is set to 1 when request is for a counter mask,
29947 	 * representing the width of each of the stats counters, rather
29948 	 * than counters themselves.
29949 	 */
29950 	#define HWRM_PORT_LPBK_QSTATS_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x1)
29951 	uint8_t	unused_0[5];
29952 	/*
29953 	 * This is the host address where
29954 	 * loopback statistics will be stored
29955 	 */
29956 	uint64_t	lpbk_stat_host_addr;
29957 } hwrm_port_lpbk_qstats_input_t, *phwrm_port_lpbk_qstats_input_t;
29958 
29959 /* hwrm_port_lpbk_qstats_output (size:128b/16B) */
29960 
29961 typedef struct hwrm_port_lpbk_qstats_output {
29962 	/* The specific error status for the command. */
29963 	uint16_t	error_code;
29964 	/* The HWRM command request type. */
29965 	uint16_t	req_type;
29966 	/* The sequence ID from the original command. */
29967 	uint16_t	seq_id;
29968 	/* The length of the response data in number of bytes. */
29969 	uint16_t	resp_len;
29970 	/*
29971 	 * The size of the loopback statistics block in bytes DMA'ed by the
29972 	 * firmware. Note that this size will never exceed the lpbk_stat_size
29973 	 * field passed in by the driver in the hwrm_port_lpbk_qstats_input
29974 	 * structure.
29975 	 */
29976 	uint16_t	lpbk_stat_size;
29977 	uint8_t	unused_0[5];
29978 	/*
29979 	 * This field is used in Output records to indicate that the output
29980 	 * is completely written to RAM. This field should be read as '1'
29981 	 * to indicate that the output has been completely written.
29982 	 * When writing a command completion or response to an internal
29983 	 * processor, the order of writes has to be such that this field is
29984 	 * written last.
29985 	 */
29986 	uint8_t	valid;
29987 } hwrm_port_lpbk_qstats_output_t, *phwrm_port_lpbk_qstats_output_t;
29988 
29989 /* Loopback Port Statistic Format */
29990 /* port_lpbk_stats (size:640b/80B) */
29991 
29992 typedef struct port_lpbk_stats {
29993 	/* Number of transmitted unicast frames */
29994 	uint64_t	lpbk_ucast_frames;
29995 	/* Number of transmitted multicast frames */
29996 	uint64_t	lpbk_mcast_frames;
29997 	/* Number of transmitted broadcast frames */
29998 	uint64_t	lpbk_bcast_frames;
29999 	/* Number of transmitted bytes for unicast traffic */
30000 	uint64_t	lpbk_ucast_bytes;
30001 	/* Number of transmitted bytes for multicast traffic */
30002 	uint64_t	lpbk_mcast_bytes;
30003 	/* Number of transmitted bytes for broadcast traffic */
30004 	uint64_t	lpbk_bcast_bytes;
30005 	/* Number of dropped tx packets */
30006 	uint64_t	lpbk_tx_discards;
30007 	/* Number of error dropped tx packets */
30008 	uint64_t	lpbk_tx_errors;
30009 	/* Number of dropped rx packets */
30010 	uint64_t	lpbk_rx_discards;
30011 	/* Number of error dropped rx packets */
30012 	uint64_t	lpbk_rx_errors;
30013 } port_lpbk_stats_t, *pport_lpbk_stats_t;
30014 
30015 /************************
30016  * hwrm_port_ecn_qstats *
30017  ************************/
30018 
30019 
30020 /* hwrm_port_ecn_qstats_input (size:256b/32B) */
30021 
30022 typedef struct hwrm_port_ecn_qstats_input {
30023 	/* The HWRM command request type. */
30024 	uint16_t	req_type;
30025 	/*
30026 	 * The completion ring to send the completion event on. This should
30027 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30028 	 */
30029 	uint16_t	cmpl_ring;
30030 	/*
30031 	 * The sequence ID is used by the driver for tracking multiple
30032 	 * commands. This ID is treated as opaque data by the firmware and
30033 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30034 	 */
30035 	uint16_t	seq_id;
30036 	/*
30037 	 * The target ID of the command:
30038 	 * * 0x0-0xFFF8 - The function ID
30039 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30040 	 * * 0xFFFD - Reserved for user-space HWRM interface
30041 	 * * 0xFFFF - HWRM
30042 	 */
30043 	uint16_t	target_id;
30044 	/*
30045 	 * A physical address pointer pointing to a host buffer that the
30046 	 * command's response data will be written. This can be either a host
30047 	 * physical address (HPA) or a guest physical address (GPA) and must
30048 	 * point to a physically contiguous block of memory.
30049 	 */
30050 	uint64_t	resp_addr;
30051 	/*
30052 	 * Port ID of port that is being queried. Unused if NIC is in
30053 	 * multi-host mode.
30054 	 */
30055 	uint16_t	port_id;
30056 	/*
30057 	 * Size of the DMA buffer the caller has allocated for the firmware to
30058 	 * write into.
30059 	 */
30060 	uint16_t	ecn_stat_buf_size;
30061 	uint8_t	flags;
30062 	/*
30063 	 * This bit is set to 1 when request is for a counter mask,
30064 	 * representing the width of each of the stats counters, rather
30065 	 * than counters themselves.
30066 	 */
30067 	#define HWRM_PORT_ECN_QSTATS_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x1)
30068 	uint8_t	unused_0[3];
30069 	/*
30070 	 * This is the host address where
30071 	 * ECN port statistics will be stored
30072 	 */
30073 	uint64_t	ecn_stat_host_addr;
30074 } hwrm_port_ecn_qstats_input_t, *phwrm_port_ecn_qstats_input_t;
30075 
30076 /* hwrm_port_ecn_qstats_output (size:128b/16B) */
30077 
30078 typedef struct hwrm_port_ecn_qstats_output {
30079 	/* The specific error status for the command. */
30080 	uint16_t	error_code;
30081 	/* The HWRM command request type. */
30082 	uint16_t	req_type;
30083 	/* The sequence ID from the original command. */
30084 	uint16_t	seq_id;
30085 	/* The length of the response data in number of bytes. */
30086 	uint16_t	resp_len;
30087 	/* Number of bytes of stats the firmware wrote to the DMA buffer. */
30088 	uint16_t	ecn_stat_buf_size;
30089 	/*
30090 	 * Bitmask that indicates which CoS queues have ECN marking enabled.
30091 	 * Bit i corresponds to CoS queue i.
30092 	 */
30093 	uint8_t	mark_en;
30094 	uint8_t	unused_0[4];
30095 	/*
30096 	 * This field is used in Output records to indicate that the output
30097 	 * is completely written to RAM. This field should be read as '1'
30098 	 * to indicate that the output has been completely written. When
30099 	 * writing a command completion or response to an internal processor,
30100 	 * the order of writes has to be such that this field is written last.
30101 	 */
30102 	uint8_t	valid;
30103 } hwrm_port_ecn_qstats_output_t, *phwrm_port_ecn_qstats_output_t;
30104 
30105 /* ECN mark statistics format */
30106 /* port_stats_ecn (size:512b/64B) */
30107 
30108 typedef struct port_stats_ecn {
30109 	/*
30110 	 * Number of packets marked in CoS queue 0.
30111 	 * Or, if the driver requested counter masks, a mask to indicate the size
30112 	 * of the counter.
30113 	 */
30114 	uint64_t	mark_cnt_cos0;
30115 	/*
30116 	 * Number of packets marked in CoS queue 1.
30117 	 * Or, if the driver requested counter masks, a mask to indicate the size
30118 	 * of the counter.
30119 	 */
30120 	uint64_t	mark_cnt_cos1;
30121 	/*
30122 	 * Number of packets marked in CoS queue 2.
30123 	 * Or, if the driver requested counter masks, a mask to indicate the size
30124 	 * of the counter.
30125 	 */
30126 	uint64_t	mark_cnt_cos2;
30127 	/*
30128 	 * Number of packets marked in CoS queue 3.
30129 	 * Or, if the driver requested counter masks, a mask to indicate the size
30130 	 * of the counter.
30131 	 */
30132 	uint64_t	mark_cnt_cos3;
30133 	/*
30134 	 * Number of packets marked in CoS queue 4.
30135 	 * Or, if the driver requested counter masks, a mask to indicate the size
30136 	 * of the counter.
30137 	 */
30138 	uint64_t	mark_cnt_cos4;
30139 	/*
30140 	 * Number of packets marked in CoS queue 5.
30141 	 * Or, if the driver requested counter masks, a mask to indicate the size
30142 	 * of the counter.
30143 	 */
30144 	uint64_t	mark_cnt_cos5;
30145 	/*
30146 	 * Number of packets marked in CoS queue 6.
30147 	 * Or, if the driver requested counter masks, a mask to indicate the size
30148 	 * of the counter.
30149 	 */
30150 	uint64_t	mark_cnt_cos6;
30151 	/*
30152 	 * Number of packets marked in CoS queue 7.
30153 	 * Or, if the driver requested counter masks, a mask to indicate the size
30154 	 * of the counter.
30155 	 */
30156 	uint64_t	mark_cnt_cos7;
30157 } port_stats_ecn_t, *pport_stats_ecn_t;
30158 
30159 /***********************
30160  * hwrm_port_clr_stats *
30161  ***********************/
30162 
30163 
30164 /* hwrm_port_clr_stats_input (size:192b/24B) */
30165 
30166 typedef struct hwrm_port_clr_stats_input {
30167 	/* The HWRM command request type. */
30168 	uint16_t	req_type;
30169 	/*
30170 	 * The completion ring to send the completion event on. This should
30171 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30172 	 */
30173 	uint16_t	cmpl_ring;
30174 	/*
30175 	 * The sequence ID is used by the driver for tracking multiple
30176 	 * commands. This ID is treated as opaque data by the firmware and
30177 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30178 	 */
30179 	uint16_t	seq_id;
30180 	/*
30181 	 * The target ID of the command:
30182 	 * * 0x0-0xFFF8 - The function ID
30183 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30184 	 * * 0xFFFD - Reserved for user-space HWRM interface
30185 	 * * 0xFFFF - HWRM
30186 	 */
30187 	uint16_t	target_id;
30188 	/*
30189 	 * A physical address pointer pointing to a host buffer that the
30190 	 * command's response data will be written. This can be either a host
30191 	 * physical address (HPA) or a guest physical address (GPA) and must
30192 	 * point to a physically contiguous block of memory.
30193 	 */
30194 	uint64_t	resp_addr;
30195 	/* Port ID of port that is being queried. */
30196 	uint16_t	port_id;
30197 	uint8_t	flags;
30198 	/*
30199 	 * If set to 1, then this field indicates clear the following RoCE
30200 	 * specific counters.
30201 	 * RoCE associated TX/RX cos counters
30202 	 * CNP associated TX/RX cos counters
30203 	 * RoCE/CNP specific TX/RX flow counters
30204 	 * Firmware will determine the RoCE/CNP cos queue based on qos
30205 	 * profile.
30206 	 * This flag is honored only when RoCE is enabled on that port.
30207 	 */
30208 	#define HWRM_PORT_CLR_STATS_INPUT_FLAGS_ROCE_COUNTERS	UINT32_C(0x1)
30209 	uint8_t	unused_0[5];
30210 } hwrm_port_clr_stats_input_t, *phwrm_port_clr_stats_input_t;
30211 
30212 /* hwrm_port_clr_stats_output (size:128b/16B) */
30213 
30214 typedef struct hwrm_port_clr_stats_output {
30215 	/* The specific error status for the command. */
30216 	uint16_t	error_code;
30217 	/* The HWRM command request type. */
30218 	uint16_t	req_type;
30219 	/* The sequence ID from the original command. */
30220 	uint16_t	seq_id;
30221 	/* The length of the response data in number of bytes. */
30222 	uint16_t	resp_len;
30223 	uint8_t	unused_0[7];
30224 	/*
30225 	 * This field is used in Output records to indicate that the output
30226 	 * is completely written to RAM. This field should be read as '1'
30227 	 * to indicate that the output has been completely written. When
30228 	 * writing a command completion or response to an internal processor,
30229 	 * the order of writes has to be such that this field is written last.
30230 	 */
30231 	uint8_t	valid;
30232 } hwrm_port_clr_stats_output_t, *phwrm_port_clr_stats_output_t;
30233 
30234 /****************************
30235  * hwrm_port_lpbk_clr_stats *
30236  ****************************/
30237 
30238 
30239 /* hwrm_port_lpbk_clr_stats_input (size:192b/24B) */
30240 
30241 typedef struct hwrm_port_lpbk_clr_stats_input {
30242 	/* The HWRM command request type. */
30243 	uint16_t	req_type;
30244 	/*
30245 	 * The completion ring to send the completion event on. This should
30246 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30247 	 */
30248 	uint16_t	cmpl_ring;
30249 	/*
30250 	 * The sequence ID is used by the driver for tracking multiple
30251 	 * commands. This ID is treated as opaque data by the firmware and
30252 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30253 	 */
30254 	uint16_t	seq_id;
30255 	/*
30256 	 * The target ID of the command:
30257 	 * * 0x0-0xFFF8 - The function ID
30258 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30259 	 * * 0xFFFD - Reserved for user-space HWRM interface
30260 	 * * 0xFFFF - HWRM
30261 	 */
30262 	uint16_t	target_id;
30263 	/*
30264 	 * A physical address pointer pointing to a host buffer that the
30265 	 * command's response data will be written. This can be either a host
30266 	 * physical address (HPA) or a guest physical address (GPA) and must
30267 	 * point to a physically contiguous block of memory.
30268 	 */
30269 	uint64_t	resp_addr;
30270 	/* Port ID of port that is to be queried. */
30271 	uint16_t	port_id;
30272 	uint8_t	unused_0[6];
30273 } hwrm_port_lpbk_clr_stats_input_t, *phwrm_port_lpbk_clr_stats_input_t;
30274 
30275 /* hwrm_port_lpbk_clr_stats_output (size:128b/16B) */
30276 
30277 typedef struct hwrm_port_lpbk_clr_stats_output {
30278 	/* The specific error status for the command. */
30279 	uint16_t	error_code;
30280 	/* The HWRM command request type. */
30281 	uint16_t	req_type;
30282 	/* The sequence ID from the original command. */
30283 	uint16_t	seq_id;
30284 	/* The length of the response data in number of bytes. */
30285 	uint16_t	resp_len;
30286 	uint8_t	unused_0[7];
30287 	/*
30288 	 * This field is used in Output records to indicate that the output
30289 	 * is completely written to RAM. This field should be read as '1'
30290 	 * to indicate that the output has been completely written. When
30291 	 * writing a command completion or response to an internal processor,
30292 	 * the order of writes has to be such that this field is written last.
30293 	 */
30294 	uint8_t	valid;
30295 } hwrm_port_lpbk_clr_stats_output_t, *phwrm_port_lpbk_clr_stats_output_t;
30296 
30297 /**********************
30298  * hwrm_port_ts_query *
30299  **********************/
30300 
30301 
30302 /* hwrm_port_ts_query_input (size:320b/40B) */
30303 
30304 typedef struct hwrm_port_ts_query_input {
30305 	/* The HWRM command request type. */
30306 	uint16_t	req_type;
30307 	/*
30308 	 * The completion ring to send the completion event on. This should
30309 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30310 	 */
30311 	uint16_t	cmpl_ring;
30312 	/*
30313 	 * The sequence ID is used by the driver for tracking multiple
30314 	 * commands. This ID is treated as opaque data by the firmware and
30315 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30316 	 */
30317 	uint16_t	seq_id;
30318 	/*
30319 	 * The target ID of the command:
30320 	 * * 0x0-0xFFF8 - The function ID
30321 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30322 	 * * 0xFFFD - Reserved for user-space HWRM interface
30323 	 * * 0xFFFF - HWRM
30324 	 */
30325 	uint16_t	target_id;
30326 	/*
30327 	 * A physical address pointer pointing to a host buffer that the
30328 	 * command's response data will be written. This can be either a host
30329 	 * physical address (HPA) or a guest physical address (GPA) and must
30330 	 * point to a physically contiguous block of memory.
30331 	 */
30332 	uint64_t	resp_addr;
30333 	uint32_t	flags;
30334 	/*
30335 	 * Enumeration denoting the RX, TX type of the resource.
30336 	 * This enumeration is used for resources that are similar for both
30337 	 * TX and RX paths of the chip.
30338 	 */
30339 	#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH		UINT32_C(0x1)
30340 	/* tx path */
30341 		#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_TX		UINT32_C(0x0)
30342 	/* rx path */
30343 		#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_RX		UINT32_C(0x1)
30344 		#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_LAST	HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_RX
30345 	/*
30346 	 * If set, the response includes the current value of the free
30347 	 * running timer.
30348 	 */
30349 	#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_CURRENT_TIME	UINT32_C(0x2)
30350 	/* Port ID of port that is being queried. */
30351 	uint16_t	port_id;
30352 	uint8_t	unused_0[2];
30353 	uint16_t	enables;
30354 	/*
30355 	 * This bit must be '1' for the ts_req_timeout field to be
30356 	 * configured.
30357 	 */
30358 	#define HWRM_PORT_TS_QUERY_INPUT_ENABLES_TS_REQ_TIMEOUT	UINT32_C(0x1)
30359 	/*
30360 	 * This bit must be '1' for the ptp_seq_id field to be
30361 	 * configured.
30362 	 */
30363 	#define HWRM_PORT_TS_QUERY_INPUT_ENABLES_PTP_SEQ_ID	UINT32_C(0x2)
30364 	/*
30365 	 * This bit must be '1' for the ptp_hdr_offset field to be
30366 	 * configured.
30367 	 */
30368 	#define HWRM_PORT_TS_QUERY_INPUT_ENABLES_PTP_HDR_OFFSET	UINT32_C(0x4)
30369 	/*
30370 	 * Specifies the timeout in microseconds. If this is specified,
30371 	 * firmware will keep checking for a matching timestamp packet
30372 	 * till the timeout is exhausted. User can specify a max timeout
30373 	 * of 65535 microseconds. Firmware will return HWRM_ERR_CODE_BUSY
30374 	 * if a matching timestamp is not found. Firmware will return
30375 	 * HWRM_ERROR_CODE_FAIL if we are unable to read timestamps
30376 	 * from FIFO.
30377 	 */
30378 	uint16_t	ts_req_timeout;
30379 	/*
30380 	 * Specifies the sequence ID of the PTP timestamp packet we
30381 	 * are interested in. When this is specified, firmware will
30382 	 * only return the timestamp of the packet which matches this
30383 	 * sequence ID.
30384 	 */
30385 	uint32_t	ptp_seq_id;
30386 	/*
30387 	 * Specifies the PTP header offset of the PTP packet for which
30388 	 * the timestamp is requested.
30389 	 */
30390 	uint16_t	ptp_hdr_offset;
30391 	uint8_t	unused_1[6];
30392 } hwrm_port_ts_query_input_t, *phwrm_port_ts_query_input_t;
30393 
30394 /* hwrm_port_ts_query_output (size:192b/24B) */
30395 
30396 typedef struct hwrm_port_ts_query_output {
30397 	/* The specific error status for the command. */
30398 	uint16_t	error_code;
30399 	/* The HWRM command request type. */
30400 	uint16_t	req_type;
30401 	/* The sequence ID from the original command. */
30402 	uint16_t	seq_id;
30403 	/* The length of the response data in number of bytes. */
30404 	uint16_t	resp_len;
30405 	/*
30406 	 * Timestamp value of PTP message captured, or current value of
30407 	 * free running timer.
30408 	 */
30409 	uint64_t	ptp_msg_ts;
30410 	/* Sequence ID of the PTP message captured. */
30411 	uint16_t	ptp_msg_seqid;
30412 	uint8_t	unused_0[5];
30413 	/*
30414 	 * This field is used in Output records to indicate that the output
30415 	 * is completely written to RAM. This field should be read as '1'
30416 	 * to indicate that the output has been completely written. When
30417 	 * writing a command completion or response to an internal processor,
30418 	 * the order of writes has to be such that this field is written last.
30419 	 */
30420 	uint8_t	valid;
30421 } hwrm_port_ts_query_output_t, *phwrm_port_ts_query_output_t;
30422 
30423 /***********************
30424  * hwrm_port_phy_qcaps *
30425  ***********************/
30426 
30427 
30428 /* hwrm_port_phy_qcaps_input (size:192b/24B) */
30429 
30430 typedef struct hwrm_port_phy_qcaps_input {
30431 	/* The HWRM command request type. */
30432 	uint16_t	req_type;
30433 	/*
30434 	 * The completion ring to send the completion event on. This should
30435 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30436 	 */
30437 	uint16_t	cmpl_ring;
30438 	/*
30439 	 * The sequence ID is used by the driver for tracking multiple
30440 	 * commands. This ID is treated as opaque data by the firmware and
30441 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30442 	 */
30443 	uint16_t	seq_id;
30444 	/*
30445 	 * The target ID of the command:
30446 	 * * 0x0-0xFFF8 - The function ID
30447 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30448 	 * * 0xFFFD - Reserved for user-space HWRM interface
30449 	 * * 0xFFFF - HWRM
30450 	 */
30451 	uint16_t	target_id;
30452 	/*
30453 	 * A physical address pointer pointing to a host buffer that the
30454 	 * command's response data will be written. This can be either a host
30455 	 * physical address (HPA) or a guest physical address (GPA) and must
30456 	 * point to a physically contiguous block of memory.
30457 	 */
30458 	uint64_t	resp_addr;
30459 	/* Port ID of port that is being queried. */
30460 	uint16_t	port_id;
30461 	uint8_t	unused_0[6];
30462 } hwrm_port_phy_qcaps_input_t, *phwrm_port_phy_qcaps_input_t;
30463 
30464 /* hwrm_port_phy_qcaps_output (size:320b/40B) */
30465 
30466 typedef struct hwrm_port_phy_qcaps_output {
30467 	/* The specific error status for the command. */
30468 	uint16_t	error_code;
30469 	/* The HWRM command request type. */
30470 	uint16_t	req_type;
30471 	/* The sequence ID from the original command. */
30472 	uint16_t	seq_id;
30473 	/* The length of the response data in number of bytes. */
30474 	uint16_t	resp_len;
30475 	/* PHY capability flags */
30476 	uint8_t	flags;
30477 	/*
30478 	 * If set to 1, then this field indicates that the
30479 	 * link is capable of supporting EEE.
30480 	 */
30481 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_EEE_SUPPORTED			UINT32_C(0x1)
30482 	/*
30483 	 * If set to 1, then this field indicates that the
30484 	 * PHY is capable of supporting external loopback.
30485 	 */
30486 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_EXTERNAL_LPBK_SUPPORTED	UINT32_C(0x2)
30487 	/*
30488 	 * If set to 1, then this field indicates that the
30489 	 * PHY is capable of supporting loopback in autoneg mode.
30490 	 */
30491 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_AUTONEG_LPBK_SUPPORTED	UINT32_C(0x4)
30492 	/*
30493 	 * Indicates if the configuration of shared PHY settings is
30494 	 * supported. In cases where a physical port is shared by multiple
30495 	 * functions (e.g. NPAR, multihost, etc), the configuration of PHY
30496 	 * settings may not be allowed. Callers to HWRM_PORT_PHY_CFG will
30497 	 * get an HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED error in this case.
30498 	 */
30499 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_SHARED_PHY_CFG_SUPPORTED	UINT32_C(0x8)
30500 	/*
30501 	 * If set to 1, it indicates that the port counters and extended
30502 	 * port counters will not reset when the firmware shuts down or
30503 	 * resets the PHY. These counters will only be reset during power
30504 	 * cycle or by calling HWRM_PORT_CLR_STATS.
30505 	 * If set to 0, the state of the counters is unspecified when
30506 	 * firmware shuts down or resets the PHY.
30507 	 */
30508 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_CUMULATIVE_COUNTERS_ON_RESET	UINT32_C(0x10)
30509 	/*
30510 	 * If set to 1, then this field indicates that the
30511 	 * local loopback is not supported on this controller.
30512 	 */
30513 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_LOCAL_LPBK_NOT_SUPPORTED	UINT32_C(0x20)
30514 	/*
30515 	 * If set to 1, then this field indicates that the
30516 	 * PHY/Link down policy during PF shutdown is totally
30517 	 * controlled by the firmware. It can shutdown the link
30518 	 * even when there are active VFs associated with the PF.
30519 	 * Host PF driver can send HWRM_PHY_CFG command to bring
30520 	 * down the PHY even when the port is shared between VFs
30521 	 * and PFs.
30522 	 */
30523 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_FW_MANAGED_LINK_DOWN		UINT32_C(0x40)
30524 	/*
30525 	 * If set to 1, this field indicates that the FCS may
30526 	 * be disabled for a given packet via the transmit
30527 	 * buffer descriptor.
30528 	 */
30529 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_NO_FCS			UINT32_C(0x80)
30530 	/* Number of front panel ports for this device. */
30531 	uint8_t	port_cnt;
30532 	/* Not supported or unknown */
30533 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_UNKNOWN UINT32_C(0x0)
30534 	/* single port device */
30535 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_1	UINT32_C(0x1)
30536 	/* 2-port device */
30537 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_2	UINT32_C(0x2)
30538 	/* 3-port device */
30539 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_3	UINT32_C(0x3)
30540 	/* 4-port device */
30541 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_4	UINT32_C(0x4)
30542 	/* 12-port device */
30543 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_12	UINT32_C(0xc)
30544 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_LAST   HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_12
30545 	/*
30546 	 * This is a bit mask to indicate what speeds are supported
30547 	 * as forced speeds on this link.
30548 	 * For each speed that can be forced on this link, the
30549 	 * corresponding mask bit shall be set to '1'.
30550 	 */
30551 	uint16_t	supported_speeds_force_mode;
30552 	/* 100Mb link speed (Half-duplex) */
30553 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100MBHD	UINT32_C(0x1)
30554 	/* 100Mb link speed (Full-duplex) */
30555 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100MB	UINT32_C(0x2)
30556 	/* 1Gb link speed (Half-duplex) */
30557 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_1GBHD	UINT32_C(0x4)
30558 	/* 1Gb link speed (Full-duplex) */
30559 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_1GB	UINT32_C(0x8)
30560 	/* 2Gb link speed */
30561 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_2GB	UINT32_C(0x10)
30562 	/* 25Gb link speed */
30563 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_2_5GB	UINT32_C(0x20)
30564 	/* 10Gb link speed */
30565 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10GB	UINT32_C(0x40)
30566 	/* 20Gb link speed */
30567 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_20GB	UINT32_C(0x80)
30568 	/* 25Gb link speed */
30569 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_25GB	UINT32_C(0x100)
30570 	/* 40Gb link speed */
30571 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_40GB	UINT32_C(0x200)
30572 	/* 50Gb link speed */
30573 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_50GB	UINT32_C(0x400)
30574 	/* 100Gb link speed */
30575 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100GB	UINT32_C(0x800)
30576 	/* 10Mb link speed (Half-duplex) */
30577 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10MBHD	UINT32_C(0x1000)
30578 	/* 10Mb link speed (Full-duplex) */
30579 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10MB	UINT32_C(0x2000)
30580 	/*
30581 	 * This is a bit mask to indicate what speeds are supported
30582 	 * for autonegotiation on this link.
30583 	 * For each speed that can be autonegotiated on this link, the
30584 	 * corresponding mask bit shall be set to '1'.
30585 	 */
30586 	uint16_t	supported_speeds_auto_mode;
30587 	/* 100Mb link speed (Half-duplex) */
30588 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100MBHD	UINT32_C(0x1)
30589 	/* 100Mb link speed (Full-duplex) */
30590 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100MB	UINT32_C(0x2)
30591 	/* 1Gb link speed (Half-duplex) */
30592 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_1GBHD	UINT32_C(0x4)
30593 	/* 1Gb link speed (Full-duplex) */
30594 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_1GB	UINT32_C(0x8)
30595 	/* 2Gb link speed */
30596 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_2GB	UINT32_C(0x10)
30597 	/* 25Gb link speed */
30598 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_2_5GB	UINT32_C(0x20)
30599 	/* 10Gb link speed */
30600 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10GB	UINT32_C(0x40)
30601 	/* 20Gb link speed */
30602 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_20GB	UINT32_C(0x80)
30603 	/* 25Gb link speed */
30604 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_25GB	UINT32_C(0x100)
30605 	/* 40Gb link speed */
30606 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_40GB	UINT32_C(0x200)
30607 	/* 50Gb link speed */
30608 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_50GB	UINT32_C(0x400)
30609 	/* 100Gb link speed */
30610 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100GB	UINT32_C(0x800)
30611 	/* 10Mb link speed (Half-duplex) */
30612 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10MBHD	UINT32_C(0x1000)
30613 	/* 10Mb link speed (Full-duplex) */
30614 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10MB	UINT32_C(0x2000)
30615 	/*
30616 	 * This is a bit mask to indicate what speeds are supported
30617 	 * for EEE on this link.
30618 	 * For each speed that can be autonegotiated when EEE is enabled
30619 	 * on this link, the corresponding mask bit shall be set to '1'.
30620 	 * This field is only valid when the eee_supported is set to '1'.
30621 	 */
30622 	uint16_t	supported_speeds_eee_mode;
30623 	/* Reserved */
30624 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD1	UINT32_C(0x1)
30625 	/* 100Mb link speed (Full-duplex) */
30626 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_100MB	UINT32_C(0x2)
30627 	/* Reserved */
30628 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD2	UINT32_C(0x4)
30629 	/* 1Gb link speed (Full-duplex) */
30630 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_1GB	UINT32_C(0x8)
30631 	/* Reserved */
30632 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD3	UINT32_C(0x10)
30633 	/* Reserved */
30634 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD4	UINT32_C(0x20)
30635 	/* 10Gb link speed */
30636 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_10GB	UINT32_C(0x40)
30637 	uint32_t	tx_lpi_timer_low;
30638 	/*
30639 	 * The lowest value of TX LPI timer that can be set on this link
30640 	 * when EEE is enabled. This value is in microseconds.
30641 	 * This field is valid only when_eee_supported is set to '1'.
30642 	 */
30643 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_LOW_MASK UINT32_C(0xffffff)
30644 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_LOW_SFT 0
30645 	/*
30646 	 * Reserved field. The HWRM shall set this field to 0.
30647 	 * An HWRM client shall ignore this field.
30648 	 */
30649 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD2_MASK	UINT32_C(0xff000000)
30650 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD2_SFT		24
30651 	uint32_t	valid_tx_lpi_timer_high;
30652 	/*
30653 	 * The highest value of TX LPI timer that can be set on this link
30654 	 * when EEE is enabled. This value is in microseconds.
30655 	 * This field is valid only when_eee_supported is set to '1'.
30656 	 */
30657 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_HIGH_MASK UINT32_C(0xffffff)
30658 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_HIGH_SFT 0
30659 	/*
30660 	 * Reserved field. The HWRM shall set this field to 0.
30661 	 * An HWRM client shall ignore this field.
30662 	 */
30663 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD_MASK		UINT32_C(0xff000000)
30664 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD_SFT		24
30665 	/*
30666 	 * This field is used to advertise which PAM4 speeds are supported
30667 	 * in auto mode.
30668 	 */
30669 	uint16_t	supported_pam4_speeds_auto_mode;
30670 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_AUTO_MODE_50G	UINT32_C(0x1)
30671 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_AUTO_MODE_100G	UINT32_C(0x2)
30672 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_AUTO_MODE_200G	UINT32_C(0x4)
30673 	/*
30674 	 * This field is used to advertise which PAM4 speeds are supported
30675 	 * in forced mode.
30676 	 */
30677 	uint16_t	supported_pam4_speeds_force_mode;
30678 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_FORCE_MODE_50G	UINT32_C(0x1)
30679 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_FORCE_MODE_100G	UINT32_C(0x2)
30680 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_FORCE_MODE_200G	UINT32_C(0x4)
30681 	/* More PHY capability flags */
30682 	uint16_t	flags2;
30683 	/*
30684 	 * If set to 1, then this field indicates that
30685 	 * 802.3x flow control is not supported.
30686 	 */
30687 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_PAUSE_UNSUPPORTED	UINT32_C(0x1)
30688 	/*
30689 	 * If set to 1, then this field indicates that
30690 	 * priority-based flow control is not supported.
30691 	 */
30692 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_PFC_UNSUPPORTED		UINT32_C(0x2)
30693 	/*
30694 	 * If set to 1, then this field indicates that
30695 	 * bank based addressing is supported in firmware.
30696 	 */
30697 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_BANK_ADDR_SUPPORTED	UINT32_C(0x4)
30698 	/*
30699 	 * If set to 1, then this field indicates that
30700 	 * supported_speed2 field is to be used in lieu of all
30701 	 * supported_speed variants.
30702 	 */
30703 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_SPEEDS2_SUPPORTED	UINT32_C(0x8)
30704 	/*
30705 	 * If set to 1, then this field indicates that
30706 	 * the device does not support remote loopback.
30707 	 */
30708 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_REMOTE_LPBK_UNSUPPORTED	UINT32_C(0x10)
30709 	/*
30710 	 * Number of internal ports for this device. This field allows the FW
30711 	 * to advertise how many internal ports are present. Manufacturing
30712 	 * tools uses this to determine how many internal ports should have
30713 	 * the PRBS test run on them. This field always return 0 unless NVM
30714 	 * option "HPTN_MODE" is set to 1.
30715 	 */
30716 	uint8_t	internal_port_cnt;
30717 	uint8_t	unused_0;
30718 	/*
30719 	 * This is a bit mask to indicate what speeds are supported
30720 	 * as forced speeds on this link.
30721 	 * For each speed that can be forced on this link, the
30722 	 * corresponding mask bit shall be set to '1'.
30723 	 * This field is valid only if speeds2_supported bit is set in flags2
30724 	 */
30725 	uint16_t	supported_speeds2_force_mode;
30726 	/* 1Gb link speed */
30727 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_1GB		UINT32_C(0x1)
30728 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
30729 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_10GB		UINT32_C(0x2)
30730 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
30731 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_25GB		UINT32_C(0x4)
30732 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
30733 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_40GB		UINT32_C(0x8)
30734 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
30735 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_50GB		UINT32_C(0x10)
30736 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
30737 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_100GB		UINT32_C(0x20)
30738 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
30739 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_50GB_PAM4_56	UINT32_C(0x40)
30740 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
30741 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_100GB_PAM4_56	UINT32_C(0x80)
30742 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
30743 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_200GB_PAM4_56	UINT32_C(0x100)
30744 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
30745 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_400GB_PAM4_56	UINT32_C(0x200)
30746 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
30747 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_100GB_PAM4_112	UINT32_C(0x400)
30748 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
30749 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_200GB_PAM4_112	UINT32_C(0x800)
30750 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
30751 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_400GB_PAM4_112	UINT32_C(0x1000)
30752 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
30753 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_800GB_PAM4_112	UINT32_C(0x2000)
30754 	/*
30755 	 * This is a bit mask to indicate what speeds are supported
30756 	 * for autonegotiation on this link.
30757 	 * For each speed that can be autonegotiated on this link, the
30758 	 * corresponding mask bit shall be set to '1'.
30759 	 * This field is valid only if speeds2_supported bit is set in flags2
30760 	 */
30761 	uint16_t	supported_speeds2_auto_mode;
30762 	/* 1Gb link speed */
30763 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_1GB		UINT32_C(0x1)
30764 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
30765 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_10GB		UINT32_C(0x2)
30766 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
30767 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_25GB		UINT32_C(0x4)
30768 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
30769 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_40GB		UINT32_C(0x8)
30770 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
30771 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_50GB		UINT32_C(0x10)
30772 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
30773 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_100GB		UINT32_C(0x20)
30774 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
30775 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_50GB_PAM4_56	UINT32_C(0x40)
30776 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
30777 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_100GB_PAM4_56	UINT32_C(0x80)
30778 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
30779 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_200GB_PAM4_56	UINT32_C(0x100)
30780 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
30781 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_400GB_PAM4_56	UINT32_C(0x200)
30782 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
30783 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_100GB_PAM4_112	UINT32_C(0x400)
30784 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
30785 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_200GB_PAM4_112	UINT32_C(0x800)
30786 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
30787 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_400GB_PAM4_112	UINT32_C(0x1000)
30788 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
30789 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_800GB_PAM4_112	UINT32_C(0x2000)
30790 	uint8_t	unused_1[3];
30791 	/*
30792 	 * This field is used in Output records to indicate that the output
30793 	 * is completely written to RAM. This field should be read as '1'
30794 	 * to indicate that the output has been completely written. When
30795 	 * writing a command completion or response to an internal processor,
30796 	 * the order of writes has to be such that this field is written last.
30797 	 */
30798 	uint8_t	valid;
30799 } hwrm_port_phy_qcaps_output_t, *phwrm_port_phy_qcaps_output_t;
30800 
30801 /***************************
30802  * hwrm_port_phy_i2c_write *
30803  ***************************/
30804 
30805 
30806 /* hwrm_port_phy_i2c_write_input (size:832b/104B) */
30807 
30808 typedef struct hwrm_port_phy_i2c_write_input {
30809 	/* The HWRM command request type. */
30810 	uint16_t	req_type;
30811 	/*
30812 	 * The completion ring to send the completion event on. This should
30813 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30814 	 */
30815 	uint16_t	cmpl_ring;
30816 	/*
30817 	 * The sequence ID is used by the driver for tracking multiple
30818 	 * commands. This ID is treated as opaque data by the firmware and
30819 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30820 	 */
30821 	uint16_t	seq_id;
30822 	/*
30823 	 * The target ID of the command:
30824 	 * * 0x0-0xFFF8 - The function ID
30825 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30826 	 * * 0xFFFD - Reserved for user-space HWRM interface
30827 	 * * 0xFFFF - HWRM
30828 	 */
30829 	uint16_t	target_id;
30830 	/*
30831 	 * A physical address pointer pointing to a host buffer that the
30832 	 * command's response data will be written. This can be either a host
30833 	 * physical address (HPA) or a guest physical address (GPA) and must
30834 	 * point to a physically contiguous block of memory.
30835 	 */
30836 	uint64_t	resp_addr;
30837 	uint32_t	flags;
30838 	uint32_t	enables;
30839 	/*
30840 	 * This bit must be '1' for the page_offset field to be
30841 	 * configured.
30842 	 */
30843 	#define HWRM_PORT_PHY_I2C_WRITE_INPUT_ENABLES_PAGE_OFFSET	UINT32_C(0x1)
30844 	/*
30845 	 * This bit must be '1' for the bank_number field to be
30846 	 * configured.
30847 	 */
30848 	#define HWRM_PORT_PHY_I2C_WRITE_INPUT_ENABLES_BANK_NUMBER	UINT32_C(0x2)
30849 	/* Port ID of port. */
30850 	uint16_t	port_id;
30851 	/* 8-bit I2C slave address. */
30852 	uint8_t	i2c_slave_addr;
30853 	/* The bank number of the page that is being accessed over I2C. */
30854 	uint8_t	bank_number;
30855 	/* The page number that is being accessed over I2C. */
30856 	uint16_t	page_number;
30857 	/* Offset within the page that is being accessed over I2C. */
30858 	uint16_t	page_offset;
30859 	/*
30860 	 * Length of data to write, in bytes starting at the offset
30861 	 * specified above. If the offset is not specified, then
30862 	 * the data shall be written from the beginning of the page.
30863 	 */
30864 	uint8_t	data_length;
30865 	uint8_t	unused_1[7];
30866 	/* Up to 64B of data. */
30867 	uint32_t	data[16];
30868 } hwrm_port_phy_i2c_write_input_t, *phwrm_port_phy_i2c_write_input_t;
30869 
30870 /* hwrm_port_phy_i2c_write_output (size:128b/16B) */
30871 
30872 typedef struct hwrm_port_phy_i2c_write_output {
30873 	/* The specific error status for the command. */
30874 	uint16_t	error_code;
30875 	/* The HWRM command request type. */
30876 	uint16_t	req_type;
30877 	/* The sequence ID from the original command. */
30878 	uint16_t	seq_id;
30879 	/* The length of the response data in number of bytes. */
30880 	uint16_t	resp_len;
30881 	uint8_t	unused_0[7];
30882 	/*
30883 	 * This field is used in Output records to indicate that the output
30884 	 * is completely written to RAM. This field should be read as '1'
30885 	 * to indicate that the output has been completely written. When
30886 	 * writing a command completion or response to an internal processor,
30887 	 * the order of writes has to be such that this field is written last.
30888 	 */
30889 	uint8_t	valid;
30890 } hwrm_port_phy_i2c_write_output_t, *phwrm_port_phy_i2c_write_output_t;
30891 
30892 /**************************
30893  * hwrm_port_phy_i2c_read *
30894  **************************/
30895 
30896 
30897 /* hwrm_port_phy_i2c_read_input (size:320b/40B) */
30898 
30899 typedef struct hwrm_port_phy_i2c_read_input {
30900 	/* The HWRM command request type. */
30901 	uint16_t	req_type;
30902 	/*
30903 	 * The completion ring to send the completion event on. This should
30904 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30905 	 */
30906 	uint16_t	cmpl_ring;
30907 	/*
30908 	 * The sequence ID is used by the driver for tracking multiple
30909 	 * commands. This ID is treated as opaque data by the firmware and
30910 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30911 	 */
30912 	uint16_t	seq_id;
30913 	/*
30914 	 * The target ID of the command:
30915 	 * * 0x0-0xFFF8 - The function ID
30916 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30917 	 * * 0xFFFD - Reserved for user-space HWRM interface
30918 	 * * 0xFFFF - HWRM
30919 	 */
30920 	uint16_t	target_id;
30921 	/*
30922 	 * A physical address pointer pointing to a host buffer that the
30923 	 * command's response data will be written. This can be either a host
30924 	 * physical address (HPA) or a guest physical address (GPA) and must
30925 	 * point to a physically contiguous block of memory.
30926 	 */
30927 	uint64_t	resp_addr;
30928 	uint32_t	flags;
30929 	uint32_t	enables;
30930 	/*
30931 	 * This bit must be '1' for the page_offset field to be
30932 	 * configured.
30933 	 */
30934 	#define HWRM_PORT_PHY_I2C_READ_INPUT_ENABLES_PAGE_OFFSET	UINT32_C(0x1)
30935 	/*
30936 	 * This bit must be '1' for the bank_number field to be
30937 	 * configured.
30938 	 */
30939 	#define HWRM_PORT_PHY_I2C_READ_INPUT_ENABLES_BANK_NUMBER	UINT32_C(0x2)
30940 	/* Port ID of port. */
30941 	uint16_t	port_id;
30942 	/* 8-bit I2C slave address. */
30943 	uint8_t	i2c_slave_addr;
30944 	/* The bank number of the page that is being accessed over I2C. */
30945 	uint8_t	bank_number;
30946 	/* The page number that is being accessed over I2C. */
30947 	uint16_t	page_number;
30948 	/* Offset within the page that is being accessed over I2C. */
30949 	uint16_t	page_offset;
30950 	/*
30951 	 * Length of data to read, in bytes starting at the offset
30952 	 * specified above. If the offset is not specified, then
30953 	 * the data shall be read from the beginning of the page.
30954 	 */
30955 	uint8_t	data_length;
30956 	uint8_t	unused_1[7];
30957 } hwrm_port_phy_i2c_read_input_t, *phwrm_port_phy_i2c_read_input_t;
30958 
30959 /* hwrm_port_phy_i2c_read_output (size:640b/80B) */
30960 
30961 typedef struct hwrm_port_phy_i2c_read_output {
30962 	/* The specific error status for the command. */
30963 	uint16_t	error_code;
30964 	/* The HWRM command request type. */
30965 	uint16_t	req_type;
30966 	/* The sequence ID from the original command. */
30967 	uint16_t	seq_id;
30968 	/* The length of the response data in number of bytes. */
30969 	uint16_t	resp_len;
30970 	/* Up to 64B of data. */
30971 	uint32_t	data[16];
30972 	uint8_t	unused_0[7];
30973 	/*
30974 	 * This field is used in Output records to indicate that the output
30975 	 * is completely written to RAM. This field should be read as '1'
30976 	 * to indicate that the output has been completely written. When
30977 	 * writing a command completion or response to an internal processor,
30978 	 * the order of writes has to be such that this field is written last.
30979 	 */
30980 	uint8_t	valid;
30981 } hwrm_port_phy_i2c_read_output_t, *phwrm_port_phy_i2c_read_output_t;
30982 
30983 /****************************
30984  * hwrm_port_phy_mdio_write *
30985  ****************************/
30986 
30987 
30988 /* hwrm_port_phy_mdio_write_input (size:320b/40B) */
30989 
30990 typedef struct hwrm_port_phy_mdio_write_input {
30991 	/* The HWRM command request type. */
30992 	uint16_t	req_type;
30993 	/*
30994 	 * The completion ring to send the completion event on. This should
30995 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30996 	 */
30997 	uint16_t	cmpl_ring;
30998 	/*
30999 	 * The sequence ID is used by the driver for tracking multiple
31000 	 * commands. This ID is treated as opaque data by the firmware and
31001 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
31002 	 */
31003 	uint16_t	seq_id;
31004 	/*
31005 	 * The target ID of the command:
31006 	 * * 0x0-0xFFF8 - The function ID
31007 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31008 	 * * 0xFFFD - Reserved for user-space HWRM interface
31009 	 * * 0xFFFF - HWRM
31010 	 */
31011 	uint16_t	target_id;
31012 	/*
31013 	 * A physical address pointer pointing to a host buffer that the
31014 	 * command's response data will be written. This can be either a host
31015 	 * physical address (HPA) or a guest physical address (GPA) and must
31016 	 * point to a physically contiguous block of memory.
31017 	 */
31018 	uint64_t	resp_addr;
31019 	/* Reserved for future use. */
31020 	uint64_t	unused_0;
31021 	/* Port ID of port. */
31022 	uint16_t	port_id;
31023 	/* If phy_address is 0xFF, port_id will be used to derive phy_addr. */
31024 	uint8_t	phy_addr;
31025 	/* 8-bit device address. */
31026 	uint8_t	dev_addr;
31027 	/* 16-bit register address. */
31028 	uint16_t	reg_addr;
31029 	/* 16-bit register data. */
31030 	uint16_t	reg_data;
31031 	/*
31032 	 * When this bit is set to 1 a Clause 45 mdio access is done.
31033 	 * when this bit is set to 0 a Clause 22 mdio access is done.
31034 	 */
31035 	uint8_t	cl45_mdio;
31036 	/*  */
31037 	uint8_t	unused_1[7];
31038 } hwrm_port_phy_mdio_write_input_t, *phwrm_port_phy_mdio_write_input_t;
31039 
31040 /* hwrm_port_phy_mdio_write_output (size:128b/16B) */
31041 
31042 typedef struct hwrm_port_phy_mdio_write_output {
31043 	/* The specific error status for the command. */
31044 	uint16_t	error_code;
31045 	/* The HWRM command request type. */
31046 	uint16_t	req_type;
31047 	/* The sequence ID from the original command. */
31048 	uint16_t	seq_id;
31049 	/* The length of the response data in number of bytes. */
31050 	uint16_t	resp_len;
31051 	uint8_t	unused_0[7];
31052 	/*
31053 	 * This field is used in Output records to indicate that the output
31054 	 * is completely written to RAM. This field should be read as '1'
31055 	 * to indicate that the output has been completely written. When
31056 	 * writing a command completion or response to an internal processor,
31057 	 * the order of writes has to be such that this field is written last.
31058 	 */
31059 	uint8_t	valid;
31060 } hwrm_port_phy_mdio_write_output_t, *phwrm_port_phy_mdio_write_output_t;
31061 
31062 /***************************
31063  * hwrm_port_phy_mdio_read *
31064  ***************************/
31065 
31066 
31067 /* hwrm_port_phy_mdio_read_input (size:256b/32B) */
31068 
31069 typedef struct hwrm_port_phy_mdio_read_input {
31070 	/* The HWRM command request type. */
31071 	uint16_t	req_type;
31072 	/*
31073 	 * The completion ring to send the completion event on. This should
31074 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
31075 	 */
31076 	uint16_t	cmpl_ring;
31077 	/*
31078 	 * The sequence ID is used by the driver for tracking multiple
31079 	 * commands. This ID is treated as opaque data by the firmware and
31080 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
31081 	 */
31082 	uint16_t	seq_id;
31083 	/*
31084 	 * The target ID of the command:
31085 	 * * 0x0-0xFFF8 - The function ID
31086 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31087 	 * * 0xFFFD - Reserved for user-space HWRM interface
31088 	 * * 0xFFFF - HWRM
31089 	 */
31090 	uint16_t	target_id;
31091 	/*
31092 	 * A physical address pointer pointing to a host buffer that the
31093 	 * command's response data will be written. This can be either a host
31094 	 * physical address (HPA) or a guest physical address (GPA) and must
31095 	 * point to a physically contiguous block of memory.
31096 	 */
31097 	uint64_t	resp_addr;
31098 	/* Reserved for future use. */
31099 	uint64_t	unused_0;
31100 	/* Port ID of port. */
31101 	uint16_t	port_id;
31102 	/* If phy_address is 0xFF, port_id will be used to derive phy_addr. */
31103 	uint8_t	phy_addr;
31104 	/* 8-bit device address. */
31105 	uint8_t	dev_addr;
31106 	/* 16-bit register address. */
31107 	uint16_t	reg_addr;
31108 	/*
31109 	 * When this bit is set to 1 a Clause 45 mdio access is done.
31110 	 * when this bit is set to 0 a Clause 22 mdio access is done.
31111 	 */
31112 	uint8_t	cl45_mdio;
31113 	/*  */
31114 	uint8_t	unused_1;
31115 } hwrm_port_phy_mdio_read_input_t, *phwrm_port_phy_mdio_read_input_t;
31116 
31117 /* hwrm_port_phy_mdio_read_output (size:128b/16B) */
31118 
31119 typedef struct hwrm_port_phy_mdio_read_output {
31120 	/* The specific error status for the command. */
31121 	uint16_t	error_code;
31122 	/* The HWRM command request type. */
31123 	uint16_t	req_type;
31124 	/* The sequence ID from the original command. */
31125 	uint16_t	seq_id;
31126 	/* The length of the response data in number of bytes. */
31127 	uint16_t	resp_len;
31128 	/* 16-bit register data. */
31129 	uint16_t	reg_data;
31130 	uint8_t	unused_0[5];
31131 	/*
31132 	 * This field is used in Output records to indicate that the output
31133 	 * is completely written to RAM. This field should be read as '1'
31134 	 * to indicate that the output has been completely written. When
31135 	 * writing a command completion or response to an internal processor,
31136 	 * the order of writes has to be such that this field is written last.
31137 	 */
31138 	uint8_t	valid;
31139 } hwrm_port_phy_mdio_read_output_t, *phwrm_port_phy_mdio_read_output_t;
31140 
31141 /*********************
31142  * hwrm_port_led_cfg *
31143  *********************/
31144 
31145 
31146 /* hwrm_port_led_cfg_input (size:512b/64B) */
31147 
31148 typedef struct hwrm_port_led_cfg_input {
31149 	/* The HWRM command request type. */
31150 	uint16_t	req_type;
31151 	/*
31152 	 * The completion ring to send the completion event on. This should
31153 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
31154 	 */
31155 	uint16_t	cmpl_ring;
31156 	/*
31157 	 * The sequence ID is used by the driver for tracking multiple
31158 	 * commands. This ID is treated as opaque data by the firmware and
31159 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
31160 	 */
31161 	uint16_t	seq_id;
31162 	/*
31163 	 * The target ID of the command:
31164 	 * * 0x0-0xFFF8 - The function ID
31165 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31166 	 * * 0xFFFD - Reserved for user-space HWRM interface
31167 	 * * 0xFFFF - HWRM
31168 	 */
31169 	uint16_t	target_id;
31170 	/*
31171 	 * A physical address pointer pointing to a host buffer that the
31172 	 * command's response data will be written. This can be either a host
31173 	 * physical address (HPA) or a guest physical address (GPA) and must
31174 	 * point to a physically contiguous block of memory.
31175 	 */
31176 	uint64_t	resp_addr;
31177 	uint32_t	enables;
31178 	/*
31179 	 * This bit must be '1' for the led0_id field to be
31180 	 * configured.
31181 	 */
31182 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_ID		UINT32_C(0x1)
31183 	/*
31184 	 * This bit must be '1' for the led0_state field to be
31185 	 * configured.
31186 	 */
31187 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_STATE	UINT32_C(0x2)
31188 	/*
31189 	 * This bit must be '1' for the led0_color field to be
31190 	 * configured.
31191 	 */
31192 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_COLOR	UINT32_C(0x4)
31193 	/*
31194 	 * This bit must be '1' for the led0_blink_on field to be
31195 	 * configured.
31196 	 */
31197 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_BLINK_ON	UINT32_C(0x8)
31198 	/*
31199 	 * This bit must be '1' for the led0_blink_off field to be
31200 	 * configured.
31201 	 */
31202 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_BLINK_OFF	UINT32_C(0x10)
31203 	/*
31204 	 * This bit must be '1' for the led0_group_id field to be
31205 	 * configured.
31206 	 */
31207 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_GROUP_ID	UINT32_C(0x20)
31208 	/*
31209 	 * This bit must be '1' for the led1_id field to be
31210 	 * configured.
31211 	 */
31212 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_ID		UINT32_C(0x40)
31213 	/*
31214 	 * This bit must be '1' for the led1_state field to be
31215 	 * configured.
31216 	 */
31217 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_STATE	UINT32_C(0x80)
31218 	/*
31219 	 * This bit must be '1' for the led1_color field to be
31220 	 * configured.
31221 	 */
31222 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_COLOR	UINT32_C(0x100)
31223 	/*
31224 	 * This bit must be '1' for the led1_blink_on field to be
31225 	 * configured.
31226 	 */
31227 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_BLINK_ON	UINT32_C(0x200)
31228 	/*
31229 	 * This bit must be '1' for the led1_blink_off field to be
31230 	 * configured.
31231 	 */
31232 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_BLINK_OFF	UINT32_C(0x400)
31233 	/*
31234 	 * This bit must be '1' for the led1_group_id field to be
31235 	 * configured.
31236 	 */
31237 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_GROUP_ID	UINT32_C(0x800)
31238 	/*
31239 	 * This bit must be '1' for the led2_id field to be
31240 	 * configured.
31241 	 */
31242 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_ID		UINT32_C(0x1000)
31243 	/*
31244 	 * This bit must be '1' for the led2_state field to be
31245 	 * configured.
31246 	 */
31247 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_STATE	UINT32_C(0x2000)
31248 	/*
31249 	 * This bit must be '1' for the led2_color field to be
31250 	 * configured.
31251 	 */
31252 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_COLOR	UINT32_C(0x4000)
31253 	/*
31254 	 * This bit must be '1' for the led2_blink_on field to be
31255 	 * configured.
31256 	 */
31257 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_BLINK_ON	UINT32_C(0x8000)
31258 	/*
31259 	 * This bit must be '1' for the led2_blink_off field to be
31260 	 * configured.
31261 	 */
31262 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_BLINK_OFF	UINT32_C(0x10000)
31263 	/*
31264 	 * This bit must be '1' for the led2_group_id field to be
31265 	 * configured.
31266 	 */
31267 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_GROUP_ID	UINT32_C(0x20000)
31268 	/*
31269 	 * This bit must be '1' for the led3_id field to be
31270 	 * configured.
31271 	 */
31272 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_ID		UINT32_C(0x40000)
31273 	/*
31274 	 * This bit must be '1' for the led3_state field to be
31275 	 * configured.
31276 	 */
31277 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_STATE	UINT32_C(0x80000)
31278 	/*
31279 	 * This bit must be '1' for the led3_color field to be
31280 	 * configured.
31281 	 */
31282 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_COLOR	UINT32_C(0x100000)
31283 	/*
31284 	 * This bit must be '1' for the led3_blink_on field to be
31285 	 * configured.
31286 	 */
31287 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_BLINK_ON	UINT32_C(0x200000)
31288 	/*
31289 	 * This bit must be '1' for the led3_blink_off field to be
31290 	 * configured.
31291 	 */
31292 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_BLINK_OFF	UINT32_C(0x400000)
31293 	/*
31294 	 * This bit must be '1' for the led3_group_id field to be
31295 	 * configured.
31296 	 */
31297 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_GROUP_ID	UINT32_C(0x800000)
31298 	/* Port ID of port whose LEDs are configured. */
31299 	uint16_t	port_id;
31300 	/*
31301 	 * The number of LEDs that are being configured.
31302 	 * Up to 4 LEDs can be configured with this command.
31303 	 */
31304 	uint8_t	num_leds;
31305 	/* Reserved field. */
31306 	uint8_t	rsvd;
31307 	/* An identifier for the LED #0. */
31308 	uint8_t	led0_id;
31309 	/* The requested state of the LED #0. */
31310 	uint8_t	led0_state;
31311 	/* Default state of the LED */
31312 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_DEFAULT  UINT32_C(0x0)
31313 	/* Off */
31314 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_OFF	UINT32_C(0x1)
31315 	/* On */
31316 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_ON	UINT32_C(0x2)
31317 	/* Blink */
31318 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINK	UINT32_C(0x3)
31319 	/* Blink Alternately */
31320 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINKALT UINT32_C(0x4)
31321 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_LAST	HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINKALT
31322 	/* The requested color of LED #0. */
31323 	uint8_t	led0_color;
31324 	/* Default */
31325 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_DEFAULT	UINT32_C(0x0)
31326 	/* Amber */
31327 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_AMBER	UINT32_C(0x1)
31328 	/* Green */
31329 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_GREEN	UINT32_C(0x2)
31330 	/* Green or Amber */
31331 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_GREENAMBER UINT32_C(0x3)
31332 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_LAST	HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_GREENAMBER
31333 	uint8_t	unused_0;
31334 	/*
31335 	 * If the LED #0 state is "blink" or "blinkalt", then
31336 	 * this field represents the requested time in milliseconds
31337 	 * to keep LED on between cycles.
31338 	 */
31339 	uint16_t	led0_blink_on;
31340 	/*
31341 	 * If the LED #0 state is "blink" or "blinkalt", then
31342 	 * this field represents the requested time in milliseconds
31343 	 * to keep LED off between cycles.
31344 	 */
31345 	uint16_t	led0_blink_off;
31346 	/*
31347 	 * An identifier for the group of LEDs that LED #0 belongs
31348 	 * to.
31349 	 * If set to 0, then the LED #0 shall not be grouped and
31350 	 * shall be treated as an individual resource.
31351 	 * For all other non-zero values of this field, LED #0 shall
31352 	 * be grouped together with the LEDs with the same group ID
31353 	 * value.
31354 	 */
31355 	uint8_t	led0_group_id;
31356 	/* Reserved field. */
31357 	uint8_t	rsvd0;
31358 	/* An identifier for the LED #1. */
31359 	uint8_t	led1_id;
31360 	/* The requested state of the LED #1. */
31361 	uint8_t	led1_state;
31362 	/* Default state of the LED */
31363 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_DEFAULT  UINT32_C(0x0)
31364 	/* Off */
31365 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_OFF	UINT32_C(0x1)
31366 	/* On */
31367 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_ON	UINT32_C(0x2)
31368 	/* Blink */
31369 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_BLINK	UINT32_C(0x3)
31370 	/* Blink Alternately */
31371 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_BLINKALT UINT32_C(0x4)
31372 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_LAST	HWRM_PORT_LED_CFG_INPUT_LED1_STATE_BLINKALT
31373 	/* The requested color of LED #1. */
31374 	uint8_t	led1_color;
31375 	/* Default */
31376 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_DEFAULT	UINT32_C(0x0)
31377 	/* Amber */
31378 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_AMBER	UINT32_C(0x1)
31379 	/* Green */
31380 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_GREEN	UINT32_C(0x2)
31381 	/* Green or Amber */
31382 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_GREENAMBER UINT32_C(0x3)
31383 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_LAST	HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_GREENAMBER
31384 	uint8_t	unused_1;
31385 	/*
31386 	 * If the LED #1 state is "blink" or "blinkalt", then
31387 	 * this field represents the requested time in milliseconds
31388 	 * to keep LED on between cycles.
31389 	 */
31390 	uint16_t	led1_blink_on;
31391 	/*
31392 	 * If the LED #1 state is "blink" or "blinkalt", then
31393 	 * this field represents the requested time in milliseconds
31394 	 * to keep LED off between cycles.
31395 	 */
31396 	uint16_t	led1_blink_off;
31397 	/*
31398 	 * An identifier for the group of LEDs that LED #1 belongs
31399 	 * to.
31400 	 * If set to 0, then the LED #1 shall not be grouped and
31401 	 * shall be treated as an individual resource.
31402 	 * For all other non-zero values of this field, LED #1 shall
31403 	 * be grouped together with the LEDs with the same group ID
31404 	 * value.
31405 	 */
31406 	uint8_t	led1_group_id;
31407 	/* Reserved field. */
31408 	uint8_t	rsvd1;
31409 	/* An identifier for the LED #2. */
31410 	uint8_t	led2_id;
31411 	/* The requested state of the LED #2. */
31412 	uint8_t	led2_state;
31413 	/* Default state of the LED */
31414 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_DEFAULT  UINT32_C(0x0)
31415 	/* Off */
31416 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_OFF	UINT32_C(0x1)
31417 	/* On */
31418 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_ON	UINT32_C(0x2)
31419 	/* Blink */
31420 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_BLINK	UINT32_C(0x3)
31421 	/* Blink Alternately */
31422 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_BLINKALT UINT32_C(0x4)
31423 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_LAST	HWRM_PORT_LED_CFG_INPUT_LED2_STATE_BLINKALT
31424 	/* The requested color of LED #2. */
31425 	uint8_t	led2_color;
31426 	/* Default */
31427 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_DEFAULT	UINT32_C(0x0)
31428 	/* Amber */
31429 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_AMBER	UINT32_C(0x1)
31430 	/* Green */
31431 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_GREEN	UINT32_C(0x2)
31432 	/* Green or Amber */
31433 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_GREENAMBER UINT32_C(0x3)
31434 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_LAST	HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_GREENAMBER
31435 	uint8_t	unused_2;
31436 	/*
31437 	 * If the LED #2 state is "blink" or "blinkalt", then
31438 	 * this field represents the requested time in milliseconds
31439 	 * to keep LED on between cycles.
31440 	 */
31441 	uint16_t	led2_blink_on;
31442 	/*
31443 	 * If the LED #2 state is "blink" or "blinkalt", then
31444 	 * this field represents the requested time in milliseconds
31445 	 * to keep LED off between cycles.
31446 	 */
31447 	uint16_t	led2_blink_off;
31448 	/*
31449 	 * An identifier for the group of LEDs that LED #2 belongs
31450 	 * to.
31451 	 * If set to 0, then the LED #2 shall not be grouped and
31452 	 * shall be treated as an individual resource.
31453 	 * For all other non-zero values of this field, LED #2 shall
31454 	 * be grouped together with the LEDs with the same group ID
31455 	 * value.
31456 	 */
31457 	uint8_t	led2_group_id;
31458 	/* Reserved field. */
31459 	uint8_t	rsvd2;
31460 	/* An identifier for the LED #3. */
31461 	uint8_t	led3_id;
31462 	/* The requested state of the LED #3. */
31463 	uint8_t	led3_state;
31464 	/* Default state of the LED */
31465 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_DEFAULT  UINT32_C(0x0)
31466 	/* Off */
31467 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_OFF	UINT32_C(0x1)
31468 	/* On */
31469 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_ON	UINT32_C(0x2)
31470 	/* Blink */
31471 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_BLINK	UINT32_C(0x3)
31472 	/* Blink Alternately */
31473 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_BLINKALT UINT32_C(0x4)
31474 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_LAST	HWRM_PORT_LED_CFG_INPUT_LED3_STATE_BLINKALT
31475 	/* The requested color of LED #3. */
31476 	uint8_t	led3_color;
31477 	/* Default */
31478 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_DEFAULT	UINT32_C(0x0)
31479 	/* Amber */
31480 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_AMBER	UINT32_C(0x1)
31481 	/* Green */
31482 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_GREEN	UINT32_C(0x2)
31483 	/* Green or Amber */
31484 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_GREENAMBER UINT32_C(0x3)
31485 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_LAST	HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_GREENAMBER
31486 	uint8_t	unused_3;
31487 	/*
31488 	 * If the LED #3 state is "blink" or "blinkalt", then
31489 	 * this field represents the requested time in milliseconds
31490 	 * to keep LED on between cycles.
31491 	 */
31492 	uint16_t	led3_blink_on;
31493 	/*
31494 	 * If the LED #3 state is "blink" or "blinkalt", then
31495 	 * this field represents the requested time in milliseconds
31496 	 * to keep LED off between cycles.
31497 	 */
31498 	uint16_t	led3_blink_off;
31499 	/*
31500 	 * An identifier for the group of LEDs that LED #3 belongs
31501 	 * to.
31502 	 * If set to 0, then the LED #3 shall not be grouped and
31503 	 * shall be treated as an individual resource.
31504 	 * For all other non-zero values of this field, LED #3 shall
31505 	 * be grouped together with the LEDs with the same group ID
31506 	 * value.
31507 	 */
31508 	uint8_t	led3_group_id;
31509 	/* Reserved field. */
31510 	uint8_t	rsvd3;
31511 } hwrm_port_led_cfg_input_t, *phwrm_port_led_cfg_input_t;
31512 
31513 /* hwrm_port_led_cfg_output (size:128b/16B) */
31514 
31515 typedef struct hwrm_port_led_cfg_output {
31516 	/* The specific error status for the command. */
31517 	uint16_t	error_code;
31518 	/* The HWRM command request type. */
31519 	uint16_t	req_type;
31520 	/* The sequence ID from the original command. */
31521 	uint16_t	seq_id;
31522 	/* The length of the response data in number of bytes. */
31523 	uint16_t	resp_len;
31524 	uint8_t	unused_0[7];
31525 	/*
31526 	 * This field is used in Output records to indicate that the output
31527 	 * is completely written to RAM. This field should be read as '1'
31528 	 * to indicate that the output has been completely written. When
31529 	 * writing a command completion or response to an internal processor,
31530 	 * the order of writes has to be such that this field is written last.
31531 	 */
31532 	uint8_t	valid;
31533 } hwrm_port_led_cfg_output_t, *phwrm_port_led_cfg_output_t;
31534 
31535 /**********************
31536  * hwrm_port_led_qcfg *
31537  **********************/
31538 
31539 
31540 /* hwrm_port_led_qcfg_input (size:192b/24B) */
31541 
31542 typedef struct hwrm_port_led_qcfg_input {
31543 	/* The HWRM command request type. */
31544 	uint16_t	req_type;
31545 	/*
31546 	 * The completion ring to send the completion event on. This should
31547 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
31548 	 */
31549 	uint16_t	cmpl_ring;
31550 	/*
31551 	 * The sequence ID is used by the driver for tracking multiple
31552 	 * commands. This ID is treated as opaque data by the firmware and
31553 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
31554 	 */
31555 	uint16_t	seq_id;
31556 	/*
31557 	 * The target ID of the command:
31558 	 * * 0x0-0xFFF8 - The function ID
31559 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31560 	 * * 0xFFFD - Reserved for user-space HWRM interface
31561 	 * * 0xFFFF - HWRM
31562 	 */
31563 	uint16_t	target_id;
31564 	/*
31565 	 * A physical address pointer pointing to a host buffer that the
31566 	 * command's response data will be written. This can be either a host
31567 	 * physical address (HPA) or a guest physical address (GPA) and must
31568 	 * point to a physically contiguous block of memory.
31569 	 */
31570 	uint64_t	resp_addr;
31571 	/* Port ID of port whose LED configuration is being queried. */
31572 	uint16_t	port_id;
31573 	uint8_t	unused_0[6];
31574 } hwrm_port_led_qcfg_input_t, *phwrm_port_led_qcfg_input_t;
31575 
31576 /* hwrm_port_led_qcfg_output (size:448b/56B) */
31577 
31578 typedef struct hwrm_port_led_qcfg_output {
31579 	/* The specific error status for the command. */
31580 	uint16_t	error_code;
31581 	/* The HWRM command request type. */
31582 	uint16_t	req_type;
31583 	/* The sequence ID from the original command. */
31584 	uint16_t	seq_id;
31585 	/* The length of the response data in number of bytes. */
31586 	uint16_t	resp_len;
31587 	/*
31588 	 * The number of LEDs that are configured on this port.
31589 	 * Up to 4 LEDs can be returned in the response.
31590 	 */
31591 	uint8_t	num_leds;
31592 	/* An identifier for the LED #0. */
31593 	uint8_t	led0_id;
31594 	/* The type of LED #0. */
31595 	uint8_t	led0_type;
31596 	/* Speed LED */
31597 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_SPEED	UINT32_C(0x0)
31598 	/* Activity LED */
31599 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_ACTIVITY UINT32_C(0x1)
31600 	/* Invalid */
31601 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_INVALID  UINT32_C(0xff)
31602 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_INVALID
31603 	/* The current state of the LED #0. */
31604 	uint8_t	led0_state;
31605 	/* Default state of the LED */
31606 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_DEFAULT  UINT32_C(0x0)
31607 	/* Off */
31608 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_OFF	UINT32_C(0x1)
31609 	/* On */
31610 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_ON	UINT32_C(0x2)
31611 	/* Blink */
31612 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_BLINK	UINT32_C(0x3)
31613 	/* Blink Alternately */
31614 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_BLINKALT UINT32_C(0x4)
31615 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_BLINKALT
31616 	/* The color of LED #0. */
31617 	uint8_t	led0_color;
31618 	/* Default */
31619 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_DEFAULT	UINT32_C(0x0)
31620 	/* Amber */
31621 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_AMBER	UINT32_C(0x1)
31622 	/* Green */
31623 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_GREEN	UINT32_C(0x2)
31624 	/* Green or Amber */
31625 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_GREENAMBER UINT32_C(0x3)
31626 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_GREENAMBER
31627 	uint8_t	unused_0;
31628 	/*
31629 	 * If the LED #0 state is "blink" or "blinkalt", then
31630 	 * this field represents the requested time in milliseconds
31631 	 * to keep LED on between cycles.
31632 	 */
31633 	uint16_t	led0_blink_on;
31634 	/*
31635 	 * If the LED #0 state is "blink" or "blinkalt", then
31636 	 * this field represents the requested time in milliseconds
31637 	 * to keep LED off between cycles.
31638 	 */
31639 	uint16_t	led0_blink_off;
31640 	/*
31641 	 * An identifier for the group of LEDs that LED #0 belongs
31642 	 * to.
31643 	 * If set to 0, then the LED #0 is not grouped.
31644 	 * For all other non-zero values of this field, LED #0 is
31645 	 * grouped together with the LEDs with the same group ID
31646 	 * value.
31647 	 */
31648 	uint8_t	led0_group_id;
31649 	/* An identifier for the LED #1. */
31650 	uint8_t	led1_id;
31651 	/* The type of LED #1. */
31652 	uint8_t	led1_type;
31653 	/* Speed LED */
31654 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_SPEED	UINT32_C(0x0)
31655 	/* Activity LED */
31656 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_ACTIVITY UINT32_C(0x1)
31657 	/* Invalid */
31658 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_INVALID  UINT32_C(0xff)
31659 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_INVALID
31660 	/* The current state of the LED #1. */
31661 	uint8_t	led1_state;
31662 	/* Default state of the LED */
31663 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_DEFAULT  UINT32_C(0x0)
31664 	/* Off */
31665 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_OFF	UINT32_C(0x1)
31666 	/* On */
31667 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_ON	UINT32_C(0x2)
31668 	/* Blink */
31669 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_BLINK	UINT32_C(0x3)
31670 	/* Blink Alternately */
31671 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_BLINKALT UINT32_C(0x4)
31672 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_BLINKALT
31673 	/* The color of LED #1. */
31674 	uint8_t	led1_color;
31675 	/* Default */
31676 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_DEFAULT	UINT32_C(0x0)
31677 	/* Amber */
31678 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_AMBER	UINT32_C(0x1)
31679 	/* Green */
31680 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_GREEN	UINT32_C(0x2)
31681 	/* Green or Amber */
31682 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_GREENAMBER UINT32_C(0x3)
31683 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_GREENAMBER
31684 	uint8_t	unused_1;
31685 	/*
31686 	 * If the LED #1 state is "blink" or "blinkalt", then
31687 	 * this field represents the requested time in milliseconds
31688 	 * to keep LED on between cycles.
31689 	 */
31690 	uint16_t	led1_blink_on;
31691 	/*
31692 	 * If the LED #1 state is "blink" or "blinkalt", then
31693 	 * this field represents the requested time in milliseconds
31694 	 * to keep LED off between cycles.
31695 	 */
31696 	uint16_t	led1_blink_off;
31697 	/*
31698 	 * An identifier for the group of LEDs that LED #1 belongs
31699 	 * to.
31700 	 * If set to 0, then the LED #1 is not grouped.
31701 	 * For all other non-zero values of this field, LED #1 is
31702 	 * grouped together with the LEDs with the same group ID
31703 	 * value.
31704 	 */
31705 	uint8_t	led1_group_id;
31706 	/* An identifier for the LED #2. */
31707 	uint8_t	led2_id;
31708 	/* The type of LED #2. */
31709 	uint8_t	led2_type;
31710 	/* Speed LED */
31711 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_SPEED	UINT32_C(0x0)
31712 	/* Activity LED */
31713 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_ACTIVITY UINT32_C(0x1)
31714 	/* Invalid */
31715 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_INVALID  UINT32_C(0xff)
31716 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_INVALID
31717 	/* The current state of the LED #2. */
31718 	uint8_t	led2_state;
31719 	/* Default state of the LED */
31720 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_DEFAULT  UINT32_C(0x0)
31721 	/* Off */
31722 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_OFF	UINT32_C(0x1)
31723 	/* On */
31724 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_ON	UINT32_C(0x2)
31725 	/* Blink */
31726 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_BLINK	UINT32_C(0x3)
31727 	/* Blink Alternately */
31728 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_BLINKALT UINT32_C(0x4)
31729 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_BLINKALT
31730 	/* The color of LED #2. */
31731 	uint8_t	led2_color;
31732 	/* Default */
31733 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_DEFAULT	UINT32_C(0x0)
31734 	/* Amber */
31735 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_AMBER	UINT32_C(0x1)
31736 	/* Green */
31737 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_GREEN	UINT32_C(0x2)
31738 	/* Green or Amber */
31739 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_GREENAMBER UINT32_C(0x3)
31740 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_GREENAMBER
31741 	uint8_t	unused_2;
31742 	/*
31743 	 * If the LED #2 state is "blink" or "blinkalt", then
31744 	 * this field represents the requested time in milliseconds
31745 	 * to keep LED on between cycles.
31746 	 */
31747 	uint16_t	led2_blink_on;
31748 	/*
31749 	 * If the LED #2 state is "blink" or "blinkalt", then
31750 	 * this field represents the requested time in milliseconds
31751 	 * to keep LED off between cycles.
31752 	 */
31753 	uint16_t	led2_blink_off;
31754 	/*
31755 	 * An identifier for the group of LEDs that LED #2 belongs
31756 	 * to.
31757 	 * If set to 0, then the LED #2 is not grouped.
31758 	 * For all other non-zero values of this field, LED #2 is
31759 	 * grouped together with the LEDs with the same group ID
31760 	 * value.
31761 	 */
31762 	uint8_t	led2_group_id;
31763 	/* An identifier for the LED #3. */
31764 	uint8_t	led3_id;
31765 	/* The type of LED #3. */
31766 	uint8_t	led3_type;
31767 	/* Speed LED */
31768 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_SPEED	UINT32_C(0x0)
31769 	/* Activity LED */
31770 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_ACTIVITY UINT32_C(0x1)
31771 	/* Invalid */
31772 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_INVALID  UINT32_C(0xff)
31773 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_INVALID
31774 	/* The current state of the LED #3. */
31775 	uint8_t	led3_state;
31776 	/* Default state of the LED */
31777 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_DEFAULT  UINT32_C(0x0)
31778 	/* Off */
31779 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_OFF	UINT32_C(0x1)
31780 	/* On */
31781 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_ON	UINT32_C(0x2)
31782 	/* Blink */
31783 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_BLINK	UINT32_C(0x3)
31784 	/* Blink Alternately */
31785 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_BLINKALT UINT32_C(0x4)
31786 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_BLINKALT
31787 	/* The color of LED #3. */
31788 	uint8_t	led3_color;
31789 	/* Default */
31790 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_DEFAULT	UINT32_C(0x0)
31791 	/* Amber */
31792 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_AMBER	UINT32_C(0x1)
31793 	/* Green */
31794 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_GREEN	UINT32_C(0x2)
31795 	/* Green or Amber */
31796 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_GREENAMBER UINT32_C(0x3)
31797 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_LAST	HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_GREENAMBER
31798 	uint8_t	unused_3;
31799 	/*
31800 	 * If the LED #3 state is "blink" or "blinkalt", then
31801 	 * this field represents the requested time in milliseconds
31802 	 * to keep LED on between cycles.
31803 	 */
31804 	uint16_t	led3_blink_on;
31805 	/*
31806 	 * If the LED #3 state is "blink" or "blinkalt", then
31807 	 * this field represents the requested time in milliseconds
31808 	 * to keep LED off between cycles.
31809 	 */
31810 	uint16_t	led3_blink_off;
31811 	/*
31812 	 * An identifier for the group of LEDs that LED #3 belongs
31813 	 * to.
31814 	 * If set to 0, then the LED #3 is not grouped.
31815 	 * For all other non-zero values of this field, LED #3 is
31816 	 * grouped together with the LEDs with the same group ID
31817 	 * value.
31818 	 */
31819 	uint8_t	led3_group_id;
31820 	uint8_t	unused_4[6];
31821 	/*
31822 	 * This field is used in Output records to indicate that the output
31823 	 * is completely written to RAM. This field should be read as '1'
31824 	 * to indicate that the output has been completely written. When
31825 	 * writing a command completion or response to an internal processor,
31826 	 * the order of writes has to be such that this field is written last.
31827 	 */
31828 	uint8_t	valid;
31829 } hwrm_port_led_qcfg_output_t, *phwrm_port_led_qcfg_output_t;
31830 
31831 /***********************
31832  * hwrm_port_led_qcaps *
31833  ***********************/
31834 
31835 
31836 /* hwrm_port_led_qcaps_input (size:192b/24B) */
31837 
31838 typedef struct hwrm_port_led_qcaps_input {
31839 	/* The HWRM command request type. */
31840 	uint16_t	req_type;
31841 	/*
31842 	 * The completion ring to send the completion event on. This should
31843 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
31844 	 */
31845 	uint16_t	cmpl_ring;
31846 	/*
31847 	 * The sequence ID is used by the driver for tracking multiple
31848 	 * commands. This ID is treated as opaque data by the firmware and
31849 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
31850 	 */
31851 	uint16_t	seq_id;
31852 	/*
31853 	 * The target ID of the command:
31854 	 * * 0x0-0xFFF8 - The function ID
31855 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31856 	 * * 0xFFFD - Reserved for user-space HWRM interface
31857 	 * * 0xFFFF - HWRM
31858 	 */
31859 	uint16_t	target_id;
31860 	/*
31861 	 * A physical address pointer pointing to a host buffer that the
31862 	 * command's response data will be written. This can be either a host
31863 	 * physical address (HPA) or a guest physical address (GPA) and must
31864 	 * point to a physically contiguous block of memory.
31865 	 */
31866 	uint64_t	resp_addr;
31867 	/* Port ID of port whose LED configuration is being queried. */
31868 	uint16_t	port_id;
31869 	uint8_t	unused_0[6];
31870 } hwrm_port_led_qcaps_input_t, *phwrm_port_led_qcaps_input_t;
31871 
31872 /* hwrm_port_led_qcaps_output (size:384b/48B) */
31873 
31874 typedef struct hwrm_port_led_qcaps_output {
31875 	/* The specific error status for the command. */
31876 	uint16_t	error_code;
31877 	/* The HWRM command request type. */
31878 	uint16_t	req_type;
31879 	/* The sequence ID from the original command. */
31880 	uint16_t	seq_id;
31881 	/* The length of the response data in number of bytes. */
31882 	uint16_t	resp_len;
31883 	/*
31884 	 * The number of LEDs that are configured on this port.
31885 	 * Up to 4 LEDs can be returned in the response.
31886 	 */
31887 	uint8_t	num_leds;
31888 	/* Reserved for future use. */
31889 	uint8_t	unused[3];
31890 	/* An identifier for the LED #0. */
31891 	uint8_t	led0_id;
31892 	/* The type of LED #0. */
31893 	uint8_t	led0_type;
31894 	/* Speed LED */
31895 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_SPEED	UINT32_C(0x0)
31896 	/* Activity LED */
31897 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_ACTIVITY UINT32_C(0x1)
31898 	/* Invalid */
31899 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_INVALID  UINT32_C(0xff)
31900 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_LAST	HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_INVALID
31901 	/*
31902 	 * An identifier for the group of LEDs that LED #0 belongs
31903 	 * to.
31904 	 * If set to 0, then the LED #0 cannot be grouped.
31905 	 * For all other non-zero values of this field, LED #0 is
31906 	 * grouped together with the LEDs with the same group ID
31907 	 * value.
31908 	 */
31909 	uint8_t	led0_group_id;
31910 	uint8_t	unused_0;
31911 	/* The states supported by LED #0. */
31912 	uint16_t	led0_state_caps;
31913 	/*
31914 	 * If set to 1, this LED is enabled.
31915 	 * If set to 0, this LED is disabled.
31916 	 */
31917 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_ENABLED		UINT32_C(0x1)
31918 	/*
31919 	 * If set to 1, off state is supported on this LED.
31920 	 * If set to 0, off state is not supported on this LED.
31921 	 */
31922 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_OFF_SUPPORTED	UINT32_C(0x2)
31923 	/*
31924 	 * If set to 1, on state is supported on this LED.
31925 	 * If set to 0, on state is not supported on this LED.
31926 	 */
31927 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_ON_SUPPORTED		UINT32_C(0x4)
31928 	/*
31929 	 * If set to 1, blink state is supported on this LED.
31930 	 * If set to 0, blink state is not supported on this LED.
31931 	 */
31932 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_BLINK_SUPPORTED	UINT32_C(0x8)
31933 	/*
31934 	 * If set to 1, blink_alt state is supported on this LED.
31935 	 * If set to 0, blink_alt state is not supported on this LED.
31936 	 */
31937 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_BLINK_ALT_SUPPORTED	UINT32_C(0x10)
31938 	/* The colors supported by LED #0. */
31939 	uint16_t	led0_color_caps;
31940 	/* reserved. */
31941 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_COLOR_CAPS_RSVD		UINT32_C(0x1)
31942 	/*
31943 	 * If set to 1, Amber color is supported on this LED.
31944 	 * If set to 0, Amber color is not supported on this LED.
31945 	 */
31946 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_COLOR_CAPS_AMBER_SUPPORTED	UINT32_C(0x2)
31947 	/*
31948 	 * If set to 1, Green color is supported on this LED.
31949 	 * If set to 0, Green color is not supported on this LED.
31950 	 */
31951 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_COLOR_CAPS_GREEN_SUPPORTED	UINT32_C(0x4)
31952 	/* An identifier for the LED #1. */
31953 	uint8_t	led1_id;
31954 	/* The type of LED #1. */
31955 	uint8_t	led1_type;
31956 	/* Speed LED */
31957 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_SPEED	UINT32_C(0x0)
31958 	/* Activity LED */
31959 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_ACTIVITY UINT32_C(0x1)
31960 	/* Invalid */
31961 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_INVALID  UINT32_C(0xff)
31962 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_LAST	HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_INVALID
31963 	/*
31964 	 * An identifier for the group of LEDs that LED #1 belongs
31965 	 * to.
31966 	 * If set to 0, then the LED #0 cannot be grouped.
31967 	 * For all other non-zero values of this field, LED #0 is
31968 	 * grouped together with the LEDs with the same group ID
31969 	 * value.
31970 	 */
31971 	uint8_t	led1_group_id;
31972 	uint8_t	unused_1;
31973 	/* The states supported by LED #1. */
31974 	uint16_t	led1_state_caps;
31975 	/*
31976 	 * If set to 1, this LED is enabled.
31977 	 * If set to 0, this LED is disabled.
31978 	 */
31979 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_ENABLED		UINT32_C(0x1)
31980 	/*
31981 	 * If set to 1, off state is supported on this LED.
31982 	 * If set to 0, off state is not supported on this LED.
31983 	 */
31984 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_OFF_SUPPORTED	UINT32_C(0x2)
31985 	/*
31986 	 * If set to 1, on state is supported on this LED.
31987 	 * If set to 0, on state is not supported on this LED.
31988 	 */
31989 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_ON_SUPPORTED		UINT32_C(0x4)
31990 	/*
31991 	 * If set to 1, blink state is supported on this LED.
31992 	 * If set to 0, blink state is not supported on this LED.
31993 	 */
31994 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_BLINK_SUPPORTED	UINT32_C(0x8)
31995 	/*
31996 	 * If set to 1, blink_alt state is supported on this LED.
31997 	 * If set to 0, blink_alt state is not supported on this LED.
31998 	 */
31999 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_BLINK_ALT_SUPPORTED	UINT32_C(0x10)
32000 	/* The colors supported by LED #1. */
32001 	uint16_t	led1_color_caps;
32002 	/* reserved. */
32003 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_COLOR_CAPS_RSVD		UINT32_C(0x1)
32004 	/*
32005 	 * If set to 1, Amber color is supported on this LED.
32006 	 * If set to 0, Amber color is not supported on this LED.
32007 	 */
32008 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_COLOR_CAPS_AMBER_SUPPORTED	UINT32_C(0x2)
32009 	/*
32010 	 * If set to 1, Green color is supported on this LED.
32011 	 * If set to 0, Green color is not supported on this LED.
32012 	 */
32013 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_COLOR_CAPS_GREEN_SUPPORTED	UINT32_C(0x4)
32014 	/* An identifier for the LED #2. */
32015 	uint8_t	led2_id;
32016 	/* The type of LED #2. */
32017 	uint8_t	led2_type;
32018 	/* Speed LED */
32019 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_SPEED	UINT32_C(0x0)
32020 	/* Activity LED */
32021 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_ACTIVITY UINT32_C(0x1)
32022 	/* Invalid */
32023 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_INVALID  UINT32_C(0xff)
32024 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_LAST	HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_INVALID
32025 	/*
32026 	 * An identifier for the group of LEDs that LED #0 belongs
32027 	 * to.
32028 	 * If set to 0, then the LED #0 cannot be grouped.
32029 	 * For all other non-zero values of this field, LED #0 is
32030 	 * grouped together with the LEDs with the same group ID
32031 	 * value.
32032 	 */
32033 	uint8_t	led2_group_id;
32034 	uint8_t	unused_2;
32035 	/* The states supported by LED #2. */
32036 	uint16_t	led2_state_caps;
32037 	/*
32038 	 * If set to 1, this LED is enabled.
32039 	 * If set to 0, this LED is disabled.
32040 	 */
32041 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_ENABLED		UINT32_C(0x1)
32042 	/*
32043 	 * If set to 1, off state is supported on this LED.
32044 	 * If set to 0, off state is not supported on this LED.
32045 	 */
32046 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_OFF_SUPPORTED	UINT32_C(0x2)
32047 	/*
32048 	 * If set to 1, on state is supported on this LED.
32049 	 * If set to 0, on state is not supported on this LED.
32050 	 */
32051 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_ON_SUPPORTED		UINT32_C(0x4)
32052 	/*
32053 	 * If set to 1, blink state is supported on this LED.
32054 	 * If set to 0, blink state is not supported on this LED.
32055 	 */
32056 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_BLINK_SUPPORTED	UINT32_C(0x8)
32057 	/*
32058 	 * If set to 1, blink_alt state is supported on this LED.
32059 	 * If set to 0, blink_alt state is not supported on this LED.
32060 	 */
32061 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_BLINK_ALT_SUPPORTED	UINT32_C(0x10)
32062 	/* The colors supported by LED #2. */
32063 	uint16_t	led2_color_caps;
32064 	/* reserved. */
32065 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_COLOR_CAPS_RSVD		UINT32_C(0x1)
32066 	/*
32067 	 * If set to 1, Amber color is supported on this LED.
32068 	 * If set to 0, Amber color is not supported on this LED.
32069 	 */
32070 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_COLOR_CAPS_AMBER_SUPPORTED	UINT32_C(0x2)
32071 	/*
32072 	 * If set to 1, Green color is supported on this LED.
32073 	 * If set to 0, Green color is not supported on this LED.
32074 	 */
32075 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_COLOR_CAPS_GREEN_SUPPORTED	UINT32_C(0x4)
32076 	/* An identifier for the LED #3. */
32077 	uint8_t	led3_id;
32078 	/* The type of LED #3. */
32079 	uint8_t	led3_type;
32080 	/* Speed LED */
32081 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_SPEED	UINT32_C(0x0)
32082 	/* Activity LED */
32083 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_ACTIVITY UINT32_C(0x1)
32084 	/* Invalid */
32085 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_INVALID  UINT32_C(0xff)
32086 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_LAST	HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_INVALID
32087 	/*
32088 	 * An identifier for the group of LEDs that LED #3 belongs
32089 	 * to.
32090 	 * If set to 0, then the LED #0 cannot be grouped.
32091 	 * For all other non-zero values of this field, LED #0 is
32092 	 * grouped together with the LEDs with the same group ID
32093 	 * value.
32094 	 */
32095 	uint8_t	led3_group_id;
32096 	uint8_t	unused_3;
32097 	/* The states supported by LED #3. */
32098 	uint16_t	led3_state_caps;
32099 	/*
32100 	 * If set to 1, this LED is enabled.
32101 	 * If set to 0, this LED is disabled.
32102 	 */
32103 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_ENABLED		UINT32_C(0x1)
32104 	/*
32105 	 * If set to 1, off state is supported on this LED.
32106 	 * If set to 0, off state is not supported on this LED.
32107 	 */
32108 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_OFF_SUPPORTED	UINT32_C(0x2)
32109 	/*
32110 	 * If set to 1, on state is supported on this LED.
32111 	 * If set to 0, on state is not supported on this LED.
32112 	 */
32113 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_ON_SUPPORTED		UINT32_C(0x4)
32114 	/*
32115 	 * If set to 1, blink state is supported on this LED.
32116 	 * If set to 0, blink state is not supported on this LED.
32117 	 */
32118 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_BLINK_SUPPORTED	UINT32_C(0x8)
32119 	/*
32120 	 * If set to 1, blink_alt state is supported on this LED.
32121 	 * If set to 0, blink_alt state is not supported on this LED.
32122 	 */
32123 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_BLINK_ALT_SUPPORTED	UINT32_C(0x10)
32124 	/* The colors supported by LED #3. */
32125 	uint16_t	led3_color_caps;
32126 	/* reserved. */
32127 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_COLOR_CAPS_RSVD		UINT32_C(0x1)
32128 	/*
32129 	 * If set to 1, Amber color is supported on this LED.
32130 	 * If set to 0, Amber color is not supported on this LED.
32131 	 */
32132 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_COLOR_CAPS_AMBER_SUPPORTED	UINT32_C(0x2)
32133 	/*
32134 	 * If set to 1, Green color is supported on this LED.
32135 	 * If set to 0, Green color is not supported on this LED.
32136 	 */
32137 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_COLOR_CAPS_GREEN_SUPPORTED	UINT32_C(0x4)
32138 	uint8_t	unused_4[3];
32139 	/*
32140 	 * This field is used in Output records to indicate that the output
32141 	 * is completely written to RAM. This field should be read as '1'
32142 	 * to indicate that the output has been completely written. When
32143 	 * writing a command completion or response to an internal processor,
32144 	 * the order of writes has to be such that this field is written last.
32145 	 */
32146 	uint8_t	valid;
32147 } hwrm_port_led_qcaps_output_t, *phwrm_port_led_qcaps_output_t;
32148 
32149 /***********************
32150  * hwrm_port_prbs_test *
32151  ***********************/
32152 
32153 
32154 /* hwrm_port_prbs_test_input (size:384b/48B) */
32155 
32156 typedef struct hwrm_port_prbs_test_input {
32157 	/* The HWRM command request type. */
32158 	uint16_t	req_type;
32159 	/*
32160 	 * The completion ring to send the completion event on. This should
32161 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32162 	 */
32163 	uint16_t	cmpl_ring;
32164 	/*
32165 	 * The sequence ID is used by the driver for tracking multiple
32166 	 * commands. This ID is treated as opaque data by the firmware and
32167 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32168 	 */
32169 	uint16_t	seq_id;
32170 	/*
32171 	 * The target ID of the command:
32172 	 * * 0x0-0xFFF8 - The function ID
32173 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32174 	 * * 0xFFFD - Reserved for user-space HWRM interface
32175 	 * * 0xFFFF - HWRM
32176 	 */
32177 	uint16_t	target_id;
32178 	/*
32179 	 * A physical address pointer pointing to a host buffer that the
32180 	 * command's response data will be written. This can be either a host
32181 	 * physical address (HPA) or a guest physical address (GPA) and must
32182 	 * point to a physically contiguous block of memory.
32183 	 */
32184 	uint64_t	resp_addr;
32185 	/* Host address data is to DMA'd to. */
32186 	uint64_t	resp_data_addr;
32187 	/*
32188 	 * Size of the buffer pointed to by resp_data_addr. The firmware may
32189 	 * use this entire buffer or less than the entire buffer, but never
32190 	 * more.
32191 	 */
32192 	uint16_t	data_len;
32193 	uint16_t	flags;
32194 	/*
32195 	 * If set, the port_id field should be interpreted as an internal
32196 	 * port. The internal port id range is returned in port_phy_qcaps
32197 	 * response internal_port_cnt field.
32198 	 */
32199 	#define HWRM_PORT_PRBS_TEST_INPUT_FLAGS_INTERNAL	UINT32_C(0x1)
32200 	uint32_t	unused_1;
32201 	/* Port ID of port where PRBS test to be run. */
32202 	uint16_t	port_id;
32203 	/* Polynomial selection for PRBS test. */
32204 	uint16_t	poly;
32205 	/* PRBS7 */
32206 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS7   UINT32_C(0x0)
32207 	/* PRBS9 */
32208 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS9   UINT32_C(0x1)
32209 	/* PRBS11 */
32210 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS11  UINT32_C(0x2)
32211 	/* PRBS15 */
32212 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS15  UINT32_C(0x3)
32213 	/* PRBS23 */
32214 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS23  UINT32_C(0x4)
32215 	/* PRBS31 */
32216 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS31  UINT32_C(0x5)
32217 	/* PRBS58 */
32218 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS58  UINT32_C(0x6)
32219 	/* PRBS49 */
32220 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS49  UINT32_C(0x7)
32221 	/* PRBS10 */
32222 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS10  UINT32_C(0x8)
32223 	/* PRBS20 */
32224 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS20  UINT32_C(0x9)
32225 	/* PRBS13 */
32226 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS13  UINT32_C(0xa)
32227 	/* Invalid */
32228 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_INVALID UINT32_C(0xff)
32229 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_LAST   HWRM_PORT_PRBS_TEST_INPUT_POLY_INVALID
32230 	/*
32231 	 * Configuration bits for PRBS test.
32232 	 * Use enable bit to start/stop test.
32233 	 * Use tx/rx lane map bits to run test on specific lanes,
32234 	 * if set to 0 test will be run on all lanes.
32235 	 */
32236 	uint16_t	prbs_config;
32237 	/*
32238 	 * Set 0 to stop test currently in progress
32239 	 * Set 1 to start test with configuration provided.
32240 	 */
32241 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_START_STOP		UINT32_C(0x1)
32242 	/*
32243 	 * If set to 1, tx_lane_map bitmap should have lane bits set.
32244 	 * If set to 0, test will be run on all lanes for this port.
32245 	 */
32246 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_TX_LANE_MAP_VALID	UINT32_C(0x2)
32247 	/*
32248 	 * If set to 1, rx_lane_map bitmap should have lane bits set.
32249 	 * If set to 0, test will be run on all lanes for this port.
32250 	 */
32251 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_RX_LANE_MAP_VALID	UINT32_C(0x4)
32252 	/* If set to 1, FEC stat t-code 0-7 registers are enabled. */
32253 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_FEC_STAT_T0_T7	UINT32_C(0x8)
32254 	/*
32255 	 * If set to 1, FEC stat t-code 8-15 registers are enabled.
32256 	 * If fec_stat_t0_t7 is set, fec_stat_t8_t15 field will be ignored.
32257 	 */
32258 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_FEC_STAT_T8_T15	UINT32_C(0x10)
32259 	/* Duration in seconds to run the PRBS test. */
32260 	uint16_t	timeout;
32261 	/*
32262 	 * If tx_lane_map_valid is set to 1, this field is a bitmap
32263 	 * of tx lanes to run PRBS test. bit0 = lane0,
32264 	 * bit1 = lane1 ..bit31 = lane31
32265 	 */
32266 	uint32_t	tx_lane_map;
32267 	/*
32268 	 * If rx_lane_map_valid is set to 1, this field is a bitmap
32269 	 * of rx lanes to run PRBS test. bit0 = lane0,
32270 	 * bit1 = lane1 ..bit31 = lane31
32271 	 */
32272 	uint32_t	rx_lane_map;
32273 } hwrm_port_prbs_test_input_t, *phwrm_port_prbs_test_input_t;
32274 
32275 /* hwrm_port_prbs_test_output (size:128b/16B) */
32276 
32277 typedef struct hwrm_port_prbs_test_output {
32278 	/* The specific error status for the command. */
32279 	uint16_t	error_code;
32280 	/* The HWRM command request type. */
32281 	uint16_t	req_type;
32282 	/* The sequence ID from the original command. */
32283 	uint16_t	seq_id;
32284 	/* The length of the response data in number of bytes. */
32285 	uint16_t	resp_len;
32286 	/* Total length of stored data. */
32287 	uint16_t	total_data_len;
32288 	/* This field is used in Output records to indicate the output format */
32289 	uint8_t	ber_format;
32290 	/* BER_FORMAT_PRBS */
32291 	#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_PRBS UINT32_C(0x0)
32292 	/* BER_FORMAT_FEC */
32293 	#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_FEC  UINT32_C(0x1)
32294 	#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_LAST HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_FEC
32295 	uint8_t	unused_0;
32296 	uint8_t	unused_1[3];
32297 	/*
32298 	 * This field is used in Output records to indicate that the output
32299 	 * is completely written to RAM. This field should be read as '1'
32300 	 * to indicate that the output has been completely written. When
32301 	 * writing a command completion or response to an internal processor,
32302 	 * the order of writes has to be such that this field is written last.
32303 	 */
32304 	uint8_t	valid;
32305 } hwrm_port_prbs_test_output_t, *phwrm_port_prbs_test_output_t;
32306 
32307 /**********************
32308  * hwrm_port_dsc_dump *
32309  **********************/
32310 
32311 
32312 /* hwrm_port_dsc_dump_input (size:320b/40B) */
32313 
32314 typedef struct hwrm_port_dsc_dump_input {
32315 	/* The HWRM command request type. */
32316 	uint16_t	req_type;
32317 	/*
32318 	 * The completion ring to send the completion event on. This should
32319 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32320 	 */
32321 	uint16_t	cmpl_ring;
32322 	/*
32323 	 * The sequence ID is used by the driver for tracking multiple
32324 	 * commands. This ID is treated as opaque data by the firmware and
32325 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32326 	 */
32327 	uint16_t	seq_id;
32328 	/*
32329 	 * The target ID of the command:
32330 	 * * 0x0-0xFFF8 - The function ID
32331 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32332 	 * * 0xFFFD - Reserved for user-space HWRM interface
32333 	 * * 0xFFFF - HWRM
32334 	 */
32335 	uint16_t	target_id;
32336 	/*
32337 	 * A physical address pointer pointing to a host buffer that the
32338 	 * command's response data will be written. This can be either a host
32339 	 * physical address (HPA) or a guest physical address (GPA) and must
32340 	 * point to a physically contiguous block of memory.
32341 	 */
32342 	uint64_t	resp_addr;
32343 	/* Host address where response diagnostic data is returned. */
32344 	uint64_t	resp_data_addr;
32345 	/*
32346 	 * Size of the host buffer pointed to by resp_data_addr. The firmware
32347 	 * may use this entire buffer or less than the entire buffer, but
32348 	 * never more.
32349 	 */
32350 	uint16_t	data_len;
32351 	uint16_t	unused_0;
32352 	/*
32353 	 * Ignored by the start command.
32354 	 * In legacy buffer mode, this is ignored. The transfer starts
32355 	 * at buffer offset zero and must be transferred in one command.
32356 	 * In big buffer mode, this is the offset into the NIC buffer for
32357 	 * the current retrieve command to start.
32358 	 */
32359 	uint32_t	data_offset;
32360 	/* Port ID of port where dsc dump to be collected. */
32361 	uint16_t	port_id;
32362 	/* Diag level specified by the user */
32363 	uint16_t	diag_level;
32364 	/* SRDS_DIAG_LANE */
32365 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_LANE	UINT32_C(0x0)
32366 	/* SRDS_DIAG_CORE */
32367 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_CORE	UINT32_C(0x1)
32368 	/* SRDS_DIAG_EVENT */
32369 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_EVENT	UINT32_C(0x2)
32370 	/* SRDS_DIAG_EYE */
32371 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_EYE	UINT32_C(0x3)
32372 	/* SRDS_DIAG_REG_CORE */
32373 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_REG_CORE   UINT32_C(0x4)
32374 	/* SRDS_DIAG_REG_LANE */
32375 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_REG_LANE   UINT32_C(0x5)
32376 	/* SRDS_DIAG_UC_CORE */
32377 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_UC_CORE	UINT32_C(0x6)
32378 	/* SRDS_DIAG_UC_LANE */
32379 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_UC_LANE	UINT32_C(0x7)
32380 	/* SRDS_DIAG_LANE_DEBUG */
32381 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_LANE_DEBUG UINT32_C(0x8)
32382 	/* SRDS_DIAG_BER_VERT */
32383 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_BER_VERT   UINT32_C(0x9)
32384 	/* SRDS_DIAG_BER_HORZ */
32385 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_BER_HORZ   UINT32_C(0xa)
32386 	/* SRDS_DIAG_EVENT_SAFE */
32387 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_EVENT_SAFE UINT32_C(0xb)
32388 	/* SRDS_DIAG_TIMESTAMP */
32389 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_TIMESTAMP  UINT32_C(0xc)
32390 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_LAST		HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_TIMESTAMP
32391 	/*
32392 	 * This field is the lane number on which to collect the dsc dump.
32393 	 * If this is 0xFFFF, the dsc dump will be collected for all lanes,
32394 	 * if the hardware and firmware support this feature.
32395 	 */
32396 	uint16_t	lane_number;
32397 	/* Configuration bits. */
32398 	uint16_t	dsc_dump_config;
32399 	/*
32400 	 * Set 0 to retrieve the dsc dump
32401 	 * Set 1 to start the dsc dump
32402 	 * Some configuration parameter for the dscdump report are
32403 	 * set by the start request, and can not be modified until the
32404 	 * retrieve operation is complete, on the next start.
32405 	 */
32406 	#define HWRM_PORT_DSC_DUMP_INPUT_DSC_DUMP_CONFIG_START_RETRIEVE	UINT32_C(0x1)
32407 	/*
32408 	 * Set 0 to limit the report size to 65535 bytes.
32409 	 * Set 1 to allow a larger buffer size.
32410 	 * This can only be set 1 in the start operation.
32411 	 * If this is set 0 in the start operation, the firmware will
32412 	 * assume it needs to only expose up to 65535 bytes of the report,
32413 	 * and only allow a single retrieve operation to retrieve the
32414 	 * entire report. This mode will truncate longer reports.
32415 	 * If this is set 1 in the start operation, the firmware will
32416 	 * report the full size of the report (up to the firmware's limit),
32417 	 * permit retrieve operations to hold the buffer using the config
32418 	 * defer_close, and honour the data_offset value so later data
32419 	 * in the report can be retrieved.
32420 	 */
32421 	#define HWRM_PORT_DSC_DUMP_INPUT_DSC_DUMP_CONFIG_BIG_BUFFER	UINT32_C(0x2)
32422 	/*
32423 	 * Set 0 on the last 'retrieve' to release the firmware buffer
32424 	 * Set 1 on the other 'retrieve' to hold the firmware buffer
32425 	 * This only affects retrieve operations.
32426 	 * In big_buffer mode, this allows the driver or tool to tell
32427 	 * the firmware to keep the report around, as it intends to read
32428 	 * more of it in. The final read must set this to zero, to tell
32429 	 * the firmware the report buffer can be released.
32430 	 * This only works if the start request specified big_buffer as
32431 	 * one; it is ignored otherwise.
32432 	 */
32433 	#define HWRM_PORT_DSC_DUMP_INPUT_DSC_DUMP_CONFIG_DEFER_CLOSE	UINT32_C(0x4)
32434 } hwrm_port_dsc_dump_input_t, *phwrm_port_dsc_dump_input_t;
32435 
32436 /* hwrm_port_dsc_dump_output (size:128b/16B) */
32437 
32438 typedef struct hwrm_port_dsc_dump_output {
32439 	/* The specific error status for the command. */
32440 	uint16_t	error_code;
32441 	/* The HWRM command request type. */
32442 	uint16_t	req_type;
32443 	/* The sequence ID from the original command. */
32444 	uint16_t	seq_id;
32445 	/* The length of the response data in number of bytes. */
32446 	uint16_t	resp_len;
32447 	/*
32448 	 * Total length of stored data; if big_buffer is one, this
32449 	 * only contains the lower 16 bits of the total length.
32450 	 * In legacy buffer mode, this is zero in the 'start' response.
32451 	 * In big buffer mode, this has the size of the report even
32452 	 * in the 'start' response.
32453 	 * In both modes, this contains the number of bytes written
32454 	 * to the host in 'retrieve' responses.
32455 	 */
32456 	uint16_t	total_data_len;
32457 	/*
32458 	 * The upper 16 bits of the total length of stored data.
32459 	 * In legacy buffer mode, this will always be zero.
32460 	 * In big buffer mode, this will be populated even in the
32461 	 * 'start' response.
32462 	 * This is always zero for 'retrieve' responses.
32463 	 */
32464 	uint16_t	total_data_len_high;
32465 	uint8_t	unused_1[2];
32466 	/* Result information bits. */
32467 	uint8_t	flags;
32468 	/*
32469 	 * Set according to the start request's input big_buffer.
32470 	 * If this is zero, it indicates the function is acting per
32471 	 * legacy behaviour -- it will report a buffer size up to almost
32472 	 * 64KiB, and allow only one retrieval request before releasing
32473 	 * the firmware buffer containing the report (total_data_len_high
32474 	 * will be zero). The request's data_offset field and defer_close
32475 	 * and use_offset config flags are ignored.
32476 	 * If this is one, it indicates support for (and request of)
32477 	 * support for larger reports. The full 32b report size (up to the
32478 	 * firmware buffer limit) is provided by the start response in
32479 	 * total_data_len (low 16b) and total_data_len_high (high 16b),
32480 	 * and retrieve requests may keep the buffer using the defer_close
32481 	 * flag, and retrieve the later parts of the report using the
32482 	 * data_offset field.
32483 	 */
32484 	#define HWRM_PORT_DSC_DUMP_OUTPUT_FLAGS_BIG_BUFFER	UINT32_C(0x1)
32485 	/*
32486 	 * This field is used in Output records to indicate that the output
32487 	 * is completely written to RAM. This field should be read as '1'
32488 	 * to indicate that the output has been completely written. When
32489 	 * writing a command completion or response to an internal processor,
32490 	 * the order of writes has to be such that this field is written last.
32491 	 */
32492 	uint8_t	valid;
32493 } hwrm_port_dsc_dump_output_t, *phwrm_port_dsc_dump_output_t;
32494 
32495 /******************************
32496  * hwrm_port_sfp_sideband_cfg *
32497  ******************************/
32498 
32499 
32500 /* hwrm_port_sfp_sideband_cfg_input (size:256b/32B) */
32501 
32502 typedef struct hwrm_port_sfp_sideband_cfg_input {
32503 	/* The HWRM command request type. */
32504 	uint16_t	req_type;
32505 	/*
32506 	 * The completion ring to send the completion event on. This should
32507 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32508 	 */
32509 	uint16_t	cmpl_ring;
32510 	/*
32511 	 * The sequence ID is used by the driver for tracking multiple
32512 	 * commands. This ID is treated as opaque data by the firmware and
32513 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32514 	 */
32515 	uint16_t	seq_id;
32516 	/*
32517 	 * The target ID of the command:
32518 	 * * 0x0-0xFFF8 - The function ID
32519 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32520 	 * * 0xFFFD - Reserved for user-space HWRM interface
32521 	 * * 0xFFFF - HWRM
32522 	 */
32523 	uint16_t	target_id;
32524 	/*
32525 	 * A physical address pointer pointing to a host buffer that the
32526 	 * command's response data will be written. This can be either a host
32527 	 * physical address (HPA) or a guest physical address (GPA) and must
32528 	 * point to a physically contiguous block of memory.
32529 	 */
32530 	uint64_t	resp_addr;
32531 	/* Port ID of port that is to be queried. */
32532 	uint16_t	port_id;
32533 	uint8_t	unused_0[6];
32534 	/*
32535 	 * This bitfield is used to specify which bits from the 'flags'
32536 	 * fields are being configured by the caller.
32537 	 */
32538 	uint32_t	enables;
32539 	/* This bit must be '1' for rs0 to be configured. */
32540 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_RS0	UINT32_C(0x1)
32541 	/* This bit must be '1' for rs1 to be configured. */
32542 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_RS1	UINT32_C(0x2)
32543 	/* This bit must be '1' for tx_disable to be configured. */
32544 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_TX_DIS	UINT32_C(0x4)
32545 	/*
32546 	 * This bit must be '1' for mod_sel to be configured.
32547 	 * Valid only on QSFP modules
32548 	 */
32549 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_MOD_SEL	UINT32_C(0x8)
32550 	/* This bit must be '1' for reset_l to be configured. */
32551 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_RESET_L	UINT32_C(0x10)
32552 	/* This bit must be '1' for lp_mode to be configured. */
32553 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_LP_MODE	UINT32_C(0x20)
32554 	/* This bit must be '1' for pwr_disable to be configured. */
32555 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_PWR_DIS	UINT32_C(0x40)
32556 	/*
32557 	 * Only bits that have corresponding bits in the 'enables'
32558 	 * bitfield are processed by the firmware, all other bits
32559 	 * of 'flags' are ignored.
32560 	 */
32561 	uint32_t	flags;
32562 	/*
32563 	 * This bit along with rs1 configures the current speed of the dual
32564 	 * rate module. If these pins are GNDed then the speed can be changed
32565 	 * by directly writing to EEPROM.
32566 	 */
32567 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_RS0	UINT32_C(0x1)
32568 	/*
32569 	 * This bit along with rs0 configures the current speed of the dual
32570 	 * rate module. If these pins are GNDed then the speed can be changed
32571 	 * by directly writing to EEPROM.
32572 	 */
32573 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_RS1	UINT32_C(0x2)
32574 	/*
32575 	 * When this bit is set to '1', tx_disable is set.
32576 	 * On a 1G BASE-T module, if this bit is set,
32577 	 * module PHY registers will not be accessible.
32578 	 */
32579 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_TX_DIS	UINT32_C(0x4)
32580 	/*
32581 	 * When this bit is set to '1', this module is selected.
32582 	 * Valid only on QSFP modules
32583 	 */
32584 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_MOD_SEL	UINT32_C(0x8)
32585 	/*
32586 	 * If reset_l is set to 0, Module will be taken out of reset
32587 	 * and other signals will be set to their requested state once
32588 	 * the module is out of reset.
32589 	 * Valid only on QSFP modules
32590 	 */
32591 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_RESET_L	UINT32_C(0x10)
32592 	/*
32593 	 * When this bit is set to '1', the module will be configured
32594 	 * in low power mode.
32595 	 * Valid only on QSFP modules
32596 	 */
32597 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_LP_MODE	UINT32_C(0x20)
32598 	/* When this bit is set to '1', the module will be powered down. */
32599 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_PWR_DIS	UINT32_C(0x40)
32600 } hwrm_port_sfp_sideband_cfg_input_t, *phwrm_port_sfp_sideband_cfg_input_t;
32601 
32602 /* hwrm_port_sfp_sideband_cfg_output (size:128b/16B) */
32603 
32604 typedef struct hwrm_port_sfp_sideband_cfg_output {
32605 	/* The specific error status for the command. */
32606 	uint16_t	error_code;
32607 	/* The HWRM command request type. */
32608 	uint16_t	req_type;
32609 	/* The sequence ID from the original command. */
32610 	uint16_t	seq_id;
32611 	/* The length of the response data in number of bytes. */
32612 	uint16_t	resp_len;
32613 	uint8_t	unused[7];
32614 	/*
32615 	 * This field is used in Output records to indicate that the output
32616 	 * is completely written to RAM. This field should be read as '1'
32617 	 * to indicate that the output has been completely written. When
32618 	 * writing a command completion or response to an internal processor,
32619 	 * the order of writes has to be such that this field is written last.
32620 	 */
32621 	uint8_t	valid;
32622 } hwrm_port_sfp_sideband_cfg_output_t, *phwrm_port_sfp_sideband_cfg_output_t;
32623 
32624 /*******************************
32625  * hwrm_port_sfp_sideband_qcfg *
32626  *******************************/
32627 
32628 
32629 /* hwrm_port_sfp_sideband_qcfg_input (size:192b/24B) */
32630 
32631 typedef struct hwrm_port_sfp_sideband_qcfg_input {
32632 	/* The HWRM command request type. */
32633 	uint16_t	req_type;
32634 	/*
32635 	 * The completion ring to send the completion event on. This should
32636 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32637 	 */
32638 	uint16_t	cmpl_ring;
32639 	/*
32640 	 * The sequence ID is used by the driver for tracking multiple
32641 	 * commands. This ID is treated as opaque data by the firmware and
32642 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32643 	 */
32644 	uint16_t	seq_id;
32645 	/*
32646 	 * The target ID of the command:
32647 	 * * 0x0-0xFFF8 - The function ID
32648 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32649 	 * * 0xFFFD - Reserved for user-space HWRM interface
32650 	 * * 0xFFFF - HWRM
32651 	 */
32652 	uint16_t	target_id;
32653 	/*
32654 	 * A physical address pointer pointing to a host buffer that the
32655 	 * command's response data will be written. This can be either a host
32656 	 * physical address (HPA) or a guest physical address (GPA) and must
32657 	 * point to a physically contiguous block of memory.
32658 	 */
32659 	uint64_t	resp_addr;
32660 	/* Port ID of port that is to be queried. */
32661 	uint16_t	port_id;
32662 	uint8_t	unused_0[6];
32663 } hwrm_port_sfp_sideband_qcfg_input_t, *phwrm_port_sfp_sideband_qcfg_input_t;
32664 
32665 /* hwrm_port_sfp_sideband_qcfg_output (size:192b/24B) */
32666 
32667 typedef struct hwrm_port_sfp_sideband_qcfg_output {
32668 	/* The specific error status for the command. */
32669 	uint16_t	error_code;
32670 	/* The HWRM command request type. */
32671 	uint16_t	req_type;
32672 	/* The sequence ID from the original command. */
32673 	uint16_t	seq_id;
32674 	/* The length of the response data in number of bytes. */
32675 	uint16_t	resp_len;
32676 	/*
32677 	 * Bitmask indicating which sideband signals are valid.
32678 	 * This is based on the board and nvm cfg that is present on the board.
32679 	 */
32680 	uint32_t	supported_mask;
32681 	uint32_t	sideband_signals;
32682 	/* When this bit is set to '1', the Module is absent. */
32683 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_MOD_ABS	UINT32_C(0x1)
32684 	/*
32685 	 * When this bit is set to '1', there is no valid signal on RX.
32686 	 * This signal is a filtered version of Signal Detect.
32687 	 */
32688 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RX_LOS	UINT32_C(0x2)
32689 	/*
32690 	 * This bit along with rs1 indicates the current speed of the dual
32691 	 * rate module.If these pins are grounded then the speed can be
32692 	 * changed by directly writing to EEPROM.
32693 	 */
32694 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RS0	UINT32_C(0x4)
32695 	/*
32696 	 * This bit along with rs0 indicates the current speed of the dual
32697 	 * rate module.If these pins are grounded then the speed can be
32698 	 * changed by directly writing to EEPROM.
32699 	 */
32700 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RS1	UINT32_C(0x8)
32701 	/*
32702 	 * When this bit is set to '1', tx_disable is set.
32703 	 * On a 1G BASE-T module, if this bit is set, module PHY
32704 	 * registers will not be accessible.
32705 	 */
32706 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_TX_DIS	UINT32_C(0x10)
32707 	/* When this bit is set to '1', tx_fault is set. */
32708 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_TX_FAULT	UINT32_C(0x20)
32709 	/*
32710 	 * When this bit is set to '1', module is selected.
32711 	 * Valid only on QSFP modules
32712 	 */
32713 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_MOD_SEL	UINT32_C(0x40)
32714 	/*
32715 	 * When this bit is set to '0', the module is held in reset.
32716 	 * if reset_l is set to 1,first module is taken out of reset
32717 	 * and other signals will be set to their requested state.
32718 	 * Valid only on QSFP modules.
32719 	 */
32720 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RESET_L	UINT32_C(0x80)
32721 	/*
32722 	 * When this bit is set to '1', the module is in low power mode.
32723 	 * Valid only on QSFP modules
32724 	 */
32725 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_LP_MODE	UINT32_C(0x100)
32726 	/* When this bit is set to '1', module is in power down state. */
32727 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_PWR_DIS	UINT32_C(0x200)
32728 	uint8_t	unused[7];
32729 	/*
32730 	 * This field is used in Output records to indicate that the output
32731 	 * is completely written to RAM. This field should be read as '1'
32732 	 * to indicate that the output has been completely written. When
32733 	 * writing a command completion or response to an internal processor,
32734 	 * the order of writes has to be such that this field is written last.
32735 	 */
32736 	uint8_t	valid;
32737 } hwrm_port_sfp_sideband_qcfg_output_t, *phwrm_port_sfp_sideband_qcfg_output_t;
32738 
32739 /**********************************
32740  * hwrm_port_phy_mdio_bus_acquire *
32741  **********************************/
32742 
32743 
32744 /* hwrm_port_phy_mdio_bus_acquire_input (size:192b/24B) */
32745 
32746 typedef struct hwrm_port_phy_mdio_bus_acquire_input {
32747 	/* The HWRM command request type. */
32748 	uint16_t	req_type;
32749 	/*
32750 	 * The completion ring to send the completion event on. This should
32751 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32752 	 */
32753 	uint16_t	cmpl_ring;
32754 	/*
32755 	 * The sequence ID is used by the driver for tracking multiple
32756 	 * commands. This ID is treated as opaque data by the firmware and
32757 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32758 	 */
32759 	uint16_t	seq_id;
32760 	/*
32761 	 * The target ID of the command:
32762 	 * * 0x0-0xFFF8 - The function ID
32763 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32764 	 * * 0xFFFD - Reserved for user-space HWRM interface
32765 	 * * 0xFFFF - HWRM
32766 	 */
32767 	uint16_t	target_id;
32768 	/*
32769 	 * A physical address pointer pointing to a host buffer that the
32770 	 * command's response data will be written. This can be either a host
32771 	 * physical address (HPA) or a guest physical address (GPA) and must
32772 	 * point to a physically contiguous block of memory.
32773 	 */
32774 	uint64_t	resp_addr;
32775 	/* Port ID of the port. */
32776 	uint16_t	port_id;
32777 	/*
32778 	 * client_id of the client requesting BUS access.
32779 	 * Any value from 0x10 to 0xFFFF can be used.
32780 	 * Client should make sure that the returned client_id
32781 	 * in response matches the client_id in request.
32782 	 * 0-0xF are reserved for internal use.
32783 	 */
32784 	uint16_t	client_id;
32785 	/*
32786 	 * Timeout in milliseconds, MDIO BUS will be released automatically
32787 	 * after this time, if another mdio acquire command is not received
32788 	 * within the timeout window from the same client.
32789 	 * A 0xFFFF will hold the bus until this bus is released.
32790 	 */
32791 	uint16_t	mdio_bus_timeout;
32792 	uint8_t	unused_0[2];
32793 } hwrm_port_phy_mdio_bus_acquire_input_t, *phwrm_port_phy_mdio_bus_acquire_input_t;
32794 
32795 /* hwrm_port_phy_mdio_bus_acquire_output (size:128b/16B) */
32796 
32797 typedef struct hwrm_port_phy_mdio_bus_acquire_output {
32798 	/* The specific error status for the command. */
32799 	uint16_t	error_code;
32800 	/* The HWRM command request type. */
32801 	uint16_t	req_type;
32802 	/* The sequence ID from the original command. */
32803 	uint16_t	seq_id;
32804 	/* The length of the response data in number of bytes. */
32805 	uint16_t	resp_len;
32806 	uint16_t	unused_0;
32807 	/*
32808 	 * client_id of the module holding the BUS.
32809 	 * 0-0xF are reserved for internal use.
32810 	 */
32811 	uint16_t	client_id;
32812 	uint8_t	unused_1[3];
32813 	/*
32814 	 * This field is used in Output records to indicate that the output
32815 	 * is completely written to RAM. This field should be read as '1'
32816 	 * to indicate that the output has been completely written. When
32817 	 * writing a command completion or response to an internal processor,
32818 	 * the order of writes has to be such that this field is written last.
32819 	 */
32820 	uint8_t	valid;
32821 } hwrm_port_phy_mdio_bus_acquire_output_t, *phwrm_port_phy_mdio_bus_acquire_output_t;
32822 
32823 /**********************************
32824  * hwrm_port_phy_mdio_bus_release *
32825  **********************************/
32826 
32827 
32828 /* hwrm_port_phy_mdio_bus_release_input (size:192b/24B) */
32829 
32830 typedef struct hwrm_port_phy_mdio_bus_release_input {
32831 	/* The HWRM command request type. */
32832 	uint16_t	req_type;
32833 	/*
32834 	 * The completion ring to send the completion event on. This should
32835 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32836 	 */
32837 	uint16_t	cmpl_ring;
32838 	/*
32839 	 * The sequence ID is used by the driver for tracking multiple
32840 	 * commands. This ID is treated as opaque data by the firmware and
32841 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32842 	 */
32843 	uint16_t	seq_id;
32844 	/*
32845 	 * The target ID of the command:
32846 	 * * 0x0-0xFFF8 - The function ID
32847 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32848 	 * * 0xFFFD - Reserved for user-space HWRM interface
32849 	 * * 0xFFFF - HWRM
32850 	 */
32851 	uint16_t	target_id;
32852 	/*
32853 	 * A physical address pointer pointing to a host buffer that the
32854 	 * command's response data will be written. This can be either a host
32855 	 * physical address (HPA) or a guest physical address (GPA) and must
32856 	 * point to a physically contiguous block of memory.
32857 	 */
32858 	uint64_t	resp_addr;
32859 	/* Port ID of the port. */
32860 	uint16_t	port_id;
32861 	/*
32862 	 * client_id of the client requesting BUS release.
32863 	 * A client should not release any other clients BUS.
32864 	 */
32865 	uint16_t	client_id;
32866 	uint8_t	unused_0[4];
32867 } hwrm_port_phy_mdio_bus_release_input_t, *phwrm_port_phy_mdio_bus_release_input_t;
32868 
32869 /* hwrm_port_phy_mdio_bus_release_output (size:128b/16B) */
32870 
32871 typedef struct hwrm_port_phy_mdio_bus_release_output {
32872 	/* The specific error status for the command. */
32873 	uint16_t	error_code;
32874 	/* The HWRM command request type. */
32875 	uint16_t	req_type;
32876 	/* The sequence ID from the original command. */
32877 	uint16_t	seq_id;
32878 	/* The length of the response data in number of bytes. */
32879 	uint16_t	resp_len;
32880 	uint16_t	unused_0;
32881 	/* The BUS is released if client_id matches the client_id in request. */
32882 	uint16_t	clients_id;
32883 	uint8_t	unused_1[3];
32884 	/*
32885 	 * This field is used in Output records to indicate that the output
32886 	 * is completely written to RAM. This field should be read as '1'
32887 	 * to indicate that the output has been completely written. When
32888 	 * writing a command completion or response to an internal processor,
32889 	 * the order of writes has to be such that this field is written last.
32890 	 */
32891 	uint8_t	valid;
32892 } hwrm_port_phy_mdio_bus_release_output_t, *phwrm_port_phy_mdio_bus_release_output_t;
32893 
32894 /************************
32895  * hwrm_port_tx_fir_cfg *
32896  ************************/
32897 
32898 
32899 /* hwrm_port_tx_fir_cfg_input (size:320b/40B) */
32900 
32901 typedef struct hwrm_port_tx_fir_cfg_input {
32902 	/* The HWRM command request type. */
32903 	uint16_t	req_type;
32904 	/*
32905 	 * The completion ring to send the completion event on. This should
32906 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32907 	 */
32908 	uint16_t	cmpl_ring;
32909 	/*
32910 	 * The sequence ID is used by the driver for tracking multiple
32911 	 * commands. This ID is treated as opaque data by the firmware and
32912 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32913 	 */
32914 	uint16_t	seq_id;
32915 	/*
32916 	 * The target ID of the command:
32917 	 * * 0x0-0xFFF8 - The function ID
32918 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32919 	 * * 0xFFFD - Reserved for user-space HWRM interface
32920 	 * * 0xFFFF - HWRM
32921 	 */
32922 	uint16_t	target_id;
32923 	/*
32924 	 * A physical address pointer pointing to a host buffer that the
32925 	 * command's response data will be written. This can be either a host
32926 	 * physical address (HPA) or a guest physical address (GPA) and must
32927 	 * point to a physically contiguous block of memory.
32928 	 */
32929 	uint64_t	resp_addr;
32930 	/* Modulation types of TX FIR: NRZ, PAM4. */
32931 	uint8_t	mod_type;
32932 	/* For NRZ */
32933 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_NRZ	UINT32_C(0x0)
32934 	/* For PAM4 */
32935 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_PAM4	UINT32_C(0x1)
32936 	/* For Optical NRZ */
32937 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_C2M_NRZ	UINT32_C(0x2)
32938 	/* For Optical PAM4 */
32939 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_C2M_PAM4	UINT32_C(0x3)
32940 	/* For DAC PAM4 112G */
32941 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_PAM4_112	UINT32_C(0x4)
32942 	/* For Optical PAM4 112G */
32943 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_C2M_PAM4_112G UINT32_C(0x5)
32944 	/* For LPO PAM4 112G */
32945 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_LPO_PAM4_112G UINT32_C(0x6)
32946 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_LAST	HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_LPO_PAM4_112G
32947 	/* The lane mask of the lane TX FIR will be configured. */
32948 	uint8_t	lane_mask;
32949 	uint8_t	unused_0[2];
32950 	/* Value1 of TX FIR, required for NRZ or PAM4. */
32951 	uint32_t	txfir_val_1;
32952 	/* Value2 of TX FIR, required for NRZ or PAM4. */
32953 	uint32_t	txfir_val_2;
32954 	/* Value3 of TX FIR, required for PAM4. */
32955 	uint32_t	txfir_val_3;
32956 	/* Value4 of TX FIR, required for PAM4. */
32957 	uint32_t	txfir_val_4;
32958 	uint8_t	unused_1[4];
32959 } hwrm_port_tx_fir_cfg_input_t, *phwrm_port_tx_fir_cfg_input_t;
32960 
32961 /* hwrm_port_tx_fir_cfg_output (size:128b/16B) */
32962 
32963 typedef struct hwrm_port_tx_fir_cfg_output {
32964 	/* The specific error status for the command. */
32965 	uint16_t	error_code;
32966 	/* The HWRM command request type. */
32967 	uint16_t	req_type;
32968 	/* The sequence ID from the original command. */
32969 	uint16_t	seq_id;
32970 	/* The length of the response data in number of bytes. */
32971 	uint16_t	resp_len;
32972 	uint8_t	unused[7];
32973 	/*
32974 	 * This field is used in Output records to indicate that the output
32975 	 * is completely written to RAM. This field should be read as '1'
32976 	 * to indicate that the output has been completely written. When
32977 	 * writing a command completion or response to an internal processor,
32978 	 * the order of writes has to be such that this field is written last.
32979 	 */
32980 	uint8_t	valid;
32981 } hwrm_port_tx_fir_cfg_output_t, *phwrm_port_tx_fir_cfg_output_t;
32982 
32983 /*************************
32984  * hwrm_port_tx_fir_qcfg *
32985  *************************/
32986 
32987 
32988 /* hwrm_port_tx_fir_qcfg_input (size:192b/24B) */
32989 
32990 typedef struct hwrm_port_tx_fir_qcfg_input {
32991 	/* The HWRM command request type. */
32992 	uint16_t	req_type;
32993 	/*
32994 	 * The completion ring to send the completion event on. This should
32995 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32996 	 */
32997 	uint16_t	cmpl_ring;
32998 	/*
32999 	 * The sequence ID is used by the driver for tracking multiple
33000 	 * commands. This ID is treated as opaque data by the firmware and
33001 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33002 	 */
33003 	uint16_t	seq_id;
33004 	/*
33005 	 * The target ID of the command:
33006 	 * * 0x0-0xFFF8 - The function ID
33007 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33008 	 * * 0xFFFD - Reserved for user-space HWRM interface
33009 	 * * 0xFFFF - HWRM
33010 	 */
33011 	uint16_t	target_id;
33012 	/*
33013 	 * A physical address pointer pointing to a host buffer that the
33014 	 * command's response data will be written. This can be either a host
33015 	 * physical address (HPA) or a guest physical address (GPA) and must
33016 	 * point to a physically contiguous block of memory.
33017 	 */
33018 	uint64_t	resp_addr;
33019 	/* Modulation types of TX FIR: NRZ, PAM4. */
33020 	uint8_t	mod_type;
33021 	/* For NRZ */
33022 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_NRZ	UINT32_C(0x0)
33023 	/* For PAM4 56G */
33024 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_PAM4	UINT32_C(0x1)
33025 	/* For Optical NRZ */
33026 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_C2M_NRZ	UINT32_C(0x2)
33027 	/* For Optical PAM4 56G */
33028 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_C2M_PAM4	UINT32_C(0x3)
33029 	/* For DAC PAM4 112G */
33030 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_PAM4_112	UINT32_C(0x4)
33031 	/* For Optical PAM4 112G */
33032 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_C2M_PAM4_112 UINT32_C(0x5)
33033 	/* For LPO PAM4 112G */
33034 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_LPO_PAM4_112 UINT32_C(0x6)
33035 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_LAST	HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_LPO_PAM4_112
33036 	/* The ID of the lane TX FIR will be queried. */
33037 	uint8_t	lane_id;
33038 	uint8_t	unused[6];
33039 } hwrm_port_tx_fir_qcfg_input_t, *phwrm_port_tx_fir_qcfg_input_t;
33040 
33041 /* hwrm_port_tx_fir_qcfg_output (size:256b/32B) */
33042 
33043 typedef struct hwrm_port_tx_fir_qcfg_output {
33044 	/* The specific error status for the command. */
33045 	uint16_t	error_code;
33046 	/* The HWRM command request type. */
33047 	uint16_t	req_type;
33048 	/* The sequence ID from the original command. */
33049 	uint16_t	seq_id;
33050 	/* The length of the response data in number of bytes. */
33051 	uint16_t	resp_len;
33052 	/* Value1 of TX FIR, required for NRZ or PAM4. */
33053 	uint32_t	txfir_val_1;
33054 	/* Value2 of TX FIR, required for NRZ or PAM4. */
33055 	uint32_t	txfir_val_2;
33056 	/* Value3 of TX FIR, required for PAM4. */
33057 	uint32_t	txfir_val_3;
33058 	/* Value4 of TX FIR, required for PAM4. */
33059 	uint32_t	txfir_val_4;
33060 	uint8_t	unused[7];
33061 	/*
33062 	 * This field is used in Output records to indicate that the output
33063 	 * is completely written to RAM. This field should be read as '1'
33064 	 * to indicate that the output has been completely written. When
33065 	 * writing a command completion or response to an internal processor,
33066 	 * the order of writes has to be such that this field is written last.
33067 	 */
33068 	uint8_t	valid;
33069 } hwrm_port_tx_fir_qcfg_output_t, *phwrm_port_tx_fir_qcfg_output_t;
33070 
33071 /***********************
33072  * hwrm_port_ep_tx_cfg *
33073  ***********************/
33074 
33075 
33076 /* hwrm_port_ep_tx_cfg_input (size:256b/32B) */
33077 
33078 typedef struct hwrm_port_ep_tx_cfg_input {
33079 	/* The HWRM command request type. */
33080 	uint16_t	req_type;
33081 	/*
33082 	 * The completion ring to send the completion event on. This should
33083 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33084 	 */
33085 	uint16_t	cmpl_ring;
33086 	/*
33087 	 * The sequence ID is used by the driver for tracking multiple
33088 	 * commands. This ID is treated as opaque data by the firmware and
33089 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33090 	 */
33091 	uint16_t	seq_id;
33092 	/*
33093 	 * The target ID of the command:
33094 	 * * 0x0-0xFFF8 - The function ID
33095 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33096 	 * * 0xFFFD - Reserved for user-space HWRM interface
33097 	 * * 0xFFFF - HWRM
33098 	 */
33099 	uint16_t	target_id;
33100 	/*
33101 	 * A physical address pointer pointing to a host buffer that the
33102 	 * command's response data will be written. This can be either a host
33103 	 * physical address (HPA) or a guest physical address (GPA) and must
33104 	 * point to a physically contiguous block of memory.
33105 	 */
33106 	uint64_t	resp_addr;
33107 	uint16_t	enables;
33108 	/* When this bit is '1', the value in the ep0_min_bw field is valid. */
33109 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP0_MIN_BW	UINT32_C(0x1)
33110 	/* When this bit is '1', the value in the ep0_max_bw field is valid. */
33111 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP0_MAX_BW	UINT32_C(0x2)
33112 	/* When this bit is '1', the value in the ep1_min_bw field is valid. */
33113 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP1_MIN_BW	UINT32_C(0x4)
33114 	/* When this bit is '1', the value in the ep1_max_bw field is valid. */
33115 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP1_MAX_BW	UINT32_C(0x8)
33116 	/* When this bit is '1', the value in the ep2_min_bw field is valid. */
33117 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP2_MIN_BW	UINT32_C(0x10)
33118 	/* When this bit is '1', the value in the ep2_max_bw field is valid. */
33119 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP2_MAX_BW	UINT32_C(0x20)
33120 	/* When this bit is '1', the value in the ep3_min_bw field is valid. */
33121 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP3_MIN_BW	UINT32_C(0x40)
33122 	/* When this bit is '1', the value in the ep3_max_bw field is valid. */
33123 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP3_MAX_BW	UINT32_C(0x80)
33124 	/* A port index, from 0 to the number of front panel ports, minus 1. */
33125 	uint8_t	port_id;
33126 	uint8_t	unused;
33127 	/*
33128 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33129 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 0 for
33130 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33131 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33132 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33133 	 * be less than or equal to 100.
33134 	 */
33135 	uint8_t	ep0_min_bw;
33136 	/*
33137 	 * Specifies the maximum portion of the port's bandwidth that the set
33138 	 * of PFs and VFs on PCIe endpoint 0 may use. The value is a percentage
33139 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33140 	 * maximum rate.
33141 	 */
33142 	uint8_t	ep0_max_bw;
33143 	/*
33144 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33145 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 1 for
33146 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33147 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33148 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33149 	 * be less than or equal to 100.
33150 	 */
33151 	uint8_t	ep1_min_bw;
33152 	/*
33153 	 * Specifies the maximum portion of the port's bandwidth that the set
33154 	 * of PFs and VFs on PCIe endpoint 1 may use. The value is a percentage
33155 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33156 	 * maximum rate.
33157 	 */
33158 	uint8_t	ep1_max_bw;
33159 	/*
33160 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33161 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 2 for
33162 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33163 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33164 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33165 	 * be less than or equal to 100.
33166 	 */
33167 	uint8_t	ep2_min_bw;
33168 	/*
33169 	 * Specifies the maximum portion of the port's bandwidth that the set
33170 	 * of PFs and VFs on PCIe endpoint 2 may use. The value is a percentage
33171 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33172 	 * maximum rate.
33173 	 */
33174 	uint8_t	ep2_max_bw;
33175 	/*
33176 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33177 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 3 for
33178 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33179 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33180 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33181 	 * be less than or equal to 100.
33182 	 */
33183 	uint8_t	ep3_min_bw;
33184 	/*
33185 	 * Specifies the maximum portion of the port's bandwidth that the set
33186 	 * of PFs and VFs on PCIe endpoint 3 may use. The value is a percentage
33187 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33188 	 * maximum rate.
33189 	 */
33190 	uint8_t	ep3_max_bw;
33191 	uint8_t	unused_1[4];
33192 } hwrm_port_ep_tx_cfg_input_t, *phwrm_port_ep_tx_cfg_input_t;
33193 
33194 /* hwrm_port_ep_tx_cfg_output (size:128b/16B) */
33195 
33196 typedef struct hwrm_port_ep_tx_cfg_output {
33197 	/* The specific error status for the command. */
33198 	uint16_t	error_code;
33199 	/* The HWRM command request type. */
33200 	uint16_t	req_type;
33201 	/* The sequence ID from the original command. */
33202 	uint16_t	seq_id;
33203 	/* The length of the response data in number of bytes. */
33204 	uint16_t	resp_len;
33205 	uint8_t	unused_0[7];
33206 	/*
33207 	 * This field is used in output records to indicate that the output
33208 	 * is completely written to RAM. This field should be read as '1'
33209 	 * to indicate that the output has been completely written.
33210 	 * When writing a command completion or response to an internal
33211 	 * processor, the order of writes has to be such that this field
33212 	 * is written last.
33213 	 */
33214 	uint8_t	valid;
33215 } hwrm_port_ep_tx_cfg_output_t, *phwrm_port_ep_tx_cfg_output_t;
33216 
33217 /* hwrm_port_ep_tx_cfg_cmd_err (size:64b/8B) */
33218 
33219 typedef struct hwrm_port_ep_tx_cfg_cmd_err {
33220 	/*
33221 	 * command specific error codes for the cmd_err field in
33222 	 * hwrm_err_output
33223 	 */
33224 	uint8_t	code;
33225 	/* Unknown error. */
33226 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_UNKNOWN		UINT32_C(0x0)
33227 	/* The port ID is invalid */
33228 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_PORT_ID_INVALID	UINT32_C(0x1)
33229 	/* One of the PCIe endpoints configured is not active. */
33230 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_EP_INACTIVE	UINT32_C(0x2)
33231 	/* A minimum bandwidth is out of range. */
33232 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_RANGE	UINT32_C(0x3)
33233 	/*
33234 	 * One endpoint's minimum bandwidth is more than its maximum
33235 	 * bandwidth.
33236 	 */
33237 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_MORE_THAN_MAX  UINT32_C(0x4)
33238 	/* The sum of the minimum bandwidths on the port is more than 100%. */
33239 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_SUM	UINT32_C(0x5)
33240 	/*
33241 	 * The NIC does not support enforcement of a minimum guaranteed
33242 	 * bandwidth for an endpoint.
33243 	 */
33244 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_UNSUPPORTED UINT32_C(0x6)
33245 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_LAST		HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_UNSUPPORTED
33246 	uint8_t	unused_0[7];
33247 } hwrm_port_ep_tx_cfg_cmd_err_t, *phwrm_port_ep_tx_cfg_cmd_err_t;
33248 
33249 /************************
33250  * hwrm_port_ep_tx_qcfg *
33251  ************************/
33252 
33253 
33254 /* hwrm_port_ep_tx_qcfg_input (size:192b/24B) */
33255 
33256 typedef struct hwrm_port_ep_tx_qcfg_input {
33257 	/* The HWRM command request type. */
33258 	uint16_t	req_type;
33259 	/*
33260 	 * The completion ring to send the completion event on. This should
33261 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33262 	 */
33263 	uint16_t	cmpl_ring;
33264 	/*
33265 	 * The sequence ID is used by the driver for tracking multiple
33266 	 * commands. This ID is treated as opaque data by the firmware and
33267 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33268 	 */
33269 	uint16_t	seq_id;
33270 	/*
33271 	 * The target ID of the command:
33272 	 * * 0x0-0xFFF8 - The function ID
33273 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33274 	 * * 0xFFFD - Reserved for user-space HWRM interface
33275 	 * * 0xFFFF - HWRM
33276 	 */
33277 	uint16_t	target_id;
33278 	/*
33279 	 * A physical address pointer pointing to a host buffer that the
33280 	 * command's response data will be written. This can be either a host
33281 	 * physical address (HPA) or a guest physical address (GPA) and must
33282 	 * point to a physically contiguous block of memory.
33283 	 */
33284 	uint64_t	resp_addr;
33285 	/* The port whose endpoint rate limits are queried. */
33286 	uint8_t	port_id;
33287 	uint8_t	unused[7];
33288 } hwrm_port_ep_tx_qcfg_input_t, *phwrm_port_ep_tx_qcfg_input_t;
33289 
33290 /* hwrm_port_ep_tx_qcfg_output (size:192b/24B) */
33291 
33292 typedef struct hwrm_port_ep_tx_qcfg_output {
33293 	/* The specific error status for the command. */
33294 	uint16_t	error_code;
33295 	/* The HWRM command request type. */
33296 	uint16_t	req_type;
33297 	/* The sequence ID from the original command. */
33298 	uint16_t	seq_id;
33299 	/* The length of the response data in number of bytes. */
33300 	uint16_t	resp_len;
33301 	/*
33302 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33303 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 0 for
33304 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33305 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33306 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33307 	 * be less than or equal to 100.
33308 	 */
33309 	uint8_t	ep0_min_bw;
33310 	/*
33311 	 * Specifies the maximum portion of the port's bandwidth that the set
33312 	 * of PFs and VFs on PCIe endpoint 0 may use. The value is a percentage
33313 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33314 	 * maximum rate.
33315 	 */
33316 	uint8_t	ep0_max_bw;
33317 	/*
33318 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33319 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 1 for
33320 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33321 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33322 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33323 	 * be less than or equal to 100.
33324 	 */
33325 	uint8_t	ep1_min_bw;
33326 	/*
33327 	 * Specifies the maximum portion of the port's bandwidth that the set
33328 	 * of PFs and VFs on PCIe endpoint 1 may use. The value is a percentage
33329 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33330 	 * maximum rate.
33331 	 */
33332 	uint8_t	ep1_max_bw;
33333 	/*
33334 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33335 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 2 for
33336 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33337 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33338 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33339 	 * be less than or equal to 100.
33340 	 */
33341 	uint8_t	ep2_min_bw;
33342 	/*
33343 	 * Specifies the maximum portion of the port's bandwidth that the set
33344 	 * of PFs and VFs on PCIe endpoint 2 may use. The value is a percentage
33345 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33346 	 * maximum rate.
33347 	 */
33348 	uint8_t	ep2_max_bw;
33349 	/*
33350 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
33351 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 3 for
33352 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
33353 	 * minimum rate. The endpoint's min_bw must be less than or equal to
33354 	 * max_bw. The sum of all configured minimum bandwidths for a port must
33355 	 * be less than or equal to 100.
33356 	 */
33357 	uint8_t	ep3_min_bw;
33358 	/*
33359 	 * Specifies the maximum portion of the port's bandwidth that the set
33360 	 * of PFs and VFs on PCIe endpoint 3 may use. The value is a percentage
33361 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
33362 	 * maximum rate.
33363 	 */
33364 	uint8_t	ep3_max_bw;
33365 	uint8_t	unused_0[7];
33366 	/*
33367 	 * This field is used in output records to indicate that the output
33368 	 * is completely written to RAM. This field should be read as '1'
33369 	 * to indicate that the output has been completely written.
33370 	 * When writing a command completion or response to an internal
33371 	 * processor, the order of writes has to be such that this field is
33372 	 * written last.
33373 	 */
33374 	uint8_t	valid;
33375 } hwrm_port_ep_tx_qcfg_output_t, *phwrm_port_ep_tx_qcfg_output_t;
33376 
33377 /*****************
33378  * hwrm_port_cfg *
33379  *****************/
33380 
33381 
33382 /* hwrm_port_cfg_input (size:256b/32B) */
33383 
33384 typedef struct hwrm_port_cfg_input {
33385 	/* The HWRM command request type. */
33386 	uint16_t	req_type;
33387 	/*
33388 	 * The completion ring to send the completion event on. This should
33389 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33390 	 */
33391 	uint16_t	cmpl_ring;
33392 	/*
33393 	 * The sequence ID is used by the driver for tracking multiple
33394 	 * commands. This ID is treated as opaque data by the firmware and
33395 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33396 	 */
33397 	uint16_t	seq_id;
33398 	/*
33399 	 * The target ID of the command:
33400 	 * * 0x0-0xFFF8 - The function ID
33401 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33402 	 * * 0xFFFD - Reserved for user-space HWRM interface
33403 	 * * 0xFFFF - HWRM
33404 	 */
33405 	uint16_t	target_id;
33406 	/*
33407 	 * A physical address pointer pointing to a host buffer that the
33408 	 * command's response data will be written. This can be either a host
33409 	 * physical address (HPA) or a guest physical address (GPA) and must
33410 	 * point to a physically contiguous block of memory.
33411 	 */
33412 	uint64_t	resp_addr;
33413 	uint32_t	flags;
33414 	uint32_t	enables;
33415 	/*
33416 	 * This bit must be '1' for the tx_rate_limit field to
33417 	 * be configured.
33418 	 */
33419 	#define HWRM_PORT_CFG_INPUT_ENABLES_TX_RATE_LIMIT	UINT32_C(0x1)
33420 	/* Port ID of port that is to be configured. */
33421 	uint16_t	port_id;
33422 	uint16_t	unused_0;
33423 	/*
33424 	 * Requested setting of TX rate limit in Mbps.
33425 	 * tx_rate_limit = 0 will cancel the rate limit if any.
33426 	 * This field is valid only when tx_rate_limit bit in 'enables'
33427 	 * field is '1'.
33428 	 */
33429 	uint32_t	tx_rate_limit;
33430 } hwrm_port_cfg_input_t, *phwrm_port_cfg_input_t;
33431 
33432 /* hwrm_port_cfg_output (size:128b/16B) */
33433 
33434 typedef struct hwrm_port_cfg_output {
33435 	/* The specific error status for the command. */
33436 	uint16_t	error_code;
33437 	/* The HWRM command request type. */
33438 	uint16_t	req_type;
33439 	/* The sequence ID from the original command. */
33440 	uint16_t	seq_id;
33441 	/* The length of the response data in number of bytes. */
33442 	uint16_t	resp_len;
33443 	uint8_t	unused_0[7];
33444 	/*
33445 	 * This field is used in Output records to indicate that the output
33446 	 * is completely written to RAM. This field should be read as '1'
33447 	 * to indicate that the output has been completely written. When
33448 	 * writing a command completion or response to an internal processor,
33449 	 * the order of writes has to be such that this field is written last.
33450 	 */
33451 	uint8_t	valid;
33452 } hwrm_port_cfg_output_t, *phwrm_port_cfg_output_t;
33453 
33454 /******************
33455  * hwrm_port_qcfg *
33456  ******************/
33457 
33458 
33459 /* hwrm_port_qcfg_input (size:192b/24B) */
33460 
33461 typedef struct hwrm_port_qcfg_input {
33462 	/* The HWRM command request type. */
33463 	uint16_t	req_type;
33464 	/*
33465 	 * The completion ring to send the completion event on. This should
33466 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33467 	 */
33468 	uint16_t	cmpl_ring;
33469 	/*
33470 	 * The sequence ID is used by the driver for tracking multiple
33471 	 * commands. This ID is treated as opaque data by the firmware and
33472 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33473 	 */
33474 	uint16_t	seq_id;
33475 	/*
33476 	 * The target ID of the command:
33477 	 * * 0x0-0xFFF8 - The function ID
33478 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33479 	 * * 0xFFFD - Reserved for user-space HWRM interface
33480 	 * * 0xFFFF - HWRM
33481 	 */
33482 	uint16_t	target_id;
33483 	/*
33484 	 * A physical address pointer pointing to a host buffer that the
33485 	 * command's response data will be written. This can be either a host
33486 	 * physical address (HPA) or a guest physical address (GPA) and must
33487 	 * point to a physically contiguous block of memory.
33488 	 */
33489 	uint64_t	resp_addr;
33490 	/* Port ID of port that is to be queried. */
33491 	uint16_t	port_id;
33492 	uint8_t	unused_0[6];
33493 } hwrm_port_qcfg_input_t, *phwrm_port_qcfg_input_t;
33494 
33495 /* hwrm_port_qcfg_output (size:192b/24B) */
33496 
33497 typedef struct hwrm_port_qcfg_output {
33498 	/* The specific error status for the command. */
33499 	uint16_t	error_code;
33500 	/* The HWRM command request type. */
33501 	uint16_t	req_type;
33502 	/* The sequence ID from the original command. */
33503 	uint16_t	seq_id;
33504 	/* The length of the response data in number of bytes. */
33505 	uint16_t	resp_len;
33506 	uint32_t	supported;
33507 	/*
33508 	 * If set to '1', then this bit indicates that TX rate limit
33509 	 * could be configured via hwrm_port_cfg command.
33510 	 */
33511 	#define HWRM_PORT_QCFG_OUTPUT_SUPPORTED_TX_RATE_LIMIT	UINT32_C(0x1)
33512 	uint32_t	enabled;
33513 	/*
33514 	 * If set to '1', then this bit indicates that TX rate limit
33515 	 * is enabled and could be found in tx_rate_limit field.
33516 	 */
33517 	#define HWRM_PORT_QCFG_OUTPUT_ENABLED_TX_RATE_LIMIT	UINT32_C(0x1)
33518 	/*
33519 	 * Current setting of TX rate limit in Mbps.
33520 	 * This field is valid only when tx_rate_limit bit in 'enabled'
33521 	 * field is '1'.
33522 	 */
33523 	uint32_t	tx_rate_limit;
33524 	uint8_t	unused_0[3];
33525 	/*
33526 	 * This field is used in Output records to indicate that the output
33527 	 * is completely written to RAM. This field should be read as '1'
33528 	 * to indicate that the output has been completely written. When
33529 	 * writing a command completion or response to an internal processor,
33530 	 * the order of writes has to be such that this field is written last.
33531 	 */
33532 	uint8_t	valid;
33533 } hwrm_port_qcfg_output_t, *phwrm_port_qcfg_output_t;
33534 
33535 /***********************
33536  * hwrm_port_mac_qcaps *
33537  ***********************/
33538 
33539 
33540 /* hwrm_port_mac_qcaps_input (size:192b/24B) */
33541 
33542 typedef struct hwrm_port_mac_qcaps_input {
33543 	/* The HWRM command request type. */
33544 	uint16_t	req_type;
33545 	/*
33546 	 * The completion ring to send the completion event on. This should
33547 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33548 	 */
33549 	uint16_t	cmpl_ring;
33550 	/*
33551 	 * The sequence ID is used by the driver for tracking multiple
33552 	 * commands. This ID is treated as opaque data by the firmware and
33553 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33554 	 */
33555 	uint16_t	seq_id;
33556 	/*
33557 	 * The target ID of the command:
33558 	 * * 0x0-0xFFF8 - The function ID
33559 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33560 	 * * 0xFFFD - Reserved for user-space HWRM interface
33561 	 * * 0xFFFF - HWRM
33562 	 */
33563 	uint16_t	target_id;
33564 	/*
33565 	 * A physical address pointer pointing to a host buffer that the
33566 	 * command's response data will be written. This can be either a host
33567 	 * physical address (HPA) or a guest physical address (GPA) and must
33568 	 * point to a physically contiguous block of memory.
33569 	 */
33570 	uint64_t	resp_addr;
33571 	/* Port ID of port that is being queried. */
33572 	uint16_t	port_id;
33573 	uint8_t	unused_0[6];
33574 } hwrm_port_mac_qcaps_input_t, *phwrm_port_mac_qcaps_input_t;
33575 
33576 /* hwrm_port_mac_qcaps_output (size:128b/16B) */
33577 
33578 typedef struct hwrm_port_mac_qcaps_output {
33579 	/* The specific error status for the command. */
33580 	uint16_t	error_code;
33581 	/* The HWRM command request type. */
33582 	uint16_t	req_type;
33583 	/* The sequence ID from the original command. */
33584 	uint16_t	seq_id;
33585 	/* The length of the response data in number of bytes. */
33586 	uint16_t	resp_len;
33587 	/* MAC capability flags */
33588 	uint8_t	flags;
33589 	/*
33590 	 * If set to 1, then this field indicates that the
33591 	 * MAC does not support local loopback.
33592 	 */
33593 	#define HWRM_PORT_MAC_QCAPS_OUTPUT_FLAGS_LOCAL_LPBK_NOT_SUPPORTED	UINT32_C(0x1)
33594 	/*
33595 	 * If set to 1, then this field indicates that the
33596 	 * MAC is capable of supporting remote loopback.
33597 	 */
33598 	#define HWRM_PORT_MAC_QCAPS_OUTPUT_FLAGS_REMOTE_LPBK_SUPPORTED	UINT32_C(0x2)
33599 	uint8_t	unused_0[6];
33600 	/*
33601 	 * This field is used in Output records to indicate that the output
33602 	 * is completely written to RAM. This field should be read as '1'
33603 	 * to indicate that the output has been completely written. When
33604 	 * writing a command completion or response to an internal processor,
33605 	 * the order of writes has to be such that this field is written last.
33606 	 */
33607 	uint8_t	valid;
33608 } hwrm_port_mac_qcaps_output_t, *phwrm_port_mac_qcaps_output_t;
33609 
33610 /***********************
33611  * hwrm_queue_qportcfg *
33612  ***********************/
33613 
33614 
33615 /* hwrm_queue_qportcfg_input (size:192b/24B) */
33616 
33617 typedef struct hwrm_queue_qportcfg_input {
33618 	/* The HWRM command request type. */
33619 	uint16_t	req_type;
33620 	/*
33621 	 * The completion ring to send the completion event on. This should
33622 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33623 	 */
33624 	uint16_t	cmpl_ring;
33625 	/*
33626 	 * The sequence ID is used by the driver for tracking multiple
33627 	 * commands. This ID is treated as opaque data by the firmware and
33628 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33629 	 */
33630 	uint16_t	seq_id;
33631 	/*
33632 	 * The target ID of the command:
33633 	 * * 0x0-0xFFF8 - The function ID
33634 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33635 	 * * 0xFFFD - Reserved for user-space HWRM interface
33636 	 * * 0xFFFF - HWRM
33637 	 */
33638 	uint16_t	target_id;
33639 	/*
33640 	 * A physical address pointer pointing to a host buffer that the
33641 	 * command's response data will be written. This can be either a host
33642 	 * physical address (HPA) or a guest physical address (GPA) and must
33643 	 * point to a physically contiguous block of memory.
33644 	 */
33645 	uint64_t	resp_addr;
33646 	uint32_t	flags;
33647 	/*
33648 	 * Enumeration denoting the RX, TX type of the resource.
33649 	 * This enumeration is used for resources that are similar for both
33650 	 * TX and RX paths of the chip.
33651 	 */
33652 	#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH	UINT32_C(0x1)
33653 	/* tx path */
33654 		#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
33655 	/* rx path */
33656 		#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
33657 		#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_RX
33658 	/*
33659 	 * Port ID of port for which the queue configuration is being
33660 	 * queried. This field is only required when sent by IPC.
33661 	 */
33662 	uint16_t	port_id;
33663 	/*
33664 	 * Drivers will set this capability when it can use
33665 	 * queue_idx_service_profile to map the queues to application.
33666 	 */
33667 	uint8_t	drv_qmap_cap;
33668 	/* disabled */
33669 	#define HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_DISABLED UINT32_C(0x0)
33670 	/* enabled */
33671 	#define HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_ENABLED  UINT32_C(0x1)
33672 	#define HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_LAST	HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_ENABLED
33673 	uint8_t	unused_0;
33674 } hwrm_queue_qportcfg_input_t, *phwrm_queue_qportcfg_input_t;
33675 
33676 /* hwrm_queue_qportcfg_output (size:1344b/168B) */
33677 
33678 typedef struct hwrm_queue_qportcfg_output {
33679 	/* The specific error status for the command. */
33680 	uint16_t	error_code;
33681 	/* The HWRM command request type. */
33682 	uint16_t	req_type;
33683 	/* The sequence ID from the original command. */
33684 	uint16_t	seq_id;
33685 	/* The length of the response data in number of bytes. */
33686 	uint16_t	resp_len;
33687 	/*
33688 	 * The maximum number of queues that can be configured on this
33689 	 * port.
33690 	 * Valid values range from 1 through 8.
33691 	 */
33692 	uint8_t	max_configurable_queues;
33693 	/*
33694 	 * The maximum number of lossless queues that can be configured
33695 	 * on this port.
33696 	 * Valid values range from 0 through 8.
33697 	 */
33698 	uint8_t	max_configurable_lossless_queues;
33699 	/*
33700 	 * Bitmask indicating which queues can be configured by the
33701 	 * hwrm_queue_cfg command.
33702 	 *
33703 	 * Each bit represents a specific queue where bit 0 represents
33704 	 * queue 0 and bit 7 represents queue 7.
33705 	 * # A value of 0 indicates that the queue is not configurable
33706 	 * by the hwrm_queue_cfg command.
33707 	 * # A value of 1 indicates that the queue is configurable.
33708 	 * # A hwrm_queue_cfg command shall return error when trying to
33709 	 * configure a queue not configurable.
33710 	 */
33711 	uint8_t	queue_cfg_allowed;
33712 	/* Information about queue configuration. */
33713 	uint8_t	queue_cfg_info;
33714 	/*
33715 	 * If this flag is set to '1', then the queues are
33716 	 * configured asymmetrically on TX and RX sides.
33717 	 * If this flag is set to '0', then the queues are
33718 	 * configured symmetrically on TX and RX sides. For
33719 	 * symmetric configuration, the queue configuration
33720 	 * including queue ids and service profiles on the
33721 	 * TX side is the same as the corresponding queue
33722 	 * configuration on the RX side.
33723 	 */
33724 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_CFG_INFO_ASYM_CFG		UINT32_C(0x1)
33725 	/*
33726 	 * If this flag is set to '1', then service_profile will carry
33727 	 * either lossy/lossless type and the new service_profile_type
33728 	 * field will be used to determine if the queue is for L2/ROCE/CNP.
33729 	 */
33730 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_CFG_INFO_USE_PROFILE_TYPE	UINT32_C(0x2)
33731 	/*
33732 	 * Bitmask indicating which queues can be configured by the
33733 	 * hwrm_queue_pfcenable_cfg command.
33734 	 *
33735 	 * Each bit represents a specific priority where bit 0 represents
33736 	 * priority 0 and bit 7 represents priority 7.
33737 	 * # A value of 0 indicates that the priority is not configurable by
33738 	 * the hwrm_queue_pfcenable_cfg command.
33739 	 * # A value of 1 indicates that the priority is configurable.
33740 	 * # A hwrm_queue_pfcenable_cfg command shall return error when
33741 	 * trying to configure a priority that is not configurable.
33742 	 */
33743 	uint8_t	queue_pfcenable_cfg_allowed;
33744 	/*
33745 	 * Bitmask indicating which queues can be configured by the
33746 	 * hwrm_queue_pri2cos_cfg command.
33747 	 *
33748 	 * Each bit represents a specific queue where bit 0 represents
33749 	 * queue 0 and bit 7 represents queue 7.
33750 	 * # A value of 0 indicates that the queue is not configurable
33751 	 * by the hwrm_queue_pri2cos_cfg command.
33752 	 * # A value of 1 indicates that the queue is configurable.
33753 	 * # A hwrm_queue_pri2cos_cfg command shall return error when
33754 	 * trying to configure a queue that is not configurable.
33755 	 */
33756 	uint8_t	queue_pri2cos_cfg_allowed;
33757 	/*
33758 	 * Bitmask indicating which queues can be configured by the
33759 	 * hwrm_queue_pri2cos_cfg command.
33760 	 *
33761 	 * Each bit represents a specific queue where bit 0 represents
33762 	 * queue 0 and bit 7 represents queue 7.
33763 	 * # A value of 0 indicates that the queue is not configurable
33764 	 * by the hwrm_queue_pri2cos_cfg command.
33765 	 * # A value of 1 indicates that the queue is configurable.
33766 	 * # A hwrm_queue_pri2cos_cfg command shall return error when
33767 	 * trying to configure a queue not configurable.
33768 	 */
33769 	uint8_t	queue_cos2bw_cfg_allowed;
33770 	/*
33771 	 * ID of CoS Queue 0.
33772 	 * FF - Invalid id
33773 	 *
33774 	 * # This ID can be used on any subsequent call to an hwrm command
33775 	 * that takes a queue id.
33776 	 * # IDs must always be queried by this command before any use
33777 	 * by the driver or software.
33778 	 * # The CoS queue index is obtained by applying modulo 10 to the
33779 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33780 	 * The CoS queue index is used to reference port statistics for the
33781 	 * CoS queue.
33782 	 * # A value of 0xff indicates that the queue is not available.
33783 	 * # Available queues may not be in sequential order.
33784 	 */
33785 	uint8_t	queue_id0;
33786 	/* This value specifies service profile kind for CoS queue */
33787 	uint8_t	queue_id0_service_profile;
33788 	/* Lossy (best-effort) */
33789 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
33790 	/* Lossless */
33791 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
33792 	/* Lossless RoCE (deprecated) */
33793 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
33794 	/* Lossy RoCE CNP (deprecated) */
33795 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
33796 	/* Lossless NIC (deprecated) */
33797 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
33798 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
33799 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
33800 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN
33801 	/*
33802 	 * ID of CoS Queue 1.
33803 	 * FF - Invalid id
33804 	 *
33805 	 * # This ID can be used on any subsequent call to an hwrm command
33806 	 * that takes a queue id.
33807 	 * # IDs must always be queried by this command before any use
33808 	 * by the driver or software.
33809 	 * # The CoS queue index is obtained by applying modulo 10 to the
33810 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33811 	 * The CoS queue index is used to reference port statistics for the
33812 	 * CoS queue.
33813 	 * # A value of 0xff indicates that the queue is not available.
33814 	 * # Available queues may not be in sequential order.
33815 	 */
33816 	uint8_t	queue_id1;
33817 	/* This value specifies service profile kind for CoS queue */
33818 	uint8_t	queue_id1_service_profile;
33819 	/* Lossy (best-effort) */
33820 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
33821 	/* Lossless */
33822 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
33823 	/* Lossless RoCE (deprecated) */
33824 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
33825 	/* Lossy RoCE CNP (deprecated) */
33826 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
33827 	/* Lossless NIC (deprecated) */
33828 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
33829 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
33830 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
33831 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN
33832 	/*
33833 	 * ID of CoS Queue 2.
33834 	 * FF - Invalid id
33835 	 *
33836 	 * # This ID can be used on any subsequent call to an hwrm command
33837 	 * that takes a queue id.
33838 	 * # IDs must always be queried by this command before any use
33839 	 * by the driver or software.
33840 	 * # The CoS queue index is obtained by applying modulo 10 to the
33841 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33842 	 * The CoS queue index is used to reference port statistics for the
33843 	 * CoS queue.
33844 	 * # A value of 0xff indicates that the queue is not available.
33845 	 * # Available queues may not be in sequential order.
33846 	 */
33847 	uint8_t	queue_id2;
33848 	/* This value specifies service profile kind for CoS queue */
33849 	uint8_t	queue_id2_service_profile;
33850 	/* Lossy (best-effort) */
33851 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
33852 	/* Lossless */
33853 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
33854 	/* Lossless RoCE (deprecated) */
33855 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
33856 	/* Lossy RoCE CNP (deprecated) */
33857 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
33858 	/* Lossless NIC (deprecated) */
33859 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
33860 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
33861 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
33862 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN
33863 	/*
33864 	 * ID of CoS Queue 3.
33865 	 * FF - Invalid id
33866 	 *
33867 	 * # This ID can be used on any subsequent call to an hwrm command
33868 	 * that takes a queue id.
33869 	 * # IDs must always be queried by this command before any use
33870 	 * by the driver or software.
33871 	 * # The CoS queue index is obtained by applying modulo 10 to the
33872 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33873 	 * The CoS queue index is used to reference port statistics for the
33874 	 * CoS queue.
33875 	 * # A value of 0xff indicates that the queue is not available.
33876 	 * # Available queues may not be in sequential order.
33877 	 */
33878 	uint8_t	queue_id3;
33879 	/* This value specifies service profile kind for CoS queue */
33880 	uint8_t	queue_id3_service_profile;
33881 	/* Lossy (best-effort) */
33882 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
33883 	/* Lossless */
33884 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
33885 	/* Lossless RoCE (deprecated) */
33886 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
33887 	/* Lossy RoCE CNP (deprecated) */
33888 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
33889 	/* Lossless NIC (deprecated) */
33890 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
33891 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
33892 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
33893 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN
33894 	/*
33895 	 * ID of CoS Queue 4.
33896 	 * FF - Invalid id
33897 	 *
33898 	 * # This ID can be used on any subsequent call to an hwrm command
33899 	 * that takes a queue id.
33900 	 * # IDs must always be queried by this command before any use
33901 	 * by the driver or software.
33902 	 * # The CoS queue index is obtained by applying modulo 10 to the
33903 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33904 	 * The CoS queue index is used to reference port statistics for the
33905 	 * CoS queue.
33906 	 * # A value of 0xff indicates that the queue is not available.
33907 	 * # Available queues may not be in sequential order.
33908 	 */
33909 	uint8_t	queue_id4;
33910 	/* This value specifies service profile kind for CoS queue */
33911 	uint8_t	queue_id4_service_profile;
33912 	/* Lossy (best-effort) */
33913 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
33914 	/* Lossless */
33915 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
33916 	/* Lossless RoCE (deprecated) */
33917 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
33918 	/* Lossy RoCE CNP (deprecated) */
33919 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
33920 	/* Lossless NIC (deprecated) */
33921 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
33922 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
33923 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
33924 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN
33925 	/*
33926 	 * ID of CoS Queue 5.
33927 	 * FF - Invalid id
33928 	 *
33929 	 * # This ID can be used on any subsequent call to an hwrm command
33930 	 * that takes a queue id.
33931 	 * # IDs must always be queried by this command before any use
33932 	 * by the driver or software.
33933 	 * # The CoS queue index is obtained by applying modulo 10 to the
33934 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33935 	 * The CoS queue index is used to reference port statistics for the
33936 	 * CoS queue.
33937 	 * # A value of 0xff indicates that the queue is not available.
33938 	 * # Available queues may not be in sequential order.
33939 	 */
33940 	uint8_t	queue_id5;
33941 	/* This value specifies service profile kind for CoS queue */
33942 	uint8_t	queue_id5_service_profile;
33943 	/* Lossy (best-effort) */
33944 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
33945 	/* Lossless */
33946 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
33947 	/* Lossless RoCE (deprecated) */
33948 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
33949 	/* Lossy RoCE CNP (deprecated) */
33950 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
33951 	/* Lossless NIC (deprecated) */
33952 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
33953 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
33954 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
33955 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN
33956 	/*
33957 	 * ID of CoS Queue 6.
33958 	 * FF - Invalid id
33959 	 *
33960 	 * # This ID can be used on any subsequent call to an hwrm command
33961 	 * that takes a queue id.
33962 	 * # IDs must always be queried by this command before any use
33963 	 * by the driver or software.
33964 	 * # The CoS queue index is obtained by applying modulo 10 to the
33965 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33966 	 * The CoS queue index is used to reference port statistics for the
33967 	 * CoS queue.
33968 	 * # A value of 0xff indicates that the queue is not available.
33969 	 * # Available queues may not be in sequential order.
33970 	 */
33971 	uint8_t	queue_id6;
33972 	/* This value specifies service profile kind for CoS queue */
33973 	uint8_t	queue_id6_service_profile;
33974 	/* Lossy (best-effort) */
33975 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
33976 	/* Lossless */
33977 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
33978 	/* Lossless RoCE (deprecated) */
33979 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
33980 	/* Lossy RoCE CNP (deprecated) */
33981 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
33982 	/* Lossless NIC (deprecated) */
33983 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
33984 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
33985 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
33986 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN
33987 	/*
33988 	 * ID of CoS Queue 7.
33989 	 * FF - Invalid id
33990 	 *
33991 	 * # This ID can be used on any subsequent call to an hwrm command
33992 	 * that takes a queue id.
33993 	 * # IDs must always be queried by this command before any use
33994 	 * by the driver or software.
33995 	 * # The CoS queue index is obtained by applying modulo 10 to the
33996 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
33997 	 * The CoS queue index is used to reference port statistics for the
33998 	 * CoS queue.
33999 	 * # A value of 0xff indicates that the queue is not available.
34000 	 * # Available queues may not be in sequential order.
34001 	 */
34002 	uint8_t	queue_id7;
34003 	/* This value specifies service profile kind for CoS queue */
34004 	uint8_t	queue_id7_service_profile;
34005 	/* Lossy (best-effort) */
34006 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
34007 	/* Lossless */
34008 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS	UINT32_C(0x1)
34009 	/* Lossless RoCE (deprecated) */
34010 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS_ROCE  UINT32_C(0x1)
34011 	/* Lossy RoCE CNP (deprecated) */
34012 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSY_ROCE_CNP UINT32_C(0x2)
34013 	/* Lossless NIC (deprecated) */
34014 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS_NIC   UINT32_C(0x3)
34015 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
34016 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN	UINT32_C(0xff)
34017 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LAST	HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN
34018 	/*
34019 	 * This value specifies traffic type for the service profile. We can
34020 	 * have a TC mapped to multiple traffic types. For example shared
34021 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34022 	 * A value of zero is considered as invalid.
34023 	 */
34024 	uint8_t	queue_id0_service_profile_type;
34025 	/* Recommended to be used for RoCE traffic only. */
34026 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34027 	/* Recommended to be used for NIC/L2 traffic only. */
34028 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34029 	/* Recommended to be used for CNP traffic only. */
34030 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34031 	/*
34032 	 * Up to 16 bytes of null padded ASCII string describing this queue.
34033 	 * The queue name includes a CoS queue index and, in some cases, text
34034 	 * that distinguishes the queue from other queues in the group.
34035 	 */
34036 	char	qid0_name[16];
34037 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
34038 	char	qid1_name[16];
34039 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
34040 	char	qid2_name[16];
34041 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
34042 	char	qid3_name[16];
34043 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
34044 	char	qid4_name[16];
34045 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
34046 	char	qid5_name[16];
34047 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
34048 	char	qid6_name[16];
34049 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
34050 	char	qid7_name[16];
34051 	/*
34052 	 * This value specifies traffic type for the service profile. We can
34053 	 * have a TC mapped to multiple traffic types. For example shared
34054 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34055 	 * A value of zero is considered as invalid.
34056 	 */
34057 	uint8_t	queue_id1_service_profile_type;
34058 	/* Recommended to be used for RoCE traffic only. */
34059 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34060 	/* Recommended to be used for NIC/L2 traffic only. */
34061 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34062 	/* Recommended to be used for CNP traffic only. */
34063 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34064 	/*
34065 	 * This value specifies traffic type for the service profile. We can
34066 	 * have a TC mapped to multiple traffic types. For example shared
34067 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34068 	 * A value of zero is considered as invalid.
34069 	 */
34070 	uint8_t	queue_id2_service_profile_type;
34071 	/* Recommended to be used for RoCE traffic only. */
34072 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34073 	/* Recommended to be used for NIC/L2 traffic only. */
34074 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34075 	/* Recommended to be used for CNP traffic only. */
34076 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34077 	/*
34078 	 * This value specifies traffic type for the service profile. We can
34079 	 * have a TC mapped to multiple traffic types. For example shared
34080 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34081 	 * A value of zero is considered as invalid.
34082 	 */
34083 	uint8_t	queue_id3_service_profile_type;
34084 	/* Recommended to be used for RoCE traffic only. */
34085 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34086 	/* Recommended to be used for NIC/L2 traffic only. */
34087 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34088 	/* Recommended to be used for CNP traffic only. */
34089 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34090 	/*
34091 	 * This value specifies traffic type for the service profile. We can
34092 	 * have a TC mapped to multiple traffic types. For example shared
34093 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34094 	 * A value of zero is considered as invalid.
34095 	 */
34096 	uint8_t	queue_id4_service_profile_type;
34097 	/* Recommended to be used for RoCE traffic only. */
34098 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34099 	/* Recommended to be used for NIC/L2 traffic only. */
34100 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34101 	/* Recommended to be used for CNP traffic only. */
34102 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34103 	/*
34104 	 * This value specifies traffic type for the service profile. We can
34105 	 * have a TC mapped to multiple traffic types. For example shared
34106 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34107 	 * A value of zero is considered as invalid.
34108 	 */
34109 	uint8_t	queue_id5_service_profile_type;
34110 	/* Recommended to be used for RoCE traffic only. */
34111 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34112 	/* Recommended to be used for NIC/L2 traffic only. */
34113 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34114 	/* Recommended to be used for CNP traffic only. */
34115 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34116 	/*
34117 	 * This value specifies traffic type for the service profile. We can
34118 	 * have a TC mapped to multiple traffic types. For example shared
34119 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34120 	 * A value of zero is considered as invalid.
34121 	 */
34122 	uint8_t	queue_id6_service_profile_type;
34123 	/* Recommended to be used for RoCE traffic only. */
34124 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34125 	/* Recommended to be used for NIC/L2 traffic only. */
34126 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34127 	/* Recommended to be used for CNP traffic only. */
34128 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34129 	/*
34130 	 * This value specifies traffic type for the service profile. We can
34131 	 * have a TC mapped to multiple traffic types. For example shared
34132 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
34133 	 * A value of zero is considered as invalid.
34134 	 */
34135 	uint8_t	queue_id7_service_profile_type;
34136 	/* Recommended to be used for RoCE traffic only. */
34137 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_TYPE_ROCE	UINT32_C(0x1)
34138 	/* Recommended to be used for NIC/L2 traffic only. */
34139 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_TYPE_NIC	UINT32_C(0x2)
34140 	/* Recommended to be used for CNP traffic only. */
34141 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_TYPE_CNP	UINT32_C(0x4)
34142 	/*
34143 	 * This field is used in Output records to indicate that the output
34144 	 * is completely written to RAM. This field should be read as '1'
34145 	 * to indicate that the output has been completely written. When
34146 	 * writing a command completion or response to an internal processor,
34147 	 * the order of writes has to be such that this field is written last.
34148 	 */
34149 	uint8_t	valid;
34150 } hwrm_queue_qportcfg_output_t, *phwrm_queue_qportcfg_output_t;
34151 
34152 /*******************
34153  * hwrm_queue_qcfg *
34154  *******************/
34155 
34156 
34157 /* hwrm_queue_qcfg_input (size:192b/24B) */
34158 
34159 typedef struct hwrm_queue_qcfg_input {
34160 	/* The HWRM command request type. */
34161 	uint16_t	req_type;
34162 	/*
34163 	 * The completion ring to send the completion event on. This should
34164 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34165 	 */
34166 	uint16_t	cmpl_ring;
34167 	/*
34168 	 * The sequence ID is used by the driver for tracking multiple
34169 	 * commands. This ID is treated as opaque data by the firmware and
34170 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34171 	 */
34172 	uint16_t	seq_id;
34173 	/*
34174 	 * The target ID of the command:
34175 	 * * 0x0-0xFFF8 - The function ID
34176 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34177 	 * * 0xFFFD - Reserved for user-space HWRM interface
34178 	 * * 0xFFFF - HWRM
34179 	 */
34180 	uint16_t	target_id;
34181 	/*
34182 	 * A physical address pointer pointing to a host buffer that the
34183 	 * command's response data will be written. This can be either a host
34184 	 * physical address (HPA) or a guest physical address (GPA) and must
34185 	 * point to a physically contiguous block of memory.
34186 	 */
34187 	uint64_t	resp_addr;
34188 	uint32_t	flags;
34189 	/*
34190 	 * Enumeration denoting the RX, TX type of the resource.
34191 	 * This enumeration is used for resources that are similar for both
34192 	 * TX and RX paths of the chip.
34193 	 */
34194 	#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH	UINT32_C(0x1)
34195 	/* tx path */
34196 		#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
34197 	/* rx path */
34198 		#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
34199 		#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_LAST HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_RX
34200 	/* Queue ID of the queue. */
34201 	uint32_t	queue_id;
34202 } hwrm_queue_qcfg_input_t, *phwrm_queue_qcfg_input_t;
34203 
34204 /* hwrm_queue_qcfg_output (size:128b/16B) */
34205 
34206 typedef struct hwrm_queue_qcfg_output {
34207 	/* The specific error status for the command. */
34208 	uint16_t	error_code;
34209 	/* The HWRM command request type. */
34210 	uint16_t	req_type;
34211 	/* The sequence ID from the original command. */
34212 	uint16_t	seq_id;
34213 	/* The length of the response data in number of bytes. */
34214 	uint16_t	resp_len;
34215 	/*
34216 	 * This value is the estimate packet length used in the
34217 	 * TX arbiter.
34218 	 */
34219 	uint32_t	queue_len;
34220 	/* This value is applicable to CoS queues only. */
34221 	uint8_t	service_profile;
34222 	/* Lossy (best-effort) */
34223 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
34224 	/* Lossless */
34225 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1)
34226 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
34227 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_UNKNOWN  UINT32_C(0xff)
34228 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LAST	HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_UNKNOWN
34229 	/* Information about queue configuration. */
34230 	uint8_t	queue_cfg_info;
34231 	/*
34232 	 * If this flag is set to '1', then the queue is
34233 	 * configured asymmetrically on TX and RX sides.
34234 	 * If this flag is set to '0', then this queue is
34235 	 * configured symmetrically on TX and RX sides.
34236 	 */
34237 	#define HWRM_QUEUE_QCFG_OUTPUT_QUEUE_CFG_INFO_ASYM_CFG	UINT32_C(0x1)
34238 	uint8_t	unused_0;
34239 	/*
34240 	 * This field is used in Output records to indicate that the output
34241 	 * is completely written to RAM. This field should be read as '1'
34242 	 * to indicate that the output has been completely written. When
34243 	 * writing a command completion or response to an internal processor,
34244 	 * the order of writes has to be such that this field is written last.
34245 	 */
34246 	uint8_t	valid;
34247 } hwrm_queue_qcfg_output_t, *phwrm_queue_qcfg_output_t;
34248 
34249 /******************
34250  * hwrm_queue_cfg *
34251  ******************/
34252 
34253 
34254 /* hwrm_queue_cfg_input (size:320b/40B) */
34255 
34256 typedef struct hwrm_queue_cfg_input {
34257 	/* The HWRM command request type. */
34258 	uint16_t	req_type;
34259 	/*
34260 	 * The completion ring to send the completion event on. This should
34261 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34262 	 */
34263 	uint16_t	cmpl_ring;
34264 	/*
34265 	 * The sequence ID is used by the driver for tracking multiple
34266 	 * commands. This ID is treated as opaque data by the firmware and
34267 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34268 	 */
34269 	uint16_t	seq_id;
34270 	/*
34271 	 * The target ID of the command:
34272 	 * * 0x0-0xFFF8 - The function ID
34273 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34274 	 * * 0xFFFD - Reserved for user-space HWRM interface
34275 	 * * 0xFFFF - HWRM
34276 	 */
34277 	uint16_t	target_id;
34278 	/*
34279 	 * A physical address pointer pointing to a host buffer that the
34280 	 * command's response data will be written. This can be either a host
34281 	 * physical address (HPA) or a guest physical address (GPA) and must
34282 	 * point to a physically contiguous block of memory.
34283 	 */
34284 	uint64_t	resp_addr;
34285 	uint32_t	flags;
34286 	/*
34287 	 * Enumeration denoting the RX, TX, or both directions applicable to
34288 	 * the resource. This enumeration is used for resources that are
34289 	 * similar for both TX and RX paths of the chip.
34290 	 */
34291 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_MASK UINT32_C(0x3)
34292 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_SFT  0
34293 	/* tx path */
34294 		#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
34295 	/* rx path */
34296 		#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
34297 	/* Bi-directional (Symmetrically applicable to TX and RX paths) */
34298 		#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_BIDIR  UINT32_C(0x2)
34299 		#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_LAST  HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_BIDIR
34300 	uint32_t	enables;
34301 	/*
34302 	 * This bit must be '1' for the dflt_len field to be
34303 	 * configured.
34304 	 */
34305 	#define HWRM_QUEUE_CFG_INPUT_ENABLES_DFLT_LEN		UINT32_C(0x1)
34306 	/*
34307 	 * This bit must be '1' for the service_profile field to be
34308 	 * configured.
34309 	 */
34310 	#define HWRM_QUEUE_CFG_INPUT_ENABLES_SERVICE_PROFILE	UINT32_C(0x2)
34311 	/* Queue ID of queue that is to be configured by this function. */
34312 	uint32_t	queue_id;
34313 	/*
34314 	 * This value is a the estimate packet length used in the
34315 	 * TX arbiter.
34316 	 * Set to 0xFF... (All Fs) to not adjust this value.
34317 	 */
34318 	uint32_t	dflt_len;
34319 	/* This value is applicable to CoS queues only. */
34320 	uint8_t	service_profile;
34321 	/* Lossy (best-effort) */
34322 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LOSSY	UINT32_C(0x0)
34323 	/* Lossless */
34324 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1)
34325 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
34326 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_UNKNOWN  UINT32_C(0xff)
34327 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LAST	HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_UNKNOWN
34328 	uint8_t	unused_0[7];
34329 } hwrm_queue_cfg_input_t, *phwrm_queue_cfg_input_t;
34330 
34331 /* hwrm_queue_cfg_output (size:128b/16B) */
34332 
34333 typedef struct hwrm_queue_cfg_output {
34334 	/* The specific error status for the command. */
34335 	uint16_t	error_code;
34336 	/* The HWRM command request type. */
34337 	uint16_t	req_type;
34338 	/* The sequence ID from the original command. */
34339 	uint16_t	seq_id;
34340 	/* The length of the response data in number of bytes. */
34341 	uint16_t	resp_len;
34342 	uint8_t	unused_0[7];
34343 	/*
34344 	 * This field is used in Output records to indicate that the output
34345 	 * is completely written to RAM. This field should be read as '1'
34346 	 * to indicate that the output has been completely written. When
34347 	 * writing a command completion or response to an internal processor,
34348 	 * the order of writes has to be such that this field is written last.
34349 	 */
34350 	uint8_t	valid;
34351 } hwrm_queue_cfg_output_t, *phwrm_queue_cfg_output_t;
34352 
34353 /*****************************
34354  * hwrm_queue_pfcenable_qcfg *
34355  *****************************/
34356 
34357 
34358 /* hwrm_queue_pfcenable_qcfg_input (size:192b/24B) */
34359 
34360 typedef struct hwrm_queue_pfcenable_qcfg_input {
34361 	/* The HWRM command request type. */
34362 	uint16_t	req_type;
34363 	/*
34364 	 * The completion ring to send the completion event on. This should
34365 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34366 	 */
34367 	uint16_t	cmpl_ring;
34368 	/*
34369 	 * The sequence ID is used by the driver for tracking multiple
34370 	 * commands. This ID is treated as opaque data by the firmware and
34371 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34372 	 */
34373 	uint16_t	seq_id;
34374 	/*
34375 	 * The target ID of the command:
34376 	 * * 0x0-0xFFF8 - The function ID
34377 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34378 	 * * 0xFFFD - Reserved for user-space HWRM interface
34379 	 * * 0xFFFF - HWRM
34380 	 */
34381 	uint16_t	target_id;
34382 	/*
34383 	 * A physical address pointer pointing to a host buffer that the
34384 	 * command's response data will be written. This can be either a host
34385 	 * physical address (HPA) or a guest physical address (GPA) and must
34386 	 * point to a physically contiguous block of memory.
34387 	 */
34388 	uint64_t	resp_addr;
34389 	/*
34390 	 * Port ID of port for which the table is being configured.
34391 	 * The HWRM needs to check whether this function is allowed
34392 	 * to configure pri2cos mapping on this port.
34393 	 */
34394 	uint16_t	port_id;
34395 	uint8_t	unused_0[6];
34396 } hwrm_queue_pfcenable_qcfg_input_t, *phwrm_queue_pfcenable_qcfg_input_t;
34397 
34398 /* hwrm_queue_pfcenable_qcfg_output (size:128b/16B) */
34399 
34400 typedef struct hwrm_queue_pfcenable_qcfg_output {
34401 	/* The specific error status for the command. */
34402 	uint16_t	error_code;
34403 	/* The HWRM command request type. */
34404 	uint16_t	req_type;
34405 	/* The sequence ID from the original command. */
34406 	uint16_t	seq_id;
34407 	/* The length of the response data in number of bytes. */
34408 	uint16_t	resp_len;
34409 	uint32_t	flags;
34410 	/* If set to 1, then PFC is enabled on PRI 0. */
34411 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI0_PFC_ENABLED		UINT32_C(0x1)
34412 	/* If set to 1, then PFC is enabled on PRI 1. */
34413 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI1_PFC_ENABLED		UINT32_C(0x2)
34414 	/* If set to 1, then PFC is enabled on PRI 2. */
34415 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI2_PFC_ENABLED		UINT32_C(0x4)
34416 	/* If set to 1, then PFC is enabled on PRI 3. */
34417 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI3_PFC_ENABLED		UINT32_C(0x8)
34418 	/* If set to 1, then PFC is enabled on PRI 4. */
34419 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI4_PFC_ENABLED		UINT32_C(0x10)
34420 	/* If set to 1, then PFC is enabled on PRI 5. */
34421 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI5_PFC_ENABLED		UINT32_C(0x20)
34422 	/* If set to 1, then PFC is enabled on PRI 6. */
34423 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI6_PFC_ENABLED		UINT32_C(0x40)
34424 	/* If set to 1, then PFC is enabled on PRI 7. */
34425 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI7_PFC_ENABLED		UINT32_C(0x80)
34426 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI0. */
34427 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI0_PFC_WATCHDOG_ENABLED	UINT32_C(0x100)
34428 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI1. */
34429 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI1_PFC_WATCHDOG_ENABLED	UINT32_C(0x200)
34430 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI2. */
34431 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI2_PFC_WATCHDOG_ENABLED	UINT32_C(0x400)
34432 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI3. */
34433 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI3_PFC_WATCHDOG_ENABLED	UINT32_C(0x800)
34434 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI4. */
34435 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI4_PFC_WATCHDOG_ENABLED	UINT32_C(0x1000)
34436 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI5. */
34437 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI5_PFC_WATCHDOG_ENABLED	UINT32_C(0x2000)
34438 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI6. */
34439 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI6_PFC_WATCHDOG_ENABLED	UINT32_C(0x4000)
34440 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI7. */
34441 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI7_PFC_WATCHDOG_ENABLED	UINT32_C(0x8000)
34442 	uint8_t	unused_0[3];
34443 	/*
34444 	 * This field is used in Output records to indicate that the output
34445 	 * is completely written to RAM. This field should be read as '1'
34446 	 * to indicate that the output has been completely written. When
34447 	 * writing a command completion or response to an internal processor,
34448 	 * the order of writes has to be such that this field is written last.
34449 	 */
34450 	uint8_t	valid;
34451 } hwrm_queue_pfcenable_qcfg_output_t, *phwrm_queue_pfcenable_qcfg_output_t;
34452 
34453 /****************************
34454  * hwrm_queue_pfcenable_cfg *
34455  ****************************/
34456 
34457 
34458 /* hwrm_queue_pfcenable_cfg_input (size:192b/24B) */
34459 
34460 typedef struct hwrm_queue_pfcenable_cfg_input {
34461 	/* The HWRM command request type. */
34462 	uint16_t	req_type;
34463 	/*
34464 	 * The completion ring to send the completion event on. This should
34465 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34466 	 */
34467 	uint16_t	cmpl_ring;
34468 	/*
34469 	 * The sequence ID is used by the driver for tracking multiple
34470 	 * commands. This ID is treated as opaque data by the firmware and
34471 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34472 	 */
34473 	uint16_t	seq_id;
34474 	/*
34475 	 * The target ID of the command:
34476 	 * * 0x0-0xFFF8 - The function ID
34477 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34478 	 * * 0xFFFD - Reserved for user-space HWRM interface
34479 	 * * 0xFFFF - HWRM
34480 	 */
34481 	uint16_t	target_id;
34482 	/*
34483 	 * A physical address pointer pointing to a host buffer that the
34484 	 * command's response data will be written. This can be either a host
34485 	 * physical address (HPA) or a guest physical address (GPA) and must
34486 	 * point to a physically contiguous block of memory.
34487 	 */
34488 	uint64_t	resp_addr;
34489 	uint32_t	flags;
34490 	/* If set to 1, then PFC is requested to be enabled on PRI 0. */
34491 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI0_PFC_ENABLED		UINT32_C(0x1)
34492 	/* If set to 1, then PFC is requested to be enabled on PRI 1. */
34493 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI1_PFC_ENABLED		UINT32_C(0x2)
34494 	/* If set to 1, then PFC is requested to be enabled on PRI 2. */
34495 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI2_PFC_ENABLED		UINT32_C(0x4)
34496 	/* If set to 1, then PFC is requested to be enabled on PRI 3. */
34497 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI3_PFC_ENABLED		UINT32_C(0x8)
34498 	/* If set to 1, then PFC is requested to be enabled on PRI 4. */
34499 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI4_PFC_ENABLED		UINT32_C(0x10)
34500 	/* If set to 1, then PFC is requested to be enabled on PRI 5. */
34501 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI5_PFC_ENABLED		UINT32_C(0x20)
34502 	/* If set to 1, then PFC is requested to be enabled on PRI 6. */
34503 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI6_PFC_ENABLED		UINT32_C(0x40)
34504 	/* If set to 1, then PFC is requested to be enabled on PRI 7. */
34505 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI7_PFC_ENABLED		UINT32_C(0x80)
34506 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI0. */
34507 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI0_PFC_WATCHDOG_ENABLED	UINT32_C(0x100)
34508 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI1. */
34509 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI1_PFC_WATCHDOG_ENABLED	UINT32_C(0x200)
34510 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI2. */
34511 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI2_PFC_WATCHDOG_ENABLED	UINT32_C(0x400)
34512 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI3. */
34513 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI3_PFC_WATCHDOG_ENABLED	UINT32_C(0x800)
34514 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI4. */
34515 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI4_PFC_WATCHDOG_ENABLED	UINT32_C(0x1000)
34516 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI5. */
34517 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI5_PFC_WATCHDOG_ENABLED	UINT32_C(0x2000)
34518 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI6. */
34519 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI6_PFC_WATCHDOG_ENABLED	UINT32_C(0x4000)
34520 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI7. */
34521 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI7_PFC_WATCHDOG_ENABLED	UINT32_C(0x8000)
34522 	/*
34523 	 * Port ID of port for which the table is being configured.
34524 	 * The HWRM needs to check whether this function is allowed
34525 	 * to configure pri2cos mapping on this port.
34526 	 */
34527 	uint16_t	port_id;
34528 	uint8_t	unused_0[2];
34529 } hwrm_queue_pfcenable_cfg_input_t, *phwrm_queue_pfcenable_cfg_input_t;
34530 
34531 /* hwrm_queue_pfcenable_cfg_output (size:128b/16B) */
34532 
34533 typedef struct hwrm_queue_pfcenable_cfg_output {
34534 	/* The specific error status for the command. */
34535 	uint16_t	error_code;
34536 	/* The HWRM command request type. */
34537 	uint16_t	req_type;
34538 	/* The sequence ID from the original command. */
34539 	uint16_t	seq_id;
34540 	/* The length of the response data in number of bytes. */
34541 	uint16_t	resp_len;
34542 	uint8_t	unused_0[7];
34543 	/*
34544 	 * This field is used in Output records to indicate that the output
34545 	 * is completely written to RAM. This field should be read as '1'
34546 	 * to indicate that the output has been completely written. When
34547 	 * writing a command completion or response to an internal processor,
34548 	 * the order of writes has to be such that this field is written last.
34549 	 */
34550 	uint8_t	valid;
34551 } hwrm_queue_pfcenable_cfg_output_t, *phwrm_queue_pfcenable_cfg_output_t;
34552 
34553 /***************************
34554  * hwrm_queue_pri2cos_qcfg *
34555  ***************************/
34556 
34557 
34558 /* hwrm_queue_pri2cos_qcfg_input (size:192b/24B) */
34559 
34560 typedef struct hwrm_queue_pri2cos_qcfg_input {
34561 	/* The HWRM command request type. */
34562 	uint16_t	req_type;
34563 	/*
34564 	 * The completion ring to send the completion event on. This should
34565 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34566 	 */
34567 	uint16_t	cmpl_ring;
34568 	/*
34569 	 * The sequence ID is used by the driver for tracking multiple
34570 	 * commands. This ID is treated as opaque data by the firmware and
34571 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34572 	 */
34573 	uint16_t	seq_id;
34574 	/*
34575 	 * The target ID of the command:
34576 	 * * 0x0-0xFFF8 - The function ID
34577 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34578 	 * * 0xFFFD - Reserved for user-space HWRM interface
34579 	 * * 0xFFFF - HWRM
34580 	 */
34581 	uint16_t	target_id;
34582 	/*
34583 	 * A physical address pointer pointing to a host buffer that the
34584 	 * command's response data will be written. This can be either a host
34585 	 * physical address (HPA) or a guest physical address (GPA) and must
34586 	 * point to a physically contiguous block of memory.
34587 	 */
34588 	uint64_t	resp_addr;
34589 	uint32_t	flags;
34590 	/*
34591 	 * Enumeration denoting the RX, TX type of the resource.
34592 	 * This enumeration is used for resources that are similar for both
34593 	 * TX and RX paths of the chip.
34594 	 */
34595 	#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH	UINT32_C(0x1)
34596 	/* tx path */
34597 		#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
34598 	/* rx path */
34599 		#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
34600 		#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_LAST  HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_RX
34601 	/*
34602 	 * When this bit is set to '0', the query is
34603 	 * for PRI from tunnel headers.
34604 	 * When this bit is set to '1', the query is
34605 	 * for PRI from inner packet headers.
34606 	 */
34607 	#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_IVLAN	UINT32_C(0x2)
34608 	/*
34609 	 * Port ID of port for which the table is being configured.
34610 	 * The HWRM needs to check whether this function is allowed
34611 	 * to configure pri2cos mapping on this port.
34612 	 */
34613 	uint8_t	port_id;
34614 	uint8_t	unused_0[3];
34615 } hwrm_queue_pri2cos_qcfg_input_t, *phwrm_queue_pri2cos_qcfg_input_t;
34616 
34617 /* hwrm_queue_pri2cos_qcfg_output (size:192b/24B) */
34618 
34619 typedef struct hwrm_queue_pri2cos_qcfg_output {
34620 	/* The specific error status for the command. */
34621 	uint16_t	error_code;
34622 	/* The HWRM command request type. */
34623 	uint16_t	req_type;
34624 	/* The sequence ID from the original command. */
34625 	uint16_t	seq_id;
34626 	/* The length of the response data in number of bytes. */
34627 	uint16_t	resp_len;
34628 	/*
34629 	 * CoS Queue assigned to priority 0. This value can only
34630 	 * be changed before traffic has started.
34631 	 * A value of 0xff indicates that no CoS queue is assigned to the
34632 	 * specified priority.
34633 	 */
34634 	uint8_t	pri0_cos_queue_id;
34635 	/*
34636 	 * CoS Queue assigned to priority 1. This value can only
34637 	 * be changed before traffic has started.
34638 	 * A value of 0xff indicates that no CoS queue is assigned to the
34639 	 * specified priority.
34640 	 */
34641 	uint8_t	pri1_cos_queue_id;
34642 	/*
34643 	 * CoS Queue assigned to priority 2. This value can only
34644 	 * be changed before traffic has started.
34645 	 * A value of 0xff indicates that no CoS queue is assigned to the
34646 	 * specified priority.
34647 	 */
34648 	uint8_t	pri2_cos_queue_id;
34649 	/*
34650 	 * CoS Queue assigned to priority 3. This value can only
34651 	 * be changed before traffic has started.
34652 	 * A value of 0xff indicates that no CoS queue is assigned to the
34653 	 * specified priority.
34654 	 */
34655 	uint8_t	pri3_cos_queue_id;
34656 	/*
34657 	 * CoS Queue assigned to priority 4. This value can only
34658 	 * be changed before traffic has started.
34659 	 * A value of 0xff indicates that no CoS queue is assigned to the
34660 	 * specified priority.
34661 	 */
34662 	uint8_t	pri4_cos_queue_id;
34663 	/*
34664 	 * CoS Queue assigned to priority 5. This value can only
34665 	 * be changed before traffic has started.
34666 	 * A value of 0xff indicates that no CoS queue is assigned to the
34667 	 * specified priority.
34668 	 */
34669 	uint8_t	pri5_cos_queue_id;
34670 	/*
34671 	 * CoS Queue assigned to priority 6. This value can only
34672 	 * be changed before traffic has started.
34673 	 * A value of 0xff indicates that no CoS queue is assigned to the
34674 	 * specified priority.
34675 	 */
34676 	uint8_t	pri6_cos_queue_id;
34677 	/*
34678 	 * CoS Queue assigned to priority 7. This value can only
34679 	 * be changed before traffic has started.
34680 	 * A value of 0xff indicates that no CoS queue is assigned to the
34681 	 * specified priority.
34682 	 */
34683 	uint8_t	pri7_cos_queue_id;
34684 	/* Information about queue configuration. */
34685 	uint8_t	queue_cfg_info;
34686 	/*
34687 	 * If this flag is set to '1', then the PRI to CoS
34688 	 * configuration is asymmetric on TX and RX sides.
34689 	 * If this flag is set to '0', then PRI to CoS configuration
34690 	 * is symmetric on TX and RX sides.
34691 	 */
34692 	#define HWRM_QUEUE_PRI2COS_QCFG_OUTPUT_QUEUE_CFG_INFO_ASYM_CFG	UINT32_C(0x1)
34693 	uint8_t	unused_0[6];
34694 	/*
34695 	 * This field is used in Output records to indicate that the output
34696 	 * is completely written to RAM. This field should be read as '1'
34697 	 * to indicate that the output has been completely written. When
34698 	 * writing a command completion or response to an internal processor,
34699 	 * the order of writes has to be such that this field is written last.
34700 	 */
34701 	uint8_t	valid;
34702 } hwrm_queue_pri2cos_qcfg_output_t, *phwrm_queue_pri2cos_qcfg_output_t;
34703 
34704 /**************************
34705  * hwrm_queue_pri2cos_cfg *
34706  **************************/
34707 
34708 
34709 /* hwrm_queue_pri2cos_cfg_input (size:320b/40B) */
34710 
34711 typedef struct hwrm_queue_pri2cos_cfg_input {
34712 	/* The HWRM command request type. */
34713 	uint16_t	req_type;
34714 	/*
34715 	 * The completion ring to send the completion event on. This should
34716 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34717 	 */
34718 	uint16_t	cmpl_ring;
34719 	/*
34720 	 * The sequence ID is used by the driver for tracking multiple
34721 	 * commands. This ID is treated as opaque data by the firmware and
34722 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34723 	 */
34724 	uint16_t	seq_id;
34725 	/*
34726 	 * The target ID of the command:
34727 	 * * 0x0-0xFFF8 - The function ID
34728 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34729 	 * * 0xFFFD - Reserved for user-space HWRM interface
34730 	 * * 0xFFFF - HWRM
34731 	 */
34732 	uint16_t	target_id;
34733 	/*
34734 	 * A physical address pointer pointing to a host buffer that the
34735 	 * command's response data will be written. This can be either a host
34736 	 * physical address (HPA) or a guest physical address (GPA) and must
34737 	 * point to a physically contiguous block of memory.
34738 	 */
34739 	uint64_t	resp_addr;
34740 	uint32_t	flags;
34741 	/*
34742 	 * Enumeration denoting the RX, TX, or both directions applicable to
34743 	 * the resource. This enumeration is used for resources that are
34744 	 * similar for both TX and RX paths of the chip.
34745 	 */
34746 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_MASK UINT32_C(0x3)
34747 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_SFT  0
34748 	/* tx path */
34749 		#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
34750 	/* rx path */
34751 		#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
34752 	/* Bi-directional (Symmetrically applicable to TX and RX paths) */
34753 		#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_BIDIR  UINT32_C(0x2)
34754 		#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_LAST  HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_BIDIR
34755 	/*
34756 	 * When this bit is set to '0', the mapping is requested
34757 	 * for PRI from tunnel headers.
34758 	 * When this bit is set to '1', the mapping is requested
34759 	 * for PRI from inner packet headers.
34760 	 */
34761 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_IVLAN	UINT32_C(0x4)
34762 	uint32_t	enables;
34763 	/*
34764 	 * This bit must be '1' for the pri0_cos_queue_id field to be
34765 	 * configured.
34766 	 */
34767 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI0_COS_QUEUE_ID	UINT32_C(0x1)
34768 	/*
34769 	 * This bit must be '1' for the pri1_cos_queue_id field to be
34770 	 * configured.
34771 	 */
34772 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI1_COS_QUEUE_ID	UINT32_C(0x2)
34773 	/*
34774 	 * This bit must be '1' for the pri2_cos_queue_id field to be
34775 	 * configured.
34776 	 */
34777 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI2_COS_QUEUE_ID	UINT32_C(0x4)
34778 	/*
34779 	 * This bit must be '1' for the pri3_cos_queue_id field to be
34780 	 * configured.
34781 	 */
34782 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI3_COS_QUEUE_ID	UINT32_C(0x8)
34783 	/*
34784 	 * This bit must be '1' for the pri4_cos_queue_id field to be
34785 	 * configured.
34786 	 */
34787 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI4_COS_QUEUE_ID	UINT32_C(0x10)
34788 	/*
34789 	 * This bit must be '1' for the pri5_cos_queue_id field to be
34790 	 * configured.
34791 	 */
34792 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI5_COS_QUEUE_ID	UINT32_C(0x20)
34793 	/*
34794 	 * This bit must be '1' for the pri6_cos_queue_id field to be
34795 	 * configured.
34796 	 */
34797 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI6_COS_QUEUE_ID	UINT32_C(0x40)
34798 	/*
34799 	 * This bit must be '1' for the pri7_cos_queue_id field to be
34800 	 * configured.
34801 	 */
34802 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI7_COS_QUEUE_ID	UINT32_C(0x80)
34803 	/*
34804 	 * Port ID of port for which the table is being configured.
34805 	 * The HWRM needs to check whether this function is allowed
34806 	 * to configure pri2cos mapping on this port.
34807 	 */
34808 	uint8_t	port_id;
34809 	/*
34810 	 * CoS Queue assigned to priority 0. This value can only
34811 	 * be changed before traffic has started.
34812 	 */
34813 	uint8_t	pri0_cos_queue_id;
34814 	/*
34815 	 * CoS Queue assigned to priority 1. This value can only
34816 	 * be changed before traffic has started.
34817 	 */
34818 	uint8_t	pri1_cos_queue_id;
34819 	/*
34820 	 * CoS Queue assigned to priority 2. This value can only
34821 	 * be changed before traffic has started.
34822 	 */
34823 	uint8_t	pri2_cos_queue_id;
34824 	/*
34825 	 * CoS Queue assigned to priority 3. This value can only
34826 	 * be changed before traffic has started.
34827 	 */
34828 	uint8_t	pri3_cos_queue_id;
34829 	/*
34830 	 * CoS Queue assigned to priority 4. This value can only
34831 	 * be changed before traffic has started.
34832 	 */
34833 	uint8_t	pri4_cos_queue_id;
34834 	/*
34835 	 * CoS Queue assigned to priority 5. This value can only
34836 	 * be changed before traffic has started.
34837 	 */
34838 	uint8_t	pri5_cos_queue_id;
34839 	/*
34840 	 * CoS Queue assigned to priority 6. This value can only
34841 	 * be changed before traffic has started.
34842 	 */
34843 	uint8_t	pri6_cos_queue_id;
34844 	/*
34845 	 * CoS Queue assigned to priority 7. This value can only
34846 	 * be changed before traffic has started.
34847 	 */
34848 	uint8_t	pri7_cos_queue_id;
34849 	uint8_t	unused_0[7];
34850 } hwrm_queue_pri2cos_cfg_input_t, *phwrm_queue_pri2cos_cfg_input_t;
34851 
34852 /* hwrm_queue_pri2cos_cfg_output (size:128b/16B) */
34853 
34854 typedef struct hwrm_queue_pri2cos_cfg_output {
34855 	/* The specific error status for the command. */
34856 	uint16_t	error_code;
34857 	/* The HWRM command request type. */
34858 	uint16_t	req_type;
34859 	/* The sequence ID from the original command. */
34860 	uint16_t	seq_id;
34861 	/* The length of the response data in number of bytes. */
34862 	uint16_t	resp_len;
34863 	uint8_t	unused_0[7];
34864 	/*
34865 	 * This field is used in Output records to indicate that the output
34866 	 * is completely written to RAM. This field should be read as '1'
34867 	 * to indicate that the output has been completely written. When
34868 	 * writing a command completion or response to an internal processor,
34869 	 * the order of writes has to be such that this field is written last.
34870 	 */
34871 	uint8_t	valid;
34872 } hwrm_queue_pri2cos_cfg_output_t, *phwrm_queue_pri2cos_cfg_output_t;
34873 
34874 /**************************
34875  * hwrm_queue_cos2bw_qcfg *
34876  **************************/
34877 
34878 
34879 /* hwrm_queue_cos2bw_qcfg_input (size:192b/24B) */
34880 
34881 typedef struct hwrm_queue_cos2bw_qcfg_input {
34882 	/* The HWRM command request type. */
34883 	uint16_t	req_type;
34884 	/*
34885 	 * The completion ring to send the completion event on. This should
34886 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34887 	 */
34888 	uint16_t	cmpl_ring;
34889 	/*
34890 	 * The sequence ID is used by the driver for tracking multiple
34891 	 * commands. This ID is treated as opaque data by the firmware and
34892 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34893 	 */
34894 	uint16_t	seq_id;
34895 	/*
34896 	 * The target ID of the command:
34897 	 * * 0x0-0xFFF8 - The function ID
34898 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34899 	 * * 0xFFFD - Reserved for user-space HWRM interface
34900 	 * * 0xFFFF - HWRM
34901 	 */
34902 	uint16_t	target_id;
34903 	/*
34904 	 * A physical address pointer pointing to a host buffer that the
34905 	 * command's response data will be written. This can be either a host
34906 	 * physical address (HPA) or a guest physical address (GPA) and must
34907 	 * point to a physically contiguous block of memory.
34908 	 */
34909 	uint64_t	resp_addr;
34910 	/*
34911 	 * Port ID of port for which the table is being configured.
34912 	 * The HWRM needs to check whether this function is allowed
34913 	 * to configure TC BW assignment on this port.
34914 	 */
34915 	uint16_t	port_id;
34916 	uint8_t	unused_0[6];
34917 } hwrm_queue_cos2bw_qcfg_input_t, *phwrm_queue_cos2bw_qcfg_input_t;
34918 
34919 /* hwrm_queue_cos2bw_qcfg_output (size:896b/112B) */
34920 
34921 typedef struct hwrm_queue_cos2bw_qcfg_output {
34922 	/* The specific error status for the command. */
34923 	uint16_t	error_code;
34924 	/* The HWRM command request type. */
34925 	uint16_t	req_type;
34926 	/* The sequence ID from the original command. */
34927 	uint16_t	seq_id;
34928 	/* The length of the response data in number of bytes. */
34929 	uint16_t	resp_len;
34930 	/* ID of CoS Queue 0. */
34931 	uint8_t	queue_id0;
34932 	uint8_t	unused_0;
34933 	uint16_t	unused_1;
34934 	/*
34935 	 * Minimum BW allocated to CoS Queue.
34936 	 * The HWRM will translate this value into byte counter and
34937 	 * time interval used for this COS inside the device.
34938 	 */
34939 	uint32_t	queue_id0_min_bw;
34940 	/* The bandwidth value. */
34941 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
34942 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_SFT		0
34943 	/* The granularity of the value (bits or bytes). */
34944 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE			UINT32_C(0x10000000)
34945 	/* Value is in bits. */
34946 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
34947 	/* Value is in bytes. */
34948 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
34949 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES
34950 	/* bw_value_unit is 3 b */
34951 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
34952 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_SFT	29
34953 	/* Value is in Mb or MB (base 10). */
34954 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
34955 	/* Value is in Kb or KB (base 10). */
34956 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
34957 	/* Value is in bits or bytes. */
34958 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
34959 	/* Value is in Gb or GB (base 10). */
34960 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
34961 	/* Value is in 1/100th of a percentage of total bandwidth. */
34962 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
34963 	/* Invalid unit */
34964 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
34965 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID
34966 	/*
34967 	 * Maximum BW allocated to CoS Queue.
34968 	 * The HWRM will translate this value into byte counter and
34969 	 * time interval used for this COS inside the device.
34970 	 */
34971 	uint32_t	queue_id0_max_bw;
34972 	/* The bandwidth value. */
34973 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
34974 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_SFT		0
34975 	/* The granularity of the value (bits or bytes). */
34976 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE			UINT32_C(0x10000000)
34977 	/* Value is in bits. */
34978 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
34979 	/* Value is in bytes. */
34980 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
34981 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES
34982 	/* bw_value_unit is 3 b */
34983 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
34984 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_SFT	29
34985 	/* Value is in Mb or MB (base 10). */
34986 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
34987 	/* Value is in Kb or KB (base 10). */
34988 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
34989 	/* Value is in bits or bytes. */
34990 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
34991 	/* Value is in Gb or GB (base 10). */
34992 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
34993 	/* Value is in 1/100th of a percentage of total bandwidth. */
34994 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
34995 	/* Invalid unit */
34996 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
34997 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID
34998 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
34999 	uint8_t	queue_id0_tsa_assign;
35000 	/* Strict Priority */
35001 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_SP		UINT32_C(0x0)
35002 	/* Enhanced Transmission Selection */
35003 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_ETS		UINT32_C(0x1)
35004 	/* reserved. */
35005 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35006 	/* reserved. */
35007 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35008 	/*
35009 	 * Priority level for strict priority. Valid only when the
35010 	 * tsa_assign is 0 - Strict Priority (SP)
35011 	 * 0..7 - Valid values.
35012 	 * 8..255 - Reserved.
35013 	 */
35014 	uint8_t	queue_id0_pri_lvl;
35015 	/*
35016 	 * Weight used to allocate remaining BW for this COS after
35017 	 * servicing guaranteed bandwidths for all COS.
35018 	 */
35019 	uint8_t	queue_id0_bw_weight;
35020 	/* ID of CoS Queue 1. */
35021 	uint8_t	queue_id1;
35022 	/*
35023 	 * Minimum BW allocated to CoS Queue.
35024 	 * The HWRM will translate this value into byte counter and
35025 	 * time interval used for this COS inside the device.
35026 	 */
35027 	uint32_t	queue_id1_min_bw;
35028 	/* The bandwidth value. */
35029 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35030 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_SFT		0
35031 	/* The granularity of the value (bits or bytes). */
35032 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE			UINT32_C(0x10000000)
35033 	/* Value is in bits. */
35034 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35035 	/* Value is in bytes. */
35036 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35037 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES
35038 	/* bw_value_unit is 3 b */
35039 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35040 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_SFT	29
35041 	/* Value is in Mb or MB (base 10). */
35042 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35043 	/* Value is in Kb or KB (base 10). */
35044 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35045 	/* Value is in bits or bytes. */
35046 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35047 	/* Value is in Gb or GB (base 10). */
35048 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35049 	/* Value is in 1/100th of a percentage of total bandwidth. */
35050 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35051 	/* Invalid unit */
35052 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35053 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID
35054 	/*
35055 	 * Maximum BW allocated to CoS queue.
35056 	 * The HWRM will translate this value into byte counter and
35057 	 * time interval used for this COS inside the device.
35058 	 */
35059 	uint32_t	queue_id1_max_bw;
35060 	/* The bandwidth value. */
35061 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35062 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_SFT		0
35063 	/* The granularity of the value (bits or bytes). */
35064 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE			UINT32_C(0x10000000)
35065 	/* Value is in bits. */
35066 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35067 	/* Value is in bytes. */
35068 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35069 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES
35070 	/* bw_value_unit is 3 b */
35071 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35072 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_SFT	29
35073 	/* Value is in Mb or MB (base 10). */
35074 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35075 	/* Value is in Kb or KB (base 10). */
35076 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35077 	/* Value is in bits or bytes. */
35078 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35079 	/* Value is in Gb or GB (base 10). */
35080 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35081 	/* Value is in 1/100th of a percentage of total bandwidth. */
35082 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35083 	/* Invalid unit */
35084 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35085 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID
35086 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35087 	uint8_t	queue_id1_tsa_assign;
35088 	/* Strict Priority */
35089 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_SP		UINT32_C(0x0)
35090 	/* Enhanced Transmission Selection */
35091 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_ETS		UINT32_C(0x1)
35092 	/* reserved. */
35093 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35094 	/* reserved. */
35095 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35096 	/*
35097 	 * Priority level for strict priority. Valid only when the
35098 	 * tsa_assign is 0 - Strict Priority (SP)
35099 	 * 0..7 - Valid values.
35100 	 * 8..255 - Reserved.
35101 	 */
35102 	uint8_t	queue_id1_pri_lvl;
35103 	/*
35104 	 * Weight used to allocate remaining BW for this COS after
35105 	 * servicing guaranteed bandwidths for all COS.
35106 	 */
35107 	uint8_t	queue_id1_bw_weight;
35108 	/* ID of CoS Queue 2. */
35109 	uint8_t	queue_id2;
35110 	/*
35111 	 * Minimum BW allocated to CoS Queue.
35112 	 * The HWRM will translate this value into byte counter and
35113 	 * time interval used for this COS inside the device.
35114 	 */
35115 	uint32_t	queue_id2_min_bw;
35116 	/* The bandwidth value. */
35117 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35118 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_SFT		0
35119 	/* The granularity of the value (bits or bytes). */
35120 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE			UINT32_C(0x10000000)
35121 	/* Value is in bits. */
35122 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35123 	/* Value is in bytes. */
35124 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35125 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES
35126 	/* bw_value_unit is 3 b */
35127 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35128 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_SFT	29
35129 	/* Value is in Mb or MB (base 10). */
35130 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35131 	/* Value is in Kb or KB (base 10). */
35132 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35133 	/* Value is in bits or bytes. */
35134 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35135 	/* Value is in Gb or GB (base 10). */
35136 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35137 	/* Value is in 1/100th of a percentage of total bandwidth. */
35138 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35139 	/* Invalid unit */
35140 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35141 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID
35142 	/*
35143 	 * Maximum BW allocated to CoS queue.
35144 	 * The HWRM will translate this value into byte counter and
35145 	 * time interval used for this COS inside the device.
35146 	 */
35147 	uint32_t	queue_id2_max_bw;
35148 	/* The bandwidth value. */
35149 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35150 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_SFT		0
35151 	/* The granularity of the value (bits or bytes). */
35152 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE			UINT32_C(0x10000000)
35153 	/* Value is in bits. */
35154 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35155 	/* Value is in bytes. */
35156 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35157 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES
35158 	/* bw_value_unit is 3 b */
35159 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35160 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_SFT	29
35161 	/* Value is in Mb or MB (base 10). */
35162 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35163 	/* Value is in Kb or KB (base 10). */
35164 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35165 	/* Value is in bits or bytes. */
35166 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35167 	/* Value is in Gb or GB (base 10). */
35168 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35169 	/* Value is in 1/100th of a percentage of total bandwidth. */
35170 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35171 	/* Invalid unit */
35172 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35173 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID
35174 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35175 	uint8_t	queue_id2_tsa_assign;
35176 	/* Strict Priority */
35177 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_SP		UINT32_C(0x0)
35178 	/* Enhanced Transmission Selection */
35179 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_ETS		UINT32_C(0x1)
35180 	/* reserved. */
35181 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35182 	/* reserved. */
35183 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35184 	/*
35185 	 * Priority level for strict priority. Valid only when the
35186 	 * tsa_assign is 0 - Strict Priority (SP)
35187 	 * 0..7 - Valid values.
35188 	 * 8..255 - Reserved.
35189 	 */
35190 	uint8_t	queue_id2_pri_lvl;
35191 	/*
35192 	 * Weight used to allocate remaining BW for this COS after
35193 	 * servicing guaranteed bandwidths for all COS.
35194 	 */
35195 	uint8_t	queue_id2_bw_weight;
35196 	/* ID of CoS Queue 3. */
35197 	uint8_t	queue_id3;
35198 	/*
35199 	 * Minimum BW allocated to CoS Queue.
35200 	 * The HWRM will translate this value into byte counter and
35201 	 * time interval used for this COS inside the device.
35202 	 */
35203 	uint32_t	queue_id3_min_bw;
35204 	/* The bandwidth value. */
35205 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35206 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_SFT		0
35207 	/* The granularity of the value (bits or bytes). */
35208 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE			UINT32_C(0x10000000)
35209 	/* Value is in bits. */
35210 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35211 	/* Value is in bytes. */
35212 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35213 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES
35214 	/* bw_value_unit is 3 b */
35215 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35216 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_SFT	29
35217 	/* Value is in Mb or MB (base 10). */
35218 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35219 	/* Value is in Kb or KB (base 10). */
35220 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35221 	/* Value is in bits or bytes. */
35222 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35223 	/* Value is in Gb or GB (base 10). */
35224 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35225 	/* Value is in 1/100th of a percentage of total bandwidth. */
35226 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35227 	/* Invalid unit */
35228 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35229 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID
35230 	/*
35231 	 * Maximum BW allocated to CoS queue.
35232 	 * The HWRM will translate this value into byte counter and
35233 	 * time interval used for this COS inside the device.
35234 	 */
35235 	uint32_t	queue_id3_max_bw;
35236 	/* The bandwidth value. */
35237 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35238 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_SFT		0
35239 	/* The granularity of the value (bits or bytes). */
35240 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE			UINT32_C(0x10000000)
35241 	/* Value is in bits. */
35242 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35243 	/* Value is in bytes. */
35244 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35245 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES
35246 	/* bw_value_unit is 3 b */
35247 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35248 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_SFT	29
35249 	/* Value is in Mb or MB (base 10). */
35250 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35251 	/* Value is in Kb or KB (base 10). */
35252 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35253 	/* Value is in bits or bytes. */
35254 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35255 	/* Value is in Gb or GB (base 10). */
35256 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35257 	/* Value is in 1/100th of a percentage of total bandwidth. */
35258 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35259 	/* Invalid unit */
35260 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35261 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID
35262 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35263 	uint8_t	queue_id3_tsa_assign;
35264 	/* Strict Priority */
35265 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_SP		UINT32_C(0x0)
35266 	/* Enhanced Transmission Selection */
35267 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_ETS		UINT32_C(0x1)
35268 	/* reserved. */
35269 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35270 	/* reserved. */
35271 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35272 	/*
35273 	 * Priority level for strict priority. Valid only when the
35274 	 * tsa_assign is 0 - Strict Priority (SP)
35275 	 * 0..7 - Valid values.
35276 	 * 8..255 - Reserved.
35277 	 */
35278 	uint8_t	queue_id3_pri_lvl;
35279 	/*
35280 	 * Weight used to allocate remaining BW for this COS after
35281 	 * servicing guaranteed bandwidths for all COS.
35282 	 */
35283 	uint8_t	queue_id3_bw_weight;
35284 	/* ID of CoS Queue 4. */
35285 	uint8_t	queue_id4;
35286 	/*
35287 	 * Minimum BW allocated to CoS Queue.
35288 	 * The HWRM will translate this value into byte counter and
35289 	 * time interval used for this COS inside the device.
35290 	 */
35291 	uint32_t	queue_id4_min_bw;
35292 	/* The bandwidth value. */
35293 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35294 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_SFT		0
35295 	/* The granularity of the value (bits or bytes). */
35296 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE			UINT32_C(0x10000000)
35297 	/* Value is in bits. */
35298 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35299 	/* Value is in bytes. */
35300 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35301 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES
35302 	/* bw_value_unit is 3 b */
35303 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35304 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_SFT	29
35305 	/* Value is in Mb or MB (base 10). */
35306 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35307 	/* Value is in Kb or KB (base 10). */
35308 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35309 	/* Value is in bits or bytes. */
35310 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35311 	/* Value is in Gb or GB (base 10). */
35312 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35313 	/* Value is in 1/100th of a percentage of total bandwidth. */
35314 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35315 	/* Invalid unit */
35316 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35317 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID
35318 	/*
35319 	 * Maximum BW allocated to CoS queue.
35320 	 * The HWRM will translate this value into byte counter and
35321 	 * time interval used for this COS inside the device.
35322 	 */
35323 	uint32_t	queue_id4_max_bw;
35324 	/* The bandwidth value. */
35325 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35326 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_SFT		0
35327 	/* The granularity of the value (bits or bytes). */
35328 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE			UINT32_C(0x10000000)
35329 	/* Value is in bits. */
35330 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35331 	/* Value is in bytes. */
35332 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35333 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES
35334 	/* bw_value_unit is 3 b */
35335 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35336 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_SFT	29
35337 	/* Value is in Mb or MB (base 10). */
35338 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35339 	/* Value is in Kb or KB (base 10). */
35340 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35341 	/* Value is in bits or bytes. */
35342 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35343 	/* Value is in Gb or GB (base 10). */
35344 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35345 	/* Value is in 1/100th of a percentage of total bandwidth. */
35346 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35347 	/* Invalid unit */
35348 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35349 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID
35350 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35351 	uint8_t	queue_id4_tsa_assign;
35352 	/* Strict Priority */
35353 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_SP		UINT32_C(0x0)
35354 	/* Enhanced Transmission Selection */
35355 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_ETS		UINT32_C(0x1)
35356 	/* reserved. */
35357 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35358 	/* reserved. */
35359 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35360 	/*
35361 	 * Priority level for strict priority. Valid only when the
35362 	 * tsa_assign is 0 - Strict Priority (SP)
35363 	 * 0..7 - Valid values.
35364 	 * 8..255 - Reserved.
35365 	 */
35366 	uint8_t	queue_id4_pri_lvl;
35367 	/*
35368 	 * Weight used to allocate remaining BW for this COS after
35369 	 * servicing guaranteed bandwidths for all COS.
35370 	 */
35371 	uint8_t	queue_id4_bw_weight;
35372 	/* ID of CoS Queue 5. */
35373 	uint8_t	queue_id5;
35374 	/*
35375 	 * Minimum BW allocated to CoS Queue.
35376 	 * The HWRM will translate this value into byte counter and
35377 	 * time interval used for this COS inside the device.
35378 	 */
35379 	uint32_t	queue_id5_min_bw;
35380 	/* The bandwidth value. */
35381 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35382 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_SFT		0
35383 	/* The granularity of the value (bits or bytes). */
35384 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE			UINT32_C(0x10000000)
35385 	/* Value is in bits. */
35386 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35387 	/* Value is in bytes. */
35388 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35389 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES
35390 	/* bw_value_unit is 3 b */
35391 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35392 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_SFT	29
35393 	/* Value is in Mb or MB (base 10). */
35394 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35395 	/* Value is in Kb or KB (base 10). */
35396 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35397 	/* Value is in bits or bytes. */
35398 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35399 	/* Value is in Gb or GB (base 10). */
35400 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35401 	/* Value is in 1/100th of a percentage of total bandwidth. */
35402 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35403 	/* Invalid unit */
35404 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35405 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID
35406 	/*
35407 	 * Maximum BW allocated to CoS queue.
35408 	 * The HWRM will translate this value into byte counter and
35409 	 * time interval used for this COS inside the device.
35410 	 */
35411 	uint32_t	queue_id5_max_bw;
35412 	/* The bandwidth value. */
35413 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35414 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_SFT		0
35415 	/* The granularity of the value (bits or bytes). */
35416 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE			UINT32_C(0x10000000)
35417 	/* Value is in bits. */
35418 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35419 	/* Value is in bytes. */
35420 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35421 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES
35422 	/* bw_value_unit is 3 b */
35423 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35424 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_SFT	29
35425 	/* Value is in Mb or MB (base 10). */
35426 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35427 	/* Value is in Kb or KB (base 10). */
35428 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35429 	/* Value is in bits or bytes. */
35430 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35431 	/* Value is in Gb or GB (base 10). */
35432 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35433 	/* Value is in 1/100th of a percentage of total bandwidth. */
35434 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35435 	/* Invalid unit */
35436 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35437 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID
35438 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35439 	uint8_t	queue_id5_tsa_assign;
35440 	/* Strict Priority */
35441 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_SP		UINT32_C(0x0)
35442 	/* Enhanced Transmission Selection */
35443 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_ETS		UINT32_C(0x1)
35444 	/* reserved. */
35445 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35446 	/* reserved. */
35447 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35448 	/*
35449 	 * Priority level for strict priority. Valid only when the
35450 	 * tsa_assign is 0 - Strict Priority (SP)
35451 	 * 0..7 - Valid values.
35452 	 * 8..255 - Reserved.
35453 	 */
35454 	uint8_t	queue_id5_pri_lvl;
35455 	/*
35456 	 * Weight used to allocate remaining BW for this COS after
35457 	 * servicing guaranteed bandwidths for all COS.
35458 	 */
35459 	uint8_t	queue_id5_bw_weight;
35460 	/* ID of CoS Queue 6. */
35461 	uint8_t	queue_id6;
35462 	/*
35463 	 * Minimum BW allocated to CoS Queue.
35464 	 * The HWRM will translate this value into byte counter and
35465 	 * time interval used for this COS inside the device.
35466 	 */
35467 	uint32_t	queue_id6_min_bw;
35468 	/* The bandwidth value. */
35469 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35470 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_SFT		0
35471 	/* The granularity of the value (bits or bytes). */
35472 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE			UINT32_C(0x10000000)
35473 	/* Value is in bits. */
35474 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35475 	/* Value is in bytes. */
35476 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35477 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES
35478 	/* bw_value_unit is 3 b */
35479 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35480 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_SFT	29
35481 	/* Value is in Mb or MB (base 10). */
35482 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35483 	/* Value is in Kb or KB (base 10). */
35484 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35485 	/* Value is in bits or bytes. */
35486 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35487 	/* Value is in Gb or GB (base 10). */
35488 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35489 	/* Value is in 1/100th of a percentage of total bandwidth. */
35490 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35491 	/* Invalid unit */
35492 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35493 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID
35494 	/*
35495 	 * Maximum BW allocated to CoS queue.
35496 	 * The HWRM will translate this value into byte counter and
35497 	 * time interval used for this COS inside the device.
35498 	 */
35499 	uint32_t	queue_id6_max_bw;
35500 	/* The bandwidth value. */
35501 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35502 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_SFT		0
35503 	/* The granularity of the value (bits or bytes). */
35504 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE			UINT32_C(0x10000000)
35505 	/* Value is in bits. */
35506 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35507 	/* Value is in bytes. */
35508 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35509 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES
35510 	/* bw_value_unit is 3 b */
35511 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35512 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_SFT	29
35513 	/* Value is in Mb or MB (base 10). */
35514 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35515 	/* Value is in Kb or KB (base 10). */
35516 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35517 	/* Value is in bits or bytes. */
35518 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35519 	/* Value is in Gb or GB (base 10). */
35520 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35521 	/* Value is in 1/100th of a percentage of total bandwidth. */
35522 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35523 	/* Invalid unit */
35524 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35525 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID
35526 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35527 	uint8_t	queue_id6_tsa_assign;
35528 	/* Strict Priority */
35529 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_SP		UINT32_C(0x0)
35530 	/* Enhanced Transmission Selection */
35531 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_ETS		UINT32_C(0x1)
35532 	/* reserved. */
35533 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35534 	/* reserved. */
35535 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35536 	/*
35537 	 * Priority level for strict priority. Valid only when the
35538 	 * tsa_assign is 0 - Strict Priority (SP)
35539 	 * 0..7 - Valid values.
35540 	 * 8..255 - Reserved.
35541 	 */
35542 	uint8_t	queue_id6_pri_lvl;
35543 	/*
35544 	 * Weight used to allocate remaining BW for this COS after
35545 	 * servicing guaranteed bandwidths for all COS.
35546 	 */
35547 	uint8_t	queue_id6_bw_weight;
35548 	/* ID of CoS Queue 7. */
35549 	uint8_t	queue_id7;
35550 	/*
35551 	 * Minimum BW allocated to CoS Queue.
35552 	 * The HWRM will translate this value into byte counter and
35553 	 * time interval used for this COS inside the device.
35554 	 */
35555 	uint32_t	queue_id7_min_bw;
35556 	/* The bandwidth value. */
35557 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35558 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_SFT		0
35559 	/* The granularity of the value (bits or bytes). */
35560 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE			UINT32_C(0x10000000)
35561 	/* Value is in bits. */
35562 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35563 	/* Value is in bytes. */
35564 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35565 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES
35566 	/* bw_value_unit is 3 b */
35567 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35568 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_SFT	29
35569 	/* Value is in Mb or MB (base 10). */
35570 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35571 	/* Value is in Kb or KB (base 10). */
35572 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35573 	/* Value is in bits or bytes. */
35574 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35575 	/* Value is in Gb or GB (base 10). */
35576 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35577 	/* Value is in 1/100th of a percentage of total bandwidth. */
35578 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35579 	/* Invalid unit */
35580 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35581 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID
35582 	/*
35583 	 * Maximum BW allocated to CoS queue.
35584 	 * The HWRM will translate this value into byte counter and
35585 	 * time interval used for this COS inside the device.
35586 	 */
35587 	uint32_t	queue_id7_max_bw;
35588 	/* The bandwidth value. */
35589 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35590 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_SFT		0
35591 	/* The granularity of the value (bits or bytes). */
35592 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE			UINT32_C(0x10000000)
35593 	/* Value is in bits. */
35594 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35595 	/* Value is in bytes. */
35596 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35597 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES
35598 	/* bw_value_unit is 3 b */
35599 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35600 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_SFT	29
35601 	/* Value is in Mb or MB (base 10). */
35602 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35603 	/* Value is in Kb or KB (base 10). */
35604 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35605 	/* Value is in bits or bytes. */
35606 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35607 	/* Value is in Gb or GB (base 10). */
35608 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35609 	/* Value is in 1/100th of a percentage of total bandwidth. */
35610 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35611 	/* Invalid unit */
35612 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35613 		#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID
35614 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35615 	uint8_t	queue_id7_tsa_assign;
35616 	/* Strict Priority */
35617 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_SP		UINT32_C(0x0)
35618 	/* Enhanced Transmission Selection */
35619 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_ETS		UINT32_C(0x1)
35620 	/* reserved. */
35621 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35622 	/* reserved. */
35623 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35624 	/*
35625 	 * Priority level for strict priority. Valid only when the
35626 	 * tsa_assign is 0 - Strict Priority (SP)
35627 	 * 0..7 - Valid values.
35628 	 * 8..255 - Reserved.
35629 	 */
35630 	uint8_t	queue_id7_pri_lvl;
35631 	/*
35632 	 * Weight used to allocate remaining BW for this COS after
35633 	 * servicing guaranteed bandwidths for all COS.
35634 	 */
35635 	uint8_t	queue_id7_bw_weight;
35636 	uint8_t	unused_2[4];
35637 	/*
35638 	 * This field is used in Output records to indicate that the output
35639 	 * is completely written to RAM. This field should be read as '1'
35640 	 * to indicate that the output has been completely written. When
35641 	 * writing a command completion or response to an internal processor,
35642 	 * the order of writes has to be such that this field is written last.
35643 	 */
35644 	uint8_t	valid;
35645 } hwrm_queue_cos2bw_qcfg_output_t, *phwrm_queue_cos2bw_qcfg_output_t;
35646 
35647 /*************************
35648  * hwrm_queue_cos2bw_cfg *
35649  *************************/
35650 
35651 
35652 /* hwrm_queue_cos2bw_cfg_input (size:1024b/128B) */
35653 
35654 typedef struct hwrm_queue_cos2bw_cfg_input {
35655 	/* The HWRM command request type. */
35656 	uint16_t	req_type;
35657 	/*
35658 	 * The completion ring to send the completion event on. This should
35659 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35660 	 */
35661 	uint16_t	cmpl_ring;
35662 	/*
35663 	 * The sequence ID is used by the driver for tracking multiple
35664 	 * commands. This ID is treated as opaque data by the firmware and
35665 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35666 	 */
35667 	uint16_t	seq_id;
35668 	/*
35669 	 * The target ID of the command:
35670 	 * * 0x0-0xFFF8 - The function ID
35671 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35672 	 * * 0xFFFD - Reserved for user-space HWRM interface
35673 	 * * 0xFFFF - HWRM
35674 	 */
35675 	uint16_t	target_id;
35676 	/*
35677 	 * A physical address pointer pointing to a host buffer that the
35678 	 * command's response data will be written. This can be either a host
35679 	 * physical address (HPA) or a guest physical address (GPA) and must
35680 	 * point to a physically contiguous block of memory.
35681 	 */
35682 	uint64_t	resp_addr;
35683 	uint32_t	flags;
35684 	uint32_t	enables;
35685 	/*
35686 	 * If this bit is set to 1, then all queue_id0 related
35687 	 * parameters in this command are valid.
35688 	 */
35689 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID0_VALID	UINT32_C(0x1)
35690 	/*
35691 	 * If this bit is set to 1, then all queue_id1 related
35692 	 * parameters in this command are valid.
35693 	 */
35694 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID1_VALID	UINT32_C(0x2)
35695 	/*
35696 	 * If this bit is set to 1, then all queue_id2 related
35697 	 * parameters in this command are valid.
35698 	 */
35699 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID2_VALID	UINT32_C(0x4)
35700 	/*
35701 	 * If this bit is set to 1, then all queue_id3 related
35702 	 * parameters in this command are valid.
35703 	 */
35704 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID3_VALID	UINT32_C(0x8)
35705 	/*
35706 	 * If this bit is set to 1, then all queue_id4 related
35707 	 * parameters in this command are valid.
35708 	 */
35709 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID4_VALID	UINT32_C(0x10)
35710 	/*
35711 	 * If this bit is set to 1, then all queue_id5 related
35712 	 * parameters in this command are valid.
35713 	 */
35714 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID5_VALID	UINT32_C(0x20)
35715 	/*
35716 	 * If this bit is set to 1, then all queue_id6 related
35717 	 * parameters in this command are valid.
35718 	 */
35719 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID6_VALID	UINT32_C(0x40)
35720 	/*
35721 	 * If this bit is set to 1, then all queue_id7 related
35722 	 * parameters in this command are valid.
35723 	 */
35724 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID7_VALID	UINT32_C(0x80)
35725 	/*
35726 	 * Port ID of port for which the table is being configured.
35727 	 * The HWRM needs to check whether this function is allowed
35728 	 * to configure TC BW assignment on this port.
35729 	 */
35730 	uint16_t	port_id;
35731 	/* ID of CoS Queue 0. */
35732 	uint8_t	queue_id0;
35733 	uint8_t	unused_0;
35734 	/*
35735 	 * Minimum BW allocated to CoS Queue.
35736 	 * The HWRM will translate this value into byte counter and
35737 	 * time interval used for this COS inside the device.
35738 	 */
35739 	uint32_t	queue_id0_min_bw;
35740 	/* The bandwidth value. */
35741 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35742 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_SFT		0
35743 	/* The granularity of the value (bits or bytes). */
35744 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE			UINT32_C(0x10000000)
35745 	/* Value is in bits. */
35746 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35747 	/* Value is in bytes. */
35748 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35749 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES
35750 	/* bw_value_unit is 3 b */
35751 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35752 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_SFT	29
35753 	/* Value is in Mb or MB (base 10). */
35754 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35755 	/* Value is in Kb or KB (base 10). */
35756 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35757 	/* Value is in bits or bytes. */
35758 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35759 	/* Value is in Gb or GB (base 10). */
35760 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35761 	/* Value is in 1/100th of a percentage of total bandwidth. */
35762 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35763 	/* Invalid unit */
35764 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35765 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID
35766 	/*
35767 	 * Maximum BW allocated to CoS Queue.
35768 	 * The HWRM will translate this value into byte counter and
35769 	 * time interval used for this COS inside the device.
35770 	 */
35771 	uint32_t	queue_id0_max_bw;
35772 	/* The bandwidth value. */
35773 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35774 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_SFT		0
35775 	/* The granularity of the value (bits or bytes). */
35776 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE			UINT32_C(0x10000000)
35777 	/* Value is in bits. */
35778 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35779 	/* Value is in bytes. */
35780 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35781 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES
35782 	/* bw_value_unit is 3 b */
35783 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35784 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_SFT	29
35785 	/* Value is in Mb or MB (base 10). */
35786 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35787 	/* Value is in Kb or KB (base 10). */
35788 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35789 	/* Value is in bits or bytes. */
35790 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35791 	/* Value is in Gb or GB (base 10). */
35792 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35793 	/* Value is in 1/100th of a percentage of total bandwidth. */
35794 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35795 	/* Invalid unit */
35796 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35797 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID
35798 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35799 	uint8_t	queue_id0_tsa_assign;
35800 	/* Strict Priority */
35801 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_SP		UINT32_C(0x0)
35802 	/* Enhanced Transmission Selection */
35803 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_ETS		UINT32_C(0x1)
35804 	/* reserved. */
35805 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35806 	/* reserved. */
35807 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35808 	/*
35809 	 * Priority level for strict priority. Valid only when the
35810 	 * tsa_assign is 0 - Strict Priority (SP)
35811 	 * 0..7 - Valid values.
35812 	 * 8..255 - Reserved.
35813 	 */
35814 	uint8_t	queue_id0_pri_lvl;
35815 	/*
35816 	 * Weight used to allocate remaining BW for this COS after
35817 	 * servicing guaranteed bandwidths for all COS.
35818 	 */
35819 	uint8_t	queue_id0_bw_weight;
35820 	/* ID of CoS Queue 1. */
35821 	uint8_t	queue_id1;
35822 	/*
35823 	 * Minimum BW allocated to CoS Queue.
35824 	 * The HWRM will translate this value into byte counter and
35825 	 * time interval used for this COS inside the device.
35826 	 */
35827 	uint32_t	queue_id1_min_bw;
35828 	/* The bandwidth value. */
35829 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35830 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_SFT		0
35831 	/* The granularity of the value (bits or bytes). */
35832 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE			UINT32_C(0x10000000)
35833 	/* Value is in bits. */
35834 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35835 	/* Value is in bytes. */
35836 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35837 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES
35838 	/* bw_value_unit is 3 b */
35839 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35840 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_SFT	29
35841 	/* Value is in Mb or MB (base 10). */
35842 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35843 	/* Value is in Kb or KB (base 10). */
35844 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35845 	/* Value is in bits or bytes. */
35846 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35847 	/* Value is in Gb or GB (base 10). */
35848 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35849 	/* Value is in 1/100th of a percentage of total bandwidth. */
35850 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35851 	/* Invalid unit */
35852 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35853 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID
35854 	/*
35855 	 * Maximum BW allocated to CoS queue.
35856 	 * The HWRM will translate this value into byte counter and
35857 	 * time interval used for this COS inside the device.
35858 	 */
35859 	uint32_t	queue_id1_max_bw;
35860 	/* The bandwidth value. */
35861 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35862 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_SFT		0
35863 	/* The granularity of the value (bits or bytes). */
35864 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE			UINT32_C(0x10000000)
35865 	/* Value is in bits. */
35866 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35867 	/* Value is in bytes. */
35868 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35869 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES
35870 	/* bw_value_unit is 3 b */
35871 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35872 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_SFT	29
35873 	/* Value is in Mb or MB (base 10). */
35874 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35875 	/* Value is in Kb or KB (base 10). */
35876 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35877 	/* Value is in bits or bytes. */
35878 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35879 	/* Value is in Gb or GB (base 10). */
35880 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35881 	/* Value is in 1/100th of a percentage of total bandwidth. */
35882 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35883 	/* Invalid unit */
35884 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35885 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID
35886 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35887 	uint8_t	queue_id1_tsa_assign;
35888 	/* Strict Priority */
35889 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_SP		UINT32_C(0x0)
35890 	/* Enhanced Transmission Selection */
35891 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_ETS		UINT32_C(0x1)
35892 	/* reserved. */
35893 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35894 	/* reserved. */
35895 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35896 	/*
35897 	 * Priority level for strict priority. Valid only when the
35898 	 * tsa_assign is 0 - Strict Priority (SP)
35899 	 * 0..7 - Valid values.
35900 	 * 8..255 - Reserved.
35901 	 */
35902 	uint8_t	queue_id1_pri_lvl;
35903 	/*
35904 	 * Weight used to allocate remaining BW for this COS after
35905 	 * servicing guaranteed bandwidths for all COS.
35906 	 */
35907 	uint8_t	queue_id1_bw_weight;
35908 	/* ID of CoS Queue 2. */
35909 	uint8_t	queue_id2;
35910 	/*
35911 	 * Minimum BW allocated to CoS Queue.
35912 	 * The HWRM will translate this value into byte counter and
35913 	 * time interval used for this COS inside the device.
35914 	 */
35915 	uint32_t	queue_id2_min_bw;
35916 	/* The bandwidth value. */
35917 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35918 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_SFT		0
35919 	/* The granularity of the value (bits or bytes). */
35920 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE			UINT32_C(0x10000000)
35921 	/* Value is in bits. */
35922 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35923 	/* Value is in bytes. */
35924 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35925 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES
35926 	/* bw_value_unit is 3 b */
35927 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35928 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_SFT	29
35929 	/* Value is in Mb or MB (base 10). */
35930 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35931 	/* Value is in Kb or KB (base 10). */
35932 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35933 	/* Value is in bits or bytes. */
35934 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35935 	/* Value is in Gb or GB (base 10). */
35936 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35937 	/* Value is in 1/100th of a percentage of total bandwidth. */
35938 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35939 	/* Invalid unit */
35940 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35941 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID
35942 	/*
35943 	 * Maximum BW allocated to CoS queue.
35944 	 * The HWRM will translate this value into byte counter and
35945 	 * time interval used for this COS inside the device.
35946 	 */
35947 	uint32_t	queue_id2_max_bw;
35948 	/* The bandwidth value. */
35949 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
35950 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_SFT		0
35951 	/* The granularity of the value (bits or bytes). */
35952 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE			UINT32_C(0x10000000)
35953 	/* Value is in bits. */
35954 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
35955 	/* Value is in bytes. */
35956 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
35957 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES
35958 	/* bw_value_unit is 3 b */
35959 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
35960 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_SFT	29
35961 	/* Value is in Mb or MB (base 10). */
35962 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
35963 	/* Value is in Kb or KB (base 10). */
35964 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
35965 	/* Value is in bits or bytes. */
35966 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
35967 	/* Value is in Gb or GB (base 10). */
35968 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
35969 	/* Value is in 1/100th of a percentage of total bandwidth. */
35970 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
35971 	/* Invalid unit */
35972 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
35973 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID
35974 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
35975 	uint8_t	queue_id2_tsa_assign;
35976 	/* Strict Priority */
35977 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_SP		UINT32_C(0x0)
35978 	/* Enhanced Transmission Selection */
35979 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_ETS		UINT32_C(0x1)
35980 	/* reserved. */
35981 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
35982 	/* reserved. */
35983 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
35984 	/*
35985 	 * Priority level for strict priority. Valid only when the
35986 	 * tsa_assign is 0 - Strict Priority (SP)
35987 	 * 0..7 - Valid values.
35988 	 * 8..255 - Reserved.
35989 	 */
35990 	uint8_t	queue_id2_pri_lvl;
35991 	/*
35992 	 * Weight used to allocate remaining BW for this COS after
35993 	 * servicing guaranteed bandwidths for all COS.
35994 	 */
35995 	uint8_t	queue_id2_bw_weight;
35996 	/* ID of CoS Queue 3. */
35997 	uint8_t	queue_id3;
35998 	/*
35999 	 * Minimum BW allocated to CoS Queue.
36000 	 * The HWRM will translate this value into byte counter and
36001 	 * time interval used for this COS inside the device.
36002 	 */
36003 	uint32_t	queue_id3_min_bw;
36004 	/* The bandwidth value. */
36005 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36006 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_SFT		0
36007 	/* The granularity of the value (bits or bytes). */
36008 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE			UINT32_C(0x10000000)
36009 	/* Value is in bits. */
36010 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36011 	/* Value is in bytes. */
36012 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36013 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES
36014 	/* bw_value_unit is 3 b */
36015 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36016 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_SFT	29
36017 	/* Value is in Mb or MB (base 10). */
36018 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36019 	/* Value is in Kb or KB (base 10). */
36020 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36021 	/* Value is in bits or bytes. */
36022 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36023 	/* Value is in Gb or GB (base 10). */
36024 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36025 	/* Value is in 1/100th of a percentage of total bandwidth. */
36026 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36027 	/* Invalid unit */
36028 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36029 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID
36030 	/*
36031 	 * Maximum BW allocated to CoS queue.
36032 	 * The HWRM will translate this value into byte counter and
36033 	 * time interval used for this COS inside the device.
36034 	 */
36035 	uint32_t	queue_id3_max_bw;
36036 	/* The bandwidth value. */
36037 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36038 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_SFT		0
36039 	/* The granularity of the value (bits or bytes). */
36040 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE			UINT32_C(0x10000000)
36041 	/* Value is in bits. */
36042 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36043 	/* Value is in bytes. */
36044 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36045 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES
36046 	/* bw_value_unit is 3 b */
36047 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36048 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_SFT	29
36049 	/* Value is in Mb or MB (base 10). */
36050 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36051 	/* Value is in Kb or KB (base 10). */
36052 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36053 	/* Value is in bits or bytes. */
36054 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36055 	/* Value is in Gb or GB (base 10). */
36056 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36057 	/* Value is in 1/100th of a percentage of total bandwidth. */
36058 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36059 	/* Invalid unit */
36060 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36061 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID
36062 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
36063 	uint8_t	queue_id3_tsa_assign;
36064 	/* Strict Priority */
36065 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_SP		UINT32_C(0x0)
36066 	/* Enhanced Transmission Selection */
36067 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_ETS		UINT32_C(0x1)
36068 	/* reserved. */
36069 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
36070 	/* reserved. */
36071 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
36072 	/*
36073 	 * Priority level for strict priority. Valid only when the
36074 	 * tsa_assign is 0 - Strict Priority (SP)
36075 	 * 0..7 - Valid values.
36076 	 * 8..255 - Reserved.
36077 	 */
36078 	uint8_t	queue_id3_pri_lvl;
36079 	/*
36080 	 * Weight used to allocate remaining BW for this COS after
36081 	 * servicing guaranteed bandwidths for all COS.
36082 	 */
36083 	uint8_t	queue_id3_bw_weight;
36084 	/* ID of CoS Queue 4. */
36085 	uint8_t	queue_id4;
36086 	/*
36087 	 * Minimum BW allocated to CoS Queue.
36088 	 * The HWRM will translate this value into byte counter and
36089 	 * time interval used for this COS inside the device.
36090 	 */
36091 	uint32_t	queue_id4_min_bw;
36092 	/* The bandwidth value. */
36093 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36094 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_SFT		0
36095 	/* The granularity of the value (bits or bytes). */
36096 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE			UINT32_C(0x10000000)
36097 	/* Value is in bits. */
36098 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36099 	/* Value is in bytes. */
36100 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36101 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES
36102 	/* bw_value_unit is 3 b */
36103 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36104 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_SFT	29
36105 	/* Value is in Mb or MB (base 10). */
36106 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36107 	/* Value is in Kb or KB (base 10). */
36108 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36109 	/* Value is in bits or bytes. */
36110 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36111 	/* Value is in Gb or GB (base 10). */
36112 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36113 	/* Value is in 1/100th of a percentage of total bandwidth. */
36114 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36115 	/* Invalid unit */
36116 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36117 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID
36118 	/*
36119 	 * Maximum BW allocated to CoS queue.
36120 	 * The HWRM will translate this value into byte counter and
36121 	 * time interval used for this COS inside the device.
36122 	 */
36123 	uint32_t	queue_id4_max_bw;
36124 	/* The bandwidth value. */
36125 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36126 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_SFT		0
36127 	/* The granularity of the value (bits or bytes). */
36128 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE			UINT32_C(0x10000000)
36129 	/* Value is in bits. */
36130 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36131 	/* Value is in bytes. */
36132 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36133 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES
36134 	/* bw_value_unit is 3 b */
36135 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36136 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_SFT	29
36137 	/* Value is in Mb or MB (base 10). */
36138 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36139 	/* Value is in Kb or KB (base 10). */
36140 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36141 	/* Value is in bits or bytes. */
36142 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36143 	/* Value is in Gb or GB (base 10). */
36144 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36145 	/* Value is in 1/100th of a percentage of total bandwidth. */
36146 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36147 	/* Invalid unit */
36148 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36149 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID
36150 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
36151 	uint8_t	queue_id4_tsa_assign;
36152 	/* Strict Priority */
36153 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_SP		UINT32_C(0x0)
36154 	/* Enhanced Transmission Selection */
36155 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_ETS		UINT32_C(0x1)
36156 	/* reserved. */
36157 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
36158 	/* reserved. */
36159 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
36160 	/*
36161 	 * Priority level for strict priority. Valid only when the
36162 	 * tsa_assign is 0 - Strict Priority (SP)
36163 	 * 0..7 - Valid values.
36164 	 * 8..255 - Reserved.
36165 	 */
36166 	uint8_t	queue_id4_pri_lvl;
36167 	/*
36168 	 * Weight used to allocate remaining BW for this COS after
36169 	 * servicing guaranteed bandwidths for all COS.
36170 	 */
36171 	uint8_t	queue_id4_bw_weight;
36172 	/* ID of CoS Queue 5. */
36173 	uint8_t	queue_id5;
36174 	/*
36175 	 * Minimum BW allocated to CoS Queue.
36176 	 * The HWRM will translate this value into byte counter and
36177 	 * time interval used for this COS inside the device.
36178 	 */
36179 	uint32_t	queue_id5_min_bw;
36180 	/* The bandwidth value. */
36181 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36182 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_SFT		0
36183 	/* The granularity of the value (bits or bytes). */
36184 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE			UINT32_C(0x10000000)
36185 	/* Value is in bits. */
36186 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36187 	/* Value is in bytes. */
36188 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36189 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES
36190 	/* bw_value_unit is 3 b */
36191 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36192 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_SFT	29
36193 	/* Value is in Mb or MB (base 10). */
36194 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36195 	/* Value is in Kb or KB (base 10). */
36196 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36197 	/* Value is in bits or bytes. */
36198 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36199 	/* Value is in Gb or GB (base 10). */
36200 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36201 	/* Value is in 1/100th of a percentage of total bandwidth. */
36202 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36203 	/* Invalid unit */
36204 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36205 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID
36206 	/*
36207 	 * Maximum BW allocated to CoS queue.
36208 	 * The HWRM will translate this value into byte counter and
36209 	 * time interval used for this COS inside the device.
36210 	 */
36211 	uint32_t	queue_id5_max_bw;
36212 	/* The bandwidth value. */
36213 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36214 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_SFT		0
36215 	/* The granularity of the value (bits or bytes). */
36216 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE			UINT32_C(0x10000000)
36217 	/* Value is in bits. */
36218 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36219 	/* Value is in bytes. */
36220 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36221 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES
36222 	/* bw_value_unit is 3 b */
36223 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36224 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_SFT	29
36225 	/* Value is in Mb or MB (base 10). */
36226 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36227 	/* Value is in Kb or KB (base 10). */
36228 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36229 	/* Value is in bits or bytes. */
36230 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36231 	/* Value is in Gb or GB (base 10). */
36232 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36233 	/* Value is in 1/100th of a percentage of total bandwidth. */
36234 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36235 	/* Invalid unit */
36236 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36237 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID
36238 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
36239 	uint8_t	queue_id5_tsa_assign;
36240 	/* Strict Priority */
36241 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_SP		UINT32_C(0x0)
36242 	/* Enhanced Transmission Selection */
36243 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_ETS		UINT32_C(0x1)
36244 	/* reserved. */
36245 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
36246 	/* reserved. */
36247 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
36248 	/*
36249 	 * Priority level for strict priority. Valid only when the
36250 	 * tsa_assign is 0 - Strict Priority (SP)
36251 	 * 0..7 - Valid values.
36252 	 * 8..255 - Reserved.
36253 	 */
36254 	uint8_t	queue_id5_pri_lvl;
36255 	/*
36256 	 * Weight used to allocate remaining BW for this COS after
36257 	 * servicing guaranteed bandwidths for all COS.
36258 	 */
36259 	uint8_t	queue_id5_bw_weight;
36260 	/* ID of CoS Queue 6. */
36261 	uint8_t	queue_id6;
36262 	/*
36263 	 * Minimum BW allocated to CoS Queue.
36264 	 * The HWRM will translate this value into byte counter and
36265 	 * time interval used for this COS inside the device.
36266 	 */
36267 	uint32_t	queue_id6_min_bw;
36268 	/* The bandwidth value. */
36269 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36270 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_SFT		0
36271 	/* The granularity of the value (bits or bytes). */
36272 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE			UINT32_C(0x10000000)
36273 	/* Value is in bits. */
36274 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36275 	/* Value is in bytes. */
36276 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36277 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES
36278 	/* bw_value_unit is 3 b */
36279 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36280 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_SFT	29
36281 	/* Value is in Mb or MB (base 10). */
36282 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36283 	/* Value is in Kb or KB (base 10). */
36284 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36285 	/* Value is in bits or bytes. */
36286 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36287 	/* Value is in Gb or GB (base 10). */
36288 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36289 	/* Value is in 1/100th of a percentage of total bandwidth. */
36290 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36291 	/* Invalid unit */
36292 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36293 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID
36294 	/*
36295 	 * Maximum BW allocated to CoS queue.
36296 	 * The HWRM will translate this value into byte counter and
36297 	 * time interval used for this COS inside the device.
36298 	 */
36299 	uint32_t	queue_id6_max_bw;
36300 	/* The bandwidth value. */
36301 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36302 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_SFT		0
36303 	/* The granularity of the value (bits or bytes). */
36304 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE			UINT32_C(0x10000000)
36305 	/* Value is in bits. */
36306 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36307 	/* Value is in bytes. */
36308 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36309 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES
36310 	/* bw_value_unit is 3 b */
36311 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36312 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_SFT	29
36313 	/* Value is in Mb or MB (base 10). */
36314 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36315 	/* Value is in Kb or KB (base 10). */
36316 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36317 	/* Value is in bits or bytes. */
36318 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36319 	/* Value is in Gb or GB (base 10). */
36320 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36321 	/* Value is in 1/100th of a percentage of total bandwidth. */
36322 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36323 	/* Invalid unit */
36324 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36325 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID
36326 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
36327 	uint8_t	queue_id6_tsa_assign;
36328 	/* Strict Priority */
36329 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_SP		UINT32_C(0x0)
36330 	/* Enhanced Transmission Selection */
36331 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_ETS		UINT32_C(0x1)
36332 	/* reserved. */
36333 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
36334 	/* reserved. */
36335 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
36336 	/*
36337 	 * Priority level for strict priority. Valid only when the
36338 	 * tsa_assign is 0 - Strict Priority (SP)
36339 	 * 0..7 - Valid values.
36340 	 * 8..255 - Reserved.
36341 	 */
36342 	uint8_t	queue_id6_pri_lvl;
36343 	/*
36344 	 * Weight used to allocate remaining BW for this COS after
36345 	 * servicing guaranteed bandwidths for all COS.
36346 	 */
36347 	uint8_t	queue_id6_bw_weight;
36348 	/* ID of CoS Queue 7. */
36349 	uint8_t	queue_id7;
36350 	/*
36351 	 * Minimum BW allocated to CoS Queue.
36352 	 * The HWRM will translate this value into byte counter and
36353 	 * time interval used for this COS inside the device.
36354 	 */
36355 	uint32_t	queue_id7_min_bw;
36356 	/* The bandwidth value. */
36357 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36358 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_SFT		0
36359 	/* The granularity of the value (bits or bytes). */
36360 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE			UINT32_C(0x10000000)
36361 	/* Value is in bits. */
36362 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36363 	/* Value is in bytes. */
36364 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36365 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES
36366 	/* bw_value_unit is 3 b */
36367 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36368 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_SFT	29
36369 	/* Value is in Mb or MB (base 10). */
36370 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36371 	/* Value is in Kb or KB (base 10). */
36372 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36373 	/* Value is in bits or bytes. */
36374 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36375 	/* Value is in Gb or GB (base 10). */
36376 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36377 	/* Value is in 1/100th of a percentage of total bandwidth. */
36378 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36379 	/* Invalid unit */
36380 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36381 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID
36382 	/*
36383 	 * Maximum BW allocated to CoS queue.
36384 	 * The HWRM will translate this value into byte counter and
36385 	 * time interval used for this COS inside the device.
36386 	 */
36387 	uint32_t	queue_id7_max_bw;
36388 	/* The bandwidth value. */
36389 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
36390 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_SFT		0
36391 	/* The granularity of the value (bits or bytes). */
36392 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE			UINT32_C(0x10000000)
36393 	/* Value is in bits. */
36394 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
36395 	/* Value is in bytes. */
36396 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
36397 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_LAST		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES
36398 	/* bw_value_unit is 3 b */
36399 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
36400 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_SFT	29
36401 	/* Value is in Mb or MB (base 10). */
36402 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
36403 	/* Value is in Kb or KB (base 10). */
36404 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
36405 	/* Value is in bits or bytes. */
36406 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
36407 	/* Value is in Gb or GB (base 10). */
36408 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
36409 	/* Value is in 1/100th of a percentage of total bandwidth. */
36410 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
36411 	/* Invalid unit */
36412 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
36413 		#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID
36414 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
36415 	uint8_t	queue_id7_tsa_assign;
36416 	/* Strict Priority */
36417 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_SP		UINT32_C(0x0)
36418 	/* Enhanced Transmission Selection */
36419 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_ETS		UINT32_C(0x1)
36420 	/* reserved. */
36421 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST UINT32_C(0x2)
36422 	/* reserved. */
36423 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST  UINT32_C(0xff)
36424 	/*
36425 	 * Priority level for strict priority. Valid only when the
36426 	 * tsa_assign is 0 - Strict Priority (SP)
36427 	 * 0..7 - Valid values.
36428 	 * 8..255 - Reserved.
36429 	 */
36430 	uint8_t	queue_id7_pri_lvl;
36431 	/*
36432 	 * Weight used to allocate remaining BW for this COS after
36433 	 * servicing guaranteed bandwidths for all COS.
36434 	 */
36435 	uint8_t	queue_id7_bw_weight;
36436 	uint8_t	unused_1[5];
36437 } hwrm_queue_cos2bw_cfg_input_t, *phwrm_queue_cos2bw_cfg_input_t;
36438 
36439 /* hwrm_queue_cos2bw_cfg_output (size:128b/16B) */
36440 
36441 typedef struct hwrm_queue_cos2bw_cfg_output {
36442 	/* The specific error status for the command. */
36443 	uint16_t	error_code;
36444 	/* The HWRM command request type. */
36445 	uint16_t	req_type;
36446 	/* The sequence ID from the original command. */
36447 	uint16_t	seq_id;
36448 	/* The length of the response data in number of bytes. */
36449 	uint16_t	resp_len;
36450 	uint8_t	unused_0[7];
36451 	/*
36452 	 * This field is used in Output records to indicate that the output
36453 	 * is completely written to RAM. This field should be read as '1'
36454 	 * to indicate that the output has been completely written. When
36455 	 * writing a command completion or response to an internal processor,
36456 	 * the order of writes has to be such that this field is written last.
36457 	 */
36458 	uint8_t	valid;
36459 } hwrm_queue_cos2bw_cfg_output_t, *phwrm_queue_cos2bw_cfg_output_t;
36460 
36461 /*************************
36462  * hwrm_queue_dscp_qcaps *
36463  *************************/
36464 
36465 
36466 /* hwrm_queue_dscp_qcaps_input (size:192b/24B) */
36467 
36468 typedef struct hwrm_queue_dscp_qcaps_input {
36469 	/* The HWRM command request type. */
36470 	uint16_t	req_type;
36471 	/*
36472 	 * The completion ring to send the completion event on. This should
36473 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36474 	 */
36475 	uint16_t	cmpl_ring;
36476 	/*
36477 	 * The sequence ID is used by the driver for tracking multiple
36478 	 * commands. This ID is treated as opaque data by the firmware and
36479 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36480 	 */
36481 	uint16_t	seq_id;
36482 	/*
36483 	 * The target ID of the command:
36484 	 * * 0x0-0xFFF8 - The function ID
36485 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36486 	 * * 0xFFFD - Reserved for user-space HWRM interface
36487 	 * * 0xFFFF - HWRM
36488 	 */
36489 	uint16_t	target_id;
36490 	/*
36491 	 * A physical address pointer pointing to a host buffer that the
36492 	 * command's response data will be written. This can be either a host
36493 	 * physical address (HPA) or a guest physical address (GPA) and must
36494 	 * point to a physically contiguous block of memory.
36495 	 */
36496 	uint64_t	resp_addr;
36497 	/*
36498 	 * Port ID of port for which the table is being configured.
36499 	 * The HWRM needs to check whether this function is allowed
36500 	 * to configure pri2cos mapping on this port.
36501 	 */
36502 	uint8_t	port_id;
36503 	uint8_t	unused_0[7];
36504 } hwrm_queue_dscp_qcaps_input_t, *phwrm_queue_dscp_qcaps_input_t;
36505 
36506 /* hwrm_queue_dscp_qcaps_output (size:128b/16B) */
36507 
36508 typedef struct hwrm_queue_dscp_qcaps_output {
36509 	/* The specific error status for the command. */
36510 	uint16_t	error_code;
36511 	/* The HWRM command request type. */
36512 	uint16_t	req_type;
36513 	/* The sequence ID from the original command. */
36514 	uint16_t	seq_id;
36515 	/* The length of the response data in number of bytes. */
36516 	uint16_t	resp_len;
36517 	/* The number of bits provided by the hardware for the DSCP value. */
36518 	uint8_t	num_dscp_bits;
36519 	uint8_t	unused_0;
36520 	/* Max number of DSCP-MASK-PRI entries supported. */
36521 	uint16_t	max_entries;
36522 	uint8_t	unused_1[3];
36523 	/*
36524 	 * This field is used in Output records to indicate that the output
36525 	 * is completely written to RAM. This field should be read as '1'
36526 	 * to indicate that the output has been completely written. When
36527 	 * writing a command completion or response to an internal processor,
36528 	 * the order of writes has to be such that this field is written last.
36529 	 */
36530 	uint8_t	valid;
36531 } hwrm_queue_dscp_qcaps_output_t, *phwrm_queue_dscp_qcaps_output_t;
36532 
36533 /****************************
36534  * hwrm_queue_dscp2pri_qcfg *
36535  ****************************/
36536 
36537 
36538 /* hwrm_queue_dscp2pri_qcfg_input (size:256b/32B) */
36539 
36540 typedef struct hwrm_queue_dscp2pri_qcfg_input {
36541 	/* The HWRM command request type. */
36542 	uint16_t	req_type;
36543 	/*
36544 	 * The completion ring to send the completion event on. This should
36545 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36546 	 */
36547 	uint16_t	cmpl_ring;
36548 	/*
36549 	 * The sequence ID is used by the driver for tracking multiple
36550 	 * commands. This ID is treated as opaque data by the firmware and
36551 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36552 	 */
36553 	uint16_t	seq_id;
36554 	/*
36555 	 * The target ID of the command:
36556 	 * * 0x0-0xFFF8 - The function ID
36557 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36558 	 * * 0xFFFD - Reserved for user-space HWRM interface
36559 	 * * 0xFFFF - HWRM
36560 	 */
36561 	uint16_t	target_id;
36562 	/*
36563 	 * A physical address pointer pointing to a host buffer that the
36564 	 * command's response data will be written. This can be either a host
36565 	 * physical address (HPA) or a guest physical address (GPA) and must
36566 	 * point to a physically contiguous block of memory.
36567 	 */
36568 	uint64_t	resp_addr;
36569 	/*
36570 	 * This is the host address where the 24-bits DSCP-MASK-PRI
36571 	 * tuple(s) will be copied to.
36572 	 */
36573 	uint64_t	dest_data_addr;
36574 	/*
36575 	 * Port ID of port for which the table is being configured.
36576 	 * The HWRM needs to check whether this function is allowed
36577 	 * to configure pri2cos mapping on this port.
36578 	 */
36579 	uint8_t	port_id;
36580 	uint8_t	unused_0;
36581 	/* Size of the buffer pointed to by dest_data_addr. */
36582 	uint16_t	dest_data_buffer_size;
36583 	uint8_t	unused_1[4];
36584 } hwrm_queue_dscp2pri_qcfg_input_t, *phwrm_queue_dscp2pri_qcfg_input_t;
36585 
36586 /* hwrm_queue_dscp2pri_qcfg_output (size:128b/16B) */
36587 
36588 typedef struct hwrm_queue_dscp2pri_qcfg_output {
36589 	/* The specific error status for the command. */
36590 	uint16_t	error_code;
36591 	/* The HWRM command request type. */
36592 	uint16_t	req_type;
36593 	/* The sequence ID from the original command. */
36594 	uint16_t	seq_id;
36595 	/* The length of the response data in number of bytes. */
36596 	uint16_t	resp_len;
36597 	/*
36598 	 * A count of the number of DSCP-MASK-PRI tuple(s) pointed to
36599 	 * by the dest_data_addr.
36600 	 */
36601 	uint16_t	entry_cnt;
36602 	/*
36603 	 * This is the default PRI which un-initialized DSCP values are
36604 	 * mapped to.
36605 	 */
36606 	uint8_t	default_pri;
36607 	uint8_t	unused_0[4];
36608 	/*
36609 	 * This field is used in Output records to indicate that the output
36610 	 * is completely written to RAM. This field should be read as '1'
36611 	 * to indicate that the output has been completely written. When
36612 	 * writing a command completion or response to an internal processor,
36613 	 * the order of writes has to be such that this field is written last.
36614 	 */
36615 	uint8_t	valid;
36616 } hwrm_queue_dscp2pri_qcfg_output_t, *phwrm_queue_dscp2pri_qcfg_output_t;
36617 
36618 /***************************
36619  * hwrm_queue_dscp2pri_cfg *
36620  ***************************/
36621 
36622 
36623 /* hwrm_queue_dscp2pri_cfg_input (size:320b/40B) */
36624 
36625 typedef struct hwrm_queue_dscp2pri_cfg_input {
36626 	/* The HWRM command request type. */
36627 	uint16_t	req_type;
36628 	/*
36629 	 * The completion ring to send the completion event on. This should
36630 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36631 	 */
36632 	uint16_t	cmpl_ring;
36633 	/*
36634 	 * The sequence ID is used by the driver for tracking multiple
36635 	 * commands. This ID is treated as opaque data by the firmware and
36636 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36637 	 */
36638 	uint16_t	seq_id;
36639 	/*
36640 	 * The target ID of the command:
36641 	 * * 0x0-0xFFF8 - The function ID
36642 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36643 	 * * 0xFFFD - Reserved for user-space HWRM interface
36644 	 * * 0xFFFF - HWRM
36645 	 */
36646 	uint16_t	target_id;
36647 	/*
36648 	 * A physical address pointer pointing to a host buffer that the
36649 	 * command's response data will be written. This can be either a host
36650 	 * physical address (HPA) or a guest physical address (GPA) and must
36651 	 * point to a physically contiguous block of memory.
36652 	 */
36653 	uint64_t	resp_addr;
36654 	/*
36655 	 * This is the host address where the 24-bits DSCP-MASK-PRI tuple
36656 	 * will be copied from. A non-zero mask "adds" a tuple, while
36657 	 * a mask equal to 0 triggers the firmware to remove a tuple.
36658 	 * Only tuples with unique DSCP values are stored. On chips
36659 	 * prior to Thor a mask can be 0 - 0x3f, while on Thor it can
36660 	 * be 0 or 0x3f.
36661 	 */
36662 	uint64_t	src_data_addr;
36663 	uint32_t	flags;
36664 	/* use_hw_default_pri is 1 b */
36665 	#define HWRM_QUEUE_DSCP2PRI_CFG_INPUT_FLAGS_USE_HW_DEFAULT_PRI	UINT32_C(0x1)
36666 	uint32_t	enables;
36667 	/*
36668 	 * This bit must be '1' for the default_pri field to be
36669 	 * configured.
36670 	 */
36671 	#define HWRM_QUEUE_DSCP2PRI_CFG_INPUT_ENABLES_DEFAULT_PRI	UINT32_C(0x1)
36672 	/*
36673 	 * Port ID of port for which the table is being configured.
36674 	 * The HWRM needs to check whether this function is allowed
36675 	 * to configure pri2cos mapping on this port.
36676 	 */
36677 	uint8_t	port_id;
36678 	/*
36679 	 * This is the default PRI which un-initialized DSCP values will be
36680 	 * mapped to.
36681 	 */
36682 	uint8_t	default_pri;
36683 	/*
36684 	 * A count of the number of DSCP-MASK-PRI tuple(s) in the data pointed
36685 	 * to by src_data_addr.
36686 	 */
36687 	uint16_t	entry_cnt;
36688 	uint8_t	unused_0[4];
36689 } hwrm_queue_dscp2pri_cfg_input_t, *phwrm_queue_dscp2pri_cfg_input_t;
36690 
36691 /* hwrm_queue_dscp2pri_cfg_output (size:128b/16B) */
36692 
36693 typedef struct hwrm_queue_dscp2pri_cfg_output {
36694 	/* The specific error status for the command. */
36695 	uint16_t	error_code;
36696 	/* The HWRM command request type. */
36697 	uint16_t	req_type;
36698 	/* The sequence ID from the original command. */
36699 	uint16_t	seq_id;
36700 	/* The length of the response data in number of bytes. */
36701 	uint16_t	resp_len;
36702 	uint8_t	unused_0[7];
36703 	/*
36704 	 * This field is used in Output records to indicate that the output
36705 	 * is completely written to RAM. This field should be read as '1'
36706 	 * to indicate that the output has been completely written. When
36707 	 * writing a command completion or response to an internal processor,
36708 	 * the order of writes has to be such that this field is written last.
36709 	 */
36710 	uint8_t	valid;
36711 } hwrm_queue_dscp2pri_cfg_output_t, *phwrm_queue_dscp2pri_cfg_output_t;
36712 
36713 /*************************
36714  * hwrm_queue_mpls_qcaps *
36715  *************************/
36716 
36717 
36718 /* hwrm_queue_mpls_qcaps_input (size:192b/24B) */
36719 
36720 typedef struct hwrm_queue_mpls_qcaps_input {
36721 	/* The HWRM command request type. */
36722 	uint16_t	req_type;
36723 	/*
36724 	 * The completion ring to send the completion event on. This should
36725 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36726 	 */
36727 	uint16_t	cmpl_ring;
36728 	/*
36729 	 * The sequence ID is used by the driver for tracking multiple
36730 	 * commands. This ID is treated as opaque data by the firmware and
36731 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36732 	 */
36733 	uint16_t	seq_id;
36734 	/*
36735 	 * The target ID of the command:
36736 	 * * 0x0-0xFFF8 - The function ID
36737 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36738 	 * * 0xFFFD - Reserved for user-space HWRM interface
36739 	 * * 0xFFFF - HWRM
36740 	 */
36741 	uint16_t	target_id;
36742 	/*
36743 	 * A physical address pointer pointing to a host buffer that the
36744 	 * command's response data will be written. This can be either a host
36745 	 * physical address (HPA) or a guest physical address (GPA) and must
36746 	 * point to a physically contiguous block of memory.
36747 	 */
36748 	uint64_t	resp_addr;
36749 	/*
36750 	 * Port ID of port for which the table is being configured.
36751 	 * The HWRM needs to check whether this function is allowed
36752 	 * to configure MPLS TC(EXP) to pri mapping on this port.
36753 	 */
36754 	uint8_t	port_id;
36755 	uint8_t	unused_0[7];
36756 } hwrm_queue_mpls_qcaps_input_t, *phwrm_queue_mpls_qcaps_input_t;
36757 
36758 /* hwrm_queue_mpls_qcaps_output (size:128b/16B) */
36759 
36760 typedef struct hwrm_queue_mpls_qcaps_output {
36761 	/* The specific error status for the command. */
36762 	uint16_t	error_code;
36763 	/* The HWRM command request type. */
36764 	uint16_t	req_type;
36765 	/* The sequence ID from the original command. */
36766 	uint16_t	seq_id;
36767 	/* The length of the response data in number of bytes. */
36768 	uint16_t	resp_len;
36769 	/*
36770 	 * Bitmask indicating which queues can be configured by the
36771 	 * hwrm_queue_mplstc2pri_cfg command.
36772 	 *
36773 	 * Each bit represents a specific pri where bit 0 represents
36774 	 * pri 0 and bit 7 represents pri 7.
36775 	 * # A value of 0 indicates that the pri is not configurable
36776 	 * by the hwrm_queue_mplstc2pri_cfg command.
36777 	 * # A value of 1 indicates that the pri is configurable.
36778 	 * # A hwrm_queue_mplstc2pri_cfg command shall return error when
36779 	 * trying to configure a pri that is not configurable.
36780 	 */
36781 	uint8_t	queue_mplstc2pri_cfg_allowed;
36782 	/*
36783 	 * This is the default PRI which un-initialized MPLS values will be
36784 	 * mapped to.
36785 	 */
36786 	uint8_t	hw_default_pri;
36787 	uint8_t	unused_0[5];
36788 	/*
36789 	 * This field is used in Output records to indicate that the output
36790 	 * is completely written to RAM. This field should be read as '1'
36791 	 * to indicate that the output has been completely written. When
36792 	 * writing a command completion or response to an internal processor,
36793 	 * the order of writes has to be such that this field is written last.
36794 	 */
36795 	uint8_t	valid;
36796 } hwrm_queue_mpls_qcaps_output_t, *phwrm_queue_mpls_qcaps_output_t;
36797 
36798 /******************************
36799  * hwrm_queue_mplstc2pri_qcfg *
36800  ******************************/
36801 
36802 
36803 /* hwrm_queue_mplstc2pri_qcfg_input (size:192b/24B) */
36804 
36805 typedef struct hwrm_queue_mplstc2pri_qcfg_input {
36806 	/* The HWRM command request type. */
36807 	uint16_t	req_type;
36808 	/*
36809 	 * The completion ring to send the completion event on. This should
36810 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36811 	 */
36812 	uint16_t	cmpl_ring;
36813 	/*
36814 	 * The sequence ID is used by the driver for tracking multiple
36815 	 * commands. This ID is treated as opaque data by the firmware and
36816 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36817 	 */
36818 	uint16_t	seq_id;
36819 	/*
36820 	 * The target ID of the command:
36821 	 * * 0x0-0xFFF8 - The function ID
36822 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36823 	 * * 0xFFFD - Reserved for user-space HWRM interface
36824 	 * * 0xFFFF - HWRM
36825 	 */
36826 	uint16_t	target_id;
36827 	/*
36828 	 * A physical address pointer pointing to a host buffer that the
36829 	 * command's response data will be written. This can be either a host
36830 	 * physical address (HPA) or a guest physical address (GPA) and must
36831 	 * point to a physically contiguous block of memory.
36832 	 */
36833 	uint64_t	resp_addr;
36834 	/*
36835 	 * Port ID of port for which the table is being configured.
36836 	 * The HWRM needs to check whether this function is allowed
36837 	 * to configure MPLS TC(EXP) to pri mapping on this port.
36838 	 */
36839 	uint8_t	port_id;
36840 	uint8_t	unused_0[7];
36841 } hwrm_queue_mplstc2pri_qcfg_input_t, *phwrm_queue_mplstc2pri_qcfg_input_t;
36842 
36843 /* hwrm_queue_mplstc2pri_qcfg_output (size:192b/24B) */
36844 
36845 typedef struct hwrm_queue_mplstc2pri_qcfg_output {
36846 	/* The specific error status for the command. */
36847 	uint16_t	error_code;
36848 	/* The HWRM command request type. */
36849 	uint16_t	req_type;
36850 	/* The sequence ID from the original command. */
36851 	uint16_t	seq_id;
36852 	/* The length of the response data in number of bytes. */
36853 	uint16_t	resp_len;
36854 	/*
36855 	 * pri assigned to MPLS TC(EXP) 0. This value can only be changed
36856 	 * before traffic has started.
36857 	 * A value of 0xff indicates that no pri is assigned to the
36858 	 * MPLS TC(EXP) 0.
36859 	 */
36860 	uint8_t	tc0_pri_queue_id;
36861 	/*
36862 	 * pri assigned to MPLS TC(EXP) 1. This value can only be changed
36863 	 * before traffic has started.
36864 	 * A value of 0xff indicates that no pri is assigned to the
36865 	 * MPLS TC(EXP) 1.
36866 	 */
36867 	uint8_t	tc1_pri_queue_id;
36868 	/*
36869 	 * pri assigned to MPLS TC(EXP) 2. This value can only be changed
36870 	 * before traffic has started.
36871 	 * A value of 0xff indicates that no pri is assigned to the
36872 	 * MPLS TC(EXP) 2.
36873 	 */
36874 	uint8_t	tc2_pri_queue_id;
36875 	/*
36876 	 * pri assigned to MPLS TC(EXP) 3. This value can only be changed
36877 	 * before traffic has started.
36878 	 * A value of 0xff indicates that no pri is assigned to the
36879 	 * MPLS TC(EXP) 3.
36880 	 */
36881 	uint8_t	tc3_pri_queue_id;
36882 	/*
36883 	 * pri assigned to MPLS TC(EXP) 4. This value can only be changed
36884 	 * before traffic has started.
36885 	 * A value of 0xff indicates that no pri is assigned to the
36886 	 * MPLS TC(EXP) 4.
36887 	 */
36888 	uint8_t	tc4_pri_queue_id;
36889 	/*
36890 	 * pri assigned to MPLS TC(EXP) 5. This value can only be changed
36891 	 * before traffic has started.
36892 	 * A value of 0xff indicates that no pri is assigned to the
36893 	 * MPLS TC(EXP) 5.
36894 	 */
36895 	uint8_t	tc5_pri_queue_id;
36896 	/*
36897 	 * pri assigned to MPLS TC(EXP) 6. This value can only
36898 	 * be changed before traffic has started.
36899 	 * A value of 0xff indicates that no pri is assigned to the
36900 	 * MPLS TC(EXP) 6.
36901 	 */
36902 	uint8_t	tc6_pri_queue_id;
36903 	/*
36904 	 * pri assigned to MPLS TC(EXP) 7. This value can only
36905 	 * be changed before traffic has started.
36906 	 * A value of 0xff indicates that no pri is assigned to the
36907 	 * MPLS TC(EXP) 7.
36908 	 */
36909 	uint8_t	tc7_pri_queue_id;
36910 	uint8_t	unused_0[7];
36911 	/*
36912 	 * This field is used in Output records to indicate that the output
36913 	 * is completely written to RAM. This field should be read as '1'
36914 	 * to indicate that the output has been completely written. When
36915 	 * writing a command completion or response to an internal processor,
36916 	 * the order of writes has to be such that this field is written last.
36917 	 */
36918 	uint8_t	valid;
36919 } hwrm_queue_mplstc2pri_qcfg_output_t, *phwrm_queue_mplstc2pri_qcfg_output_t;
36920 
36921 /*****************************
36922  * hwrm_queue_mplstc2pri_cfg *
36923  *****************************/
36924 
36925 
36926 /* hwrm_queue_mplstc2pri_cfg_input (size:256b/32B) */
36927 
36928 typedef struct hwrm_queue_mplstc2pri_cfg_input {
36929 	/* The HWRM command request type. */
36930 	uint16_t	req_type;
36931 	/*
36932 	 * The completion ring to send the completion event on. This should
36933 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36934 	 */
36935 	uint16_t	cmpl_ring;
36936 	/*
36937 	 * The sequence ID is used by the driver for tracking multiple
36938 	 * commands. This ID is treated as opaque data by the firmware and
36939 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36940 	 */
36941 	uint16_t	seq_id;
36942 	/*
36943 	 * The target ID of the command:
36944 	 * * 0x0-0xFFF8 - The function ID
36945 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36946 	 * * 0xFFFD - Reserved for user-space HWRM interface
36947 	 * * 0xFFFF - HWRM
36948 	 */
36949 	uint16_t	target_id;
36950 	/*
36951 	 * A physical address pointer pointing to a host buffer that the
36952 	 * command's response data will be written. This can be either a host
36953 	 * physical address (HPA) or a guest physical address (GPA) and must
36954 	 * point to a physically contiguous block of memory.
36955 	 */
36956 	uint64_t	resp_addr;
36957 	uint32_t	enables;
36958 	/*
36959 	 * This bit must be '1' for the mplstc0_pri_queue_id field to be
36960 	 * configured.
36961 	 */
36962 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC0_PRI_QUEUE_ID	UINT32_C(0x1)
36963 	/*
36964 	 * This bit must be '1' for the mplstc1_pri_queue_id field to be
36965 	 * configured.
36966 	 */
36967 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC1_PRI_QUEUE_ID	UINT32_C(0x2)
36968 	/*
36969 	 * This bit must be '1' for the mplstc2_pri_queue_id field to be
36970 	 * configured.
36971 	 */
36972 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC2_PRI_QUEUE_ID	UINT32_C(0x4)
36973 	/*
36974 	 * This bit must be '1' for the mplstc3_pri_queue_id field to be
36975 	 * configured.
36976 	 */
36977 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC3_PRI_QUEUE_ID	UINT32_C(0x8)
36978 	/*
36979 	 * This bit must be '1' for the mplstc4_pri_queue_id field to be
36980 	 * configured.
36981 	 */
36982 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC4_PRI_QUEUE_ID	UINT32_C(0x10)
36983 	/*
36984 	 * This bit must be '1' for the mplstc5_pri_queue_id field to be
36985 	 * configured.
36986 	 */
36987 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC5_PRI_QUEUE_ID	UINT32_C(0x20)
36988 	/*
36989 	 * This bit must be '1' for the mplstc6_pri_queue_id field to be
36990 	 * configured.
36991 	 */
36992 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC6_PRI_QUEUE_ID	UINT32_C(0x40)
36993 	/*
36994 	 * This bit must be '1' for the mplstc7_pri_queue_id field to be
36995 	 * configured.
36996 	 */
36997 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC7_PRI_QUEUE_ID	UINT32_C(0x80)
36998 	/*
36999 	 * Port ID of port for which the table is being configured.
37000 	 * The HWRM needs to check whether this function is allowed
37001 	 * to configure MPLS TC(EXP)to pri mapping on this port.
37002 	 */
37003 	uint8_t	port_id;
37004 	uint8_t	unused_0[3];
37005 	/*
37006 	 * pri assigned to MPLS TC(EXP) 0. This value can only
37007 	 * be changed before traffic has started.
37008 	 */
37009 	uint8_t	tc0_pri_queue_id;
37010 	/*
37011 	 * pri assigned to MPLS TC(EXP) 1. This value can only
37012 	 * be changed before traffic has started.
37013 	 */
37014 	uint8_t	tc1_pri_queue_id;
37015 	/*
37016 	 * pri assigned to MPLS TC(EXP) 2. This value can only
37017 	 * be changed before traffic has started.
37018 	 */
37019 	uint8_t	tc2_pri_queue_id;
37020 	/*
37021 	 * pri assigned to MPLS TC(EXP) 3. This value can only
37022 	 * be changed before traffic has started.
37023 	 */
37024 	uint8_t	tc3_pri_queue_id;
37025 	/*
37026 	 * pri assigned to MPLS TC(EXP) 4. This value can only
37027 	 * be changed before traffic has started.
37028 	 */
37029 	uint8_t	tc4_pri_queue_id;
37030 	/*
37031 	 * pri assigned to MPLS TC(EXP) 5. This value can only
37032 	 * be changed before traffic has started.
37033 	 */
37034 	uint8_t	tc5_pri_queue_id;
37035 	/*
37036 	 * pri assigned to MPLS TC(EXP) 6. This value can only
37037 	 * be changed before traffic has started.
37038 	 */
37039 	uint8_t	tc6_pri_queue_id;
37040 	/*
37041 	 * pri assigned to MPLS TC(EXP) 7. This value can only
37042 	 * be changed before traffic has started.
37043 	 */
37044 	uint8_t	tc7_pri_queue_id;
37045 } hwrm_queue_mplstc2pri_cfg_input_t, *phwrm_queue_mplstc2pri_cfg_input_t;
37046 
37047 /* hwrm_queue_mplstc2pri_cfg_output (size:128b/16B) */
37048 
37049 typedef struct hwrm_queue_mplstc2pri_cfg_output {
37050 	/* The specific error status for the command. */
37051 	uint16_t	error_code;
37052 	/* The HWRM command request type. */
37053 	uint16_t	req_type;
37054 	/* The sequence ID from the original command. */
37055 	uint16_t	seq_id;
37056 	/* The length of the response data in number of bytes. */
37057 	uint16_t	resp_len;
37058 	uint8_t	unused_0[7];
37059 	/*
37060 	 * This field is used in Output records to indicate that the output
37061 	 * is completely written to RAM. This field should be read as '1'
37062 	 * to indicate that the output has been completely written. When
37063 	 * writing a command completion or response to an internal processor,
37064 	 * the order of writes has to be such that this field is written last.
37065 	 */
37066 	uint8_t	valid;
37067 } hwrm_queue_mplstc2pri_cfg_output_t, *phwrm_queue_mplstc2pri_cfg_output_t;
37068 
37069 /****************************
37070  * hwrm_queue_vlanpri_qcaps *
37071  ****************************/
37072 
37073 
37074 /* hwrm_queue_vlanpri_qcaps_input (size:192b/24B) */
37075 
37076 typedef struct hwrm_queue_vlanpri_qcaps_input {
37077 	/* The HWRM command request type. */
37078 	uint16_t	req_type;
37079 	/*
37080 	 * The completion ring to send the completion event on. This should
37081 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37082 	 */
37083 	uint16_t	cmpl_ring;
37084 	/*
37085 	 * The sequence ID is used by the driver for tracking multiple
37086 	 * commands. This ID is treated as opaque data by the firmware and
37087 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37088 	 */
37089 	uint16_t	seq_id;
37090 	/*
37091 	 * The target ID of the command:
37092 	 * * 0x0-0xFFF8 - The function ID
37093 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37094 	 * * 0xFFFD - Reserved for user-space HWRM interface
37095 	 * * 0xFFFF - HWRM
37096 	 */
37097 	uint16_t	target_id;
37098 	/*
37099 	 * A physical address pointer pointing to a host buffer that the
37100 	 * command's response data will be written. This can be either a host
37101 	 * physical address (HPA) or a guest physical address (GPA) and must
37102 	 * point to a physically contiguous block of memory.
37103 	 */
37104 	uint64_t	resp_addr;
37105 	/*
37106 	 * Port ID of port for which the table is being configured.
37107 	 * The HWRM needs to check whether this function is allowed
37108 	 * to configure VLAN priority to user priority mapping on this port.
37109 	 */
37110 	uint8_t	port_id;
37111 	uint8_t	unused_0[7];
37112 } hwrm_queue_vlanpri_qcaps_input_t, *phwrm_queue_vlanpri_qcaps_input_t;
37113 
37114 /* hwrm_queue_vlanpri_qcaps_output (size:128b/16B) */
37115 
37116 typedef struct hwrm_queue_vlanpri_qcaps_output {
37117 	/* The specific error status for the command. */
37118 	uint16_t	error_code;
37119 	/* The HWRM command request type. */
37120 	uint16_t	req_type;
37121 	/* The sequence ID from the original command. */
37122 	uint16_t	seq_id;
37123 	/* The length of the response data in number of bytes. */
37124 	uint16_t	resp_len;
37125 	/*
37126 	 * This is the default user priority which all VLAN priority values
37127 	 * are mapped to if there is no VLAN priority to user priority mapping.
37128 	 */
37129 	uint8_t	hw_default_pri;
37130 	uint8_t	unused_0[6];
37131 	/*
37132 	 * This field is used in Output records to indicate that the output
37133 	 * is completely written to RAM. This field should be read as '1'
37134 	 * to indicate that the output has been completely written. When
37135 	 * writing a command completion or response to an internal processor,
37136 	 * the order of writes has to be such that this field is written last.
37137 	 */
37138 	uint8_t	valid;
37139 } hwrm_queue_vlanpri_qcaps_output_t, *phwrm_queue_vlanpri_qcaps_output_t;
37140 
37141 /*******************************
37142  * hwrm_queue_vlanpri2pri_qcfg *
37143  *******************************/
37144 
37145 
37146 /* hwrm_queue_vlanpri2pri_qcfg_input (size:192b/24B) */
37147 
37148 typedef struct hwrm_queue_vlanpri2pri_qcfg_input {
37149 	/* The HWRM command request type. */
37150 	uint16_t	req_type;
37151 	/*
37152 	 * The completion ring to send the completion event on. This should
37153 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37154 	 */
37155 	uint16_t	cmpl_ring;
37156 	/*
37157 	 * The sequence ID is used by the driver for tracking multiple
37158 	 * commands. This ID is treated as opaque data by the firmware and
37159 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37160 	 */
37161 	uint16_t	seq_id;
37162 	/*
37163 	 * The target ID of the command:
37164 	 * * 0x0-0xFFF8 - The function ID
37165 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37166 	 * * 0xFFFD - Reserved for user-space HWRM interface
37167 	 * * 0xFFFF - HWRM
37168 	 */
37169 	uint16_t	target_id;
37170 	/*
37171 	 * A physical address pointer pointing to a host buffer that the
37172 	 * command's response data will be written. This can be either a host
37173 	 * physical address (HPA) or a guest physical address (GPA) and must
37174 	 * point to a physically contiguous block of memory.
37175 	 */
37176 	uint64_t	resp_addr;
37177 	/*
37178 	 * Port ID of port for which the table is being configured.
37179 	 * The HWRM needs to check whether this function is allowed
37180 	 * to configure VLAN priority to user priority mapping on this port.
37181 	 */
37182 	uint8_t	port_id;
37183 	uint8_t	unused_0[7];
37184 } hwrm_queue_vlanpri2pri_qcfg_input_t, *phwrm_queue_vlanpri2pri_qcfg_input_t;
37185 
37186 /* hwrm_queue_vlanpri2pri_qcfg_output (size:192b/24B) */
37187 
37188 typedef struct hwrm_queue_vlanpri2pri_qcfg_output {
37189 	/* The specific error status for the command. */
37190 	uint16_t	error_code;
37191 	/* The HWRM command request type. */
37192 	uint16_t	req_type;
37193 	/* The sequence ID from the original command. */
37194 	uint16_t	seq_id;
37195 	/* The length of the response data in number of bytes. */
37196 	uint16_t	resp_len;
37197 	/*
37198 	 * User priority assigned to VLAN priority 0. A value of 0xff
37199 	 * indicates that no user priority is assigned. The default user
37200 	 * priority will be used.
37201 	 */
37202 	uint8_t	vlanpri0_user_pri_id;
37203 	/*
37204 	 * User priority assigned to VLAN priority 1. A value of 0xff
37205 	 * indicates that no user priority is assigned. The default user
37206 	 * priority will be used.
37207 	 */
37208 	uint8_t	vlanpri1_user_pri_id;
37209 	/*
37210 	 * User priority assigned to VLAN priority 2. A value of 0xff
37211 	 * indicates that no user priority is assigned. The default user
37212 	 * priority will be used.
37213 	 */
37214 	uint8_t	vlanpri2_user_pri_id;
37215 	/*
37216 	 * User priority assigned to VLAN priority 3. A value of 0xff
37217 	 * indicates that no user priority is assigned. The default user
37218 	 * priority will be used.
37219 	 */
37220 	uint8_t	vlanpri3_user_pri_id;
37221 	/*
37222 	 * User priority assigned to VLAN priority 4. A value of 0xff
37223 	 * indicates that no user priority is assigned. The default user
37224 	 * priority will be used.
37225 	 */
37226 	uint8_t	vlanpri4_user_pri_id;
37227 	/*
37228 	 * User priority assigned to VLAN priority 5. A value of 0xff
37229 	 * indicates that no user priority is assigned. The default user
37230 	 * priority will be used.
37231 	 */
37232 	uint8_t	vlanpri5_user_pri_id;
37233 	/*
37234 	 * User priority assigned to VLAN priority 6. A value of 0xff
37235 	 * indicates that no user priority is assigned. The default user
37236 	 * priority will be used.
37237 	 */
37238 	uint8_t	vlanpri6_user_pri_id;
37239 	/*
37240 	 * User priority assigned to VLAN priority 7. A value of 0xff
37241 	 * indicates that no user priority is assigned. The default user
37242 	 * priority will be used.
37243 	 */
37244 	uint8_t	vlanpri7_user_pri_id;
37245 	uint8_t	unused_0[7];
37246 	/*
37247 	 * This field is used in Output records to indicate that the output
37248 	 * is completely written to RAM. This field should be read as '1'
37249 	 * to indicate that the output has been completely written. When
37250 	 * writing a command completion or response to an internal processor,
37251 	 * the order of writes has to be such that this field is written last.
37252 	 */
37253 	uint8_t	valid;
37254 } hwrm_queue_vlanpri2pri_qcfg_output_t, *phwrm_queue_vlanpri2pri_qcfg_output_t;
37255 
37256 /******************************
37257  * hwrm_queue_vlanpri2pri_cfg *
37258  ******************************/
37259 
37260 
37261 /* hwrm_queue_vlanpri2pri_cfg_input (size:256b/32B) */
37262 
37263 typedef struct hwrm_queue_vlanpri2pri_cfg_input {
37264 	/* The HWRM command request type. */
37265 	uint16_t	req_type;
37266 	/*
37267 	 * The completion ring to send the completion event on. This should
37268 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37269 	 */
37270 	uint16_t	cmpl_ring;
37271 	/*
37272 	 * The sequence ID is used by the driver for tracking multiple
37273 	 * commands. This ID is treated as opaque data by the firmware and
37274 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37275 	 */
37276 	uint16_t	seq_id;
37277 	/*
37278 	 * The target ID of the command:
37279 	 * * 0x0-0xFFF8 - The function ID
37280 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37281 	 * * 0xFFFD - Reserved for user-space HWRM interface
37282 	 * * 0xFFFF - HWRM
37283 	 */
37284 	uint16_t	target_id;
37285 	/*
37286 	 * A physical address pointer pointing to a host buffer that the
37287 	 * command's response data will be written. This can be either a host
37288 	 * physical address (HPA) or a guest physical address (GPA) and must
37289 	 * point to a physically contiguous block of memory.
37290 	 */
37291 	uint64_t	resp_addr;
37292 	uint32_t	enables;
37293 	/*
37294 	 * This bit must be '1' for the vlanpri0_user_pri_id field to be
37295 	 * configured.
37296 	 */
37297 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI0_USER_PRI_ID	UINT32_C(0x1)
37298 	/*
37299 	 * This bit must be '1' for the vlanpri1_user_pri_id field to be
37300 	 * configured.
37301 	 */
37302 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI1_USER_PRI_ID	UINT32_C(0x2)
37303 	/*
37304 	 * This bit must be '1' for the vlanpri2_user_pri_id field to be
37305 	 * configured.
37306 	 */
37307 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI2_USER_PRI_ID	UINT32_C(0x4)
37308 	/*
37309 	 * This bit must be '1' for the vlanpri3_user_pri_id field to be
37310 	 * configured.
37311 	 */
37312 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI3_USER_PRI_ID	UINT32_C(0x8)
37313 	/*
37314 	 * This bit must be '1' for the vlanpri4_user_pri_id field to be
37315 	 * configured.
37316 	 */
37317 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI4_USER_PRI_ID	UINT32_C(0x10)
37318 	/*
37319 	 * This bit must be '1' for the vlanpri5_user_pri_id field to be
37320 	 * configured.
37321 	 */
37322 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI5_USER_PRI_ID	UINT32_C(0x20)
37323 	/*
37324 	 * This bit must be '1' for the vlanpri6_user_pri_id field to be
37325 	 * configured.
37326 	 */
37327 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI6_USER_PRI_ID	UINT32_C(0x40)
37328 	/*
37329 	 * This bit must be '1' for the vlanpri7_user_pri_id field to be
37330 	 * configured.
37331 	 */
37332 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI7_USER_PRI_ID	UINT32_C(0x80)
37333 	/*
37334 	 * Port ID of port for which the table is being configured.
37335 	 * The HWRM needs to check whether this function is allowed
37336 	 * to configure VLAN priority to user priority mapping on this port.
37337 	 */
37338 	uint8_t	port_id;
37339 	uint8_t	unused_0[3];
37340 	/*
37341 	 * User priority assigned to VLAN priority 0. This value can only
37342 	 * be changed before traffic has started.
37343 	 */
37344 	uint8_t	vlanpri0_user_pri_id;
37345 	/*
37346 	 * User priority assigned to VLAN priority 1. This value can only
37347 	 * be changed before traffic has started.
37348 	 */
37349 	uint8_t	vlanpri1_user_pri_id;
37350 	/*
37351 	 * User priority assigned to VLAN priority 2. This value can only
37352 	 * be changed before traffic has started.
37353 	 */
37354 	uint8_t	vlanpri2_user_pri_id;
37355 	/*
37356 	 * User priority assigned to VLAN priority 3. This value can only
37357 	 * be changed before traffic has started.
37358 	 */
37359 	uint8_t	vlanpri3_user_pri_id;
37360 	/*
37361 	 * User priority assigned to VLAN priority 4. This value can only
37362 	 * be changed before traffic has started.
37363 	 */
37364 	uint8_t	vlanpri4_user_pri_id;
37365 	/*
37366 	 * User priority assigned to VLAN priority 5. This value can only
37367 	 * be changed before traffic has started.
37368 	 */
37369 	uint8_t	vlanpri5_user_pri_id;
37370 	/*
37371 	 * User priority assigned to VLAN priority 6. This value can only
37372 	 * be changed before traffic has started.
37373 	 */
37374 	uint8_t	vlanpri6_user_pri_id;
37375 	/*
37376 	 * User priority assigned to VLAN priority 7. This value can only
37377 	 * be changed before traffic has started.
37378 	 */
37379 	uint8_t	vlanpri7_user_pri_id;
37380 } hwrm_queue_vlanpri2pri_cfg_input_t, *phwrm_queue_vlanpri2pri_cfg_input_t;
37381 
37382 /* hwrm_queue_vlanpri2pri_cfg_output (size:128b/16B) */
37383 
37384 typedef struct hwrm_queue_vlanpri2pri_cfg_output {
37385 	/* The specific error status for the command. */
37386 	uint16_t	error_code;
37387 	/* The HWRM command request type. */
37388 	uint16_t	req_type;
37389 	/* The sequence ID from the original command. */
37390 	uint16_t	seq_id;
37391 	/* The length of the response data in number of bytes. */
37392 	uint16_t	resp_len;
37393 	uint8_t	unused_0[7];
37394 	/*
37395 	 * This field is used in Output records to indicate that the output
37396 	 * is completely written to RAM. This field should be read as '1'
37397 	 * to indicate that the output has been completely written. When
37398 	 * writing a command completion or response to an internal processor,
37399 	 * the order of writes has to be such that this field is written last.
37400 	 */
37401 	uint8_t	valid;
37402 } hwrm_queue_vlanpri2pri_cfg_output_t, *phwrm_queue_vlanpri2pri_cfg_output_t;
37403 
37404 /*************************
37405  * hwrm_queue_global_cfg *
37406  *************************/
37407 
37408 
37409 /* hwrm_queue_global_cfg_input (size:192b/24B) */
37410 
37411 typedef struct hwrm_queue_global_cfg_input {
37412 	/* The HWRM command request type. */
37413 	uint16_t	req_type;
37414 	/*
37415 	 * The completion ring to send the completion event on. This should
37416 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37417 	 */
37418 	uint16_t	cmpl_ring;
37419 	/*
37420 	 * The sequence ID is used by the driver for tracking multiple
37421 	 * commands. This ID is treated as opaque data by the firmware and
37422 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37423 	 */
37424 	uint16_t	seq_id;
37425 	/*
37426 	 * The target ID of the command:
37427 	 * * 0x0-0xFFF8 - The function ID
37428 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37429 	 * * 0xFFFD - Reserved for user-space HWRM interface
37430 	 * * 0xFFFF - HWRM
37431 	 */
37432 	uint16_t	target_id;
37433 	/*
37434 	 * A physical address pointer pointing to a host buffer that the
37435 	 * command's response data will be written. This can be either a host
37436 	 * physical address (HPA) or a guest physical address (GPA) and must
37437 	 * point to a physically contiguous block of memory.
37438 	 */
37439 	uint64_t	resp_addr;
37440 	/*
37441 	 * Configuration mode for rx cos queues, configuring whether they
37442 	 * use one shared buffer pool (across ports or PCIe endpoints) or
37443 	 * independent per port or per endpoint buffer pools.
37444 	 */
37445 	uint8_t	mode;
37446 	/* One shared buffer pool to be used by all RX CoS queues */
37447 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_SHARED	UINT32_C(0x0)
37448 	/*
37449 	 * Each port or PCIe endpoint to use an independent buffer pool
37450 	 * for its RX CoS queues
37451 	 */
37452 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_INDEPENDENT UINT32_C(0x1)
37453 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_LAST	HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_INDEPENDENT
37454 	uint8_t	unused_0;
37455 	uint16_t	enables;
37456 	/* This bit must be '1' when the mode field is configured. */
37457 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_MODE	UINT32_C(0x1)
37458 	/*
37459 	 * This bit must be '1' when the maximum bandwidth for queue group 0
37460 	 * (g0_max_bw) is configured.
37461 	 */
37462 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G0_MAX_BW	UINT32_C(0x2)
37463 	/*
37464 	 * This bit must be '1' when the maximum bandwidth for queue group 1
37465 	 * (g1_max_bw) is configured.
37466 	 */
37467 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G1_MAX_BW	UINT32_C(0x4)
37468 	/*
37469 	 * This bit must be '1' when the maximum bandwidth for queue group 2
37470 	 * (g2_max_bw) is configured.
37471 	 */
37472 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G2_MAX_BW	UINT32_C(0x8)
37473 	/*
37474 	 * This bit must be '1' when the maximum bandwidth for queue group 3
37475 	 * (g3_max_bw) is configured.
37476 	 */
37477 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G3_MAX_BW	UINT32_C(0x10)
37478 	/*
37479 	 * Specifies the maximum receive rate, as a percentage of total link
37480 	 * bandwidth, of the receive traffic through queue group 0. A value
37481 	 * of 0 indicates no rate limit.
37482 	 *
37483 	 * A queue group is a set of queues, one per traffic class. In
37484 	 * single-host mode, each panel port has its own queue group, and thus,
37485 	 * this rate limit shapes the traffic received on a port, in this case,
37486 	 * through port 0. In multi-root or multi-host mode, each PCIe endpoint
37487 	 * on the NIC has its own queue group. In these cases, the rate limit
37488 	 * shapes the traffic sent to the host through one of the PCIe
37489 	 * endpoints, in this case endpoint 0.
37490 	 */
37491 	uint8_t	g0_max_bw;
37492 	/*
37493 	 * Specifies the maximum rate of the traffic through receive CoS queue
37494 	 * group 1 (for port 1 or PCIe endpoint 1). The rate is a percentage of
37495 	 * total link bandwidth (the sum of the bandwidths of all links). A
37496 	 * value of 0 indicates no rate limit.
37497 	 */
37498 	uint8_t	g1_max_bw;
37499 	/*
37500 	 * Specifies the maximum rate of the traffic through receive CoS queue
37501 	 * group 2 (for port 2 or PCIe endpoint 2). The rate is a percentage of
37502 	 * total link bandwidth (the sum of the bandwidths of all links). A
37503 	 * value of 0 indicates no rate limit.
37504 	 */
37505 	uint8_t	g2_max_bw;
37506 	/*
37507 	 * Specifies the maximum receive rate, in Mbps, of the receive traffic
37508 	 * through queue group 3 (for port 3 or PCIe endpoint 3). A value of 0
37509 	 * indicates no rate limit.
37510 	 */
37511 	uint8_t	g3_max_bw;
37512 } hwrm_queue_global_cfg_input_t, *phwrm_queue_global_cfg_input_t;
37513 
37514 /* hwrm_queue_global_cfg_output (size:128b/16B) */
37515 
37516 typedef struct hwrm_queue_global_cfg_output {
37517 	/* The specific error status for the command. */
37518 	uint16_t	error_code;
37519 	/* The HWRM command request type. */
37520 	uint16_t	req_type;
37521 	/* The sequence ID from the original command. */
37522 	uint16_t	seq_id;
37523 	/* The length of the response data in number of bytes. */
37524 	uint16_t	resp_len;
37525 	uint8_t	unused_0[7];
37526 	/*
37527 	 * This field is used in Output records to indicate that the output
37528 	 * is completely written to RAM. This field should be read as '1'
37529 	 * to indicate that the output has been completely written. When
37530 	 * writing a command completion or response to an internal processor,
37531 	 * the order of writes has to be such that this field is written last.
37532 	 */
37533 	uint8_t	valid;
37534 } hwrm_queue_global_cfg_output_t, *phwrm_queue_global_cfg_output_t;
37535 
37536 /**************************
37537  * hwrm_queue_global_qcfg *
37538  **************************/
37539 
37540 
37541 /* hwrm_queue_global_qcfg_input (size:128b/16B) */
37542 
37543 typedef struct hwrm_queue_global_qcfg_input {
37544 	/* The HWRM command request type. */
37545 	uint16_t	req_type;
37546 	/*
37547 	 * The completion ring to send the completion event on. This should
37548 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37549 	 */
37550 	uint16_t	cmpl_ring;
37551 	/*
37552 	 * The sequence ID is used by the driver for tracking multiple
37553 	 * commands. This ID is treated as opaque data by the firmware and
37554 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37555 	 */
37556 	uint16_t	seq_id;
37557 	/*
37558 	 * The target ID of the command:
37559 	 * * 0x0-0xFFF8 - The function ID
37560 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37561 	 * * 0xFFFD - Reserved for user-space HWRM interface
37562 	 * * 0xFFFF - HWRM
37563 	 */
37564 	uint16_t	target_id;
37565 	/*
37566 	 * A physical address pointer pointing to a host buffer that the
37567 	 * command's response data will be written. This can be either a host
37568 	 * physical address (HPA) or a guest physical address (GPA) and must
37569 	 * point to a physically contiguous block of memory.
37570 	 */
37571 	uint64_t	resp_addr;
37572 } hwrm_queue_global_qcfg_input_t, *phwrm_queue_global_qcfg_input_t;
37573 
37574 /* hwrm_queue_global_qcfg_output (size:320b/40B) */
37575 
37576 typedef struct hwrm_queue_global_qcfg_output {
37577 	/* The specific error status for the command. */
37578 	uint16_t	error_code;
37579 	/* The HWRM command request type. */
37580 	uint16_t	req_type;
37581 	/* The sequence ID from the original command. */
37582 	uint16_t	seq_id;
37583 	/* The length of the response data in number of bytes. */
37584 	uint16_t	resp_len;
37585 	/* Port or PCIe endpoint id to be mapped for buffer pool 0. */
37586 	uint8_t	buffer_pool_id0_map;
37587 	/* Port or PCIe endpoint id to be mapped for buffer pool 1. */
37588 	uint8_t	buffer_pool_id1_map;
37589 	/* Port or PCIe endpoint id to be mapped for buffer pool 2. */
37590 	uint8_t	buffer_pool_id2_map;
37591 	/* Port or PCIe endpoint id to be mapped for buffer pool 3. */
37592 	uint8_t	buffer_pool_id3_map;
37593 	/* Size of buffer pool 0 (KBytes). */
37594 	uint32_t	buffer_pool_id0_size;
37595 	/* Size of buffer pool 1 (KBytes). */
37596 	uint32_t	buffer_pool_id1_size;
37597 	/* Size of buffer pool 2 (KBytes). */
37598 	uint32_t	buffer_pool_id2_size;
37599 	/* Size of buffer pool 3 (KBytes). */
37600 	uint32_t	buffer_pool_id3_size;
37601 	uint16_t	flags;
37602 	/*
37603 	 * Enumeration denoting whether the rx buffer pool mapping is
37604 	 * per port or per PCIe endpoint
37605 	 */
37606 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING			UINT32_C(0x1)
37607 	/*
37608 	 * The buffer_pool_id[0-3]_map field represents mapping of rx
37609 	 * buffer pools to a port.
37610 	 */
37611 		#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_MAPPING_PER_PORT	UINT32_C(0x0)
37612 	/*
37613 	 * The buffer_pool_id[0-3]_map field represents mapping of rx
37614 	 * buffer pools to a PCIe endpoint.
37615 	 */
37616 		#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_MAPPING_PER_ENDPOINT  UINT32_C(0x1)
37617 		#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_LAST		HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_MAPPING_PER_ENDPOINT
37618 	/*
37619 	 * Configuration mode for rx cos queues, configuring whether they
37620 	 * use one shared buffer pool (across ports or PCIe endpoints) or
37621 	 * independent per port or per endpoint buffer pools.
37622 	 */
37623 	uint8_t	mode;
37624 	/* One shared buffer pool to be used by all RX CoS queues */
37625 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_SHARED	UINT32_C(0x0)
37626 	/*
37627 	 * Each port or PCIe endpoint to use an independent buffer pool
37628 	 * for its RX CoS queues
37629 	 */
37630 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_INDEPENDENT UINT32_C(0x1)
37631 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_LAST	HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_INDEPENDENT
37632 	uint8_t	unused_0;
37633 	/*
37634 	 * Reports the rate limit applied to traffic through receive CoS queue
37635 	 * group 0. The rate limit is a percentage of total link bandwidth. A
37636 	 * value of 0 indicates no rate limit.
37637 	 *
37638 	 * A queue group is a set of queues, one per traffic class. In
37639 	 * single-host mode, each panel port has its own queue group, and thus,
37640 	 * this rate limit shapes the traffic received on a port, in this case,
37641 	 * through port 0. In multi-root or multi-host mode, each PCIe endpoint
37642 	 * on the NIC has its own queue group. In these cases, the rate limit
37643 	 * shapes the traffic sent to the host through one of the PCIe
37644 	 * endpoints, in this case endpoint 0.
37645 	 */
37646 	uint8_t	g0_max_bw;
37647 	/*
37648 	 * Reports the rate limit applied to traffic through receive CoS queue
37649 	 * group 1 (for port 1 or PCIe endpoint 1). The rate limit is a
37650 	 * percentage of total link bandwidth. A value of 0 indicates no rate
37651 	 * limit.
37652 	 */
37653 	uint8_t	g1_max_bw;
37654 	/*
37655 	 * Reports the rate limit applied to traffic through receive CoS queue
37656 	 * group 2 (for port 2 or PCIe endpoint 2). The rate limit is a
37657 	 * percentage of total link bandwidth. A value of 0 indicates no rate
37658 	 * limit.
37659 	 */
37660 	uint8_t	g2_max_bw;
37661 	/*
37662 	 * Reports the rate limit applied to traffic through receive CoS queue
37663 	 * group 3 (for port 3 or PCIe endpoint 3). The rate limit is a
37664 	 * percentage of total link bandwidth. A value of 0 indicates no rate
37665 	 * limit.
37666 	 */
37667 	uint8_t	g3_max_bw;
37668 	uint8_t	unused_1[3];
37669 	/*
37670 	 * This field is used in Output records to indicate that the output
37671 	 * is completely written to RAM. This field should be read as '1'
37672 	 * to indicate that the output has been completely written. When
37673 	 * writing a command completion or response to an internal processor,
37674 	 * the order of writes has to be such that this field is written last.
37675 	 */
37676 	uint8_t	valid;
37677 } hwrm_queue_global_qcfg_output_t, *phwrm_queue_global_qcfg_output_t;
37678 
37679 /****************************************
37680  * hwrm_queue_adptv_qos_rx_feature_qcfg *
37681  ****************************************/
37682 
37683 
37684 /* hwrm_queue_adptv_qos_rx_feature_qcfg_input (size:128b/16B) */
37685 
37686 typedef struct hwrm_queue_adptv_qos_rx_feature_qcfg_input {
37687 	/* The HWRM command request type. */
37688 	uint16_t	req_type;
37689 	/*
37690 	 * The completion ring to send the completion event on. This should
37691 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37692 	 */
37693 	uint16_t	cmpl_ring;
37694 	/*
37695 	 * The sequence ID is used by the driver for tracking multiple
37696 	 * commands. This ID is treated as opaque data by the firmware and
37697 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37698 	 */
37699 	uint16_t	seq_id;
37700 	/*
37701 	 * The target ID of the command:
37702 	 * * 0x0-0xFFF8 - The function ID
37703 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37704 	 * * 0xFFFD - Reserved for user-space HWRM interface
37705 	 * * 0xFFFF - HWRM
37706 	 */
37707 	uint16_t	target_id;
37708 	/*
37709 	 * A physical address pointer pointing to a host buffer that the
37710 	 * command's response data will be written. This can be either a host
37711 	 * physical address (HPA) or a guest physical address (GPA) and must
37712 	 * point to a physically contiguous block of memory.
37713 	 */
37714 	uint64_t	resp_addr;
37715 } hwrm_queue_adptv_qos_rx_feature_qcfg_input_t, *phwrm_queue_adptv_qos_rx_feature_qcfg_input_t;
37716 
37717 /* hwrm_queue_adptv_qos_rx_feature_qcfg_output (size:128b/16B) */
37718 
37719 typedef struct hwrm_queue_adptv_qos_rx_feature_qcfg_output {
37720 	/* The specific error status for the command. */
37721 	uint16_t	error_code;
37722 	/* The HWRM command request type. */
37723 	uint16_t	req_type;
37724 	/* The sequence ID from the original command. */
37725 	uint16_t	seq_id;
37726 	/* The length of the response data in number of bytes. */
37727 	uint16_t	resp_len;
37728 	/*
37729 	 * Bitmask indicating which RX CoS queues are enabled or disabled.
37730 	 *
37731 	 * Each bit represents a specific queue where bit 0 represents
37732 	 * queue 0 and bit 7 represents queue 7.
37733 	 * A value of 0 indicates that the queue is not enabled.
37734 	 * A value of 1 indicates that the queue is enabled.
37735 	 */
37736 	uint8_t	queue_enable;
37737 	/* If set to 1, then the queue is enabled. */
37738 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE	UINT32_C(0x1)
37739 	/* Queue is disabled. */
37740 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED  UINT32_C(0x0)
37741 	/* Queue is enabled. */
37742 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED   UINT32_C(0x1)
37743 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
37744 	/* If set to 1, then the queue is enabled. */
37745 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE	UINT32_C(0x2)
37746 	/* Queue is disabled. */
37747 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED  (UINT32_C(0x0) << 1)
37748 	/* Queue is enabled. */
37749 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED   (UINT32_C(0x1) << 1)
37750 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
37751 	/* If set to 1, then the queue is enabled. */
37752 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE	UINT32_C(0x4)
37753 	/* Queue is disabled. */
37754 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED  (UINT32_C(0x0) << 2)
37755 	/* Queue is enabled. */
37756 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED   (UINT32_C(0x1) << 2)
37757 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
37758 	/* If set to 1, then the queue is enabled. */
37759 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE	UINT32_C(0x8)
37760 	/* Queue is disabled. */
37761 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED  (UINT32_C(0x0) << 3)
37762 	/* Queue is enabled. */
37763 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED   (UINT32_C(0x1) << 3)
37764 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
37765 	/* If set to 1, then the queue is enabled. */
37766 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE	UINT32_C(0x10)
37767 	/* Queue is disabled. */
37768 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED  (UINT32_C(0x0) << 4)
37769 	/* Queue is enabled. */
37770 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED   (UINT32_C(0x1) << 4)
37771 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
37772 	/* If set to 1, then the queue is enabled. */
37773 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE	UINT32_C(0x20)
37774 	/* Queue is disabled. */
37775 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED  (UINT32_C(0x0) << 5)
37776 	/* Queue is enabled. */
37777 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED   (UINT32_C(0x1) << 5)
37778 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
37779 	/* If set to 1, then the queue is enabled. */
37780 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE	UINT32_C(0x40)
37781 	/* Queue is disabled. */
37782 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED  (UINT32_C(0x0) << 6)
37783 	/* Queue is enabled. */
37784 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED   (UINT32_C(0x1) << 6)
37785 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
37786 	/* If set to 1, then the queue is enabled. */
37787 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE	UINT32_C(0x80)
37788 	/* Queue is disabled. */
37789 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED  (UINT32_C(0x0) << 7)
37790 	/* Queue is enabled. */
37791 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED   (UINT32_C(0x1) << 7)
37792 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
37793 	/*
37794 	 * Bitmask indicating which CoS queues are lossy or lossless.
37795 	 * This setting is kept same across Rx and Tx directions, despite
37796 	 * the name mentioning only Rx. Each bit represents a specific queue
37797 	 * where bit 0 represents queue 0 and bit 7 represents queue 7.
37798 	 * A value of 0 indicates that the queue is lossy.
37799 	 * A value of 1 indicates that the queue is lossless.
37800 	 */
37801 	uint8_t	queue_mode;
37802 	/* If set to 0, then the queue is lossy, else lossless. */
37803 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE	UINT32_C(0x1)
37804 	/* Lossy (best-effort). */
37805 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LOSSY	UINT32_C(0x0)
37806 	/* Lossless. */
37807 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LOSSLESS  UINT32_C(0x1)
37808 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LOSSLESS
37809 	/* If set to 0, then the queue is lossy, else lossless. */
37810 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE	UINT32_C(0x2)
37811 	/* Lossy (best-effort). */
37812 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LOSSY	(UINT32_C(0x0) << 1)
37813 	/* Lossless. */
37814 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LOSSLESS  (UINT32_C(0x1) << 1)
37815 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LOSSLESS
37816 	/* If set to 0, then the queue is lossy, else lossless. */
37817 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE	UINT32_C(0x4)
37818 	/* Lossy (best-effort). */
37819 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LOSSY	(UINT32_C(0x0) << 2)
37820 	/* Lossless. */
37821 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LOSSLESS  (UINT32_C(0x1) << 2)
37822 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LOSSLESS
37823 	/* If set to 0, then the queue is lossy, else lossless. */
37824 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE	UINT32_C(0x8)
37825 	/* Lossy (best-effort). */
37826 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LOSSY	(UINT32_C(0x0) << 3)
37827 	/* Lossless. */
37828 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LOSSLESS  (UINT32_C(0x1) << 3)
37829 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LOSSLESS
37830 	/* If set to 0, then the queue is lossy, else lossless. */
37831 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE	UINT32_C(0x10)
37832 	/* Lossy (best-effort). */
37833 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LOSSY	(UINT32_C(0x0) << 4)
37834 	/* Lossless. */
37835 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LOSSLESS  (UINT32_C(0x1) << 4)
37836 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LOSSLESS
37837 	/* If set to 0, then the queue is lossy, else lossless. */
37838 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE	UINT32_C(0x20)
37839 	/* Lossy (best-effort). */
37840 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LOSSY	(UINT32_C(0x0) << 5)
37841 	/* Lossless. */
37842 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LOSSLESS  (UINT32_C(0x1) << 5)
37843 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LOSSLESS
37844 	/* If set to 0, then the queue is lossy, else lossless. */
37845 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE	UINT32_C(0x40)
37846 	/* Lossy (best-effort). */
37847 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LOSSY	(UINT32_C(0x0) << 6)
37848 	/* Lossless. */
37849 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LOSSLESS  (UINT32_C(0x1) << 6)
37850 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LOSSLESS
37851 	/* If set to 0, then the queue is lossy, else lossless. */
37852 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE	UINT32_C(0x80)
37853 	/* Lossy (best-effort). */
37854 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LOSSY	(UINT32_C(0x0) << 7)
37855 	/* Lossless. */
37856 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LOSSLESS  (UINT32_C(0x1) << 7)
37857 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LOSSLESS
37858 	uint8_t	unused_0[5];
37859 	/*
37860 	 * This field is used in Output records to indicate that the output
37861 	 * is completely written to RAM. This field should be read as '1'
37862 	 * to indicate that the output has been completely written. When
37863 	 * writing a command completion or response to an internal processor,
37864 	 * the order of writes has to be such that this field is written last.
37865 	 */
37866 	uint8_t	valid;
37867 } hwrm_queue_adptv_qos_rx_feature_qcfg_output_t, *phwrm_queue_adptv_qos_rx_feature_qcfg_output_t;
37868 
37869 /***************************************
37870  * hwrm_queue_adptv_qos_rx_feature_cfg *
37871  ***************************************/
37872 
37873 
37874 /* hwrm_queue_adptv_qos_rx_feature_cfg_input (size:192b/24B) */
37875 
37876 typedef struct hwrm_queue_adptv_qos_rx_feature_cfg_input {
37877 	/* The HWRM command request type. */
37878 	uint16_t	req_type;
37879 	/*
37880 	 * The completion ring to send the completion event on. This should
37881 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37882 	 */
37883 	uint16_t	cmpl_ring;
37884 	/*
37885 	 * The sequence ID is used by the driver for tracking multiple
37886 	 * commands. This ID is treated as opaque data by the firmware and
37887 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37888 	 */
37889 	uint16_t	seq_id;
37890 	/*
37891 	 * The target ID of the command:
37892 	 * * 0x0-0xFFF8 - The function ID
37893 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37894 	 * * 0xFFFD - Reserved for user-space HWRM interface
37895 	 * * 0xFFFF - HWRM
37896 	 */
37897 	uint16_t	target_id;
37898 	/*
37899 	 * A physical address pointer pointing to a host buffer that the
37900 	 * command's response data will be written. This can be either a host
37901 	 * physical address (HPA) or a guest physical address (GPA) and must
37902 	 * point to a physically contiguous block of memory.
37903 	 */
37904 	uint64_t	resp_addr;
37905 	uint32_t	enables;
37906 	/* This bit must be '1' for the queue_enable field to be configured. */
37907 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_ENABLES_QUEUE_ENABLE	UINT32_C(0x1)
37908 	/* This bit must be '1' for the queue_mode field to be configured. */
37909 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_ENABLES_QUEUE_MODE	UINT32_C(0x2)
37910 	/*
37911 	 * Bitmask indicating which RX CoS queues are enabled or disabled.
37912 	 *
37913 	 * Each bit represents a specific queue where bit 0 represents
37914 	 * queue 0 and bit 7 represents queue 7.
37915 	 * A value of 0 indicates that the queue is not enabled.
37916 	 * A value of 1 indicates that the queue is enabled.
37917 	 */
37918 	uint8_t	queue_enable;
37919 	/* If set to 1, then the queue is enabled. */
37920 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE	UINT32_C(0x1)
37921 	/* Queue is disabled. */
37922 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED  UINT32_C(0x0)
37923 	/* Queue is enabled. */
37924 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED   UINT32_C(0x1)
37925 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
37926 	/* If set to 1, then the queue is enabled. */
37927 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE	UINT32_C(0x2)
37928 	/* Queue is disabled. */
37929 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED  (UINT32_C(0x0) << 1)
37930 	/* Queue is enabled. */
37931 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED   (UINT32_C(0x1) << 1)
37932 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
37933 	/* If set to 1, then the queue is enabled. */
37934 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE	UINT32_C(0x4)
37935 	/* Queue is disabled. */
37936 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED  (UINT32_C(0x0) << 2)
37937 	/* Queue is enabled. */
37938 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED   (UINT32_C(0x1) << 2)
37939 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
37940 	/* If set to 1, then the queue is enabled. */
37941 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE	UINT32_C(0x8)
37942 	/* Queue is disabled. */
37943 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED  (UINT32_C(0x0) << 3)
37944 	/* Queue is enabled. */
37945 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED   (UINT32_C(0x1) << 3)
37946 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
37947 	/* If set to 1, then the queue is enabled. */
37948 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE	UINT32_C(0x10)
37949 	/* Queue is disabled. */
37950 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED  (UINT32_C(0x0) << 4)
37951 	/* Queue is enabled. */
37952 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED   (UINT32_C(0x1) << 4)
37953 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
37954 	/* If set to 1, then the queue is enabled. */
37955 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE	UINT32_C(0x20)
37956 	/* Queue is disabled. */
37957 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED  (UINT32_C(0x0) << 5)
37958 	/* Queue is enabled. */
37959 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED   (UINT32_C(0x1) << 5)
37960 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
37961 	/* If set to 1, then the queue is enabled. */
37962 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE	UINT32_C(0x40)
37963 	/* Queue is disabled. */
37964 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED  (UINT32_C(0x0) << 6)
37965 	/* Queue is enabled. */
37966 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED   (UINT32_C(0x1) << 6)
37967 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
37968 	/* If set to 1, then the queue is enabled. */
37969 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE	UINT32_C(0x80)
37970 	/* Queue is disabled. */
37971 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED  (UINT32_C(0x0) << 7)
37972 	/* Queue is enabled. */
37973 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED   (UINT32_C(0x1) << 7)
37974 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
37975 	/*
37976 	 * Bitmask indicating which CoS queues are lossy or lossless.
37977 	 * This setting is kept symmetric (or same) across Tx and Rx.
37978 	 * Each bit represents a specific queue where bit 0 represents
37979 	 * queue 0 and bit 7 represents queue 7.
37980 	 * A value of 0 indicates that the queue is lossy.
37981 	 * A value of 1 indicates that the queue is lossless.
37982 	 */
37983 	uint8_t	queue_mode;
37984 	/* If set to 0, then the queue is lossy, else lossless. */
37985 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE	UINT32_C(0x1)
37986 	/* Lossy (best-effort). */
37987 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LOSSY	UINT32_C(0x0)
37988 	/* Lossless. */
37989 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LOSSLESS  UINT32_C(0x1)
37990 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LOSSLESS
37991 	/* If set to 0, then the queue is lossy, else lossless. */
37992 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE	UINT32_C(0x2)
37993 	/* Lossy (best-effort). */
37994 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LOSSY	(UINT32_C(0x0) << 1)
37995 	/* Lossless. */
37996 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LOSSLESS  (UINT32_C(0x1) << 1)
37997 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LOSSLESS
37998 	/* If set to 0, then the queue is lossy, else lossless. */
37999 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE	UINT32_C(0x4)
38000 	/* Lossy (best-effort). */
38001 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LOSSY	(UINT32_C(0x0) << 2)
38002 	/* Lossless. */
38003 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LOSSLESS  (UINT32_C(0x1) << 2)
38004 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LOSSLESS
38005 	/* If set to 0, then the queue is lossy, else lossless. */
38006 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE	UINT32_C(0x8)
38007 	/* Lossy (best-effort). */
38008 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LOSSY	(UINT32_C(0x0) << 3)
38009 	/* Lossless. */
38010 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LOSSLESS  (UINT32_C(0x1) << 3)
38011 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LOSSLESS
38012 	/* If set to 0, then the queue is lossy, else lossless. */
38013 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE	UINT32_C(0x10)
38014 	/* Lossy (best-effort). */
38015 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LOSSY	(UINT32_C(0x0) << 4)
38016 	/* Lossless. */
38017 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LOSSLESS  (UINT32_C(0x1) << 4)
38018 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LOSSLESS
38019 	/* If set to 0, then the queue is lossy, else lossless. */
38020 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE	UINT32_C(0x20)
38021 	/* Lossy (best-effort). */
38022 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LOSSY	(UINT32_C(0x0) << 5)
38023 	/* Lossless. */
38024 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LOSSLESS  (UINT32_C(0x1) << 5)
38025 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LOSSLESS
38026 	/* If set to 0, then the queue is lossy, else lossless. */
38027 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE	UINT32_C(0x40)
38028 	/* Lossy (best-effort). */
38029 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LOSSY	(UINT32_C(0x0) << 6)
38030 	/* Lossless. */
38031 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LOSSLESS  (UINT32_C(0x1) << 6)
38032 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LOSSLESS
38033 	/* If set to 0, then the queue is lossy, else lossless. */
38034 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE	UINT32_C(0x80)
38035 	/* Lossy (best-effort). */
38036 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LOSSY	(UINT32_C(0x0) << 7)
38037 	/* Lossless. */
38038 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LOSSLESS  (UINT32_C(0x1) << 7)
38039 		#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LAST	HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LOSSLESS
38040 	uint8_t	unused_0[2];
38041 } hwrm_queue_adptv_qos_rx_feature_cfg_input_t, *phwrm_queue_adptv_qos_rx_feature_cfg_input_t;
38042 
38043 /* hwrm_queue_adptv_qos_rx_feature_cfg_output (size:128b/16B) */
38044 
38045 typedef struct hwrm_queue_adptv_qos_rx_feature_cfg_output {
38046 	/* The specific error status for the command. */
38047 	uint16_t	error_code;
38048 	/* The HWRM command request type. */
38049 	uint16_t	req_type;
38050 	/* The sequence ID from the original command. */
38051 	uint16_t	seq_id;
38052 	/* The length of the response data in number of bytes. */
38053 	uint16_t	resp_len;
38054 	uint8_t	unused_0[7];
38055 	/*
38056 	 * This field is used in Output records to indicate that the output
38057 	 * is completely written to RAM. This field should be read as '1'
38058 	 * to indicate that the output has been completely written. When
38059 	 * writing a command completion or response to an internal processor,
38060 	 * the order of writes has to be such that this field is written last.
38061 	 */
38062 	uint8_t	valid;
38063 } hwrm_queue_adptv_qos_rx_feature_cfg_output_t, *phwrm_queue_adptv_qos_rx_feature_cfg_output_t;
38064 
38065 /****************************************
38066  * hwrm_queue_adptv_qos_tx_feature_qcfg *
38067  ****************************************/
38068 
38069 
38070 /* hwrm_queue_adptv_qos_tx_feature_qcfg_input (size:128b/16B) */
38071 
38072 typedef struct hwrm_queue_adptv_qos_tx_feature_qcfg_input {
38073 	/* The HWRM command request type. */
38074 	uint16_t	req_type;
38075 	/*
38076 	 * The completion ring to send the completion event on. This should
38077 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
38078 	 */
38079 	uint16_t	cmpl_ring;
38080 	/*
38081 	 * The sequence ID is used by the driver for tracking multiple
38082 	 * commands. This ID is treated as opaque data by the firmware and
38083 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
38084 	 */
38085 	uint16_t	seq_id;
38086 	/*
38087 	 * The target ID of the command:
38088 	 * * 0x0-0xFFF8 - The function ID
38089 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
38090 	 * * 0xFFFD - Reserved for user-space HWRM interface
38091 	 * * 0xFFFF - HWRM
38092 	 */
38093 	uint16_t	target_id;
38094 	/*
38095 	 * A physical address pointer pointing to a host buffer that the
38096 	 * command's response data will be written. This can be either a host
38097 	 * physical address (HPA) or a guest physical address (GPA) and must
38098 	 * point to a physically contiguous block of memory.
38099 	 */
38100 	uint64_t	resp_addr;
38101 } hwrm_queue_adptv_qos_tx_feature_qcfg_input_t, *phwrm_queue_adptv_qos_tx_feature_qcfg_input_t;
38102 
38103 /* hwrm_queue_adptv_qos_tx_feature_qcfg_output (size:128b/16B) */
38104 
38105 typedef struct hwrm_queue_adptv_qos_tx_feature_qcfg_output {
38106 	/* The specific error status for the command. */
38107 	uint16_t	error_code;
38108 	/* The HWRM command request type. */
38109 	uint16_t	req_type;
38110 	/* The sequence ID from the original command. */
38111 	uint16_t	seq_id;
38112 	/* The length of the response data in number of bytes. */
38113 	uint16_t	resp_len;
38114 	/*
38115 	 * Bitmask indicating which TX CoS queues are enabled or disabled.
38116 	 *
38117 	 * Each bit represents a specific queue where bit 0 represents
38118 	 * queue 0 and bit 7 represents queue 7.
38119 	 * A value of 0 indicates that the queue is not enabled.
38120 	 * A value of 1 indicates that the queue is enabled.
38121 	 */
38122 	uint8_t	queue_enable;
38123 	/* If set to 1, then the queue is enabled. */
38124 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE	UINT32_C(0x1)
38125 	/* Queue is disabled. */
38126 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED  UINT32_C(0x0)
38127 	/* Queue is enabled. */
38128 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED   UINT32_C(0x1)
38129 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
38130 	/* If set to 1, then the queue is enabled. */
38131 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE	UINT32_C(0x2)
38132 	/* Queue is disabled. */
38133 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED  (UINT32_C(0x0) << 1)
38134 	/* Queue is enabled. */
38135 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED   (UINT32_C(0x1) << 1)
38136 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
38137 	/* If set to 1, then the queue is enabled. */
38138 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE	UINT32_C(0x4)
38139 	/* Queue is disabled. */
38140 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED  (UINT32_C(0x0) << 2)
38141 	/* Queue is enabled. */
38142 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED   (UINT32_C(0x1) << 2)
38143 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
38144 	/* If set to 1, then the queue is enabled. */
38145 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE	UINT32_C(0x8)
38146 	/* Queue is disabled. */
38147 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED  (UINT32_C(0x0) << 3)
38148 	/* Queue is enabled. */
38149 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED   (UINT32_C(0x1) << 3)
38150 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
38151 	/* If set to 1, then the queue is enabled. */
38152 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE	UINT32_C(0x10)
38153 	/* Queue is disabled. */
38154 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED  (UINT32_C(0x0) << 4)
38155 	/* Queue is enabled. */
38156 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED   (UINT32_C(0x1) << 4)
38157 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
38158 	/* If set to 1, then the queue is enabled. */
38159 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE	UINT32_C(0x20)
38160 	/* Queue is disabled. */
38161 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED  (UINT32_C(0x0) << 5)
38162 	/* Queue is enabled. */
38163 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED   (UINT32_C(0x1) << 5)
38164 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
38165 	/* If set to 1, then the queue is enabled. */
38166 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE	UINT32_C(0x40)
38167 	/* Queue is disabled. */
38168 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED  (UINT32_C(0x0) << 6)
38169 	/* Queue is enabled. */
38170 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED   (UINT32_C(0x1) << 6)
38171 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
38172 	/* If set to 1, then the queue is enabled. */
38173 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE	UINT32_C(0x80)
38174 	/* Queue is disabled. */
38175 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED  (UINT32_C(0x0) << 7)
38176 	/* Queue is enabled. */
38177 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED   (UINT32_C(0x1) << 7)
38178 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
38179 	uint8_t	unused_0[6];
38180 	/*
38181 	 * This field is used in Output records to indicate that the output
38182 	 * is completely written to RAM. This field should be read as '1'
38183 	 * to indicate that the output has been completely written. When
38184 	 * writing a command completion or response to an internal processor,
38185 	 * the order of writes has to be such that this field is written last.
38186 	 */
38187 	uint8_t	valid;
38188 } hwrm_queue_adptv_qos_tx_feature_qcfg_output_t, *phwrm_queue_adptv_qos_tx_feature_qcfg_output_t;
38189 
38190 /***************************************
38191  * hwrm_queue_adptv_qos_tx_feature_cfg *
38192  ***************************************/
38193 
38194 
38195 /* hwrm_queue_adptv_qos_tx_feature_cfg_input (size:192b/24B) */
38196 
38197 typedef struct hwrm_queue_adptv_qos_tx_feature_cfg_input {
38198 	/* The HWRM command request type. */
38199 	uint16_t	req_type;
38200 	/*
38201 	 * The completion ring to send the completion event on. This should
38202 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
38203 	 */
38204 	uint16_t	cmpl_ring;
38205 	/*
38206 	 * The sequence ID is used by the driver for tracking multiple
38207 	 * commands. This ID is treated as opaque data by the firmware and
38208 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
38209 	 */
38210 	uint16_t	seq_id;
38211 	/*
38212 	 * The target ID of the command:
38213 	 * * 0x0-0xFFF8 - The function ID
38214 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
38215 	 * * 0xFFFD - Reserved for user-space HWRM interface
38216 	 * * 0xFFFF - HWRM
38217 	 */
38218 	uint16_t	target_id;
38219 	/*
38220 	 * A physical address pointer pointing to a host buffer that the
38221 	 * command's response data will be written. This can be either a host
38222 	 * physical address (HPA) or a guest physical address (GPA) and must
38223 	 * point to a physically contiguous block of memory.
38224 	 */
38225 	uint64_t	resp_addr;
38226 	uint32_t	enables;
38227 	/* This bit must be '1' for the queue_enable field to be configured. */
38228 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_ENABLES_QUEUE_ENABLE	UINT32_C(0x1)
38229 	/*
38230 	 * Bitmask indicating which TX CoS queues are enabled or disabled.
38231 	 *
38232 	 * Each bit represents a specific queue where bit 0 represents
38233 	 * queue 0 and bit 7 represents queue 7.
38234 	 * A value of 0 indicates that the queue is not enabled.
38235 	 * A value of 1 indicates that the queue is enabled.
38236 	 */
38237 	uint8_t	queue_enable;
38238 	/* If set to 1, then the queue is enabled. */
38239 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE	UINT32_C(0x1)
38240 	/* Queue is disabled. */
38241 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED  UINT32_C(0x0)
38242 	/* Queue is enabled. */
38243 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED   UINT32_C(0x1)
38244 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
38245 	/* If set to 1, then the queue is enabled. */
38246 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE	UINT32_C(0x2)
38247 	/* Queue is disabled. */
38248 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED  (UINT32_C(0x0) << 1)
38249 	/* Queue is enabled. */
38250 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED   (UINT32_C(0x1) << 1)
38251 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
38252 	/* If set to 1, then the queue is enabled. */
38253 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE	UINT32_C(0x4)
38254 	/* Queue is disabled. */
38255 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED  (UINT32_C(0x0) << 2)
38256 	/* Queue is enabled. */
38257 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED   (UINT32_C(0x1) << 2)
38258 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
38259 	/* If set to 1, then the queue is enabled. */
38260 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE	UINT32_C(0x8)
38261 	/* Queue is disabled. */
38262 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED  (UINT32_C(0x0) << 3)
38263 	/* Queue is enabled. */
38264 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED   (UINT32_C(0x1) << 3)
38265 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
38266 	/* If set to 1, then the queue is enabled. */
38267 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE	UINT32_C(0x10)
38268 	/* Queue is disabled. */
38269 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED  (UINT32_C(0x0) << 4)
38270 	/* Queue is enabled. */
38271 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED   (UINT32_C(0x1) << 4)
38272 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
38273 	/* If set to 1, then the queue is enabled. */
38274 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE	UINT32_C(0x20)
38275 	/* Queue is disabled. */
38276 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED  (UINT32_C(0x0) << 5)
38277 	/* Queue is enabled. */
38278 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED   (UINT32_C(0x1) << 5)
38279 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
38280 	/* If set to 1, then the queue is enabled. */
38281 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE	UINT32_C(0x40)
38282 	/* Queue is disabled. */
38283 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED  (UINT32_C(0x0) << 6)
38284 	/* Queue is enabled. */
38285 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED   (UINT32_C(0x1) << 6)
38286 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
38287 	/* If set to 1, then the queue is enabled. */
38288 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE	UINT32_C(0x80)
38289 	/* Queue is disabled. */
38290 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED  (UINT32_C(0x0) << 7)
38291 	/* Queue is enabled. */
38292 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED   (UINT32_C(0x1) << 7)
38293 		#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_LAST	HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
38294 	uint8_t	unused_0[3];
38295 } hwrm_queue_adptv_qos_tx_feature_cfg_input_t, *phwrm_queue_adptv_qos_tx_feature_cfg_input_t;
38296 
38297 /* hwrm_queue_adptv_qos_tx_feature_cfg_output (size:128b/16B) */
38298 
38299 typedef struct hwrm_queue_adptv_qos_tx_feature_cfg_output {
38300 	/* The specific error status for the command. */
38301 	uint16_t	error_code;
38302 	/* The HWRM command request type. */
38303 	uint16_t	req_type;
38304 	/* The sequence ID from the original command. */
38305 	uint16_t	seq_id;
38306 	/* The length of the response data in number of bytes. */
38307 	uint16_t	resp_len;
38308 	uint8_t	unused_0[7];
38309 	/*
38310 	 * This field is used in Output records to indicate that the output
38311 	 * is completely written to RAM. This field should be read as '1'
38312 	 * to indicate that the output has been completely written. When
38313 	 * writing a command completion or response to an internal processor,
38314 	 * the order of writes has to be such that this field is written last.
38315 	 */
38316 	uint8_t	valid;
38317 } hwrm_queue_adptv_qos_tx_feature_cfg_output_t, *phwrm_queue_adptv_qos_tx_feature_cfg_output_t;
38318 
38319 /********************
38320  * hwrm_queue_qcaps *
38321  ********************/
38322 
38323 
38324 /* hwrm_queue_qcaps_input (size:128b/16B) */
38325 
38326 typedef struct hwrm_queue_qcaps_input {
38327 	/* The HWRM command request type. */
38328 	uint16_t	req_type;
38329 	/*
38330 	 * The completion ring to send the completion event on. This should
38331 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
38332 	 */
38333 	uint16_t	cmpl_ring;
38334 	/*
38335 	 * The sequence ID is used by the driver for tracking multiple
38336 	 * commands. This ID is treated as opaque data by the firmware and
38337 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
38338 	 */
38339 	uint16_t	seq_id;
38340 	/*
38341 	 * The target ID of the command:
38342 	 * * 0x0-0xFFF8 - The function ID
38343 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
38344 	 * * 0xFFFD - Reserved for user-space HWRM interface
38345 	 * * 0xFFFF - HWRM
38346 	 */
38347 	uint16_t	target_id;
38348 	/*
38349 	 * A physical address pointer pointing to a host buffer that the
38350 	 * command's response data will be written. This can be either a host
38351 	 * physical address (HPA) or a guest physical address (GPA) and must
38352 	 * point to a physically contiguous block of memory.
38353 	 */
38354 	uint64_t	resp_addr;
38355 } hwrm_queue_qcaps_input_t, *phwrm_queue_qcaps_input_t;
38356 
38357 /* hwrm_queue_qcaps_output (size:256b/32B) */
38358 
38359 typedef struct hwrm_queue_qcaps_output {
38360 	/* The specific error status for the command. */
38361 	uint16_t	error_code;
38362 	/* The HWRM command request type. */
38363 	uint16_t	req_type;
38364 	/* The sequence ID from the original command. */
38365 	uint16_t	seq_id;
38366 	/* The length of the response data in number of bytes. */
38367 	uint16_t	resp_len;
38368 	/* Adaptive QoS RX feature parameter capability flags. */
38369 	uint32_t	rx_feature_params;
38370 	/*
38371 	 * When this bit is '1' the capability to configure queue_enable
38372 	 * is supported.
38373 	 * If set to '0', then the capability to configure queue_enable
38374 	 * is not supported.
38375 	 */
38376 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_FEATURE_PARAMS_QUEUE_ENABLE_CAP	UINT32_C(0x1)
38377 	/*
38378 	 * When this bit is '1' the capability to configure queue_mode
38379 	 * is supported.
38380 	 * If set to '0', then the capability to configure queue_mode
38381 	 * is not supported.
38382 	 */
38383 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_FEATURE_PARAMS_QUEUE_MODE_CAP	UINT32_C(0x2)
38384 	/* Adaptive QoS TX feature parameter capability flags. */
38385 	uint32_t	tx_feature_params;
38386 	/*
38387 	 * When this bit is '1' the capability to configure queue_enable
38388 	 * is supported.
38389 	 * If set to '0', then the capability to configure queue_enable
38390 	 * is not supported.
38391 	 */
38392 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_FEATURE_PARAMS_QUEUE_ENABLE_CAP	UINT32_C(0x1)
38393 	/*
38394 	 * The maximum number of queues that can be configured on this device.
38395 	 * Valid values range from 1 through 8.
38396 	 */
38397 	uint8_t	max_configurable_queues;
38398 	uint8_t	unused_0[3];
38399 	/* Adaptive QoS RX tuning parameter capability flags. */
38400 	uint32_t	rx_tuning_params;
38401 	/*
38402 	 * When this bit is '1' the capability to configure the option
38403 	 * is supported.
38404 	 * If set to '0', then the capability to configure the option
38405 	 * is not supported.
38406 	 */
38407 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_WFQ_COST_CAP			UINT32_C(0x1)
38408 	/*
38409 	 * When this bit is '1' the capability to configure the option
38410 	 * is supported.
38411 	 * If set to '0', then the capability to configure the option
38412 	 * is not supported.
38413 	 */
38414 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_WFQ_UPPER_FACTOR_CAP		UINT32_C(0x2)
38415 	/*
38416 	 * When this bit is '1' the capability to configure the option
38417 	 * is supported.
38418 	 * If set to '0', then the capability to configure the option
38419 	 * is not supported.
38420 	 */
38421 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_HYST_WINDOW_SIZE_FACTOR_CAP	UINT32_C(0x4)
38422 	/*
38423 	 * When this bit is '1' the capability to configure the option
38424 	 * is supported.
38425 	 * If set to '0', then the capability to configure the option
38426 	 * is not supported.
38427 	 */
38428 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_PCIE_BW_EFF_CAP		UINT32_C(0x8)
38429 	/*
38430 	 * When this bit is '1' the capability to configure the option
38431 	 * is supported.
38432 	 * If set to '0', then the capability to configure the option
38433 	 * is not supported.
38434 	 */
38435 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_XOFF_HEADROOM_FACTOR_CAP	UINT32_C(0x10)
38436 	/*
38437 	 * When this bit is '1' the capability to configure the option
38438 	 * is supported.
38439 	 * If set to '0', then the capability to configure the option
38440 	 * is not supported.
38441 	 */
38442 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_L2_MIN_LATENCY_CAP		UINT32_C(0x20)
38443 	/*
38444 	 * When this bit is '1' the capability to configure the option
38445 	 * is supported.
38446 	 * If set to '0', then the capability to configure the option
38447 	 * is not supported.
38448 	 */
38449 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_L2_MAX_LATENCY_CAP		UINT32_C(0x40)
38450 	/*
38451 	 * When this bit is '1' the capability to configure the option
38452 	 * is supported.
38453 	 * If set to '0', then the capability to configure the option
38454 	 * is not supported.
38455 	 */
38456 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_ROCE_MIN_LATENCY_CAP		UINT32_C(0x80)
38457 	/*
38458 	 * When this bit is '1' the capability to configure the option
38459 	 * is supported.
38460 	 * If set to '0', then the capability to configure the option
38461 	 * is not supported.
38462 	 */
38463 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_ROCE_MAX_LATENCY_CAP		UINT32_C(0x100)
38464 	/*
38465 	 * When this bit is '1' the capability to configure the option
38466 	 * is supported.
38467 	 * If set to '0', then the capability to configure the option
38468 	 * is not supported.
38469 	 */
38470 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_L2_PIPE_COS_LATENCY_CAP	UINT32_C(0x200)
38471 	/*
38472 	 * When this bit is '1' the capability to configure the option
38473 	 * is supported.
38474 	 * If set to '0', then the capability to configure the option
38475 	 * is not supported.
38476 	 */
38477 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_ROCE_PIPE_COS_LATENCY_CAP	UINT32_C(0x400)
38478 	/*
38479 	 * When this bit is '1' the capability to configure the option
38480 	 * is supported.
38481 	 * If set to '0', then the capability to configure the option
38482 	 * is not supported.
38483 	 */
38484 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_COS_SHARED_MIN_RATIO_CAP	UINT32_C(0x800)
38485 	/*
38486 	 * When this bit is '1' the capability to configure the option
38487 	 * is supported.
38488 	 * If set to '0', then the capability to configure the option
38489 	 * is not supported.
38490 	 */
38491 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_RSVD_CELLS_LIMIT_RATIO_CAP	UINT32_C(0x1000)
38492 	/*
38493 	 * When this bit is '1' the capability to configure the option
38494 	 * is supported.
38495 	 * If set to '0', then the capability to configure the option
38496 	 * is not supported.
38497 	 */
38498 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_SHAPER_REFILL_TIMER_CAP	UINT32_C(0x2000)
38499 	/* Adaptive QoS TX tuning parameter capability flags. */
38500 	uint32_t	tx_tuning_params;
38501 	/*
38502 	 * When this bit is '1' the capability to configure the option
38503 	 * is supported.
38504 	 * If set to '0', then the capability to configure the option
38505 	 * is not supported.
38506 	 */
38507 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_WFQ_COST_CAP			UINT32_C(0x1)
38508 	/*
38509 	 * When this bit is '1' the capability to configure the option
38510 	 * is supported.
38511 	 * If set to '0', then the capability to configure the option
38512 	 * is not supported.
38513 	 */
38514 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_WFQ_UPPER_FACTOR_CAP		UINT32_C(0x2)
38515 	/*
38516 	 * When this bit is '1' the capability to configure the option
38517 	 * is supported.
38518 	 * If set to '0', then the capability to configure the option
38519 	 * is not supported.
38520 	 */
38521 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_HYST_WINDOW_SIZE_FACTOR_CAP	UINT32_C(0x4)
38522 	/*
38523 	 * When this bit is '1' the capability to configure the option
38524 	 * is supported.
38525 	 * If set to '0', then the capability to configure the option
38526 	 * is not supported.
38527 	 */
38528 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_RSVD_CELLS_LIMIT_RATIO_CAP	UINT32_C(0x8)
38529 	/*
38530 	 * When this bit is '1' the capability to configure the option
38531 	 * is supported.
38532 	 * If set to '0', then the capability to configure the option
38533 	 * is not supported.
38534 	 */
38535 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_L2_MIN_LATENCY_CAP		UINT32_C(0x10)
38536 	/*
38537 	 * When this bit is '1' the capability to configure the option
38538 	 * is supported.
38539 	 * If set to '0', then the capability to configure the option
38540 	 * is not supported.
38541 	 */
38542 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_L2_MAX_LATENCY_CAP		UINT32_C(0x20)
38543 	/*
38544 	 * When this bit is '1' the capability to configure the option
38545 	 * is supported.
38546 	 * If set to '0', then the capability to configure the option
38547 	 * is not supported.
38548 	 */
38549 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_ROCE_MIN_LATENCY_CAP		UINT32_C(0x40)
38550 	/*
38551 	 * When this bit is '1' the capability to configure the option
38552 	 * is supported.
38553 	 * If set to '0', then the capability to configure the option
38554 	 * is not supported.
38555 	 */
38556 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_ROCE_MAX_LATENCY_CAP		UINT32_C(0x80)
38557 	/*
38558 	 * When this bit is '1' the capability to configure the option
38559 	 * is supported.
38560 	 * If set to '0', then the capability to configure the option
38561 	 * is not supported.
38562 	 */
38563 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_MAX_TBM_CELLS_PRERESERVED_CAP	UINT32_C(0x100)
38564 	/*
38565 	 * When this bit is '1' the capability to configure the option
38566 	 * is supported.
38567 	 * If set to '0', then the capability to configure the option
38568 	 * is not supported.
38569 	 */
38570 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_SHAPER_REFILL_TIMER_CAP	UINT32_C(0x200)
38571 	uint8_t	unused_1[3];
38572 	/*
38573 	 * This field is used in Output records to indicate that the output
38574 	 * is completely written to RAM. This field should be read as '1'
38575 	 * to indicate that the output has been completely written. When
38576 	 * writing a command completion or response to an internal processor,
38577 	 * the order of writes has to be such that this field is written last.
38578 	 */
38579 	uint8_t	valid;
38580 } hwrm_queue_qcaps_output_t, *phwrm_queue_qcaps_output_t;
38581 
38582 /***************************************
38583  * hwrm_queue_adptv_qos_rx_tuning_qcfg *
38584  ***************************************/
38585 
38586 
38587 /* hwrm_queue_adptv_qos_rx_tuning_qcfg_input (size:128b/16B) */
38588 
38589 typedef struct hwrm_queue_adptv_qos_rx_tuning_qcfg_input {
38590 	/* The HWRM command request type. */
38591 	uint16_t	req_type;
38592 	/*
38593 	 * The completion ring to send the completion event on. This should
38594 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
38595 	 */
38596 	uint16_t	cmpl_ring;
38597 	/*
38598 	 * The sequence ID is used by the driver for tracking multiple
38599 	 * commands. This ID is treated as opaque data by the firmware and
38600 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
38601 	 */
38602 	uint16_t	seq_id;
38603 	/*
38604 	 * The target ID of the command:
38605 	 * * 0x0-0xFFF8 - The function ID
38606 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
38607 	 * * 0xFFFD - Reserved for user-space HWRM interface
38608 	 * * 0xFFFF - HWRM
38609 	 */
38610 	uint16_t	target_id;
38611 	/*
38612 	 * A physical address pointer pointing to a host buffer that the
38613 	 * command's response data will be written. This can be either a host
38614 	 * physical address (HPA) or a guest physical address (GPA) and must
38615 	 * point to a physically contiguous block of memory.
38616 	 */
38617 	uint64_t	resp_addr;
38618 } hwrm_queue_adptv_qos_rx_tuning_qcfg_input_t, *phwrm_queue_adptv_qos_rx_tuning_qcfg_input_t;
38619 
38620 /* hwrm_queue_adptv_qos_rx_tuning_qcfg_output (size:576b/72B) */
38621 
38622 typedef struct hwrm_queue_adptv_qos_rx_tuning_qcfg_output {
38623 	/* The specific error status for the command. */
38624 	uint16_t	error_code;
38625 	/* The HWRM command request type. */
38626 	uint16_t	req_type;
38627 	/* The sequence ID from the original command. */
38628 	uint16_t	seq_id;
38629 	/* The length of the response data in number of bytes. */
38630 	uint16_t	resp_len;
38631 	/* Indicates max credit as required by hardware. */
38632 	uint32_t	wfq_cost;
38633 	/*
38634 	 * Specifies a factor that determines the upper bound for each
38635 	 * cos_wfq_credit_weight.
38636 	 */
38637 	uint32_t	wfq_upper_factor;
38638 	/*
38639 	 * The algorithm multiplies this factor by the MRU size to compute the
38640 	 * hysteresis window size which in turn is used in deassert
38641 	 * threshold calculations.
38642 	 */
38643 	uint32_t	hyst_window_size_factor;
38644 	/*
38645 	 * Specifies PCIe BW efficiency in the range of 0-100%. System
38646 	 * characterization determines the value of this parameter. A value of
38647 	 * less than 100% accounts for internal PCIe over-subscription. The
38648 	 * algorithm uses this parameter to determine the PCIe BW available
38649 	 * for transferring received packets to the host.
38650 	 */
38651 	uint32_t	pcie_bw_eff;
38652 	/* Scales the number of cells for xoff. */
38653 	uint32_t	xoff_headroom_factor;
38654 	/*
38655 	 * It is used to calculate the number of reserved cells for cos queues
38656 	 * configured for L2. Its value is derived from system
38657 	 * characterization.
38658 	 */
38659 	uint32_t	l2_min_latency;
38660 	/*
38661 	 * It is used to calculate the number of shared cells for cos queues
38662 	 * configured for L2. Its value is derived from system
38663 	 * characterization.
38664 	 */
38665 	uint32_t	l2_max_latency;
38666 	/*
38667 	 * It is used to calculate the number of reserved cells for cos queues
38668 	 * configured for RoCE. Its value is derived from system
38669 	 * characterization.
38670 	 */
38671 	uint32_t	roce_min_latency;
38672 	/*
38673 	 * It is used to calculate the number of shared cells for cos queues
38674 	 * configured for RoCE. Its value is derived from system
38675 	 * characterization.
38676 	 */
38677 	uint32_t	roce_max_latency;
38678 	/*
38679 	 * The algorithm uses this parameter to calculate the number of cells
38680 	 * to be excluded from the total buffer pool to account for the
38681 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
38682 	 * from system characterization.
38683 	 */
38684 	uint32_t	l2_pipe_cos_latency;
38685 	/*
38686 	 * The algorithm uses this parameter to calculate the number of cells
38687 	 * to be excluded from the total buffer pool to account for the
38688 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
38689 	 * from system characterization.
38690 	 */
38691 	uint32_t	roce_pipe_cos_latency;
38692 	/* Sets the minimum number of shared cells each cos queue can have. */
38693 	uint32_t	cos_shared_min_ratio;
38694 	/*
38695 	 * The parameter limits the total reserved cells. If the computed
38696 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
38697 	 * port_cells_avail, then the reserved cells are set to the limit
38698 	 * value. Its range of values is 0-50%.
38699 	 */
38700 	uint32_t	rsvd_cells_limit_ratio;
38701 	/*
38702 	 * This parameter is used to compute the time interval for
38703 	 * replenishing the shaper credit buckets for all RX cos queues.
38704 	 */
38705 	uint32_t	shaper_refill_timer;
38706 	uint8_t	unused_0[7];
38707 	/*
38708 	 * This field is used in Output records to indicate that the output
38709 	 * is completely written to RAM. This field should be read as '1'
38710 	 * to indicate that the output has been completely written. When
38711 	 * writing a command completion or response to an internal processor,
38712 	 * the order of writes has to be such that this field is written last.
38713 	 */
38714 	uint8_t	valid;
38715 } hwrm_queue_adptv_qos_rx_tuning_qcfg_output_t, *phwrm_queue_adptv_qos_rx_tuning_qcfg_output_t;
38716 
38717 /**************************************
38718  * hwrm_queue_adptv_qos_rx_tuning_cfg *
38719  **************************************/
38720 
38721 
38722 /* hwrm_queue_adptv_qos_rx_tuning_cfg_input (size:640b/80B) */
38723 
38724 typedef struct hwrm_queue_adptv_qos_rx_tuning_cfg_input {
38725 	/* The HWRM command request type. */
38726 	uint16_t	req_type;
38727 	/*
38728 	 * The completion ring to send the completion event on. This should
38729 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
38730 	 */
38731 	uint16_t	cmpl_ring;
38732 	/*
38733 	 * The sequence ID is used by the driver for tracking multiple
38734 	 * commands. This ID is treated as opaque data by the firmware and
38735 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
38736 	 */
38737 	uint16_t	seq_id;
38738 	/*
38739 	 * The target ID of the command:
38740 	 * * 0x0-0xFFF8 - The function ID
38741 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
38742 	 * * 0xFFFD - Reserved for user-space HWRM interface
38743 	 * * 0xFFFF - HWRM
38744 	 */
38745 	uint16_t	target_id;
38746 	/*
38747 	 * A physical address pointer pointing to a host buffer that the
38748 	 * command's response data will be written. This can be either a host
38749 	 * physical address (HPA) or a guest physical address (GPA) and must
38750 	 * point to a physically contiguous block of memory.
38751 	 */
38752 	uint64_t	resp_addr;
38753 	uint32_t	enables;
38754 	/* This bit must be '1' for the option to be configured. */
38755 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_WFQ_COST			UINT32_C(0x1)
38756 	/* This bit must be '1' for the option to be configured. */
38757 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_WFQ_UPPER_FACTOR		UINT32_C(0x2)
38758 	/* This bit must be '1' for the option to be configured. */
38759 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_HYST_WINDOW_SIZE_FACTOR	UINT32_C(0x4)
38760 	/* This bit must be '1' for the option to be configured. */
38761 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_PCIE_BW_EFF		UINT32_C(0x8)
38762 	/* This bit must be '1' for the option to be configured. */
38763 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_XOFF_HEADROOM_FACTOR	UINT32_C(0x10)
38764 	/* This bit must be '1' for the option to be configured. */
38765 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_L2_MIN_LATENCY		UINT32_C(0x20)
38766 	/* This bit must be '1' for the option to be configured. */
38767 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_L2_MAX_LATENCY		UINT32_C(0x40)
38768 	/* This bit must be '1' for the option to be configured. */
38769 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_ROCE_MIN_LATENCY		UINT32_C(0x80)
38770 	/* This bit must be '1' for the option to be configured. */
38771 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_ROCE_MAX_LATENCY		UINT32_C(0x100)
38772 	/* This bit must be '1' for the option to be configured. */
38773 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_L2_PIPE_COS_LATENCY	UINT32_C(0x200)
38774 	/* This bit must be '1' for the option to be configured. */
38775 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_ROCE_PIPE_COS_LATENCY	UINT32_C(0x400)
38776 	/* This bit must be '1' for the option to be configured. */
38777 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_COS_SHARED_MIN_RATIO	UINT32_C(0x800)
38778 	/* This bit must be '1' for the option to be configured. */
38779 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_RSVD_CELLS_LIMIT_RATIO	UINT32_C(0x1000)
38780 	/* This bit must be '1' for the option to be configured. */
38781 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_SHAPER_REFILL_TIMER	UINT32_C(0x2000)
38782 	/* Indicates max credit as required by hardware. */
38783 	uint32_t	wfq_cost;
38784 	/*
38785 	 * Specifies a factor that determines the upper bound for each
38786 	 * cos_wfq_credit_weight.
38787 	 */
38788 	uint32_t	wfq_upper_factor;
38789 	/*
38790 	 * The algorithm multiplies this factor by the MRU size to compute the
38791 	 * hysteresis window size which in turn is used in deassert
38792 	 * threshold calculations.
38793 	 */
38794 	uint32_t	hyst_window_size_factor;
38795 	/*
38796 	 * Specifies PCIe BW efficiency in the range of 0-100%. System
38797 	 * characterization determines the value of this parameter. A value of
38798 	 * less than 100% accounts for internal PCIe over-subscription. The
38799 	 * algorithm uses this parameter to determine the PCIe BW available
38800 	 * for transferring received packets to the host.
38801 	 */
38802 	uint32_t	pcie_bw_eff;
38803 	/* Scales the number of cells for xoff. */
38804 	uint32_t	xoff_headroom_factor;
38805 	/*
38806 	 * It is used to calculate the number of reserved cells for cos queues
38807 	 * configured for L2. Its value is derived from system
38808 	 * characterization.
38809 	 */
38810 	uint32_t	l2_min_latency;
38811 	/*
38812 	 * It is used to calculate the number of shared cells for cos queues
38813 	 * configured for L2. Its value is derived from system
38814 	 * characterization.
38815 	 */
38816 	uint32_t	l2_max_latency;
38817 	/*
38818 	 * It is used to calculate the number of reserved cells for cos queues
38819 	 * configured for RoCE. Its value is derived from system
38820 	 * characterization.
38821 	 */
38822 	uint32_t	roce_min_latency;
38823 	/*
38824 	 * It is used to calculate the number of shared cells for cos queues
38825 	 * configured for RoCE. Its value is derived from system
38826 	 * characterization.
38827 	 */
38828 	uint32_t	roce_max_latency;
38829 	/*
38830 	 * The algorithm uses this parameter to calculate the number of cells
38831 	 * to be excluded from the total buffer pool to account for the
38832 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
38833 	 * from system characterization.
38834 	 */
38835 	uint32_t	l2_pipe_cos_latency;
38836 	/*
38837 	 * The algorithm uses this parameter to calculate the number of cells
38838 	 * to be excluded from the total buffer pool to account for the
38839 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
38840 	 * from system characterization.
38841 	 */
38842 	uint32_t	roce_pipe_cos_latency;
38843 	/* Sets the minimum number of shared cells each cos queue can have. */
38844 	uint32_t	cos_shared_min_ratio;
38845 	/*
38846 	 * The parameter limits the total reserved cells. If the computed
38847 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
38848 	 * port_cells_avail, then the reserved cells are set to the limit
38849 	 * value. Its range of values is 0-50%.
38850 	 */
38851 	uint32_t	rsvd_cells_limit_ratio;
38852 	/*
38853 	 * This parameter is used to compute the time interval for
38854 	 * replenishing the shaper credit buckets for all RX cos queues.
38855 	 */
38856 	uint32_t	shaper_refill_timer;
38857 	uint8_t	unused_0[4];
38858 } hwrm_queue_adptv_qos_rx_tuning_cfg_input_t, *phwrm_queue_adptv_qos_rx_tuning_cfg_input_t;
38859 
38860 /* hwrm_queue_adptv_qos_rx_tuning_cfg_output (size:128b/16B) */
38861 
38862 typedef struct hwrm_queue_adptv_qos_rx_tuning_cfg_output {
38863 	/* The specific error status for the command. */
38864 	uint16_t	error_code;
38865 	/* The HWRM command request type. */
38866 	uint16_t	req_type;
38867 	/* The sequence ID from the original command. */
38868 	uint16_t	seq_id;
38869 	/* The length of the response data in number of bytes. */
38870 	uint16_t	resp_len;
38871 	uint8_t	unused_0[7];
38872 	/*
38873 	 * This field is used in Output records to indicate that the output
38874 	 * is completely written to RAM. This field should be read as '1'
38875 	 * to indicate that the output has been completely written. When
38876 	 * writing a command completion or response to an internal processor,
38877 	 * the order of writes has to be such that this field is written last.
38878 	 */
38879 	uint8_t	valid;
38880 } hwrm_queue_adptv_qos_rx_tuning_cfg_output_t, *phwrm_queue_adptv_qos_rx_tuning_cfg_output_t;
38881 
38882 /***************************************
38883  * hwrm_queue_adptv_qos_tx_tuning_qcfg *
38884  ***************************************/
38885 
38886 
38887 /* hwrm_queue_adptv_qos_tx_tuning_qcfg_input (size:128b/16B) */
38888 
38889 typedef struct hwrm_queue_adptv_qos_tx_tuning_qcfg_input {
38890 	/* The HWRM command request type. */
38891 	uint16_t	req_type;
38892 	/*
38893 	 * The completion ring to send the completion event on. This should
38894 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
38895 	 */
38896 	uint16_t	cmpl_ring;
38897 	/*
38898 	 * The sequence ID is used by the driver for tracking multiple
38899 	 * commands. This ID is treated as opaque data by the firmware and
38900 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
38901 	 */
38902 	uint16_t	seq_id;
38903 	/*
38904 	 * The target ID of the command:
38905 	 * * 0x0-0xFFF8 - The function ID
38906 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
38907 	 * * 0xFFFD - Reserved for user-space HWRM interface
38908 	 * * 0xFFFF - HWRM
38909 	 */
38910 	uint16_t	target_id;
38911 	/*
38912 	 * A physical address pointer pointing to a host buffer that the
38913 	 * command's response data will be written. This can be either a host
38914 	 * physical address (HPA) or a guest physical address (GPA) and must
38915 	 * point to a physically contiguous block of memory.
38916 	 */
38917 	uint64_t	resp_addr;
38918 } hwrm_queue_adptv_qos_tx_tuning_qcfg_input_t, *phwrm_queue_adptv_qos_tx_tuning_qcfg_input_t;
38919 
38920 /* hwrm_queue_adptv_qos_tx_tuning_qcfg_output (size:448b/56B) */
38921 
38922 typedef struct hwrm_queue_adptv_qos_tx_tuning_qcfg_output {
38923 	/* The specific error status for the command. */
38924 	uint16_t	error_code;
38925 	/* The HWRM command request type. */
38926 	uint16_t	req_type;
38927 	/* The sequence ID from the original command. */
38928 	uint16_t	seq_id;
38929 	/* The length of the response data in number of bytes. */
38930 	uint16_t	resp_len;
38931 	/* Indicates max credit as required by hardware. */
38932 	uint32_t	wfq_cost;
38933 	/*
38934 	 * Specifies a factor that determines the upper bound for each
38935 	 * cos_wfq_credit_weight.
38936 	 */
38937 	uint32_t	wfq_upper_factor;
38938 	/*
38939 	 * The algorithm multiplies this factor by the MRU size to compute the
38940 	 * hysteresis window size which in turn is used in deassert
38941 	 * threshold calculations.
38942 	 */
38943 	uint32_t	hyst_window_size_factor;
38944 	/*
38945 	 * The parameter limits the total reserved cells. If the computed
38946 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
38947 	 * port_cells_avail, then the reserved cells are set to the limit
38948 	 * value. Its range of values is 0-50%.
38949 	 */
38950 	uint32_t	rsvd_cells_limit_ratio;
38951 	/*
38952 	 * It is used to calculate the number of reserved cells for cos queues
38953 	 * configured for L2. Its value is derived from system
38954 	 * characterization.
38955 	 */
38956 	uint32_t	l2_min_latency;
38957 	/*
38958 	 * It is used to calculate the number of shared cells for cos queues
38959 	 * configured for L2. Its value is derived from system
38960 	 * characterization.
38961 	 */
38962 	uint32_t	l2_max_latency;
38963 	/*
38964 	 * It is used to calculate the number of reserved cells for cos queues
38965 	 * configured for RoCE. Its value is derived from system
38966 	 * characterization.
38967 	 */
38968 	uint32_t	roce_min_latency;
38969 	/*
38970 	 * It is used to calculate the number of shared cells for cos queues
38971 	 * configured for RoCE. Its value is derived from system
38972 	 * characterization.
38973 	 */
38974 	uint32_t	roce_max_latency;
38975 	/* Specifies the number of reserved cells TRP requires per cos queue. */
38976 	uint32_t	max_tbm_cells_prereserved;
38977 	/*
38978 	 * This parameter is used to compute the time interval for
38979 	 * replenishing the shaper credit buckets for all TX cos queues.
38980 	 */
38981 	uint32_t	shaper_refill_timer;
38982 	uint8_t	unused_0[7];
38983 	/*
38984 	 * This field is used in Output records to indicate that the output
38985 	 * is completely written to RAM. This field should be read as '1'
38986 	 * to indicate that the output has been completely written. When
38987 	 * writing a command completion or response to an internal processor,
38988 	 * the order of writes has to be such that this field is written last.
38989 	 */
38990 	uint8_t	valid;
38991 } hwrm_queue_adptv_qos_tx_tuning_qcfg_output_t, *phwrm_queue_adptv_qos_tx_tuning_qcfg_output_t;
38992 
38993 /**************************************
38994  * hwrm_queue_adptv_qos_tx_tuning_cfg *
38995  **************************************/
38996 
38997 
38998 /* hwrm_queue_adptv_qos_tx_tuning_cfg_input (size:512b/64B) */
38999 
39000 typedef struct hwrm_queue_adptv_qos_tx_tuning_cfg_input {
39001 	/* The HWRM command request type. */
39002 	uint16_t	req_type;
39003 	/*
39004 	 * The completion ring to send the completion event on. This should
39005 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39006 	 */
39007 	uint16_t	cmpl_ring;
39008 	/*
39009 	 * The sequence ID is used by the driver for tracking multiple
39010 	 * commands. This ID is treated as opaque data by the firmware and
39011 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39012 	 */
39013 	uint16_t	seq_id;
39014 	/*
39015 	 * The target ID of the command:
39016 	 * * 0x0-0xFFF8 - The function ID
39017 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39018 	 * * 0xFFFD - Reserved for user-space HWRM interface
39019 	 * * 0xFFFF - HWRM
39020 	 */
39021 	uint16_t	target_id;
39022 	/*
39023 	 * A physical address pointer pointing to a host buffer that the
39024 	 * command's response data will be written. This can be either a host
39025 	 * physical address (HPA) or a guest physical address (GPA) and must
39026 	 * point to a physically contiguous block of memory.
39027 	 */
39028 	uint64_t	resp_addr;
39029 	uint32_t	enables;
39030 	/* This bit must be '1' for the option to be configured. */
39031 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_WFQ_COST			UINT32_C(0x1)
39032 	/* This bit must be '1' for the option to be configured. */
39033 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_WFQ_UPPER_FACTOR		UINT32_C(0x2)
39034 	/* This bit must be '1' for the option to be configured. */
39035 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_HYST_WINDOW_SIZE_FACTOR	UINT32_C(0x4)
39036 	/* This bit must be '1' for the option to be configured. */
39037 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_RSVD_CELLS_LIMIT_RATIO	UINT32_C(0x8)
39038 	/* This bit must be '1' for the option to be configured. */
39039 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_L2_MIN_LATENCY		UINT32_C(0x10)
39040 	/* This bit must be '1' for the option to be configured. */
39041 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_L2_MAX_LATENCY		UINT32_C(0x20)
39042 	/* This bit must be '1' for the option to be configured. */
39043 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_ROCE_MIN_LATENCY		UINT32_C(0x40)
39044 	/* This bit must be '1' for the option to be configured. */
39045 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_ROCE_MAX_LATENCY		UINT32_C(0x80)
39046 	/* This bit must be '1' for the option to be configured. */
39047 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_MAX_TBM_CELLS_PRERESERVED	UINT32_C(0x100)
39048 	/* This bit must be '1' for the option to be configured. */
39049 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_SHAPER_REFILL_TIMER	UINT32_C(0x200)
39050 	/* Indicates max credit as required by hardware. */
39051 	uint32_t	wfq_cost;
39052 	/*
39053 	 * Specifies a factor that determines the upper bound for each
39054 	 * cos_wfq_credit_weight.
39055 	 */
39056 	uint32_t	wfq_upper_factor;
39057 	/*
39058 	 * The algorithm multiplies this factor by the MRU size to compute the
39059 	 * hysteresis window size which in turn is used in deassert
39060 	 * threshold calculations.
39061 	 */
39062 	uint32_t	hyst_window_size_factor;
39063 	/*
39064 	 * The parameter limits the total reserved cells. If the computed
39065 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
39066 	 * port_cells_avail, then the reserved cells are set to the limit
39067 	 * value. Its range of values is 0-50%.
39068 	 */
39069 	uint32_t	rsvd_cells_limit_ratio;
39070 	/*
39071 	 * It is used to calculate the number of reserved cells for cos queues
39072 	 * configured for L2. Its value is derived from system
39073 	 * characterization.
39074 	 */
39075 	uint32_t	l2_min_latency;
39076 	/*
39077 	 * It is used to calculate the number of shared cells for cos queues
39078 	 * configured for L2. Its value is derived from system
39079 	 * characterization.
39080 	 */
39081 	uint32_t	l2_max_latency;
39082 	/*
39083 	 * It is used to calculate the number of reserved cells for cos queues
39084 	 * configured for RoCE. Its value is derived from system
39085 	 * characterization.
39086 	 */
39087 	uint32_t	roce_min_latency;
39088 	/*
39089 	 * It is used to calculate the number of shared cells for cos queues
39090 	 * configured for RoCE. Its value is derived from system
39091 	 * characterization.
39092 	 */
39093 	uint32_t	roce_max_latency;
39094 	/* Specifies the number of reserved cells TRP requires per cos queue. */
39095 	uint32_t	max_tbm_cells_prereserved;
39096 	/*
39097 	 * This parameter is used to compute the time interval for
39098 	 * replenishing the shaper credit buckets for all TX cos queues.
39099 	 */
39100 	uint32_t	shaper_refill_timer;
39101 	uint8_t	unused_0[4];
39102 } hwrm_queue_adptv_qos_tx_tuning_cfg_input_t, *phwrm_queue_adptv_qos_tx_tuning_cfg_input_t;
39103 
39104 /* hwrm_queue_adptv_qos_tx_tuning_cfg_output (size:128b/16B) */
39105 
39106 typedef struct hwrm_queue_adptv_qos_tx_tuning_cfg_output {
39107 	/* The specific error status for the command. */
39108 	uint16_t	error_code;
39109 	/* The HWRM command request type. */
39110 	uint16_t	req_type;
39111 	/* The sequence ID from the original command. */
39112 	uint16_t	seq_id;
39113 	/* The length of the response data in number of bytes. */
39114 	uint16_t	resp_len;
39115 	uint8_t	unused_0[7];
39116 	/*
39117 	 * This field is used in Output records to indicate that the output
39118 	 * is completely written to RAM. This field should be read as '1'
39119 	 * to indicate that the output has been completely written. When
39120 	 * writing a command completion or response to an internal processor,
39121 	 * the order of writes has to be such that this field is written last.
39122 	 */
39123 	uint8_t	valid;
39124 } hwrm_queue_adptv_qos_tx_tuning_cfg_output_t, *phwrm_queue_adptv_qos_tx_tuning_cfg_output_t;
39125 
39126 /**********************************
39127  * hwrm_queue_pfcwd_timeout_qcaps *
39128  **********************************/
39129 
39130 
39131 /* hwrm_queue_pfcwd_timeout_qcaps_input (size:128b/16B) */
39132 
39133 typedef struct hwrm_queue_pfcwd_timeout_qcaps_input {
39134 	/* The HWRM command request type. */
39135 	uint16_t	req_type;
39136 	/*
39137 	 * The completion ring to send the completion event on. This should
39138 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39139 	 */
39140 	uint16_t	cmpl_ring;
39141 	/*
39142 	 * The sequence ID is used by the driver for tracking multiple
39143 	 * commands. This ID is treated as opaque data by the firmware and
39144 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39145 	 */
39146 	uint16_t	seq_id;
39147 	/*
39148 	 * The target ID of the command:
39149 	 * * 0x0-0xFFF8 - The function ID
39150 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39151 	 * * 0xFFFD - Reserved for user-space HWRM interface
39152 	 * * 0xFFFF - HWRM
39153 	 */
39154 	uint16_t	target_id;
39155 	/*
39156 	 * A physical address pointer pointing to a host buffer that the
39157 	 * command's response data will be written. This can be either a host
39158 	 * physical address (HPA) or a guest physical address (GPA) and must
39159 	 * point to a physically contiguous block of memory.
39160 	 */
39161 	uint64_t	resp_addr;
39162 } hwrm_queue_pfcwd_timeout_qcaps_input_t, *phwrm_queue_pfcwd_timeout_qcaps_input_t;
39163 
39164 /* hwrm_queue_pfcwd_timeout_qcaps_output (size:128b/16B) */
39165 
39166 typedef struct hwrm_queue_pfcwd_timeout_qcaps_output {
39167 	/* The specific error status for the command. */
39168 	uint16_t	error_code;
39169 	/* The HWRM command request type. */
39170 	uint16_t	req_type;
39171 	/* The sequence ID from the original command. */
39172 	uint16_t	seq_id;
39173 	/* The length of the response data in number of bytes. */
39174 	uint16_t	resp_len;
39175 	/* Max configurable pfc watchdog timeout value in msec. */
39176 	uint32_t	max_pfcwd_timeout;
39177 	uint8_t	unused_0[3];
39178 	/*
39179 	 * This field is used in Output records to indicate that the output
39180 	 * is completely written to RAM. This field should be read as '1'
39181 	 * to indicate that the output has been completely written. When
39182 	 * writing a command completion or response to an internal processor,
39183 	 * the order of writes has to be such that this field is written last.
39184 	 */
39185 	uint8_t	valid;
39186 } hwrm_queue_pfcwd_timeout_qcaps_output_t, *phwrm_queue_pfcwd_timeout_qcaps_output_t;
39187 
39188 /********************************
39189  * hwrm_queue_pfcwd_timeout_cfg *
39190  ********************************/
39191 
39192 
39193 /* hwrm_queue_pfcwd_timeout_cfg_input (size:192b/24B) */
39194 
39195 typedef struct hwrm_queue_pfcwd_timeout_cfg_input {
39196 	/* The HWRM command request type. */
39197 	uint16_t	req_type;
39198 	/*
39199 	 * The completion ring to send the completion event on. This should
39200 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39201 	 */
39202 	uint16_t	cmpl_ring;
39203 	/*
39204 	 * The sequence ID is used by the driver for tracking multiple
39205 	 * commands. This ID is treated as opaque data by the firmware and
39206 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39207 	 */
39208 	uint16_t	seq_id;
39209 	/*
39210 	 * The target ID of the command:
39211 	 * * 0x0-0xFFF8 - The function ID
39212 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39213 	 * * 0xFFFD - Reserved for user-space HWRM interface
39214 	 * * 0xFFFF - HWRM
39215 	 */
39216 	uint16_t	target_id;
39217 	/*
39218 	 * A physical address pointer pointing to a host buffer that the
39219 	 * command's response data will be written. This can be either a host
39220 	 * physical address (HPA) or a guest physical address (GPA) and must
39221 	 * point to a physically contiguous block of memory.
39222 	 */
39223 	uint64_t	resp_addr;
39224 	/* pfc watchdog timeout value in msec. */
39225 	uint32_t	pfcwd_timeout_value;
39226 	uint8_t	unused_0[4];
39227 } hwrm_queue_pfcwd_timeout_cfg_input_t, *phwrm_queue_pfcwd_timeout_cfg_input_t;
39228 
39229 /* hwrm_queue_pfcwd_timeout_cfg_output (size:128b/16B) */
39230 
39231 typedef struct hwrm_queue_pfcwd_timeout_cfg_output {
39232 	/* The specific error status for the command. */
39233 	uint16_t	error_code;
39234 	/* The HWRM command request type. */
39235 	uint16_t	req_type;
39236 	/* The sequence ID from the original command. */
39237 	uint16_t	seq_id;
39238 	/* The length of the response data in number of bytes. */
39239 	uint16_t	resp_len;
39240 	uint8_t	unused_0[7];
39241 	/*
39242 	 * This field is used in Output records to indicate that the output
39243 	 * is completely written to RAM. This field should be read as '1'
39244 	 * to indicate that the output has been completely written. When
39245 	 * writing a command completion or response to an internal processor,
39246 	 * the order of writes has to be such that this field is written last.
39247 	 */
39248 	uint8_t	valid;
39249 } hwrm_queue_pfcwd_timeout_cfg_output_t, *phwrm_queue_pfcwd_timeout_cfg_output_t;
39250 
39251 /*********************************
39252  * hwrm_queue_pfcwd_timeout_qcfg *
39253  *********************************/
39254 
39255 
39256 /* hwrm_queue_pfcwd_timeout_qcfg_input (size:128b/16B) */
39257 
39258 typedef struct hwrm_queue_pfcwd_timeout_qcfg_input {
39259 	/* The HWRM command request type. */
39260 	uint16_t	req_type;
39261 	/*
39262 	 * The completion ring to send the completion event on. This should
39263 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39264 	 */
39265 	uint16_t	cmpl_ring;
39266 	/*
39267 	 * The sequence ID is used by the driver for tracking multiple
39268 	 * commands. This ID is treated as opaque data by the firmware and
39269 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39270 	 */
39271 	uint16_t	seq_id;
39272 	/*
39273 	 * The target ID of the command:
39274 	 * * 0x0-0xFFF8 - The function ID
39275 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39276 	 * * 0xFFFD - Reserved for user-space HWRM interface
39277 	 * * 0xFFFF - HWRM
39278 	 */
39279 	uint16_t	target_id;
39280 	/*
39281 	 * A physical address pointer pointing to a host buffer that the
39282 	 * command's response data will be written. This can be either a host
39283 	 * physical address (HPA) or a guest physical address (GPA) and must
39284 	 * point to a physically contiguous block of memory.
39285 	 */
39286 	uint64_t	resp_addr;
39287 } hwrm_queue_pfcwd_timeout_qcfg_input_t, *phwrm_queue_pfcwd_timeout_qcfg_input_t;
39288 
39289 /* hwrm_queue_pfcwd_timeout_qcfg_output (size:128b/16B) */
39290 
39291 typedef struct hwrm_queue_pfcwd_timeout_qcfg_output {
39292 	/* The specific error status for the command. */
39293 	uint16_t	error_code;
39294 	/* The HWRM command request type. */
39295 	uint16_t	req_type;
39296 	/* The sequence ID from the original command. */
39297 	uint16_t	seq_id;
39298 	/* The length of the response data in number of bytes. */
39299 	uint16_t	resp_len;
39300 	/* Current configured pfc watchdog timeout value in msec. */
39301 	uint32_t	pfcwd_timeout_value;
39302 	uint8_t	unused_0[3];
39303 	/*
39304 	 * This field is used in Output records to indicate that the output
39305 	 * is completely written to RAM. This field should be read as '1'
39306 	 * to indicate that the output has been completely written. When
39307 	 * writing a command completion or response to an internal processor,
39308 	 * the order of writes has to be such that this field is written last.
39309 	 */
39310 	uint8_t	valid;
39311 } hwrm_queue_pfcwd_timeout_qcfg_output_t, *phwrm_queue_pfcwd_timeout_qcfg_output_t;
39312 
39313 /*******************
39314  * hwrm_vnic_alloc *
39315  *******************/
39316 
39317 
39318 /* hwrm_vnic_alloc_input (size:192b/24B) */
39319 
39320 typedef struct hwrm_vnic_alloc_input {
39321 	/* The HWRM command request type. */
39322 	uint16_t	req_type;
39323 	/*
39324 	 * The completion ring to send the completion event on. This should
39325 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39326 	 */
39327 	uint16_t	cmpl_ring;
39328 	/*
39329 	 * The sequence ID is used by the driver for tracking multiple
39330 	 * commands. This ID is treated as opaque data by the firmware and
39331 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39332 	 */
39333 	uint16_t	seq_id;
39334 	/*
39335 	 * The target ID of the command:
39336 	 * * 0x0-0xFFF8 - The function ID
39337 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39338 	 * * 0xFFFD - Reserved for user-space HWRM interface
39339 	 * * 0xFFFF - HWRM
39340 	 */
39341 	uint16_t	target_id;
39342 	/*
39343 	 * A physical address pointer pointing to a host buffer that the
39344 	 * command's response data will be written. This can be either a host
39345 	 * physical address (HPA) or a guest physical address (GPA) and must
39346 	 * point to a physically contiguous block of memory.
39347 	 */
39348 	uint64_t	resp_addr;
39349 	uint32_t	flags;
39350 	/*
39351 	 * When this bit is '1', this VNIC is requested to
39352 	 * be the default VNIC for this function.
39353 	 */
39354 	#define HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT		UINT32_C(0x1)
39355 	/*
39356 	 * When this bit is '1', proxy VEE PF is requesting
39357 	 * allocation of a default VNIC on behalf of virtio-net
39358 	 * function given in virtio_net_fid field.
39359 	 */
39360 	#define HWRM_VNIC_ALLOC_INPUT_FLAGS_VIRTIO_NET_FID_VALID	UINT32_C(0x2)
39361 	/*
39362 	 * Virtio-net function's FID.
39363 	 * This virtio-net function is requesting allocation of default
39364 	 * VNIC through proxy VEE PF.
39365 	 */
39366 	uint16_t	virtio_net_fid;
39367 	uint8_t	unused_0[2];
39368 } hwrm_vnic_alloc_input_t, *phwrm_vnic_alloc_input_t;
39369 
39370 /* hwrm_vnic_alloc_output (size:128b/16B) */
39371 
39372 typedef struct hwrm_vnic_alloc_output {
39373 	/* The specific error status for the command. */
39374 	uint16_t	error_code;
39375 	/* The HWRM command request type. */
39376 	uint16_t	req_type;
39377 	/* The sequence ID from the original command. */
39378 	uint16_t	seq_id;
39379 	/* The length of the response data in number of bytes. */
39380 	uint16_t	resp_len;
39381 	/* Logical vnic ID */
39382 	uint32_t	vnic_id;
39383 	uint8_t	unused_0[3];
39384 	/*
39385 	 * This field is used in Output records to indicate that the output
39386 	 * is completely written to RAM. This field should be read as '1'
39387 	 * to indicate that the output has been completely written. When
39388 	 * writing a command completion or response to an internal processor,
39389 	 * the order of writes has to be such that this field is written last.
39390 	 */
39391 	uint8_t	valid;
39392 } hwrm_vnic_alloc_output_t, *phwrm_vnic_alloc_output_t;
39393 
39394 /********************
39395  * hwrm_vnic_update *
39396  ********************/
39397 
39398 
39399 /* hwrm_vnic_update_input (size:256b/32B) */
39400 
39401 typedef struct hwrm_vnic_update_input {
39402 	/* The HWRM command request type. */
39403 	uint16_t	req_type;
39404 	/*
39405 	 * The completion ring to send the completion event on. This should
39406 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39407 	 */
39408 	uint16_t	cmpl_ring;
39409 	/*
39410 	 * The sequence ID is used by the driver for tracking multiple
39411 	 * commands. This ID is treated as opaque data by the firmware and
39412 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39413 	 */
39414 	uint16_t	seq_id;
39415 	/*
39416 	 * The target ID of the command:
39417 	 * * 0x0-0xFFF8 - The function ID
39418 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39419 	 * * 0xFFFD - Reserved for user-space HWRM interface
39420 	 * * 0xFFFF - HWRM
39421 	 */
39422 	uint16_t	target_id;
39423 	/*
39424 	 * A physical address pointer pointing to a host buffer that the
39425 	 * command's response data will be written. This can be either a host
39426 	 * physical address (HPA) or a guest physical address (GPA) and must
39427 	 * point to a physically contiguous block of memory.
39428 	 */
39429 	uint64_t	resp_addr;
39430 	/* Logical vnic ID */
39431 	uint32_t	vnic_id;
39432 	uint32_t	enables;
39433 	/*
39434 	 * This bit must be '1' for the vnic_state field to be
39435 	 * configured.
39436 	 */
39437 	#define HWRM_VNIC_UPDATE_INPUT_ENABLES_VNIC_STATE_VALID		UINT32_C(0x1)
39438 	/*
39439 	 * This bit must be '1' for the mru field to be
39440 	 * configured.
39441 	 */
39442 	#define HWRM_VNIC_UPDATE_INPUT_ENABLES_MRU_VALID			UINT32_C(0x2)
39443 	/*
39444 	 * This bit must be '1' for the metadata_format_type field to be
39445 	 * configured.
39446 	 */
39447 	#define HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID	UINT32_C(0x4)
39448 	/*
39449 	 * This will update the context variable with the same name if
39450 	 * the corresponding enable is set.
39451 	 */
39452 	uint8_t	vnic_state;
39453 	/* Normal operation state for the VNIC. */
39454 	#define HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_NORMAL UINT32_C(0x0)
39455 	/* All packets are dropped in this state. */
39456 	#define HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_DROP   UINT32_C(0x1)
39457 	#define HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_LAST  HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_DROP
39458 	/*
39459 	 * The metadata format type used in all the RX packet completions
39460 	 * going through this VNIC. This value is product specific. Refer to
39461 	 * the L2 HSI completion ring structures for the detailed
39462 	 * descriptions. For Thor and Thor2, it corresponds to 'meta_format'
39463 	 * in 'rx_pkt_cmpl_hi' and 'rx_pkt_v3_cmpl_hi', respectively.
39464 	 */
39465 	uint8_t	metadata_format_type;
39466 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_0 UINT32_C(0x0)
39467 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_1 UINT32_C(0x1)
39468 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_2 UINT32_C(0x2)
39469 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3 UINT32_C(0x3)
39470 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_4 UINT32_C(0x4)
39471 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_LAST HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_4
39472 	/*
39473 	 * The maximum receive unit of the vnic.
39474 	 * Each vnic is associated with a function.
39475 	 * The vnic mru value overwrites the mru setting of the
39476 	 * associated function.
39477 	 * The HWRM shall make sure that vnic mru does not exceed
39478 	 * the mru of the port the function is associated with.
39479 	 */
39480 	uint16_t	mru;
39481 	uint8_t	unused_1[4];
39482 } hwrm_vnic_update_input_t, *phwrm_vnic_update_input_t;
39483 
39484 /* hwrm_vnic_update_output (size:128b/16B) */
39485 
39486 typedef struct hwrm_vnic_update_output {
39487 	/* The specific error status for the command. */
39488 	uint16_t	error_code;
39489 	/* The HWRM command request type. */
39490 	uint16_t	req_type;
39491 	/* The sequence ID from the original command. */
39492 	uint16_t	seq_id;
39493 	/* The length of the response data in number of bytes. */
39494 	uint16_t	resp_len;
39495 	uint8_t	unused_0[7];
39496 	/*
39497 	 * This field is used in Output records to indicate that the output
39498 	 * is completely written to RAM. This field should be read as '1'
39499 	 * to indicate that the output has been completely written.
39500 	 * When writing a command completion or response to an internal
39501 	 * processor, the order of writes has to be such that this field is
39502 	 * written last.
39503 	 */
39504 	uint8_t	valid;
39505 } hwrm_vnic_update_output_t, *phwrm_vnic_update_output_t;
39506 
39507 /******************
39508  * hwrm_vnic_free *
39509  ******************/
39510 
39511 
39512 /* hwrm_vnic_free_input (size:192b/24B) */
39513 
39514 typedef struct hwrm_vnic_free_input {
39515 	/* The HWRM command request type. */
39516 	uint16_t	req_type;
39517 	/*
39518 	 * The completion ring to send the completion event on. This should
39519 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39520 	 */
39521 	uint16_t	cmpl_ring;
39522 	/*
39523 	 * The sequence ID is used by the driver for tracking multiple
39524 	 * commands. This ID is treated as opaque data by the firmware and
39525 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39526 	 */
39527 	uint16_t	seq_id;
39528 	/*
39529 	 * The target ID of the command:
39530 	 * * 0x0-0xFFF8 - The function ID
39531 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39532 	 * * 0xFFFD - Reserved for user-space HWRM interface
39533 	 * * 0xFFFF - HWRM
39534 	 */
39535 	uint16_t	target_id;
39536 	/*
39537 	 * A physical address pointer pointing to a host buffer that the
39538 	 * command's response data will be written. This can be either a host
39539 	 * physical address (HPA) or a guest physical address (GPA) and must
39540 	 * point to a physically contiguous block of memory.
39541 	 */
39542 	uint64_t	resp_addr;
39543 	/* Logical vnic ID */
39544 	uint32_t	vnic_id;
39545 	uint8_t	unused_0[4];
39546 } hwrm_vnic_free_input_t, *phwrm_vnic_free_input_t;
39547 
39548 /* hwrm_vnic_free_output (size:128b/16B) */
39549 
39550 typedef struct hwrm_vnic_free_output {
39551 	/* The specific error status for the command. */
39552 	uint16_t	error_code;
39553 	/* The HWRM command request type. */
39554 	uint16_t	req_type;
39555 	/* The sequence ID from the original command. */
39556 	uint16_t	seq_id;
39557 	/* The length of the response data in number of bytes. */
39558 	uint16_t	resp_len;
39559 	uint8_t	unused_0[7];
39560 	/*
39561 	 * This field is used in Output records to indicate that the output
39562 	 * is completely written to RAM. This field should be read as '1'
39563 	 * to indicate that the output has been completely written. When
39564 	 * writing a command completion or response to an internal processor,
39565 	 * the order of writes has to be such that this field is written last.
39566 	 */
39567 	uint8_t	valid;
39568 } hwrm_vnic_free_output_t, *phwrm_vnic_free_output_t;
39569 
39570 /*****************
39571  * hwrm_vnic_cfg *
39572  *****************/
39573 
39574 
39575 /* hwrm_vnic_cfg_input (size:384b/48B) */
39576 
39577 typedef struct hwrm_vnic_cfg_input {
39578 	/* The HWRM command request type. */
39579 	uint16_t	req_type;
39580 	/*
39581 	 * The completion ring to send the completion event on. This should
39582 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39583 	 */
39584 	uint16_t	cmpl_ring;
39585 	/*
39586 	 * The sequence ID is used by the driver for tracking multiple
39587 	 * commands. This ID is treated as opaque data by the firmware and
39588 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39589 	 */
39590 	uint16_t	seq_id;
39591 	/*
39592 	 * The target ID of the command:
39593 	 * * 0x0-0xFFF8 - The function ID
39594 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39595 	 * * 0xFFFD - Reserved for user-space HWRM interface
39596 	 * * 0xFFFF - HWRM
39597 	 */
39598 	uint16_t	target_id;
39599 	/*
39600 	 * A physical address pointer pointing to a host buffer that the
39601 	 * command's response data will be written. This can be either a host
39602 	 * physical address (HPA) or a guest physical address (GPA) and must
39603 	 * point to a physically contiguous block of memory.
39604 	 */
39605 	uint64_t	resp_addr;
39606 	uint32_t	flags;
39607 	/*
39608 	 * When this bit is '1', the VNIC is requested to
39609 	 * be the default VNIC for the function.
39610 	 */
39611 	#define HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT				UINT32_C(0x1)
39612 	/*
39613 	 * When this bit is '1', the VNIC is being configured to
39614 	 * strip VLAN in the RX path.
39615 	 * If set to '0', then VLAN stripping is disabled on
39616 	 * this VNIC.
39617 	 */
39618 	#define HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE			UINT32_C(0x2)
39619 	/*
39620 	 * When this bit is '1', the VNIC is being configured to
39621 	 * buffer receive packets in the hardware until the host
39622 	 * posts new receive buffers.
39623 	 * If set to '0', then bd_stall is being configured to be
39624 	 * disabled on this VNIC.
39625 	 */
39626 	#define HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE			UINT32_C(0x4)
39627 	/*
39628 	 * When this bit is '1', the VNIC is being configured to
39629 	 * receive both RoCE and non-RoCE traffic.
39630 	 * If set to '0', then this VNIC is not configured to be
39631 	 * operating in dual VNIC mode.
39632 	 */
39633 	#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_DUAL_VNIC_MODE		UINT32_C(0x8)
39634 	/*
39635 	 * When this flag is set to '1', the VNIC is requested to
39636 	 * be configured to receive only RoCE traffic.
39637 	 * If this flag is set to '0', then this flag shall be
39638 	 * ignored by the HWRM.
39639 	 * If roce_dual_vnic_mode flag is set to '1'
39640 	 * or roce_mirroring_capable_vnic_mode flag to 1,
39641 	 * then the HWRM client shall not set this flag to '1'.
39642 	 */
39643 	#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_ONLY_VNIC_MODE		UINT32_C(0x10)
39644 	/*
39645 	 * When a VNIC uses one destination ring group for certain
39646 	 * application (e.g. Receive Flow Steering) where
39647 	 * exact match is used to direct packets to a VNIC with one
39648 	 * destination ring group only, there is no need to configure
39649 	 * RSS indirection table for that VNIC as only one destination
39650 	 * ring group is used.
39651 	 *
39652 	 * This flag is used to enable a mode where
39653 	 * RSS is enabled in the VNIC using a RSS context
39654 	 * for computing RSS hash but the RSS indirection table is
39655 	 * not configured using hwrm_vnic_rss_cfg.
39656 	 *
39657 	 * If this mode is enabled, then the driver should not program
39658 	 * RSS indirection table for the RSS context that is used for
39659 	 * computing RSS hash only.
39660 	 */
39661 	#define HWRM_VNIC_CFG_INPUT_FLAGS_RSS_DFLT_CR_MODE			UINT32_C(0x20)
39662 	/*
39663 	 * When this bit is '1', the VNIC is being configured to
39664 	 * receive both RoCE and non-RoCE traffic, but forward only the
39665 	 * RoCE traffic further. Also, RoCE traffic can be mirrored to
39666 	 * L2 driver.
39667 	 */
39668 	#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_MODE	UINT32_C(0x40)
39669 	/*
39670 	 * When this bit is '1' it enables ring selection using the incoming
39671 	 * spif and lcos for the packet.
39672 	 */
39673 	#define HWRM_VNIC_CFG_INPUT_FLAGS_PORTCOS_MAPPING_MODE		UINT32_C(0x80)
39674 	uint32_t	enables;
39675 	/*
39676 	 * This bit must be '1' for the dflt_ring_grp field to be
39677 	 * configured.
39678 	 */
39679 	#define HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP		UINT32_C(0x1)
39680 	/*
39681 	 * This bit must be '1' for the rss_rule field to be
39682 	 * configured.
39683 	 */
39684 	#define HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE		UINT32_C(0x2)
39685 	/*
39686 	 * This bit must be '1' for the cos_rule field to be
39687 	 * configured.
39688 	 */
39689 	#define HWRM_VNIC_CFG_INPUT_ENABLES_COS_RULE		UINT32_C(0x4)
39690 	/*
39691 	 * This bit must be '1' for the lb_rule field to be
39692 	 * configured.
39693 	 */
39694 	#define HWRM_VNIC_CFG_INPUT_ENABLES_LB_RULE		UINT32_C(0x8)
39695 	/*
39696 	 * This bit must be '1' for the mru field to be
39697 	 * configured.
39698 	 */
39699 	#define HWRM_VNIC_CFG_INPUT_ENABLES_MRU			UINT32_C(0x10)
39700 	/*
39701 	 * This bit must be '1' for the default_rx_ring_id field to be
39702 	 * configured.
39703 	 */
39704 	#define HWRM_VNIC_CFG_INPUT_ENABLES_DEFAULT_RX_RING_ID	UINT32_C(0x20)
39705 	/*
39706 	 * This bit must be '1' for the default_cmpl_ring_id field to be
39707 	 * configured.
39708 	 */
39709 	#define HWRM_VNIC_CFG_INPUT_ENABLES_DEFAULT_CMPL_RING_ID	UINT32_C(0x40)
39710 	/* This bit must be '1' for the queue_id field to be configured. */
39711 	#define HWRM_VNIC_CFG_INPUT_ENABLES_QUEUE_ID		UINT32_C(0x80)
39712 	/*
39713 	 * This bit must be '1' for the rx_csum_v2_mode field to be
39714 	 * configured.
39715 	 */
39716 	#define HWRM_VNIC_CFG_INPUT_ENABLES_RX_CSUM_V2_MODE	UINT32_C(0x100)
39717 	/* This bit must be '1' for the l2_cqe_mode field to be configured. */
39718 	#define HWRM_VNIC_CFG_INPUT_ENABLES_L2_CQE_MODE		UINT32_C(0x200)
39719 	/* Logical vnic ID */
39720 	uint16_t	vnic_id;
39721 	/*
39722 	 * Default Completion ring for the VNIC. This ring will
39723 	 * be chosen if packet does not match any RSS rules and if
39724 	 * there is no COS rule.
39725 	 */
39726 	uint16_t	dflt_ring_grp;
39727 	/*
39728 	 * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if
39729 	 * there is no RSS rule.
39730 	 */
39731 	uint16_t	rss_rule;
39732 	/*
39733 	 * RSS ID for COS rule/table structure. 0xFF... (All Fs) if
39734 	 * there is no COS rule.
39735 	 */
39736 	uint16_t	cos_rule;
39737 	/*
39738 	 * RSS ID for load balancing rule/table structure.
39739 	 * 0xFF... (All Fs) if there is no LB rule.
39740 	 */
39741 	uint16_t	lb_rule;
39742 	/*
39743 	 * The maximum receive unit of the vnic.
39744 	 * Each vnic is associated with a function.
39745 	 * The vnic mru value overwrites the mru setting of the
39746 	 * associated function.
39747 	 * The HWRM shall make sure that vnic mru does not exceed
39748 	 * the mru of the port the function is associated with.
39749 	 */
39750 	uint16_t	mru;
39751 	/*
39752 	 * Default Rx ring for the VNIC. This ring will
39753 	 * be chosen if packet does not match any RSS rules.
39754 	 * The aggregation ring associated with the Rx ring is
39755 	 * implied based on the Rx ring specified when the
39756 	 * aggregation ring was allocated.
39757 	 */
39758 	uint16_t	default_rx_ring_id;
39759 	/*
39760 	 * Default completion ring for the VNIC. This ring will
39761 	 * be chosen if packet does not match any RSS rules.
39762 	 */
39763 	uint16_t	default_cmpl_ring_id;
39764 	/*
39765 	 * When specified, only incoming packets classified to the specified
39766 	 * CoS queue ID will be arriving on this VNIC. Packet priority to CoS
39767 	 * mapping rules can be specified using HWRM_QUEUE_PRI2COS_CFG. In this
39768 	 * mode, ntuple filters with VNIC destination specified are invalid
39769 	 * since they conflict with the CoS to VNIC steering rules in this
39770 	 * mode.
39771 	 *
39772 	 * If this field is not specified, packet to VNIC steering will be
39773 	 * subject to the standard L2 filter rules and any additional ntuple
39774 	 * filter rules with destination VNIC specified.
39775 	 */
39776 	uint16_t	queue_id;
39777 	/*
39778 	 * If the device supports the RX V2 and RX TPA start V2 completion
39779 	 * records as indicated by the HWRM_VNIC_QCAPS command, this field is
39780 	 * used to specify the two RX checksum modes supported by these
39781 	 * completion records.
39782 	 */
39783 	uint8_t	rx_csum_v2_mode;
39784 	/*
39785 	 * When configured with this checksum mode, the number of header
39786 	 * groups in the delivered packet with a valid IP checksum and
39787 	 * the number of header groups in the delivered packet with a valid
39788 	 * L4 checksum are reported. Valid checksums are counted from the
39789 	 * outermost header group to the innermost header group, stopping at
39790 	 * the first error. This is the default checksum mode supported if
39791 	 * the driver doesn't explicitly configure the RX checksum mode.
39792 	 */
39793 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_DEFAULT UINT32_C(0x0)
39794 	/*
39795 	 * When configured with this checksum mode, the checksum status is
39796 	 * reported using 'all ok' mode. In the RX completion record, one
39797 	 * bit indicates if the IP checksum is valid for all the parsed
39798 	 * header groups with an IP checksum. Another bit indicates if the
39799 	 * L4 checksum is valid for all the parsed header groups with an L4
39800 	 * checksum. The number of header groups that were parsed by the
39801 	 * chip and passed in the delivered packet is also reported.
39802 	 */
39803 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_ALL_OK  UINT32_C(0x1)
39804 	/*
39805 	 * Any rx_csum_v2_mode value larger than or equal to this is not
39806 	 * valid
39807 	 */
39808 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_MAX	UINT32_C(0x2)
39809 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_LAST   HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_MAX
39810 	/*
39811 	 * If the device supports different L2 RX CQE modes, as indicated by
39812 	 * the HWRM_VNIC_QCAPS command, this field is used to configure the
39813 	 * CQE mode.
39814 	 */
39815 	uint8_t	l2_cqe_mode;
39816 	/*
39817 	 * When configured with this cqe mode, A normal (32B) CQE
39818 	 * will be generated. This is the default mode.
39819 	 */
39820 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_DEFAULT	UINT32_C(0x0)
39821 	/*
39822 	 * When configured with this cqe mode, A compressed (16B) CQE
39823 	 * will be generated. In this mode TPA and HDS are not supported.
39824 	 * Host drivers should not configure the TPA and HDS along with
39825 	 * compressed mode, per VNIC. FW returns error, if host drivers
39826 	 * try to configure the VNIC with compressed mode and (TPA or HDS).
39827 	 * The compressed completion does not include PTP data. Host
39828 	 * drivers should not use this mode to receive the PTP data.
39829 	 */
39830 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_COMPRESSED UINT32_C(0x1)
39831 	/*
39832 	 * When configured with this cqe mode, HW generates either a 32B
39833 	 * completion or a 16B completion depending on use case within a
39834 	 * VNIC. For ex. a simple L2 packet could use the compressed form
39835 	 * while a PTP packet on the same VNIC would use the 32B form.
39836 	 */
39837 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_MIXED	UINT32_C(0x2)
39838 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_LAST	HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_MIXED
39839 	uint8_t	unused0[4];
39840 } hwrm_vnic_cfg_input_t, *phwrm_vnic_cfg_input_t;
39841 
39842 /* hwrm_vnic_cfg_output (size:128b/16B) */
39843 
39844 typedef struct hwrm_vnic_cfg_output {
39845 	/* The specific error status for the command. */
39846 	uint16_t	error_code;
39847 	/* The HWRM command request type. */
39848 	uint16_t	req_type;
39849 	/* The sequence ID from the original command. */
39850 	uint16_t	seq_id;
39851 	/* The length of the response data in number of bytes. */
39852 	uint16_t	resp_len;
39853 	uint8_t	unused_0[7];
39854 	/*
39855 	 * This field is used in Output records to indicate that the output
39856 	 * is completely written to RAM. This field should be read as '1'
39857 	 * to indicate that the output has been completely written. When
39858 	 * writing a command completion or response to an internal processor,
39859 	 * the order of writes has to be such that this field is written last.
39860 	 */
39861 	uint8_t	valid;
39862 } hwrm_vnic_cfg_output_t, *phwrm_vnic_cfg_output_t;
39863 
39864 /******************
39865  * hwrm_vnic_qcfg *
39866  ******************/
39867 
39868 
39869 /* hwrm_vnic_qcfg_input (size:256b/32B) */
39870 
39871 typedef struct hwrm_vnic_qcfg_input {
39872 	/* The HWRM command request type. */
39873 	uint16_t	req_type;
39874 	/*
39875 	 * The completion ring to send the completion event on. This should
39876 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39877 	 */
39878 	uint16_t	cmpl_ring;
39879 	/*
39880 	 * The sequence ID is used by the driver for tracking multiple
39881 	 * commands. This ID is treated as opaque data by the firmware and
39882 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39883 	 */
39884 	uint16_t	seq_id;
39885 	/*
39886 	 * The target ID of the command:
39887 	 * * 0x0-0xFFF8 - The function ID
39888 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39889 	 * * 0xFFFD - Reserved for user-space HWRM interface
39890 	 * * 0xFFFF - HWRM
39891 	 */
39892 	uint16_t	target_id;
39893 	/*
39894 	 * A physical address pointer pointing to a host buffer that the
39895 	 * command's response data will be written. This can be either a host
39896 	 * physical address (HPA) or a guest physical address (GPA) and must
39897 	 * point to a physically contiguous block of memory.
39898 	 */
39899 	uint64_t	resp_addr;
39900 	uint32_t	enables;
39901 	/*
39902 	 * This bit must be '1' for the vf_id_valid field to be
39903 	 * configured.
39904 	 */
39905 	#define HWRM_VNIC_QCFG_INPUT_ENABLES_VF_ID_VALID	UINT32_C(0x1)
39906 	/* Logical vnic ID */
39907 	uint32_t	vnic_id;
39908 	/* ID of Virtual Function whose VNIC resource is being queried. */
39909 	uint16_t	vf_id;
39910 	uint8_t	unused_0[6];
39911 } hwrm_vnic_qcfg_input_t, *phwrm_vnic_qcfg_input_t;
39912 
39913 /* hwrm_vnic_qcfg_output (size:256b/32B) */
39914 
39915 typedef struct hwrm_vnic_qcfg_output {
39916 	/* The specific error status for the command. */
39917 	uint16_t	error_code;
39918 	/* The HWRM command request type. */
39919 	uint16_t	req_type;
39920 	/* The sequence ID from the original command. */
39921 	uint16_t	seq_id;
39922 	/* The length of the response data in number of bytes. */
39923 	uint16_t	resp_len;
39924 	/* Default Completion ring for the VNIC. */
39925 	uint16_t	dflt_ring_grp;
39926 	/*
39927 	 * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if
39928 	 * there is no RSS rule.
39929 	 */
39930 	uint16_t	rss_rule;
39931 	/*
39932 	 * RSS ID for COS rule/table structure. 0xFF... (All Fs) if
39933 	 * there is no COS rule.
39934 	 */
39935 	uint16_t	cos_rule;
39936 	/*
39937 	 * RSS ID for load balancing rule/table structure.
39938 	 * 0xFF... (All Fs) if there is no LB rule.
39939 	 */
39940 	uint16_t	lb_rule;
39941 	/* The maximum receive unit of the vnic. */
39942 	uint16_t	mru;
39943 	uint8_t	unused_0[2];
39944 	uint32_t	flags;
39945 	/*
39946 	 * When this bit is '1', the VNIC is the default VNIC for
39947 	 * the function.
39948 	 */
39949 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_DEFAULT				UINT32_C(0x1)
39950 	/*
39951 	 * When this bit is '1', the VNIC is configured to
39952 	 * strip VLAN in the RX path.
39953 	 * If set to '0', then VLAN stripping is disabled on
39954 	 * this VNIC.
39955 	 */
39956 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_VLAN_STRIP_MODE			UINT32_C(0x2)
39957 	/*
39958 	 * When this bit is '1', the VNIC is configured to
39959 	 * buffer receive packets in the hardware until the host
39960 	 * posts new receive buffers.
39961 	 * If set to '0', then bd_stall is disabled on
39962 	 * this VNIC.
39963 	 */
39964 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_BD_STALL_MODE			UINT32_C(0x4)
39965 	/*
39966 	 * When this bit is '1', the VNIC is configured to
39967 	 * receive both RoCE and non-RoCE traffic.
39968 	 * If set to '0', then this VNIC is not configured to
39969 	 * operate in dual VNIC mode.
39970 	 */
39971 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_DUAL_VNIC_MODE		UINT32_C(0x8)
39972 	/*
39973 	 * When this flag is set to '1', the VNIC is configured to
39974 	 * receive only RoCE traffic.
39975 	 * When this flag is set to '0', the VNIC is not configured
39976 	 * to receive only RoCE traffic.
39977 	 * If roce_dual_vnic_mode flag and this flag both are set
39978 	 * to '1', then it is an invalid configuration of the
39979 	 * VNIC. The HWRM should not allow that type of
39980 	 * mis-configuration by HWRM clients.
39981 	 */
39982 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_ONLY_VNIC_MODE		UINT32_C(0x10)
39983 	/*
39984 	 * When a VNIC uses one destination ring group for certain
39985 	 * application (e.g. Receive Flow Steering) where
39986 	 * exact match is used to direct packets to a VNIC with one
39987 	 * destination ring group only, there is no need to configure
39988 	 * RSS indirection table for that VNIC as only one destination
39989 	 * ring group is used.
39990 	 *
39991 	 * When this bit is set to '1', then the VNIC is enabled in a
39992 	 * mode where RSS is enabled in the VNIC using a RSS context
39993 	 * for computing RSS hash but the RSS indirection table is
39994 	 * not configured.
39995 	 */
39996 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_RSS_DFLT_CR_MODE			UINT32_C(0x20)
39997 	/*
39998 	 * When this bit is '1', the VNIC is configured to
39999 	 * receive both RoCE and non-RoCE traffic, but forward only
40000 	 * RoCE traffic further. Also RoCE traffic can be mirrored to
40001 	 * L2 driver.
40002 	 */
40003 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_MODE	UINT32_C(0x40)
40004 	/*
40005 	 * When this bit is '0', VNIC is in normal operation state.
40006 	 * When this bit is '1', VNIC drops all the received packets.
40007 	 */
40008 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_OPERATION_STATE			UINT32_C(0x80)
40009 	/* When this bit is '1' it indicates port cos_mapping_mode enabled. */
40010 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_PORTCOS_MAPPING_MODE		UINT32_C(0x100)
40011 	/*
40012 	 * When returned with a valid CoS Queue id, the CoS Queue/VNIC
40013 	 * association is valid. Otherwise it will return 0xFFFF to indicate no
40014 	 * VNIC/CoS queue association.
40015 	 */
40016 	uint16_t	queue_id;
40017 	/*
40018 	 * If the device supports the RX V2 and RX TPA start V2 completion
40019 	 * records as indicated by the HWRM_VNIC_QCAPS command, this field is
40020 	 * used to specify the current RX checksum mode configured for all the
40021 	 * RX rings of a VNIC.
40022 	 */
40023 	uint8_t	rx_csum_v2_mode;
40024 	/*
40025 	 * This value indicates that the VNIC is configured to use the
40026 	 * default RX checksum mode for all the rings associated with this
40027 	 * VNIC.
40028 	 */
40029 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_DEFAULT UINT32_C(0x0)
40030 	/*
40031 	 * This value indicates that the VNIC is configured to use the RX
40032 	 * checksum 'all_ok' mode for all the rings associated with this
40033 	 * VNIC.
40034 	 */
40035 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_ALL_OK  UINT32_C(0x1)
40036 	/*
40037 	 * Any rx_csum_v2_mode value larger than or equal to this is not
40038 	 * valid
40039 	 */
40040 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_MAX	UINT32_C(0x2)
40041 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_LAST   HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_MAX
40042 	/*
40043 	 * If the device supports different L2 RX CQE modes, as indicated by
40044 	 * the HWRM_VNIC_QCAPS command, this field is used to convey the
40045 	 * configured CQE mode.
40046 	 */
40047 	uint8_t	l2_cqe_mode;
40048 	/*
40049 	 * This value indicates that the VNIC is configured with normal
40050 	 * (32B) CQE mode.
40051 	 */
40052 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_DEFAULT	UINT32_C(0x0)
40053 	/*
40054 	 * This value indicates that the VNIC is configured with compressed
40055 	 * (16B) CQE mode.
40056 	 */
40057 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_COMPRESSED UINT32_C(0x1)
40058 	/*
40059 	 * This value indicates that the VNIC is configured with mixed
40060 	 * CQE mode. HW generates either a 32B completion or a 16B
40061 	 * completion depending on use case within a VNIC.
40062 	 */
40063 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_MIXED	UINT32_C(0x2)
40064 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_LAST	HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_MIXED
40065 	/*
40066 	 * This field conveys the metadata format type that has been
40067 	 * configured. This value is product specific. Refer to the L2 HSI
40068 	 * completion ring structures for the detailed descriptions. For Thor
40069 	 * and Thor2, it corresponds to 'meta_format' in 'rx_pkt_cmpl_hi' and
40070 	 * 'rx_pkt_v3_cmpl_hi', respectively.
40071 	 */
40072 	uint8_t	metadata_format_type;
40073 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_0 UINT32_C(0x0)
40074 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_1 UINT32_C(0x1)
40075 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_2 UINT32_C(0x2)
40076 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_3 UINT32_C(0x3)
40077 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_4 UINT32_C(0x4)
40078 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_LAST HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_4
40079 	/* This field conveys the VNIC operation state. */
40080 	uint8_t	vnic_state;
40081 	/* Normal operation state. */
40082 	#define HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_NORMAL UINT32_C(0x0)
40083 	/* Drop all packets. */
40084 	#define HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_DROP   UINT32_C(0x1)
40085 	#define HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_LAST  HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_DROP
40086 	uint8_t	unused_1;
40087 	/*
40088 	 * This field is used in Output records to indicate that the output
40089 	 * is completely written to RAM. This field should be read as '1'
40090 	 * to indicate that the output has been completely written. When
40091 	 * writing a command completion or response to an internal processor,
40092 	 * the order of writes has to be such that this field is written last.
40093 	 */
40094 	uint8_t	valid;
40095 } hwrm_vnic_qcfg_output_t, *phwrm_vnic_qcfg_output_t;
40096 
40097 /*******************
40098  * hwrm_vnic_qcaps *
40099  *******************/
40100 
40101 
40102 /* hwrm_vnic_qcaps_input (size:192b/24B) */
40103 
40104 typedef struct hwrm_vnic_qcaps_input {
40105 	/* The HWRM command request type. */
40106 	uint16_t	req_type;
40107 	/*
40108 	 * The completion ring to send the completion event on. This should
40109 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40110 	 */
40111 	uint16_t	cmpl_ring;
40112 	/*
40113 	 * The sequence ID is used by the driver for tracking multiple
40114 	 * commands. This ID is treated as opaque data by the firmware and
40115 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40116 	 */
40117 	uint16_t	seq_id;
40118 	/*
40119 	 * The target ID of the command:
40120 	 * * 0x0-0xFFF8 - The function ID
40121 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40122 	 * * 0xFFFD - Reserved for user-space HWRM interface
40123 	 * * 0xFFFF - HWRM
40124 	 */
40125 	uint16_t	target_id;
40126 	/*
40127 	 * A physical address pointer pointing to a host buffer that the
40128 	 * command's response data will be written. This can be either a host
40129 	 * physical address (HPA) or a guest physical address (GPA) and must
40130 	 * point to a physically contiguous block of memory.
40131 	 */
40132 	uint64_t	resp_addr;
40133 	uint32_t	enables;
40134 	uint8_t	unused_0[4];
40135 } hwrm_vnic_qcaps_input_t, *phwrm_vnic_qcaps_input_t;
40136 
40137 /* hwrm_vnic_qcaps_output (size:192b/24B) */
40138 
40139 typedef struct hwrm_vnic_qcaps_output {
40140 	/* The specific error status for the command. */
40141 	uint16_t	error_code;
40142 	/* The HWRM command request type. */
40143 	uint16_t	req_type;
40144 	/* The sequence ID from the original command. */
40145 	uint16_t	seq_id;
40146 	/* The length of the response data in number of bytes. */
40147 	uint16_t	resp_len;
40148 	/* The maximum receive unit that is settable on a vnic. */
40149 	uint16_t	mru;
40150 	uint8_t	unused_0[2];
40151 	uint32_t	flags;
40152 	/* Unused. */
40153 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_UNUSED				UINT32_C(0x1)
40154 	/*
40155 	 * When this bit is '1', the capability of stripping VLAN in
40156 	 * the RX path is supported on VNIC(s).
40157 	 * If set to '0', then VLAN stripping capability is
40158 	 * not supported on VNIC(s).
40159 	 */
40160 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP			UINT32_C(0x2)
40161 	/*
40162 	 * When this bit is '1', the capability to buffer receive
40163 	 * packets in the hardware until the host posts new receive buffers
40164 	 * is supported on VNIC(s).
40165 	 * If set to '0', then bd_stall capability is not supported
40166 	 * on VNIC(s).
40167 	 */
40168 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_BD_STALL_CAP				UINT32_C(0x4)
40169 	/*
40170 	 * When this bit is '1', the capability to
40171 	 * receive both RoCE and non-RoCE traffic on VNIC(s) is
40172 	 * supported.
40173 	 * If set to '0', then the capability to receive
40174 	 * both RoCE and non-RoCE traffic on VNIC(s) is
40175 	 * not supported.
40176 	 */
40177 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_DUAL_VNIC_CAP			UINT32_C(0x8)
40178 	/*
40179 	 * When this bit is set to '1', the capability to configure
40180 	 * a VNIC to receive only RoCE traffic is supported.
40181 	 * When this flag is set to '0', the VNIC capability to
40182 	 * configure to receive only RoCE traffic is not supported.
40183 	 */
40184 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_ONLY_VNIC_CAP			UINT32_C(0x10)
40185 	/*
40186 	 * When this bit is set to '1', then the capability to enable
40187 	 * a VNIC in a mode where RSS context without configuring
40188 	 * RSS indirection table is supported (for RSS hash computation).
40189 	 * When this bit is set to '0', then a VNIC can not be configured
40190 	 * with a mode to enable RSS context without configuring RSS
40191 	 * indirection table.
40192 	 */
40193 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_DFLT_CR_CAP			UINT32_C(0x20)
40194 	/*
40195 	 * When this bit is '1', the capability to
40196 	 * mirror the RoCE traffic is supported.
40197 	 * If set to '0', then the capability to mirror the
40198 	 * RoCE traffic is not supported.
40199 	 */
40200 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_CAP	UINT32_C(0x40)
40201 	/*
40202 	 * When this bit is '1', the outermost RSS hashing capability
40203 	 * is supported. If set to '0', then the outermost RSS hashing
40204 	 * capability is not supported.
40205 	 */
40206 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP			UINT32_C(0x80)
40207 	/*
40208 	 * When this bit is '1', it indicates that firmware supports the
40209 	 * ability to steer incoming packets from one CoS queue to one
40210 	 * VNIC. This optional feature can then be enabled
40211 	 * using HWRM_VNIC_CFG on any VNIC. This feature is only
40212 	 * available when NVM option 'enable_cos_classification' is set
40213 	 * to 1. If set to '0', firmware does not support this feature.
40214 	 */
40215 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP			UINT32_C(0x100)
40216 	/*
40217 	 * When this bit is '1', it indicates that HW and firmware supports
40218 	 * the use of RX V2 and RX TPA start V2 completion records for all
40219 	 * the RX rings of a VNIC. Once set, this feature is mandatory to
40220 	 * be used for the RX rings of the VNIC. Additionally, two new RX
40221 	 * checksum features supported by these completion records can be
40222 	 * configured using the HWRM_VNIC_CFG on a VNIC. If set to '0', the
40223 	 * HW and the firmware does not support this feature.
40224 	 */
40225 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP			UINT32_C(0x200)
40226 	/*
40227 	 * When this bit is '1', it indicates that HW and firmware support
40228 	 * vnic state change. Host drivers can change the vnic state using
40229 	 * HWRM_VNIC_UPDATE. If set to '0', the HW and firmware do not
40230 	 * support this feature.
40231 	 */
40232 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VNIC_STATE_CAP			UINT32_C(0x400)
40233 	/*
40234 	 * When this bit is '1', it indicates that firmware supports
40235 	 * virtio-net functions default VNIC allocation using
40236 	 * HWRM_VNIC_ALLOC.
40237 	 * This capability is available only on Proxy VEE PF. If set to '0',
40238 	 * firmware does not support this feature.
40239 	 */
40240 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VIRTIO_NET_VNIC_ALLOC_CAP		UINT32_C(0x800)
40241 	/*
40242 	 * When this bit is set '1', then the capability to configure the
40243 	 * metadata format in the RX completion is supported for the VNIC.
40244 	 * When this bit is set to '0', then the capability to configure
40245 	 * the metadata format in the RX completion is not supported for
40246 	 * the VNIC.
40247 	 */
40248 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_METADATA_FORMAT_CAP			UINT32_C(0x1000)
40249 	/*
40250 	 * When this bit is set '1', it indicates that firmware returns
40251 	 * INVALID_PARAM error, if host drivers choose invalid hash type
40252 	 * bit combinations in vnic_rss_cfg.
40253 	 */
40254 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_STRICT_HASH_TYPE_CAP		UINT32_C(0x2000)
40255 	/*
40256 	 * When this bit is set '1', it indicates that firmware supports
40257 	 * the hash_type include and exclude flags in hwrm_vnic_rss_cfg.
40258 	 */
40259 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_HASH_TYPE_DELTA_CAP		UINT32_C(0x4000)
40260 	/*
40261 	 * When this bit is '1', it indicates that HW is capable of using
40262 	 * Toeplitz algorithm. This mode uses Toeplitz algorithm and
40263 	 * provided Toeplitz hash key to hash the packets according to the
40264 	 * configured hash type and hash mode. The Toeplitz hash results and
40265 	 * the provided Toeplitz RSS indirection table are used to determine
40266 	 * the RSS rings.
40267 	 */
40268 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_TOEPLITZ_CAP	UINT32_C(0x8000)
40269 	/*
40270 	 * When this bit is '1', it indicates that HW is capable of using
40271 	 * XOR algorithm. This mode uses 'XOR' algorithm to hash the packets
40272 	 * according to the configured hash type and hash mode. The XOR
40273 	 * hash results and the provided XOR RSS indirection table are
40274 	 * used to determine the RSS rings. Host drivers provided hash key
40275 	 * is not honored in this mode.
40276 	 */
40277 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_XOR_CAP		UINT32_C(0x10000)
40278 	/*
40279 	 * When this bit is '1', it indicates that HW is capable of using
40280 	 * checksum algorithm. In this mode, HW uses inner packets checksum
40281 	 * algorithm to distribute the packets across the rings and Toeplitz
40282 	 * algorithm to calculate the hash to convey it in the RX
40283 	 * completions. Host drivers should provide Toeplitz hash key.
40284 	 * As HW uses innermost packets checksum to distribute the packets
40285 	 * across the rings, host drivers can't convey hash mode to choose
40286 	 * outer headers to calculate Toeplitz hash. FW will fail such
40287 	 * configuration.
40288 	 */
40289 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_TOEPLITZ_CHKSM_CAP	UINT32_C(0x20000)
40290 	/*
40291 	 * When this bit is '1' HW supports hash calculation
40292 	 * based on IPV6 flow labels.
40293 	 */
40294 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPV6_FLOW_LABEL_CAP		UINT32_C(0x40000)
40295 	/*
40296 	 * When this bit is '1', it indicates that HW and firmware supports
40297 	 * the use of RX V3 and RX TPA start V3 completion records for all
40298 	 * the RX rings of a VNIC. Once set, this feature is mandatory to
40299 	 * be used for the RX rings of the VNIC. If set to '0', the
40300 	 * HW and the firmware does not support this feature.
40301 	 */
40302 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V3_CAP			UINT32_C(0x80000)
40303 	/*
40304 	 * When this bit is '1' HW supports different RX CQE record types.
40305 	 * Host drivers can choose the mode based on their application
40306 	 * requirements like performance, TPA, HDS and PTP.
40307 	 */
40308 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_L2_CQE_MODE_CAP			UINT32_C(0x100000)
40309 	/*
40310 	 * When this bit is '1' HW supports hash calculation
40311 	 * based on IPv4 IPSEC AH SPI field.
40312 	 */
40313 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_AH_SPI_IPV4_CAP		UINT32_C(0x200000)
40314 	/*
40315 	 * When this bit is '1' HW supports hash calculation
40316 	 * based on IPv4 IPSEC ESP SPI field.
40317 	 */
40318 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_ESP_SPI_IPV4_CAP		UINT32_C(0x400000)
40319 	/*
40320 	 * When this bit is '1' HW supports hash calculation
40321 	 * based on IPv6 IPSEC AH SPI field.
40322 	 */
40323 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_AH_SPI_IPV6_CAP		UINT32_C(0x800000)
40324 	/*
40325 	 * When this bit is '1' HW supports hash calculation
40326 	 * based on IPv6 IPSEC ESP SPI field.
40327 	 */
40328 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_ESP_SPI_IPV6_CAP		UINT32_C(0x1000000)
40329 	/*
40330 	 * When outermost_rss_cap is '1' and this bit is '1', the outermost
40331 	 * RSS hash mode may be set on a PF or trusted VF.
40332 	 * When outermost_rss_cap is '1' and this bit is '0', the outermost
40333 	 * RSS hash mode may be set on a PF.
40334 	 */
40335 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_TRUSTED_VF_CAP		UINT32_C(0x2000000)
40336 	/*
40337 	 * When this bit is '1' it indicates HW is capable of enabling ring
40338 	 * selection using the incoming spif and lcos for the packet.
40339 	 */
40340 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_PORTCOS_MAPPING_MODE			UINT32_C(0x4000000)
40341 	/*
40342 	 * When this bit is '1', it indicates controller enabled
40343 	 * RSS profile TCAM mode.
40344 	 */
40345 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_PROF_TCAM_MODE_ENABLED		UINT32_C(0x8000000)
40346 	/* When this bit is '1' FW supports VNIC hash mode. */
40347 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VNIC_RSS_HASH_MODE_CAP		UINT32_C(0x10000000)
40348 	/* When this bit is set to '1', hardware supports tunnel TPA. */
40349 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_HW_TUNNEL_TPA_CAP			UINT32_C(0x20000000)
40350 	/*
40351 	 * This field advertises the maximum concurrent TPA aggregations
40352 	 * supported by the VNIC on new devices that support TPA v2 or v3.
40353 	 * '0' means that both the TPA v2 and v3 are not supported.
40354 	 */
40355 	uint16_t	max_aggs_supported;
40356 	uint8_t	unused_1[5];
40357 	/*
40358 	 * This field is used in Output records to indicate that the output
40359 	 * is completely written to RAM. This field should be read as '1'
40360 	 * to indicate that the output has been completely written. When
40361 	 * writing a command completion or response to an internal processor,
40362 	 * the order of writes has to be such that this field is written last.
40363 	 */
40364 	uint8_t	valid;
40365 } hwrm_vnic_qcaps_output_t, *phwrm_vnic_qcaps_output_t;
40366 
40367 /*********************
40368  * hwrm_vnic_tpa_cfg *
40369  *********************/
40370 
40371 
40372 /* hwrm_vnic_tpa_cfg_input (size:384b/48B) */
40373 
40374 typedef struct hwrm_vnic_tpa_cfg_input {
40375 	/* The HWRM command request type. */
40376 	uint16_t	req_type;
40377 	/*
40378 	 * The completion ring to send the completion event on. This should
40379 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40380 	 */
40381 	uint16_t	cmpl_ring;
40382 	/*
40383 	 * The sequence ID is used by the driver for tracking multiple
40384 	 * commands. This ID is treated as opaque data by the firmware and
40385 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40386 	 */
40387 	uint16_t	seq_id;
40388 	/*
40389 	 * The target ID of the command:
40390 	 * * 0x0-0xFFF8 - The function ID
40391 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40392 	 * * 0xFFFD - Reserved for user-space HWRM interface
40393 	 * * 0xFFFF - HWRM
40394 	 */
40395 	uint16_t	target_id;
40396 	/*
40397 	 * A physical address pointer pointing to a host buffer that the
40398 	 * command's response data will be written. This can be either a host
40399 	 * physical address (HPA) or a guest physical address (GPA) and must
40400 	 * point to a physically contiguous block of memory.
40401 	 */
40402 	uint64_t	resp_addr;
40403 	uint32_t	flags;
40404 	/*
40405 	 * When this bit is '1', the VNIC shall be configured to
40406 	 * perform transparent packet aggregation (TPA) of
40407 	 * non-tunneled TCP packets.
40408 	 */
40409 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA			UINT32_C(0x1)
40410 	/*
40411 	 * When this bit is '1', the VNIC shall be configured to
40412 	 * perform transparent packet aggregation (TPA) of
40413 	 * tunneled TCP packets.
40414 	 */
40415 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_ENCAP_TPA		UINT32_C(0x2)
40416 	/*
40417 	 * When this bit is '1', the VNIC shall be configured to
40418 	 * perform transparent packet aggregation (TPA) according
40419 	 * to Windows Receive Segment Coalescing (RSC) rules.
40420 	 */
40421 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_RSC_WND_UPDATE		UINT32_C(0x4)
40422 	/*
40423 	 * When this bit is '1', the VNIC shall be configured to
40424 	 * perform transparent packet aggregation (TPA) according
40425 	 * to Linux Generic Receive Offload (GRO) rules.
40426 	 */
40427 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO			UINT32_C(0x8)
40428 	/*
40429 	 * When this bit is '1', the VNIC shall be configured to
40430 	 * perform transparent packet aggregation (TPA) for TCP
40431 	 * packets with IP ECN set to non-zero.
40432 	 */
40433 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN		UINT32_C(0x10)
40434 	/*
40435 	 * When this bit is '1', the VNIC shall be configured to
40436 	 * perform transparent packet aggregation (TPA) for
40437 	 * GRE tunneled TCP packets only if all packets have the
40438 	 * same GRE sequence.
40439 	 */
40440 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ	UINT32_C(0x20)
40441 	/*
40442 	 * When this bit is '1' and the GRO mode is enabled,
40443 	 * the VNIC shall be configured to
40444 	 * perform transparent packet aggregation (TPA) for
40445 	 * TCP/IPv4 packets with consecutively increasing IPIDs.
40446 	 * In other words, the last packet that is being
40447 	 * aggregated to an already existing aggregation context
40448 	 * shall have IPID 1 more than the IPID of the last packet
40449 	 * that was aggregated in that aggregation context.
40450 	 */
40451 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO_IPID_CHECK		UINT32_C(0x40)
40452 	/*
40453 	 * When this bit is '1' and the GRO mode is enabled,
40454 	 * the VNIC shall be configured to
40455 	 * perform transparent packet aggregation (TPA) for
40456 	 * TCP packets with the same TTL (IPv4) or Hop limit (IPv6)
40457 	 * value.
40458 	 */
40459 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO_TTL_CHECK		UINT32_C(0x80)
40460 	/*
40461 	 * When this bit is '1' and the GRO mode is enabled,
40462 	 * the VNIC shall DMA payload data using GRO rules.
40463 	 * When this bit is '0', the VNIC shall DMA payload data
40464 	 * using the more efficient LRO rules of filling all
40465 	 * aggregation buffers.
40466 	 */
40467 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_PACK_AS_GRO	UINT32_C(0x100)
40468 	uint32_t	enables;
40469 	/*
40470 	 * This bit must be '1' for the max_agg_segs field to be
40471 	 * configured.
40472 	 */
40473 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS	UINT32_C(0x1)
40474 	/*
40475 	 * This bit must be '1' for the max_aggs field to be
40476 	 * configured.
40477 	 */
40478 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS	UINT32_C(0x2)
40479 	/*
40480 	 * This bit must be '1' for the max_agg_timer field to be
40481 	 * configured.
40482 	 */
40483 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_TIMER	UINT32_C(0x4)
40484 	/* deprecated bit. Do not use!!! */
40485 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN	UINT32_C(0x8)
40486 	/*
40487 	 * This bit must be '1' for the tnl_tpa_en_bitmap field to be
40488 	 * configured.
40489 	 */
40490 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_TNL_TPA_EN	UINT32_C(0x10)
40491 	/* Logical vnic ID */
40492 	uint16_t	vnic_id;
40493 	/*
40494 	 * This is the maximum number of TCP segments that can
40495 	 * be aggregated (unit is Log2). Max value is 31. On new
40496 	 * devices supporting TPA v2, the unit is multiples of 4 and
40497 	 * valid values are > 0 and <= 63.
40498 	 */
40499 	uint16_t	max_agg_segs;
40500 	/* 1 segment */
40501 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_1   UINT32_C(0x0)
40502 	/* 2 segments */
40503 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_2   UINT32_C(0x1)
40504 	/* 4 segments */
40505 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_4   UINT32_C(0x2)
40506 	/* 8 segments */
40507 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_8   UINT32_C(0x3)
40508 	/* Any segment size larger than this is not valid */
40509 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX UINT32_C(0x1f)
40510 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_LAST HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX
40511 	/*
40512 	 * This is the maximum number of aggregations this VNIC is
40513 	 * allowed (unit is Log2). Max value is 7. On new devices
40514 	 * supporting TPA v2, this is in unit of 1 and must be > 0
40515 	 * and <= max_aggs_supported in the hwrm_vnic_qcaps response
40516 	 * to enable TPA v2.
40517 	 */
40518 	uint16_t	max_aggs;
40519 	/* 1 aggregation */
40520 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_1   UINT32_C(0x0)
40521 	/* 2 aggregations */
40522 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_2   UINT32_C(0x1)
40523 	/* 4 aggregations */
40524 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_4   UINT32_C(0x2)
40525 	/* 8 aggregations */
40526 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_8   UINT32_C(0x3)
40527 	/* 16 aggregations */
40528 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_16  UINT32_C(0x4)
40529 	/* Any aggregation size larger than this is not valid */
40530 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX UINT32_C(0x7)
40531 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_LAST HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX
40532 	uint8_t	unused_0[2];
40533 	/*
40534 	 * This is the maximum amount of time allowed for
40535 	 * an aggregation context to complete after it was initiated.
40536 	 */
40537 	uint32_t	max_agg_timer;
40538 	/*
40539 	 * This is the minimum amount of payload length required to
40540 	 * start an aggregation context. This field is deprecated and
40541 	 * should be set to 0. The minimum length is set by firmware
40542 	 * and can be queried using hwrm_vnic_tpa_qcfg.
40543 	 */
40544 	uint32_t	min_agg_len;
40545 	/*
40546 	 * If the device supports hardware tunnel TPA feature, as indicated by
40547 	 * the HWRM_VNIC_QCAPS command, this field is used to configure the
40548 	 * tunnel types to be enabled. Each bit corresponds to a specific
40549 	 * tunnel type. If a bit is set to '1', then the associated tunnel
40550 	 * type is enabled; otherwise, it is disabled.
40551 	 */
40552 	uint32_t	tnl_tpa_en_bitmap;
40553 	/*
40554 	 * When this bit is '1', enable VXLAN encapsulated packets for
40555 	 * aggregation.
40556 	 */
40557 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_VXLAN	UINT32_C(0x1)
40558 	/*
40559 	 * When this bit is set to '1', enable GENEVE encapsulated packets
40560 	 * for aggregation.
40561 	 */
40562 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_GENEVE	UINT32_C(0x2)
40563 	/*
40564 	 * When this bit is set to '1', enable NVGRE encapsulated packets
40565 	 * for aggregation..
40566 	 */
40567 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_NVGRE	UINT32_C(0x4)
40568 	/*
40569 	 * When this bit is set to '1', enable GRE encapsulated packets
40570 	 * for aggregation..
40571 	 */
40572 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_GRE		UINT32_C(0x8)
40573 	/*
40574 	 * When this bit is set to '1', enable IPV4 encapsulated packets
40575 	 * for aggregation..
40576 	 */
40577 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_IPV4		UINT32_C(0x10)
40578 	/*
40579 	 * When this bit is set to '1', enable IPV6 encapsulated packets
40580 	 * for aggregation..
40581 	 */
40582 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_IPV6		UINT32_C(0x20)
40583 	/*
40584 	 * When this bit is '1', enable VXLAN_GPE encapsulated packets for
40585 	 * aggregation.
40586 	 */
40587 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_VXLAN_GPE	UINT32_C(0x40)
40588 	/*
40589 	 * When this bit is '1', enable VXLAN_CUSTOMER1 encapsulated packets
40590 	 * for aggregation.
40591 	 */
40592 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_VXLAN_CUST1	UINT32_C(0x80)
40593 	/*
40594 	 * When this bit is '1', enable GRE_CUSTOMER1 encapsulated packets
40595 	 * for aggregation.
40596 	 */
40597 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_GRE_CUST1	UINT32_C(0x100)
40598 	/*
40599 	 * When this bit is '1', enable UPAR1 encapsulated packets for
40600 	 * aggregation.
40601 	 */
40602 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR1	UINT32_C(0x200)
40603 	/*
40604 	 * When this bit is '1', enable UPAR2 encapsulated packets for
40605 	 * aggregation.
40606 	 */
40607 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR2	UINT32_C(0x400)
40608 	/*
40609 	 * When this bit is '1', enable UPAR3 encapsulated packets for
40610 	 * aggregation.
40611 	 */
40612 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR3	UINT32_C(0x800)
40613 	/*
40614 	 * When this bit is '1', enable UPAR4 encapsulated packets for
40615 	 * aggregation.
40616 	 */
40617 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR4	UINT32_C(0x1000)
40618 	/*
40619 	 * When this bit is '1', enable UPAR5 encapsulated packets for
40620 	 * aggregation.
40621 	 */
40622 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR5	UINT32_C(0x2000)
40623 	/*
40624 	 * When this bit is '1', enable UPAR6 encapsulated packets for
40625 	 * aggregation.
40626 	 */
40627 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR6	UINT32_C(0x4000)
40628 	/*
40629 	 * When this bit is '1', enable UPAR7 encapsulated packets for
40630 	 * aggregation.
40631 	 */
40632 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR7	UINT32_C(0x8000)
40633 	/*
40634 	 * When this bit is '1', enable UPAR8 encapsulated packets for
40635 	 * aggregation.
40636 	 */
40637 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR8	UINT32_C(0x10000)
40638 	uint8_t	unused_1[4];
40639 } hwrm_vnic_tpa_cfg_input_t, *phwrm_vnic_tpa_cfg_input_t;
40640 
40641 /* hwrm_vnic_tpa_cfg_output (size:128b/16B) */
40642 
40643 typedef struct hwrm_vnic_tpa_cfg_output {
40644 	/* The specific error status for the command. */
40645 	uint16_t	error_code;
40646 	/* The HWRM command request type. */
40647 	uint16_t	req_type;
40648 	/* The sequence ID from the original command. */
40649 	uint16_t	seq_id;
40650 	/* The length of the response data in number of bytes. */
40651 	uint16_t	resp_len;
40652 	uint8_t	unused_0[7];
40653 	/*
40654 	 * This field is used in Output records to indicate that the output
40655 	 * is completely written to RAM. This field should be read as '1'
40656 	 * to indicate that the output has been completely written. When
40657 	 * writing a command completion or response to an internal processor,
40658 	 * the order of writes has to be such that this field is written last.
40659 	 */
40660 	uint8_t	valid;
40661 } hwrm_vnic_tpa_cfg_output_t, *phwrm_vnic_tpa_cfg_output_t;
40662 
40663 /**********************
40664  * hwrm_vnic_tpa_qcfg *
40665  **********************/
40666 
40667 
40668 /* hwrm_vnic_tpa_qcfg_input (size:192b/24B) */
40669 
40670 typedef struct hwrm_vnic_tpa_qcfg_input {
40671 	/* The HWRM command request type. */
40672 	uint16_t	req_type;
40673 	/*
40674 	 * The completion ring to send the completion event on. This should
40675 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40676 	 */
40677 	uint16_t	cmpl_ring;
40678 	/*
40679 	 * The sequence ID is used by the driver for tracking multiple
40680 	 * commands. This ID is treated as opaque data by the firmware and
40681 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40682 	 */
40683 	uint16_t	seq_id;
40684 	/*
40685 	 * The target ID of the command:
40686 	 * * 0x0-0xFFF8 - The function ID
40687 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40688 	 * * 0xFFFD - Reserved for user-space HWRM interface
40689 	 * * 0xFFFF - HWRM
40690 	 */
40691 	uint16_t	target_id;
40692 	/*
40693 	 * A physical address pointer pointing to a host buffer that the
40694 	 * command's response data will be written. This can be either a host
40695 	 * physical address (HPA) or a guest physical address (GPA) and must
40696 	 * point to a physically contiguous block of memory.
40697 	 */
40698 	uint64_t	resp_addr;
40699 	/* Logical vnic ID */
40700 	uint16_t	vnic_id;
40701 	uint8_t	unused_0[6];
40702 } hwrm_vnic_tpa_qcfg_input_t, *phwrm_vnic_tpa_qcfg_input_t;
40703 
40704 /* hwrm_vnic_tpa_qcfg_output (size:256b/32B) */
40705 
40706 typedef struct hwrm_vnic_tpa_qcfg_output {
40707 	/* The specific error status for the command. */
40708 	uint16_t	error_code;
40709 	/* The HWRM command request type. */
40710 	uint16_t	req_type;
40711 	/* The sequence ID from the original command. */
40712 	uint16_t	seq_id;
40713 	/* The length of the response data in number of bytes. */
40714 	uint16_t	resp_len;
40715 	uint32_t	flags;
40716 	/*
40717 	 * When this bit is '1', the VNIC is configured to
40718 	 * perform transparent packet aggregation (TPA) of
40719 	 * non-tunneled TCP packets.
40720 	 */
40721 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_TPA			UINT32_C(0x1)
40722 	/*
40723 	 * When this bit is '1', the VNIC is configured to
40724 	 * perform transparent packet aggregation (TPA) of
40725 	 * tunneled TCP packets.
40726 	 */
40727 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_ENCAP_TPA		UINT32_C(0x2)
40728 	/*
40729 	 * When this bit is '1', the VNIC is configured to
40730 	 * perform transparent packet aggregation (TPA) according
40731 	 * to Windows Receive Segment Coalescing (RSC) rules.
40732 	 */
40733 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_RSC_WND_UPDATE		UINT32_C(0x4)
40734 	/*
40735 	 * When this bit is '1', the VNIC is configured to
40736 	 * perform transparent packet aggregation (TPA) according
40737 	 * to Linux Generic Receive Offload (GRO) rules.
40738 	 */
40739 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO			UINT32_C(0x8)
40740 	/*
40741 	 * When this bit is '1', the VNIC is configured to
40742 	 * perform transparent packet aggregation (TPA) for TCP
40743 	 * packets with IP ECN set to non-zero.
40744 	 */
40745 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_AGG_WITH_ECN		UINT32_C(0x10)
40746 	/*
40747 	 * When this bit is '1', the VNIC is configured to
40748 	 * perform transparent packet aggregation (TPA) for
40749 	 * GRE tunneled TCP packets only if all packets have the
40750 	 * same GRE sequence.
40751 	 */
40752 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ	UINT32_C(0x20)
40753 	/*
40754 	 * When this bit is '1' and the GRO mode is enabled,
40755 	 * the VNIC is configured to
40756 	 * perform transparent packet aggregation (TPA) for
40757 	 * TCP/IPv4 packets with consecutively increasing IPIDs.
40758 	 * In other words, the last packet that is being
40759 	 * aggregated to an already existing aggregation context
40760 	 * shall have IPID 1 more than the IPID of the last packet
40761 	 * that was aggregated in that aggregation context.
40762 	 */
40763 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO_IPID_CHECK		UINT32_C(0x40)
40764 	/*
40765 	 * When this bit is '1' and the GRO mode is enabled,
40766 	 * the VNIC is configured to
40767 	 * perform transparent packet aggregation (TPA) for
40768 	 * TCP packets with the same TTL (IPv4) or Hop limit (IPv6)
40769 	 * value.
40770 	 */
40771 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO_TTL_CHECK		UINT32_C(0x80)
40772 	/*
40773 	 * This is the maximum number of TCP segments that can
40774 	 * be aggregated (unit is Log2). Max value is 31.
40775 	 */
40776 	uint16_t	max_agg_segs;
40777 	/* 1 segment */
40778 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_1   UINT32_C(0x0)
40779 	/* 2 segments */
40780 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_2   UINT32_C(0x1)
40781 	/* 4 segments */
40782 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_4   UINT32_C(0x2)
40783 	/* 8 segments */
40784 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_8   UINT32_C(0x3)
40785 	/* Any segment size larger than this is not valid */
40786 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_MAX UINT32_C(0x1f)
40787 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_LAST HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_MAX
40788 	/*
40789 	 * This is the maximum number of aggregations this VNIC is
40790 	 * allowed (unit is Log2). Max value is 7
40791 	 */
40792 	uint16_t	max_aggs;
40793 	/* 1 aggregation */
40794 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_1   UINT32_C(0x0)
40795 	/* 2 aggregations */
40796 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_2   UINT32_C(0x1)
40797 	/* 4 aggregations */
40798 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_4   UINT32_C(0x2)
40799 	/* 8 aggregations */
40800 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_8   UINT32_C(0x3)
40801 	/* 16 aggregations */
40802 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_16  UINT32_C(0x4)
40803 	/* Any aggregation size larger than this is not valid */
40804 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_MAX UINT32_C(0x7)
40805 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_LAST HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_MAX
40806 	/*
40807 	 * This is the maximum amount of time allowed for
40808 	 * an aggregation context to complete after it was initiated.
40809 	 */
40810 	uint32_t	max_agg_timer;
40811 	/*
40812 	 * This is the minimum amount of payload length required to
40813 	 * start an aggregation context.
40814 	 */
40815 	uint32_t	min_agg_len;
40816 	/*
40817 	 * If the device supports hardware tunnel TPA feature, as indicated by
40818 	 * the HWRM_VNIC_QCAPS command, this field conveys the bitmap of the
40819 	 * tunnel types that have been configured. Each bit corresponds to a
40820 	 * specific tunnel type. If a bit is set to '1', then the associated
40821 	 * tunnel type is enabled; otherwise, it is disabled.
40822 	 */
40823 	uint32_t	tnl_tpa_en_bitmap;
40824 	/*
40825 	 * When this bit is '1', enable VXLAN encapsulated packets for
40826 	 * aggregation.
40827 	 */
40828 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_VXLAN	UINT32_C(0x1)
40829 	/*
40830 	 * When this bit is set to '1', enable GENEVE encapsulated packets
40831 	 * for aggregation.
40832 	 */
40833 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_GENEVE	UINT32_C(0x2)
40834 	/*
40835 	 * When this bit is set to '1', enable NVGRE encapsulated packets
40836 	 * for aggregation..
40837 	 */
40838 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_NVGRE	UINT32_C(0x4)
40839 	/*
40840 	 * When this bit is set to '1', enable GRE encapsulated packets
40841 	 * for aggregation..
40842 	 */
40843 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_GRE		UINT32_C(0x8)
40844 	/*
40845 	 * When this bit is set to '1', enable IPV4 encapsulated packets
40846 	 * for aggregation..
40847 	 */
40848 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_IPV4		UINT32_C(0x10)
40849 	/*
40850 	 * When this bit is set to '1', enable IPV6 encapsulated packets
40851 	 * for aggregation..
40852 	 */
40853 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_IPV6		UINT32_C(0x20)
40854 	/*
40855 	 * When this bit is '1', enable VXLAN_GPE encapsulated packets for
40856 	 * aggregation.
40857 	 */
40858 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_VXLAN_GPE	UINT32_C(0x40)
40859 	/*
40860 	 * When this bit is '1', enable VXLAN_CUSTOMER1 encapsulated packets
40861 	 * for aggregation.
40862 	 */
40863 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_VXLAN_CUST1	UINT32_C(0x80)
40864 	/*
40865 	 * When this bit is '1', enable GRE_CUSTOMER1 encapsulated packets
40866 	 * for aggregation.
40867 	 */
40868 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_GRE_CUST1	UINT32_C(0x100)
40869 	/*
40870 	 * When this bit is '1', enable UPAR1 encapsulated packets for
40871 	 * aggregation.
40872 	 */
40873 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR1	UINT32_C(0x200)
40874 	/*
40875 	 * When this bit is '1', enable UPAR2 encapsulated packets for
40876 	 * aggregation.
40877 	 */
40878 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR2	UINT32_C(0x400)
40879 	/*
40880 	 * When this bit is '1', enable UPAR3 encapsulated packets for
40881 	 * aggregation.
40882 	 */
40883 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR3	UINT32_C(0x800)
40884 	/*
40885 	 * When this bit is '1', enable UPAR4 encapsulated packets for
40886 	 * aggregation.
40887 	 */
40888 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR4	UINT32_C(0x1000)
40889 	/*
40890 	 * When this bit is '1', enable UPAR5 encapsulated packets for
40891 	 * aggregation.
40892 	 */
40893 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR5	UINT32_C(0x2000)
40894 	/*
40895 	 * When this bit is '1', enable UPAR6 encapsulated packets for
40896 	 * aggregation.
40897 	 */
40898 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR6	UINT32_C(0x4000)
40899 	/*
40900 	 * When this bit is '1', enable UPAR7 encapsulated packets for
40901 	 * aggregation.
40902 	 */
40903 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR7	UINT32_C(0x8000)
40904 	/*
40905 	 * When this bit is '1', enable UPAR8 encapsulated packets for
40906 	 * aggregation.
40907 	 */
40908 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR8	UINT32_C(0x10000)
40909 	uint8_t	unused_0[3];
40910 	/*
40911 	 * This field is used in Output records to indicate that the output
40912 	 * is completely written to RAM. This field should be read as '1'
40913 	 * to indicate that the output has been completely written. When
40914 	 * writing a command completion or response to an internal processor,
40915 	 * the order of writes has to be such that this field is written last.
40916 	 */
40917 	uint8_t	valid;
40918 } hwrm_vnic_tpa_qcfg_output_t, *phwrm_vnic_tpa_qcfg_output_t;
40919 
40920 /*********************
40921  * hwrm_vnic_rss_cfg *
40922  *********************/
40923 
40924 
40925 /* hwrm_vnic_rss_cfg_input (size:384b/48B) */
40926 
40927 typedef struct hwrm_vnic_rss_cfg_input {
40928 	/* The HWRM command request type. */
40929 	uint16_t	req_type;
40930 	/*
40931 	 * The completion ring to send the completion event on. This should
40932 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40933 	 */
40934 	uint16_t	cmpl_ring;
40935 	/*
40936 	 * The sequence ID is used by the driver for tracking multiple
40937 	 * commands. This ID is treated as opaque data by the firmware and
40938 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40939 	 */
40940 	uint16_t	seq_id;
40941 	/*
40942 	 * The target ID of the command:
40943 	 * * 0x0-0xFFF8 - The function ID
40944 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40945 	 * * 0xFFFD - Reserved for user-space HWRM interface
40946 	 * * 0xFFFF - HWRM
40947 	 */
40948 	uint16_t	target_id;
40949 	/*
40950 	 * A physical address pointer pointing to a host buffer that the
40951 	 * command's response data will be written. This can be either a host
40952 	 * physical address (HPA) or a guest physical address (GPA) and must
40953 	 * point to a physically contiguous block of memory.
40954 	 */
40955 	uint64_t	resp_addr;
40956 	uint32_t	hash_type;
40957 	/*
40958 	 * When this bit is '1', the RSS hash shall be computed
40959 	 * over source and destination IPv4 addresses of IPv4
40960 	 * packets.
40961 	 */
40962 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4		UINT32_C(0x1)
40963 	/*
40964 	 * When this bit is '1', the RSS hash shall be computed
40965 	 * over source/destination IPv4 addresses and
40966 	 * source/destination ports of TCP/IPv4 packets.
40967 	 */
40968 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4		UINT32_C(0x2)
40969 	/*
40970 	 * When this bit is '1', the RSS hash shall be computed
40971 	 * over source/destination IPv4 addresses and
40972 	 * source/destination ports of UDP/IPv4 packets.
40973 	 */
40974 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4		UINT32_C(0x4)
40975 	/*
40976 	 * When this bit is '1', the RSS hash shall be computed
40977 	 * over source and destination IPv6 addresses of IPv6
40978 	 * packets.
40979 	 */
40980 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6		UINT32_C(0x8)
40981 	/*
40982 	 * When this bit is '1', the RSS hash shall be computed
40983 	 * over source/destination IPv6 addresses and
40984 	 * source/destination ports of TCP/IPv6 packets.
40985 	 */
40986 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6		UINT32_C(0x10)
40987 	/*
40988 	 * When this bit is '1', the RSS hash shall be computed
40989 	 * over source/destination IPv6 addresses and
40990 	 * source/destination ports of UDP/IPv6 packets.
40991 	 */
40992 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6		UINT32_C(0x20)
40993 	/*
40994 	 * When this bit is '1', the RSS hash shall be computed
40995 	 * over source, destination IPv6 addresses and flow label of IPv6
40996 	 * packets. Hash type ipv6 and ipv6_flow_label are mutually
40997 	 * exclusive. HW does not include the flow_label in hash
40998 	 * calculation for the packets that are matching tcp_ipv6 and
40999 	 * udp_ipv6 hash types. Host drivers should set this bit based on
41000 	 * rss_ipv6_flow_label_cap.
41001 	 */
41002 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6_FLOW_LABEL	UINT32_C(0x40)
41003 	/*
41004 	 * When this bit is '1', the RSS hash shall be computed over
41005 	 * source/destination IPv4 addresses and IPSEC AH SPI field of IPSEC
41006 	 * AH/IPv4 packets. Host drivers should set this bit based on
41007 	 * rss_ipsec_ah_spi_ipv4_cap.
41008 	 */
41009 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_AH_SPI_IPV4	UINT32_C(0x80)
41010 	/*
41011 	 * When this bit is '1', the RSS hash shall be computed over
41012 	 * source/destination IPv4 addresses and IPSEC ESP SPI field of IPSEC
41013 	 * ESP/IPv4 packets. Host drivers should set this bit based on
41014 	 * rss_ipsec_esp_spi_ipv4_cap.
41015 	 */
41016 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV4	UINT32_C(0x100)
41017 	/*
41018 	 * When this bit is '1', the RSS hash shall be computed over
41019 	 * source/destination IPv6 addresses and IPSEC AH SPI field of IPSEC
41020 	 * AH/IPv6 packets. Host drivers should set this bit based on
41021 	 * rss_ipsec_ah_spi_ipv6_cap.
41022 	 */
41023 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_AH_SPI_IPV6	UINT32_C(0x200)
41024 	/*
41025 	 * When this bit is '1', the RSS hash shall be computed over
41026 	 * source/destination IPv6 addresses and IPSEC ESP SPI field of IPSEC
41027 	 * ESP/IPv6 packets. Host drivers should set this bit based on
41028 	 * rss_ipsec_esp_spi_ipv6_cap.
41029 	 */
41030 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV6	UINT32_C(0x400)
41031 	/* VNIC ID of VNIC associated with RSS table being configured. */
41032 	uint16_t	vnic_id;
41033 	/*
41034 	 * Specifies which VNIC ring table pair to configure.
41035 	 * Valid values range from 0 to 7.
41036 	 */
41037 	uint8_t	ring_table_pair_index;
41038 	/*
41039 	 * Flags to specify different RSS hash modes. Global RSS hash mode is
41040 	 * indicated when vnic_id and rss_ctx_idx fields are set to value of
41041 	 * 0xffff. Only PF can initiate global RSS hash mode setting changes.
41042 	 * VNIC RSS hash mode is indicated with valid vnic_id and rss_ctx_idx,
41043 	 * if FW is VNIC_RSS_HASH_MODE capable. FW configures the mode based
41044 	 * on first come first serve order. Global RSS hash mode and VNIC RSS
41045 	 * hash modes are mutually exclusive. FW returns invalid error
41046 	 * if FW receives conflicting requests. To change the current hash
41047 	 * mode, the mode associated drivers need to be unloaded and apply
41048 	 * the new configuration.
41049 	 */
41050 	uint8_t	hash_mode_flags;
41051 	/*
41052 	 * When this bit is '1' and FW is VNIC_RSS_HASH_MODE capable,
41053 	 * innermost_4 and innermost_2 hash modes are used to configure
41054 	 * the tuple mode. When this bit is '1' and FW is not
41055 	 * VNIC_RSS_HASH_MODE capable, It indicates using current RSS hash
41056 	 * mode setting configured in the device otherwise.
41057 	 */
41058 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT	UINT32_C(0x1)
41059 	/*
41060 	 * When this bit is '1', it indicates requesting support of
41061 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
41062 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
41063 	 * packets, the RSS hash is computed over the normal
41064 	 * src/dest l3 and src/dest l4 headers.
41065 	 */
41066 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_4	UINT32_C(0x2)
41067 	/*
41068 	 * When this bit is '1', it indicates requesting support of
41069 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
41070 	 * tunnel packets. For none-tunnel packets, the RSS hash is
41071 	 * computed over the normal src/dest l3 headers.
41072 	 */
41073 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_2	UINT32_C(0x4)
41074 	/*
41075 	 * When this bit is '1', it indicates requesting support of
41076 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
41077 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
41078 	 * packets, the RSS hash is computed over the normal
41079 	 * src/dest l3 and src/dest l4 headers.
41080 	 */
41081 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_4	UINT32_C(0x8)
41082 	/*
41083 	 * When this bit is '1', it indicates requesting support of
41084 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
41085 	 * tunnel packets. For none-tunnel packets, the RSS hash is
41086 	 * computed over the normal src/dest l3 headers.
41087 	 */
41088 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_2	UINT32_C(0x10)
41089 	/* This is the address for rss ring group table */
41090 	uint64_t	ring_grp_tbl_addr;
41091 	/* This is the address for rss hash key table */
41092 	uint64_t	hash_key_tbl_addr;
41093 	/* Index to the rss indirection table. */
41094 	uint16_t	rss_ctx_idx;
41095 	uint8_t	flags;
41096 	/*
41097 	 * When this bit is '1', it indicates that the hash_type field is
41098 	 * interpreted as a change relative the current configuration. Each
41099 	 * '1' bit in hash_type represents a header to add to the current
41100 	 * hash. Zeroes designate the hash_type state bits that should remain
41101 	 * unchanged, if possible. If this constraint on the existing state
41102 	 * cannot be satisfied, then the implementation should preference
41103 	 * adding other headers so as to honor the request to add the
41104 	 * specified headers. It is an error to set this flag concurrently
41105 	 * with hash_type_exclude.
41106 	 */
41107 	#define HWRM_VNIC_RSS_CFG_INPUT_FLAGS_HASH_TYPE_INCLUDE		UINT32_C(0x1)
41108 	/*
41109 	 * When this bit is '1', it indicates that the hash_type field is
41110 	 * interpreted as a change relative the current configuration. Each
41111 	 * '1' bit in hash_type represents a header to remove from the
41112 	 * current hash. Zeroes designate the hash_type state bits that
41113 	 * should remain unchanged, if possible. If this constraint on the
41114 	 * existing state cannot be satisfied, then the implementation should
41115 	 * preference removing other headers so as to honor the request to
41116 	 * remove the specified headers. It is an error to set this flag
41117 	 * concurrently with hash_type_include.
41118 	 */
41119 	#define HWRM_VNIC_RSS_CFG_INPUT_FLAGS_HASH_TYPE_EXCLUDE		UINT32_C(0x2)
41120 	/*
41121 	 * When this bit is '1', it indicates that the support of setting
41122 	 * ipsec hash_types by the host drivers.
41123 	 */
41124 	#define HWRM_VNIC_RSS_CFG_INPUT_FLAGS_IPSEC_HASH_TYPE_CFG_SUPPORT	UINT32_C(0x4)
41125 	uint8_t	ring_select_mode;
41126 	/*
41127 	 * In this mode, HW uses Toeplitz algorithm and provided Toeplitz
41128 	 * hash key to hash the packets according to the configured hash
41129 	 * type and hash mode. The Toeplitz hash results and the provided
41130 	 * Toeplitz RSS indirection table are used to determine the RSS
41131 	 * rings.
41132 	 */
41133 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_TOEPLITZ	UINT32_C(0x0)
41134 	/*
41135 	 * In this mode, HW uses XOR algorithm to hash the packets according
41136 	 * to the configured hash type and hash mode. The XOR hash results
41137 	 * and the provided XOR RSS indirection table are used to determine
41138 	 * the RSS rings. Host drivers provided hash key is not honored in
41139 	 * this mode.
41140 	 */
41141 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_XOR		UINT32_C(0x1)
41142 	/*
41143 	 * In this mode, HW uses inner packets checksum algorithm to
41144 	 * distribute the packets across the rings and Toeplitz algorithm
41145 	 * to calculate the hash to convey it in the RX completions. Host
41146 	 * drivers should provide Toeplitz hash key. As HW uses innermost
41147 	 * packets checksum to distribute the packets across the rings,
41148 	 * host drivers can't convey hash mode to choose outer headers to
41149 	 * calculate Toeplitz hash. FW will fail such configuration.
41150 	 */
41151 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM UINT32_C(0x2)
41152 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_LAST		HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM
41153 	uint8_t	unused_1[4];
41154 } hwrm_vnic_rss_cfg_input_t, *phwrm_vnic_rss_cfg_input_t;
41155 
41156 /* hwrm_vnic_rss_cfg_output (size:128b/16B) */
41157 
41158 typedef struct hwrm_vnic_rss_cfg_output {
41159 	/* The specific error status for the command. */
41160 	uint16_t	error_code;
41161 	/* The HWRM command request type. */
41162 	uint16_t	req_type;
41163 	/* The sequence ID from the original command. */
41164 	uint16_t	seq_id;
41165 	/* The length of the response data in number of bytes. */
41166 	uint16_t	resp_len;
41167 	uint8_t	unused_0[7];
41168 	/*
41169 	 * This field is used in Output records to indicate that the output
41170 	 * is completely written to RAM. This field should be read as '1'
41171 	 * to indicate that the output has been completely written. When
41172 	 * writing a command completion or response to an internal processor,
41173 	 * the order of writes has to be such that this field is written last.
41174 	 */
41175 	uint8_t	valid;
41176 } hwrm_vnic_rss_cfg_output_t, *phwrm_vnic_rss_cfg_output_t;
41177 
41178 /* hwrm_vnic_rss_cfg_cmd_err (size:64b/8B) */
41179 
41180 typedef struct hwrm_vnic_rss_cfg_cmd_err {
41181 	/*
41182 	 * command specific error codes that goes to
41183 	 * the cmd_err field in Common HWRM Error Response.
41184 	 */
41185 	uint8_t	code;
41186 	/* Unknown error */
41187 	#define HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_UNKNOWN		UINT32_C(0x0)
41188 	/*
41189 	 * Unable to change global RSS mode to outer due to all active
41190 	 * interfaces are not ready to support outer RSS hashing.
41191 	 */
41192 	#define HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_INTERFACE_NOT_READY UINT32_C(0x1)
41193 	#define HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_LAST		HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_INTERFACE_NOT_READY
41194 	uint8_t	unused_0[7];
41195 } hwrm_vnic_rss_cfg_cmd_err_t, *phwrm_vnic_rss_cfg_cmd_err_t;
41196 
41197 /**********************
41198  * hwrm_vnic_rss_qcfg *
41199  **********************/
41200 
41201 
41202 /* hwrm_vnic_rss_qcfg_input (size:192b/24B) */
41203 
41204 typedef struct hwrm_vnic_rss_qcfg_input {
41205 	/* The HWRM command request type. */
41206 	uint16_t	req_type;
41207 	/*
41208 	 * The completion ring to send the completion event on. This should
41209 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41210 	 */
41211 	uint16_t	cmpl_ring;
41212 	/*
41213 	 * The sequence ID is used by the driver for tracking multiple
41214 	 * commands. This ID is treated as opaque data by the firmware and
41215 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41216 	 */
41217 	uint16_t	seq_id;
41218 	/*
41219 	 * The target ID of the command:
41220 	 * * 0x0-0xFFF8 - The function ID
41221 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41222 	 * * 0xFFFD - Reserved for user-space HWRM interface
41223 	 * * 0xFFFF - HWRM
41224 	 */
41225 	uint16_t	target_id;
41226 	/*
41227 	 * A physical address pointer pointing to a host buffer that the
41228 	 * command's response data will be written. This can be either a host
41229 	 * physical address (HPA) or a guest physical address (GPA) and must
41230 	 * point to a physically contiguous block of memory.
41231 	 */
41232 	uint64_t	resp_addr;
41233 	/*
41234 	 * Index to the rss indirection table. This field is used as a lookup
41235 	 * for chips before Thor - i.e. Cumulus and Whitney.
41236 	 */
41237 	uint16_t	rss_ctx_idx;
41238 	/*
41239 	 * VNIC ID of VNIC associated with RSS table being queried. This field
41240 	 * is used as a lookup for Thor and later chips.
41241 	 */
41242 	uint16_t	vnic_id;
41243 	uint8_t	unused_0[4];
41244 } hwrm_vnic_rss_qcfg_input_t, *phwrm_vnic_rss_qcfg_input_t;
41245 
41246 /* hwrm_vnic_rss_qcfg_output (size:512b/64B) */
41247 
41248 typedef struct hwrm_vnic_rss_qcfg_output {
41249 	/* The specific error status for the command. */
41250 	uint16_t	error_code;
41251 	/* The HWRM command request type. */
41252 	uint16_t	req_type;
41253 	/* The sequence ID from the original command. */
41254 	uint16_t	seq_id;
41255 	/* The length of the response data in number of bytes. */
41256 	uint16_t	resp_len;
41257 	uint32_t	hash_type;
41258 	/*
41259 	 * When this bit is '1', the RSS hash shall be computed
41260 	 * over source and destination IPv4 addresses of IPv4
41261 	 * packets.
41262 	 */
41263 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV4		UINT32_C(0x1)
41264 	/*
41265 	 * When this bit is '1', the RSS hash shall be computed
41266 	 * over source/destination IPv4 addresses and
41267 	 * source/destination ports of TCP/IPv4 packets.
41268 	 */
41269 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_TCP_IPV4		UINT32_C(0x2)
41270 	/*
41271 	 * When this bit is '1', the RSS hash shall be computed
41272 	 * over source/destination IPv4 addresses and
41273 	 * source/destination ports of UDP/IPv4 packets.
41274 	 */
41275 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_UDP_IPV4		UINT32_C(0x4)
41276 	/*
41277 	 * When this bit is '1', the RSS hash shall be computed
41278 	 * over source and destination IPv6 addresses of IPv6
41279 	 * packets.
41280 	 */
41281 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV6		UINT32_C(0x8)
41282 	/*
41283 	 * When this bit is '1', the RSS hash shall be computed
41284 	 * over source/destination IPv6 addresses and
41285 	 * source/destination ports of TCP/IPv6 packets.
41286 	 */
41287 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_TCP_IPV6		UINT32_C(0x10)
41288 	/*
41289 	 * When this bit is '1', the RSS hash shall be computed
41290 	 * over source/destination IPv6 addresses and
41291 	 * source/destination ports of UDP/IPv6 packets.
41292 	 */
41293 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_UDP_IPV6		UINT32_C(0x20)
41294 	/*
41295 	 * When this bit is '1', the RSS hash shall be computed
41296 	 * over source, destination IPv6 addresses and flow label of IPv6
41297 	 * packets. Hash type ipv6 and ipv6_flow_label are mutually
41298 	 * exclusive. HW does not include the flow_label in hash
41299 	 * calculation for the packets that are matching tcp_ipv6 and
41300 	 * udp_ipv6 hash types. This bit will be '0' if
41301 	 * rss_ipv6_flow_label_cap is '0'.
41302 	 */
41303 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV6_FLOW_LABEL	UINT32_C(0x40)
41304 	/*
41305 	 * When this bit is '1', the RSS hash shall be computed over
41306 	 * source/destination IPv4 addresses and IPSEC AH SPI field of IPSEC
41307 	 * AH/IPv4 packets. This bit will be '0' if rss_ipsec_ah_spi_ipv4_cap
41308 	 * is '0'.
41309 	 */
41310 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_AH_SPI_IPV4	UINT32_C(0x80)
41311 	/*
41312 	 * When this bit is '1', the RSS hash shall be computed over
41313 	 * source/destination IPv4 addresses and IPSEC ESP SPI field of IPSEC
41314 	 * ESP/IPv4 packets. This bit will be '0' if
41315 	 * rss_ipsec_esp_spi_ipv4_cap is '0'.
41316 	 */
41317 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_ESP_SPI_IPV4	UINT32_C(0x100)
41318 	/*
41319 	 * When this bit is '1', the RSS hash shall be computed over
41320 	 * source/destination IPv6 addresses and IPSEC AH SPI field of IPSEC
41321 	 * AH/IPv6 packets. This bit will be '0' if
41322 	 * rss_ipsec_ah_spi_ipv6_cap is '0'.
41323 	 */
41324 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_AH_SPI_IPV6	UINT32_C(0x200)
41325 	/*
41326 	 * When this bit is '1', the RSS hash shall be computed over
41327 	 * source/destination IPv6 addresses and IPSEC ESP SPI field of IPSEC
41328 	 * ESP/IPv6 packets. This bit will be '0' if
41329 	 * rss_ipsec_esp_spi_ipv6_cap is '0'.
41330 	 */
41331 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_ESP_SPI_IPV6	UINT32_C(0x400)
41332 	uint8_t	unused_0[4];
41333 	/* This is the value of rss hash key */
41334 	uint32_t	hash_key[10];
41335 	/*
41336 	 * Flags to specify different RSS hash modes. Setting rss_ctx_idx to
41337 	 * the value of 0xffff implies a global RSS configuration query.
41338 	 * hash_mode_flags are only valid for global RSS configuration query.
41339 	 * Only the PF can initiate a global RSS configuration query.
41340 	 * The query request fails if any VNIC is configured with hash mode
41341 	 * and rss_ctx_idx is 0xffff.
41342 	 */
41343 	uint8_t	hash_mode_flags;
41344 	/*
41345 	 * When this bit is '1' and FW is VNIC_RSS_HASH_MODE capable,
41346 	 * it indicates VNIC's configured RSS hash mode.
41347 	 * When this bit is '1' and FW is not VNIC_RSS_HASH_MODE capable,
41348 	 * It indicates using current RSS hash mode setting configured in the
41349 	 * device.
41350 	 */
41351 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_DEFAULT	UINT32_C(0x1)
41352 	/*
41353 	 * When this bit is '1', it indicates requesting support of
41354 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
41355 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
41356 	 * packets, the RSS hash is computed over the normal
41357 	 * src/dest l3 and src/dest l4 headers.
41358 	 */
41359 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_4	UINT32_C(0x2)
41360 	/*
41361 	 * When this bit is '1', it indicates requesting support of
41362 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
41363 	 * tunnel packets. For none-tunnel packets, the RSS hash is
41364 	 * computed over the normal src/dest l3 headers.
41365 	 */
41366 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_2	UINT32_C(0x4)
41367 	/*
41368 	 * When this bit is '1', it indicates requesting support of
41369 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
41370 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
41371 	 * packets, the RSS hash is computed over the normal
41372 	 * src/dest l3 and src/dest l4 headers.
41373 	 */
41374 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_4	UINT32_C(0x8)
41375 	/*
41376 	 * When this bit is '1', it indicates requesting support of
41377 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
41378 	 * tunnel packets. For none-tunnel packets, the RSS hash is
41379 	 * computed over the normal src/dest l3 headers.
41380 	 */
41381 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_2	UINT32_C(0x10)
41382 	uint8_t	ring_select_mode;
41383 	/*
41384 	 * In this mode, HW uses Toeplitz algorithm and provided Toeplitz
41385 	 * hash key to hash the packets according to the configured hash
41386 	 * type and hash mode. The Toeplitz hash results and the provided
41387 	 * Toeplitz RSS indirection table are used to determine the RSS
41388 	 * rings.
41389 	 */
41390 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_TOEPLITZ	UINT32_C(0x0)
41391 	/*
41392 	 * In this mode, HW uses XOR algorithm to hash the packets according
41393 	 * to the configured hash type and hash mode. The XOR hash results
41394 	 * and the provided XOR RSS indirection table are used to determine
41395 	 * the RSS rings. Host drivers provided hash key is not honored in
41396 	 * this mode.
41397 	 */
41398 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_XOR		UINT32_C(0x1)
41399 	/*
41400 	 * In this mode, HW uses inner packets checksum algorithm to
41401 	 * distribute the packets across the rings and Toeplitz algorithm
41402 	 * to calculate the hash to convey it in the RX completions. Host
41403 	 * drivers should provide Toeplitz hash key. As HW uses innermost
41404 	 * packets checksum to distribute the packets across the rings,
41405 	 * host drivers can't convey hash mode to choose outer headers to
41406 	 * calculate Toeplitz hash. FW will fail such configuration.
41407 	 */
41408 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM UINT32_C(0x2)
41409 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_LAST		HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM
41410 	uint8_t	unused_1[5];
41411 	/*
41412 	 * This field is used in Output records to indicate that the output
41413 	 * is completely written to RAM. This field should be read as '1'
41414 	 * to indicate that the output has been completely written. When
41415 	 * writing a command completion or response to an internal processor,
41416 	 * the order of writes has to be such that this field is written last.
41417 	 */
41418 	uint8_t	valid;
41419 } hwrm_vnic_rss_qcfg_output_t, *phwrm_vnic_rss_qcfg_output_t;
41420 
41421 /**************************
41422  * hwrm_vnic_plcmodes_cfg *
41423  **************************/
41424 
41425 
41426 /* hwrm_vnic_plcmodes_cfg_input (size:320b/40B) */
41427 
41428 typedef struct hwrm_vnic_plcmodes_cfg_input {
41429 	/* The HWRM command request type. */
41430 	uint16_t	req_type;
41431 	/*
41432 	 * The completion ring to send the completion event on. This should
41433 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41434 	 */
41435 	uint16_t	cmpl_ring;
41436 	/*
41437 	 * The sequence ID is used by the driver for tracking multiple
41438 	 * commands. This ID is treated as opaque data by the firmware and
41439 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41440 	 */
41441 	uint16_t	seq_id;
41442 	/*
41443 	 * The target ID of the command:
41444 	 * * 0x0-0xFFF8 - The function ID
41445 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41446 	 * * 0xFFFD - Reserved for user-space HWRM interface
41447 	 * * 0xFFFF - HWRM
41448 	 */
41449 	uint16_t	target_id;
41450 	/*
41451 	 * A physical address pointer pointing to a host buffer that the
41452 	 * command's response data will be written. This can be either a host
41453 	 * physical address (HPA) or a guest physical address (GPA) and must
41454 	 * point to a physically contiguous block of memory.
41455 	 */
41456 	uint64_t	resp_addr;
41457 	uint32_t	flags;
41458 	/*
41459 	 * When this bit is '1', the VNIC shall be configured to
41460 	 * use regular placement algorithm.
41461 	 * By default, the regular placement algorithm shall be
41462 	 * enabled on the VNIC.
41463 	 */
41464 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_REGULAR_PLACEMENT	UINT32_C(0x1)
41465 	/*
41466 	 * When this bit is '1', the VNIC shall be configured
41467 	 * use the jumbo placement algorithm.
41468 	 */
41469 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_JUMBO_PLACEMENT	UINT32_C(0x2)
41470 	/*
41471 	 * When this bit is '1', the VNIC shall be configured
41472 	 * to enable Header-Data split for IPv4 packets according
41473 	 * to the following rules:
41474 	 * # If the packet is identified as TCP/IPv4, then the
41475 	 * packet is split at the beginning of the TCP payload.
41476 	 * # If the packet is identified as UDP/IPv4, then the
41477 	 * packet is split at the beginning of UDP payload.
41478 	 * # If the packet is identified as non-TCP and non-UDP
41479 	 * IPv4 packet, then the packet is split at the beginning
41480 	 * of the upper layer protocol header carried in the IPv4
41481 	 * packet.
41482 	 */
41483 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_IPV4		UINT32_C(0x4)
41484 	/*
41485 	 * When this bit is '1', the VNIC shall be configured
41486 	 * to enable Header-Data split for IPv6 packets according
41487 	 * to the following rules:
41488 	 * # If the packet is identified as TCP/IPv6, then the
41489 	 * packet is split at the beginning of the TCP payload.
41490 	 * # If the packet is identified as UDP/IPv6, then the
41491 	 * packet is split at the beginning of UDP payload.
41492 	 * # If the packet is identified as non-TCP and non-UDP
41493 	 * IPv6 packet, then the packet is split at the beginning
41494 	 * of the upper layer protocol header carried in the IPv6
41495 	 * packet.
41496 	 */
41497 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_IPV6		UINT32_C(0x8)
41498 	/*
41499 	 * When this bit is '1', the VNIC shall be configured
41500 	 * to enable Header-Data split for FCoE packets at the
41501 	 * beginning of FC payload.
41502 	 */
41503 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_FCOE		UINT32_C(0x10)
41504 	/*
41505 	 * When this bit is '1', the VNIC shall be configured
41506 	 * to enable Header-Data split for RoCE packets at the
41507 	 * beginning of RoCE payload (after BTH/GRH headers).
41508 	 */
41509 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_ROCE		UINT32_C(0x20)
41510 	/*
41511 	 * When this bit is '1', the VNIC shall be configured use the virtio
41512 	 * placement algorithm. This feature can only be configured when
41513 	 * proxy mode is supported on the function.
41514 	 */
41515 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_VIRTIO_PLACEMENT	UINT32_C(0x40)
41516 	uint32_t	enables;
41517 	/*
41518 	 * This bit must be '1' for the jumbo_thresh_valid field to be
41519 	 * configured.
41520 	 */
41521 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_JUMBO_THRESH_VALID	UINT32_C(0x1)
41522 	/*
41523 	 * This bit must be '1' for the hds_offset_valid field to be
41524 	 * configured.
41525 	 */
41526 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_HDS_OFFSET_VALID	UINT32_C(0x2)
41527 	/*
41528 	 * This bit must be '1' for the hds_threshold_valid field to be
41529 	 * configured.
41530 	 */
41531 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_HDS_THRESHOLD_VALID	UINT32_C(0x4)
41532 	/*
41533 	 * This bit must be '1' for the max_bds_valid field to be
41534 	 * configured.
41535 	 */
41536 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_MAX_BDS_VALID	UINT32_C(0x8)
41537 	/* Logical vnic ID */
41538 	uint32_t	vnic_id;
41539 	/*
41540 	 * When jumbo placement algorithm is enabled, this value
41541 	 * is used to determine the threshold for jumbo placement.
41542 	 * Packets with length larger than this value will be
41543 	 * placed according to the jumbo placement algorithm.
41544 	 */
41545 	uint16_t	jumbo_thresh;
41546 	/*
41547 	 * This value is used to determine the offset into
41548 	 * packet buffer where the split data (payload) will be
41549 	 * placed according to one of HDS placement algorithm.
41550 	 *
41551 	 * The lengths of packet buffers provided for split data
41552 	 * shall be larger than this value.
41553 	 */
41554 	uint16_t	hds_offset;
41555 	/*
41556 	 * When one of the HDS placement algorithm is enabled, this
41557 	 * value is used to determine the threshold for HDS
41558 	 * placement.
41559 	 * Packets with length larger than this value will be
41560 	 * placed according to the HDS placement algorithm.
41561 	 * This value shall be in multiple of 4 bytes.
41562 	 */
41563 	uint16_t	hds_threshold;
41564 	/*
41565 	 * When virtio placement algorithm is enabled, this
41566 	 * value is used to determine the maximum number of BDs
41567 	 * that can be used to place an Rx Packet.
41568 	 * If an incoming packet does not fit in the buffers described
41569 	 * by the max BDs, the packet will be dropped and an error
41570 	 * will be reported in the completion. Valid values for this
41571 	 * field are between 1 and 8. If the VNIC uses header-data-
41572 	 * separation and/or TPA with buffer spanning enabled, valid
41573 	 * values for this field are between 2 and 8.
41574 	 * This feature can only be configured when proxy mode is
41575 	 * supported on the function.
41576 	 */
41577 	uint16_t	max_bds;
41578 	uint8_t	unused_0[4];
41579 } hwrm_vnic_plcmodes_cfg_input_t, *phwrm_vnic_plcmodes_cfg_input_t;
41580 
41581 /* hwrm_vnic_plcmodes_cfg_output (size:128b/16B) */
41582 
41583 typedef struct hwrm_vnic_plcmodes_cfg_output {
41584 	/* The specific error status for the command. */
41585 	uint16_t	error_code;
41586 	/* The HWRM command request type. */
41587 	uint16_t	req_type;
41588 	/* The sequence ID from the original command. */
41589 	uint16_t	seq_id;
41590 	/* The length of the response data in number of bytes. */
41591 	uint16_t	resp_len;
41592 	uint8_t	unused_0[7];
41593 	/*
41594 	 * This field is used in Output records to indicate that the output
41595 	 * is completely written to RAM. This field should be read as '1'
41596 	 * to indicate that the output has been completely written.
41597 	 * When writing a command completion or response to an internal
41598 	 * processor, the order of writes has to be such that this field is
41599 	 * written last.
41600 	 */
41601 	uint8_t	valid;
41602 } hwrm_vnic_plcmodes_cfg_output_t, *phwrm_vnic_plcmodes_cfg_output_t;
41603 
41604 /***************************
41605  * hwrm_vnic_plcmodes_qcfg *
41606  ***************************/
41607 
41608 
41609 /* hwrm_vnic_plcmodes_qcfg_input (size:192b/24B) */
41610 
41611 typedef struct hwrm_vnic_plcmodes_qcfg_input {
41612 	/* The HWRM command request type. */
41613 	uint16_t	req_type;
41614 	/*
41615 	 * The completion ring to send the completion event on. This should
41616 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41617 	 */
41618 	uint16_t	cmpl_ring;
41619 	/*
41620 	 * The sequence ID is used by the driver for tracking multiple
41621 	 * commands. This ID is treated as opaque data by the firmware and
41622 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41623 	 */
41624 	uint16_t	seq_id;
41625 	/*
41626 	 * The target ID of the command:
41627 	 * * 0x0-0xFFF8 - The function ID
41628 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41629 	 * * 0xFFFD - Reserved for user-space HWRM interface
41630 	 * * 0xFFFF - HWRM
41631 	 */
41632 	uint16_t	target_id;
41633 	/*
41634 	 * A physical address pointer pointing to a host buffer that the
41635 	 * command's response data will be written. This can be either a host
41636 	 * physical address (HPA) or a guest physical address (GPA) and must
41637 	 * point to a physically contiguous block of memory.
41638 	 */
41639 	uint64_t	resp_addr;
41640 	/* Logical vnic ID */
41641 	uint32_t	vnic_id;
41642 	uint8_t	unused_0[4];
41643 } hwrm_vnic_plcmodes_qcfg_input_t, *phwrm_vnic_plcmodes_qcfg_input_t;
41644 
41645 /* hwrm_vnic_plcmodes_qcfg_output (size:192b/24B) */
41646 
41647 typedef struct hwrm_vnic_plcmodes_qcfg_output {
41648 	/* The specific error status for the command. */
41649 	uint16_t	error_code;
41650 	/* The HWRM command request type. */
41651 	uint16_t	req_type;
41652 	/* The sequence ID from the original command. */
41653 	uint16_t	seq_id;
41654 	/* The length of the response data in number of bytes. */
41655 	uint16_t	resp_len;
41656 	uint32_t	flags;
41657 	/*
41658 	 * When this bit is '1', the VNIC is configured to
41659 	 * use regular placement algorithm.
41660 	 */
41661 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_REGULAR_PLACEMENT	UINT32_C(0x1)
41662 	/*
41663 	 * When this bit is '1', the VNIC is configured to
41664 	 * use the jumbo placement algorithm.
41665 	 */
41666 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_JUMBO_PLACEMENT	UINT32_C(0x2)
41667 	/*
41668 	 * When this bit is '1', the VNIC is configured
41669 	 * to enable Header-Data split for IPv4 packets.
41670 	 */
41671 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_IPV4		UINT32_C(0x4)
41672 	/*
41673 	 * When this bit is '1', the VNIC is configured
41674 	 * to enable Header-Data split for IPv6 packets.
41675 	 */
41676 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_IPV6		UINT32_C(0x8)
41677 	/*
41678 	 * When this bit is '1', the VNIC is configured
41679 	 * to enable Header-Data split for FCoE packets.
41680 	 */
41681 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_FCOE		UINT32_C(0x10)
41682 	/*
41683 	 * When this bit is '1', the VNIC is configured
41684 	 * to enable Header-Data split for RoCE packets.
41685 	 */
41686 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_ROCE		UINT32_C(0x20)
41687 	/*
41688 	 * When this bit is '1', the VNIC is configured
41689 	 * to be the default VNIC of the requesting function.
41690 	 */
41691 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_DFLT_VNIC		UINT32_C(0x40)
41692 	/*
41693 	 * When this bit is '1', the VNIC is configured to use the virtio
41694 	 * placement algorithm. This feature can only be configured when
41695 	 * proxy mode is supported on the function.
41696 	 */
41697 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_VIRTIO_PLACEMENT	UINT32_C(0x80)
41698 	/*
41699 	 * When jumbo placement algorithm is enabled, this value
41700 	 * is used to determine the threshold for jumbo placement.
41701 	 * Packets with length larger than this value will be
41702 	 * placed according to the jumbo placement algorithm.
41703 	 */
41704 	uint16_t	jumbo_thresh;
41705 	/*
41706 	 * This value is used to determine the offset into
41707 	 * packet buffer where the split data (payload) will be
41708 	 * placed according to one of HDS placement algorithm.
41709 	 *
41710 	 * The lengths of packet buffers provided for split data
41711 	 * shall be larger than this value.
41712 	 */
41713 	uint16_t	hds_offset;
41714 	/*
41715 	 * When one of the HDS placement algorithm is enabled, this
41716 	 * value is used to determine the threshold for HDS
41717 	 * placement.
41718 	 * Packets with length larger than this value will be
41719 	 * placed according to the HDS placement algorithm.
41720 	 * This value shall be in multiple of 4 bytes.
41721 	 */
41722 	uint16_t	hds_threshold;
41723 	/*
41724 	 * When virtio placement algorithm is enabled, this
41725 	 * value is used to determine the maximum number of BDs
41726 	 * that can be used to place an Rx Packet.
41727 	 * If an incoming packet does not fit in the buffers described
41728 	 * by the max BDs, the packet will be dropped and an error
41729 	 * will be reported in the completion. Valid values for this
41730 	 * field are between 1 and 8. If the VNIC uses header-data-
41731 	 * separation and/or TPA with buffer spanning enabled, valid
41732 	 * values for this field are between 2 and 8.
41733 	 * This feature can only be configured when proxy mode is supported
41734 	 * on the function
41735 	 */
41736 	uint16_t	max_bds;
41737 	uint8_t	unused_0[3];
41738 	/*
41739 	 * This field is used in Output records to indicate that the output
41740 	 * is completely written to RAM. This field should be read as '1'
41741 	 * to indicate that the output has been completely written.
41742 	 * When writing a command completion or response to an internal
41743 	 * processor, the order of writes has to be such that this field is
41744 	 * written last.
41745 	 */
41746 	uint8_t	valid;
41747 } hwrm_vnic_plcmodes_qcfg_output_t, *phwrm_vnic_plcmodes_qcfg_output_t;
41748 
41749 /**********************************
41750  * hwrm_vnic_rss_cos_lb_ctx_alloc *
41751  **********************************/
41752 
41753 
41754 /* hwrm_vnic_rss_cos_lb_ctx_alloc_input (size:128b/16B) */
41755 
41756 typedef struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {
41757 	/* The HWRM command request type. */
41758 	uint16_t	req_type;
41759 	/*
41760 	 * The completion ring to send the completion event on. This should
41761 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41762 	 */
41763 	uint16_t	cmpl_ring;
41764 	/*
41765 	 * The sequence ID is used by the driver for tracking multiple
41766 	 * commands. This ID is treated as opaque data by the firmware and
41767 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41768 	 */
41769 	uint16_t	seq_id;
41770 	/*
41771 	 * The target ID of the command:
41772 	 * * 0x0-0xFFF8 - The function ID
41773 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41774 	 * * 0xFFFD - Reserved for user-space HWRM interface
41775 	 * * 0xFFFF - HWRM
41776 	 */
41777 	uint16_t	target_id;
41778 	/*
41779 	 * A physical address pointer pointing to a host buffer that the
41780 	 * command's response data will be written. This can be either a host
41781 	 * physical address (HPA) or a guest physical address (GPA) and must
41782 	 * point to a physically contiguous block of memory.
41783 	 */
41784 	uint64_t	resp_addr;
41785 } hwrm_vnic_rss_cos_lb_ctx_alloc_input_t, *phwrm_vnic_rss_cos_lb_ctx_alloc_input_t;
41786 
41787 /* hwrm_vnic_rss_cos_lb_ctx_alloc_output (size:128b/16B) */
41788 
41789 typedef struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {
41790 	/* The specific error status for the command. */
41791 	uint16_t	error_code;
41792 	/* The HWRM command request type. */
41793 	uint16_t	req_type;
41794 	/* The sequence ID from the original command. */
41795 	uint16_t	seq_id;
41796 	/* The length of the response data in number of bytes. */
41797 	uint16_t	resp_len;
41798 	/* rss_cos_lb_ctx_id is 16 b */
41799 	uint16_t	rss_cos_lb_ctx_id;
41800 	uint8_t	unused_0[5];
41801 	/*
41802 	 * This field is used in Output records to indicate that the output
41803 	 * is completely written to RAM. This field should be read as '1'
41804 	 * to indicate that the output has been completely written. When
41805 	 * writing a command completion or response to an internal processor,
41806 	 * the order of writes has to be such that this field is written last.
41807 	 */
41808 	uint8_t	valid;
41809 } hwrm_vnic_rss_cos_lb_ctx_alloc_output_t, *phwrm_vnic_rss_cos_lb_ctx_alloc_output_t;
41810 
41811 /*********************************
41812  * hwrm_vnic_rss_cos_lb_ctx_free *
41813  *********************************/
41814 
41815 
41816 /* hwrm_vnic_rss_cos_lb_ctx_free_input (size:192b/24B) */
41817 
41818 typedef struct hwrm_vnic_rss_cos_lb_ctx_free_input {
41819 	/* The HWRM command request type. */
41820 	uint16_t	req_type;
41821 	/*
41822 	 * The completion ring to send the completion event on. This should
41823 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41824 	 */
41825 	uint16_t	cmpl_ring;
41826 	/*
41827 	 * The sequence ID is used by the driver for tracking multiple
41828 	 * commands. This ID is treated as opaque data by the firmware and
41829 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41830 	 */
41831 	uint16_t	seq_id;
41832 	/*
41833 	 * The target ID of the command:
41834 	 * * 0x0-0xFFF8 - The function ID
41835 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41836 	 * * 0xFFFD - Reserved for user-space HWRM interface
41837 	 * * 0xFFFF - HWRM
41838 	 */
41839 	uint16_t	target_id;
41840 	/*
41841 	 * A physical address pointer pointing to a host buffer that the
41842 	 * command's response data will be written. This can be either a host
41843 	 * physical address (HPA) or a guest physical address (GPA) and must
41844 	 * point to a physically contiguous block of memory.
41845 	 */
41846 	uint64_t	resp_addr;
41847 	/* rss_cos_lb_ctx_id is 16 b */
41848 	uint16_t	rss_cos_lb_ctx_id;
41849 	uint8_t	unused_0[6];
41850 } hwrm_vnic_rss_cos_lb_ctx_free_input_t, *phwrm_vnic_rss_cos_lb_ctx_free_input_t;
41851 
41852 /* hwrm_vnic_rss_cos_lb_ctx_free_output (size:128b/16B) */
41853 
41854 typedef struct hwrm_vnic_rss_cos_lb_ctx_free_output {
41855 	/* The specific error status for the command. */
41856 	uint16_t	error_code;
41857 	/* The HWRM command request type. */
41858 	uint16_t	req_type;
41859 	/* The sequence ID from the original command. */
41860 	uint16_t	seq_id;
41861 	/* The length of the response data in number of bytes. */
41862 	uint16_t	resp_len;
41863 	uint8_t	unused_0[7];
41864 	/*
41865 	 * This field is used in Output records to indicate that the output
41866 	 * is completely written to RAM. This field should be read as '1'
41867 	 * to indicate that the output has been completely written. When
41868 	 * writing a command completion or response to an internal processor,
41869 	 * the order of writes has to be such that this field is written last.
41870 	 */
41871 	uint8_t	valid;
41872 } hwrm_vnic_rss_cos_lb_ctx_free_output_t, *phwrm_vnic_rss_cos_lb_ctx_free_output_t;
41873 
41874 /*******************
41875  * hwrm_ring_alloc *
41876  *******************/
41877 
41878 
41879 /* hwrm_ring_alloc_input (size:704b/88B) */
41880 
41881 typedef struct hwrm_ring_alloc_input {
41882 	/* The HWRM command request type. */
41883 	uint16_t	req_type;
41884 	/*
41885 	 * The completion ring to send the completion event on. This should
41886 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41887 	 */
41888 	uint16_t	cmpl_ring;
41889 	/*
41890 	 * The sequence ID is used by the driver for tracking multiple
41891 	 * commands. This ID is treated as opaque data by the firmware and
41892 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41893 	 */
41894 	uint16_t	seq_id;
41895 	/*
41896 	 * The target ID of the command:
41897 	 * * 0x0-0xFFF8 - The function ID
41898 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41899 	 * * 0xFFFD - Reserved for user-space HWRM interface
41900 	 * * 0xFFFF - HWRM
41901 	 */
41902 	uint16_t	target_id;
41903 	/*
41904 	 * A physical address pointer pointing to a host buffer that the
41905 	 * command's response data will be written. This can be either a host
41906 	 * physical address (HPA) or a guest physical address (GPA) and must
41907 	 * point to a physically contiguous block of memory.
41908 	 */
41909 	uint64_t	resp_addr;
41910 	uint32_t	enables;
41911 	/*
41912 	 * This bit must be '1' for the ring_arb_cfg field to be
41913 	 * configured.
41914 	 */
41915 	#define HWRM_RING_ALLOC_INPUT_ENABLES_RING_ARB_CFG	UINT32_C(0x2)
41916 	/*
41917 	 * This bit must be '1' for the stat_ctx_id_valid field to be
41918 	 * configured.
41919 	 */
41920 	#define HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID	UINT32_C(0x8)
41921 	/*
41922 	 * This bit must be '1' for the max_bw_valid field to be
41923 	 * configured.
41924 	 */
41925 	#define HWRM_RING_ALLOC_INPUT_ENABLES_MAX_BW_VALID	UINT32_C(0x20)
41926 	/*
41927 	 * This bit must be '1' for the rx_ring_id field to be
41928 	 * configured.
41929 	 */
41930 	#define HWRM_RING_ALLOC_INPUT_ENABLES_RX_RING_ID_VALID	UINT32_C(0x40)
41931 	/*
41932 	 * This bit must be '1' for the nq_ring_id field to be
41933 	 * configured.
41934 	 */
41935 	#define HWRM_RING_ALLOC_INPUT_ENABLES_NQ_RING_ID_VALID	UINT32_C(0x80)
41936 	/*
41937 	 * This bit must be '1' for the rx_buf_size field to be
41938 	 * configured.
41939 	 */
41940 	#define HWRM_RING_ALLOC_INPUT_ENABLES_RX_BUF_SIZE_VALID	UINT32_C(0x100)
41941 	/*
41942 	 * This bit must be '1' for the schq_id field to be
41943 	 * configured.
41944 	 */
41945 	#define HWRM_RING_ALLOC_INPUT_ENABLES_SCHQ_ID		UINT32_C(0x200)
41946 	/*
41947 	 * This bit must be '1' for the mpc_chnls_type field to be
41948 	 * configured.
41949 	 */
41950 	#define HWRM_RING_ALLOC_INPUT_ENABLES_MPC_CHNLS_TYPE	UINT32_C(0x400)
41951 	/*
41952 	 * This bit must be '1' for the steering_tag field to be
41953 	 * configured.
41954 	 */
41955 	#define HWRM_RING_ALLOC_INPUT_ENABLES_STEERING_TAG_VALID	UINT32_C(0x800)
41956 	/* Ring Type. */
41957 	uint8_t	ring_type;
41958 	/* L2 Completion Ring (CR) */
41959 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL   UINT32_C(0x0)
41960 	/* TX Ring (TR) */
41961 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_TX	UINT32_C(0x1)
41962 	/* RX Ring (RR) */
41963 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX	UINT32_C(0x2)
41964 	/* RoCE Notification Completion Ring (ROCE_CR) */
41965 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_ROCE_CMPL UINT32_C(0x3)
41966 	/* RX Aggregation Ring */
41967 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX_AGG	UINT32_C(0x4)
41968 	/* Notification Queue */
41969 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_NQ	UINT32_C(0x5)
41970 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_LAST	HWRM_RING_ALLOC_INPUT_RING_TYPE_NQ
41971 	/*
41972 	 * This field controls the number of packets transmitted before a TX
41973 	 * completion is generated. Non-zero values for the field are only
41974 	 * valid if HWRM_FUNC_QCAPS indicates that the TX coalesced completion
41975 	 * records capability is supported.
41976 	 */
41977 	uint8_t	cmpl_coal_cnt;
41978 	/* Generates a legacy TX completion on every packet. */
41979 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_OFF UINT32_C(0x0)
41980 	/* Generates a TX coalesced completion for up to 4 TX packets. */
41981 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_4   UINT32_C(0x1)
41982 	/* Generates a TX coalesced completion for up to 8 TX packets. */
41983 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_8   UINT32_C(0x2)
41984 	/* Generates a TX coalesced completion for up to 12 TX packets. */
41985 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_12  UINT32_C(0x3)
41986 	/* Generates a TX coalesced completion for up to 16 TX packets. */
41987 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_16  UINT32_C(0x4)
41988 	/* Generates a TX coalesced completion for up to 24 TX packets. */
41989 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_24  UINT32_C(0x5)
41990 	/* Generates a TX coalesced completion for up to 32 TX packets. */
41991 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_32  UINT32_C(0x6)
41992 	/* Generates a TX coalesced completion for up to 48 TX packets. */
41993 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_48  UINT32_C(0x7)
41994 	/* Generates a TX coalesced completion for up to 64 TX packets. */
41995 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_64  UINT32_C(0x8)
41996 	/* Generates a TX coalesced completion for up to 96 TX packets. */
41997 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_96  UINT32_C(0x9)
41998 	/* Generates a TX coalesced completion for up to 128 TX packets. */
41999 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_128 UINT32_C(0xa)
42000 	/* Generates a TX coalesced completion for up to 192 TX packets. */
42001 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_192 UINT32_C(0xb)
42002 	/* Generates a TX coalesced completion for up to 256 TX packets. */
42003 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_256 UINT32_C(0xc)
42004 	/* Generates a TX coalesced completion for up to 320 TX packets. */
42005 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_320 UINT32_C(0xd)
42006 	/* Generates a TX coalesced completion for up to 384 TX packets. */
42007 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_384 UINT32_C(0xe)
42008 	/* Generates a TX coalesced completion up to the last packet. (Maximum coalescing). */
42009 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_MAX UINT32_C(0xf)
42010 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_LAST	HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_MAX
42011 	/* Ring allocation flags. */
42012 	uint16_t	flags;
42013 	/*
42014 	 * For Rx rings, the incoming packet data can be placed at either
42015 	 * a 0B or 2B offset from the start of the Rx packet buffer. When
42016 	 * '1', the received packet will be padded with 2B of zeros at the
42017 	 * front of the packet. Note that this flag is only used for
42018 	 * Rx rings and is ignored for all other rings included Rx
42019 	 * Aggregation rings.
42020 	 */
42021 	#define HWRM_RING_ALLOC_INPUT_FLAGS_RX_SOP_PAD			UINT32_C(0x1)
42022 	/*
42023 	 * When the HW Doorbell Drop Recovery feature is enabled,
42024 	 * HW can flag false CQ overflow when CQ consumer index
42025 	 * doorbells are dropped when there really wasn't any overflow.
42026 	 * The CQE values could have already been processed by the driver,
42027 	 * but HW doesn't know about this because of the doorbell drop.
42028 	 * To avoid false detection of CQ overflow events,
42029 	 * it is recommended that CQ overflow detection is disabled
42030 	 * by the driver when HW based doorbell recovery is enabled.
42031 	 */
42032 	#define HWRM_RING_ALLOC_INPUT_FLAGS_DISABLE_CQ_OVERFLOW_DETECTION	UINT32_C(0x2)
42033 	/*
42034 	 * Used with enhanced Doorbell Pacing feature, when set to '1'
42035 	 * this flag indicates that the NQ id that's allocated should be
42036 	 * used for DBR pacing notifications.
42037 	 */
42038 	#define HWRM_RING_ALLOC_INPUT_FLAGS_NQ_DBR_PACING			UINT32_C(0x4)
42039 	/*
42040 	 * Host driver should set this flag bit to '1' to enable
42041 	 * two-completion TX packet timestamp feature. By enabling this
42042 	 * per QP flag and enabling stamp bit in TX BD lflags, host drivers
42043 	 * expect two completions, one for regular TX completion and the
42044 	 * other completion with timestamp. For a QP with both completion
42045 	 * coalescing and timestamp completion features enabled, completion
42046 	 * coalescing takes place on regular TX completions. The timestamp
42047 	 * completions are not coalesced and a separate timestamp completion
42048 	 * is generated for each packet with stamp bit set in the TX BD
42049 	 * lflags.
42050 	 */
42051 	#define HWRM_RING_ALLOC_INPUT_FLAGS_TX_PKT_TS_CMPL_ENABLE		UINT32_C(0x8)
42052 	/*
42053 	 * This value is a pointer to the page table for the
42054 	 * Ring.
42055 	 */
42056 	uint64_t	page_tbl_addr;
42057 	/* First Byte Offset of the first entry in the first page. */
42058 	uint32_t	fbo;
42059 	/*
42060 	 * Actual page size in 2^page_size. The supported range is increments
42061 	 * in powers of 2 from 16 bytes to 1GB.
42062 	 * - 4 = 16 B
42063 	 *	Page size is 16 B.
42064 	 * - 12 = 4 KB
42065 	 *	Page size is 4 KB.
42066 	 * - 13 = 8 KB
42067 	 *	Page size is 8 KB.
42068 	 * - 16 = 64 KB
42069 	 *	Page size is 64 KB.
42070 	 * - 21 = 2 MB
42071 	 *	Page size is 2 MB.
42072 	 * - 22 = 4 MB
42073 	 *	Page size is 4 MB.
42074 	 * - 30 = 1 GB
42075 	 *	Page size is 1 GB.
42076 	 */
42077 	uint8_t	page_size;
42078 	/*
42079 	 * This value indicates the depth of page table.
42080 	 * For this version of the specification, value other than 0 or
42081 	 * 1 shall be considered as an invalid value.
42082 	 * When the page_tbl_depth = 0, then it is treated as a
42083 	 * special case with the following.
42084 	 * 1. FBO and page size fields are not valid.
42085 	 * 2. page_tbl_addr is the physical address of the first
42086 	 *	element of the ring.
42087 	 */
42088 	uint8_t	page_tbl_depth;
42089 	/* Used by a PF driver to associate a SCHQ with one of its TX rings. */
42090 	uint16_t	schq_id;
42091 	/*
42092 	 * Number of 16B units in the ring. Minimum size for
42093 	 * a ring is 16 16B entries.
42094 	 */
42095 	uint32_t	length;
42096 	/*
42097 	 * Logical ring number for the ring to be allocated.
42098 	 * This value determines the position in the doorbell
42099 	 * area where the update to the ring will be made.
42100 	 *
42101 	 * For completion rings, this value is also the MSI-X
42102 	 * vector number for the function the completion ring is
42103 	 * associated with.
42104 	 */
42105 	uint16_t	logical_id;
42106 	/*
42107 	 * This field is used only when ring_type is a TX ring.
42108 	 * This value indicates what completion ring the TX ring
42109 	 * is associated with.
42110 	 */
42111 	uint16_t	cmpl_ring_id;
42112 	/*
42113 	 * This field is used only when ring_type is a TX ring.
42114 	 * This value indicates what CoS queue the TX ring
42115 	 * is associated with.
42116 	 */
42117 	uint16_t	queue_id;
42118 	/*
42119 	 * When allocating a Rx ring or Rx aggregation ring, this field
42120 	 * specifies the size of the buffer descriptors posted to the ring.
42121 	 */
42122 	uint16_t	rx_buf_size;
42123 	/*
42124 	 * When allocating an Rx aggregation ring, this field
42125 	 * specifies the associated Rx ring ID.
42126 	 */
42127 	uint16_t	rx_ring_id;
42128 	/*
42129 	 * When allocating a completion ring, this field
42130 	 * specifies the associated NQ ring ID.
42131 	 */
42132 	uint16_t	nq_ring_id;
42133 	/*
42134 	 * This field is used only when ring_type is a TX ring.
42135 	 * This field is used to configure arbitration related
42136 	 * parameters for a TX ring.
42137 	 */
42138 	uint16_t	ring_arb_cfg;
42139 	/* Arbitration policy used for the ring. */
42140 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_MASK	UINT32_C(0xf)
42141 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_SFT	0
42142 	/*
42143 	 * Use strict priority for the TX ring.
42144 	 * Priority value is specified in arb_policy_param
42145 	 */
42146 		#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_SP	UINT32_C(0x1)
42147 	/*
42148 	 * Use weighted fair queue arbitration for the TX ring.
42149 	 * Weight is specified in arb_policy_param
42150 	 */
42151 		#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_WFQ	UINT32_C(0x2)
42152 		#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_LAST	HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_WFQ
42153 	/* Reserved field. */
42154 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_RSVD_MASK		UINT32_C(0xf0)
42155 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_RSVD_SFT		4
42156 	/*
42157 	 * Arbitration policy specific parameter.
42158 	 * # For strict priority arbitration policy, this field
42159 	 * represents a priority value. If set to 0, then the priority
42160 	 * is not specified and the HWRM is allowed to select
42161 	 * any priority for this TX ring.
42162 	 * # For weighted fair queue arbitration policy, this field
42163 	 * represents a weight value. If set to 0, then the weight
42164 	 * is not specified and the HWRM is allowed to select
42165 	 * any weight for this TX ring.
42166 	 */
42167 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_PARAM_MASK UINT32_C(0xff00)
42168 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_PARAM_SFT 8
42169 	/* Steering tag to use for memory transactions. */
42170 	uint16_t	steering_tag;
42171 	/*
42172 	 * This field is reserved for the future use.
42173 	 * It shall be set to 0.
42174 	 */
42175 	uint32_t	reserved3;
42176 	/*
42177 	 * This field is used only when ring_type is a TX ring.
42178 	 * This input indicates what statistics context this ring
42179 	 * should be associated with.
42180 	 */
42181 	uint32_t	stat_ctx_id;
42182 	/*
42183 	 * This field is reserved for the future use.
42184 	 * It shall be set to 0.
42185 	 */
42186 	uint32_t	reserved4;
42187 	/*
42188 	 * This field is used only when ring_type is a TX ring
42189 	 * to specify maximum BW allocated to the TX ring.
42190 	 * The HWRM will translate this value into byte counter and
42191 	 * time interval used for this ring inside the device.
42192 	 */
42193 	uint32_t	max_bw;
42194 	/* The bandwidth value. */
42195 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_MASK		UINT32_C(0xfffffff)
42196 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_SFT		0
42197 	/* The granularity of the value (bits or bytes). */
42198 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE			UINT32_C(0x10000000)
42199 	/* Value is in bits. */
42200 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_BITS		(UINT32_C(0x0) << 28)
42201 	/* Value is in bytes. */
42202 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_BYTES		(UINT32_C(0x1) << 28)
42203 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_LAST		HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_BYTES
42204 	/* bw_value_unit is 3 b */
42205 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
42206 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_SFT	29
42207 	/* Value is in Mb or MB (base 10). */
42208 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
42209 	/* Value is in Kb or KB (base 10). */
42210 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
42211 	/* Value is in bits or bytes. */
42212 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
42213 	/* Value is in Gb or GB (base 10). */
42214 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
42215 	/* Value is in 1/100th of a percentage of total bandwidth. */
42216 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
42217 	/* Invalid unit */
42218 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
42219 		#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_LAST	HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID
42220 	/*
42221 	 * This field is used only when ring_type is a Completion ring.
42222 	 * This value indicates what interrupt mode should be used
42223 	 * on this completion ring.
42224 	 * Note: In the legacy interrupt mode, no more than 16
42225 	 * completion rings are allowed.
42226 	 */
42227 	uint8_t	int_mode;
42228 	/* Legacy INTA (deprecated) */
42229 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_LEGACY UINT32_C(0x0)
42230 	/* Reserved */
42231 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_RSVD   UINT32_C(0x1)
42232 	/* MSI-X */
42233 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX   UINT32_C(0x2)
42234 	/* No Interrupt - Polled mode */
42235 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_POLL   UINT32_C(0x3)
42236 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_LAST  HWRM_RING_ALLOC_INPUT_INT_MODE_POLL
42237 	/* Midpath channel type */
42238 	uint8_t	mpc_chnls_type;
42239 	/*
42240 	 * Indicate the TX ring alloc MPC channel type is a MPC channel
42241 	 * with destination to the TX crypto engine block.
42242 	 */
42243 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_TCE	UINT32_C(0x0)
42244 	/*
42245 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
42246 	 * with destination to the RX crypto engine block.
42247 	 */
42248 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_RCE	UINT32_C(0x1)
42249 	/*
42250 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
42251 	 * with destination to the TX configurable flow processing block.
42252 	 */
42253 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_TE_CFA  UINT32_C(0x2)
42254 	/*
42255 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
42256 	 * with destination to the RX configurable flow processing block.
42257 	 */
42258 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_RE_CFA  UINT32_C(0x3)
42259 	/*
42260 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
42261 	 * with destination to the primate processor block.
42262 	 */
42263 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_PRIMATE UINT32_C(0x4)
42264 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_LAST   HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_PRIMATE
42265 	uint8_t	unused_4[2];
42266 	/*
42267 	 * The cq_handle is specified when allocating a completion ring. For
42268 	 * devices that support NQs, this cq_handle will be included in the
42269 	 * NQE to specify which CQ should be read to retrieve the completion
42270 	 * record.
42271 	 */
42272 	uint64_t	cq_handle;
42273 } hwrm_ring_alloc_input_t, *phwrm_ring_alloc_input_t;
42274 
42275 /* hwrm_ring_alloc_output (size:128b/16B) */
42276 
42277 typedef struct hwrm_ring_alloc_output {
42278 	/* The specific error status for the command. */
42279 	uint16_t	error_code;
42280 	/* The HWRM command request type. */
42281 	uint16_t	req_type;
42282 	/* The sequence ID from the original command. */
42283 	uint16_t	seq_id;
42284 	/* The length of the response data in number of bytes. */
42285 	uint16_t	resp_len;
42286 	/*
42287 	 * Physical number of ring allocated.
42288 	 * This value shall be unique for a ring type.
42289 	 */
42290 	uint16_t	ring_id;
42291 	/* Logical number of ring allocated. */
42292 	uint16_t	logical_ring_id;
42293 	/*
42294 	 * This field will tell whether to use ping or pong buffer
42295 	 * for first push operation.
42296 	 */
42297 	uint8_t	push_buffer_index;
42298 	/* Start push from ping buffer index */
42299 	#define HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_PING_BUFFER UINT32_C(0x0)
42300 	/* Start push from pong buffer index */
42301 	#define HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER UINT32_C(0x1)
42302 	#define HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_LAST	HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER
42303 	uint8_t	unused_0[2];
42304 	/*
42305 	 * This field is used in Output records to indicate that the output
42306 	 * is completely written to RAM. This field should be read as '1'
42307 	 * to indicate that the output has been completely written. When
42308 	 * writing a command completion or response to an internal processor,
42309 	 * the order of writes has to be such that this field is written last.
42310 	 */
42311 	uint8_t	valid;
42312 } hwrm_ring_alloc_output_t, *phwrm_ring_alloc_output_t;
42313 
42314 /******************
42315  * hwrm_ring_free *
42316  ******************/
42317 
42318 
42319 /* hwrm_ring_free_input (size:256b/32B) */
42320 
42321 typedef struct hwrm_ring_free_input {
42322 	/* The HWRM command request type. */
42323 	uint16_t	req_type;
42324 	/*
42325 	 * The completion ring to send the completion event on. This should
42326 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42327 	 */
42328 	uint16_t	cmpl_ring;
42329 	/*
42330 	 * The sequence ID is used by the driver for tracking multiple
42331 	 * commands. This ID is treated as opaque data by the firmware and
42332 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42333 	 */
42334 	uint16_t	seq_id;
42335 	/*
42336 	 * The target ID of the command:
42337 	 * * 0x0-0xFFF8 - The function ID
42338 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42339 	 * * 0xFFFD - Reserved for user-space HWRM interface
42340 	 * * 0xFFFF - HWRM
42341 	 */
42342 	uint16_t	target_id;
42343 	/*
42344 	 * A physical address pointer pointing to a host buffer that the
42345 	 * command's response data will be written. This can be either a host
42346 	 * physical address (HPA) or a guest physical address (GPA) and must
42347 	 * point to a physically contiguous block of memory.
42348 	 */
42349 	uint64_t	resp_addr;
42350 	/* Ring Type. */
42351 	uint8_t	ring_type;
42352 	/* L2 Completion Ring (CR) */
42353 	#define HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL   UINT32_C(0x0)
42354 	/* TX Ring (TR) */
42355 	#define HWRM_RING_FREE_INPUT_RING_TYPE_TX	UINT32_C(0x1)
42356 	/* RX Ring (RR) */
42357 	#define HWRM_RING_FREE_INPUT_RING_TYPE_RX	UINT32_C(0x2)
42358 	/* RoCE Notification Completion Ring (ROCE_CR) */
42359 	#define HWRM_RING_FREE_INPUT_RING_TYPE_ROCE_CMPL UINT32_C(0x3)
42360 	/* RX Aggregation Ring */
42361 	#define HWRM_RING_FREE_INPUT_RING_TYPE_RX_AGG	UINT32_C(0x4)
42362 	/* Notification Queue */
42363 	#define HWRM_RING_FREE_INPUT_RING_TYPE_NQ	UINT32_C(0x5)
42364 	#define HWRM_RING_FREE_INPUT_RING_TYPE_LAST	HWRM_RING_FREE_INPUT_RING_TYPE_NQ
42365 	uint8_t	flags;
42366 	/*
42367 	 * If this bit is set to '1', ring_id in this command belongs to
42368 	 * virtio function. prod_idx in this command corresponds to doorbell
42369 	 * producer index. opaque field in this command needs to be inserted
42370 	 * by firmware in VEE_FLUSH completion record.
42371 	 * Firmware will poll the corresponding ring context to reach the
42372 	 * given producer index before sending successful response. It will
42373 	 * finish the completion using VEE_FLUSH completion record.
42374 	 *
42375 	 * If this bit is '0', firmware will not treat ring_id as virtio
42376 	 * ring and ignore prod_idx, opaque fields.
42377 	 *
42378 	 * This feature is not applicable for L2 or RoCE.
42379 	 */
42380 	#define HWRM_RING_FREE_INPUT_FLAGS_VIRTIO_RING_VALID UINT32_C(0x1)
42381 	#define HWRM_RING_FREE_INPUT_FLAGS_LAST		HWRM_RING_FREE_INPUT_FLAGS_VIRTIO_RING_VALID
42382 	/* Physical number of ring allocated. */
42383 	uint16_t	ring_id;
42384 	/*
42385 	 * Ring BD producer index posted by the virtio block.
42386 	 * This field is valid if virtio_ring_valid flag is set.
42387 	 */
42388 	uint32_t	prod_idx;
42389 	/*
42390 	 * User defined opaque field to be inserted into VEE_FLUSH completion
42391 	 * record. This field is valid if virtio_ring_valid flag is set.
42392 	 */
42393 	uint32_t	opaque;
42394 	uint32_t	unused_1;
42395 } hwrm_ring_free_input_t, *phwrm_ring_free_input_t;
42396 
42397 /* hwrm_ring_free_output (size:128b/16B) */
42398 
42399 typedef struct hwrm_ring_free_output {
42400 	/* The specific error status for the command. */
42401 	uint16_t	error_code;
42402 	/* The HWRM command request type. */
42403 	uint16_t	req_type;
42404 	/* The sequence ID from the original command. */
42405 	uint16_t	seq_id;
42406 	/* The length of the response data in number of bytes. */
42407 	uint16_t	resp_len;
42408 	uint8_t	unused_0[7];
42409 	/*
42410 	 * This field is used in Output records to indicate that the output
42411 	 * is completely written to RAM. This field should be read as '1'
42412 	 * to indicate that the output has been completely written. When
42413 	 * writing a command completion or response to an internal processor,
42414 	 * the order of writes has to be such that this field is written last.
42415 	 */
42416 	uint8_t	valid;
42417 } hwrm_ring_free_output_t, *phwrm_ring_free_output_t;
42418 
42419 /*******************
42420  * hwrm_ring_reset *
42421  *******************/
42422 
42423 
42424 /* hwrm_ring_reset_input (size:192b/24B) */
42425 
42426 typedef struct hwrm_ring_reset_input {
42427 	/* The HWRM command request type. */
42428 	uint16_t	req_type;
42429 	/*
42430 	 * The completion ring to send the completion event on. This should
42431 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42432 	 */
42433 	uint16_t	cmpl_ring;
42434 	/*
42435 	 * The sequence ID is used by the driver for tracking multiple
42436 	 * commands. This ID is treated as opaque data by the firmware and
42437 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42438 	 */
42439 	uint16_t	seq_id;
42440 	/*
42441 	 * The target ID of the command:
42442 	 * * 0x0-0xFFF8 - The function ID
42443 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42444 	 * * 0xFFFD - Reserved for user-space HWRM interface
42445 	 * * 0xFFFF - HWRM
42446 	 */
42447 	uint16_t	target_id;
42448 	/*
42449 	 * A physical address pointer pointing to a host buffer that the
42450 	 * command's response data will be written. This can be either a host
42451 	 * physical address (HPA) or a guest physical address (GPA) and must
42452 	 * point to a physically contiguous block of memory.
42453 	 */
42454 	uint64_t	resp_addr;
42455 	/* Ring Type. */
42456 	uint8_t	ring_type;
42457 	/* L2 Completion Ring (CR) */
42458 	#define HWRM_RING_RESET_INPUT_RING_TYPE_L2_CMPL	UINT32_C(0x0)
42459 	/* TX Ring (TR) */
42460 	#define HWRM_RING_RESET_INPUT_RING_TYPE_TX	UINT32_C(0x1)
42461 	/* RX Ring (RR) */
42462 	#define HWRM_RING_RESET_INPUT_RING_TYPE_RX	UINT32_C(0x2)
42463 	/* RoCE Notification Completion Ring (ROCE_CR) */
42464 	#define HWRM_RING_RESET_INPUT_RING_TYPE_ROCE_CMPL   UINT32_C(0x3)
42465 	/*
42466 	 * Rx Ring Group. This is to reset rx and aggregation in an atomic
42467 	 * operation. Completion ring associated with this ring group is
42468 	 * not reset.
42469 	 */
42470 	#define HWRM_RING_RESET_INPUT_RING_TYPE_RX_RING_GRP UINT32_C(0x6)
42471 	#define HWRM_RING_RESET_INPUT_RING_TYPE_LAST	HWRM_RING_RESET_INPUT_RING_TYPE_RX_RING_GRP
42472 	uint8_t	unused_0;
42473 	/*
42474 	 * Physical number of the ring. When ring type is rx_ring_grp, ring id
42475 	 * actually refers to ring group id.
42476 	 */
42477 	uint16_t	ring_id;
42478 	uint8_t	unused_1[4];
42479 } hwrm_ring_reset_input_t, *phwrm_ring_reset_input_t;
42480 
42481 /* hwrm_ring_reset_output (size:128b/16B) */
42482 
42483 typedef struct hwrm_ring_reset_output {
42484 	/* The specific error status for the command. */
42485 	uint16_t	error_code;
42486 	/* The HWRM command request type. */
42487 	uint16_t	req_type;
42488 	/* The sequence ID from the original command. */
42489 	uint16_t	seq_id;
42490 	/* The length of the response data in number of bytes. */
42491 	uint16_t	resp_len;
42492 	/*
42493 	 * This field will tell whether to use ping or pong buffer
42494 	 * for first push operation.
42495 	 */
42496 	uint8_t	push_buffer_index;
42497 	/* Start push from ping buffer index */
42498 	#define HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_PING_BUFFER UINT32_C(0x0)
42499 	/* Start push from pong buffer index */
42500 	#define HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER UINT32_C(0x1)
42501 	#define HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_LAST	HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER
42502 	uint8_t	unused_0[3];
42503 	/* Position of consumer index after ring reset completes. */
42504 	uint8_t	consumer_idx[3];
42505 	/*
42506 	 * This field is used in Output records to indicate that the output
42507 	 * is completely written to RAM. This field should be read as '1'
42508 	 * to indicate that the output has been completely written. When
42509 	 * writing a command completion or response to an internal processor,
42510 	 * the order of writes has to be such that this field is written last.
42511 	 */
42512 	uint8_t	valid;
42513 } hwrm_ring_reset_output_t, *phwrm_ring_reset_output_t;
42514 
42515 /*****************
42516  * hwrm_ring_cfg *
42517  *****************/
42518 
42519 
42520 /* hwrm_ring_cfg_input (size:320b/40B) */
42521 
42522 typedef struct hwrm_ring_cfg_input {
42523 	/* The HWRM command request type. */
42524 	uint16_t	req_type;
42525 	/*
42526 	 * The completion ring to send the completion event on. This should
42527 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42528 	 */
42529 	uint16_t	cmpl_ring;
42530 	/*
42531 	 * The sequence ID is used by the driver for tracking multiple
42532 	 * commands. This ID is treated as opaque data by the firmware and
42533 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42534 	 */
42535 	uint16_t	seq_id;
42536 	/*
42537 	 * The target ID of the command:
42538 	 * * 0x0-0xFFF8 - The function ID
42539 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42540 	 * * 0xFFFD - Reserved for user-space HWRM interface
42541 	 * * 0xFFFF - HWRM
42542 	 */
42543 	uint16_t	target_id;
42544 	/*
42545 	 * A physical address pointer pointing to a host buffer that the
42546 	 * command's response data will be written. This can be either a host
42547 	 * physical address (HPA) or a guest physical address (GPA) and must
42548 	 * point to a physically contiguous block of memory.
42549 	 */
42550 	uint64_t	resp_addr;
42551 	/* Ring Type. */
42552 	uint8_t	ring_type;
42553 	/* TX Ring (TR) */
42554 	#define HWRM_RING_CFG_INPUT_RING_TYPE_TX UINT32_C(0x1)
42555 	/* RX Ring (RR) */
42556 	#define HWRM_RING_CFG_INPUT_RING_TYPE_RX UINT32_C(0x2)
42557 	#define HWRM_RING_CFG_INPUT_RING_TYPE_LAST HWRM_RING_CFG_INPUT_RING_TYPE_RX
42558 	uint8_t	unused_0;
42559 	/* Physical number of the ring. */
42560 	uint16_t	ring_id;
42561 	/* Ring config enable bits. */
42562 	uint16_t	enables;
42563 	/*
42564 	 * For Rx rings, the incoming packet data can be placed at either
42565 	 * a 0B, 2B, 10B or 12B offset from the start of the Rx packet
42566 	 * buffer.
42567 	 * When '1', the received packet will be padded with 2B, 10B or 12B
42568 	 * of zeros at the front of the packet. The exact offset is specified
42569 	 * by rx_sop_pad_bytes parameter.
42570 	 * When '0', the received packet will not be padded.
42571 	 * Note that this flag is only used for Rx rings and is ignored
42572 	 * for all other rings included Rx Aggregation rings.
42573 	 */
42574 	#define HWRM_RING_CFG_INPUT_ENABLES_RX_SOP_PAD_ENABLE		UINT32_C(0x1)
42575 	/*
42576 	 * Proxy mode enable, for Tx, Rx and Rx aggregation rings only.
42577 	 * When rings are allocated, the PCI function on which driver issues
42578 	 * HWRM_RING_CFG command is assumed to own the rings. Hardware takes
42579 	 * the buffer descriptors (BDs) from those rings is assumed to issue
42580 	 * packet payload DMA using same PCI function. When proxy mode is
42581 	 * enabled, hardware can perform payload DMA using another PCI
42582 	 * function on same or different host.
42583 	 * When set to '0', the PCI function on which driver issues
42584 	 * HWRM_RING_CFG command is used for host payload DMA operation.
42585 	 * When set to '1', the host PCI function specified by proxy_fid is
42586 	 * used for host payload DMA operation.
42587 	 */
42588 	#define HWRM_RING_CFG_INPUT_ENABLES_PROXY_MODE_ENABLE		UINT32_C(0x2)
42589 	/*
42590 	 * Tx ring packet source interface override, for Tx rings only.
42591 	 * When TX rings are allocated, the PCI function on which driver
42592 	 * issues HWRM_RING_CFG is assumed to be source interface of
42593 	 * packets sent from TX ring.
42594 	 * When set to '1', the host PCI function specified by proxy_fid
42595 	 * is used as source interface of the transmitted packets.
42596 	 */
42597 	#define HWRM_RING_CFG_INPUT_ENABLES_TX_PROXY_SRC_INTF_OVERRIDE	UINT32_C(0x4)
42598 	/* The schq_id field is valid */
42599 	#define HWRM_RING_CFG_INPUT_ENABLES_SCHQ_ID			UINT32_C(0x8)
42600 	/* Update completion ring ID associated with Tx or Rx ring. */
42601 	#define HWRM_RING_CFG_INPUT_ENABLES_CMPL_RING_ID_UPDATE		UINT32_C(0x10)
42602 	/*
42603 	 * When set to '1', metadata value provided by tx_metadata
42604 	 * field in this command is inserted in the lb_header_metadata
42605 	 * QP context field. When set to '0', no change done to metadata.
42606 	 * Firmware rejects the tx ring metadata programming with
42607 	 * HWRM_ERR_CODE_UNSUPPORTED error if the per function CFA BD
42608 	 * metadata feature is not disabled.
42609 	 */
42610 	#define HWRM_RING_CFG_INPUT_ENABLES_TX_METADATA			UINT32_C(0x20)
42611 	/*
42612 	 * Proxy function FID value.
42613 	 * This value is only used when either proxy_mode_enable flag or
42614 	 * tx_proxy_svif_override is set to '1'.
42615 	 * When proxy_mode_enable is set to '1', it identifies a host PCI
42616 	 * function used for host payload DMA operations.
42617 	 * When tx_proxy_src_intf is set to '1', it identifies a host PCI
42618 	 * function as source interface for all transmitted packets from
42619 	 * the TX ring.
42620 	 */
42621 	uint16_t	proxy_fid;
42622 	/*
42623 	 * Identifies the new scheduler queue (SCHQ) to associate with the
42624 	 * ring. Only valid for Tx rings.
42625 	 * A value of zero indicates that the Tx ring should be associated
42626 	 * with the default scheduler queue (SCHQ).
42627 	 */
42628 	uint16_t	schq_id;
42629 	/*
42630 	 * This field is valid for TX or Rx rings. This value identifies the
42631 	 * new completion ring ID to associate with the TX or Rx ring.
42632 	 */
42633 	uint16_t	cmpl_ring_id;
42634 	/*
42635 	 * Rx SOP padding amount in bytes.
42636 	 * This value is only used when rx_sop_pad_enable flag is set to '1'.
42637 	 */
42638 	uint8_t	rx_sop_pad_bytes;
42639 	uint8_t	unused_1[3];
42640 	/*
42641 	 * When tx_metadata enable bit is set, value specified in this field
42642 	 * is copied to lb_header_metadata in the QP context.
42643 	 */
42644 	uint32_t	tx_metadata;
42645 	uint8_t	unused_2[4];
42646 } hwrm_ring_cfg_input_t, *phwrm_ring_cfg_input_t;
42647 
42648 /* hwrm_ring_cfg_output (size:128b/16B) */
42649 
42650 typedef struct hwrm_ring_cfg_output {
42651 	/* The specific error status for the command. */
42652 	uint16_t	error_code;
42653 	/* The HWRM command request type. */
42654 	uint16_t	req_type;
42655 	/* The sequence ID from the original command. */
42656 	uint16_t	seq_id;
42657 	/* The length of the response data in number of bytes. */
42658 	uint16_t	resp_len;
42659 	uint8_t	unused_0[7];
42660 	/*
42661 	 * This field is used in Output records to indicate that the output
42662 	 * is completely written to RAM. This field should be read as '1'
42663 	 * to indicate that the output has been completely written.
42664 	 * When writing a command completion or response to an internal
42665 	 * processor, the order of writes has to be such that this field is
42666 	 * written last.
42667 	 */
42668 	uint8_t	valid;
42669 } hwrm_ring_cfg_output_t, *phwrm_ring_cfg_output_t;
42670 
42671 /******************
42672  * hwrm_ring_qcfg *
42673  ******************/
42674 
42675 
42676 /* hwrm_ring_qcfg_input (size:192b/24B) */
42677 
42678 typedef struct hwrm_ring_qcfg_input {
42679 	/* The HWRM command request type. */
42680 	uint16_t	req_type;
42681 	/*
42682 	 * The completion ring to send the completion event on. This should
42683 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42684 	 */
42685 	uint16_t	cmpl_ring;
42686 	/*
42687 	 * The sequence ID is used by the driver for tracking multiple
42688 	 * commands. This ID is treated as opaque data by the firmware and
42689 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42690 	 */
42691 	uint16_t	seq_id;
42692 	/*
42693 	 * The target ID of the command:
42694 	 * * 0x0-0xFFF8 - The function ID
42695 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42696 	 * * 0xFFFD - Reserved for user-space HWRM interface
42697 	 * * 0xFFFF - HWRM
42698 	 */
42699 	uint16_t	target_id;
42700 	/*
42701 	 * A physical address pointer pointing to a host buffer that the
42702 	 * command's response data will be written. This can be either a host
42703 	 * physical address (HPA) or a guest physical address (GPA) and must
42704 	 * point to a physically contiguous block of memory.
42705 	 */
42706 	uint64_t	resp_addr;
42707 	/* Ring Type. */
42708 	uint8_t	ring_type;
42709 	/* TX Ring (TR) */
42710 	#define HWRM_RING_QCFG_INPUT_RING_TYPE_TX UINT32_C(0x1)
42711 	/* RX Ring (RR) */
42712 	#define HWRM_RING_QCFG_INPUT_RING_TYPE_RX UINT32_C(0x2)
42713 	#define HWRM_RING_QCFG_INPUT_RING_TYPE_LAST HWRM_RING_QCFG_INPUT_RING_TYPE_RX
42714 	uint8_t	unused_0[5];
42715 	/* Physical number of the ring. */
42716 	uint16_t	ring_id;
42717 } hwrm_ring_qcfg_input_t, *phwrm_ring_qcfg_input_t;
42718 
42719 /* hwrm_ring_qcfg_output (size:256b/32B) */
42720 
42721 typedef struct hwrm_ring_qcfg_output {
42722 	/* The specific error status for the command. */
42723 	uint16_t	error_code;
42724 	/* The HWRM command request type. */
42725 	uint16_t	req_type;
42726 	/* The sequence ID from the original command. */
42727 	uint16_t	seq_id;
42728 	/* The length of the response data in number of bytes. */
42729 	uint16_t	resp_len;
42730 	/* Ring config enable bits. */
42731 	uint16_t	enables;
42732 	/*
42733 	 * For Rx rings, the incoming packet data can be placed at either
42734 	 * a 0B, 2B, 10B or 12B offset from the start of the Rx packet
42735 	 * buffer.
42736 	 * When '1', the received packet will be padded with 2B, 10B or 12B
42737 	 * of zeros at the front of the packet. The exact offset is specified
42738 	 * by rx_sop_pad_bytes parameter.
42739 	 * When '0', the received packet will not be padded.
42740 	 * Note that this flag is only used for Rx rings and is ignored
42741 	 * for all other rings included Rx Aggregation rings.
42742 	 */
42743 	#define HWRM_RING_QCFG_OUTPUT_ENABLES_RX_SOP_PAD_ENABLE		UINT32_C(0x1)
42744 	/*
42745 	 * Proxy mode enable, for Tx, Rx and Rx aggregation rings only.
42746 	 * When rings are allocated, the PCI function on which driver issues
42747 	 * HWRM_RING_CFG command is assumed to own the rings. Hardware takes
42748 	 * the buffer descriptors (BDs) from those rings is assumed to issue
42749 	 * packet payload DMA using same PCI function. When proxy mode is
42750 	 * enabled, hardware can perform payload DMA using another PCI
42751 	 * function on same or different host.
42752 	 * When set to '0', the PCI function on which driver issues
42753 	 * HWRM_RING_CFG command is used for host payload DMA operation.
42754 	 * When set to '1', the host PCI function specified by proxy_fid is
42755 	 * used for host payload DMA operation.
42756 	 */
42757 	#define HWRM_RING_QCFG_OUTPUT_ENABLES_PROXY_MODE_ENABLE		UINT32_C(0x2)
42758 	/*
42759 	 * Tx ring packet source interface override, for Tx rings only.
42760 	 * When TX rings are allocated, the PCI function on which driver
42761 	 * issues HWRM_RING_CFG is assumed to be source interface of
42762 	 * packets sent from TX ring.
42763 	 * When set to '1', the host PCI function specified by proxy_fid is
42764 	 * used as source interface of the transmitted packets.
42765 	 */
42766 	#define HWRM_RING_QCFG_OUTPUT_ENABLES_TX_PROXY_SRC_INTF_OVERRIDE	UINT32_C(0x4)
42767 	/*
42768 	 * Proxy function FID value.
42769 	 * This value is only used when either proxy_mode_enable flag or
42770 	 * tx_proxy_svif_override is set to '1'.
42771 	 * When proxy_mode_enable is set to '1', it identifies a host PCI
42772 	 * function used for host payload DMA operations.
42773 	 * When tx_proxy_src_intf is set to '1', it identifies a host PCI
42774 	 * function as source interface for all transmitted packets from the TX
42775 	 * ring.
42776 	 */
42777 	uint16_t	proxy_fid;
42778 	/*
42779 	 * Identifies the new scheduler queue (SCHQ) to associate with the
42780 	 * ring. Only valid for Tx rings.
42781 	 * A value of zero indicates that the Tx ring should be associated with
42782 	 * the default scheduler queue (SCHQ).
42783 	 */
42784 	uint16_t	schq_id;
42785 	/*
42786 	 * This field is used when ring_type is a TX or Rx ring.
42787 	 * This value indicates what completion ring the TX or Rx ring
42788 	 * is associated with.
42789 	 */
42790 	uint16_t	cmpl_ring_id;
42791 	/*
42792 	 * Rx SOP padding amount in bytes.
42793 	 * This value is only used when rx_sop_pad_enable flag is set to '1'.
42794 	 */
42795 	uint8_t	rx_sop_pad_bytes;
42796 	uint8_t	unused_0[3];
42797 	/* lb_header_metadata in the QP context is copied to this field. */
42798 	uint32_t	tx_metadata;
42799 	uint8_t	unused_1[7];
42800 	/*
42801 	 * This field is used in Output records to indicate that the output
42802 	 * is completely written to RAM. This field should be read as '1'
42803 	 * to indicate that the output has been completely written.
42804 	 * When writing a command completion or response to an internal
42805 	 * processor, the order of writes has to be such that this field is
42806 	 * written last.
42807 	 */
42808 	uint8_t	valid;
42809 } hwrm_ring_qcfg_output_t, *phwrm_ring_qcfg_output_t;
42810 
42811 /**************************
42812  * hwrm_ring_aggint_qcaps *
42813  **************************/
42814 
42815 
42816 /* hwrm_ring_aggint_qcaps_input (size:128b/16B) */
42817 
42818 typedef struct hwrm_ring_aggint_qcaps_input {
42819 	/* The HWRM command request type. */
42820 	uint16_t	req_type;
42821 	/*
42822 	 * The completion ring to send the completion event on. This should
42823 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42824 	 */
42825 	uint16_t	cmpl_ring;
42826 	/*
42827 	 * The sequence ID is used by the driver for tracking multiple
42828 	 * commands. This ID is treated as opaque data by the firmware and
42829 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42830 	 */
42831 	uint16_t	seq_id;
42832 	/*
42833 	 * The target ID of the command:
42834 	 * * 0x0-0xFFF8 - The function ID
42835 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42836 	 * * 0xFFFD - Reserved for user-space HWRM interface
42837 	 * * 0xFFFF - HWRM
42838 	 */
42839 	uint16_t	target_id;
42840 	/*
42841 	 * A physical address pointer pointing to a host buffer that the
42842 	 * command's response data will be written. This can be either a host
42843 	 * physical address (HPA) or a guest physical address (GPA) and must
42844 	 * point to a physically contiguous block of memory.
42845 	 */
42846 	uint64_t	resp_addr;
42847 } hwrm_ring_aggint_qcaps_input_t, *phwrm_ring_aggint_qcaps_input_t;
42848 
42849 /* hwrm_ring_aggint_qcaps_output (size:384b/48B) */
42850 
42851 typedef struct hwrm_ring_aggint_qcaps_output {
42852 	/* The specific error status for the command. */
42853 	uint16_t	error_code;
42854 	/* The HWRM command request type. */
42855 	uint16_t	req_type;
42856 	/* The sequence ID from the original command. */
42857 	uint16_t	seq_id;
42858 	/* The length of the response data in number of bytes. */
42859 	uint16_t	resp_len;
42860 	uint32_t	cmpl_params;
42861 	/*
42862 	 * When this bit is set to '1', int_lat_tmr_min can be configured
42863 	 * on completion rings.
42864 	 */
42865 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_INT_LAT_TMR_MIN		UINT32_C(0x1)
42866 	/*
42867 	 * When this bit is set to '1', int_lat_tmr_max can be configured
42868 	 * on completion rings.
42869 	 */
42870 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_INT_LAT_TMR_MAX		UINT32_C(0x2)
42871 	/*
42872 	 * When this bit is set to '1', timer_reset can be enabled
42873 	 * on completion rings.
42874 	 */
42875 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_TIMER_RESET			UINT32_C(0x4)
42876 	/*
42877 	 * When this bit is set to '1', ring_idle can be enabled
42878 	 * on completion rings.
42879 	 */
42880 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_RING_IDLE			UINT32_C(0x8)
42881 	/*
42882 	 * When this bit is set to '1', num_cmpl_dma_aggr can be configured
42883 	 * on completion rings.
42884 	 */
42885 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_NUM_CMPL_DMA_AGGR		UINT32_C(0x10)
42886 	/*
42887 	 * When this bit is set to '1', num_cmpl_dma_aggr_during_int can be
42888 	 * configured on completion rings.
42889 	 */
42890 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_NUM_CMPL_DMA_AGGR_DURING_INT	UINT32_C(0x20)
42891 	/*
42892 	 * When this bit is set to '1', cmpl_aggr_dma_tmr can be configured
42893 	 * on completion rings.
42894 	 */
42895 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_CMPL_AGGR_DMA_TMR		UINT32_C(0x40)
42896 	/*
42897 	 * When this bit is set to '1', cmpl_aggr_dma_tmr_during_int can be
42898 	 * configured on completion rings.
42899 	 */
42900 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_CMPL_AGGR_DMA_TMR_DURING_INT	UINT32_C(0x80)
42901 	/*
42902 	 * When this bit is set to '1', num_cmpl_aggr_int can be configured
42903 	 * on completion rings.
42904 	 */
42905 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_NUM_CMPL_AGGR_INT		UINT32_C(0x100)
42906 	uint32_t	nq_params;
42907 	/*
42908 	 * When this bit is set to '1', int_lat_tmr_min can be configured
42909 	 * on notification queues.
42910 	 */
42911 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_NQ_PARAMS_INT_LAT_TMR_MIN	UINT32_C(0x1)
42912 	/* Minimum value for num_cmpl_dma_aggr */
42913 	uint16_t	num_cmpl_dma_aggr_min;
42914 	/* Maximum value for num_cmpl_dma_aggr */
42915 	uint16_t	num_cmpl_dma_aggr_max;
42916 	/* Minimum value for num_cmpl_dma_aggr_during_int */
42917 	uint16_t	num_cmpl_dma_aggr_during_int_min;
42918 	/* Maximum value for num_cmpl_dma_aggr_during_int */
42919 	uint16_t	num_cmpl_dma_aggr_during_int_max;
42920 	/* Minimum value for cmpl_aggr_dma_tmr */
42921 	uint16_t	cmpl_aggr_dma_tmr_min;
42922 	/* Maximum value for cmpl_aggr_dma_tmr */
42923 	uint16_t	cmpl_aggr_dma_tmr_max;
42924 	/* Minimum value for cmpl_aggr_dma_tmr_during_int */
42925 	uint16_t	cmpl_aggr_dma_tmr_during_int_min;
42926 	/* Maximum value for cmpl_aggr_dma_tmr_during_int */
42927 	uint16_t	cmpl_aggr_dma_tmr_during_int_max;
42928 	/* Minimum value for int_lat_tmr_min */
42929 	uint16_t	int_lat_tmr_min_min;
42930 	/* Maximum value for int_lat_tmr_min */
42931 	uint16_t	int_lat_tmr_min_max;
42932 	/* Minimum value for int_lat_tmr_max */
42933 	uint16_t	int_lat_tmr_max_min;
42934 	/* Maximum value for int_lat_tmr_max */
42935 	uint16_t	int_lat_tmr_max_max;
42936 	/* Minimum value for num_cmpl_aggr_int */
42937 	uint16_t	num_cmpl_aggr_int_min;
42938 	/* Maximum value for num_cmpl_aggr_int */
42939 	uint16_t	num_cmpl_aggr_int_max;
42940 	/* The units for timer parameters, in nanoseconds. */
42941 	uint16_t	timer_units;
42942 	uint8_t	unused_0[1];
42943 	/*
42944 	 * This field is used in Output records to indicate that the output
42945 	 * is completely written to RAM. This field should be read as '1'
42946 	 * to indicate that the output has been completely written. When
42947 	 * writing a command completion or response to an internal processor,
42948 	 * the order of writes has to be such that this field is written last.
42949 	 */
42950 	uint8_t	valid;
42951 } hwrm_ring_aggint_qcaps_output_t, *phwrm_ring_aggint_qcaps_output_t;
42952 
42953 /**************************************
42954  * hwrm_ring_cmpl_ring_qaggint_params *
42955  **************************************/
42956 
42957 
42958 /* hwrm_ring_cmpl_ring_qaggint_params_input (size:192b/24B) */
42959 
42960 typedef struct hwrm_ring_cmpl_ring_qaggint_params_input {
42961 	/* The HWRM command request type. */
42962 	uint16_t	req_type;
42963 	/*
42964 	 * The completion ring to send the completion event on. This should
42965 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42966 	 */
42967 	uint16_t	cmpl_ring;
42968 	/*
42969 	 * The sequence ID is used by the driver for tracking multiple
42970 	 * commands. This ID is treated as opaque data by the firmware and
42971 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42972 	 */
42973 	uint16_t	seq_id;
42974 	/*
42975 	 * The target ID of the command:
42976 	 * * 0x0-0xFFF8 - The function ID
42977 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42978 	 * * 0xFFFD - Reserved for user-space HWRM interface
42979 	 * * 0xFFFF - HWRM
42980 	 */
42981 	uint16_t	target_id;
42982 	/*
42983 	 * A physical address pointer pointing to a host buffer that the
42984 	 * command's response data will be written. This can be either a host
42985 	 * physical address (HPA) or a guest physical address (GPA) and must
42986 	 * point to a physically contiguous block of memory.
42987 	 */
42988 	uint64_t	resp_addr;
42989 	/* Physical number of completion ring. */
42990 	uint16_t	ring_id;
42991 	uint16_t	flags;
42992 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_INPUT_FLAGS_UNUSED_0_MASK UINT32_C(0x3)
42993 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_INPUT_FLAGS_UNUSED_0_SFT 0
42994 	/*
42995 	 * Set this flag to 1 when querying parameters on a notification
42996 	 * queue. Set this flag to 0 when querying parameters on a
42997 	 * completion queue or completion ring.
42998 	 */
42999 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_INPUT_FLAGS_IS_NQ	UINT32_C(0x4)
43000 	uint8_t	unused_0[4];
43001 } hwrm_ring_cmpl_ring_qaggint_params_input_t, *phwrm_ring_cmpl_ring_qaggint_params_input_t;
43002 
43003 /* hwrm_ring_cmpl_ring_qaggint_params_output (size:256b/32B) */
43004 
43005 typedef struct hwrm_ring_cmpl_ring_qaggint_params_output {
43006 	/* The specific error status for the command. */
43007 	uint16_t	error_code;
43008 	/* The HWRM command request type. */
43009 	uint16_t	req_type;
43010 	/* The sequence ID from the original command. */
43011 	uint16_t	seq_id;
43012 	/* The length of the response data in number of bytes. */
43013 	uint16_t	resp_len;
43014 	uint16_t	flags;
43015 	/*
43016 	 * When this bit is set to '1', interrupt max
43017 	 * timer is reset whenever a completion is received.
43018 	 */
43019 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_OUTPUT_FLAGS_TIMER_RESET	UINT32_C(0x1)
43020 	/*
43021 	 * When this bit is set to '1', ring idle mode
43022 	 * aggregation will be enabled.
43023 	 */
43024 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_OUTPUT_FLAGS_RING_IDLE	UINT32_C(0x2)
43025 	/*
43026 	 * Number of completions to aggregate before DMA
43027 	 * during the normal mode.
43028 	 */
43029 	uint16_t	num_cmpl_dma_aggr;
43030 	/*
43031 	 * Number of completions to aggregate before DMA
43032 	 * during the interrupt mode.
43033 	 */
43034 	uint16_t	num_cmpl_dma_aggr_during_int;
43035 	/*
43036 	 * Timer used to aggregate completions before
43037 	 * DMA during the normal mode (not in interrupt mode).
43038 	 */
43039 	uint16_t	cmpl_aggr_dma_tmr;
43040 	/*
43041 	 * Timer used to aggregate completions before
43042 	 * DMA when in interrupt mode.
43043 	 */
43044 	uint16_t	cmpl_aggr_dma_tmr_during_int;
43045 	/* Minimum time between two interrupts. */
43046 	uint16_t	int_lat_tmr_min;
43047 	/*
43048 	 * Maximum wait time spent aggregating
43049 	 * completions before signaling the interrupt after the
43050 	 * interrupt is enabled.
43051 	 */
43052 	uint16_t	int_lat_tmr_max;
43053 	/*
43054 	 * Minimum number of completions aggregated before signaling
43055 	 * an interrupt.
43056 	 */
43057 	uint16_t	num_cmpl_aggr_int;
43058 	uint8_t	unused_0[7];
43059 	/*
43060 	 * This field is used in Output records to indicate that the output
43061 	 * is completely written to RAM. This field should be read as '1'
43062 	 * to indicate that the output has been completely written. When
43063 	 * writing a command completion or response to an internal processor,
43064 	 * the order of writes has to be such that this field is written last.
43065 	 */
43066 	uint8_t	valid;
43067 } hwrm_ring_cmpl_ring_qaggint_params_output_t, *phwrm_ring_cmpl_ring_qaggint_params_output_t;
43068 
43069 /*****************************************
43070  * hwrm_ring_cmpl_ring_cfg_aggint_params *
43071  *****************************************/
43072 
43073 
43074 /* hwrm_ring_cmpl_ring_cfg_aggint_params_input (size:320b/40B) */
43075 
43076 typedef struct hwrm_ring_cmpl_ring_cfg_aggint_params_input {
43077 	/* The HWRM command request type. */
43078 	uint16_t	req_type;
43079 	/*
43080 	 * The completion ring to send the completion event on. This should
43081 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43082 	 */
43083 	uint16_t	cmpl_ring;
43084 	/*
43085 	 * The sequence ID is used by the driver for tracking multiple
43086 	 * commands. This ID is treated as opaque data by the firmware and
43087 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43088 	 */
43089 	uint16_t	seq_id;
43090 	/*
43091 	 * The target ID of the command:
43092 	 * * 0x0-0xFFF8 - The function ID
43093 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43094 	 * * 0xFFFD - Reserved for user-space HWRM interface
43095 	 * * 0xFFFF - HWRM
43096 	 */
43097 	uint16_t	target_id;
43098 	/*
43099 	 * A physical address pointer pointing to a host buffer that the
43100 	 * command's response data will be written. This can be either a host
43101 	 * physical address (HPA) or a guest physical address (GPA) and must
43102 	 * point to a physically contiguous block of memory.
43103 	 */
43104 	uint64_t	resp_addr;
43105 	/* Physical number of completion ring. */
43106 	uint16_t	ring_id;
43107 	uint16_t	flags;
43108 	/*
43109 	 * When this bit is set to '1', interrupt latency max
43110 	 * timer is reset whenever a completion is received.
43111 	 */
43112 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_TIMER_RESET	UINT32_C(0x1)
43113 	/*
43114 	 * When this bit is set to '1', ring idle mode
43115 	 * aggregation will be enabled.
43116 	 */
43117 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_RING_IDLE	UINT32_C(0x2)
43118 	/*
43119 	 * Set this flag to 1 when configuring parameters on a
43120 	 * notification queue. Set this flag to 0 when configuring
43121 	 * parameters on a completion queue or completion ring.
43122 	 */
43123 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_IS_NQ	UINT32_C(0x4)
43124 	/*
43125 	 * Number of completions to aggregate before DMA
43126 	 * during the normal mode.
43127 	 */
43128 	uint16_t	num_cmpl_dma_aggr;
43129 	/*
43130 	 * Number of completions to aggregate before DMA
43131 	 * during the interrupt mode.
43132 	 */
43133 	uint16_t	num_cmpl_dma_aggr_during_int;
43134 	/*
43135 	 * Timer used to aggregate completions before
43136 	 * DMA during the normal mode (not in interrupt mode).
43137 	 */
43138 	uint16_t	cmpl_aggr_dma_tmr;
43139 	/*
43140 	 * Timer used to aggregate completions before
43141 	 * DMA while in interrupt mode.
43142 	 */
43143 	uint16_t	cmpl_aggr_dma_tmr_during_int;
43144 	/* Minimum time between two interrupts. */
43145 	uint16_t	int_lat_tmr_min;
43146 	/*
43147 	 * Maximum wait time spent aggregating
43148 	 * completions before signaling the interrupt after the
43149 	 * interrupt is enabled.
43150 	 */
43151 	uint16_t	int_lat_tmr_max;
43152 	/*
43153 	 * Minimum number of completions aggregated before signaling
43154 	 * an interrupt.
43155 	 */
43156 	uint16_t	num_cmpl_aggr_int;
43157 	/*
43158 	 * Bitfield that indicates which parameters are to be applied. Only
43159 	 * required when configuring devices with notification queues, and
43160 	 * used in that case to set certain parameters on completion queues
43161 	 * and others on notification queues.
43162 	 */
43163 	uint16_t	enables;
43164 	/*
43165 	 * This bit must be '1' for the num_cmpl_dma_aggr field to be
43166 	 * configured.
43167 	 */
43168 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_NUM_CMPL_DMA_AGGR		UINT32_C(0x1)
43169 	/*
43170 	 * This bit must be '1' for the num_cmpl_dma_aggr_during_int field to
43171 	 * be configured.
43172 	 */
43173 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_NUM_CMPL_DMA_AGGR_DURING_INT	UINT32_C(0x2)
43174 	/*
43175 	 * This bit must be '1' for the cmpl_aggr_dma_tmr field to be
43176 	 * configured.
43177 	 */
43178 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_CMPL_AGGR_DMA_TMR		UINT32_C(0x4)
43179 	/*
43180 	 * This bit must be '1' for the int_lat_tmr_min field to be
43181 	 * configured.
43182 	 */
43183 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_INT_LAT_TMR_MIN		UINT32_C(0x8)
43184 	/*
43185 	 * This bit must be '1' for the int_lat_tmr_max field to be
43186 	 * configured.
43187 	 */
43188 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_INT_LAT_TMR_MAX		UINT32_C(0x10)
43189 	/*
43190 	 * This bit must be '1' for the num_cmpl_aggr_int field to be
43191 	 * configured.
43192 	 */
43193 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_NUM_CMPL_AGGR_INT		UINT32_C(0x20)
43194 	uint8_t	unused_0[4];
43195 } hwrm_ring_cmpl_ring_cfg_aggint_params_input_t, *phwrm_ring_cmpl_ring_cfg_aggint_params_input_t;
43196 
43197 /* hwrm_ring_cmpl_ring_cfg_aggint_params_output (size:128b/16B) */
43198 
43199 typedef struct hwrm_ring_cmpl_ring_cfg_aggint_params_output {
43200 	/* The specific error status for the command. */
43201 	uint16_t	error_code;
43202 	/* The HWRM command request type. */
43203 	uint16_t	req_type;
43204 	/* The sequence ID from the original command. */
43205 	uint16_t	seq_id;
43206 	/* The length of the response data in number of bytes. */
43207 	uint16_t	resp_len;
43208 	uint8_t	unused_0[7];
43209 	/*
43210 	 * This field is used in Output records to indicate that the output
43211 	 * is completely written to RAM. This field should be read as '1'
43212 	 * to indicate that the output has been completely written. When
43213 	 * writing a command completion or response to an internal processor,
43214 	 * the order of writes has to be such that this field is written last.
43215 	 */
43216 	uint8_t	valid;
43217 } hwrm_ring_cmpl_ring_cfg_aggint_params_output_t, *phwrm_ring_cmpl_ring_cfg_aggint_params_output_t;
43218 
43219 /***********************
43220  * hwrm_ring_grp_alloc *
43221  ***********************/
43222 
43223 
43224 /* hwrm_ring_grp_alloc_input (size:192b/24B) */
43225 
43226 typedef struct hwrm_ring_grp_alloc_input {
43227 	/* The HWRM command request type. */
43228 	uint16_t	req_type;
43229 	/*
43230 	 * The completion ring to send the completion event on. This should
43231 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43232 	 */
43233 	uint16_t	cmpl_ring;
43234 	/*
43235 	 * The sequence ID is used by the driver for tracking multiple
43236 	 * commands. This ID is treated as opaque data by the firmware and
43237 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43238 	 */
43239 	uint16_t	seq_id;
43240 	/*
43241 	 * The target ID of the command:
43242 	 * * 0x0-0xFFF8 - The function ID
43243 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43244 	 * * 0xFFFD - Reserved for user-space HWRM interface
43245 	 * * 0xFFFF - HWRM
43246 	 */
43247 	uint16_t	target_id;
43248 	/*
43249 	 * A physical address pointer pointing to a host buffer that the
43250 	 * command's response data will be written. This can be either a host
43251 	 * physical address (HPA) or a guest physical address (GPA) and must
43252 	 * point to a physically contiguous block of memory.
43253 	 */
43254 	uint64_t	resp_addr;
43255 	/*
43256 	 * This value identifies the CR associated with the ring
43257 	 * group.
43258 	 */
43259 	uint16_t	cr;
43260 	/*
43261 	 * This value identifies the main RR associated with the ring
43262 	 * group.
43263 	 */
43264 	uint16_t	rr;
43265 	/*
43266 	 * This value identifies the aggregation RR associated with
43267 	 * the ring group. If this value is 0xFF... (All Fs), then no
43268 	 * Aggregation ring will be set.
43269 	 */
43270 	uint16_t	ar;
43271 	/*
43272 	 * This value identifies the statistics context associated
43273 	 * with the ring group.
43274 	 */
43275 	uint16_t	sc;
43276 } hwrm_ring_grp_alloc_input_t, *phwrm_ring_grp_alloc_input_t;
43277 
43278 /* hwrm_ring_grp_alloc_output (size:128b/16B) */
43279 
43280 typedef struct hwrm_ring_grp_alloc_output {
43281 	/* The specific error status for the command. */
43282 	uint16_t	error_code;
43283 	/* The HWRM command request type. */
43284 	uint16_t	req_type;
43285 	/* The sequence ID from the original command. */
43286 	uint16_t	seq_id;
43287 	/* The length of the response data in number of bytes. */
43288 	uint16_t	resp_len;
43289 	/*
43290 	 * This is the ring group ID value. Use this value to program
43291 	 * the default ring group for the VNIC or as table entries
43292 	 * in an RSS/COS context.
43293 	 */
43294 	uint32_t	ring_group_id;
43295 	uint8_t	unused_0[3];
43296 	/*
43297 	 * This field is used in Output records to indicate that the output
43298 	 * is completely written to RAM. This field should be read as '1'
43299 	 * to indicate that the output has been completely written. When
43300 	 * writing a command completion or response to an internal processor,
43301 	 * the order of writes has to be such that this field is written last.
43302 	 */
43303 	uint8_t	valid;
43304 } hwrm_ring_grp_alloc_output_t, *phwrm_ring_grp_alloc_output_t;
43305 
43306 /**********************
43307  * hwrm_ring_grp_free *
43308  **********************/
43309 
43310 
43311 /* hwrm_ring_grp_free_input (size:192b/24B) */
43312 
43313 typedef struct hwrm_ring_grp_free_input {
43314 	/* The HWRM command request type. */
43315 	uint16_t	req_type;
43316 	/*
43317 	 * The completion ring to send the completion event on. This should
43318 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43319 	 */
43320 	uint16_t	cmpl_ring;
43321 	/*
43322 	 * The sequence ID is used by the driver for tracking multiple
43323 	 * commands. This ID is treated as opaque data by the firmware and
43324 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43325 	 */
43326 	uint16_t	seq_id;
43327 	/*
43328 	 * The target ID of the command:
43329 	 * * 0x0-0xFFF8 - The function ID
43330 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43331 	 * * 0xFFFD - Reserved for user-space HWRM interface
43332 	 * * 0xFFFF - HWRM
43333 	 */
43334 	uint16_t	target_id;
43335 	/*
43336 	 * A physical address pointer pointing to a host buffer that the
43337 	 * command's response data will be written. This can be either a host
43338 	 * physical address (HPA) or a guest physical address (GPA) and must
43339 	 * point to a physically contiguous block of memory.
43340 	 */
43341 	uint64_t	resp_addr;
43342 	/* This is the ring group ID value. */
43343 	uint32_t	ring_group_id;
43344 	uint8_t	unused_0[4];
43345 } hwrm_ring_grp_free_input_t, *phwrm_ring_grp_free_input_t;
43346 
43347 /* hwrm_ring_grp_free_output (size:128b/16B) */
43348 
43349 typedef struct hwrm_ring_grp_free_output {
43350 	/* The specific error status for the command. */
43351 	uint16_t	error_code;
43352 	/* The HWRM command request type. */
43353 	uint16_t	req_type;
43354 	/* The sequence ID from the original command. */
43355 	uint16_t	seq_id;
43356 	/* The length of the response data in number of bytes. */
43357 	uint16_t	resp_len;
43358 	uint8_t	unused_0[7];
43359 	/*
43360 	 * This field is used in Output records to indicate that the output
43361 	 * is completely written to RAM. This field should be read as '1'
43362 	 * to indicate that the output has been completely written. When
43363 	 * writing a command completion or response to an internal processor,
43364 	 * the order of writes has to be such that this field is written last.
43365 	 */
43366 	uint8_t	valid;
43367 } hwrm_ring_grp_free_output_t, *phwrm_ring_grp_free_output_t;
43368 
43369 /************************
43370  * hwrm_ring_schq_alloc *
43371  ************************/
43372 
43373 
43374 /* hwrm_ring_schq_alloc_input (size:1088b/136B) */
43375 
43376 typedef struct hwrm_ring_schq_alloc_input {
43377 	/* The HWRM command request type. */
43378 	uint16_t	req_type;
43379 	/*
43380 	 * The completion ring to send the completion event on. This should
43381 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43382 	 */
43383 	uint16_t	cmpl_ring;
43384 	/*
43385 	 * The sequence ID is used by the driver for tracking multiple
43386 	 * commands. This ID is treated as opaque data by the firmware and
43387 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43388 	 */
43389 	uint16_t	seq_id;
43390 	/*
43391 	 * The target ID of the command:
43392 	 * * 0x0-0xFFF8 - The function ID
43393 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43394 	 * * 0xFFFD - Reserved for user-space HWRM interface
43395 	 * * 0xFFFF - HWRM
43396 	 */
43397 	uint16_t	target_id;
43398 	/*
43399 	 * A physical address pointer pointing to a host buffer that the
43400 	 * command's response data will be written. This can be either a host
43401 	 * physical address (HPA) or a guest physical address (GPA) and must
43402 	 * point to a physically contiguous block of memory.
43403 	 */
43404 	uint64_t	resp_addr;
43405 	uint32_t	enables;
43406 	/*
43407 	 * This bit must be '1' for the tqm_ring0 fields to be
43408 	 * configured.
43409 	 */
43410 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING0	UINT32_C(0x1)
43411 	/*
43412 	 * This bit must be '1' for the tqm_ring1 fields to be
43413 	 * configured.
43414 	 */
43415 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING1	UINT32_C(0x2)
43416 	/*
43417 	 * This bit must be '1' for the tqm_ring2 fields to be
43418 	 * configured.
43419 	 */
43420 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING2	UINT32_C(0x4)
43421 	/*
43422 	 * This bit must be '1' for the tqm_ring3 fields to be
43423 	 * configured.
43424 	 */
43425 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING3	UINT32_C(0x8)
43426 	/*
43427 	 * This bit must be '1' for the tqm_ring4 fields to be
43428 	 * configured.
43429 	 */
43430 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING4	UINT32_C(0x10)
43431 	/*
43432 	 * This bit must be '1' for the tqm_ring5 fields to be
43433 	 * configured.
43434 	 */
43435 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING5	UINT32_C(0x20)
43436 	/*
43437 	 * This bit must be '1' for the tqm_ring6 fields to be
43438 	 * configured.
43439 	 */
43440 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING6	UINT32_C(0x40)
43441 	/*
43442 	 * This bit must be '1' for the tqm_ring7 fields to be
43443 	 * configured.
43444 	 */
43445 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING7	UINT32_C(0x80)
43446 	/* Reserved for future use. */
43447 	uint32_t	reserved;
43448 	/* TQM ring 0 page size and level. */
43449 	uint8_t	tqm_ring0_pg_size_tqm_ring0_lvl;
43450 	/* TQM ring 0 PBL indirect levels. */
43451 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_MASK	UINT32_C(0xf)
43452 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_SFT	0
43453 	/* PBL pointer is physical start address. */
43454 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_0	UINT32_C(0x0)
43455 	/* PBL pointer points to PTE table. */
43456 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_1	UINT32_C(0x1)
43457 	/*
43458 	 * PBL pointer points to PDE table with each entry pointing to PTE
43459 	 * tables.
43460 	 */
43461 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2	UINT32_C(0x2)
43462 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2
43463 	/* TQM ring 0 page size. */
43464 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_MASK  UINT32_C(0xf0)
43465 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_SFT   4
43466 	/* 4KB. */
43467 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43468 	/* 8KB. */
43469 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43470 	/* 64KB. */
43471 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43472 	/* 2MB. */
43473 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43474 	/* 8MB. */
43475 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43476 	/* 1GB. */
43477 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43478 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G
43479 	/* TQM ring 1 page size and level. */
43480 	uint8_t	tqm_ring1_pg_size_tqm_ring1_lvl;
43481 	/* TQM ring 1 PBL indirect levels. */
43482 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_MASK	UINT32_C(0xf)
43483 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_SFT	0
43484 	/* PBL pointer is physical start address. */
43485 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_0	UINT32_C(0x0)
43486 	/* PBL pointer points to PTE table. */
43487 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_1	UINT32_C(0x1)
43488 	/*
43489 	 * PBL pointer points to PDE table with each entry pointing to PTE
43490 	 * tables.
43491 	 */
43492 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2	UINT32_C(0x2)
43493 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2
43494 	/* TQM ring 1 page size. */
43495 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_MASK  UINT32_C(0xf0)
43496 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_SFT   4
43497 	/* 4KB. */
43498 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43499 	/* 8KB. */
43500 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43501 	/* 64KB. */
43502 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43503 	/* 2MB. */
43504 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43505 	/* 8MB. */
43506 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43507 	/* 1GB. */
43508 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43509 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G
43510 	/* TQM ring 2 page size and level. */
43511 	uint8_t	tqm_ring2_pg_size_tqm_ring2_lvl;
43512 	/* TQM ring 2 PBL indirect levels. */
43513 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_MASK	UINT32_C(0xf)
43514 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_SFT	0
43515 	/* PBL pointer is physical start address. */
43516 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_0	UINT32_C(0x0)
43517 	/* PBL pointer points to PTE table. */
43518 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_1	UINT32_C(0x1)
43519 	/*
43520 	 * PBL pointer points to PDE table with each entry pointing to PTE
43521 	 * tables.
43522 	 */
43523 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2	UINT32_C(0x2)
43524 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2
43525 	/* TQM ring 2 page size. */
43526 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_MASK  UINT32_C(0xf0)
43527 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_SFT   4
43528 	/* 4KB. */
43529 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43530 	/* 8KB. */
43531 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43532 	/* 64KB. */
43533 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43534 	/* 2MB. */
43535 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43536 	/* 8MB. */
43537 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43538 	/* 1GB. */
43539 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43540 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G
43541 	/* TQM ring 3 page size and level. */
43542 	uint8_t	tqm_ring3_pg_size_tqm_ring3_lvl;
43543 	/* TQM ring 3 PBL indirect levels. */
43544 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_MASK	UINT32_C(0xf)
43545 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_SFT	0
43546 	/* PBL pointer is physical start address. */
43547 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_0	UINT32_C(0x0)
43548 	/* PBL pointer points to PTE table. */
43549 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_1	UINT32_C(0x1)
43550 	/*
43551 	 * PBL pointer points to PDE table with each entry pointing to PTE
43552 	 * tables.
43553 	 */
43554 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2	UINT32_C(0x2)
43555 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2
43556 	/* TQM ring 3 page size. */
43557 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_MASK  UINT32_C(0xf0)
43558 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_SFT   4
43559 	/* 4KB. */
43560 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43561 	/* 8KB. */
43562 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43563 	/* 64KB. */
43564 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43565 	/* 2MB. */
43566 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43567 	/* 8MB. */
43568 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43569 	/* 1GB. */
43570 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43571 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G
43572 	/* TQM ring 4 page size and level. */
43573 	uint8_t	tqm_ring4_pg_size_tqm_ring4_lvl;
43574 	/* TQM ring 4 PBL indirect levels. */
43575 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_MASK	UINT32_C(0xf)
43576 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_SFT	0
43577 	/* PBL pointer is physical start address. */
43578 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_0	UINT32_C(0x0)
43579 	/* PBL pointer points to PTE table. */
43580 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_1	UINT32_C(0x1)
43581 	/*
43582 	 * PBL pointer points to PDE table with each entry pointing to PTE
43583 	 * tables.
43584 	 */
43585 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2	UINT32_C(0x2)
43586 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2
43587 	/* TQM ring 4 page size. */
43588 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_MASK  UINT32_C(0xf0)
43589 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_SFT   4
43590 	/* 4KB. */
43591 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43592 	/* 8KB. */
43593 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43594 	/* 64KB. */
43595 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43596 	/* 2MB. */
43597 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43598 	/* 8MB. */
43599 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43600 	/* 1GB. */
43601 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43602 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G
43603 	/* TQM ring 5 page size and level. */
43604 	uint8_t	tqm_ring5_pg_size_tqm_ring5_lvl;
43605 	/* TQM ring 5 PBL indirect levels. */
43606 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_MASK	UINT32_C(0xf)
43607 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_SFT	0
43608 	/* PBL pointer is physical start address. */
43609 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_0	UINT32_C(0x0)
43610 	/* PBL pointer points to PTE table. */
43611 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_1	UINT32_C(0x1)
43612 	/*
43613 	 * PBL pointer points to PDE table with each entry pointing to PTE
43614 	 * tables.
43615 	 */
43616 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2	UINT32_C(0x2)
43617 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2
43618 	/* TQM ring 5 page size. */
43619 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_MASK  UINT32_C(0xf0)
43620 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_SFT   4
43621 	/* 4KB. */
43622 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43623 	/* 8KB. */
43624 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43625 	/* 64KB. */
43626 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43627 	/* 2MB. */
43628 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43629 	/* 8MB. */
43630 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43631 	/* 1GB. */
43632 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43633 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G
43634 	/* TQM ring 6 page size and level. */
43635 	uint8_t	tqm_ring6_pg_size_tqm_ring6_lvl;
43636 	/* TQM ring 6 PBL indirect levels. */
43637 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_MASK	UINT32_C(0xf)
43638 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_SFT	0
43639 	/* PBL pointer is physical start address. */
43640 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_0	UINT32_C(0x0)
43641 	/* PBL pointer points to PTE table. */
43642 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_1	UINT32_C(0x1)
43643 	/*
43644 	 * PBL pointer points to PDE table with each entry pointing to PTE
43645 	 * tables.
43646 	 */
43647 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2	UINT32_C(0x2)
43648 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2
43649 	/* TQM ring 6 page size. */
43650 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_MASK  UINT32_C(0xf0)
43651 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_SFT   4
43652 	/* 4KB. */
43653 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43654 	/* 8KB. */
43655 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43656 	/* 64KB. */
43657 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43658 	/* 2MB. */
43659 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43660 	/* 8MB. */
43661 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43662 	/* 1GB. */
43663 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43664 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G
43665 	/* TQM ring 7 page size and level. */
43666 	uint8_t	tqm_ring7_pg_size_tqm_ring7_lvl;
43667 	/* TQM ring 7 PBL indirect levels. */
43668 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_MASK	UINT32_C(0xf)
43669 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_SFT	0
43670 	/* PBL pointer is physical start address. */
43671 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_0	UINT32_C(0x0)
43672 	/* PBL pointer points to PTE table. */
43673 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_1	UINT32_C(0x1)
43674 	/*
43675 	 * PBL pointer points to PDE table with each entry pointing to PTE
43676 	 * tables.
43677 	 */
43678 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2	UINT32_C(0x2)
43679 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LAST	HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2
43680 	/* TQM ring 7 page size. */
43681 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_MASK  UINT32_C(0xf0)
43682 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_SFT   4
43683 	/* 4KB. */
43684 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
43685 	/* 8KB. */
43686 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
43687 	/* 64KB. */
43688 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
43689 	/* 2MB. */
43690 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
43691 	/* 8MB. */
43692 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
43693 	/* 1GB. */
43694 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
43695 		#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_LAST   HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G
43696 	/* TQM ring 0 page directory. */
43697 	uint64_t	tqm_ring0_page_dir;
43698 	/* TQM ring 1 page directory. */
43699 	uint64_t	tqm_ring1_page_dir;
43700 	/* TQM ring 2 page directory. */
43701 	uint64_t	tqm_ring2_page_dir;
43702 	/* TQM ring 3 page directory. */
43703 	uint64_t	tqm_ring3_page_dir;
43704 	/* TQM ring 4 page directory. */
43705 	uint64_t	tqm_ring4_page_dir;
43706 	/* TQM ring 5 page directory. */
43707 	uint64_t	tqm_ring5_page_dir;
43708 	/* TQM ring 6 page directory. */
43709 	uint64_t	tqm_ring6_page_dir;
43710 	/* TQM ring 7 page directory. */
43711 	uint64_t	tqm_ring7_page_dir;
43712 	/*
43713 	 * Number of TQM ring 0 entries.
43714 	 *
43715 	 * TQM fastpath rings should be sized large enough to accommodate the
43716 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43717 	 * that can be enqueued to the TQM ring.
43718 	 *
43719 	 * Note that TQM ring sizes cannot be extended while the system is
43720 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43721 	 * to delete the SCHQ and then reallocate it.
43722 	 */
43723 	uint32_t	tqm_ring0_num_entries;
43724 	/*
43725 	 * Number of TQM ring 1 entries.
43726 	 *
43727 	 * TQM fastpath rings should be sized large enough to accommodate the
43728 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43729 	 * that can be enqueued to the TQM ring.
43730 	 *
43731 	 * Note that TQM ring sizes cannot be extended while the system is
43732 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43733 	 * to delete the SCHQ and then reallocate it.
43734 	 */
43735 	uint32_t	tqm_ring1_num_entries;
43736 	/*
43737 	 * Number of TQM ring 2 entries.
43738 	 *
43739 	 * TQM fastpath rings should be sized large enough to accommodate the
43740 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43741 	 * that can be enqueued to the TQM ring.
43742 	 *
43743 	 * Note that TQM ring sizes cannot be extended while the system is
43744 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43745 	 * to delete the SCHQ and then reallocate it.
43746 	 */
43747 	uint32_t	tqm_ring2_num_entries;
43748 	/*
43749 	 * Number of TQM ring 3 entries.
43750 	 *
43751 	 * TQM fastpath rings should be sized large enough to accommodate the
43752 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43753 	 * that can be enqueued to the TQM ring.
43754 	 *
43755 	 * Note that TQM ring sizes cannot be extended while the system is
43756 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43757 	 * to delete the SCHQ and then reallocate it.
43758 	 */
43759 	uint32_t	tqm_ring3_num_entries;
43760 	/*
43761 	 * Number of TQM ring 4 entries.
43762 	 *
43763 	 * TQM fastpath rings should be sized large enough to accommodate the
43764 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43765 	 * that can be enqueued to the TQM ring.
43766 	 *
43767 	 * Note that TQM ring sizes cannot be extended while the system is
43768 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43769 	 * to delete the SCHQ and then reallocate it.
43770 	 */
43771 	uint32_t	tqm_ring4_num_entries;
43772 	/*
43773 	 * Number of TQM ring 5 entries.
43774 	 *
43775 	 * TQM fastpath rings should be sized large enough to accommodate the
43776 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43777 	 * that can be enqueued to the TQM ring.
43778 	 *
43779 	 * Note that TQM ring sizes cannot be extended while the system is
43780 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43781 	 * to delete the SCHQ and then reallocate it.
43782 	 */
43783 	uint32_t	tqm_ring5_num_entries;
43784 	/*
43785 	 * Number of TQM ring 6 entries.
43786 	 *
43787 	 * TQM fastpath rings should be sized large enough to accommodate the
43788 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43789 	 * that can be enqueued to the TQM ring.
43790 	 *
43791 	 * Note that TQM ring sizes cannot be extended while the system is
43792 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43793 	 * to delete the SCHQ and then reallocate it.
43794 	 */
43795 	uint32_t	tqm_ring6_num_entries;
43796 	/*
43797 	 * Number of TQM ring 7 entries.
43798 	 *
43799 	 * TQM fastpath rings should be sized large enough to accommodate the
43800 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
43801 	 * that can be enqueued to the TQM ring.
43802 	 *
43803 	 * Note that TQM ring sizes cannot be extended while the system is
43804 	 * operational. If a PF driver needs to extend a TQM ring, it needs
43805 	 * to delete the SCHQ and then reallocate it.
43806 	 */
43807 	uint32_t	tqm_ring7_num_entries;
43808 	/* Number of bytes that have been allocated for each context entry. */
43809 	uint16_t	tqm_entry_size;
43810 	uint8_t	unused_0[6];
43811 } hwrm_ring_schq_alloc_input_t, *phwrm_ring_schq_alloc_input_t;
43812 
43813 /* hwrm_ring_schq_alloc_output (size:128b/16B) */
43814 
43815 typedef struct hwrm_ring_schq_alloc_output {
43816 	/* The specific error status for the command. */
43817 	uint16_t	error_code;
43818 	/* The HWRM command request type. */
43819 	uint16_t	req_type;
43820 	/* The sequence ID from the original command. */
43821 	uint16_t	seq_id;
43822 	/* The length of the response data in number of bytes. */
43823 	uint16_t	resp_len;
43824 	/*
43825 	 * This is an identifier for the SCHQ to be used in other HWRM commands
43826 	 * that need to reference this SCHQ. This value is greater than zero
43827 	 * (i.e. a schq_id of zero references the default SCHQ).
43828 	 */
43829 	uint16_t	schq_id;
43830 	uint8_t	unused_0[5];
43831 	/*
43832 	 * This field is used in Output records to indicate that the output
43833 	 * is completely written to RAM. This field should be read as '1'
43834 	 * to indicate that the output has been completely written. When
43835 	 * writing a command completion or response to an internal processor,
43836 	 * the order of writes has to be such that this field is written last.
43837 	 */
43838 	uint8_t	valid;
43839 } hwrm_ring_schq_alloc_output_t, *phwrm_ring_schq_alloc_output_t;
43840 
43841 /**********************
43842  * hwrm_ring_schq_cfg *
43843  **********************/
43844 
43845 
43846 /* hwrm_ring_schq_cfg_input (size:768b/96B) */
43847 
43848 typedef struct hwrm_ring_schq_cfg_input {
43849 	/* The HWRM command request type. */
43850 	uint16_t	req_type;
43851 	/*
43852 	 * The completion ring to send the completion event on. This should
43853 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43854 	 */
43855 	uint16_t	cmpl_ring;
43856 	/*
43857 	 * The sequence ID is used by the driver for tracking multiple
43858 	 * commands. This ID is treated as opaque data by the firmware and
43859 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43860 	 */
43861 	uint16_t	seq_id;
43862 	/*
43863 	 * The target ID of the command:
43864 	 * * 0x0-0xFFF8 - The function ID
43865 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43866 	 * * 0xFFFD - Reserved for user-space HWRM interface
43867 	 * * 0xFFFF - HWRM
43868 	 */
43869 	uint16_t	target_id;
43870 	/*
43871 	 * A physical address pointer pointing to a host buffer that the
43872 	 * command's response data will be written. This can be either a host
43873 	 * physical address (HPA) or a guest physical address (GPA) and must
43874 	 * point to a physically contiguous block of memory.
43875 	 */
43876 	uint64_t	resp_addr;
43877 	/*
43878 	 * Identifies the SCHQ being configured. A schq_id of zero refers to
43879 	 * the default SCHQ.
43880 	 */
43881 	uint16_t	schq_id;
43882 	/*
43883 	 * This field is an 8 bit bitmap that indicates which TCs are enabled
43884 	 * in this SCHQ. Bit 0 represents traffic class 0 and bit 7 represents
43885 	 * traffic class 7.
43886 	 */
43887 	uint8_t	tc_enabled;
43888 	uint8_t	unused_0;
43889 	uint32_t	flags;
43890 	/* The tc_max_bw array and the max_bw parameters are valid */
43891 	#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_MAX_BW_ENABLED	UINT32_C(0x1)
43892 	/* The tc_bw_reservation array is valid */
43893 	#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_RESERVATION_ENABLED	UINT32_C(0x2)
43894 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43895 	uint32_t	max_bw_tc0;
43896 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43897 	uint32_t	max_bw_tc1;
43898 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43899 	uint32_t	max_bw_tc2;
43900 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43901 	uint32_t	max_bw_tc3;
43902 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43903 	uint32_t	max_bw_tc4;
43904 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43905 	uint32_t	max_bw_tc5;
43906 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43907 	uint32_t	max_bw_tc6;
43908 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
43909 	uint32_t	max_bw_tc7;
43910 	/*
43911 	 * Bandwidth reservation for the traffic class, specified in percent.
43912 	 * A value of zero signifies that traffic belonging to this class
43913 	 * shares the bandwidth reservation for the same traffic class of
43914 	 * the default SCHQ.
43915 	 */
43916 	uint32_t	tc_bw_reservation0;
43917 	/*
43918 	 * Bandwidth reservation for the traffic class, specified in percent.
43919 	 * A value of zero signifies that traffic belonging to this class
43920 	 * shares the bandwidth reservation for the same traffic class of
43921 	 * the default SCHQ.
43922 	 */
43923 	uint32_t	tc_bw_reservation1;
43924 	/*
43925 	 * Bandwidth reservation for the traffic class, specified in percent.
43926 	 * A value of zero signifies that traffic belonging to this class
43927 	 * shares the bandwidth reservation for the same traffic class of
43928 	 * the default SCHQ.
43929 	 */
43930 	uint32_t	tc_bw_reservation2;
43931 	/*
43932 	 * Bandwidth reservation for the traffic class, specified in percent.
43933 	 * A value of zero signifies that traffic belonging to this class
43934 	 * shares the bandwidth reservation for the same traffic class of
43935 	 * the default SCHQ.
43936 	 */
43937 	uint32_t	tc_bw_reservation3;
43938 	/*
43939 	 * Bandwidth reservation for the traffic class, specified in percent.
43940 	 * A value of zero signifies that traffic belonging to this class
43941 	 * shares the bandwidth reservation for the same traffic class of
43942 	 * the default SCHQ.
43943 	 */
43944 	uint32_t	tc_bw_reservation4;
43945 	/*
43946 	 * Bandwidth reservation for the traffic class, specified in percent.
43947 	 * A value of zero signifies that traffic belonging to this class
43948 	 * shares the bandwidth reservation for the same traffic class of
43949 	 * the default SCHQ.
43950 	 */
43951 	uint32_t	tc_bw_reservation5;
43952 	/*
43953 	 * Bandwidth reservation for the traffic class, specified in percent.
43954 	 * A value of zero signifies that traffic belonging to this class
43955 	 * shares the bandwidth reservation for the same traffic class of
43956 	 * the default SCHQ.
43957 	 */
43958 	uint32_t	tc_bw_reservation6;
43959 	/*
43960 	 * Bandwidth reservation for the traffic class, specified in percent.
43961 	 * A value of zero signifies that traffic belonging to this class
43962 	 * shares the bandwidth reservation for the same traffic class of
43963 	 * the default SCHQ.
43964 	 */
43965 	uint32_t	tc_bw_reservation7;
43966 	/*
43967 	 * Indicates the max bandwidth for all enabled traffic classes in
43968 	 * this SCHQ, specified in Mbps.
43969 	 */
43970 	uint32_t	max_bw;
43971 	uint8_t	unused_1[4];
43972 } hwrm_ring_schq_cfg_input_t, *phwrm_ring_schq_cfg_input_t;
43973 
43974 /* hwrm_ring_schq_cfg_output (size:128b/16B) */
43975 
43976 typedef struct hwrm_ring_schq_cfg_output {
43977 	/* The specific error status for the command. */
43978 	uint16_t	error_code;
43979 	/* The HWRM command request type. */
43980 	uint16_t	req_type;
43981 	/* The sequence ID from the original command. */
43982 	uint16_t	seq_id;
43983 	/* The length of the response data in number of bytes. */
43984 	uint16_t	resp_len;
43985 	uint8_t	unused_0[7];
43986 	/*
43987 	 * This field is used in Output records to indicate that the output
43988 	 * is completely written to RAM. This field should be read as '1'
43989 	 * to indicate that the output has been completely written. When
43990 	 * writing a command completion or response to an internal processor,
43991 	 * the order of writes has to be such that this field is written last.
43992 	 */
43993 	uint8_t	valid;
43994 } hwrm_ring_schq_cfg_output_t, *phwrm_ring_schq_cfg_output_t;
43995 
43996 /***********************
43997  * hwrm_ring_schq_free *
43998  ***********************/
43999 
44000 
44001 /* hwrm_ring_schq_free_input (size:192b/24B) */
44002 
44003 typedef struct hwrm_ring_schq_free_input {
44004 	/* The HWRM command request type. */
44005 	uint16_t	req_type;
44006 	/*
44007 	 * The completion ring to send the completion event on. This should
44008 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44009 	 */
44010 	uint16_t	cmpl_ring;
44011 	/*
44012 	 * The sequence ID is used by the driver for tracking multiple
44013 	 * commands. This ID is treated as opaque data by the firmware and
44014 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44015 	 */
44016 	uint16_t	seq_id;
44017 	/*
44018 	 * The target ID of the command:
44019 	 * * 0x0-0xFFF8 - The function ID
44020 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44021 	 * * 0xFFFD - Reserved for user-space HWRM interface
44022 	 * * 0xFFFF - HWRM
44023 	 */
44024 	uint16_t	target_id;
44025 	/*
44026 	 * A physical address pointer pointing to a host buffer that the
44027 	 * command's response data will be written. This can be either a host
44028 	 * physical address (HPA) or a guest physical address (GPA) and must
44029 	 * point to a physically contiguous block of memory.
44030 	 */
44031 	uint64_t	resp_addr;
44032 	/* Identifies the SCHQ being freed. */
44033 	uint16_t	schq_id;
44034 	uint8_t	unused_0[6];
44035 } hwrm_ring_schq_free_input_t, *phwrm_ring_schq_free_input_t;
44036 
44037 /* hwrm_ring_schq_free_output (size:128b/16B) */
44038 
44039 typedef struct hwrm_ring_schq_free_output {
44040 	/* The specific error status for the command. */
44041 	uint16_t	error_code;
44042 	/* The HWRM command request type. */
44043 	uint16_t	req_type;
44044 	/* The sequence ID from the original command. */
44045 	uint16_t	seq_id;
44046 	/* The length of the response data in number of bytes. */
44047 	uint16_t	resp_len;
44048 	uint8_t	unused_0[7];
44049 	/*
44050 	 * This field is used in Output records to indicate that the output
44051 	 * is completely written to RAM. This field should be read as '1'
44052 	 * to indicate that the output has been completely written. When
44053 	 * writing a command completion or response to an internal processor,
44054 	 * the order of writes has to be such that this field is written last.
44055 	 */
44056 	uint8_t	valid;
44057 } hwrm_ring_schq_free_output_t, *phwrm_ring_schq_free_output_t;
44058 
44059 /*
44060  * special reserved flow ID to identify per function default
44061  * flows for vSwitch offload
44062  */
44063 #define DEFAULT_FLOW_ID 0xFFFFFFFFUL
44064 /*
44065  * special reserved flow ID to identify per function RoCEv1
44066  * flows
44067  */
44068 #define ROCEV1_FLOW_ID 0xFFFFFFFEUL
44069 /*
44070  * special reserved flow ID to identify per function RoCEv2
44071  * flows
44072  */
44073 #define ROCEV2_FLOW_ID 0xFFFFFFFDUL
44074 /*
44075  * special reserved flow ID to identify per function RoCEv2
44076  * CNP flows
44077  */
44078 #define ROCEV2_CNP_FLOW_ID 0xFFFFFFFCUL
44079 
44080 /****************************
44081  * hwrm_cfa_l2_filter_alloc *
44082  ****************************/
44083 
44084 
44085 /* hwrm_cfa_l2_filter_alloc_input (size:768b/96B) */
44086 
44087 typedef struct hwrm_cfa_l2_filter_alloc_input {
44088 	/* The HWRM command request type. */
44089 	uint16_t	req_type;
44090 	/*
44091 	 * The completion ring to send the completion event on. This should
44092 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44093 	 */
44094 	uint16_t	cmpl_ring;
44095 	/*
44096 	 * The sequence ID is used by the driver for tracking multiple
44097 	 * commands. This ID is treated as opaque data by the firmware and
44098 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44099 	 */
44100 	uint16_t	seq_id;
44101 	/*
44102 	 * The target ID of the command:
44103 	 * * 0x0-0xFFF8 - The function ID
44104 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44105 	 * * 0xFFFD - Reserved for user-space HWRM interface
44106 	 * * 0xFFFF - HWRM
44107 	 */
44108 	uint16_t	target_id;
44109 	/*
44110 	 * A physical address pointer pointing to a host buffer that the
44111 	 * command's response data will be written. This can be either a host
44112 	 * physical address (HPA) or a guest physical address (GPA) and must
44113 	 * point to a physically contiguous block of memory.
44114 	 */
44115 	uint64_t	resp_addr;
44116 	uint32_t	flags;
44117 	/*
44118 	 * Enumeration denoting the RX, TX type of the resource.
44119 	 * This enumeration is used for resources that are similar for both
44120 	 * TX and RX paths of the chip.
44121 	 */
44122 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH		UINT32_C(0x1)
44123 	/* tx path */
44124 		#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_TX		UINT32_C(0x0)
44125 	/* rx path */
44126 		#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX		UINT32_C(0x1)
44127 		#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_LAST	HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX
44128 	/*
44129 	 * Setting of this flag indicates the applicability to the loopback
44130 	 * path.
44131 	 */
44132 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK	UINT32_C(0x2)
44133 	/*
44134 	 * Setting of this flag indicates drop action. If this flag is not
44135 	 * set, then it should be considered accept action.
44136 	 */
44137 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_DROP		UINT32_C(0x4)
44138 	/*
44139 	 * If this flag is set, all t_l2_* fields are invalid
44140 	 * and they should not be specified.
44141 	 * If this flag is set, then l2_* fields refer to
44142 	 * fields of outermost L2 header.
44143 	 */
44144 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST	UINT32_C(0x8)
44145 	/*
44146 	 * Enumeration denoting NO_ROCE_L2 to support old drivers.
44147 	 * New driver L2 for only L2 traffic, ROCE for roce and l2 traffic
44148 	 */
44149 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_MASK	UINT32_C(0x30)
44150 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_SFT	4
44151 	/* To support old drivers */
44152 		#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_NO_ROCE_L2  (UINT32_C(0x0) << 4)
44153 	/* Only L2 traffic */
44154 		#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_L2	(UINT32_C(0x1) << 4)
44155 	/* Roce & L2 traffic */
44156 		#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_ROCE	(UINT32_C(0x2) << 4)
44157 		#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_LAST	HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_ROCE
44158 	/*
44159 	 * Setting of this flag indicates that no XDP filter is created with
44160 	 * L2 filter.
44161 	 * 0 - legacy behavior, XDP filter is created with L2 filter
44162 	 * 1 - XDP filter won't be created with L2 filter
44163 	 */
44164 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_XDP_DISABLE	UINT32_C(0x40)
44165 	/*
44166 	 * Setting this flag to 1 indicate the L2 fields in this command
44167 	 * pertain to source fields. Setting this flag to 0 indicate the
44168 	 * L2 fields in this command pertain to the destination fields
44169 	 * and this is the default/legacy behavior.
44170 	 */
44171 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_SOURCE_VALID	UINT32_C(0x80)
44172 	uint32_t	enables;
44173 	/*
44174 	 * This bit must be '1' for the l2_addr field to be
44175 	 * configured.
44176 	 */
44177 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR		UINT32_C(0x1)
44178 	/*
44179 	 * This bit must be '1' for the l2_addr_mask field to be
44180 	 * configured.
44181 	 */
44182 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK	UINT32_C(0x2)
44183 	/*
44184 	 * This bit must be '1' for the l2_ovlan field to be
44185 	 * configured.
44186 	 */
44187 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN		UINT32_C(0x4)
44188 	/*
44189 	 * This bit must be '1' for the l2_ovlan_mask field to be
44190 	 * configured.
44191 	 */
44192 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK	UINT32_C(0x8)
44193 	/*
44194 	 * This bit must be '1' for the l2_ivlan field to be
44195 	 * configured.
44196 	 */
44197 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN		UINT32_C(0x10)
44198 	/*
44199 	 * This bit must be '1' for the l2_ivlan_mask field to be
44200 	 * configured.
44201 	 */
44202 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK	UINT32_C(0x20)
44203 	/*
44204 	 * This bit must be '1' for the t_l2_addr field to be
44205 	 * configured.
44206 	 */
44207 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR	UINT32_C(0x40)
44208 	/*
44209 	 * This bit must be '1' for the t_l2_addr_mask field to be
44210 	 * configured.
44211 	 */
44212 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR_MASK	UINT32_C(0x80)
44213 	/*
44214 	 * This bit must be '1' for the t_l2_ovlan field to be
44215 	 * configured.
44216 	 */
44217 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN	UINT32_C(0x100)
44218 	/*
44219 	 * This bit must be '1' for the t_l2_ovlan_mask field to be
44220 	 * configured.
44221 	 */
44222 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN_MASK	UINT32_C(0x200)
44223 	/*
44224 	 * This bit must be '1' for the t_l2_ivlan field to be
44225 	 * configured.
44226 	 */
44227 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN	UINT32_C(0x400)
44228 	/*
44229 	 * This bit must be '1' for the t_l2_ivlan_mask field to be
44230 	 * configured.
44231 	 */
44232 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN_MASK	UINT32_C(0x800)
44233 	/*
44234 	 * This bit must be '1' for the src_type field to be
44235 	 * configured.
44236 	 */
44237 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE		UINT32_C(0x1000)
44238 	/*
44239 	 * This bit must be '1' for the src_id field to be
44240 	 * configured.
44241 	 */
44242 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID		UINT32_C(0x2000)
44243 	/*
44244 	 * This bit must be '1' for the tunnel_type field to be
44245 	 * configured.
44246 	 */
44247 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE	UINT32_C(0x4000)
44248 	/*
44249 	 * This bit must be '1' for the dst_id field to be
44250 	 * configured.
44251 	 */
44252 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID		UINT32_C(0x8000)
44253 	/*
44254 	 * This bit must be '1' for the mirror_vnic_id field to be
44255 	 * configured.
44256 	 */
44257 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID	UINT32_C(0x10000)
44258 	/*
44259 	 * This bit must be '1' for the num_vlans field to be
44260 	 * configured.
44261 	 */
44262 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_NUM_VLANS	UINT32_C(0x20000)
44263 	/*
44264 	 * This bit must be '1' for the t_num_vlans field to be
44265 	 * configured.
44266 	 */
44267 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_NUM_VLANS	UINT32_C(0x40000)
44268 	/*
44269 	 * This value sets the match value for the L2 MAC address.
44270 	 * Destination MAC address for RX path.
44271 	 * Source MAC address for TX path.
44272 	 */
44273 	uint8_t	l2_addr[6];
44274 	/* This value sets the match value for the number of VLANs. */
44275 	uint8_t	num_vlans;
44276 	/*
44277 	 * This value sets the match value for the number of VLANs
44278 	 * in the tunnel headers.
44279 	 */
44280 	uint8_t	t_num_vlans;
44281 	/*
44282 	 * This value sets the mask value for the L2 address.
44283 	 * A value of 0 will mask the corresponding bit from
44284 	 * compare.
44285 	 */
44286 	uint8_t	l2_addr_mask[6];
44287 	/* This value sets VLAN ID value for outer VLAN. */
44288 	uint16_t	l2_ovlan;
44289 	/*
44290 	 * This value sets the mask value for the ovlan id.
44291 	 * A value of 0 will mask the corresponding bit from
44292 	 * compare.
44293 	 */
44294 	uint16_t	l2_ovlan_mask;
44295 	/* This value sets VLAN ID value for inner VLAN. */
44296 	uint16_t	l2_ivlan;
44297 	/*
44298 	 * This value sets the mask value for the ivlan id.
44299 	 * A value of 0 will mask the corresponding bit from
44300 	 * compare.
44301 	 */
44302 	uint16_t	l2_ivlan_mask;
44303 	uint8_t	unused_1[2];
44304 	/*
44305 	 * This value sets the match value for the tunnel
44306 	 * L2 MAC address.
44307 	 * Destination MAC address for RX path.
44308 	 * Source MAC address for TX path.
44309 	 */
44310 	uint8_t	t_l2_addr[6];
44311 	uint8_t	unused_2[2];
44312 	/*
44313 	 * This value sets the mask value for the tunnel L2
44314 	 * address.
44315 	 * A value of 0 will mask the corresponding bit from
44316 	 * compare.
44317 	 */
44318 	uint8_t	t_l2_addr_mask[6];
44319 	/* This value sets VLAN ID value for tunnel outer VLAN. */
44320 	uint16_t	t_l2_ovlan;
44321 	/*
44322 	 * This value sets the mask value for the tunnel ovlan id.
44323 	 * A value of 0 will mask the corresponding bit from
44324 	 * compare.
44325 	 */
44326 	uint16_t	t_l2_ovlan_mask;
44327 	/* This value sets VLAN ID value for tunnel inner VLAN. */
44328 	uint16_t	t_l2_ivlan;
44329 	/*
44330 	 * This value sets the mask value for the tunnel ivlan id.
44331 	 * A value of 0 will mask the corresponding bit from
44332 	 * compare.
44333 	 */
44334 	uint16_t	t_l2_ivlan_mask;
44335 	/* This value identifies the type of source of the packet. */
44336 	uint8_t	src_type;
44337 	/* Network port */
44338 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_NPORT UINT32_C(0x0)
44339 	/* Physical function */
44340 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_PF	UINT32_C(0x1)
44341 	/* Virtual function */
44342 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VF	UINT32_C(0x2)
44343 	/* Virtual NIC of a function */
44344 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VNIC  UINT32_C(0x3)
44345 	/* Embedded processor for CFA management */
44346 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_KONG  UINT32_C(0x4)
44347 	/* Embedded processor for OOB management */
44348 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_APE   UINT32_C(0x5)
44349 	/* Embedded processor for RoCE */
44350 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_BONO  UINT32_C(0x6)
44351 	/* Embedded processor for network proxy functions */
44352 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG  UINT32_C(0x7)
44353 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_LAST HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG
44354 	uint8_t	unused_3;
44355 	/*
44356 	 * This value is the id of the source.
44357 	 * For a network port, it represents port_id.
44358 	 * For a physical function, it represents fid.
44359 	 * For a virtual function, it represents vf_id.
44360 	 * For a vnic, it represents vnic_id.
44361 	 * For embedded processors, this id is not valid.
44362 	 *
44363 	 * Notes:
44364 	 * 1. The function ID is implied if it src_id is
44365 	 *	not provided for a src_type that is either
44366 	 */
44367 	uint32_t	src_id;
44368 	/* Tunnel Type. */
44369 	uint8_t	tunnel_type;
44370 	/* Non-tunnel */
44371 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
44372 	/* Virtual eXtensible Local Area Network (VXLAN) */
44373 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
44374 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
44375 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
44376 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
44377 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
44378 	/* IP in IP */
44379 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
44380 	/* Generic Network Virtualization Encapsulation (Geneve) */
44381 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
44382 	/* Multi-Protocol Label Switching (MPLS) */
44383 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
44384 	/* Stateless Transport Tunnel (STT) */
44385 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
44386 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
44387 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
44388 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
44389 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
44390 	/*
44391 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
44392 	 * datagram payload
44393 	 */
44394 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
44395 	/* Use fixed layer 2 ether type of 0xFFFF */
44396 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
44397 	/*
44398 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
44399 	 * (IPV6oVXLANGPE)
44400 	 */
44401 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
44402 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
44403 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
44404 	/* Any tunneled traffic */
44405 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
44406 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
44407 	uint8_t	unused_4;
44408 	/*
44409 	 * If set, this value shall represent the
44410 	 * Logical VNIC ID of the destination VNIC for the RX
44411 	 * path and network port id of the destination port for
44412 	 * the TX path.
44413 	 */
44414 	uint16_t	dst_id;
44415 	/*
44416 	 * Logical VNIC ID of the VNIC where traffic is
44417 	 * mirrored.
44418 	 */
44419 	uint16_t	mirror_vnic_id;
44420 	/*
44421 	 * This hint is provided to help in placing
44422 	 * the filter in the filter table.
44423 	 */
44424 	uint8_t	pri_hint;
44425 	/* No preference */
44426 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER	UINT32_C(0x0)
44427 	/* Above the given filter */
44428 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE_FILTER UINT32_C(0x1)
44429 	/* Below the given filter */
44430 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_BELOW_FILTER UINT32_C(0x2)
44431 	/* As high as possible */
44432 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MAX	UINT32_C(0x3)
44433 	/* As low as possible */
44434 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN	UINT32_C(0x4)
44435 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_LAST	HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN
44436 	uint8_t	unused_5;
44437 	uint32_t	unused_6;
44438 	/*
44439 	 * This is the ID of the filter that goes along with
44440 	 * the pri_hint.
44441 	 *
44442 	 * This field is valid only for the following values.
44443 	 * 1 - Above the given filter
44444 	 * 2 - Below the given filter
44445 	 */
44446 	uint64_t	l2_filter_id_hint;
44447 } hwrm_cfa_l2_filter_alloc_input_t, *phwrm_cfa_l2_filter_alloc_input_t;
44448 
44449 /* hwrm_cfa_l2_filter_alloc_output (size:192b/24B) */
44450 
44451 typedef struct hwrm_cfa_l2_filter_alloc_output {
44452 	/* The specific error status for the command. */
44453 	uint16_t	error_code;
44454 	/* The HWRM command request type. */
44455 	uint16_t	req_type;
44456 	/* The sequence ID from the original command. */
44457 	uint16_t	seq_id;
44458 	/* The length of the response data in number of bytes. */
44459 	uint16_t	resp_len;
44460 	/*
44461 	 * This value identifies a set of CFA data structures used for an L2
44462 	 * context.
44463 	 */
44464 	uint64_t	l2_filter_id;
44465 	/*
44466 	 * The flow id value in bit 0-29 is the actual ID of the flow
44467 	 * associated with this filter and it shall be used to match
44468 	 * and associate the flow identifier returned in completion
44469 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
44470 	 * shall indicate no valid flow id.
44471 	 */
44472 	uint32_t	flow_id;
44473 	/* Indicate the flow id value. */
44474 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK UINT32_C(0x3fffffff)
44475 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
44476 	/* Indicate type of the flow. */
44477 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE	UINT32_C(0x40000000)
44478 	/*
44479 	 * If this bit set to 0, then it indicates that the flow is
44480 	 * internal flow.
44481 	 */
44482 		#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT	(UINT32_C(0x0) << 30)
44483 	/*
44484 	 * If this bit is set to 1, then it indicates that the flow is
44485 	 * external flow.
44486 	 */
44487 		#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT	(UINT32_C(0x1) << 30)
44488 		#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST  HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
44489 	/* Indicate the flow direction. */
44490 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR	UINT32_C(0x80000000)
44491 	/* If this bit set to 0, then it indicates rx flow. */
44492 		#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX	(UINT32_C(0x0) << 31)
44493 	/* If this bit is set to 1, then it indicates that tx flow. */
44494 		#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX	(UINT32_C(0x1) << 31)
44495 		#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST   HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
44496 	uint8_t	unused_0[3];
44497 	/*
44498 	 * This field is used in Output records to indicate that the output
44499 	 * is completely written to RAM. This field should be read as '1'
44500 	 * to indicate that the output has been completely written.
44501 	 * When writing a command completion or response to an internal
44502 	 * processor, the order of writes has to be such that this field is
44503 	 * written last.
44504 	 */
44505 	uint8_t	valid;
44506 } hwrm_cfa_l2_filter_alloc_output_t, *phwrm_cfa_l2_filter_alloc_output_t;
44507 
44508 /***************************
44509  * hwrm_cfa_l2_filter_free *
44510  ***************************/
44511 
44512 
44513 /* hwrm_cfa_l2_filter_free_input (size:192b/24B) */
44514 
44515 typedef struct hwrm_cfa_l2_filter_free_input {
44516 	/* The HWRM command request type. */
44517 	uint16_t	req_type;
44518 	/*
44519 	 * The completion ring to send the completion event on. This should
44520 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44521 	 */
44522 	uint16_t	cmpl_ring;
44523 	/*
44524 	 * The sequence ID is used by the driver for tracking multiple
44525 	 * commands. This ID is treated as opaque data by the firmware and
44526 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44527 	 */
44528 	uint16_t	seq_id;
44529 	/*
44530 	 * The target ID of the command:
44531 	 * * 0x0-0xFFF8 - The function ID
44532 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44533 	 * * 0xFFFD - Reserved for user-space HWRM interface
44534 	 * * 0xFFFF - HWRM
44535 	 */
44536 	uint16_t	target_id;
44537 	/*
44538 	 * A physical address pointer pointing to a host buffer that the
44539 	 * command's response data will be written. This can be either a host
44540 	 * physical address (HPA) or a guest physical address (GPA) and must
44541 	 * point to a physically contiguous block of memory.
44542 	 */
44543 	uint64_t	resp_addr;
44544 	/*
44545 	 * This value identifies a set of CFA data structures used for an L2
44546 	 * context.
44547 	 */
44548 	uint64_t	l2_filter_id;
44549 } hwrm_cfa_l2_filter_free_input_t, *phwrm_cfa_l2_filter_free_input_t;
44550 
44551 /* hwrm_cfa_l2_filter_free_output (size:128b/16B) */
44552 
44553 typedef struct hwrm_cfa_l2_filter_free_output {
44554 	/* The specific error status for the command. */
44555 	uint16_t	error_code;
44556 	/* The HWRM command request type. */
44557 	uint16_t	req_type;
44558 	/* The sequence ID from the original command. */
44559 	uint16_t	seq_id;
44560 	/* The length of the response data in number of bytes. */
44561 	uint16_t	resp_len;
44562 	uint8_t	unused_0[7];
44563 	/*
44564 	 * This field is used in Output records to indicate that the output
44565 	 * is completely written to RAM. This field should be read as '1'
44566 	 * to indicate that the output has been completely written.
44567 	 * When writing a command completion or response to an internal
44568 	 * processor, the order of writes has to be such that this field is
44569 	 * written last.
44570 	 */
44571 	uint8_t	valid;
44572 } hwrm_cfa_l2_filter_free_output_t, *phwrm_cfa_l2_filter_free_output_t;
44573 
44574 /**************************
44575  * hwrm_cfa_l2_filter_cfg *
44576  **************************/
44577 
44578 
44579 /* hwrm_cfa_l2_filter_cfg_input (size:384b/48B) */
44580 
44581 typedef struct hwrm_cfa_l2_filter_cfg_input {
44582 	/* The HWRM command request type. */
44583 	uint16_t	req_type;
44584 	/*
44585 	 * The completion ring to send the completion event on. This should
44586 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44587 	 */
44588 	uint16_t	cmpl_ring;
44589 	/*
44590 	 * The sequence ID is used by the driver for tracking multiple
44591 	 * commands. This ID is treated as opaque data by the firmware and
44592 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44593 	 */
44594 	uint16_t	seq_id;
44595 	/*
44596 	 * The target ID of the command:
44597 	 * * 0x0-0xFFF8 - The function ID
44598 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44599 	 * * 0xFFFD - Reserved for user-space HWRM interface
44600 	 * * 0xFFFF - HWRM
44601 	 */
44602 	uint16_t	target_id;
44603 	/*
44604 	 * A physical address pointer pointing to a host buffer that the
44605 	 * command's response data will be written. This can be either a host
44606 	 * physical address (HPA) or a guest physical address (GPA) and must
44607 	 * point to a physically contiguous block of memory.
44608 	 */
44609 	uint64_t	resp_addr;
44610 	uint32_t	flags;
44611 	/*
44612 	 * Enumeration denoting the RX, TX type of the resource.
44613 	 * This enumeration is used for resources that are similar for both
44614 	 * TX and RX paths of the chip.
44615 	 */
44616 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH		UINT32_C(0x1)
44617 	/* tx path */
44618 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_TX		UINT32_C(0x0)
44619 	/* rx path */
44620 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX		UINT32_C(0x1)
44621 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_LAST		HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX
44622 	/*
44623 	 * Setting of this flag indicates drop action. If this flag is not
44624 	 * set, then it should be considered accept action.
44625 	 */
44626 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_DROP		UINT32_C(0x2)
44627 	/*
44628 	 * Enumeration denoting NO_ROCE_L2 to support old drivers.
44629 	 * New driver L2 for only L2 traffic, ROCE for roce and l2 traffic
44630 	 */
44631 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_MASK	UINT32_C(0xc)
44632 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_SFT	2
44633 	/* To support old drivers */
44634 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_NO_ROCE_L2	(UINT32_C(0x0) << 2)
44635 	/* Only L2 traffic */
44636 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_L2		(UINT32_C(0x1) << 2)
44637 	/* Roce & L2 traffic */
44638 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_ROCE	(UINT32_C(0x2) << 2)
44639 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_LAST	HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_ROCE
44640 	/*
44641 	 * Enumeration denoting how the L2 Context TCAM remap operation is
44642 	 * updated.
44643 	 */
44644 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_MASK	UINT32_C(0x30)
44645 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_SFT	4
44646 	/* No change to remap opcode */
44647 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_NO_UPDATE	(UINT32_C(0x0) << 4)
44648 	/* Bypass CFA Lookup */
44649 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_BYPASS_LKUP  (UINT32_C(0x1) << 4)
44650 	/* Enable CFA Lookup */
44651 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_ENABLE_LKUP  (UINT32_C(0x2) << 4)
44652 		#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_LAST	HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_ENABLE_LKUP
44653 	uint32_t	enables;
44654 	/*
44655 	 * This bit must be '1' for the dst_id field to be
44656 	 * configured.
44657 	 */
44658 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_DST_ID		UINT32_C(0x1)
44659 	/*
44660 	 * This bit must be '1' for the new_mirror_vnic_id field to be
44661 	 * configured.
44662 	 */
44663 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID	UINT32_C(0x2)
44664 	/*
44665 	 * This bit must be '1' for the prof_func field to be configured in
44666 	 * the remap entry.
44667 	 */
44668 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_PROF_FUNC		UINT32_C(0x4)
44669 	/*
44670 	 * This bit must be '1' for the l2_context_id field to be configured
44671 	 * in the remap entry.
44672 	 */
44673 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_L2_CONTEXT_ID	UINT32_C(0x8)
44674 	/*
44675 	 * This value identifies a set of CFA data structures used for an L2
44676 	 * context.
44677 	 */
44678 	uint64_t	l2_filter_id;
44679 	/*
44680 	 * If set, this value shall represent the
44681 	 * Logical VNIC ID of the destination VNIC for the RX
44682 	 * path and network port id of the destination port for
44683 	 * the TX path.
44684 	 */
44685 	uint32_t	dst_id;
44686 	/*
44687 	 * New Logical VNIC ID of the VNIC where traffic is
44688 	 * mirrored.
44689 	 */
44690 	uint32_t	new_mirror_vnic_id;
44691 	/*
44692 	 * Profile function value to be programmed into the L2 context entry's
44693 	 * remap. This will be used by the host application to program the CFA
44694 	 * Profile TCAM entry for further classification.
44695 	 */
44696 	uint32_t	prof_func;
44697 	/*
44698 	 * L2 context ID value to be programmed into the L2 context entry's
44699 	 * remap. This will be used by the host application to program the CFA
44700 	 * Lookup entry for further classification.
44701 	 */
44702 	uint32_t	l2_context_id;
44703 } hwrm_cfa_l2_filter_cfg_input_t, *phwrm_cfa_l2_filter_cfg_input_t;
44704 
44705 /* hwrm_cfa_l2_filter_cfg_output (size:128b/16B) */
44706 
44707 typedef struct hwrm_cfa_l2_filter_cfg_output {
44708 	/* The specific error status for the command. */
44709 	uint16_t	error_code;
44710 	/* The HWRM command request type. */
44711 	uint16_t	req_type;
44712 	/* The sequence ID from the original command. */
44713 	uint16_t	seq_id;
44714 	/* The length of the response data in number of bytes. */
44715 	uint16_t	resp_len;
44716 	uint8_t	unused_0[7];
44717 	/*
44718 	 * This field is used in Output records to indicate that the output
44719 	 * is completely written to RAM. This field should be read as '1'
44720 	 * to indicate that the output has been completely written.
44721 	 * When writing a command completion or response to an internal
44722 	 * processor, the order of writes has to be such that this field is
44723 	 * written last.
44724 	 */
44725 	uint8_t	valid;
44726 } hwrm_cfa_l2_filter_cfg_output_t, *phwrm_cfa_l2_filter_cfg_output_t;
44727 
44728 /***************************
44729  * hwrm_cfa_l2_set_rx_mask *
44730  ***************************/
44731 
44732 
44733 /* hwrm_cfa_l2_set_rx_mask_input (size:448b/56B) */
44734 
44735 typedef struct hwrm_cfa_l2_set_rx_mask_input {
44736 	/* The HWRM command request type. */
44737 	uint16_t	req_type;
44738 	/*
44739 	 * The completion ring to send the completion event on. This should
44740 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44741 	 */
44742 	uint16_t	cmpl_ring;
44743 	/*
44744 	 * The sequence ID is used by the driver for tracking multiple
44745 	 * commands. This ID is treated as opaque data by the firmware and
44746 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44747 	 */
44748 	uint16_t	seq_id;
44749 	/*
44750 	 * The target ID of the command:
44751 	 * * 0x0-0xFFF8 - The function ID
44752 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44753 	 * * 0xFFFD - Reserved for user-space HWRM interface
44754 	 * * 0xFFFF - HWRM
44755 	 */
44756 	uint16_t	target_id;
44757 	/*
44758 	 * A physical address pointer pointing to a host buffer that the
44759 	 * command's response data will be written. This can be either a host
44760 	 * physical address (HPA) or a guest physical address (GPA) and must
44761 	 * point to a physically contiguous block of memory.
44762 	 */
44763 	uint64_t	resp_addr;
44764 	/* VNIC ID */
44765 	uint32_t	vnic_id;
44766 	uint32_t	mask;
44767 	/*
44768 	 * When this bit is '1', the function is requested to accept
44769 	 * multi-cast packets specified by the multicast addr table.
44770 	 */
44771 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST		UINT32_C(0x2)
44772 	/*
44773 	 * When this bit is '1', the function is requested to accept
44774 	 * all multi-cast packets.
44775 	 */
44776 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST	UINT32_C(0x4)
44777 	/*
44778 	 * When this bit is '1', the function is requested to accept
44779 	 * broadcast packets.
44780 	 */
44781 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST		UINT32_C(0x8)
44782 	/*
44783 	 * When this bit is '1', the function is requested to be
44784 	 * put in the promiscuous mode.
44785 	 *
44786 	 * The HWRM should accept any function to set up
44787 	 * promiscuous mode.
44788 	 *
44789 	 * The HWRM shall follow the semantics below for the
44790 	 * promiscuous mode support.
44791 	 * # When partitioning is not enabled on a port
44792 	 * (i.e. single PF on the port), then the PF shall
44793 	 * be allowed to be in the promiscuous mode. When the
44794 	 * PF is in the promiscuous mode, then it shall
44795 	 * receive all host bound traffic on that port.
44796 	 * # When partitioning is enabled on a port
44797 	 * (i.e. multiple PFs per port) and a PF on that
44798 	 * port is in the promiscuous mode, then the PF
44799 	 * receives all traffic within that partition as
44800 	 * identified by a unique identifier for the
44801 	 * PF (e.g. S-Tag). If a unique outer VLAN
44802 	 * for the PF is specified, then the setting of
44803 	 * promiscuous mode on that PF shall result in the
44804 	 * PF receiving all host bound traffic with matching
44805 	 * outer VLAN.
44806 	 * # A VF shall can be set in the promiscuous mode.
44807 	 * In the promiscuous mode, the VF does not receive any
44808 	 * traffic unless a unique outer VLAN for the
44809 	 * VF is specified. If a unique outer VLAN
44810 	 * for the VF is specified, then the setting of
44811 	 * promiscuous mode on that VF shall result in the
44812 	 * VF receiving all host bound traffic with the
44813 	 * matching outer VLAN.
44814 	 * # The HWRM shall allow the setting of promiscuous
44815 	 * mode on a function independently from the
44816 	 * promiscuous mode settings on other functions.
44817 	 */
44818 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS	UINT32_C(0x10)
44819 	/*
44820 	 * If this flag is set, the corresponding RX
44821 	 * filters shall be set up to cover multicast/broadcast
44822 	 * filters for the outermost Layer 2 destination MAC
44823 	 * address field.
44824 	 */
44825 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_OUTERMOST	UINT32_C(0x20)
44826 	/*
44827 	 * If this flag is set, the corresponding RX
44828 	 * filters shall be set up to cover multicast/broadcast
44829 	 * filters for the VLAN-tagged packets that match the
44830 	 * TPID and VID fields of VLAN tags in the VLAN tag
44831 	 * table specified in this command.
44832 	 */
44833 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY		UINT32_C(0x40)
44834 	/*
44835 	 * If this flag is set, the corresponding RX
44836 	 * filters shall be set up to cover multicast/broadcast
44837 	 * filters for non-VLAN tagged packets and VLAN-tagged
44838 	 * packets that match the TPID and VID fields of VLAN
44839 	 * tags in the VLAN tag table specified in this command.
44840 	 */
44841 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN	UINT32_C(0x80)
44842 	/*
44843 	 * If this flag is set, the corresponding RX
44844 	 * filters shall be set up to cover multicast/broadcast
44845 	 * filters for non-VLAN tagged packets and VLAN-tagged
44846 	 * packets matching any VLAN tag.
44847 	 *
44848 	 * If this flag is set, then the HWRM shall ignore
44849 	 * VLAN tags specified in vlan_tag_tbl.
44850 	 *
44851 	 * If none of vlanonly, vlan_nonvlan, and anyvlan_nonvlan
44852 	 * flags is set, then the HWRM shall ignore
44853 	 * VLAN tags specified in vlan_tag_tbl.
44854 	 *
44855 	 * The HWRM client shall set at most one flag out of
44856 	 * vlanonly, vlan_nonvlan, and anyvlan_nonvlan.
44857 	 */
44858 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN	UINT32_C(0x100)
44859 	/* This is the address for mcast address tbl. */
44860 	uint64_t	mc_tbl_addr;
44861 	/*
44862 	 * This value indicates how many entries in mc_tbl are valid.
44863 	 * Each entry is 6 bytes.
44864 	 */
44865 	uint32_t	num_mc_entries;
44866 	uint8_t	unused_0[4];
44867 	/*
44868 	 * This is the address for VLAN tag table.
44869 	 * Each VLAN entry in the table is 4 bytes of a VLAN tag
44870 	 * including TPID, PCP, DEI, and VID fields in network byte
44871 	 * order.
44872 	 */
44873 	uint64_t	vlan_tag_tbl_addr;
44874 	/*
44875 	 * This value indicates how many entries in vlan_tag_tbl are
44876 	 * valid. Each entry is 4 bytes.
44877 	 */
44878 	uint32_t	num_vlan_tags;
44879 	uint8_t	unused_1[4];
44880 } hwrm_cfa_l2_set_rx_mask_input_t, *phwrm_cfa_l2_set_rx_mask_input_t;
44881 
44882 /* hwrm_cfa_l2_set_rx_mask_output (size:128b/16B) */
44883 
44884 typedef struct hwrm_cfa_l2_set_rx_mask_output {
44885 	/* The specific error status for the command. */
44886 	uint16_t	error_code;
44887 	/* The HWRM command request type. */
44888 	uint16_t	req_type;
44889 	/* The sequence ID from the original command. */
44890 	uint16_t	seq_id;
44891 	/* The length of the response data in number of bytes. */
44892 	uint16_t	resp_len;
44893 	uint8_t	unused_0[7];
44894 	/*
44895 	 * This field is used in Output records to indicate that the output
44896 	 * is completely written to RAM. This field should be read as '1'
44897 	 * to indicate that the output has been completely written.
44898 	 * When writing a command completion or response to an internal
44899 	 * processor, the order of writes has to be such that this field is
44900 	 * written last.
44901 	 */
44902 	uint8_t	valid;
44903 } hwrm_cfa_l2_set_rx_mask_output_t, *phwrm_cfa_l2_set_rx_mask_output_t;
44904 
44905 /* hwrm_cfa_l2_set_rx_mask_cmd_err (size:64b/8B) */
44906 
44907 typedef struct hwrm_cfa_l2_set_rx_mask_cmd_err {
44908 	/*
44909 	 * command specific error codes that goes to
44910 	 * the cmd_err field in Common HWRM Error Response.
44911 	 */
44912 	uint8_t	code;
44913 	/* Unknown error */
44914 	#define HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_UNKNOWN			UINT32_C(0x0)
44915 	/* Unable to complete operation due to conflict with Ntuple Filter */
44916 	#define HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_NTUPLE_FILTER_CONFLICT_ERR UINT32_C(0x1)
44917 	#define HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_LAST			HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_NTUPLE_FILTER_CONFLICT_ERR
44918 	uint8_t	unused_0[7];
44919 } hwrm_cfa_l2_set_rx_mask_cmd_err_t, *phwrm_cfa_l2_set_rx_mask_cmd_err_t;
44920 
44921 /*******************************
44922  * hwrm_cfa_vlan_antispoof_cfg *
44923  *******************************/
44924 
44925 
44926 /* hwrm_cfa_vlan_antispoof_cfg_input (size:256b/32B) */
44927 
44928 typedef struct hwrm_cfa_vlan_antispoof_cfg_input {
44929 	/* The HWRM command request type. */
44930 	uint16_t	req_type;
44931 	/*
44932 	 * The completion ring to send the completion event on. This should
44933 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44934 	 */
44935 	uint16_t	cmpl_ring;
44936 	/*
44937 	 * The sequence ID is used by the driver for tracking multiple
44938 	 * commands. This ID is treated as opaque data by the firmware and
44939 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44940 	 */
44941 	uint16_t	seq_id;
44942 	/*
44943 	 * The target ID of the command:
44944 	 * * 0x0-0xFFF8 - The function ID
44945 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44946 	 * * 0xFFFD - Reserved for user-space HWRM interface
44947 	 * * 0xFFFF - HWRM
44948 	 */
44949 	uint16_t	target_id;
44950 	/*
44951 	 * A physical address pointer pointing to a host buffer that the
44952 	 * command's response data will be written. This can be either a host
44953 	 * physical address (HPA) or a guest physical address (GPA) and must
44954 	 * point to a physically contiguous block of memory.
44955 	 */
44956 	uint64_t	resp_addr;
44957 	/*
44958 	 * Function ID of the function that is being configured.
44959 	 * Only valid for a VF FID configured by the PF.
44960 	 */
44961 	uint16_t	fid;
44962 	uint8_t	unused_0[2];
44963 	/* Number of VLAN entries in the vlan_tag_mask_tbl. */
44964 	uint32_t	num_vlan_entries;
44965 	/*
44966 	 * The vlan_tag_mask_tbl_addr is the DMA address of the VLAN
44967 	 * antispoof table. Each table entry contains the 16-bit TPID
44968 	 * (0x8100 or 0x88a8 only), 16-bit VLAN ID, and a 16-bit mask,
44969 	 * all in network order to match hwrm_cfa_l2_set_rx_mask.
44970 	 * For an individual VLAN entry, the mask value should be 0xfff
44971 	 * for the 12-bit VLAN ID.
44972 	 */
44973 	uint64_t	vlan_tag_mask_tbl_addr;
44974 } hwrm_cfa_vlan_antispoof_cfg_input_t, *phwrm_cfa_vlan_antispoof_cfg_input_t;
44975 
44976 /* hwrm_cfa_vlan_antispoof_cfg_output (size:128b/16B) */
44977 
44978 typedef struct hwrm_cfa_vlan_antispoof_cfg_output {
44979 	/* The specific error status for the command. */
44980 	uint16_t	error_code;
44981 	/* The HWRM command request type. */
44982 	uint16_t	req_type;
44983 	/* The sequence ID from the original command. */
44984 	uint16_t	seq_id;
44985 	/* The length of the response data in number of bytes. */
44986 	uint16_t	resp_len;
44987 	uint8_t	unused_0[7];
44988 	/*
44989 	 * This field is used in Output records to indicate that the output
44990 	 * is completely written to RAM. This field should be read as '1'
44991 	 * to indicate that the output has been completely written.
44992 	 * When writing a command completion or response to an internal
44993 	 * processor, the order of writes has to be such that this field is
44994 	 * written last.
44995 	 */
44996 	uint8_t	valid;
44997 } hwrm_cfa_vlan_antispoof_cfg_output_t, *phwrm_cfa_vlan_antispoof_cfg_output_t;
44998 
44999 /********************************
45000  * hwrm_cfa_vlan_antispoof_qcfg *
45001  ********************************/
45002 
45003 
45004 /* hwrm_cfa_vlan_antispoof_qcfg_input (size:256b/32B) */
45005 
45006 typedef struct hwrm_cfa_vlan_antispoof_qcfg_input {
45007 	/* The HWRM command request type. */
45008 	uint16_t	req_type;
45009 	/*
45010 	 * The completion ring to send the completion event on. This should
45011 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45012 	 */
45013 	uint16_t	cmpl_ring;
45014 	/*
45015 	 * The sequence ID is used by the driver for tracking multiple
45016 	 * commands. This ID is treated as opaque data by the firmware and
45017 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45018 	 */
45019 	uint16_t	seq_id;
45020 	/*
45021 	 * The target ID of the command:
45022 	 * * 0x0-0xFFF8 - The function ID
45023 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45024 	 * * 0xFFFD - Reserved for user-space HWRM interface
45025 	 * * 0xFFFF - HWRM
45026 	 */
45027 	uint16_t	target_id;
45028 	/*
45029 	 * A physical address pointer pointing to a host buffer that the
45030 	 * command's response data will be written. This can be either a host
45031 	 * physical address (HPA) or a guest physical address (GPA) and must
45032 	 * point to a physically contiguous block of memory.
45033 	 */
45034 	uint64_t	resp_addr;
45035 	/*
45036 	 * Function ID of the function that is being queried.
45037 	 * Only valid for a VF FID queried by the PF.
45038 	 */
45039 	uint16_t	fid;
45040 	uint8_t	unused_0[2];
45041 	/*
45042 	 * Maximum number of VLAN entries the firmware is allowed to DMA
45043 	 * to vlan_tag_mask_tbl.
45044 	 */
45045 	uint32_t	max_vlan_entries;
45046 	/*
45047 	 * The vlan_tag_mask_tbl_addr is the DMA address of the VLAN
45048 	 * antispoof table to which firmware will DMA to. Each table
45049 	 * entry will contain the 16-bit TPID (0x8100 or 0x88a8 only),
45050 	 * 16-bit VLAN ID, and a 16-bit mask, all in network order to
45051 	 * match hwrm_cfa_l2_set_rx_mask. For an individual VLAN entry,
45052 	 * the mask value should be 0xfff for the 12-bit VLAN ID.
45053 	 */
45054 	uint64_t	vlan_tag_mask_tbl_addr;
45055 } hwrm_cfa_vlan_antispoof_qcfg_input_t, *phwrm_cfa_vlan_antispoof_qcfg_input_t;
45056 
45057 /* hwrm_cfa_vlan_antispoof_qcfg_output (size:128b/16B) */
45058 
45059 typedef struct hwrm_cfa_vlan_antispoof_qcfg_output {
45060 	/* The specific error status for the command. */
45061 	uint16_t	error_code;
45062 	/* The HWRM command request type. */
45063 	uint16_t	req_type;
45064 	/* The sequence ID from the original command. */
45065 	uint16_t	seq_id;
45066 	/* The length of the response data in number of bytes. */
45067 	uint16_t	resp_len;
45068 	/* Number of valid entries DMAd by firmware to vlan_tag_mask_tbl. */
45069 	uint32_t	num_vlan_entries;
45070 	uint8_t	unused_0[3];
45071 	/*
45072 	 * This field is used in Output records to indicate that the output
45073 	 * is completely written to RAM. This field should be read as '1'
45074 	 * to indicate that the output has been completely written.
45075 	 * When writing a command completion or response to an internal
45076 	 * processor, the order of writes has to be such that this field is
45077 	 * written last.
45078 	 */
45079 	uint8_t	valid;
45080 } hwrm_cfa_vlan_antispoof_qcfg_output_t, *phwrm_cfa_vlan_antispoof_qcfg_output_t;
45081 
45082 /********************************
45083  * hwrm_cfa_tunnel_filter_alloc *
45084  ********************************/
45085 
45086 
45087 /* hwrm_cfa_tunnel_filter_alloc_input (size:704b/88B) */
45088 
45089 typedef struct hwrm_cfa_tunnel_filter_alloc_input {
45090 	/* The HWRM command request type. */
45091 	uint16_t	req_type;
45092 	/*
45093 	 * The completion ring to send the completion event on. This should
45094 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45095 	 */
45096 	uint16_t	cmpl_ring;
45097 	/*
45098 	 * The sequence ID is used by the driver for tracking multiple
45099 	 * commands. This ID is treated as opaque data by the firmware and
45100 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45101 	 */
45102 	uint16_t	seq_id;
45103 	/*
45104 	 * The target ID of the command:
45105 	 * * 0x0-0xFFF8 - The function ID
45106 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45107 	 * * 0xFFFD - Reserved for user-space HWRM interface
45108 	 * * 0xFFFF - HWRM
45109 	 */
45110 	uint16_t	target_id;
45111 	/*
45112 	 * A physical address pointer pointing to a host buffer that the
45113 	 * command's response data will be written. This can be either a host
45114 	 * physical address (HPA) or a guest physical address (GPA) and must
45115 	 * point to a physically contiguous block of memory.
45116 	 */
45117 	uint64_t	resp_addr;
45118 	uint32_t	flags;
45119 	/*
45120 	 * Setting of this flag indicates the applicability to the loopback
45121 	 * path.
45122 	 */
45123 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK	UINT32_C(0x1)
45124 	uint32_t	enables;
45125 	/*
45126 	 * This bit must be '1' for the l2_filter_id field to be
45127 	 * configured.
45128 	 */
45129 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID	UINT32_C(0x1)
45130 	/*
45131 	 * This bit must be '1' for the l2_addr field to be
45132 	 * configured.
45133 	 */
45134 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR		UINT32_C(0x2)
45135 	/*
45136 	 * This bit must be '1' for the l2_ivlan field to be
45137 	 * configured.
45138 	 */
45139 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN	UINT32_C(0x4)
45140 	/*
45141 	 * This bit must be '1' for the l3_addr field to be
45142 	 * configured.
45143 	 */
45144 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR		UINT32_C(0x8)
45145 	/*
45146 	 * This bit must be '1' for the l3_addr_type field to be
45147 	 * configured.
45148 	 */
45149 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR_TYPE	UINT32_C(0x10)
45150 	/*
45151 	 * This bit must be '1' for the t_l3_addr_type field to be
45152 	 * configured.
45153 	 */
45154 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR_TYPE	UINT32_C(0x20)
45155 	/*
45156 	 * This bit must be '1' for the t_l3_addr field to be
45157 	 * configured.
45158 	 */
45159 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR	UINT32_C(0x40)
45160 	/*
45161 	 * This bit must be '1' for the tunnel_type field to be
45162 	 * configured.
45163 	 */
45164 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE	UINT32_C(0x80)
45165 	/*
45166 	 * This bit must be '1' for the vni field to be
45167 	 * configured.
45168 	 */
45169 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_VNI		UINT32_C(0x100)
45170 	/*
45171 	 * This bit must be '1' for the dst_vnic_id field to be
45172 	 * configured.
45173 	 */
45174 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_DST_VNIC_ID	UINT32_C(0x200)
45175 	/*
45176 	 * This bit must be '1' for the mirror_vnic_id field to be
45177 	 * configured.
45178 	 */
45179 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID	UINT32_C(0x400)
45180 	/*
45181 	 * This value identifies a set of CFA data structures used for an L2
45182 	 * context.
45183 	 */
45184 	uint64_t	l2_filter_id;
45185 	/*
45186 	 * This value sets the match value for the inner L2
45187 	 * MAC address.
45188 	 * Destination MAC address for RX path.
45189 	 * Source MAC address for TX path.
45190 	 */
45191 	uint8_t	l2_addr[6];
45192 	/*
45193 	 * This value sets VLAN ID value for inner VLAN.
45194 	 * Only 12-bits of VLAN ID are used in setting the filter.
45195 	 */
45196 	uint16_t	l2_ivlan;
45197 	/*
45198 	 * The value of inner destination IP address to be used in filtering.
45199 	 * For IPv4, first four bytes represent the IP address.
45200 	 */
45201 	uint32_t	l3_addr[4];
45202 	/*
45203 	 * The value of tunnel destination IP address to be used in filtering.
45204 	 * For IPv4, first four bytes represent the IP address.
45205 	 */
45206 	uint32_t	t_l3_addr[4];
45207 	/*
45208 	 * This value indicates the type of inner IP address.
45209 	 * 4 - IPv4
45210 	 * 6 - IPv6
45211 	 * All others are invalid.
45212 	 */
45213 	uint8_t	l3_addr_type;
45214 	/*
45215 	 * This value indicates the type of tunnel IP address.
45216 	 * 4 - IPv4
45217 	 * 6 - IPv6
45218 	 * All others are invalid.
45219 	 */
45220 	uint8_t	t_l3_addr_type;
45221 	/* Tunnel Type. */
45222 	uint8_t	tunnel_type;
45223 	/* Non-tunnel */
45224 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
45225 	/* Virtual eXtensible Local Area Network (VXLAN) */
45226 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
45227 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
45228 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
45229 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
45230 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
45231 	/* IP in IP */
45232 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
45233 	/* Generic Network Virtualization Encapsulation (Geneve) */
45234 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
45235 	/* Multi-Protocol Label Switching (MPLS) */
45236 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
45237 	/* Stateless Transport Tunnel (STT) */
45238 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
45239 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
45240 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
45241 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
45242 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
45243 	/*
45244 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
45245 	 * datagram payload
45246 	 */
45247 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
45248 	/* Use fixed layer 2 ether type of 0xFFFF */
45249 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
45250 	/*
45251 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
45252 	 * (IPV6oVXLANGPE)
45253 	 */
45254 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
45255 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
45256 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
45257 	/* Any tunneled traffic */
45258 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
45259 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
45260 	/*
45261 	 * tunnel_flags allows the user to indicate the tunnel tag detection
45262 	 * for the tunnel type specified in tunnel_type.
45263 	 */
45264 	uint8_t	tunnel_flags;
45265 	/*
45266 	 * If the tunnel_type is geneve, then this bit indicates if we
45267 	 * need to match the geneve OAM packet.
45268 	 * If the tunnel_type is nvgre or gre, then this bit indicates if
45269 	 * we need to detect checksum present bit in geneve header.
45270 	 * If the tunnel_type is mpls, then this bit indicates if we need
45271 	 * to match mpls packet with explicit IPV4/IPV6 null header.
45272 	 */
45273 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_OAM_CHECKSUM_EXPLHDR	UINT32_C(0x1)
45274 	/*
45275 	 * If the tunnel_type is geneve, then this bit indicates if we
45276 	 * need to detect the critical option bit set in the oam packet.
45277 	 * If the tunnel_type is nvgre or gre, then this bit indicates
45278 	 * if we need to match nvgre packets with key present bit set in
45279 	 * gre header.
45280 	 * If the tunnel_type is mpls, then this bit indicates if we
45281 	 * need to match mpls packet with S bit from inner/second label.
45282 	 */
45283 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_CRITICAL_OPT_S1	UINT32_C(0x2)
45284 	/*
45285 	 * If the tunnel_type is geneve, then this bit indicates if we
45286 	 * need to match geneve packet with extended header bit set in
45287 	 * geneve header.
45288 	 * If the tunnel_type is nvgre or gre, then this bit indicates
45289 	 * if we need to match nvgre packets with sequence number
45290 	 * present bit set in gre header.
45291 	 * If the tunnel_type is mpls, then this bit indicates if we
45292 	 * need to match mpls packet with S bit from out/first label.
45293 	 */
45294 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_EXTHDR_SEQNUM_S0	UINT32_C(0x4)
45295 	/*
45296 	 * Virtual Network Identifier (VNI). Only valid with
45297 	 * tunnel_types VXLAN, NVGRE, and Geneve.
45298 	 * Only lower 24-bits of VNI field are used
45299 	 * in setting up the filter.
45300 	 */
45301 	uint32_t	vni;
45302 	/* Logical VNIC ID of the destination VNIC. */
45303 	uint32_t	dst_vnic_id;
45304 	/*
45305 	 * Logical VNIC ID of the VNIC where traffic is
45306 	 * mirrored.
45307 	 */
45308 	uint32_t	mirror_vnic_id;
45309 } hwrm_cfa_tunnel_filter_alloc_input_t, *phwrm_cfa_tunnel_filter_alloc_input_t;
45310 
45311 /* hwrm_cfa_tunnel_filter_alloc_output (size:192b/24B) */
45312 
45313 typedef struct hwrm_cfa_tunnel_filter_alloc_output {
45314 	/* The specific error status for the command. */
45315 	uint16_t	error_code;
45316 	/* The HWRM command request type. */
45317 	uint16_t	req_type;
45318 	/* The sequence ID from the original command. */
45319 	uint16_t	seq_id;
45320 	/* The length of the response data in number of bytes. */
45321 	uint16_t	resp_len;
45322 	/* This value is an opaque id into CFA data structures. */
45323 	uint64_t	tunnel_filter_id;
45324 	/*
45325 	 * The flow id value in bit 0-29 is the actual ID of the flow
45326 	 * associated with this filter and it shall be used to match
45327 	 * and associate the flow identifier returned in completion
45328 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
45329 	 * shall indicate no valid flow id.
45330 	 */
45331 	uint32_t	flow_id;
45332 	/* Indicate the flow id value. */
45333 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK UINT32_C(0x3fffffff)
45334 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
45335 	/* Indicate type of the flow. */
45336 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE	UINT32_C(0x40000000)
45337 	/*
45338 	 * If this bit set to 0, then it indicates that the flow is
45339 	 * internal flow.
45340 	 */
45341 		#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT	(UINT32_C(0x0) << 30)
45342 	/*
45343 	 * If this bit is set to 1, then it indicates that the flow is
45344 	 * external flow.
45345 	 */
45346 		#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT	(UINT32_C(0x1) << 30)
45347 		#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST  HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
45348 	/* Indicate the flow direction. */
45349 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR	UINT32_C(0x80000000)
45350 	/* If this bit set to 0, then it indicates rx flow. */
45351 		#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX	(UINT32_C(0x0) << 31)
45352 	/* If this bit is set to 1, then it indicates that tx flow. */
45353 		#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX	(UINT32_C(0x1) << 31)
45354 		#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST   HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
45355 	uint8_t	unused_0[3];
45356 	/*
45357 	 * This field is used in Output records to indicate that the output
45358 	 * is completely written to RAM. This field should be read as '1'
45359 	 * to indicate that the output has been completely written.
45360 	 * When writing a command completion or response to an internal
45361 	 * processor, the order of writes has to be such that this field is
45362 	 * written last.
45363 	 */
45364 	uint8_t	valid;
45365 } hwrm_cfa_tunnel_filter_alloc_output_t, *phwrm_cfa_tunnel_filter_alloc_output_t;
45366 
45367 /*******************************
45368  * hwrm_cfa_tunnel_filter_free *
45369  *******************************/
45370 
45371 
45372 /* hwrm_cfa_tunnel_filter_free_input (size:192b/24B) */
45373 
45374 typedef struct hwrm_cfa_tunnel_filter_free_input {
45375 	/* The HWRM command request type. */
45376 	uint16_t	req_type;
45377 	/*
45378 	 * The completion ring to send the completion event on. This should
45379 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45380 	 */
45381 	uint16_t	cmpl_ring;
45382 	/*
45383 	 * The sequence ID is used by the driver for tracking multiple
45384 	 * commands. This ID is treated as opaque data by the firmware and
45385 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45386 	 */
45387 	uint16_t	seq_id;
45388 	/*
45389 	 * The target ID of the command:
45390 	 * * 0x0-0xFFF8 - The function ID
45391 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45392 	 * * 0xFFFD - Reserved for user-space HWRM interface
45393 	 * * 0xFFFF - HWRM
45394 	 */
45395 	uint16_t	target_id;
45396 	/*
45397 	 * A physical address pointer pointing to a host buffer that the
45398 	 * command's response data will be written. This can be either a host
45399 	 * physical address (HPA) or a guest physical address (GPA) and must
45400 	 * point to a physically contiguous block of memory.
45401 	 */
45402 	uint64_t	resp_addr;
45403 	/* This value is an opaque id into CFA data structures. */
45404 	uint64_t	tunnel_filter_id;
45405 } hwrm_cfa_tunnel_filter_free_input_t, *phwrm_cfa_tunnel_filter_free_input_t;
45406 
45407 /* hwrm_cfa_tunnel_filter_free_output (size:128b/16B) */
45408 
45409 typedef struct hwrm_cfa_tunnel_filter_free_output {
45410 	/* The specific error status for the command. */
45411 	uint16_t	error_code;
45412 	/* The HWRM command request type. */
45413 	uint16_t	req_type;
45414 	/* The sequence ID from the original command. */
45415 	uint16_t	seq_id;
45416 	/* The length of the response data in number of bytes. */
45417 	uint16_t	resp_len;
45418 	uint8_t	unused_0[7];
45419 	/*
45420 	 * This field is used in Output records to indicate that the output
45421 	 * is completely written to RAM. This field should be read as '1'
45422 	 * to indicate that the output has been completely written.
45423 	 * When writing a command completion or response to an internal
45424 	 * processor, the order of writes has to be such that this field is
45425 	 * written last.
45426 	 */
45427 	uint8_t	valid;
45428 } hwrm_cfa_tunnel_filter_free_output_t, *phwrm_cfa_tunnel_filter_free_output_t;
45429 
45430 /***************************************
45431  * hwrm_cfa_redirect_tunnel_type_alloc *
45432  ***************************************/
45433 
45434 
45435 /* hwrm_cfa_redirect_tunnel_type_alloc_input (size:192b/24B) */
45436 
45437 typedef struct hwrm_cfa_redirect_tunnel_type_alloc_input {
45438 	/* The HWRM command request type. */
45439 	uint16_t	req_type;
45440 	/*
45441 	 * The completion ring to send the completion event on. This should
45442 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45443 	 */
45444 	uint16_t	cmpl_ring;
45445 	/*
45446 	 * The sequence ID is used by the driver for tracking multiple
45447 	 * commands. This ID is treated as opaque data by the firmware and
45448 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45449 	 */
45450 	uint16_t	seq_id;
45451 	/*
45452 	 * The target ID of the command:
45453 	 * * 0x0-0xFFF8 - The function ID
45454 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45455 	 * * 0xFFFD - Reserved for user-space HWRM interface
45456 	 * * 0xFFFF - HWRM
45457 	 */
45458 	uint16_t	target_id;
45459 	/*
45460 	 * A physical address pointer pointing to a host buffer that the
45461 	 * command's response data will be written. This can be either a host
45462 	 * physical address (HPA) or a guest physical address (GPA) and must
45463 	 * point to a physically contiguous block of memory.
45464 	 */
45465 	uint64_t	resp_addr;
45466 	/* The destination function id, to whom the traffic is redirected. */
45467 	uint16_t	dest_fid;
45468 	/* Tunnel Type. */
45469 	uint8_t	tunnel_type;
45470 	/* Non-tunnel */
45471 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
45472 	/* Virtual eXtensible Local Area Network (VXLAN) */
45473 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
45474 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
45475 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
45476 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
45477 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
45478 	/* IP in IP */
45479 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
45480 	/* Generic Network Virtualization Encapsulation (Geneve) */
45481 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
45482 	/* Multi-Protocol Label Switching (MPLS) */
45483 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
45484 	/* Stateless Transport Tunnel (STT) */
45485 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
45486 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
45487 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
45488 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
45489 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
45490 	/*
45491 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
45492 	 * datagram payload
45493 	 */
45494 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
45495 	/* Use fixed layer 2 ether type of 0xFFFF */
45496 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
45497 	/*
45498 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
45499 	 * (IPV6oVXLANGPE)
45500 	 */
45501 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
45502 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
45503 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
45504 	/* Any tunneled traffic */
45505 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
45506 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
45507 	/* Tunnel alloc flags. */
45508 	uint8_t	flags;
45509 	/*
45510 	 * Setting of this flag indicates modify existing redirect tunnel
45511 	 * to new destination function ID.
45512 	 */
45513 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_FLAGS_MODIFY_DST	UINT32_C(0x1)
45514 	uint8_t	unused_0[4];
45515 } hwrm_cfa_redirect_tunnel_type_alloc_input_t, *phwrm_cfa_redirect_tunnel_type_alloc_input_t;
45516 
45517 /* hwrm_cfa_redirect_tunnel_type_alloc_output (size:128b/16B) */
45518 
45519 typedef struct hwrm_cfa_redirect_tunnel_type_alloc_output {
45520 	/* The specific error status for the command. */
45521 	uint16_t	error_code;
45522 	/* The HWRM command request type. */
45523 	uint16_t	req_type;
45524 	/* The sequence ID from the original command. */
45525 	uint16_t	seq_id;
45526 	/* The length of the response data in number of bytes. */
45527 	uint16_t	resp_len;
45528 	uint8_t	unused_0[7];
45529 	/*
45530 	 * This field is used in Output records to indicate that the output
45531 	 * is completely written to RAM. This field should be read as '1'
45532 	 * to indicate that the output has been completely written.
45533 	 * When writing a command completion or response to an internal
45534 	 * processor, the order of writes has to be such that this field is
45535 	 * written last.
45536 	 */
45537 	uint8_t	valid;
45538 } hwrm_cfa_redirect_tunnel_type_alloc_output_t, *phwrm_cfa_redirect_tunnel_type_alloc_output_t;
45539 
45540 /**************************************
45541  * hwrm_cfa_redirect_tunnel_type_free *
45542  **************************************/
45543 
45544 
45545 /* hwrm_cfa_redirect_tunnel_type_free_input (size:192b/24B) */
45546 
45547 typedef struct hwrm_cfa_redirect_tunnel_type_free_input {
45548 	/* The HWRM command request type. */
45549 	uint16_t	req_type;
45550 	/*
45551 	 * The completion ring to send the completion event on. This should
45552 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45553 	 */
45554 	uint16_t	cmpl_ring;
45555 	/*
45556 	 * The sequence ID is used by the driver for tracking multiple
45557 	 * commands. This ID is treated as opaque data by the firmware and
45558 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45559 	 */
45560 	uint16_t	seq_id;
45561 	/*
45562 	 * The target ID of the command:
45563 	 * * 0x0-0xFFF8 - The function ID
45564 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45565 	 * * 0xFFFD - Reserved for user-space HWRM interface
45566 	 * * 0xFFFF - HWRM
45567 	 */
45568 	uint16_t	target_id;
45569 	/*
45570 	 * A physical address pointer pointing to a host buffer that the
45571 	 * command's response data will be written. This can be either a host
45572 	 * physical address (HPA) or a guest physical address (GPA) and must
45573 	 * point to a physically contiguous block of memory.
45574 	 */
45575 	uint64_t	resp_addr;
45576 	/* The destination function id, to whom the traffic is redirected. */
45577 	uint16_t	dest_fid;
45578 	/* Tunnel Type. */
45579 	uint8_t	tunnel_type;
45580 	/* Non-tunnel */
45581 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
45582 	/* Virtual eXtensible Local Area Network (VXLAN) */
45583 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
45584 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
45585 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
45586 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
45587 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
45588 	/* IP in IP */
45589 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
45590 	/* Generic Network Virtualization Encapsulation (Geneve) */
45591 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
45592 	/* Multi-Protocol Label Switching (MPLS) */
45593 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
45594 	/* Stateless Transport Tunnel (STT) */
45595 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
45596 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
45597 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
45598 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
45599 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
45600 	/*
45601 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
45602 	 * datagram payload
45603 	 */
45604 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
45605 	/* Use fixed layer 2 ether type of 0xFFFF */
45606 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
45607 	/*
45608 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
45609 	 * (IPV6oVXLANGPE)
45610 	 */
45611 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
45612 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
45613 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
45614 	/* Any tunneled traffic */
45615 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
45616 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_ANYTUNNEL
45617 	uint8_t	unused_0[5];
45618 } hwrm_cfa_redirect_tunnel_type_free_input_t, *phwrm_cfa_redirect_tunnel_type_free_input_t;
45619 
45620 /* hwrm_cfa_redirect_tunnel_type_free_output (size:128b/16B) */
45621 
45622 typedef struct hwrm_cfa_redirect_tunnel_type_free_output {
45623 	/* The specific error status for the command. */
45624 	uint16_t	error_code;
45625 	/* The HWRM command request type. */
45626 	uint16_t	req_type;
45627 	/* The sequence ID from the original command. */
45628 	uint16_t	seq_id;
45629 	/* The length of the response data in number of bytes. */
45630 	uint16_t	resp_len;
45631 	uint8_t	unused_0[7];
45632 	/*
45633 	 * This field is used in Output records to indicate that the output
45634 	 * is completely written to RAM. This field should be read as '1'
45635 	 * to indicate that the output has been completely written.
45636 	 * When writing a command completion or response to an internal
45637 	 * processor, the order of writes has to be such that this field is
45638 	 * written last.
45639 	 */
45640 	uint8_t	valid;
45641 } hwrm_cfa_redirect_tunnel_type_free_output_t, *phwrm_cfa_redirect_tunnel_type_free_output_t;
45642 
45643 /**************************************
45644  * hwrm_cfa_redirect_tunnel_type_info *
45645  **************************************/
45646 
45647 
45648 /* hwrm_cfa_redirect_tunnel_type_info_input (size:192b/24B) */
45649 
45650 typedef struct hwrm_cfa_redirect_tunnel_type_info_input {
45651 	/* The HWRM command request type. */
45652 	uint16_t	req_type;
45653 	/*
45654 	 * The completion ring to send the completion event on. This should
45655 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45656 	 */
45657 	uint16_t	cmpl_ring;
45658 	/*
45659 	 * The sequence ID is used by the driver for tracking multiple
45660 	 * commands. This ID is treated as opaque data by the firmware and
45661 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45662 	 */
45663 	uint16_t	seq_id;
45664 	/*
45665 	 * The target ID of the command:
45666 	 * * 0x0-0xFFF8 - The function ID
45667 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45668 	 * * 0xFFFD - Reserved for user-space HWRM interface
45669 	 * * 0xFFFF - HWRM
45670 	 */
45671 	uint16_t	target_id;
45672 	/*
45673 	 * A physical address pointer pointing to a host buffer that the
45674 	 * command's response data will be written. This can be either a host
45675 	 * physical address (HPA) or a guest physical address (GPA) and must
45676 	 * point to a physically contiguous block of memory.
45677 	 */
45678 	uint64_t	resp_addr;
45679 	/* The source function id. */
45680 	uint16_t	src_fid;
45681 	/* Tunnel Type. */
45682 	uint8_t	tunnel_type;
45683 	/* Non-tunnel */
45684 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
45685 	/* Virtual eXtensible Local Area Network (VXLAN) */
45686 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
45687 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
45688 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
45689 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
45690 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
45691 	/* IP in IP */
45692 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
45693 	/* Generic Network Virtualization Encapsulation (Geneve) */
45694 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
45695 	/* Multi-Protocol Label Switching (MPLS) */
45696 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
45697 	/* Stateless Transport Tunnel (STT) */
45698 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
45699 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
45700 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
45701 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
45702 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
45703 	/*
45704 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
45705 	 * datagram payload
45706 	 */
45707 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
45708 	/* Use fixed layer 2 ether type of 0xFFFF */
45709 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
45710 	/*
45711 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
45712 	 * (IPV6oVXLANGPE)
45713 	 */
45714 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
45715 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
45716 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
45717 	/* Any tunneled traffic */
45718 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
45719 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_ANYTUNNEL
45720 	uint8_t	unused_0[5];
45721 } hwrm_cfa_redirect_tunnel_type_info_input_t, *phwrm_cfa_redirect_tunnel_type_info_input_t;
45722 
45723 /* hwrm_cfa_redirect_tunnel_type_info_output (size:128b/16B) */
45724 
45725 typedef struct hwrm_cfa_redirect_tunnel_type_info_output {
45726 	/* The specific error status for the command. */
45727 	uint16_t	error_code;
45728 	/* The HWRM command request type. */
45729 	uint16_t	req_type;
45730 	/* The sequence ID from the original command. */
45731 	uint16_t	seq_id;
45732 	/* The length of the response data in number of bytes. */
45733 	uint16_t	resp_len;
45734 	/* The destination function id, to whom the traffic is redirected. */
45735 	uint16_t	dest_fid;
45736 	uint8_t	unused_0[5];
45737 	/*
45738 	 * This field is used in Output records to indicate that the output
45739 	 * is completely written to RAM. This field should be read as '1'
45740 	 * to indicate that the output has been completely written.
45741 	 * When writing a command completion or response to an internal
45742 	 * processor, the order of writes has to be such that this field is
45743 	 * written last.
45744 	 */
45745 	uint8_t	valid;
45746 } hwrm_cfa_redirect_tunnel_type_info_output_t, *phwrm_cfa_redirect_tunnel_type_info_output_t;
45747 
45748 /* hwrm_vxlan_ipv4_hdr (size:128b/16B) */
45749 
45750 typedef struct hwrm_vxlan_ipv4_hdr {
45751 	/* IPv4 version and header length. */
45752 	uint8_t	ver_hlen;
45753 	/* IPv4 header length */
45754 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_MASK UINT32_C(0xf)
45755 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_SFT 0
45756 	/* Version */
45757 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_VERSION_MASK	UINT32_C(0xf0)
45758 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_VERSION_SFT	4
45759 	/* IPv4 type of service. */
45760 	uint8_t	tos;
45761 	/* IPv4 identification. */
45762 	uint16_t	ip_id;
45763 	/* IPv4 flags and offset. */
45764 	uint16_t	flags_frag_offset;
45765 	/* IPv4 TTL. */
45766 	uint8_t	ttl;
45767 	/* IPv4 protocol. */
45768 	uint8_t	protocol;
45769 	/* IPv4 source address. */
45770 	uint32_t	src_ip_addr;
45771 	/* IPv4 destination address. */
45772 	uint32_t	dest_ip_addr;
45773 } hwrm_vxlan_ipv4_hdr_t, *phwrm_vxlan_ipv4_hdr_t;
45774 
45775 /* hwrm_vxlan_ipv6_hdr (size:320b/40B) */
45776 
45777 typedef struct hwrm_vxlan_ipv6_hdr {
45778 	/* IPv6 version, traffic class and flow label. */
45779 	uint32_t	ver_tc_flow_label;
45780 	/* IPv6 version shift */
45781 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_SFT	UINT32_C(0x1c)
45782 	/* IPv6 version mask */
45783 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_MASK	UINT32_C(0xf0000000)
45784 	/* IPv6 TC shift */
45785 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_SFT	UINT32_C(0x14)
45786 	/* IPv6 TC mask */
45787 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_MASK	UINT32_C(0xff00000)
45788 	/* IPv6 flow label shift */
45789 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_SFT  UINT32_C(0x0)
45790 	/* IPv6 flow label mask */
45791 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK UINT32_C(0xfffff)
45792 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_LAST	HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK
45793 	/* IPv6 payload length. */
45794 	uint16_t	payload_len;
45795 	/* IPv6 next header. */
45796 	uint8_t	next_hdr;
45797 	/* IPv6 TTL. */
45798 	uint8_t	ttl;
45799 	/* IPv6 source address. */
45800 	uint32_t	src_ip_addr[4];
45801 	/* IPv6 destination address. */
45802 	uint32_t	dest_ip_addr[4];
45803 } hwrm_vxlan_ipv6_hdr_t, *phwrm_vxlan_ipv6_hdr_t;
45804 
45805 /* hwrm_cfa_encap_data_vxlan (size:640b/80B) */
45806 
45807 typedef struct hwrm_cfa_encap_data_vxlan {
45808 	/* Source MAC address. */
45809 	uint8_t	src_mac_addr[6];
45810 	/* reserved. */
45811 	uint16_t	unused_0;
45812 	/* Destination MAC address. */
45813 	uint8_t	dst_mac_addr[6];
45814 	/* Number of VLAN tags. */
45815 	uint8_t	num_vlan_tags;
45816 	/* reserved. */
45817 	uint8_t	unused_1;
45818 	/* Outer VLAN TPID. */
45819 	uint16_t	ovlan_tpid;
45820 	/* Outer VLAN TCI. */
45821 	uint16_t	ovlan_tci;
45822 	/* Inner VLAN TPID. */
45823 	uint16_t	ivlan_tpid;
45824 	/* Inner VLAN TCI. */
45825 	uint16_t	ivlan_tci;
45826 	/* L3 header fields. */
45827 	uint32_t	l3[10];
45828 	/* IP version mask. */
45829 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_MASK UINT32_C(0xf)
45830 	/* IP version 4. */
45831 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV4 UINT32_C(0x4)
45832 	/* IP version 6. */
45833 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6 UINT32_C(0x6)
45834 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_LAST	HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6
45835 	/* UDP source port. */
45836 	uint16_t	src_port;
45837 	/* UDP destination port. */
45838 	uint16_t	dst_port;
45839 	/* VXLAN Network Identifier. */
45840 	uint32_t	vni;
45841 	/*
45842 	 * 3 bytes VXLAN header reserve fields from 1st dword of the VXLAN
45843 	 * header.
45844 	 */
45845 	uint8_t	hdr_rsvd0[3];
45846 	/* 1 byte VXLAN header reserve field from 2nd dword of the VXLAN header. */
45847 	uint8_t	hdr_rsvd1;
45848 	/* VXLAN header flags field. */
45849 	uint8_t	hdr_flags;
45850 	uint8_t	unused[3];
45851 } hwrm_cfa_encap_data_vxlan_t, *phwrm_cfa_encap_data_vxlan_t;
45852 
45853 /*******************************
45854  * hwrm_cfa_encap_record_alloc *
45855  *******************************/
45856 
45857 
45858 /* hwrm_cfa_encap_record_alloc_input (size:832b/104B) */
45859 
45860 typedef struct hwrm_cfa_encap_record_alloc_input {
45861 	/* The HWRM command request type. */
45862 	uint16_t	req_type;
45863 	/*
45864 	 * The completion ring to send the completion event on. This should
45865 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45866 	 */
45867 	uint16_t	cmpl_ring;
45868 	/*
45869 	 * The sequence ID is used by the driver for tracking multiple
45870 	 * commands. This ID is treated as opaque data by the firmware and
45871 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45872 	 */
45873 	uint16_t	seq_id;
45874 	/*
45875 	 * The target ID of the command:
45876 	 * * 0x0-0xFFF8 - The function ID
45877 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45878 	 * * 0xFFFD - Reserved for user-space HWRM interface
45879 	 * * 0xFFFF - HWRM
45880 	 */
45881 	uint16_t	target_id;
45882 	/*
45883 	 * A physical address pointer pointing to a host buffer that the
45884 	 * command's response data will be written. This can be either a host
45885 	 * physical address (HPA) or a guest physical address (GPA) and must
45886 	 * point to a physically contiguous block of memory.
45887 	 */
45888 	uint64_t	resp_addr;
45889 	uint32_t	flags;
45890 	/*
45891 	 * Setting of this flag indicates the applicability to the loopback
45892 	 * path.
45893 	 */
45894 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_FLAGS_LOOPBACK	UINT32_C(0x1)
45895 	/*
45896 	 * Setting of this flag indicates this encap record is external
45897 	 * encap record. Resetting of this flag indicates this flag is
45898 	 * internal encap record and this is the default setting.
45899 	 */
45900 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_FLAGS_EXTERNAL	UINT32_C(0x2)
45901 	/* Encapsulation Type. */
45902 	uint8_t	encap_type;
45903 	/* Virtual eXtensible Local Area Network (VXLAN) */
45904 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN	UINT32_C(0x1)
45905 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
45906 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_NVGRE	UINT32_C(0x2)
45907 	/* Generic Routing Encapsulation (GRE) after inside Ethernet payload */
45908 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_L2GRE	UINT32_C(0x3)
45909 	/* IP in IP */
45910 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPIP	UINT32_C(0x4)
45911 	/* Generic Network Virtualization Encapsulation (Geneve) */
45912 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_GENEVE	UINT32_C(0x5)
45913 	/* Multi-Protocol Label Switching (MPLS) */
45914 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_MPLS	UINT32_C(0x6)
45915 	/* VLAN */
45916 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VLAN	UINT32_C(0x7)
45917 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
45918 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPGRE	UINT32_C(0x8)
45919 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
45920 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_V4	UINT32_C(0x9)
45921 	/*
45922 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
45923 	 * datagram payload
45924 	 */
45925 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPGRE_V1	UINT32_C(0xa)
45926 	/* Use fixed layer 2 ether type of 0xFFFF */
45927 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_L2_ETYPE	UINT32_C(0xb)
45928 	/*
45929 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
45930 	 * (IPV6oVXLANGPE)
45931 	 */
45932 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
45933 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
45934 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_GPE	UINT32_C(0x10)
45935 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_LAST	HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_GPE
45936 	uint8_t	unused_0[3];
45937 	/* This value is encap data used for the given encap type. */
45938 	uint32_t	encap_data[20];
45939 } hwrm_cfa_encap_record_alloc_input_t, *phwrm_cfa_encap_record_alloc_input_t;
45940 
45941 /* hwrm_cfa_encap_record_alloc_output (size:128b/16B) */
45942 
45943 typedef struct hwrm_cfa_encap_record_alloc_output {
45944 	/* The specific error status for the command. */
45945 	uint16_t	error_code;
45946 	/* The HWRM command request type. */
45947 	uint16_t	req_type;
45948 	/* The sequence ID from the original command. */
45949 	uint16_t	seq_id;
45950 	/* The length of the response data in number of bytes. */
45951 	uint16_t	resp_len;
45952 	/* This value is an opaque id into CFA data structures. */
45953 	uint32_t	encap_record_id;
45954 	uint8_t	unused_0[3];
45955 	/*
45956 	 * This field is used in Output records to indicate that the output
45957 	 * is completely written to RAM. This field should be read as '1'
45958 	 * to indicate that the output has been completely written.
45959 	 * When writing a command completion or response to an internal
45960 	 * processor, the order of writes has to be such that this field is
45961 	 * written last.
45962 	 */
45963 	uint8_t	valid;
45964 } hwrm_cfa_encap_record_alloc_output_t, *phwrm_cfa_encap_record_alloc_output_t;
45965 
45966 /******************************
45967  * hwrm_cfa_encap_record_free *
45968  ******************************/
45969 
45970 
45971 /* hwrm_cfa_encap_record_free_input (size:192b/24B) */
45972 
45973 typedef struct hwrm_cfa_encap_record_free_input {
45974 	/* The HWRM command request type. */
45975 	uint16_t	req_type;
45976 	/*
45977 	 * The completion ring to send the completion event on. This should
45978 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45979 	 */
45980 	uint16_t	cmpl_ring;
45981 	/*
45982 	 * The sequence ID is used by the driver for tracking multiple
45983 	 * commands. This ID is treated as opaque data by the firmware and
45984 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45985 	 */
45986 	uint16_t	seq_id;
45987 	/*
45988 	 * The target ID of the command:
45989 	 * * 0x0-0xFFF8 - The function ID
45990 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45991 	 * * 0xFFFD - Reserved for user-space HWRM interface
45992 	 * * 0xFFFF - HWRM
45993 	 */
45994 	uint16_t	target_id;
45995 	/*
45996 	 * A physical address pointer pointing to a host buffer that the
45997 	 * command's response data will be written. This can be either a host
45998 	 * physical address (HPA) or a guest physical address (GPA) and must
45999 	 * point to a physically contiguous block of memory.
46000 	 */
46001 	uint64_t	resp_addr;
46002 	/* This value is an opaque id into CFA data structures. */
46003 	uint32_t	encap_record_id;
46004 	uint8_t	unused_0[4];
46005 } hwrm_cfa_encap_record_free_input_t, *phwrm_cfa_encap_record_free_input_t;
46006 
46007 /* hwrm_cfa_encap_record_free_output (size:128b/16B) */
46008 
46009 typedef struct hwrm_cfa_encap_record_free_output {
46010 	/* The specific error status for the command. */
46011 	uint16_t	error_code;
46012 	/* The HWRM command request type. */
46013 	uint16_t	req_type;
46014 	/* The sequence ID from the original command. */
46015 	uint16_t	seq_id;
46016 	/* The length of the response data in number of bytes. */
46017 	uint16_t	resp_len;
46018 	uint8_t	unused_0[7];
46019 	/*
46020 	 * This field is used in Output records to indicate that the output
46021 	 * is completely written to RAM. This field should be read as '1'
46022 	 * to indicate that the output has been completely written.
46023 	 * When writing a command completion or response to an internal
46024 	 * processor, the order of writes has to be such that this field is
46025 	 * written last.
46026 	 */
46027 	uint8_t	valid;
46028 } hwrm_cfa_encap_record_free_output_t, *phwrm_cfa_encap_record_free_output_t;
46029 
46030 /********************************
46031  * hwrm_cfa_ntuple_filter_alloc *
46032  ********************************/
46033 
46034 
46035 /* hwrm_cfa_ntuple_filter_alloc_input (size:1024b/128B) */
46036 
46037 typedef struct hwrm_cfa_ntuple_filter_alloc_input {
46038 	/* The HWRM command request type. */
46039 	uint16_t	req_type;
46040 	/*
46041 	 * The completion ring to send the completion event on. This should
46042 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46043 	 */
46044 	uint16_t	cmpl_ring;
46045 	/*
46046 	 * The sequence ID is used by the driver for tracking multiple
46047 	 * commands. This ID is treated as opaque data by the firmware and
46048 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46049 	 */
46050 	uint16_t	seq_id;
46051 	/*
46052 	 * The target ID of the command:
46053 	 * * 0x0-0xFFF8 - The function ID
46054 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46055 	 * * 0xFFFD - Reserved for user-space HWRM interface
46056 	 * * 0xFFFF - HWRM
46057 	 */
46058 	uint16_t	target_id;
46059 	/*
46060 	 * A physical address pointer pointing to a host buffer that the
46061 	 * command's response data will be written. This can be either a host
46062 	 * physical address (HPA) or a guest physical address (GPA) and must
46063 	 * point to a physically contiguous block of memory.
46064 	 */
46065 	uint64_t	resp_addr;
46066 	uint32_t	flags;
46067 	/*
46068 	 * Setting of this flag indicates the applicability to the loopback
46069 	 * path.
46070 	 */
46071 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK		UINT32_C(0x1)
46072 	/*
46073 	 * Setting of this flag indicates drop action. If this flag is not
46074 	 * set, then it should be considered accept action.
46075 	 */
46076 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DROP		UINT32_C(0x2)
46077 	/*
46078 	 * Setting of this flag indicates that a meter is expected to be
46079 	 * attached to this flow. This hint can be used when choosing the
46080 	 * action record format required for the flow.
46081 	 */
46082 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_METER		UINT32_C(0x4)
46083 	/*
46084 	 * Setting of this flag indicates that the dst_id field contains
46085 	 * function ID. If this is not set it indicates dest_id is VNIC
46086 	 * or VPORT.
46087 	 */
46088 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_FID		UINT32_C(0x8)
46089 	/*
46090 	 * Setting of this flag indicates match on arp reply when ethertype
46091 	 * is 0x0806. If this is not set it indicates no specific arp opcode
46092 	 * matching.
46093 	 */
46094 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_ARP_REPLY		UINT32_C(0x10)
46095 	/*
46096 	 * Setting of this flag indicates that the dst_id field contains RFS
46097 	 * ring table index. If this is not set it indicates dst_id is VNIC
46098 	 * or VPORT or function ID. Note dest_fid and dest_rfs_ring_idx
46099 	 * can't be set at the same time. Updated drivers should pass ring
46100 	 * idx in the rfs_ring_tbl_idx field if the firmware indicates
46101 	 * support for the new field in the HWRM_CFA_ADV_FLOW_MGMT_QCAPS
46102 	 * response.
46103 	 */
46104 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_RFS_RING_IDX	UINT32_C(0x20)
46105 	/*
46106 	 * Setting of this flag indicates that when the ntuple filter is
46107 	 * created, the L2 context should not be used in the filter. This
46108 	 * allows packet from different L2 contexts to match and be directed
46109 	 * to the same destination.
46110 	 */
46111 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_NO_L2_CONTEXT	UINT32_C(0x40)
46112 	uint32_t	enables;
46113 	/*
46114 	 * This bit must be '1' for the l2_filter_id field to be
46115 	 * configured.
46116 	 */
46117 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID	UINT32_C(0x1)
46118 	/*
46119 	 * This bit must be '1' for the ethertype field to be
46120 	 * configured.
46121 	 */
46122 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE		UINT32_C(0x2)
46123 	/*
46124 	 * This bit must be '1' for the tunnel_type field to be
46125 	 * configured.
46126 	 */
46127 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE	UINT32_C(0x4)
46128 	/*
46129 	 * This bit must be '1' for the src_macaddr field to be
46130 	 * configured.
46131 	 */
46132 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR	UINT32_C(0x8)
46133 	/*
46134 	 * This bit must be '1' for the ipaddr_type field to be
46135 	 * configured.
46136 	 */
46137 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE	UINT32_C(0x10)
46138 	/*
46139 	 * This bit must be '1' for the src_ipaddr field to be
46140 	 * configured.
46141 	 */
46142 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR	UINT32_C(0x20)
46143 	/*
46144 	 * This bit must be '1' for the src_ipaddr_mask field to be
46145 	 * configured.
46146 	 */
46147 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR_MASK	UINT32_C(0x40)
46148 	/*
46149 	 * This bit must be '1' for the dst_ipaddr field to be
46150 	 * configured.
46151 	 */
46152 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR	UINT32_C(0x80)
46153 	/*
46154 	 * This bit must be '1' for the dst_ipaddr_mask field to be
46155 	 * configured.
46156 	 */
46157 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR_MASK	UINT32_C(0x100)
46158 	/*
46159 	 * This bit must be '1' for the ip_protocol field to be
46160 	 * configured.
46161 	 */
46162 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL	UINT32_C(0x200)
46163 	/*
46164 	 * This bit must be '1' for the src_port field to be
46165 	 * configured.
46166 	 */
46167 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT		UINT32_C(0x400)
46168 	/*
46169 	 * This bit must be '1' for the src_port_mask field to be
46170 	 * configured.
46171 	 */
46172 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT_MASK	UINT32_C(0x800)
46173 	/*
46174 	 * This bit must be '1' for the dst_port field to be
46175 	 * configured.
46176 	 */
46177 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT		UINT32_C(0x1000)
46178 	/*
46179 	 * This bit must be '1' for the dst_port_mask field to be
46180 	 * configured.
46181 	 */
46182 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT_MASK	UINT32_C(0x2000)
46183 	/*
46184 	 * This bit must be '1' for the pri_hint field to be
46185 	 * configured.
46186 	 */
46187 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_PRI_HINT		UINT32_C(0x4000)
46188 	/*
46189 	 * This bit must be '1' for the ntuple_filter_id field to be
46190 	 * configured.
46191 	 */
46192 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_NTUPLE_FILTER_ID	UINT32_C(0x8000)
46193 	/*
46194 	 * This bit must be '1' for the dst_id field to be
46195 	 * configured.
46196 	 */
46197 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_ID		UINT32_C(0x10000)
46198 	/* This flag is deprecated. */
46199 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID	UINT32_C(0x20000)
46200 	/*
46201 	 * This bit must be '1' for the dst_macaddr field to be
46202 	 * configured.
46203 	 */
46204 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR	UINT32_C(0x40000)
46205 	/*
46206 	 * This bit must be '1' for the rfs_ring_tbl_idx field to
46207 	 * be configured.
46208 	 */
46209 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_RFS_RING_TBL_IDX	UINT32_C(0x80000)
46210 	/*
46211 	 * This value identifies a set of CFA data structures used for an L2
46212 	 * context.
46213 	 */
46214 	uint64_t	l2_filter_id;
46215 	/*
46216 	 * This value indicates the source MAC address in
46217 	 * the Ethernet header.
46218 	 */
46219 	uint8_t	src_macaddr[6];
46220 	/* This value indicates the ethertype in the Ethernet header. */
46221 	uint16_t	ethertype;
46222 	/*
46223 	 * This value indicates the type of IP address.
46224 	 * 4 - IPv4
46225 	 * 6 - IPv6
46226 	 * All others are invalid.
46227 	 */
46228 	uint8_t	ip_addr_type;
46229 	/* invalid */
46230 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0)
46231 	/* IPv4 */
46232 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4	UINT32_C(0x4)
46233 	/* IPv6 */
46234 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6	UINT32_C(0x6)
46235 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST   HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
46236 	/*
46237 	 * The value of protocol field in IP header.
46238 	 * Applies to UDP and TCP traffic.
46239 	 * 6 - TCP
46240 	 * 17 - UDP
46241 	 * 1 - ICMP
46242 	 * 58 - ICMPV6
46243 	 * 255 - RSVD
46244 	 */
46245 	uint8_t	ip_protocol;
46246 	/* invalid */
46247 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0)
46248 	/* TCP */
46249 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP	UINT32_C(0x6)
46250 	/* UDP */
46251 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP	UINT32_C(0x11)
46252 	/* ICMP */
46253 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_ICMP	UINT32_C(0x1)
46254 	/* ICMPV6 */
46255 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_ICMPV6  UINT32_C(0x3a)
46256 	/* RSVD */
46257 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_RSVD	UINT32_C(0xff)
46258 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST   HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_RSVD
46259 	/*
46260 	 * If set, this value shall represent the
46261 	 * Logical VNIC ID of the destination VNIC for the RX
46262 	 * path and network port id of the destination port for
46263 	 * the TX path.
46264 	 */
46265 	uint16_t	dst_id;
46266 	/*
46267 	 * If set, this value shall represent the ring table
46268 	 * index for receive flow steering. Note that this offset
46269 	 * was formerly used for the mirror_vnic_id field, which
46270 	 * is no longer supported.
46271 	 */
46272 	uint16_t	rfs_ring_tbl_idx;
46273 	/*
46274 	 * This value indicates the tunnel type for this filter.
46275 	 * If this field is not specified, then the filter shall
46276 	 * apply to both non-tunneled and tunneled packets.
46277 	 * If this field conflicts with the tunnel_type specified
46278 	 * in the l2_filter_id, then the HWRM shall return an
46279 	 * error for this command.
46280 	 */
46281 	uint8_t	tunnel_type;
46282 	/* Non-tunnel */
46283 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
46284 	/* Virtual eXtensible Local Area Network (VXLAN) */
46285 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
46286 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
46287 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
46288 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
46289 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
46290 	/* IP in IP */
46291 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
46292 	/* Generic Network Virtualization Encapsulation (Geneve) */
46293 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
46294 	/* Multi-Protocol Label Switching (MPLS) */
46295 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
46296 	/* Stateless Transport Tunnel (STT) */
46297 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
46298 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
46299 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
46300 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
46301 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
46302 	/*
46303 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
46304 	 * datagram payload
46305 	 */
46306 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
46307 	/* Use fixed layer 2 ether type of 0xFFFF */
46308 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
46309 	/*
46310 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
46311 	 * (IPV6oVXLANGPE)
46312 	 */
46313 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
46314 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
46315 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
46316 	/* Any tunneled traffic */
46317 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
46318 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
46319 	/*
46320 	 * This hint is provided to help in placing
46321 	 * the filter in the filter table.
46322 	 */
46323 	uint8_t	pri_hint;
46324 	/* No preference */
46325 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER UINT32_C(0x0)
46326 	/* Above the given filter */
46327 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE	UINT32_C(0x1)
46328 	/* Below the given filter */
46329 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_BELOW	UINT32_C(0x2)
46330 	/* As high as possible */
46331 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_HIGHEST   UINT32_C(0x3)
46332 	/* As low as possible */
46333 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST	UINT32_C(0x4)
46334 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LAST	HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST
46335 	/*
46336 	 * The value of source IP address to be used in filtering.
46337 	 * For IPv4, first four bytes represent the IP address.
46338 	 */
46339 	uint32_t	src_ipaddr[4];
46340 	/*
46341 	 * The value of source IP address mask to be used in
46342 	 * filtering.
46343 	 * For IPv4, first four bytes represent the IP address mask.
46344 	 */
46345 	uint32_t	src_ipaddr_mask[4];
46346 	/*
46347 	 * The value of destination IP address to be used in filtering.
46348 	 * For IPv4, first four bytes represent the IP address.
46349 	 */
46350 	uint32_t	dst_ipaddr[4];
46351 	/*
46352 	 * The value of destination IP address mask to be used in
46353 	 * filtering.
46354 	 * For IPv4, first four bytes represent the IP address mask.
46355 	 */
46356 	uint32_t	dst_ipaddr_mask[4];
46357 	/*
46358 	 * The value of source port to be used in filtering.
46359 	 * Applies to UDP and TCP traffic.
46360 	 */
46361 	uint16_t	src_port;
46362 	/*
46363 	 * The value of source port mask to be used in filtering.
46364 	 * Applies to UDP and TCP traffic.
46365 	 */
46366 	uint16_t	src_port_mask;
46367 	/*
46368 	 * The value of destination port to be used in filtering.
46369 	 * Applies to UDP and TCP traffic.
46370 	 */
46371 	uint16_t	dst_port;
46372 	/*
46373 	 * The value of destination port mask to be used in
46374 	 * filtering.
46375 	 * Applies to UDP and TCP traffic.
46376 	 */
46377 	uint16_t	dst_port_mask;
46378 	/*
46379 	 * This is the ID of the filter that goes along with
46380 	 * the pri_hint.
46381 	 */
46382 	uint64_t	ntuple_filter_id_hint;
46383 } hwrm_cfa_ntuple_filter_alloc_input_t, *phwrm_cfa_ntuple_filter_alloc_input_t;
46384 
46385 /* hwrm_cfa_ntuple_filter_alloc_output (size:192b/24B) */
46386 
46387 typedef struct hwrm_cfa_ntuple_filter_alloc_output {
46388 	/* The specific error status for the command. */
46389 	uint16_t	error_code;
46390 	/* The HWRM command request type. */
46391 	uint16_t	req_type;
46392 	/* The sequence ID from the original command. */
46393 	uint16_t	seq_id;
46394 	/* The length of the response data in number of bytes. */
46395 	uint16_t	resp_len;
46396 	/* This value is an opaque id into CFA data structures. */
46397 	uint64_t	ntuple_filter_id;
46398 	/*
46399 	 * The flow id value in bit 0-29 is the actual ID of the flow
46400 	 * associated with this filter and it shall be used to match
46401 	 * and associate the flow identifier returned in completion
46402 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
46403 	 * shall indicate no valid flow id.
46404 	 */
46405 	uint32_t	flow_id;
46406 	/* Indicate the flow id value. */
46407 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK UINT32_C(0x3fffffff)
46408 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
46409 	/* Indicate type of the flow. */
46410 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE	UINT32_C(0x40000000)
46411 	/*
46412 	 * If this bit set to 0, then it indicates that the flow is
46413 	 * internal flow.
46414 	 */
46415 		#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT	(UINT32_C(0x0) << 30)
46416 	/*
46417 	 * If this bit is set to 1, then it indicates that the flow is
46418 	 * external flow.
46419 	 */
46420 		#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT	(UINT32_C(0x1) << 30)
46421 		#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST  HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
46422 	/* Indicate the flow direction. */
46423 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR	UINT32_C(0x80000000)
46424 	/* If this bit set to 0, then it indicates rx flow. */
46425 		#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX	(UINT32_C(0x0) << 31)
46426 	/* If this bit is set to 1, then it indicates that tx flow. */
46427 		#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX	(UINT32_C(0x1) << 31)
46428 		#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST   HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
46429 	uint8_t	unused_0[3];
46430 	/*
46431 	 * This field is used in Output records to indicate that the output
46432 	 * is completely written to RAM. This field should be read as '1'
46433 	 * to indicate that the output has been completely written.
46434 	 * When writing a command completion or response to an internal
46435 	 * processor, the order of writes has to be such that this field is
46436 	 * written last.
46437 	 */
46438 	uint8_t	valid;
46439 } hwrm_cfa_ntuple_filter_alloc_output_t, *phwrm_cfa_ntuple_filter_alloc_output_t;
46440 
46441 /* hwrm_cfa_ntuple_filter_alloc_cmd_err (size:64b/8B) */
46442 
46443 typedef struct hwrm_cfa_ntuple_filter_alloc_cmd_err {
46444 	/*
46445 	 * command specific error codes that goes to
46446 	 * the cmd_err field in Common HWRM Error Response.
46447 	 */
46448 	uint8_t	code;
46449 	/* Unknown error */
46450 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_UNKNOWN		UINT32_C(0x0)
46451 	/* Unable to complete operation due to conflict with Rx Mask VLAN */
46452 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR UINT32_C(0x1)
46453 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_LAST			HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR
46454 	uint8_t	unused_0[7];
46455 } hwrm_cfa_ntuple_filter_alloc_cmd_err_t, *phwrm_cfa_ntuple_filter_alloc_cmd_err_t;
46456 
46457 /*******************************
46458  * hwrm_cfa_ntuple_filter_free *
46459  *******************************/
46460 
46461 
46462 /* hwrm_cfa_ntuple_filter_free_input (size:192b/24B) */
46463 
46464 typedef struct hwrm_cfa_ntuple_filter_free_input {
46465 	/* The HWRM command request type. */
46466 	uint16_t	req_type;
46467 	/*
46468 	 * The completion ring to send the completion event on. This should
46469 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46470 	 */
46471 	uint16_t	cmpl_ring;
46472 	/*
46473 	 * The sequence ID is used by the driver for tracking multiple
46474 	 * commands. This ID is treated as opaque data by the firmware and
46475 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46476 	 */
46477 	uint16_t	seq_id;
46478 	/*
46479 	 * The target ID of the command:
46480 	 * * 0x0-0xFFF8 - The function ID
46481 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46482 	 * * 0xFFFD - Reserved for user-space HWRM interface
46483 	 * * 0xFFFF - HWRM
46484 	 */
46485 	uint16_t	target_id;
46486 	/*
46487 	 * A physical address pointer pointing to a host buffer that the
46488 	 * command's response data will be written. This can be either a host
46489 	 * physical address (HPA) or a guest physical address (GPA) and must
46490 	 * point to a physically contiguous block of memory.
46491 	 */
46492 	uint64_t	resp_addr;
46493 	/* This value is an opaque id into CFA data structures. */
46494 	uint64_t	ntuple_filter_id;
46495 } hwrm_cfa_ntuple_filter_free_input_t, *phwrm_cfa_ntuple_filter_free_input_t;
46496 
46497 /* hwrm_cfa_ntuple_filter_free_output (size:128b/16B) */
46498 
46499 typedef struct hwrm_cfa_ntuple_filter_free_output {
46500 	/* The specific error status for the command. */
46501 	uint16_t	error_code;
46502 	/* The HWRM command request type. */
46503 	uint16_t	req_type;
46504 	/* The sequence ID from the original command. */
46505 	uint16_t	seq_id;
46506 	/* The length of the response data in number of bytes. */
46507 	uint16_t	resp_len;
46508 	uint8_t	unused_0[7];
46509 	/*
46510 	 * This field is used in Output records to indicate that the output
46511 	 * is completely written to RAM. This field should be read as '1'
46512 	 * to indicate that the output has been completely written.
46513 	 * When writing a command completion or response to an internal
46514 	 * processor, the order of writes has to be such that this field is
46515 	 * written last.
46516 	 */
46517 	uint8_t	valid;
46518 } hwrm_cfa_ntuple_filter_free_output_t, *phwrm_cfa_ntuple_filter_free_output_t;
46519 
46520 /******************************
46521  * hwrm_cfa_ntuple_filter_cfg *
46522  ******************************/
46523 
46524 
46525 /* hwrm_cfa_ntuple_filter_cfg_input (size:384b/48B) */
46526 
46527 typedef struct hwrm_cfa_ntuple_filter_cfg_input {
46528 	/* The HWRM command request type. */
46529 	uint16_t	req_type;
46530 	/*
46531 	 * The completion ring to send the completion event on. This should
46532 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46533 	 */
46534 	uint16_t	cmpl_ring;
46535 	/*
46536 	 * The sequence ID is used by the driver for tracking multiple
46537 	 * commands. This ID is treated as opaque data by the firmware and
46538 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46539 	 */
46540 	uint16_t	seq_id;
46541 	/*
46542 	 * The target ID of the command:
46543 	 * * 0x0-0xFFF8 - The function ID
46544 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46545 	 * * 0xFFFD - Reserved for user-space HWRM interface
46546 	 * * 0xFFFF - HWRM
46547 	 */
46548 	uint16_t	target_id;
46549 	/*
46550 	 * A physical address pointer pointing to a host buffer that the
46551 	 * command's response data will be written. This can be either a host
46552 	 * physical address (HPA) or a guest physical address (GPA) and must
46553 	 * point to a physically contiguous block of memory.
46554 	 */
46555 	uint64_t	resp_addr;
46556 	uint32_t	enables;
46557 	/*
46558 	 * This bit must be '1' for the new_dst_id field to be
46559 	 * configured.
46560 	 */
46561 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_DST_ID		UINT32_C(0x1)
46562 	/*
46563 	 * This bit must be '1' for the new_mirror_vnic_id field to be
46564 	 * configured.
46565 	 */
46566 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID	UINT32_C(0x2)
46567 	/*
46568 	 * This bit must be '1' for the new_meter_instance_id field to be
46569 	 * configured.
46570 	 */
46571 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_METER_INSTANCE_ID	UINT32_C(0x4)
46572 	uint32_t	flags;
46573 	/*
46574 	 * Setting this bit to 1 indicates that dest_id field contains FID.
46575 	 * Setting this to 0 indicates that dest_id field contains VNIC or
46576 	 * VPORT.
46577 	 */
46578 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_FLAGS_DEST_FID		UINT32_C(0x1)
46579 	/*
46580 	 * Setting of this flag indicates that the new_dst_id field contains
46581 	 * RFS ring table index. If this is not set it indicates new_dst_id
46582 	 * is VNIC or VPORT or function ID. Note dest_fid and
46583 	 * dest_rfs_ring_idx can't be set at the same time.
46584 	 */
46585 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_FLAGS_DEST_RFS_RING_IDX	UINT32_C(0x2)
46586 	/*
46587 	 * Setting of this flag indicates that when the ntuple filter is
46588 	 * created, the L2 context should not be used in the filter. This
46589 	 * allows packet from different L2 contexts to match and be directed
46590 	 * to the same destination.
46591 	 */
46592 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_FLAGS_NO_L2_CONTEXT	UINT32_C(0x4)
46593 	/* This value is an opaque id into CFA data structures. */
46594 	uint64_t	ntuple_filter_id;
46595 	/*
46596 	 * If set, this value shall represent the new
46597 	 * Logical VNIC ID of the destination VNIC for the RX
46598 	 * path and new network port id of the destination port for
46599 	 * the TX path.
46600 	 */
46601 	uint32_t	new_dst_id;
46602 	/*
46603 	 * New Logical VNIC ID of the VNIC where traffic is
46604 	 * mirrored.
46605 	 */
46606 	uint32_t	new_mirror_vnic_id;
46607 	/*
46608 	 * New meter to attach to the flow. Specifying the
46609 	 * invalid instance ID is used to remove any existing
46610 	 * meter from the flow.
46611 	 */
46612 	uint16_t	new_meter_instance_id;
46613 	/*
46614 	 * A value of 0xfff is considered invalid and implies the
46615 	 * instance is not configured.
46616 	 */
46617 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID UINT32_C(0xffff)
46618 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_LAST   HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID
46619 	uint8_t	unused_1[6];
46620 } hwrm_cfa_ntuple_filter_cfg_input_t, *phwrm_cfa_ntuple_filter_cfg_input_t;
46621 
46622 /* hwrm_cfa_ntuple_filter_cfg_output (size:128b/16B) */
46623 
46624 typedef struct hwrm_cfa_ntuple_filter_cfg_output {
46625 	/* The specific error status for the command. */
46626 	uint16_t	error_code;
46627 	/* The HWRM command request type. */
46628 	uint16_t	req_type;
46629 	/* The sequence ID from the original command. */
46630 	uint16_t	seq_id;
46631 	/* The length of the response data in number of bytes. */
46632 	uint16_t	resp_len;
46633 	uint8_t	unused_0[7];
46634 	/*
46635 	 * This field is used in Output records to indicate that the output
46636 	 * is completely written to RAM. This field should be read as '1'
46637 	 * to indicate that the output has been completely written.
46638 	 * When writing a command completion or response to an internal
46639 	 * processor, the order of writes has to be such that this field is
46640 	 * written last.
46641 	 */
46642 	uint8_t	valid;
46643 } hwrm_cfa_ntuple_filter_cfg_output_t, *phwrm_cfa_ntuple_filter_cfg_output_t;
46644 
46645 /**************************
46646  * hwrm_cfa_em_flow_alloc *
46647  **************************/
46648 
46649 
46650 /* hwrm_cfa_em_flow_alloc_input (size:896b/112B) */
46651 
46652 typedef struct hwrm_cfa_em_flow_alloc_input {
46653 	/* The HWRM command request type. */
46654 	uint16_t	req_type;
46655 	/*
46656 	 * The completion ring to send the completion event on. This should
46657 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46658 	 */
46659 	uint16_t	cmpl_ring;
46660 	/*
46661 	 * The sequence ID is used by the driver for tracking multiple
46662 	 * commands. This ID is treated as opaque data by the firmware and
46663 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46664 	 */
46665 	uint16_t	seq_id;
46666 	/*
46667 	 * The target ID of the command:
46668 	 * * 0x0-0xFFF8 - The function ID
46669 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46670 	 * * 0xFFFD - Reserved for user-space HWRM interface
46671 	 * * 0xFFFF - HWRM
46672 	 */
46673 	uint16_t	target_id;
46674 	/*
46675 	 * A physical address pointer pointing to a host buffer that the
46676 	 * command's response data will be written. This can be either a host
46677 	 * physical address (HPA) or a guest physical address (GPA) and must
46678 	 * point to a physically contiguous block of memory.
46679 	 */
46680 	uint64_t	resp_addr;
46681 	uint32_t	flags;
46682 	/*
46683 	 * Enumeration denoting the RX, TX type of the resource.
46684 	 * This enumeration is used for resources that are similar for both
46685 	 * TX and RX paths of the chip.
46686 	 */
46687 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH	UINT32_C(0x1)
46688 	/* tx path */
46689 		#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
46690 	/* rx path */
46691 		#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
46692 		#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_LAST	HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX
46693 	/*
46694 	 * Setting of this flag indicates enabling of a byte counter for a
46695 	 * given flow.
46696 	 */
46697 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_BYTE_CTR	UINT32_C(0x2)
46698 	/*
46699 	 * Setting of this flag indicates enabling of a packet counter for a
46700 	 * given flow.
46701 	 */
46702 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PKT_CTR	UINT32_C(0x4)
46703 	/*
46704 	 * Setting of this flag indicates de-capsulation action for the
46705 	 * given flow.
46706 	 */
46707 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DECAP	UINT32_C(0x8)
46708 	/*
46709 	 * Setting of this flag indicates encapsulation action for the
46710 	 * given flow.
46711 	 */
46712 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_ENCAP	UINT32_C(0x10)
46713 	/*
46714 	 * Setting of this flag indicates drop action. If this flag is not
46715 	 * set, then it should be considered accept action.
46716 	 */
46717 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DROP	UINT32_C(0x20)
46718 	/*
46719 	 * Setting of this flag indicates that a meter is expected to be
46720 	 * attached to this flow. This hint can be used when choosing the
46721 	 * action record format required for the flow.
46722 	 */
46723 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_METER	UINT32_C(0x40)
46724 	uint32_t	enables;
46725 	/*
46726 	 * This bit must be '1' for the l2_filter_id field to be
46727 	 * configured.
46728 	 */
46729 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID	UINT32_C(0x1)
46730 	/*
46731 	 * This bit must be '1' for the tunnel_type field to be
46732 	 * configured.
46733 	 */
46734 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_TYPE	UINT32_C(0x2)
46735 	/*
46736 	 * This bit must be '1' for the tunnel_id field to be
46737 	 * configured.
46738 	 */
46739 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_ID		UINT32_C(0x4)
46740 	/*
46741 	 * This bit must be '1' for the src_macaddr field to be
46742 	 * configured.
46743 	 */
46744 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_MACADDR	UINT32_C(0x8)
46745 	/*
46746 	 * This bit must be '1' for the dst_macaddr field to be
46747 	 * configured.
46748 	 */
46749 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_MACADDR	UINT32_C(0x10)
46750 	/*
46751 	 * This bit must be '1' for the ovlan_vid field to be
46752 	 * configured.
46753 	 */
46754 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_OVLAN_VID		UINT32_C(0x20)
46755 	/*
46756 	 * This bit must be '1' for the ivlan_vid field to be
46757 	 * configured.
46758 	 */
46759 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IVLAN_VID		UINT32_C(0x40)
46760 	/*
46761 	 * This bit must be '1' for the ethertype field to be
46762 	 * configured.
46763 	 */
46764 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ETHERTYPE		UINT32_C(0x80)
46765 	/*
46766 	 * This bit must be '1' for the src_ipaddr field to be
46767 	 * configured.
46768 	 */
46769 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_IPADDR		UINT32_C(0x100)
46770 	/*
46771 	 * This bit must be '1' for the dst_ipaddr field to be
46772 	 * configured.
46773 	 */
46774 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_IPADDR		UINT32_C(0x200)
46775 	/*
46776 	 * This bit must be '1' for the ipaddr_type field to be
46777 	 * configured.
46778 	 */
46779 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IPADDR_TYPE	UINT32_C(0x400)
46780 	/*
46781 	 * This bit must be '1' for the ip_protocol field to be
46782 	 * configured.
46783 	 */
46784 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IP_PROTOCOL	UINT32_C(0x800)
46785 	/*
46786 	 * This bit must be '1' for the src_port field to be
46787 	 * configured.
46788 	 */
46789 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_PORT		UINT32_C(0x1000)
46790 	/*
46791 	 * This bit must be '1' for the dst_port field to be
46792 	 * configured.
46793 	 */
46794 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_PORT		UINT32_C(0x2000)
46795 	/*
46796 	 * This bit must be '1' for the dst_id field to be
46797 	 * configured.
46798 	 */
46799 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_ID		UINT32_C(0x4000)
46800 	/*
46801 	 * This bit must be '1' for the mirror_vnic_id field to be
46802 	 * configured.
46803 	 */
46804 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID	UINT32_C(0x8000)
46805 	/*
46806 	 * This bit must be '1' for the encap_record_id field to be
46807 	 * configured.
46808 	 */
46809 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ENCAP_RECORD_ID	UINT32_C(0x10000)
46810 	/*
46811 	 * This bit must be '1' for the meter_instance_id field to be
46812 	 * configured.
46813 	 */
46814 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_METER_INSTANCE_ID	UINT32_C(0x20000)
46815 	/*
46816 	 * This value identifies a set of CFA data structures used for an L2
46817 	 * context.
46818 	 */
46819 	uint64_t	l2_filter_id;
46820 	/* Tunnel Type. */
46821 	uint8_t	tunnel_type;
46822 	/* Non-tunnel */
46823 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
46824 	/* Virtual eXtensible Local Area Network (VXLAN) */
46825 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
46826 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
46827 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
46828 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
46829 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
46830 	/* IP in IP */
46831 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
46832 	/* Generic Network Virtualization Encapsulation (Geneve) */
46833 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
46834 	/* Multi-Protocol Label Switching (MPLS) */
46835 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
46836 	/* Stateless Transport Tunnel (STT) */
46837 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
46838 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
46839 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
46840 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
46841 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
46842 	/*
46843 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
46844 	 * datagram payload
46845 	 */
46846 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
46847 	/* Use fixed layer 2 ether type of 0xFFFF */
46848 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
46849 	/*
46850 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
46851 	 * (IPV6oVXLANGPE)
46852 	 */
46853 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
46854 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
46855 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
46856 	/* Any tunneled traffic */
46857 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
46858 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
46859 	uint8_t	unused_0[3];
46860 	/*
46861 	 * Tunnel identifier.
46862 	 * Virtual Network Identifier (VNI). Only valid with
46863 	 * tunnel_types VXLAN, NVGRE, and Geneve.
46864 	 * Only lower 24-bits of VNI field are used
46865 	 * in setting up the filter.
46866 	 */
46867 	uint32_t	tunnel_id;
46868 	/*
46869 	 * This value indicates the source MAC address in
46870 	 * the Ethernet header.
46871 	 */
46872 	uint8_t	src_macaddr[6];
46873 	/* The meter instance to attach to the flow. */
46874 	uint16_t	meter_instance_id;
46875 	/*
46876 	 * A value of 0xfff is considered invalid and implies the
46877 	 * instance is not configured.
46878 	 */
46879 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID UINT32_C(0xffff)
46880 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_LAST   HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID
46881 	/*
46882 	 * This value indicates the destination MAC address in
46883 	 * the Ethernet header.
46884 	 */
46885 	uint8_t	dst_macaddr[6];
46886 	/*
46887 	 * This value indicates the VLAN ID of the outer VLAN tag
46888 	 * in the Ethernet header.
46889 	 */
46890 	uint16_t	ovlan_vid;
46891 	/*
46892 	 * This value indicates the VLAN ID of the inner VLAN tag
46893 	 * in the Ethernet header.
46894 	 */
46895 	uint16_t	ivlan_vid;
46896 	/* This value indicates the ethertype in the Ethernet header. */
46897 	uint16_t	ethertype;
46898 	/*
46899 	 * This value indicates the type of IP address.
46900 	 * 4 - IPv4
46901 	 * 6 - IPv6
46902 	 * All others are invalid.
46903 	 */
46904 	uint8_t	ip_addr_type;
46905 	/* invalid */
46906 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0)
46907 	/* IPv4 */
46908 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV4	UINT32_C(0x4)
46909 	/* IPv6 */
46910 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6	UINT32_C(0x6)
46911 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_LAST   HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
46912 	/*
46913 	 * The value of protocol field in IP header.
46914 	 * Applies to UDP and TCP traffic.
46915 	 * 6 - TCP
46916 	 * 17 - UDP
46917 	 */
46918 	uint8_t	ip_protocol;
46919 	/* invalid */
46920 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0)
46921 	/* TCP */
46922 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_TCP	UINT32_C(0x6)
46923 	/* UDP */
46924 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP	UINT32_C(0x11)
46925 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_LAST   HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP
46926 	uint8_t	unused_1[2];
46927 	/*
46928 	 * The value of source IP address to be used in filtering.
46929 	 * For IPv4, first four bytes represent the IP address.
46930 	 */
46931 	uint32_t	src_ipaddr[4];
46932 	/*
46933 	 * big_endian = True
46934 	 *	The value of destination IP address to be used in filtering.
46935 	 *	For IPv4, first four bytes represent the IP address.
46936 	 */
46937 	uint32_t	dst_ipaddr[4];
46938 	/*
46939 	 * The value of source port to be used in filtering.
46940 	 * Applies to UDP and TCP traffic.
46941 	 */
46942 	uint16_t	src_port;
46943 	/*
46944 	 * The value of destination port to be used in filtering.
46945 	 * Applies to UDP and TCP traffic.
46946 	 */
46947 	uint16_t	dst_port;
46948 	/*
46949 	 * If set, this value shall represent the
46950 	 * Logical VNIC ID of the destination VNIC for the RX
46951 	 * path and network port id of the destination port for
46952 	 * the TX path.
46953 	 */
46954 	uint16_t	dst_id;
46955 	/*
46956 	 * Logical VNIC ID of the VNIC where traffic is
46957 	 * mirrored.
46958 	 */
46959 	uint16_t	mirror_vnic_id;
46960 	/* Logical ID of the encapsulation record. */
46961 	uint32_t	encap_record_id;
46962 	uint8_t	unused_2[4];
46963 } hwrm_cfa_em_flow_alloc_input_t, *phwrm_cfa_em_flow_alloc_input_t;
46964 
46965 /* hwrm_cfa_em_flow_alloc_output (size:192b/24B) */
46966 
46967 typedef struct hwrm_cfa_em_flow_alloc_output {
46968 	/* The specific error status for the command. */
46969 	uint16_t	error_code;
46970 	/* The HWRM command request type. */
46971 	uint16_t	req_type;
46972 	/* The sequence ID from the original command. */
46973 	uint16_t	seq_id;
46974 	/* The length of the response data in number of bytes. */
46975 	uint16_t	resp_len;
46976 	/* This value is an opaque id into CFA data structures. */
46977 	uint64_t	em_filter_id;
46978 	/*
46979 	 * The flow id value in bit 0-29 is the actual ID of the flow
46980 	 * associated with this filter and it shall be used to match
46981 	 * and associate the flow identifier returned in completion
46982 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
46983 	 * shall indicate no valid flow id.
46984 	 */
46985 	uint32_t	flow_id;
46986 	/* Indicate the flow id value. */
46987 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK UINT32_C(0x3fffffff)
46988 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
46989 	/* Indicate type of the flow. */
46990 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE	UINT32_C(0x40000000)
46991 	/*
46992 	 * If this bit set to 0, then it indicates that the flow is
46993 	 * internal flow.
46994 	 */
46995 		#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_INT	(UINT32_C(0x0) << 30)
46996 	/*
46997 	 * If this bit is set to 1, then it indicates that the flow is
46998 	 * external flow.
46999 	 */
47000 		#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT	(UINT32_C(0x1) << 30)
47001 		#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST  HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
47002 	/* Indicate the flow direction. */
47003 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR	UINT32_C(0x80000000)
47004 	/* If this bit set to 0, then it indicates rx flow. */
47005 		#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_RX	(UINT32_C(0x0) << 31)
47006 	/* If this bit is set to 1, then it indicates that tx flow. */
47007 		#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX	(UINT32_C(0x1) << 31)
47008 		#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_LAST   HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX
47009 	uint8_t	unused_0[3];
47010 	/*
47011 	 * This field is used in Output records to indicate that the output
47012 	 * is completely written to RAM. This field should be read as '1'
47013 	 * to indicate that the output has been completely written.
47014 	 * When writing a command completion or response to an internal
47015 	 * processor, the order of writes has to be such that this field is
47016 	 * written last.
47017 	 */
47018 	uint8_t	valid;
47019 } hwrm_cfa_em_flow_alloc_output_t, *phwrm_cfa_em_flow_alloc_output_t;
47020 
47021 /*************************
47022  * hwrm_cfa_em_flow_free *
47023  *************************/
47024 
47025 
47026 /* hwrm_cfa_em_flow_free_input (size:192b/24B) */
47027 
47028 typedef struct hwrm_cfa_em_flow_free_input {
47029 	/* The HWRM command request type. */
47030 	uint16_t	req_type;
47031 	/*
47032 	 * The completion ring to send the completion event on. This should
47033 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47034 	 */
47035 	uint16_t	cmpl_ring;
47036 	/*
47037 	 * The sequence ID is used by the driver for tracking multiple
47038 	 * commands. This ID is treated as opaque data by the firmware and
47039 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47040 	 */
47041 	uint16_t	seq_id;
47042 	/*
47043 	 * The target ID of the command:
47044 	 * * 0x0-0xFFF8 - The function ID
47045 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47046 	 * * 0xFFFD - Reserved for user-space HWRM interface
47047 	 * * 0xFFFF - HWRM
47048 	 */
47049 	uint16_t	target_id;
47050 	/*
47051 	 * A physical address pointer pointing to a host buffer that the
47052 	 * command's response data will be written. This can be either a host
47053 	 * physical address (HPA) or a guest physical address (GPA) and must
47054 	 * point to a physically contiguous block of memory.
47055 	 */
47056 	uint64_t	resp_addr;
47057 	/* This value is an opaque id into CFA data structures. */
47058 	uint64_t	em_filter_id;
47059 } hwrm_cfa_em_flow_free_input_t, *phwrm_cfa_em_flow_free_input_t;
47060 
47061 /* hwrm_cfa_em_flow_free_output (size:128b/16B) */
47062 
47063 typedef struct hwrm_cfa_em_flow_free_output {
47064 	/* The specific error status for the command. */
47065 	uint16_t	error_code;
47066 	/* The HWRM command request type. */
47067 	uint16_t	req_type;
47068 	/* The sequence ID from the original command. */
47069 	uint16_t	seq_id;
47070 	/* The length of the response data in number of bytes. */
47071 	uint16_t	resp_len;
47072 	uint8_t	unused_0[7];
47073 	/*
47074 	 * This field is used in Output records to indicate that the output
47075 	 * is completely written to RAM. This field should be read as '1'
47076 	 * to indicate that the output has been completely written.
47077 	 * When writing a command completion or response to an internal
47078 	 * processor, the order of writes has to be such that this field is
47079 	 * written last.
47080 	 */
47081 	uint8_t	valid;
47082 } hwrm_cfa_em_flow_free_output_t, *phwrm_cfa_em_flow_free_output_t;
47083 
47084 /************************
47085  * hwrm_cfa_em_flow_cfg *
47086  ************************/
47087 
47088 
47089 /* hwrm_cfa_em_flow_cfg_input (size:384b/48B) */
47090 
47091 typedef struct hwrm_cfa_em_flow_cfg_input {
47092 	/* The HWRM command request type. */
47093 	uint16_t	req_type;
47094 	/*
47095 	 * The completion ring to send the completion event on. This should
47096 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47097 	 */
47098 	uint16_t	cmpl_ring;
47099 	/*
47100 	 * The sequence ID is used by the driver for tracking multiple
47101 	 * commands. This ID is treated as opaque data by the firmware and
47102 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47103 	 */
47104 	uint16_t	seq_id;
47105 	/*
47106 	 * The target ID of the command:
47107 	 * * 0x0-0xFFF8 - The function ID
47108 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47109 	 * * 0xFFFD - Reserved for user-space HWRM interface
47110 	 * * 0xFFFF - HWRM
47111 	 */
47112 	uint16_t	target_id;
47113 	/*
47114 	 * A physical address pointer pointing to a host buffer that the
47115 	 * command's response data will be written. This can be either a host
47116 	 * physical address (HPA) or a guest physical address (GPA) and must
47117 	 * point to a physically contiguous block of memory.
47118 	 */
47119 	uint64_t	resp_addr;
47120 	uint32_t	enables;
47121 	/*
47122 	 * This bit must be '1' for the new_dst_id field to be
47123 	 * configured.
47124 	 */
47125 	#define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_DST_ID		UINT32_C(0x1)
47126 	/*
47127 	 * This bit must be '1' for the new_mirror_vnic_id field to be
47128 	 * configured.
47129 	 */
47130 	#define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID	UINT32_C(0x2)
47131 	/*
47132 	 * This bit must be '1' for the new_meter_instance_id field to be
47133 	 * configured.
47134 	 */
47135 	#define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_METER_INSTANCE_ID	UINT32_C(0x4)
47136 	uint8_t	unused_0[4];
47137 	/* This value is an opaque id into CFA data structures. */
47138 	uint64_t	em_filter_id;
47139 	/*
47140 	 * If set, this value shall represent the new
47141 	 * Logical VNIC ID of the destination VNIC for the RX
47142 	 * path and network port id of the destination port for
47143 	 * the TX path.
47144 	 */
47145 	uint32_t	new_dst_id;
47146 	/*
47147 	 * New Logical VNIC ID of the VNIC where traffic is
47148 	 * mirrored.
47149 	 */
47150 	uint32_t	new_mirror_vnic_id;
47151 	/*
47152 	 * New meter to attach to the flow. Specifying the
47153 	 * invalid instance ID is used to remove any existing
47154 	 * meter from the flow.
47155 	 */
47156 	uint16_t	new_meter_instance_id;
47157 	/*
47158 	 * A value of 0xfff is considered invalid and implies the
47159 	 * instance is not configured.
47160 	 */
47161 	#define HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID UINT32_C(0xffff)
47162 	#define HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_LAST   HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID
47163 	uint8_t	unused_1[6];
47164 } hwrm_cfa_em_flow_cfg_input_t, *phwrm_cfa_em_flow_cfg_input_t;
47165 
47166 /* hwrm_cfa_em_flow_cfg_output (size:128b/16B) */
47167 
47168 typedef struct hwrm_cfa_em_flow_cfg_output {
47169 	/* The specific error status for the command. */
47170 	uint16_t	error_code;
47171 	/* The HWRM command request type. */
47172 	uint16_t	req_type;
47173 	/* The sequence ID from the original command. */
47174 	uint16_t	seq_id;
47175 	/* The length of the response data in number of bytes. */
47176 	uint16_t	resp_len;
47177 	uint8_t	unused_0[7];
47178 	/*
47179 	 * This field is used in Output records to indicate that the output
47180 	 * is completely written to RAM. This field should be read as '1'
47181 	 * to indicate that the output has been completely written.
47182 	 * When writing a command completion or response to an internal
47183 	 * processor, the order of writes has to be such that this field is
47184 	 * written last.
47185 	 */
47186 	uint8_t	valid;
47187 } hwrm_cfa_em_flow_cfg_output_t, *phwrm_cfa_em_flow_cfg_output_t;
47188 
47189 /************************
47190  * hwrm_cfa_meter_qcaps *
47191  ************************/
47192 
47193 
47194 /* hwrm_cfa_meter_qcaps_input (size:128b/16B) */
47195 
47196 typedef struct hwrm_cfa_meter_qcaps_input {
47197 	/* The HWRM command request type. */
47198 	uint16_t	req_type;
47199 	/*
47200 	 * The completion ring to send the completion event on. This should
47201 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47202 	 */
47203 	uint16_t	cmpl_ring;
47204 	/*
47205 	 * The sequence ID is used by the driver for tracking multiple
47206 	 * commands. This ID is treated as opaque data by the firmware and
47207 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47208 	 */
47209 	uint16_t	seq_id;
47210 	/*
47211 	 * The target ID of the command:
47212 	 * * 0x0-0xFFF8 - The function ID
47213 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47214 	 * * 0xFFFD - Reserved for user-space HWRM interface
47215 	 * * 0xFFFF - HWRM
47216 	 */
47217 	uint16_t	target_id;
47218 	/*
47219 	 * A physical address pointer pointing to a host buffer that the
47220 	 * command's response data will be written. This can be either a host
47221 	 * physical address (HPA) or a guest physical address (GPA) and must
47222 	 * point to a physically contiguous block of memory.
47223 	 */
47224 	uint64_t	resp_addr;
47225 } hwrm_cfa_meter_qcaps_input_t, *phwrm_cfa_meter_qcaps_input_t;
47226 
47227 /* hwrm_cfa_meter_qcaps_output (size:320b/40B) */
47228 
47229 typedef struct hwrm_cfa_meter_qcaps_output {
47230 	/* The specific error status for the command. */
47231 	uint16_t	error_code;
47232 	/* The HWRM command request type. */
47233 	uint16_t	req_type;
47234 	/* The sequence ID from the original command. */
47235 	uint16_t	seq_id;
47236 	/* The length of the response data in number of bytes. */
47237 	uint16_t	resp_len;
47238 	uint32_t	flags;
47239 	/*
47240 	 * Enumeration denoting the clock at which the Meter is running
47241 	 * with. This enumeration is used for resources that are similar
47242 	 * for both TX and RX paths of the chip.
47243 	 */
47244 	#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_MASK  UINT32_C(0xf)
47245 	#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_SFT   0
47246 	/* 375 MHz */
47247 		#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_375MHZ  UINT32_C(0x0)
47248 	/* 625 MHz */
47249 		#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_625MHZ  UINT32_C(0x1)
47250 		#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_LAST   HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_625MHZ
47251 	uint8_t	unused_0[4];
47252 	/*
47253 	 * The minimum guaranteed number of tx meter profiles supported
47254 	 * for this function.
47255 	 */
47256 	uint16_t	min_tx_profile;
47257 	/*
47258 	 * The maximum non-guaranteed number of tx meter profiles supported
47259 	 * for this function.
47260 	 */
47261 	uint16_t	max_tx_profile;
47262 	/*
47263 	 * The minimum guaranteed number of rx meter profiles supported
47264 	 * for this function.
47265 	 */
47266 	uint16_t	min_rx_profile;
47267 	/*
47268 	 * The maximum non-guaranteed number of rx meter profiles supported
47269 	 * for this function.
47270 	 */
47271 	uint16_t	max_rx_profile;
47272 	/*
47273 	 * The minimum guaranteed number of tx meter instances supported
47274 	 * for this function.
47275 	 */
47276 	uint16_t	min_tx_instance;
47277 	/*
47278 	 * The maximum non-guaranteed number of tx meter instances supported
47279 	 * for this function.
47280 	 */
47281 	uint16_t	max_tx_instance;
47282 	/*
47283 	 * The minimum guaranteed number of rx meter instances supported
47284 	 * for this function.
47285 	 */
47286 	uint16_t	min_rx_instance;
47287 	/*
47288 	 * The maximum non-guaranteed number of rx meter instances supported
47289 	 * for this function.
47290 	 */
47291 	uint16_t	max_rx_instance;
47292 	uint8_t	unused_1[7];
47293 	/*
47294 	 * This field is used in Output records to indicate that the output
47295 	 * is completely written to RAM. This field should be read as '1'
47296 	 * to indicate that the output has been completely written.
47297 	 * When writing a command completion or response to an internal
47298 	 * processor, the order of writes has to be such that this field is
47299 	 * written last.
47300 	 */
47301 	uint8_t	valid;
47302 } hwrm_cfa_meter_qcaps_output_t, *phwrm_cfa_meter_qcaps_output_t;
47303 
47304 /********************************
47305  * hwrm_cfa_meter_profile_alloc *
47306  ********************************/
47307 
47308 
47309 /* hwrm_cfa_meter_profile_alloc_input (size:320b/40B) */
47310 
47311 typedef struct hwrm_cfa_meter_profile_alloc_input {
47312 	/* The HWRM command request type. */
47313 	uint16_t	req_type;
47314 	/*
47315 	 * The completion ring to send the completion event on. This should
47316 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47317 	 */
47318 	uint16_t	cmpl_ring;
47319 	/*
47320 	 * The sequence ID is used by the driver for tracking multiple
47321 	 * commands. This ID is treated as opaque data by the firmware and
47322 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47323 	 */
47324 	uint16_t	seq_id;
47325 	/*
47326 	 * The target ID of the command:
47327 	 * * 0x0-0xFFF8 - The function ID
47328 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47329 	 * * 0xFFFD - Reserved for user-space HWRM interface
47330 	 * * 0xFFFF - HWRM
47331 	 */
47332 	uint16_t	target_id;
47333 	/*
47334 	 * A physical address pointer pointing to a host buffer that the
47335 	 * command's response data will be written. This can be either a host
47336 	 * physical address (HPA) or a guest physical address (GPA) and must
47337 	 * point to a physically contiguous block of memory.
47338 	 */
47339 	uint64_t	resp_addr;
47340 	uint8_t	flags;
47341 	/*
47342 	 * Enumeration denoting the RX, TX type of the resource.
47343 	 * This enumeration is used for resources that are similar for both
47344 	 * TX and RX paths of the chip.
47345 	 */
47346 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH	UINT32_C(0x1)
47347 	/* tx path */
47348 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
47349 	/* rx path */
47350 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
47351 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_LAST HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_RX
47352 	/* The meter algorithm type. */
47353 	uint8_t	meter_type;
47354 	/* RFC 2697 (srTCM) */
47355 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC2697 UINT32_C(0x0)
47356 	/* RFC 2698 (trTCM) */
47357 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC2698 UINT32_C(0x1)
47358 	/* RFC 4115 (trTCM) */
47359 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC4115 UINT32_C(0x2)
47360 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_LAST   HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC4115
47361 	/*
47362 	 * This field is reserved for the future use.
47363 	 * It shall be set to 0.
47364 	 */
47365 	uint16_t	reserved1;
47366 	/*
47367 	 * This field is reserved for the future use.
47368 	 * It shall be set to 0.
47369 	 */
47370 	uint32_t	reserved2;
47371 	/* A meter rate specified in bytes-per-second. */
47372 	uint32_t	commit_rate;
47373 	/* The bandwidth value. */
47374 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_MASK		UINT32_C(0xfffffff)
47375 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_SFT		0
47376 	/* The granularity of the value (bits or bytes). */
47377 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE			UINT32_C(0x10000000)
47378 	/* Value is in bits. */
47379 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BITS		(UINT32_C(0x0) << 28)
47380 	/* Value is in bytes. */
47381 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BYTES		(UINT32_C(0x1) << 28)
47382 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_LAST		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BYTES
47383 	/* bw_value_unit is 3 b */
47384 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47385 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_SFT	29
47386 	/* Value is in Mb or MB (base 10). */
47387 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47388 	/* Value is in Kb or KB (base 10). */
47389 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47390 	/* Value is in bits or bytes. */
47391 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47392 	/* Value is in Gb or GB (base 10). */
47393 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47394 	/* Value is in 1/100th of a percentage of total bandwidth. */
47395 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47396 	/* Raw value */
47397 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW	(UINT32_C(0x7) << 29)
47398 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW
47399 	/* A meter burst size specified in bytes. */
47400 	uint32_t	commit_burst;
47401 	/* The bandwidth value. */
47402 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_MASK		UINT32_C(0xfffffff)
47403 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_SFT		0
47404 	/* The granularity of the value (bits or bytes). */
47405 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE			UINT32_C(0x10000000)
47406 	/* Value is in bits. */
47407 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BITS		(UINT32_C(0x0) << 28)
47408 	/* Value is in bytes. */
47409 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BYTES		(UINT32_C(0x1) << 28)
47410 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_LAST		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BYTES
47411 	/* bw_value_unit is 3 b */
47412 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47413 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_SFT	29
47414 	/* Value is in Mb or MB (base 10). */
47415 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47416 	/* Value is in Kb or KB (base 10). */
47417 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47418 	/* Value is in bits or bytes. */
47419 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47420 	/* Value is in Gb or GB (base 10). */
47421 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47422 	/* Value is in 1/100th of a percentage of total bandwidth. */
47423 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47424 	/* Invalid value */
47425 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
47426 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID
47427 	/* A meter rate specified in bytes-per-second. */
47428 	uint32_t	excess_peak_rate;
47429 	/* The bandwidth value. */
47430 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_MASK		UINT32_C(0xfffffff)
47431 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_SFT		0
47432 	/* The granularity of the value (bits or bytes). */
47433 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE			UINT32_C(0x10000000)
47434 	/* Value is in bits. */
47435 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BITS		(UINT32_C(0x0) << 28)
47436 	/* Value is in bytes. */
47437 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES		(UINT32_C(0x1) << 28)
47438 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_LAST		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES
47439 	/* bw_value_unit is 3 b */
47440 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47441 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_SFT	29
47442 	/* Value is in Mb or MB (base 10). */
47443 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47444 	/* Value is in Kb or KB (base 10). */
47445 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47446 	/* Value is in bits or bytes. */
47447 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47448 	/* Value is in Gb or GB (base 10). */
47449 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47450 	/* Value is in 1/100th of a percentage of total bandwidth. */
47451 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47452 	/* Raw unit */
47453 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW	(UINT32_C(0x7) << 29)
47454 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW
47455 	/* A meter burst size specified in bytes. */
47456 	uint32_t	excess_peak_burst;
47457 	/* The bandwidth value. */
47458 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_MASK		UINT32_C(0xfffffff)
47459 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_SFT		0
47460 	/* The granularity of the value (bits or bytes). */
47461 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE			UINT32_C(0x10000000)
47462 	/* Value is in bits. */
47463 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BITS		(UINT32_C(0x0) << 28)
47464 	/* Value is in bytes. */
47465 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES		(UINT32_C(0x1) << 28)
47466 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_LAST		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES
47467 	/* bw_value_unit is 3 b */
47468 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47469 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_SFT	29
47470 	/* Value is in Mb or MB (base 10). */
47471 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47472 	/* Value is in Kb or KB (base 10). */
47473 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47474 	/* Value is in bits or bytes. */
47475 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47476 	/* Value is in Gb or GB (base 10). */
47477 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47478 	/* Value is in 1/100th of a percentage of total bandwidth. */
47479 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47480 	/* Invalid unit */
47481 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
47482 		#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID
47483 } hwrm_cfa_meter_profile_alloc_input_t, *phwrm_cfa_meter_profile_alloc_input_t;
47484 
47485 /* hwrm_cfa_meter_profile_alloc_output (size:128b/16B) */
47486 
47487 typedef struct hwrm_cfa_meter_profile_alloc_output {
47488 	/* The specific error status for the command. */
47489 	uint16_t	error_code;
47490 	/* The HWRM command request type. */
47491 	uint16_t	req_type;
47492 	/* The sequence ID from the original command. */
47493 	uint16_t	seq_id;
47494 	/* The length of the response data in number of bytes. */
47495 	uint16_t	resp_len;
47496 	/* This value identifies a meter profile in CFA. */
47497 	uint16_t	meter_profile_id;
47498 	/*
47499 	 * A value of 0xfff is considered invalid and implies the
47500 	 * profile is not configured.
47501 	 */
47502 	#define HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_INVALID UINT32_C(0xffff)
47503 	#define HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_LAST   HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_INVALID
47504 	uint8_t	unused_0[5];
47505 	/*
47506 	 * This field is used in Output records to indicate that the output
47507 	 * is completely written to RAM. This field should be read as '1'
47508 	 * to indicate that the output has been completely written.
47509 	 * When writing a command completion or response to an internal
47510 	 * processor, the order of writes has to be such that this field is
47511 	 * written last.
47512 	 */
47513 	uint8_t	valid;
47514 } hwrm_cfa_meter_profile_alloc_output_t, *phwrm_cfa_meter_profile_alloc_output_t;
47515 
47516 /*******************************
47517  * hwrm_cfa_meter_profile_free *
47518  *******************************/
47519 
47520 
47521 /* hwrm_cfa_meter_profile_free_input (size:192b/24B) */
47522 
47523 typedef struct hwrm_cfa_meter_profile_free_input {
47524 	/* The HWRM command request type. */
47525 	uint16_t	req_type;
47526 	/*
47527 	 * The completion ring to send the completion event on. This should
47528 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47529 	 */
47530 	uint16_t	cmpl_ring;
47531 	/*
47532 	 * The sequence ID is used by the driver for tracking multiple
47533 	 * commands. This ID is treated as opaque data by the firmware and
47534 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47535 	 */
47536 	uint16_t	seq_id;
47537 	/*
47538 	 * The target ID of the command:
47539 	 * * 0x0-0xFFF8 - The function ID
47540 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47541 	 * * 0xFFFD - Reserved for user-space HWRM interface
47542 	 * * 0xFFFF - HWRM
47543 	 */
47544 	uint16_t	target_id;
47545 	/*
47546 	 * A physical address pointer pointing to a host buffer that the
47547 	 * command's response data will be written. This can be either a host
47548 	 * physical address (HPA) or a guest physical address (GPA) and must
47549 	 * point to a physically contiguous block of memory.
47550 	 */
47551 	uint64_t	resp_addr;
47552 	uint8_t	flags;
47553 	/*
47554 	 * Enumeration denoting the RX, TX type of the resource.
47555 	 * This enumeration is used for resources that are similar for both
47556 	 * TX and RX paths of the chip.
47557 	 */
47558 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH	UINT32_C(0x1)
47559 	/* tx path */
47560 		#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
47561 	/* rx path */
47562 		#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
47563 		#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_LAST HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_RX
47564 	uint8_t	unused_0;
47565 	/* This value identifies a meter profile in CFA. */
47566 	uint16_t	meter_profile_id;
47567 	/*
47568 	 * A value of 0xfff is considered invalid and implies the
47569 	 * profile is not configured.
47570 	 */
47571 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_INVALID UINT32_C(0xffff)
47572 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_LAST   HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_INVALID
47573 	uint8_t	unused_1[4];
47574 } hwrm_cfa_meter_profile_free_input_t, *phwrm_cfa_meter_profile_free_input_t;
47575 
47576 /* hwrm_cfa_meter_profile_free_output (size:128b/16B) */
47577 
47578 typedef struct hwrm_cfa_meter_profile_free_output {
47579 	/* The specific error status for the command. */
47580 	uint16_t	error_code;
47581 	/* The HWRM command request type. */
47582 	uint16_t	req_type;
47583 	/* The sequence ID from the original command. */
47584 	uint16_t	seq_id;
47585 	/* The length of the response data in number of bytes. */
47586 	uint16_t	resp_len;
47587 	uint8_t	unused_0[7];
47588 	/*
47589 	 * This field is used in Output records to indicate that the output
47590 	 * is completely written to RAM. This field should be read as '1'
47591 	 * to indicate that the output has been completely written.
47592 	 * When writing a command completion or response to an internal
47593 	 * processor, the order of writes has to be such that this field is
47594 	 * written last.
47595 	 */
47596 	uint8_t	valid;
47597 } hwrm_cfa_meter_profile_free_output_t, *phwrm_cfa_meter_profile_free_output_t;
47598 
47599 /******************************
47600  * hwrm_cfa_meter_profile_cfg *
47601  ******************************/
47602 
47603 
47604 /* hwrm_cfa_meter_profile_cfg_input (size:320b/40B) */
47605 
47606 typedef struct hwrm_cfa_meter_profile_cfg_input {
47607 	/* The HWRM command request type. */
47608 	uint16_t	req_type;
47609 	/*
47610 	 * The completion ring to send the completion event on. This should
47611 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47612 	 */
47613 	uint16_t	cmpl_ring;
47614 	/*
47615 	 * The sequence ID is used by the driver for tracking multiple
47616 	 * commands. This ID is treated as opaque data by the firmware and
47617 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47618 	 */
47619 	uint16_t	seq_id;
47620 	/*
47621 	 * The target ID of the command:
47622 	 * * 0x0-0xFFF8 - The function ID
47623 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47624 	 * * 0xFFFD - Reserved for user-space HWRM interface
47625 	 * * 0xFFFF - HWRM
47626 	 */
47627 	uint16_t	target_id;
47628 	/*
47629 	 * A physical address pointer pointing to a host buffer that the
47630 	 * command's response data will be written. This can be either a host
47631 	 * physical address (HPA) or a guest physical address (GPA) and must
47632 	 * point to a physically contiguous block of memory.
47633 	 */
47634 	uint64_t	resp_addr;
47635 	uint8_t	flags;
47636 	/*
47637 	 * Enumeration denoting the RX, TX type of the resource.
47638 	 * This enumeration is used for resources that are similar for both
47639 	 * TX and RX paths of the chip.
47640 	 */
47641 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH	UINT32_C(0x1)
47642 	/* tx path */
47643 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
47644 	/* rx path */
47645 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
47646 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_LAST HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_RX
47647 	/* The meter algorithm type. */
47648 	uint8_t	meter_type;
47649 	/* RFC 2697 (srTCM) */
47650 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC2697 UINT32_C(0x0)
47651 	/* RFC 2698 (trTCM) */
47652 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC2698 UINT32_C(0x1)
47653 	/* RFC 4115 (trTCM) */
47654 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC4115 UINT32_C(0x2)
47655 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_LAST   HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC4115
47656 	/* This value identifies a meter profile in CFA. */
47657 	uint16_t	meter_profile_id;
47658 	/*
47659 	 * A value of 0xfff is considered invalid and implies the
47660 	 * profile is not configured.
47661 	 */
47662 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_INVALID UINT32_C(0xffff)
47663 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_LAST   HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_INVALID
47664 	/*
47665 	 * This field is reserved for the future use.
47666 	 * It shall be set to 0.
47667 	 */
47668 	uint32_t	reserved;
47669 	/* A meter rate specified in bytes-per-second. */
47670 	uint32_t	commit_rate;
47671 	/* The bandwidth value. */
47672 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_MASK		UINT32_C(0xfffffff)
47673 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_SFT		0
47674 	/* The granularity of the value (bits or bytes). */
47675 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE			UINT32_C(0x10000000)
47676 	/* Value is in bits. */
47677 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BITS		(UINT32_C(0x0) << 28)
47678 	/* Value is in bytes. */
47679 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BYTES		(UINT32_C(0x1) << 28)
47680 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_LAST		HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BYTES
47681 	/* bw_value_unit is 3 b */
47682 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47683 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_SFT	29
47684 	/* Value is in Mb or MB (base 10). */
47685 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47686 	/* Value is in Kb or KB (base 10). */
47687 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47688 	/* Value is in bits or bytes. */
47689 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47690 	/* Value is in Gb or GB (base 10). */
47691 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47692 	/* Value is in 1/100th of a percentage of total bandwidth. */
47693 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47694 	/* Raw value */
47695 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW	(UINT32_C(0x7) << 29)
47696 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW
47697 	/* A meter burst size specified in bytes. */
47698 	uint32_t	commit_burst;
47699 	/* The bandwidth value. */
47700 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_MASK		UINT32_C(0xfffffff)
47701 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_SFT		0
47702 	/* The granularity of the value (bits or bytes). */
47703 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE			UINT32_C(0x10000000)
47704 	/* Value is in bits. */
47705 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BITS		(UINT32_C(0x0) << 28)
47706 	/* Value is in bytes. */
47707 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BYTES		(UINT32_C(0x1) << 28)
47708 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_LAST		HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BYTES
47709 	/* bw_value_unit is 3 b */
47710 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47711 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_SFT	29
47712 	/* Value is in Mb or MB (base 10). */
47713 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47714 	/* Value is in Kb or KB (base 10). */
47715 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47716 	/* Value is in bits or bytes. */
47717 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47718 	/* Value is in Gb or GB (base 10). */
47719 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47720 	/* Value is in 1/100th of a percentage of total bandwidth. */
47721 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47722 	/* Invalid value */
47723 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
47724 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID
47725 	/* A meter rate specified in bytes-per-second. */
47726 	uint32_t	excess_peak_rate;
47727 	/* The bandwidth value. */
47728 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_MASK		UINT32_C(0xfffffff)
47729 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_SFT		0
47730 	/* The granularity of the value (bits or bytes). */
47731 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE			UINT32_C(0x10000000)
47732 	/* Value is in bits. */
47733 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BITS		(UINT32_C(0x0) << 28)
47734 	/* Value is in bytes. */
47735 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES		(UINT32_C(0x1) << 28)
47736 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_LAST		HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES
47737 	/* bw_value_unit is 3 b */
47738 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47739 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_SFT	29
47740 	/* Value is in Mb or MB (base 10). */
47741 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47742 	/* Value is in Kb or KB (base 10). */
47743 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47744 	/* Value is in bits or bytes. */
47745 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47746 	/* Value is in Gb or GB (base 10). */
47747 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47748 	/* Value is in 1/100th of a percentage of total bandwidth. */
47749 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47750 	/* Raw unit */
47751 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW	(UINT32_C(0x7) << 29)
47752 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW
47753 	/* A meter burst size specified in bytes. */
47754 	uint32_t	excess_peak_burst;
47755 	/* The bandwidth value. */
47756 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_MASK		UINT32_C(0xfffffff)
47757 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_SFT		0
47758 	/* The granularity of the value (bits or bytes). */
47759 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE			UINT32_C(0x10000000)
47760 	/* Value is in bits. */
47761 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BITS		(UINT32_C(0x0) << 28)
47762 	/* Value is in bytes. */
47763 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES		(UINT32_C(0x1) << 28)
47764 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_LAST		HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES
47765 	/* bw_value_unit is 3 b */
47766 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MASK	UINT32_C(0xe0000000)
47767 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_SFT	29
47768 	/* Value is in Mb or MB (base 10). */
47769 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MEGA	(UINT32_C(0x0) << 29)
47770 	/* Value is in Kb or KB (base 10). */
47771 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_KILO	(UINT32_C(0x2) << 29)
47772 	/* Value is in bits or bytes. */
47773 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_BASE	(UINT32_C(0x4) << 29)
47774 	/* Value is in Gb or GB (base 10). */
47775 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_GIGA	(UINT32_C(0x6) << 29)
47776 	/* Value is in 1/100th of a percentage of total bandwidth. */
47777 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_PERCENT1_100  (UINT32_C(0x1) << 29)
47778 	/* Invalid unit */
47779 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID	(UINT32_C(0x7) << 29)
47780 		#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_LAST	HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID
47781 } hwrm_cfa_meter_profile_cfg_input_t, *phwrm_cfa_meter_profile_cfg_input_t;
47782 
47783 /* hwrm_cfa_meter_profile_cfg_output (size:128b/16B) */
47784 
47785 typedef struct hwrm_cfa_meter_profile_cfg_output {
47786 	/* The specific error status for the command. */
47787 	uint16_t	error_code;
47788 	/* The HWRM command request type. */
47789 	uint16_t	req_type;
47790 	/* The sequence ID from the original command. */
47791 	uint16_t	seq_id;
47792 	/* The length of the response data in number of bytes. */
47793 	uint16_t	resp_len;
47794 	uint8_t	unused_0[7];
47795 	/*
47796 	 * This field is used in Output records to indicate that the output
47797 	 * is completely written to RAM. This field should be read as '1'
47798 	 * to indicate that the output has been completely written.
47799 	 * When writing a command completion or response to an internal
47800 	 * processor, the order of writes has to be such that this field is
47801 	 * written last.
47802 	 */
47803 	uint8_t	valid;
47804 } hwrm_cfa_meter_profile_cfg_output_t, *phwrm_cfa_meter_profile_cfg_output_t;
47805 
47806 /*********************************
47807  * hwrm_cfa_meter_instance_alloc *
47808  *********************************/
47809 
47810 
47811 /* hwrm_cfa_meter_instance_alloc_input (size:192b/24B) */
47812 
47813 typedef struct hwrm_cfa_meter_instance_alloc_input {
47814 	/* The HWRM command request type. */
47815 	uint16_t	req_type;
47816 	/*
47817 	 * The completion ring to send the completion event on. This should
47818 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47819 	 */
47820 	uint16_t	cmpl_ring;
47821 	/*
47822 	 * The sequence ID is used by the driver for tracking multiple
47823 	 * commands. This ID is treated as opaque data by the firmware and
47824 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47825 	 */
47826 	uint16_t	seq_id;
47827 	/*
47828 	 * The target ID of the command:
47829 	 * * 0x0-0xFFF8 - The function ID
47830 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47831 	 * * 0xFFFD - Reserved for user-space HWRM interface
47832 	 * * 0xFFFF - HWRM
47833 	 */
47834 	uint16_t	target_id;
47835 	/*
47836 	 * A physical address pointer pointing to a host buffer that the
47837 	 * command's response data will be written. This can be either a host
47838 	 * physical address (HPA) or a guest physical address (GPA) and must
47839 	 * point to a physically contiguous block of memory.
47840 	 */
47841 	uint64_t	resp_addr;
47842 	uint8_t	flags;
47843 	/*
47844 	 * Enumeration denoting the RX, TX type of the resource.
47845 	 * This enumeration is used for resources that are similar for both
47846 	 * TX and RX paths of the chip.
47847 	 */
47848 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH	UINT32_C(0x1)
47849 	/* tx path */
47850 		#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
47851 	/* rx path */
47852 		#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
47853 		#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_LAST HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_RX
47854 	uint8_t	unused_0;
47855 	/* This value identifies a meter profile in CFA. */
47856 	uint16_t	meter_profile_id;
47857 	/*
47858 	 * A value of 0xffff is considered invalid and implies the
47859 	 * profile is not configured.
47860 	 */
47861 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_INVALID UINT32_C(0xffff)
47862 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_LAST   HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_INVALID
47863 	uint8_t	unused_1[4];
47864 } hwrm_cfa_meter_instance_alloc_input_t, *phwrm_cfa_meter_instance_alloc_input_t;
47865 
47866 /* hwrm_cfa_meter_instance_alloc_output (size:128b/16B) */
47867 
47868 typedef struct hwrm_cfa_meter_instance_alloc_output {
47869 	/* The specific error status for the command. */
47870 	uint16_t	error_code;
47871 	/* The HWRM command request type. */
47872 	uint16_t	req_type;
47873 	/* The sequence ID from the original command. */
47874 	uint16_t	seq_id;
47875 	/* The length of the response data in number of bytes. */
47876 	uint16_t	resp_len;
47877 	/* This value identifies a meter instance in CFA. */
47878 	uint16_t	meter_instance_id;
47879 	/*
47880 	 * A value of 0xffff is considered invalid and implies the
47881 	 * instance is not configured.
47882 	 */
47883 	#define HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_INVALID UINT32_C(0xffff)
47884 	#define HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_LAST   HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_INVALID
47885 	uint8_t	unused_0[5];
47886 	/*
47887 	 * This field is used in Output records to indicate that the output
47888 	 * is completely written to RAM. This field should be read as '1'
47889 	 * to indicate that the output has been completely written.
47890 	 * When writing a command completion or response to an internal
47891 	 * processor, the order of writes has to be such that this field is
47892 	 * written last.
47893 	 */
47894 	uint8_t	valid;
47895 } hwrm_cfa_meter_instance_alloc_output_t, *phwrm_cfa_meter_instance_alloc_output_t;
47896 
47897 /*******************************
47898  * hwrm_cfa_meter_instance_cfg *
47899  *******************************/
47900 
47901 
47902 /* hwrm_cfa_meter_instance_cfg_input (size:192b/24B) */
47903 
47904 typedef struct hwrm_cfa_meter_instance_cfg_input {
47905 	/* The HWRM command request type. */
47906 	uint16_t	req_type;
47907 	/*
47908 	 * The completion ring to send the completion event on. This should
47909 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47910 	 */
47911 	uint16_t	cmpl_ring;
47912 	/*
47913 	 * The sequence ID is used by the driver for tracking multiple
47914 	 * commands. This ID is treated as opaque data by the firmware and
47915 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47916 	 */
47917 	uint16_t	seq_id;
47918 	/*
47919 	 * The target ID of the command:
47920 	 * * 0x0-0xFFF8 - The function ID
47921 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47922 	 * * 0xFFFD - Reserved for user-space HWRM interface
47923 	 * * 0xFFFF - HWRM
47924 	 */
47925 	uint16_t	target_id;
47926 	/*
47927 	 * A physical address pointer pointing to a host buffer that the
47928 	 * command's response data will be written. This can be either a host
47929 	 * physical address (HPA) or a guest physical address (GPA) and must
47930 	 * point to a physically contiguous block of memory.
47931 	 */
47932 	uint64_t	resp_addr;
47933 	uint8_t	flags;
47934 	/*
47935 	 * Enumeration denoting the RX, TX type of the resource.
47936 	 * This enumeration is used for resources that are similar for both
47937 	 * TX and RX paths of the chip.
47938 	 */
47939 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH	UINT32_C(0x1)
47940 	/* tx path */
47941 		#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
47942 	/* rx path */
47943 		#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
47944 		#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_LAST HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_RX
47945 	uint8_t	unused_0;
47946 	/*
47947 	 * This value identifies a new meter profile to be associated with
47948 	 * the meter instance specified in this command.
47949 	 */
47950 	uint16_t	meter_profile_id;
47951 	/*
47952 	 * A value of 0xffff is considered invalid and implies the
47953 	 * profile is not configured.
47954 	 */
47955 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_METER_PROFILE_ID_INVALID UINT32_C(0xffff)
47956 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_METER_PROFILE_ID_LAST   HWRM_CFA_METER_INSTANCE_CFG_INPUT_METER_PROFILE_ID_INVALID
47957 	/*
47958 	 * This value identifies the ID of a meter instance that needs to be
47959 	 * updated with a new meter profile specified in this command.
47960 	 */
47961 	uint16_t	meter_instance_id;
47962 	uint8_t	unused_1[2];
47963 } hwrm_cfa_meter_instance_cfg_input_t, *phwrm_cfa_meter_instance_cfg_input_t;
47964 
47965 /* hwrm_cfa_meter_instance_cfg_output (size:128b/16B) */
47966 
47967 typedef struct hwrm_cfa_meter_instance_cfg_output {
47968 	/* The specific error status for the command. */
47969 	uint16_t	error_code;
47970 	/* The HWRM command request type. */
47971 	uint16_t	req_type;
47972 	/* The sequence ID from the original command. */
47973 	uint16_t	seq_id;
47974 	/* The length of the response data in number of bytes. */
47975 	uint16_t	resp_len;
47976 	uint8_t	unused_0[7];
47977 	/*
47978 	 * This field is used in Output records to indicate that the output
47979 	 * is completely written to RAM. This field should be read as '1'
47980 	 * to indicate that the output has been completely written.
47981 	 * When writing a command completion or response to an internal
47982 	 * processor, the order of writes has to be such that this field is
47983 	 * written last.
47984 	 */
47985 	uint8_t	valid;
47986 } hwrm_cfa_meter_instance_cfg_output_t, *phwrm_cfa_meter_instance_cfg_output_t;
47987 
47988 /********************************
47989  * hwrm_cfa_meter_instance_free *
47990  ********************************/
47991 
47992 
47993 /* hwrm_cfa_meter_instance_free_input (size:192b/24B) */
47994 
47995 typedef struct hwrm_cfa_meter_instance_free_input {
47996 	/* The HWRM command request type. */
47997 	uint16_t	req_type;
47998 	/*
47999 	 * The completion ring to send the completion event on. This should
48000 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48001 	 */
48002 	uint16_t	cmpl_ring;
48003 	/*
48004 	 * The sequence ID is used by the driver for tracking multiple
48005 	 * commands. This ID is treated as opaque data by the firmware and
48006 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48007 	 */
48008 	uint16_t	seq_id;
48009 	/*
48010 	 * The target ID of the command:
48011 	 * * 0x0-0xFFF8 - The function ID
48012 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48013 	 * * 0xFFFD - Reserved for user-space HWRM interface
48014 	 * * 0xFFFF - HWRM
48015 	 */
48016 	uint16_t	target_id;
48017 	/*
48018 	 * A physical address pointer pointing to a host buffer that the
48019 	 * command's response data will be written. This can be either a host
48020 	 * physical address (HPA) or a guest physical address (GPA) and must
48021 	 * point to a physically contiguous block of memory.
48022 	 */
48023 	uint64_t	resp_addr;
48024 	uint8_t	flags;
48025 	/*
48026 	 * Enumeration denoting the RX, TX type of the resource.
48027 	 * This enumeration is used for resources that are similar for both
48028 	 * TX and RX paths of the chip.
48029 	 */
48030 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH	UINT32_C(0x1)
48031 	/* tx path */
48032 		#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
48033 	/* rx path */
48034 		#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
48035 		#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_LAST HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_RX
48036 	uint8_t	unused_0;
48037 	/* This value identifies a meter instance in CFA. */
48038 	uint16_t	meter_instance_id;
48039 	/*
48040 	 * A value of 0xfff is considered invalid and implies the
48041 	 * instance is not configured.
48042 	 */
48043 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_INVALID UINT32_C(0xffff)
48044 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_LAST   HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_INVALID
48045 	uint8_t	unused_1[4];
48046 } hwrm_cfa_meter_instance_free_input_t, *phwrm_cfa_meter_instance_free_input_t;
48047 
48048 /* hwrm_cfa_meter_instance_free_output (size:128b/16B) */
48049 
48050 typedef struct hwrm_cfa_meter_instance_free_output {
48051 	/* The specific error status for the command. */
48052 	uint16_t	error_code;
48053 	/* The HWRM command request type. */
48054 	uint16_t	req_type;
48055 	/* The sequence ID from the original command. */
48056 	uint16_t	seq_id;
48057 	/* The length of the response data in number of bytes. */
48058 	uint16_t	resp_len;
48059 	uint8_t	unused_0[7];
48060 	/*
48061 	 * This field is used in Output records to indicate that the output
48062 	 * is completely written to RAM. This field should be read as '1'
48063 	 * to indicate that the output has been completely written.
48064 	 * When writing a command completion or response to an internal
48065 	 * processor, the order of writes has to be such that this field is
48066 	 * written last.
48067 	 */
48068 	uint8_t	valid;
48069 } hwrm_cfa_meter_instance_free_output_t, *phwrm_cfa_meter_instance_free_output_t;
48070 
48071 /*******************************
48072  * hwrm_cfa_decap_filter_alloc *
48073  *******************************/
48074 
48075 
48076 /* hwrm_cfa_decap_filter_alloc_input (size:832b/104B) */
48077 
48078 typedef struct hwrm_cfa_decap_filter_alloc_input {
48079 	/* The HWRM command request type. */
48080 	uint16_t	req_type;
48081 	/*
48082 	 * The completion ring to send the completion event on. This should
48083 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48084 	 */
48085 	uint16_t	cmpl_ring;
48086 	/*
48087 	 * The sequence ID is used by the driver for tracking multiple
48088 	 * commands. This ID is treated as opaque data by the firmware and
48089 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48090 	 */
48091 	uint16_t	seq_id;
48092 	/*
48093 	 * The target ID of the command:
48094 	 * * 0x0-0xFFF8 - The function ID
48095 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48096 	 * * 0xFFFD - Reserved for user-space HWRM interface
48097 	 * * 0xFFFF - HWRM
48098 	 */
48099 	uint16_t	target_id;
48100 	/*
48101 	 * A physical address pointer pointing to a host buffer that the
48102 	 * command's response data will be written. This can be either a host
48103 	 * physical address (HPA) or a guest physical address (GPA) and must
48104 	 * point to a physically contiguous block of memory.
48105 	 */
48106 	uint64_t	resp_addr;
48107 	uint32_t	flags;
48108 	/* ovs_tunnel is 1 b */
48109 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_FLAGS_OVS_TUNNEL	UINT32_C(0x1)
48110 	uint32_t	enables;
48111 	/*
48112 	 * This bit must be '1' for the tunnel_type field to be
48113 	 * configured.
48114 	 */
48115 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE	UINT32_C(0x1)
48116 	/*
48117 	 * This bit must be '1' for the tunnel_id field to be
48118 	 * configured.
48119 	 */
48120 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_ID	UINT32_C(0x2)
48121 	/*
48122 	 * This bit must be '1' for the src_macaddr field to be
48123 	 * configured.
48124 	 */
48125 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR	UINT32_C(0x4)
48126 	/*
48127 	 * This bit must be '1' for the dst_macaddr field to be
48128 	 * configured.
48129 	 */
48130 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR	UINT32_C(0x8)
48131 	/*
48132 	 * This bit must be '1' for the ovlan_vid field to be
48133 	 * configured.
48134 	 */
48135 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_OVLAN_VID	UINT32_C(0x10)
48136 	/*
48137 	 * This bit must be '1' for the ivlan_vid field to be
48138 	 * configured.
48139 	 */
48140 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IVLAN_VID	UINT32_C(0x20)
48141 	/*
48142 	 * This bit must be '1' for the t_ovlan_vid field to be
48143 	 * configured.
48144 	 */
48145 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_T_OVLAN_VID	UINT32_C(0x40)
48146 	/*
48147 	 * This bit must be '1' for the t_ivlan_vid field to be
48148 	 * configured.
48149 	 */
48150 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_T_IVLAN_VID	UINT32_C(0x80)
48151 	/*
48152 	 * This bit must be '1' for the ethertype field to be
48153 	 * configured.
48154 	 */
48155 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE	UINT32_C(0x100)
48156 	/*
48157 	 * This bit must be '1' for the src_ipaddr field to be
48158 	 * configured.
48159 	 */
48160 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR	UINT32_C(0x200)
48161 	/*
48162 	 * This bit must be '1' for the dst_ipaddr field to be
48163 	 * configured.
48164 	 */
48165 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR	UINT32_C(0x400)
48166 	/*
48167 	 * This bit must be '1' for the ipaddr_type field to be
48168 	 * configured.
48169 	 */
48170 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE	UINT32_C(0x800)
48171 	/*
48172 	 * This bit must be '1' for the ip_protocol field to be
48173 	 * configured.
48174 	 */
48175 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL	UINT32_C(0x1000)
48176 	/*
48177 	 * This bit must be '1' for the src_port field to be
48178 	 * configured.
48179 	 */
48180 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT	UINT32_C(0x2000)
48181 	/*
48182 	 * This bit must be '1' for the dst_port field to be
48183 	 * configured.
48184 	 */
48185 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_PORT	UINT32_C(0x4000)
48186 	/*
48187 	 * This bit must be '1' for the dst_id field to be
48188 	 * configured.
48189 	 */
48190 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_ID		UINT32_C(0x8000)
48191 	/*
48192 	 * This bit must be '1' for the mirror_vnic_id field to be
48193 	 * configured.
48194 	 */
48195 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID	UINT32_C(0x10000)
48196 	/*
48197 	 * Tunnel identifier.
48198 	 * Virtual Network Identifier (VNI). Only valid with
48199 	 * tunnel_types VXLAN, NVGRE, and Geneve.
48200 	 * Only lower 24-bits of VNI field are used
48201 	 * in setting up the filter.
48202 	 */
48203 	uint32_t	tunnel_id;
48204 	/* Tunnel Type. */
48205 	uint8_t	tunnel_type;
48206 	/* Non-tunnel */
48207 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
48208 	/* Virtual eXtensible Local Area Network (VXLAN) */
48209 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
48210 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
48211 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
48212 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
48213 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
48214 	/* IP in IP */
48215 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
48216 	/* Generic Network Virtualization Encapsulation (Geneve) */
48217 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
48218 	/* Multi-Protocol Label Switching (MPLS) */
48219 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
48220 	/* Stateless Transport Tunnel (STT) */
48221 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
48222 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
48223 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
48224 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
48225 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
48226 	/*
48227 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
48228 	 * datagram payload
48229 	 */
48230 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
48231 	/* Use fixed layer 2 ether type of 0xFFFF */
48232 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
48233 	/*
48234 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
48235 	 * (IPV6oVXLANGPE)
48236 	 */
48237 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
48238 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
48239 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
48240 	/* Any tunneled traffic */
48241 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
48242 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
48243 	uint8_t	unused_0;
48244 	uint16_t	unused_1;
48245 	/*
48246 	 * This value indicates the source MAC address in
48247 	 * the Ethernet header.
48248 	 */
48249 	uint8_t	src_macaddr[6];
48250 	uint8_t	unused_2[2];
48251 	/*
48252 	 * This value indicates the destination MAC address in
48253 	 * the Ethernet header.
48254 	 */
48255 	uint8_t	dst_macaddr[6];
48256 	/*
48257 	 * This value indicates the VLAN ID of the outer VLAN tag
48258 	 * in the Ethernet header.
48259 	 */
48260 	uint16_t	ovlan_vid;
48261 	/*
48262 	 * This value indicates the VLAN ID of the inner VLAN tag
48263 	 * in the Ethernet header.
48264 	 */
48265 	uint16_t	ivlan_vid;
48266 	/*
48267 	 * This value indicates the VLAN ID of the outer VLAN tag
48268 	 * in the tunnel Ethernet header.
48269 	 */
48270 	uint16_t	t_ovlan_vid;
48271 	/*
48272 	 * This value indicates the VLAN ID of the inner VLAN tag
48273 	 * in the tunnel Ethernet header.
48274 	 */
48275 	uint16_t	t_ivlan_vid;
48276 	/* This value indicates the ethertype in the Ethernet header. */
48277 	uint16_t	ethertype;
48278 	/*
48279 	 * This value indicates the type of IP address.
48280 	 * 4 - IPv4
48281 	 * 6 - IPv6
48282 	 * All others are invalid.
48283 	 */
48284 	uint8_t	ip_addr_type;
48285 	/* invalid */
48286 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0)
48287 	/* IPv4 */
48288 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4	UINT32_C(0x4)
48289 	/* IPv6 */
48290 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6	UINT32_C(0x6)
48291 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST   HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
48292 	/*
48293 	 * The value of protocol field in IP header.
48294 	 * Applies to UDP and TCP traffic.
48295 	 * 6 - TCP
48296 	 * 17 - UDP
48297 	 */
48298 	uint8_t	ip_protocol;
48299 	/* invalid */
48300 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0)
48301 	/* TCP */
48302 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP	UINT32_C(0x6)
48303 	/* UDP */
48304 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP	UINT32_C(0x11)
48305 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST   HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP
48306 	uint16_t	unused_3;
48307 	uint32_t	unused_4;
48308 	/*
48309 	 * The value of source IP address to be used in filtering.
48310 	 * For IPv4, first four bytes represent the IP address.
48311 	 */
48312 	uint32_t	src_ipaddr[4];
48313 	/*
48314 	 * The value of destination IP address to be used in filtering.
48315 	 * For IPv4, first four bytes represent the IP address.
48316 	 */
48317 	uint32_t	dst_ipaddr[4];
48318 	/*
48319 	 * The value of source port to be used in filtering.
48320 	 * Applies to UDP and TCP traffic.
48321 	 */
48322 	uint16_t	src_port;
48323 	/*
48324 	 * The value of destination port to be used in filtering.
48325 	 * Applies to UDP and TCP traffic.
48326 	 */
48327 	uint16_t	dst_port;
48328 	/*
48329 	 * If set, this value shall represent the
48330 	 * Logical VNIC ID of the destination VNIC for the RX
48331 	 * path.
48332 	 */
48333 	uint16_t	dst_id;
48334 	/*
48335 	 * If set, this value shall represent the L2 context that matches the
48336 	 * L2 information of the decap filter.
48337 	 */
48338 	uint16_t	l2_ctxt_ref_id;
48339 } hwrm_cfa_decap_filter_alloc_input_t, *phwrm_cfa_decap_filter_alloc_input_t;
48340 
48341 /* hwrm_cfa_decap_filter_alloc_output (size:128b/16B) */
48342 
48343 typedef struct hwrm_cfa_decap_filter_alloc_output {
48344 	/* The specific error status for the command. */
48345 	uint16_t	error_code;
48346 	/* The HWRM command request type. */
48347 	uint16_t	req_type;
48348 	/* The sequence ID from the original command. */
48349 	uint16_t	seq_id;
48350 	/* The length of the response data in number of bytes. */
48351 	uint16_t	resp_len;
48352 	/* This value is an opaque id into CFA data structures. */
48353 	uint32_t	decap_filter_id;
48354 	uint8_t	unused_0[3];
48355 	/*
48356 	 * This field is used in Output records to indicate that the output
48357 	 * is completely written to RAM. This field should be read as '1'
48358 	 * to indicate that the output has been completely written.
48359 	 * When writing a command completion or response to an internal
48360 	 * processor, the order of writes has to be such that this field is
48361 	 * written last.
48362 	 */
48363 	uint8_t	valid;
48364 } hwrm_cfa_decap_filter_alloc_output_t, *phwrm_cfa_decap_filter_alloc_output_t;
48365 
48366 /******************************
48367  * hwrm_cfa_decap_filter_free *
48368  ******************************/
48369 
48370 
48371 /* hwrm_cfa_decap_filter_free_input (size:192b/24B) */
48372 
48373 typedef struct hwrm_cfa_decap_filter_free_input {
48374 	/* The HWRM command request type. */
48375 	uint16_t	req_type;
48376 	/*
48377 	 * The completion ring to send the completion event on. This should
48378 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48379 	 */
48380 	uint16_t	cmpl_ring;
48381 	/*
48382 	 * The sequence ID is used by the driver for tracking multiple
48383 	 * commands. This ID is treated as opaque data by the firmware and
48384 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48385 	 */
48386 	uint16_t	seq_id;
48387 	/*
48388 	 * The target ID of the command:
48389 	 * * 0x0-0xFFF8 - The function ID
48390 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48391 	 * * 0xFFFD - Reserved for user-space HWRM interface
48392 	 * * 0xFFFF - HWRM
48393 	 */
48394 	uint16_t	target_id;
48395 	/*
48396 	 * A physical address pointer pointing to a host buffer that the
48397 	 * command's response data will be written. This can be either a host
48398 	 * physical address (HPA) or a guest physical address (GPA) and must
48399 	 * point to a physically contiguous block of memory.
48400 	 */
48401 	uint64_t	resp_addr;
48402 	/* This value is an opaque id into CFA data structures. */
48403 	uint32_t	decap_filter_id;
48404 	uint8_t	unused_0[4];
48405 } hwrm_cfa_decap_filter_free_input_t, *phwrm_cfa_decap_filter_free_input_t;
48406 
48407 /* hwrm_cfa_decap_filter_free_output (size:128b/16B) */
48408 
48409 typedef struct hwrm_cfa_decap_filter_free_output {
48410 	/* The specific error status for the command. */
48411 	uint16_t	error_code;
48412 	/* The HWRM command request type. */
48413 	uint16_t	req_type;
48414 	/* The sequence ID from the original command. */
48415 	uint16_t	seq_id;
48416 	/* The length of the response data in number of bytes. */
48417 	uint16_t	resp_len;
48418 	uint8_t	unused_0[7];
48419 	/*
48420 	 * This field is used in Output records to indicate that the output
48421 	 * is completely written to RAM. This field should be read as '1'
48422 	 * to indicate that the output has been completely written.
48423 	 * When writing a command completion or response to an internal
48424 	 * processor, the order of writes has to be such that this field is
48425 	 * written last.
48426 	 */
48427 	uint8_t	valid;
48428 } hwrm_cfa_decap_filter_free_output_t, *phwrm_cfa_decap_filter_free_output_t;
48429 
48430 /***********************
48431  * hwrm_cfa_flow_alloc *
48432  ***********************/
48433 
48434 
48435 /* hwrm_cfa_flow_alloc_input (size:1024b/128B) */
48436 
48437 typedef struct hwrm_cfa_flow_alloc_input {
48438 	/* The HWRM command request type. */
48439 	uint16_t	req_type;
48440 	/*
48441 	 * The completion ring to send the completion event on. This should
48442 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48443 	 */
48444 	uint16_t	cmpl_ring;
48445 	/*
48446 	 * The sequence ID is used by the driver for tracking multiple
48447 	 * commands. This ID is treated as opaque data by the firmware and
48448 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48449 	 */
48450 	uint16_t	seq_id;
48451 	/*
48452 	 * The target ID of the command:
48453 	 * * 0x0-0xFFF8 - The function ID
48454 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48455 	 * * 0xFFFD - Reserved for user-space HWRM interface
48456 	 * * 0xFFFF - HWRM
48457 	 */
48458 	uint16_t	target_id;
48459 	/*
48460 	 * A physical address pointer pointing to a host buffer that the
48461 	 * command's response data will be written. This can be either a host
48462 	 * physical address (HPA) or a guest physical address (GPA) and must
48463 	 * point to a physically contiguous block of memory.
48464 	 */
48465 	uint64_t	resp_addr;
48466 	uint16_t	flags;
48467 	/* tunnel is 1 b */
48468 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_TUNNEL		UINT32_C(0x1)
48469 	/* num_vlan is 2 b */
48470 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_MASK	UINT32_C(0x6)
48471 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_SFT	1
48472 	/* no tags */
48473 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_NONE		(UINT32_C(0x0) << 1)
48474 	/* 1 tag */
48475 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_ONE		(UINT32_C(0x1) << 1)
48476 	/* 2 tags */
48477 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_TWO		(UINT32_C(0x2) << 1)
48478 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_LAST	HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_TWO
48479 	/* Enumeration denoting the Flow Type. */
48480 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_MASK	UINT32_C(0x38)
48481 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_SFT	3
48482 	/* L2 flow */
48483 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_L2		(UINT32_C(0x0) << 3)
48484 	/* IPV4 flow */
48485 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV4		(UINT32_C(0x1) << 3)
48486 	/* IPV6 flow */
48487 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV6		(UINT32_C(0x2) << 3)
48488 		#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_LAST	HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV6
48489 	/*
48490 	 * when set to 1, indicates TX flow offload for function specified
48491 	 * in src_fid and the dst_fid should be set to invalid value. To
48492 	 * indicate a VM to VM flow, both of the path_tx and path_rx flags
48493 	 * need to be set. For virtio vSwitch offload case, the src_fid and
48494 	 * dst_fid is set to the same fid value. For the SRIOV vSwitch
48495 	 * offload case, the src_fid and dst_fid must be set to the same VF
48496 	 * FID belong to the children VFs of the same PF to indicate VM to
48497 	 * VM flow.
48498 	 */
48499 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_PATH_TX		UINT32_C(0x40)
48500 	/*
48501 	 * when set to 1, indicates RX flow offload for function specified
48502 	 * in dst_fid and the src_fid should be set to invalid value.
48503 	 */
48504 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_PATH_RX		UINT32_C(0x80)
48505 	/*
48506 	 * Set to 1 to indicate matching of VXLAN VNI from the custom vxlan
48507 	 * header is required and the VXLAN VNI value is stored in the first
48508 	 * 24 bits of the dmac field. This flag is only valid when the flow
48509 	 * direction is RX.
48510 	 */
48511 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_MATCH_VXLAN_IP_VNI	UINT32_C(0x100)
48512 	/*
48513 	 * Set to 1 to indicate vhost_id is specified in the outer_vlan_tci
48514 	 * field.
48515 	 */
48516 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_VHOST_ID_USE_VLAN	UINT32_C(0x200)
48517 	/*
48518 	 * Tx Flow: vf fid.
48519 	 * Rx Flow: pf fid.
48520 	 */
48521 	uint16_t	src_fid;
48522 	/* Tunnel handle valid when tunnel flag is set. */
48523 	uint32_t	tunnel_handle;
48524 	uint16_t	action_flags;
48525 	/*
48526 	 * Setting of this flag indicates drop action. If this flag is not
48527 	 * set, then it should be considered accept action.
48528 	 */
48529 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_FWD			UINT32_C(0x1)
48530 	/* recycle is 1 b */
48531 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_RECYCLE		UINT32_C(0x2)
48532 	/*
48533 	 * Setting of this flag indicates drop action. If this flag is not
48534 	 * set, then it should be considered accept action.
48535 	 */
48536 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_DROP			UINT32_C(0x4)
48537 	/* meter is 1 b */
48538 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_METER			UINT32_C(0x8)
48539 	/* tunnel is 1 b */
48540 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TUNNEL			UINT32_C(0x10)
48541 	/* nat_src is 1 b */
48542 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_SRC		UINT32_C(0x20)
48543 	/* nat_dest is 1 b */
48544 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_DEST		UINT32_C(0x40)
48545 	/* nat_ipv4_address is 1 b */
48546 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_IPV4_ADDRESS	UINT32_C(0x80)
48547 	/* l2_header_rewrite is 1 b */
48548 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_L2_HEADER_REWRITE	UINT32_C(0x100)
48549 	/* ttl_decrement is 1 b */
48550 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TTL_DECREMENT		UINT32_C(0x200)
48551 	/*
48552 	 * If set to 1 and flow direction is TX, it indicates decap of L2
48553 	 * header and encap of tunnel header. If set to 1 and flow direction
48554 	 * is RX, it indicates decap of tunnel header and encap L2 header.
48555 	 * The type of tunnel is specified in the tunnel_type field.
48556 	 */
48557 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TUNNEL_IP		UINT32_C(0x400)
48558 	/* If set to 1, flow aging is enabled for this flow. */
48559 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_FLOW_AGING_ENABLED	UINT32_C(0x800)
48560 	/*
48561 	 * If set to 1 an attempt will be made to try to offload this flow
48562 	 * to the most optimal flow table resource. If set to 0, the flow
48563 	 * will be placed to the default flow table resource.
48564 	 */
48565 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_PRI_HINT		UINT32_C(0x1000)
48566 	/*
48567 	 * If set to 1 there will be no attempt to allocate an on-chip try
48568 	 * to offload this flow. If set to 0, which will keep compatibility
48569 	 * with the older drivers, will cause the FW to attempt to allocate
48570 	 * an on-chip flow counter for the newly created flow. This will
48571 	 * keep the existing behavior with EM flows which always had an
48572 	 * associated flow counter.
48573 	 */
48574 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NO_FLOW_COUNTER_ALLOC	UINT32_C(0x2000)
48575 	/*
48576 	 * Tx Flow: pf or vf fid.
48577 	 * Rx Flow: vf fid.
48578 	 */
48579 	uint16_t	dst_fid;
48580 	/* VLAN tpid, valid when push_vlan flag is set. */
48581 	uint16_t	l2_rewrite_vlan_tpid;
48582 	/* VLAN tci, valid when push_vlan flag is set. */
48583 	uint16_t	l2_rewrite_vlan_tci;
48584 	/* Meter id, valid when meter flag is set. */
48585 	uint16_t	act_meter_id;
48586 	/* Flow with the same l2 context tcam key. */
48587 	uint16_t	ref_flow_handle;
48588 	/* This value sets the match value for the ethertype. */
48589 	uint16_t	ethertype;
48590 	/* valid when num tags is 1 or 2. */
48591 	uint16_t	outer_vlan_tci;
48592 	/* This value sets the match value for the Destination MAC address. */
48593 	uint16_t	dmac[3];
48594 	/* valid when num tags is 2. */
48595 	uint16_t	inner_vlan_tci;
48596 	/* This value sets the match value for the Source MAC address. */
48597 	uint16_t	smac[3];
48598 	/* The bit length of destination IP address mask. */
48599 	uint8_t	ip_dst_mask_len;
48600 	/* The bit length of source IP address mask. */
48601 	uint8_t	ip_src_mask_len;
48602 	/* The value of destination IPv4/IPv6 address. */
48603 	uint32_t	ip_dst[4];
48604 	/* The source IPv4/IPv6 address. */
48605 	uint32_t	ip_src[4];
48606 	/*
48607 	 * The value of source port.
48608 	 * Applies to UDP and TCP traffic.
48609 	 */
48610 	uint16_t	l4_src_port;
48611 	/*
48612 	 * The value of source port mask.
48613 	 * Applies to UDP and TCP traffic.
48614 	 */
48615 	uint16_t	l4_src_port_mask;
48616 	/*
48617 	 * The value of destination port.
48618 	 * Applies to UDP and TCP traffic.
48619 	 */
48620 	uint16_t	l4_dst_port;
48621 	/*
48622 	 * The value of destination port mask.
48623 	 * Applies to UDP and TCP traffic.
48624 	 */
48625 	uint16_t	l4_dst_port_mask;
48626 	/*
48627 	 * NAT IPv4/6 address based on address type flag.
48628 	 * 0 values are ignored.
48629 	 */
48630 	uint32_t	nat_ip_address[4];
48631 	/* L2 header re-write Destination MAC address. */
48632 	uint16_t	l2_rewrite_dmac[3];
48633 	/*
48634 	 * The NAT source/destination port based on direction flag.
48635 	 * Applies to UDP and TCP traffic.
48636 	 * 0 values are ignored.
48637 	 */
48638 	uint16_t	nat_port;
48639 	/* L2 header re-write Source MAC address. */
48640 	uint16_t	l2_rewrite_smac[3];
48641 	/* The value of ip protocol. */
48642 	uint8_t	ip_proto;
48643 	/* Tunnel Type. */
48644 	uint8_t	tunnel_type;
48645 	/* Non-tunnel */
48646 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
48647 	/* Virtual eXtensible Local Area Network (VXLAN) */
48648 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
48649 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
48650 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
48651 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
48652 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
48653 	/* IP in IP */
48654 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
48655 	/* Generic Network Virtualization Encapsulation (Geneve) */
48656 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
48657 	/* Multi-Protocol Label Switching (MPLS) */
48658 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
48659 	/* Stateless Transport Tunnel (STT) */
48660 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_STT	UINT32_C(0x7)
48661 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
48662 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
48663 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
48664 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
48665 	/*
48666 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
48667 	 * datagram payload
48668 	 */
48669 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
48670 	/* Use fixed layer 2 ether type of 0xFFFF */
48671 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
48672 	/*
48673 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
48674 	 * (IPV6oVXLANGPE)
48675 	 */
48676 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
48677 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
48678 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
48679 	/* Any tunneled traffic */
48680 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
48681 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_LAST	HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
48682 } hwrm_cfa_flow_alloc_input_t, *phwrm_cfa_flow_alloc_input_t;
48683 
48684 /* hwrm_cfa_flow_alloc_output (size:256b/32B) */
48685 
48686 typedef struct hwrm_cfa_flow_alloc_output {
48687 	/* The specific error status for the command. */
48688 	uint16_t	error_code;
48689 	/* The HWRM command request type. */
48690 	uint16_t	req_type;
48691 	/* The sequence ID from the original command. */
48692 	uint16_t	seq_id;
48693 	/* The length of the response data in number of bytes. */
48694 	uint16_t	resp_len;
48695 	/* Flow record index. */
48696 	uint16_t	flow_handle;
48697 	uint8_t	unused_0[2];
48698 	/*
48699 	 * The flow id value in bit 0-29 is the actual ID of the flow
48700 	 * associated with this filter and it shall be used to match
48701 	 * and associate the flow identifier returned in completion
48702 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
48703 	 * shall indicate no valid flow id.
48704 	 */
48705 	uint32_t	flow_id;
48706 	/* Indicate the flow id value. */
48707 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK UINT32_C(0x3fffffff)
48708 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
48709 	/* Indicate type of the flow. */
48710 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE	UINT32_C(0x40000000)
48711 	/*
48712 	 * If this bit set to 0, then it indicates that the flow is
48713 	 * internal flow.
48714 	 */
48715 		#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_INT	(UINT32_C(0x0) << 30)
48716 	/*
48717 	 * If this bit is set to 1, then it indicates that the flow is
48718 	 * external flow.
48719 	 */
48720 		#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT	(UINT32_C(0x1) << 30)
48721 		#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST  HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
48722 	/* Indicate the flow direction. */
48723 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR	UINT32_C(0x80000000)
48724 	/* If this bit set to 0, then it indicates rx flow. */
48725 		#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_RX	(UINT32_C(0x0) << 31)
48726 	/* If this bit is set to 1, then it indicates that tx flow. */
48727 		#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX	(UINT32_C(0x1) << 31)
48728 		#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_LAST   HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX
48729 	/* This value identifies a set of CFA data structures used for a flow. */
48730 	uint64_t	ext_flow_handle;
48731 	uint32_t	flow_counter_id;
48732 	uint8_t	unused_1[3];
48733 	/*
48734 	 * This field is used in Output records to indicate that the output
48735 	 * is completely written to RAM. This field should be read as '1'
48736 	 * to indicate that the output has been completely written.
48737 	 * When writing a command completion or response to an internal
48738 	 * processor, the order of writes has to be such that this field is
48739 	 * written last.
48740 	 */
48741 	uint8_t	valid;
48742 } hwrm_cfa_flow_alloc_output_t, *phwrm_cfa_flow_alloc_output_t;
48743 
48744 /* hwrm_cfa_flow_alloc_cmd_err (size:64b/8B) */
48745 
48746 typedef struct hwrm_cfa_flow_alloc_cmd_err {
48747 	/*
48748 	 * command specific error codes that goes to
48749 	 * the cmd_err field in Common HWRM Error Response.
48750 	 */
48751 	uint8_t	code;
48752 	/* Unknown error */
48753 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
48754 	/* No more L2 Context TCAM */
48755 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_L2_CONTEXT_TCAM UINT32_C(0x1)
48756 	/* No more action records */
48757 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_ACTION_RECORD   UINT32_C(0x2)
48758 	/* No more flow counters */
48759 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_COUNTER	UINT32_C(0x3)
48760 	/* No more wild-card TCAM */
48761 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_WILD_CARD_TCAM  UINT32_C(0x4)
48762 	/* Hash collision in exact match tables */
48763 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_HASH_COLLISION  UINT32_C(0x5)
48764 	/* Key is already installed */
48765 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_KEY_EXISTS	UINT32_C(0x6)
48766 	/* Flow Context DB is out of resource */
48767 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_CTXT_DB	UINT32_C(0x7)
48768 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_LAST	HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_CTXT_DB
48769 	uint8_t	unused_0[7];
48770 } hwrm_cfa_flow_alloc_cmd_err_t, *phwrm_cfa_flow_alloc_cmd_err_t;
48771 
48772 /**********************
48773  * hwrm_cfa_flow_free *
48774  **********************/
48775 
48776 
48777 /* hwrm_cfa_flow_free_input (size:256b/32B) */
48778 
48779 typedef struct hwrm_cfa_flow_free_input {
48780 	/* The HWRM command request type. */
48781 	uint16_t	req_type;
48782 	/*
48783 	 * The completion ring to send the completion event on. This should
48784 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48785 	 */
48786 	uint16_t	cmpl_ring;
48787 	/*
48788 	 * The sequence ID is used by the driver for tracking multiple
48789 	 * commands. This ID is treated as opaque data by the firmware and
48790 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48791 	 */
48792 	uint16_t	seq_id;
48793 	/*
48794 	 * The target ID of the command:
48795 	 * * 0x0-0xFFF8 - The function ID
48796 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48797 	 * * 0xFFFD - Reserved for user-space HWRM interface
48798 	 * * 0xFFFF - HWRM
48799 	 */
48800 	uint16_t	target_id;
48801 	/*
48802 	 * A physical address pointer pointing to a host buffer that the
48803 	 * command's response data will be written. This can be either a host
48804 	 * physical address (HPA) or a guest physical address (GPA) and must
48805 	 * point to a physically contiguous block of memory.
48806 	 */
48807 	uint64_t	resp_addr;
48808 	/* Flow record index. */
48809 	uint16_t	flow_handle;
48810 	uint16_t	unused_0;
48811 	/* Flow counter id to be freed. */
48812 	uint32_t	flow_counter_id;
48813 	/* This value identifies a set of CFA data structures used for a flow. */
48814 	uint64_t	ext_flow_handle;
48815 } hwrm_cfa_flow_free_input_t, *phwrm_cfa_flow_free_input_t;
48816 
48817 /* hwrm_cfa_flow_free_output (size:256b/32B) */
48818 
48819 typedef struct hwrm_cfa_flow_free_output {
48820 	/* The specific error status for the command. */
48821 	uint16_t	error_code;
48822 	/* The HWRM command request type. */
48823 	uint16_t	req_type;
48824 	/* The sequence ID from the original command. */
48825 	uint16_t	seq_id;
48826 	/* The length of the response data in number of bytes. */
48827 	uint16_t	resp_len;
48828 	/* packet is 64 b */
48829 	uint64_t	packet;
48830 	/* byte is 64 b */
48831 	uint64_t	byte;
48832 	uint8_t	unused_0[7];
48833 	/*
48834 	 * This field is used in Output records to indicate that the output
48835 	 * is completely written to RAM. This field should be read as '1'
48836 	 * to indicate that the output has been completely written.
48837 	 * When writing a command completion or response to an internal
48838 	 * processor, the order of writes has to be such that this field is
48839 	 * written last.
48840 	 */
48841 	uint8_t	valid;
48842 } hwrm_cfa_flow_free_output_t, *phwrm_cfa_flow_free_output_t;
48843 
48844 /* hwrm_cfa_flow_action_data (size:960b/120B) */
48845 
48846 typedef struct hwrm_cfa_flow_action_data {
48847 	uint16_t	action_flags;
48848 	/* Setting of this flag indicates accept action. */
48849 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_FWD			UINT32_C(0x1)
48850 	/* Setting of this flag indicates recycle action. */
48851 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_RECYCLE		UINT32_C(0x2)
48852 	/* Setting of this flag indicates drop action. */
48853 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_DROP		UINT32_C(0x4)
48854 	/* Setting of this flag indicates meter action. */
48855 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_METER		UINT32_C(0x8)
48856 	/* Setting of this flag indicates tunnel action. */
48857 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_TUNNEL		UINT32_C(0x10)
48858 	/*
48859 	 * If set to 1 and flow direction is TX, it indicates decap of L2
48860 	 * header and encap of tunnel header. If set to 1 and flow direction
48861 	 * is RX, it indicates decap of tunnel header and encap L2 header.
48862 	 */
48863 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_TUNNEL_IP		UINT32_C(0x20)
48864 	/* Setting of this flag indicates ttl decrement action. */
48865 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_TTL_DECREMENT	UINT32_C(0x40)
48866 	/* If set to 1, flow aging is enabled for this flow. */
48867 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_FLOW_AGING_ENABLED	UINT32_C(0x80)
48868 	/* Setting of this flag indicates encap action. */
48869 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_ENCAP		UINT32_C(0x100)
48870 	/* Setting of this flag indicates decap action. */
48871 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_DECAP		UINT32_C(0x200)
48872 	/* Meter id. */
48873 	uint16_t	act_meter_id;
48874 	/* VNIC id. */
48875 	uint16_t	vnic_id;
48876 	/* vport number. */
48877 	uint16_t	vport_id;
48878 	/* The NAT source/destination. */
48879 	uint16_t	nat_port;
48880 	uint16_t	unused_0[3];
48881 	/* NAT IPv4/IPv6 address. */
48882 	uint32_t	nat_ip_address[4];
48883 	/* Encapsulation Type. */
48884 	uint8_t	encap_type;
48885 	/* Virtual eXtensible Local Area Network (VXLAN) */
48886 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN	UINT32_C(0x1)
48887 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
48888 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_NVGRE	UINT32_C(0x2)
48889 	/* Generic Routing Encapsulation (GRE) after inside Ethernet payload */
48890 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_L2GRE	UINT32_C(0x3)
48891 	/* IP in IP */
48892 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_IPIP	UINT32_C(0x4)
48893 	/* Generic Network Virtualization Encapsulation (Geneve) */
48894 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_GENEVE	UINT32_C(0x5)
48895 	/* Multi-Protocol Label Switching (MPLS) */
48896 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_MPLS	UINT32_C(0x6)
48897 	/* VLAN */
48898 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VLAN	UINT32_C(0x7)
48899 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
48900 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_IPGRE	UINT32_C(0x8)
48901 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
48902 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_V4	UINT32_C(0x9)
48903 	/*
48904 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
48905 	 * datagram payload
48906 	 */
48907 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_IPGRE_V1	UINT32_C(0xa)
48908 	/* Use fixed layer 2 ether type of 0xFFFF */
48909 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_L2_ETYPE	UINT32_C(0xb)
48910 	/*
48911 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
48912 	 * (IPV6oVXLANGPE)
48913 	 */
48914 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
48915 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
48916 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_GPE	UINT32_C(0x10)
48917 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_LAST	HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_GPE
48918 	uint8_t	unused[7];
48919 	/* This value is encap data for the associated encap type. */
48920 	uint32_t	encap_data[20];
48921 } hwrm_cfa_flow_action_data_t, *phwrm_cfa_flow_action_data_t;
48922 
48923 /* hwrm_cfa_flow_tunnel_hdr_data (size:64b/8B) */
48924 
48925 typedef struct hwrm_cfa_flow_tunnel_hdr_data {
48926 	/* Tunnel Type. */
48927 	uint8_t	tunnel_type;
48928 	/* Non-tunnel */
48929 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_NONTUNNEL	UINT32_C(0x0)
48930 	/* Virtual eXtensible Local Area Network (VXLAN) */
48931 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN	UINT32_C(0x1)
48932 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
48933 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_NVGRE	UINT32_C(0x2)
48934 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
48935 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_L2GRE	UINT32_C(0x3)
48936 	/* IP in IP */
48937 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_IPIP	UINT32_C(0x4)
48938 	/* Generic Network Virtualization Encapsulation (Geneve) */
48939 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_GENEVE	UINT32_C(0x5)
48940 	/* Multi-Protocol Label Switching (MPLS) */
48941 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_MPLS	UINT32_C(0x6)
48942 	/* Stateless Transport Tunnel (STT) */
48943 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_STT	UINT32_C(0x7)
48944 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
48945 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_IPGRE	UINT32_C(0x8)
48946 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
48947 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
48948 	/*
48949 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
48950 	 * datagram payload
48951 	 */
48952 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
48953 	/* Use fixed layer 2 ether type of 0xFFFF */
48954 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
48955 	/*
48956 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
48957 	 * (IPV6oVXLANGPE)
48958 	 */
48959 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
48960 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
48961 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
48962 	/* Any tunneled traffic */
48963 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_ANYTUNNEL	UINT32_C(0xff)
48964 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_LAST	HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_ANYTUNNEL
48965 	uint8_t	unused[3];
48966 	/*
48967 	 * Tunnel identifier.
48968 	 * Virtual Network Identifier (VNI).
48969 	 */
48970 	uint32_t	tunnel_id;
48971 } hwrm_cfa_flow_tunnel_hdr_data_t, *phwrm_cfa_flow_tunnel_hdr_data_t;
48972 
48973 /* hwrm_cfa_flow_l4_key_data (size:64b/8B) */
48974 
48975 typedef struct hwrm_cfa_flow_l4_key_data {
48976 	/* The value of source port. */
48977 	uint16_t	l4_src_port;
48978 	/* The value of destination port. */
48979 	uint16_t	l4_dst_port;
48980 	uint32_t	unused;
48981 } hwrm_cfa_flow_l4_key_data_t, *phwrm_cfa_flow_l4_key_data_t;
48982 
48983 /* hwrm_cfa_flow_l3_key_data (size:512b/64B) */
48984 
48985 typedef struct hwrm_cfa_flow_l3_key_data {
48986 	/* The value of ip protocol. */
48987 	uint8_t	ip_protocol;
48988 	uint8_t	unused_0[7];
48989 	/* The value of destination IPv4/IPv6 address. */
48990 	uint32_t	ip_dst[4];
48991 	/* The source IPv4/IPv6 address. */
48992 	uint32_t	ip_src[4];
48993 	/* NAT IPv4/IPv6 address. */
48994 	uint32_t	nat_ip_address[4];
48995 	uint64_t	unused;
48996 } hwrm_cfa_flow_l3_key_data_t, *phwrm_cfa_flow_l3_key_data_t;
48997 
48998 /* hwrm_cfa_flow_l2_key_data (size:448b/56B) */
48999 
49000 typedef struct hwrm_cfa_flow_l2_key_data {
49001 	/* Destination MAC address. */
49002 	uint16_t	dmac[3];
49003 	uint16_t	unused_0;
49004 	/* Source MAC address. */
49005 	uint16_t	smac[3];
49006 	uint16_t	unused_1;
49007 	/* L2 header re-write Destination MAC address. */
49008 	uint16_t	l2_rewrite_dmac[3];
49009 	uint16_t	unused_2;
49010 	/* L2 header re-write Source MAC address. */
49011 	uint16_t	l2_rewrite_smac[3];
49012 	/* Ethertype. */
49013 	uint16_t	ethertype;
49014 	/* Number of VLAN tags. */
49015 	uint16_t	num_vlan_tags;
49016 	/* VLAN tpid. */
49017 	uint16_t	l2_rewrite_vlan_tpid;
49018 	/* VLAN tci. */
49019 	uint16_t	l2_rewrite_vlan_tci;
49020 	uint8_t	unused_3[2];
49021 	/* Outer VLAN TPID. */
49022 	uint16_t	ovlan_tpid;
49023 	/* Outer VLAN TCI. */
49024 	uint16_t	ovlan_tci;
49025 	/* Inner VLAN TPID. */
49026 	uint16_t	ivlan_tpid;
49027 	/* Inner VLAN TCI. */
49028 	uint16_t	ivlan_tci;
49029 	uint8_t	unused[8];
49030 } hwrm_cfa_flow_l2_key_data_t, *phwrm_cfa_flow_l2_key_data_t;
49031 
49032 /* hwrm_cfa_flow_key_data (size:4160b/520B) */
49033 
49034 typedef struct hwrm_cfa_flow_key_data {
49035 	/* Flow associated tunnel L2 header key info. */
49036 	uint32_t	t_l2_key_data[14];
49037 	/* Flow associated tunnel L2 header mask info. */
49038 	uint32_t	t_l2_key_mask[14];
49039 	/* Flow associated tunnel L3 header key info. */
49040 	uint32_t	t_l3_key_data[16];
49041 	/* Flow associated tunnel L3 header mask info. */
49042 	uint32_t	t_l3_key_mask[16];
49043 	/* Flow associated tunnel L4 header key info. */
49044 	uint64_t	t_l4_key_data;
49045 	/* Flow associated tunnel L4 header mask info. */
49046 	uint64_t	t_l4_key_mask;
49047 	/* Flow associated tunnel header info. */
49048 	uint64_t	tunnel_hdr;
49049 	/* Flow associated L2 header key info. */
49050 	uint32_t	l2_key_data[14];
49051 	/* Flow associated L2 header mask info. */
49052 	uint32_t	l2_key_mask[14];
49053 	/* Flow associated L3 header key info. */
49054 	uint32_t	l3_key_data[16];
49055 	/* Flow associated L3 header mask info. */
49056 	uint32_t	l3_key_mask[16];
49057 	/* Flow associated L4 header key info. */
49058 	uint64_t	l4_key_data;
49059 	/* Flow associated L4 header mask info. */
49060 	uint64_t	l4_key_mask;
49061 } hwrm_cfa_flow_key_data_t, *phwrm_cfa_flow_key_data_t;
49062 
49063 /**********************
49064  * hwrm_cfa_flow_info *
49065  **********************/
49066 
49067 
49068 /* hwrm_cfa_flow_info_input (size:256b/32B) */
49069 
49070 typedef struct hwrm_cfa_flow_info_input {
49071 	/* The HWRM command request type. */
49072 	uint16_t	req_type;
49073 	/*
49074 	 * The completion ring to send the completion event on. This should
49075 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49076 	 */
49077 	uint16_t	cmpl_ring;
49078 	/*
49079 	 * The sequence ID is used by the driver for tracking multiple
49080 	 * commands. This ID is treated as opaque data by the firmware and
49081 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49082 	 */
49083 	uint16_t	seq_id;
49084 	/*
49085 	 * The target ID of the command:
49086 	 * * 0x0-0xFFF8 - The function ID
49087 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49088 	 * * 0xFFFD - Reserved for user-space HWRM interface
49089 	 * * 0xFFFF - HWRM
49090 	 */
49091 	uint16_t	target_id;
49092 	/*
49093 	 * A physical address pointer pointing to a host buffer that the
49094 	 * command's response data will be written. This can be either a host
49095 	 * physical address (HPA) or a guest physical address (GPA) and must
49096 	 * point to a physically contiguous block of memory.
49097 	 */
49098 	uint64_t	resp_addr;
49099 	/* Flow record index. */
49100 	uint16_t	flow_handle;
49101 	/* Max flow handle */
49102 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_MAX_MASK	UINT32_C(0xfff)
49103 	/* CNP flow handle */
49104 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_CNP_CNT	UINT32_C(0x1000)
49105 	/* RoCEv1 flow handle */
49106 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV1_CNT	UINT32_C(0x2000)
49107 	/* NIC flow handle */
49108 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_NIC_TX	UINT32_C(0x3000)
49109 	/* RoCEv2 flow handle */
49110 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV2_CNT	UINT32_C(0x4000)
49111 	/* Direction rx = 1 */
49112 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_DIR_RX	UINT32_C(0x8000)
49113 	/* CNP flow handle */
49114 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_CNP_CNT_RX	UINT32_C(0x9000)
49115 	/* RoCEv1 flow handle */
49116 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV1_CNT_RX UINT32_C(0xa000)
49117 	/* NIC flow handle */
49118 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_NIC_RX	UINT32_C(0xb000)
49119 	/* RoCEv2 flow handle */
49120 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV2_CNT_RX UINT32_C(0xc000)
49121 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_LAST	HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV2_CNT_RX
49122 	uint8_t	unused_0[6];
49123 	/* This value identifies a set of CFA data structures used for a flow. */
49124 	uint64_t	ext_flow_handle;
49125 } hwrm_cfa_flow_info_input_t, *phwrm_cfa_flow_info_input_t;
49126 
49127 /* hwrm_cfa_flow_info_output (size:5632b/704B) */
49128 
49129 typedef struct hwrm_cfa_flow_info_output {
49130 	/* The specific error status for the command. */
49131 	uint16_t	error_code;
49132 	/* The HWRM command request type. */
49133 	uint16_t	req_type;
49134 	/* The sequence ID from the original command. */
49135 	uint16_t	seq_id;
49136 	/* The length of the response data in number of bytes. */
49137 	uint16_t	resp_len;
49138 	uint8_t	flags;
49139 	/* When set to 1, indicates the configuration is the TX flow. */
49140 	#define HWRM_CFA_FLOW_INFO_OUTPUT_FLAGS_PATH_TX	UINT32_C(0x1)
49141 	/* When set to 1, indicates the configuration is the RX flow. */
49142 	#define HWRM_CFA_FLOW_INFO_OUTPUT_FLAGS_PATH_RX	UINT32_C(0x2)
49143 	/* profile is 8 b */
49144 	uint8_t	profile;
49145 	/* src_fid is 16 b */
49146 	uint16_t	src_fid;
49147 	/* dst_fid is 16 b */
49148 	uint16_t	dst_fid;
49149 	/* l2_ctxt_id is 16 b */
49150 	uint16_t	l2_ctxt_id;
49151 	/* em_info is 64 b */
49152 	uint64_t	em_info;
49153 	/* tcam_info is 64 b */
49154 	uint64_t	tcam_info;
49155 	/* vfp_tcam_info is 64 b */
49156 	uint64_t	vfp_tcam_info;
49157 	/* ar_id is 16 b */
49158 	uint16_t	ar_id;
49159 	/* flow_handle is 16 b */
49160 	uint16_t	flow_handle;
49161 	/* tunnel_handle is 32 b */
49162 	uint32_t	tunnel_handle;
49163 	/* The flow aging timer for the flow, the unit is 100 milliseconds */
49164 	uint16_t	flow_timer;
49165 	uint8_t	unused_0[6];
49166 	/* Flow associated L2, L3 and L4 headers info. */
49167 	uint32_t	flow_key_data[130];
49168 	/* Flow associated action record info. */
49169 	uint32_t	flow_action_info[30];
49170 	uint8_t	unused_1[7];
49171 	/*
49172 	 * This field is used in Output records to indicate that the output
49173 	 * is completely written to RAM. This field should be read as '1'
49174 	 * to indicate that the output has been completely written.
49175 	 * When writing a command completion or response to an internal
49176 	 * processor, the order of writes has to be such that this field is
49177 	 * written last.
49178 	 */
49179 	uint8_t	valid;
49180 } hwrm_cfa_flow_info_output_t, *phwrm_cfa_flow_info_output_t;
49181 
49182 /***********************
49183  * hwrm_cfa_flow_flush *
49184  ***********************/
49185 
49186 
49187 /* hwrm_cfa_flow_flush_input (size:256b/32B) */
49188 
49189 typedef struct hwrm_cfa_flow_flush_input {
49190 	/* The HWRM command request type. */
49191 	uint16_t	req_type;
49192 	/*
49193 	 * The completion ring to send the completion event on. This should
49194 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49195 	 */
49196 	uint16_t	cmpl_ring;
49197 	/*
49198 	 * The sequence ID is used by the driver for tracking multiple
49199 	 * commands. This ID is treated as opaque data by the firmware and
49200 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49201 	 */
49202 	uint16_t	seq_id;
49203 	/*
49204 	 * The target ID of the command:
49205 	 * * 0x0-0xFFF8 - The function ID
49206 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49207 	 * * 0xFFFD - Reserved for user-space HWRM interface
49208 	 * * 0xFFFF - HWRM
49209 	 */
49210 	uint16_t	target_id;
49211 	/*
49212 	 * A physical address pointer pointing to a host buffer that the
49213 	 * command's response data will be written. This can be either a host
49214 	 * physical address (HPA) or a guest physical address (GPA) and must
49215 	 * point to a physically contiguous block of memory.
49216 	 */
49217 	uint64_t	resp_addr;
49218 	/* flags is 32 b */
49219 	uint32_t	flags;
49220 	/*
49221 	 * Set to 1 to indicate the page size, page layers, and
49222 	 * flow_handle_table_dma_addr fields are valid. The flow flush
49223 	 * operation should only flush the flows from the flow table
49224 	 * specified. This flag is set to 0 by older driver. For older
49225 	 * firmware, setting this flag has no effect.
49226 	 */
49227 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_TABLE_VALID			UINT32_C(0x1)
49228 	/*
49229 	 * Set to 1 to indicate flow flush operation to cleanup all the
49230 	 * flows, meters, CFA context memory tables etc. This flag is set to
49231 	 * 0 by older driver. For older firmware, setting this flag has no
49232 	 * effect.
49233 	 */
49234 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_RESET_ALL			UINT32_C(0x2)
49235 	/*
49236 	 * Set to 1 to indicate flow flush operation to cleanup all the
49237 	 * flows by the caller. This flag is set to 0 by older driver. For
49238 	 * older firmware, setting this flag has no effect.
49239 	 */
49240 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_RESET_PORT			UINT32_C(0x4)
49241 	/*
49242 	 * Set to 1 to indicate the flow counter IDs are included in the
49243 	 * flow table.
49244 	 */
49245 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_INCL_FC		UINT32_C(0x8000000)
49246 	/*
49247 	 * This specifies the size of flow handle entries provided by the
49248 	 * driver in the flow table specified below. Only two flow handle
49249 	 * size enums are defined.
49250 	 */
49251 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_MASK	UINT32_C(0xc0000000)
49252 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_SFT	30
49253 	/* The flow handle is 16bit */
49254 		#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_FLOW_HND_16BIT  (UINT32_C(0x0) << 30)
49255 	/* The flow handle is 64bit */
49256 		#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_FLOW_HND_64BIT  (UINT32_C(0x1) << 30)
49257 		#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_LAST	HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_FLOW_HND_64BIT
49258 	/* Specify page size of the flow table memory. */
49259 	uint8_t	page_size;
49260 	/* The page size is 4K */
49261 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_4K   UINT32_C(0x0)
49262 	/* The page size is 8K */
49263 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_8K   UINT32_C(0x1)
49264 	/* The page size is 64K */
49265 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_64K  UINT32_C(0x4)
49266 	/* The page size is 256K */
49267 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_256K UINT32_C(0x6)
49268 	/* The page size is 1M */
49269 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_1M   UINT32_C(0x8)
49270 	/* The page size is 2M */
49271 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_2M   UINT32_C(0x9)
49272 	/* The page size is 4M */
49273 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_4M   UINT32_C(0xa)
49274 	/* The page size is 1G */
49275 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_1G   UINT32_C(0x12)
49276 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_LAST HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_1G
49277 	/* FLow table memory indirect levels. */
49278 	uint8_t	page_level;
49279 	/* PBL pointer is physical start address. */
49280 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_0 UINT32_C(0x0)
49281 	/* PBL pointer points to PTE table. */
49282 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_1 UINT32_C(0x1)
49283 	/*
49284 	 * PBL pointer points to PDE table with each entry pointing to PTE
49285 	 * tables.
49286 	 */
49287 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_2 UINT32_C(0x2)
49288 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LAST HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_2
49289 	/* number of flows in the flow table */
49290 	uint16_t	num_flows;
49291 	/* Pointer to the PBL, or PDL depending on number of levels */
49292 	uint64_t	page_dir;
49293 } hwrm_cfa_flow_flush_input_t, *phwrm_cfa_flow_flush_input_t;
49294 
49295 /* hwrm_cfa_flow_flush_output (size:128b/16B) */
49296 
49297 typedef struct hwrm_cfa_flow_flush_output {
49298 	/* The specific error status for the command. */
49299 	uint16_t	error_code;
49300 	/* The HWRM command request type. */
49301 	uint16_t	req_type;
49302 	/* The sequence ID from the original command. */
49303 	uint16_t	seq_id;
49304 	/* The length of the response data in number of bytes. */
49305 	uint16_t	resp_len;
49306 	uint8_t	unused_0[7];
49307 	/*
49308 	 * This field is used in Output records to indicate that the output
49309 	 * is completely written to RAM. This field should be read as '1'
49310 	 * to indicate that the output has been completely written.
49311 	 * When writing a command completion or response to an internal
49312 	 * processor, the order of writes has to be such that this field is
49313 	 * written last.
49314 	 */
49315 	uint8_t	valid;
49316 } hwrm_cfa_flow_flush_output_t, *phwrm_cfa_flow_flush_output_t;
49317 
49318 /***********************
49319  * hwrm_cfa_flow_stats *
49320  ***********************/
49321 
49322 
49323 /* hwrm_cfa_flow_stats_input (size:640b/80B) */
49324 
49325 typedef struct hwrm_cfa_flow_stats_input {
49326 	/* The HWRM command request type. */
49327 	uint16_t	req_type;
49328 	/*
49329 	 * The completion ring to send the completion event on. This should
49330 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49331 	 */
49332 	uint16_t	cmpl_ring;
49333 	/*
49334 	 * The sequence ID is used by the driver for tracking multiple
49335 	 * commands. This ID is treated as opaque data by the firmware and
49336 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49337 	 */
49338 	uint16_t	seq_id;
49339 	/*
49340 	 * The target ID of the command:
49341 	 * * 0x0-0xFFF8 - The function ID
49342 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49343 	 * * 0xFFFD - Reserved for user-space HWRM interface
49344 	 * * 0xFFFF - HWRM
49345 	 */
49346 	uint16_t	target_id;
49347 	/*
49348 	 * A physical address pointer pointing to a host buffer that the
49349 	 * command's response data will be written. This can be either a host
49350 	 * physical address (HPA) or a guest physical address (GPA) and must
49351 	 * point to a physically contiguous block of memory.
49352 	 */
49353 	uint64_t	resp_addr;
49354 	/* Number of valid flows in this command. */
49355 	uint16_t	num_flows;
49356 	/*
49357 	 * Flow handle.
49358 	 * For a listing of applicable flow_handle_0 values, see enumeration
49359 	 * in hwrm_cfa_flow_info_input.
49360 	 */
49361 	uint16_t	flow_handle_0;
49362 	/*
49363 	 * Flow handle.
49364 	 * For a listing of applicable flow_handle_1 values, see enumeration
49365 	 * in hwrm_cfa_flow_info_input.
49366 	 */
49367 	uint16_t	flow_handle_1;
49368 	/*
49369 	 * Flow handle.
49370 	 * For a listing of applicable flow_handle_2 values, see enumeration
49371 	 * in hwrm_cfa_flow_info_input.
49372 	 */
49373 	uint16_t	flow_handle_2;
49374 	/*
49375 	 * Flow handle.
49376 	 * For a listing of applicable flow_handle_3 values, see enumeration
49377 	 * in hwrm_cfa_flow_info_input.
49378 	 */
49379 	uint16_t	flow_handle_3;
49380 	/*
49381 	 * Flow handle.
49382 	 * For a listing of applicable flow_handle_4 values, see enumeration
49383 	 * in hwrm_cfa_flow_info_input.
49384 	 */
49385 	uint16_t	flow_handle_4;
49386 	/*
49387 	 * Flow handle.
49388 	 * For a listing of applicable flow_handle_5 values, see enumeration
49389 	 * in hwrm_cfa_flow_info_input.
49390 	 */
49391 	uint16_t	flow_handle_5;
49392 	/*
49393 	 * Flow handle.
49394 	 * For a listing of applicable flow_handle_6 values, see enumeration
49395 	 * in hwrm_cfa_flow_info_input.
49396 	 */
49397 	uint16_t	flow_handle_6;
49398 	/*
49399 	 * Flow handle.
49400 	 * For a listing of applicable flow_handle_7 values, see enumeration
49401 	 * in hwrm_cfa_flow_info_input.
49402 	 */
49403 	uint16_t	flow_handle_7;
49404 	/*
49405 	 * Flow handle.
49406 	 * For a listing of applicable flow_handle_8 values, see enumeration
49407 	 * in hwrm_cfa_flow_info_input.
49408 	 */
49409 	uint16_t	flow_handle_8;
49410 	/*
49411 	 * Flow handle.
49412 	 * For a listing of applicable flow_handle_9 values, see enumeration
49413 	 * in hwrm_cfa_flow_info_input.
49414 	 */
49415 	uint16_t	flow_handle_9;
49416 	uint8_t	unused_0[2];
49417 	/* Flow ID of a flow. */
49418 	uint32_t	flow_id_0;
49419 	/* Flow ID of a flow. */
49420 	uint32_t	flow_id_1;
49421 	/* Flow ID of a flow. */
49422 	uint32_t	flow_id_2;
49423 	/* Flow ID of a flow. */
49424 	uint32_t	flow_id_3;
49425 	/* Flow ID of a flow. */
49426 	uint32_t	flow_id_4;
49427 	/* Flow ID of a flow. */
49428 	uint32_t	flow_id_5;
49429 	/* Flow ID of a flow. */
49430 	uint32_t	flow_id_6;
49431 	/* Flow ID of a flow. */
49432 	uint32_t	flow_id_7;
49433 	/* Flow ID of a flow. */
49434 	uint32_t	flow_id_8;
49435 	/* Flow ID of a flow. */
49436 	uint32_t	flow_id_9;
49437 } hwrm_cfa_flow_stats_input_t, *phwrm_cfa_flow_stats_input_t;
49438 
49439 /* hwrm_cfa_flow_stats_output (size:1408b/176B) */
49440 
49441 typedef struct hwrm_cfa_flow_stats_output {
49442 	/* The specific error status for the command. */
49443 	uint16_t	error_code;
49444 	/* The HWRM command request type. */
49445 	uint16_t	req_type;
49446 	/* The sequence ID from the original command. */
49447 	uint16_t	seq_id;
49448 	/* The length of the response data in number of bytes. */
49449 	uint16_t	resp_len;
49450 	/* packet_0 is 64 b */
49451 	uint64_t	packet_0;
49452 	/* packet_1 is 64 b */
49453 	uint64_t	packet_1;
49454 	/* packet_2 is 64 b */
49455 	uint64_t	packet_2;
49456 	/* packet_3 is 64 b */
49457 	uint64_t	packet_3;
49458 	/* packet_4 is 64 b */
49459 	uint64_t	packet_4;
49460 	/* packet_5 is 64 b */
49461 	uint64_t	packet_5;
49462 	/* packet_6 is 64 b */
49463 	uint64_t	packet_6;
49464 	/* packet_7 is 64 b */
49465 	uint64_t	packet_7;
49466 	/* packet_8 is 64 b */
49467 	uint64_t	packet_8;
49468 	/* packet_9 is 64 b */
49469 	uint64_t	packet_9;
49470 	/* byte_0 is 64 b */
49471 	uint64_t	byte_0;
49472 	/* byte_1 is 64 b */
49473 	uint64_t	byte_1;
49474 	/* byte_2 is 64 b */
49475 	uint64_t	byte_2;
49476 	/* byte_3 is 64 b */
49477 	uint64_t	byte_3;
49478 	/* byte_4 is 64 b */
49479 	uint64_t	byte_4;
49480 	/* byte_5 is 64 b */
49481 	uint64_t	byte_5;
49482 	/* byte_6 is 64 b */
49483 	uint64_t	byte_6;
49484 	/* byte_7 is 64 b */
49485 	uint64_t	byte_7;
49486 	/* byte_8 is 64 b */
49487 	uint64_t	byte_8;
49488 	/* byte_9 is 64 b */
49489 	uint64_t	byte_9;
49490 	/*
49491 	 * If a flow has been hit, the bit representing the flow will be 1.
49492 	 * Likewise, if a flow has not, the bit representing the flow
49493 	 * will be 0. Mapping will match flow numbers where bitX is for flowX
49494 	 * (ex: bit 0 is flow0). This only applies for NIC flows. Upon
49495 	 * reading of the flow, the bit will be cleared for the flow and only
49496 	 * set again when traffic is received by the flow.
49497 	 */
49498 	uint16_t	flow_hits;
49499 	uint8_t	unused_0[5];
49500 	/*
49501 	 * This field is used in Output records to indicate that the output
49502 	 * is completely written to RAM. This field should be read as '1'
49503 	 * to indicate that the output has been completely written.
49504 	 * When writing a command completion or response to an internal
49505 	 * processor, the order of writes has to be such that this field is
49506 	 * written last.
49507 	 */
49508 	uint8_t	valid;
49509 } hwrm_cfa_flow_stats_output_t, *phwrm_cfa_flow_stats_output_t;
49510 
49511 /***********************************
49512  * hwrm_cfa_flow_aging_timer_reset *
49513  ***********************************/
49514 
49515 
49516 /* hwrm_cfa_flow_aging_timer_reset_input (size:256b/32B) */
49517 
49518 typedef struct hwrm_cfa_flow_aging_timer_reset_input {
49519 	/* The HWRM command request type. */
49520 	uint16_t	req_type;
49521 	/*
49522 	 * The completion ring to send the completion event on. This should
49523 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49524 	 */
49525 	uint16_t	cmpl_ring;
49526 	/*
49527 	 * The sequence ID is used by the driver for tracking multiple
49528 	 * commands. This ID is treated as opaque data by the firmware and
49529 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49530 	 */
49531 	uint16_t	seq_id;
49532 	/*
49533 	 * The target ID of the command:
49534 	 * * 0x0-0xFFF8 - The function ID
49535 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49536 	 * * 0xFFFD - Reserved for user-space HWRM interface
49537 	 * * 0xFFFF - HWRM
49538 	 */
49539 	uint16_t	target_id;
49540 	/*
49541 	 * A physical address pointer pointing to a host buffer that the
49542 	 * command's response data will be written. This can be either a host
49543 	 * physical address (HPA) or a guest physical address (GPA) and must
49544 	 * point to a physically contiguous block of memory.
49545 	 */
49546 	uint64_t	resp_addr;
49547 	/* Flow record index. */
49548 	uint16_t	flow_handle;
49549 	uint8_t	unused_0[2];
49550 	/*
49551 	 * New flow timer value for the flow specified in the ext_flow_handle.
49552 	 * The flow timer unit is 100ms.
49553 	 */
49554 	uint32_t	flow_timer;
49555 	/* This value identifies a set of CFA data structures used for a flow. */
49556 	uint64_t	ext_flow_handle;
49557 } hwrm_cfa_flow_aging_timer_reset_input_t, *phwrm_cfa_flow_aging_timer_reset_input_t;
49558 
49559 /* hwrm_cfa_flow_aging_timer_reset_output (size:128b/16B) */
49560 
49561 typedef struct hwrm_cfa_flow_aging_timer_reset_output {
49562 	/* The specific error status for the command. */
49563 	uint16_t	error_code;
49564 	/* The HWRM command request type. */
49565 	uint16_t	req_type;
49566 	/* The sequence ID from the original command. */
49567 	uint16_t	seq_id;
49568 	/* The length of the response data in number of bytes. */
49569 	uint16_t	resp_len;
49570 	uint8_t	unused_0[7];
49571 	/*
49572 	 * This field is used in Output records to indicate that the output
49573 	 * is completely written to RAM. This field should be read as '1'
49574 	 * to indicate that the output has been completely written.
49575 	 * When writing a command completion or response to an internal
49576 	 * processor, the order of writes has to be such that this field is
49577 	 * written last.
49578 	 */
49579 	uint8_t	valid;
49580 } hwrm_cfa_flow_aging_timer_reset_output_t, *phwrm_cfa_flow_aging_timer_reset_output_t;
49581 
49582 /***************************
49583  * hwrm_cfa_flow_aging_cfg *
49584  ***************************/
49585 
49586 
49587 /* hwrm_cfa_flow_aging_cfg_input (size:384b/48B) */
49588 
49589 typedef struct hwrm_cfa_flow_aging_cfg_input {
49590 	/* The HWRM command request type. */
49591 	uint16_t	req_type;
49592 	/*
49593 	 * The completion ring to send the completion event on. This should
49594 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49595 	 */
49596 	uint16_t	cmpl_ring;
49597 	/*
49598 	 * The sequence ID is used by the driver for tracking multiple
49599 	 * commands. This ID is treated as opaque data by the firmware and
49600 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49601 	 */
49602 	uint16_t	seq_id;
49603 	/*
49604 	 * The target ID of the command:
49605 	 * * 0x0-0xFFF8 - The function ID
49606 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49607 	 * * 0xFFFD - Reserved for user-space HWRM interface
49608 	 * * 0xFFFF - HWRM
49609 	 */
49610 	uint16_t	target_id;
49611 	/*
49612 	 * A physical address pointer pointing to a host buffer that the
49613 	 * command's response data will be written. This can be either a host
49614 	 * physical address (HPA) or a guest physical address (GPA) and must
49615 	 * point to a physically contiguous block of memory.
49616 	 */
49617 	uint64_t	resp_addr;
49618 	/* The bit field to enable per flow aging configuration. */
49619 	uint16_t	enables;
49620 	/*
49621 	 * This bit must be '1' for the tcp flow timer field to be
49622 	 * configured
49623 	 */
49624 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_TCP_FLOW_TIMER	UINT32_C(0x1)
49625 	/*
49626 	 * This bit must be '1' for the tcp finish timer field to be
49627 	 * configured
49628 	 */
49629 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_TCP_FIN_TIMER	UINT32_C(0x2)
49630 	/*
49631 	 * This bit must be '1' for the udp flow timer field to be
49632 	 * configured
49633 	 */
49634 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_UDP_FLOW_TIMER	UINT32_C(0x4)
49635 	/*
49636 	 * This bit must be '1' for the eem dma interval field to be
49637 	 * configured
49638 	 */
49639 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_DMA_INTERVAL	UINT32_C(0x8)
49640 	/*
49641 	 * This bit must be '1' for the eem notice interval field to be
49642 	 * configured
49643 	 */
49644 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_NOTICE_INTERVAL	UINT32_C(0x10)
49645 	/*
49646 	 * This bit must be '1' for the eem context memory maximum entries
49647 	 * field to be configured
49648 	 */
49649 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_CTX_MAX_ENTRIES	UINT32_C(0x20)
49650 	/*
49651 	 * This bit must be '1' for the eem context memory ID field to be
49652 	 * configured
49653 	 */
49654 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_CTX_ID		UINT32_C(0x40)
49655 	/*
49656 	 * This bit must be '1' for the eem context memory type field to be
49657 	 * configured
49658 	 */
49659 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_CTX_MEM_TYPE	UINT32_C(0x80)
49660 	uint8_t	flags;
49661 	/* Enumeration denoting the RX, TX type of the resource. */
49662 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH	UINT32_C(0x1)
49663 	/* tx path */
49664 		#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
49665 	/* rx path */
49666 		#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
49667 		#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_LAST   HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_RX
49668 	/*
49669 	 * Enumeration denoting the enable, disable eem flow aging
49670 	 * configuration.
49671 	 */
49672 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM	UINT32_C(0x2)
49673 	/* tx path */
49674 		#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_DISABLE  (UINT32_C(0x0) << 1)
49675 	/* rx path */
49676 		#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_ENABLE   (UINT32_C(0x1) << 1)
49677 		#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_LAST	HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_ENABLE
49678 	uint8_t	unused_0;
49679 	/*
49680 	 * The flow aging timer for all TCP flows, the unit is 100
49681 	 * milliseconds.
49682 	 */
49683 	uint32_t	tcp_flow_timer;
49684 	/*
49685 	 * The TCP finished timer for all TCP flows, the unit is 100
49686 	 * milliseconds.
49687 	 */
49688 	uint32_t	tcp_fin_timer;
49689 	/*
49690 	 * The flow aging timer for all UDP flows, the unit is 100
49691 	 * milliseconds.
49692 	 */
49693 	uint32_t	udp_flow_timer;
49694 	/*
49695 	 * The interval to dma eem ejection data to host memory, the unit is
49696 	 * milliseconds.
49697 	 */
49698 	uint16_t	eem_dma_interval;
49699 	/*
49700 	 * The interval to notify driver to read the eem ejection data, the
49701 	 * unit is milliseconds.
49702 	 */
49703 	uint16_t	eem_notice_interval;
49704 	/* The maximum entries number in the eem context memory. */
49705 	uint32_t	eem_ctx_max_entries;
49706 	/* The context memory ID for eem flow aging. */
49707 	uint16_t	eem_ctx_id;
49708 	uint16_t	eem_ctx_mem_type;
49709 	/*
49710 	 * The content of context memory is eem ejection data, the size of
49711 	 * each entry is 4 bytes.
49712 	 */
49713 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_EEM_CTX_MEM_TYPE_EJECTION_DATA UINT32_C(0x0)
49714 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_EEM_CTX_MEM_TYPE_LAST	HWRM_CFA_FLOW_AGING_CFG_INPUT_EEM_CTX_MEM_TYPE_EJECTION_DATA
49715 	uint8_t	unused_1[4];
49716 } hwrm_cfa_flow_aging_cfg_input_t, *phwrm_cfa_flow_aging_cfg_input_t;
49717 
49718 /* hwrm_cfa_flow_aging_cfg_output (size:128b/16B) */
49719 
49720 typedef struct hwrm_cfa_flow_aging_cfg_output {
49721 	/* The specific error status for the command. */
49722 	uint16_t	error_code;
49723 	/* The HWRM command request type. */
49724 	uint16_t	req_type;
49725 	/* The sequence ID from the original command. */
49726 	uint16_t	seq_id;
49727 	/* The length of the response data in number of bytes. */
49728 	uint16_t	resp_len;
49729 	uint8_t	unused_0[7];
49730 	/*
49731 	 * This field is used in Output records to indicate that the output
49732 	 * is completely written to RAM. This field should be read as '1'
49733 	 * to indicate that the output has been completely written.
49734 	 * When writing a command completion or response to an internal
49735 	 * processor, the order of writes has to be such that this field is
49736 	 * written last.
49737 	 */
49738 	uint8_t	valid;
49739 } hwrm_cfa_flow_aging_cfg_output_t, *phwrm_cfa_flow_aging_cfg_output_t;
49740 
49741 /****************************
49742  * hwrm_cfa_flow_aging_qcfg *
49743  ****************************/
49744 
49745 
49746 /* hwrm_cfa_flow_aging_qcfg_input (size:192b/24B) */
49747 
49748 typedef struct hwrm_cfa_flow_aging_qcfg_input {
49749 	/* The HWRM command request type. */
49750 	uint16_t	req_type;
49751 	/*
49752 	 * The completion ring to send the completion event on. This should
49753 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49754 	 */
49755 	uint16_t	cmpl_ring;
49756 	/*
49757 	 * The sequence ID is used by the driver for tracking multiple
49758 	 * commands. This ID is treated as opaque data by the firmware and
49759 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49760 	 */
49761 	uint16_t	seq_id;
49762 	/*
49763 	 * The target ID of the command:
49764 	 * * 0x0-0xFFF8 - The function ID
49765 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49766 	 * * 0xFFFD - Reserved for user-space HWRM interface
49767 	 * * 0xFFFF - HWRM
49768 	 */
49769 	uint16_t	target_id;
49770 	/*
49771 	 * A physical address pointer pointing to a host buffer that the
49772 	 * command's response data will be written. This can be either a host
49773 	 * physical address (HPA) or a guest physical address (GPA) and must
49774 	 * point to a physically contiguous block of memory.
49775 	 */
49776 	uint64_t	resp_addr;
49777 	/*
49778 	 * The direction for the flow aging configuration, 1 is rx path, 2 is
49779 	 * tx path.
49780 	 */
49781 	uint8_t	flags;
49782 	/* Enumeration denoting the RX, TX type of the resource. */
49783 	#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH	UINT32_C(0x1)
49784 	/* tx path */
49785 		#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
49786 	/* rx path */
49787 		#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
49788 		#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_LAST HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_RX
49789 	uint8_t	unused_0[7];
49790 } hwrm_cfa_flow_aging_qcfg_input_t, *phwrm_cfa_flow_aging_qcfg_input_t;
49791 
49792 /* hwrm_cfa_flow_aging_qcfg_output (size:320b/40B) */
49793 
49794 typedef struct hwrm_cfa_flow_aging_qcfg_output {
49795 	/* The specific error status for the command. */
49796 	uint16_t	error_code;
49797 	/* The HWRM command request type. */
49798 	uint16_t	req_type;
49799 	/* The sequence ID from the original command. */
49800 	uint16_t	seq_id;
49801 	/* The length of the response data in number of bytes. */
49802 	uint16_t	resp_len;
49803 	/*
49804 	 * The current flow aging timer for all TCP flows, the unit is 100
49805 	 * millisecond.
49806 	 */
49807 	uint32_t	tcp_flow_timer;
49808 	/*
49809 	 * The current TCP finished timer for all TCP flows, the unit is 100
49810 	 * millisecond.
49811 	 */
49812 	uint32_t	tcp_fin_timer;
49813 	/*
49814 	 * The current flow aging timer for all UDP flows, the unit is 100
49815 	 * millisecond.
49816 	 */
49817 	uint32_t	udp_flow_timer;
49818 	/*
49819 	 * The interval to dma eem ejection data to host memory, the unit is
49820 	 * milliseconds.
49821 	 */
49822 	uint16_t	eem_dma_interval;
49823 	/*
49824 	 * The interval to notify driver to read the eem ejection data, the
49825 	 * unit is milliseconds.
49826 	 */
49827 	uint16_t	eem_notice_interval;
49828 	/* The maximum entries number in the eem context memory. */
49829 	uint32_t	eem_ctx_max_entries;
49830 	/* The context memory ID for eem flow aging. */
49831 	uint16_t	eem_ctx_id;
49832 	/* The context memory type for eem flow aging. */
49833 	uint16_t	eem_ctx_mem_type;
49834 	uint8_t	unused_0[7];
49835 	/*
49836 	 * This field is used in Output records to indicate that the output
49837 	 * is completely written to RAM. This field should be read as '1'
49838 	 * to indicate that the output has been completely written.
49839 	 * When writing a command completion or response to an internal
49840 	 * processor, the order of writes has to be such that this field is
49841 	 * written last.
49842 	 */
49843 	uint8_t	valid;
49844 } hwrm_cfa_flow_aging_qcfg_output_t, *phwrm_cfa_flow_aging_qcfg_output_t;
49845 
49846 /*****************************
49847  * hwrm_cfa_flow_aging_qcaps *
49848  *****************************/
49849 
49850 
49851 /* hwrm_cfa_flow_aging_qcaps_input (size:192b/24B) */
49852 
49853 typedef struct hwrm_cfa_flow_aging_qcaps_input {
49854 	/* The HWRM command request type. */
49855 	uint16_t	req_type;
49856 	/*
49857 	 * The completion ring to send the completion event on. This should
49858 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49859 	 */
49860 	uint16_t	cmpl_ring;
49861 	/*
49862 	 * The sequence ID is used by the driver for tracking multiple
49863 	 * commands. This ID is treated as opaque data by the firmware and
49864 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49865 	 */
49866 	uint16_t	seq_id;
49867 	/*
49868 	 * The target ID of the command:
49869 	 * * 0x0-0xFFF8 - The function ID
49870 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49871 	 * * 0xFFFD - Reserved for user-space HWRM interface
49872 	 * * 0xFFFF - HWRM
49873 	 */
49874 	uint16_t	target_id;
49875 	/*
49876 	 * A physical address pointer pointing to a host buffer that the
49877 	 * command's response data will be written. This can be either a host
49878 	 * physical address (HPA) or a guest physical address (GPA) and must
49879 	 * point to a physically contiguous block of memory.
49880 	 */
49881 	uint64_t	resp_addr;
49882 	/*
49883 	 * The direction for the flow aging configuration, 1 is rx path, 2 is
49884 	 * tx path.
49885 	 */
49886 	uint8_t	flags;
49887 	/* Enumeration denoting the RX, TX type of the resource. */
49888 	#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH	UINT32_C(0x1)
49889 	/* tx path */
49890 		#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
49891 	/* rx path */
49892 		#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
49893 		#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_LAST HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_RX
49894 	uint8_t	unused_0[7];
49895 } hwrm_cfa_flow_aging_qcaps_input_t, *phwrm_cfa_flow_aging_qcaps_input_t;
49896 
49897 /* hwrm_cfa_flow_aging_qcaps_output (size:256b/32B) */
49898 
49899 typedef struct hwrm_cfa_flow_aging_qcaps_output {
49900 	/* The specific error status for the command. */
49901 	uint16_t	error_code;
49902 	/* The HWRM command request type. */
49903 	uint16_t	req_type;
49904 	/* The sequence ID from the original command. */
49905 	uint16_t	seq_id;
49906 	/* The length of the response data in number of bytes. */
49907 	uint16_t	resp_len;
49908 	/*
49909 	 * The maximum flow aging timer for all TCP flows, the unit is 100
49910 	 * millisecond.
49911 	 */
49912 	uint32_t	max_tcp_flow_timer;
49913 	/*
49914 	 * The maximum TCP finished timer for all TCP flows, the unit is 100
49915 	 * millisecond.
49916 	 */
49917 	uint32_t	max_tcp_fin_timer;
49918 	/*
49919 	 * The maximum flow aging timer for all UDP flows, the unit is 100
49920 	 * millisecond.
49921 	 */
49922 	uint32_t	max_udp_flow_timer;
49923 	/* The maximum aging flows that HW can support. */
49924 	uint32_t	max_aging_flows;
49925 	uint8_t	unused_0[7];
49926 	/*
49927 	 * This field is used in Output records to indicate that the output
49928 	 * is completely written to RAM. This field should be read as '1'
49929 	 * to indicate that the output has been completely written.
49930 	 * When writing a command completion or response to an internal
49931 	 * processor, the order of writes has to be such that this field is
49932 	 * written last.
49933 	 */
49934 	uint8_t	valid;
49935 } hwrm_cfa_flow_aging_qcaps_output_t, *phwrm_cfa_flow_aging_qcaps_output_t;
49936 
49937 /**********************************
49938  * hwrm_cfa_tcp_flag_process_qcfg *
49939  **********************************/
49940 
49941 
49942 /* hwrm_cfa_tcp_flag_process_qcfg_input (size:128b/16B) */
49943 
49944 typedef struct hwrm_cfa_tcp_flag_process_qcfg_input {
49945 	/* The HWRM command request type. */
49946 	uint16_t	req_type;
49947 	/*
49948 	 * The completion ring to send the completion event on. This should
49949 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49950 	 */
49951 	uint16_t	cmpl_ring;
49952 	/*
49953 	 * The sequence ID is used by the driver for tracking multiple
49954 	 * commands. This ID is treated as opaque data by the firmware and
49955 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49956 	 */
49957 	uint16_t	seq_id;
49958 	/*
49959 	 * The target ID of the command:
49960 	 * * 0x0-0xFFF8 - The function ID
49961 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49962 	 * * 0xFFFD - Reserved for user-space HWRM interface
49963 	 * * 0xFFFF - HWRM
49964 	 */
49965 	uint16_t	target_id;
49966 	/*
49967 	 * A physical address pointer pointing to a host buffer that the
49968 	 * command's response data will be written. This can be either a host
49969 	 * physical address (HPA) or a guest physical address (GPA) and must
49970 	 * point to a physically contiguous block of memory.
49971 	 */
49972 	uint64_t	resp_addr;
49973 } hwrm_cfa_tcp_flag_process_qcfg_input_t, *phwrm_cfa_tcp_flag_process_qcfg_input_t;
49974 
49975 /* hwrm_cfa_tcp_flag_process_qcfg_output (size:192b/24B) */
49976 
49977 typedef struct hwrm_cfa_tcp_flag_process_qcfg_output {
49978 	/* The specific error status for the command. */
49979 	uint16_t	error_code;
49980 	/* The HWRM command request type. */
49981 	uint16_t	req_type;
49982 	/* The sequence ID from the original command. */
49983 	uint16_t	seq_id;
49984 	/* The length of the response data in number of bytes. */
49985 	uint16_t	resp_len;
49986 	/* The port 0 RX mirror action record ID. */
49987 	uint16_t	rx_ar_id_port0;
49988 	/* The port 1 RX mirror action record ID. */
49989 	uint16_t	rx_ar_id_port1;
49990 	/*
49991 	 * The port 0 RX action record ID for TX TCP flag packets from
49992 	 * loopback path.
49993 	 */
49994 	uint16_t	tx_ar_id_port0;
49995 	/*
49996 	 * The port 1 RX action record ID for TX TCP flag packets from
49997 	 * loopback path.
49998 	 */
49999 	uint16_t	tx_ar_id_port1;
50000 	uint8_t	unused_0[7];
50001 	/*
50002 	 * This field is used in Output records to indicate that the output
50003 	 * is completely written to RAM. This field should be read as '1'
50004 	 * to indicate that the output has been completely written.
50005 	 * When writing a command completion or response to an internal
50006 	 * processor, the order of writes has to be such that this field is
50007 	 * written last.
50008 	 */
50009 	uint8_t	valid;
50010 } hwrm_cfa_tcp_flag_process_qcfg_output_t, *phwrm_cfa_tcp_flag_process_qcfg_output_t;
50011 
50012 /**************************
50013  * hwrm_cfa_vf_pair_alloc *
50014  **************************/
50015 
50016 
50017 /* hwrm_cfa_vf_pair_alloc_input (size:448b/56B) */
50018 
50019 typedef struct hwrm_cfa_vf_pair_alloc_input {
50020 	/* The HWRM command request type. */
50021 	uint16_t	req_type;
50022 	/*
50023 	 * The completion ring to send the completion event on. This should
50024 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50025 	 */
50026 	uint16_t	cmpl_ring;
50027 	/*
50028 	 * The sequence ID is used by the driver for tracking multiple
50029 	 * commands. This ID is treated as opaque data by the firmware and
50030 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50031 	 */
50032 	uint16_t	seq_id;
50033 	/*
50034 	 * The target ID of the command:
50035 	 * * 0x0-0xFFF8 - The function ID
50036 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50037 	 * * 0xFFFD - Reserved for user-space HWRM interface
50038 	 * * 0xFFFF - HWRM
50039 	 */
50040 	uint16_t	target_id;
50041 	/*
50042 	 * A physical address pointer pointing to a host buffer that the
50043 	 * command's response data will be written. This can be either a host
50044 	 * physical address (HPA) or a guest physical address (GPA) and must
50045 	 * point to a physically contiguous block of memory.
50046 	 */
50047 	uint64_t	resp_addr;
50048 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
50049 	uint16_t	vf_a_id;
50050 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
50051 	uint16_t	vf_b_id;
50052 	uint8_t	unused_0[4];
50053 	/* VF Pair name (32 byte string). */
50054 	char	pair_name[32];
50055 } hwrm_cfa_vf_pair_alloc_input_t, *phwrm_cfa_vf_pair_alloc_input_t;
50056 
50057 /* hwrm_cfa_vf_pair_alloc_output (size:128b/16B) */
50058 
50059 typedef struct hwrm_cfa_vf_pair_alloc_output {
50060 	/* The specific error status for the command. */
50061 	uint16_t	error_code;
50062 	/* The HWRM command request type. */
50063 	uint16_t	req_type;
50064 	/* The sequence ID from the original command. */
50065 	uint16_t	seq_id;
50066 	/* The length of the response data in number of bytes. */
50067 	uint16_t	resp_len;
50068 	uint8_t	unused_0[7];
50069 	/*
50070 	 * This field is used in Output records to indicate that the output
50071 	 * is completely written to RAM. This field should be read as '1'
50072 	 * to indicate that the output has been completely written.
50073 	 * When writing a command completion or response to an internal
50074 	 * processor, the order of writes has to be such that this field is
50075 	 * written last.
50076 	 */
50077 	uint8_t	valid;
50078 } hwrm_cfa_vf_pair_alloc_output_t, *phwrm_cfa_vf_pair_alloc_output_t;
50079 
50080 /*************************
50081  * hwrm_cfa_vf_pair_free *
50082  *************************/
50083 
50084 
50085 /* hwrm_cfa_vf_pair_free_input (size:384b/48B) */
50086 
50087 typedef struct hwrm_cfa_vf_pair_free_input {
50088 	/* The HWRM command request type. */
50089 	uint16_t	req_type;
50090 	/*
50091 	 * The completion ring to send the completion event on. This should
50092 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50093 	 */
50094 	uint16_t	cmpl_ring;
50095 	/*
50096 	 * The sequence ID is used by the driver for tracking multiple
50097 	 * commands. This ID is treated as opaque data by the firmware and
50098 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50099 	 */
50100 	uint16_t	seq_id;
50101 	/*
50102 	 * The target ID of the command:
50103 	 * * 0x0-0xFFF8 - The function ID
50104 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50105 	 * * 0xFFFD - Reserved for user-space HWRM interface
50106 	 * * 0xFFFF - HWRM
50107 	 */
50108 	uint16_t	target_id;
50109 	/*
50110 	 * A physical address pointer pointing to a host buffer that the
50111 	 * command's response data will be written. This can be either a host
50112 	 * physical address (HPA) or a guest physical address (GPA) and must
50113 	 * point to a physically contiguous block of memory.
50114 	 */
50115 	uint64_t	resp_addr;
50116 	/* VF Pair name (32 byte string). */
50117 	char	pair_name[32];
50118 } hwrm_cfa_vf_pair_free_input_t, *phwrm_cfa_vf_pair_free_input_t;
50119 
50120 /* hwrm_cfa_vf_pair_free_output (size:128b/16B) */
50121 
50122 typedef struct hwrm_cfa_vf_pair_free_output {
50123 	/* The specific error status for the command. */
50124 	uint16_t	error_code;
50125 	/* The HWRM command request type. */
50126 	uint16_t	req_type;
50127 	/* The sequence ID from the original command. */
50128 	uint16_t	seq_id;
50129 	/* The length of the response data in number of bytes. */
50130 	uint16_t	resp_len;
50131 	uint8_t	unused_0[7];
50132 	/*
50133 	 * This field is used in Output records to indicate that the output
50134 	 * is completely written to RAM. This field should be read as '1'
50135 	 * to indicate that the output has been completely written.
50136 	 * When writing a command completion or response to an internal
50137 	 * processor, the order of writes has to be such that this field is
50138 	 * written last.
50139 	 */
50140 	uint8_t	valid;
50141 } hwrm_cfa_vf_pair_free_output_t, *phwrm_cfa_vf_pair_free_output_t;
50142 
50143 /*************************
50144  * hwrm_cfa_vf_pair_info *
50145  *************************/
50146 
50147 
50148 /* hwrm_cfa_vf_pair_info_input (size:448b/56B) */
50149 
50150 typedef struct hwrm_cfa_vf_pair_info_input {
50151 	/* The HWRM command request type. */
50152 	uint16_t	req_type;
50153 	/*
50154 	 * The completion ring to send the completion event on. This should
50155 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50156 	 */
50157 	uint16_t	cmpl_ring;
50158 	/*
50159 	 * The sequence ID is used by the driver for tracking multiple
50160 	 * commands. This ID is treated as opaque data by the firmware and
50161 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50162 	 */
50163 	uint16_t	seq_id;
50164 	/*
50165 	 * The target ID of the command:
50166 	 * * 0x0-0xFFF8 - The function ID
50167 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50168 	 * * 0xFFFD - Reserved for user-space HWRM interface
50169 	 * * 0xFFFF - HWRM
50170 	 */
50171 	uint16_t	target_id;
50172 	/*
50173 	 * A physical address pointer pointing to a host buffer that the
50174 	 * command's response data will be written. This can be either a host
50175 	 * physical address (HPA) or a guest physical address (GPA) and must
50176 	 * point to a physically contiguous block of memory.
50177 	 */
50178 	uint64_t	resp_addr;
50179 	uint32_t	flags;
50180 	/* If this flag is set, lookup by name else lookup by index. */
50181 	#define HWRM_CFA_VF_PAIR_INFO_INPUT_FLAGS_LOOKUP_TYPE	UINT32_C(0x1)
50182 	/* vf pair table index. */
50183 	uint16_t	vf_pair_index;
50184 	uint8_t	unused_0[2];
50185 	/* VF Pair name (32 byte string). */
50186 	char	vf_pair_name[32];
50187 } hwrm_cfa_vf_pair_info_input_t, *phwrm_cfa_vf_pair_info_input_t;
50188 
50189 /* hwrm_cfa_vf_pair_info_output (size:512b/64B) */
50190 
50191 typedef struct hwrm_cfa_vf_pair_info_output {
50192 	/* The specific error status for the command. */
50193 	uint16_t	error_code;
50194 	/* The HWRM command request type. */
50195 	uint16_t	req_type;
50196 	/* The sequence ID from the original command. */
50197 	uint16_t	seq_id;
50198 	/* The length of the response data in number of bytes. */
50199 	uint16_t	resp_len;
50200 	/* vf pair table index. */
50201 	uint16_t	next_vf_pair_index;
50202 	/* vf pair member a's vf_fid. */
50203 	uint16_t	vf_a_fid;
50204 	/* vf pair member a's Linux logical VF number. */
50205 	uint16_t	vf_a_index;
50206 	/* vf pair member b's vf_fid. */
50207 	uint16_t	vf_b_fid;
50208 	/* vf pair member a's Linux logical VF number. */
50209 	uint16_t	vf_b_index;
50210 	/* vf pair state. */
50211 	uint8_t	pair_state;
50212 	/* Pair has been allocated */
50213 	#define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ALLOCATED UINT32_C(0x1)
50214 	/* Both pair members are active */
50215 	#define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE	UINT32_C(0x2)
50216 	#define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_LAST	HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE
50217 	uint8_t	unused_0[5];
50218 	/* VF Pair name (32 byte string). */
50219 	char	pair_name[32];
50220 	uint8_t	unused_1[7];
50221 	/*
50222 	 * This field is used in Output records to indicate that the output
50223 	 * is completely written to RAM. This field should be read as '1'
50224 	 * to indicate that the output has been completely written.
50225 	 * When writing a command completion or response to an internal
50226 	 * processor, the order of writes has to be such that this field is
50227 	 * written last.
50228 	 */
50229 	uint8_t	valid;
50230 } hwrm_cfa_vf_pair_info_output_t, *phwrm_cfa_vf_pair_info_output_t;
50231 
50232 /***********************
50233  * hwrm_cfa_pair_alloc *
50234  ***********************/
50235 
50236 
50237 /* hwrm_cfa_pair_alloc_input (size:576b/72B) */
50238 
50239 typedef struct hwrm_cfa_pair_alloc_input {
50240 	/* The HWRM command request type. */
50241 	uint16_t	req_type;
50242 	/*
50243 	 * The completion ring to send the completion event on. This should
50244 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50245 	 */
50246 	uint16_t	cmpl_ring;
50247 	/*
50248 	 * The sequence ID is used by the driver for tracking multiple
50249 	 * commands. This ID is treated as opaque data by the firmware and
50250 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50251 	 */
50252 	uint16_t	seq_id;
50253 	/*
50254 	 * The target ID of the command:
50255 	 * * 0x0-0xFFF8 - The function ID
50256 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50257 	 * * 0xFFFD - Reserved for user-space HWRM interface
50258 	 * * 0xFFFF - HWRM
50259 	 */
50260 	uint16_t	target_id;
50261 	/*
50262 	 * A physical address pointer pointing to a host buffer that the
50263 	 * command's response data will be written. This can be either a host
50264 	 * physical address (HPA) or a guest physical address (GPA) and must
50265 	 * point to a physically contiguous block of memory.
50266 	 */
50267 	uint64_t	resp_addr;
50268 	/*
50269 	 * Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair,
50270 	 *		5-rep2fn_mod, 6-rep2fn_modall, 7-rep2fn_truflow).
50271 	 */
50272 	uint16_t	pair_mode;
50273 	/*
50274 	 * Pair between VF on local host with PF or VF on specified host.
50275 	 * (deprecated)
50276 	 */
50277 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_VF2FN	UINT32_C(0x0)
50278 	/*
50279 	 * Pair between REP on local host with PF or VF on specified host.
50280 	 * (deprecated)
50281 	 */
50282 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN	UINT32_C(0x1)
50283 	/*
50284 	 * Pair between REP on local host with REP on specified host.
50285 	 * (deprecated)
50286 	 */
50287 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2REP	UINT32_C(0x2)
50288 	/* Pair for the proxy interface. (deprecated) */
50289 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_PROXY	UINT32_C(0x3)
50290 	/* Pair for the PF interface. (deprecated) */
50291 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_PFPAIR	UINT32_C(0x4)
50292 	/* Modify existing rep2fn pair and move pair to new PF. (deprecated) */
50293 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_MOD	UINT32_C(0x5)
50294 	/*
50295 	 * Modify existing rep2fn pairs paired with same PF and move pairs
50296 	 * to new PF. (deprecated)
50297 	 */
50298 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_MODALL  UINT32_C(0x6)
50299 	/*
50300 	 * Truflow pair between REP on local host with PF or VF on specified
50301 	 * host.
50302 	 */
50303 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_TRUFLOW UINT32_C(0x7)
50304 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_LAST	HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_TRUFLOW
50305 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
50306 	uint16_t	vf_a_id;
50307 	/* Logical Host (0xff-local host). */
50308 	uint8_t	host_b_id;
50309 	/* Logical PF (0xff-PF for command channel). */
50310 	uint8_t	pf_b_id;
50311 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
50312 	uint16_t	vf_b_id;
50313 	/* Loopback port (0xff-internal loopback), valid for mode-3. */
50314 	uint8_t	port_id;
50315 	/* Priority used for encap of loopback packets valid for mode-3. */
50316 	uint8_t	pri;
50317 	/* New PF for rep2fn modify, valid for mode 5. */
50318 	uint16_t	new_pf_fid;
50319 	uint32_t	enables;
50320 	/*
50321 	 * This bit must be '1' for the q_ab field to be
50322 	 * configured.
50323 	 */
50324 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_Q_AB_VALID	UINT32_C(0x1)
50325 	/*
50326 	 * This bit must be '1' for the q_ba field to be
50327 	 * configured.
50328 	 */
50329 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_Q_BA_VALID	UINT32_C(0x2)
50330 	/*
50331 	 * This bit must be '1' for the fc_ab field to be
50332 	 * configured.
50333 	 */
50334 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_FC_AB_VALID	UINT32_C(0x4)
50335 	/*
50336 	 * This bit must be '1' for the fc_ba field to be
50337 	 * configured.
50338 	 */
50339 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_FC_BA_VALID	UINT32_C(0x8)
50340 	/* VF Pair name (32 byte string). */
50341 	char	pair_name[32];
50342 	/*
50343 	 * The q_ab value specifies the logical index of the TX/RX CoS
50344 	 * queue to be assigned for traffic in the A to B direction of
50345 	 * the interface pair. The default value is 0.
50346 	 */
50347 	uint8_t	q_ab;
50348 	/*
50349 	 * The q_ba value specifies the logical index of the TX/RX CoS
50350 	 * queue to be assigned for traffic in the B to A direction of
50351 	 * the interface pair. The default value is 1.
50352 	 */
50353 	uint8_t	q_ba;
50354 	/*
50355 	 * Specifies whether RX ring flow control is disabled (0) or enabled
50356 	 * (1) in the A to B direction. The default value is 0, meaning that
50357 	 * packets will be dropped when the B-side RX rings are full.
50358 	 */
50359 	uint8_t	fc_ab;
50360 	/*
50361 	 * Specifies whether RX ring flow control is disabled (0) or enabled
50362 	 * (1) in the B to A direction. The default value is 1, meaning that
50363 	 * the RX CoS queue will be flow controlled when the A-side RX rings
50364 	 * are full.
50365 	 */
50366 	uint8_t	fc_ba;
50367 	uint8_t	unused_1[4];
50368 } hwrm_cfa_pair_alloc_input_t, *phwrm_cfa_pair_alloc_input_t;
50369 
50370 /* hwrm_cfa_pair_alloc_output (size:192b/24B) */
50371 
50372 typedef struct hwrm_cfa_pair_alloc_output {
50373 	/* The specific error status for the command. */
50374 	uint16_t	error_code;
50375 	/* The HWRM command request type. */
50376 	uint16_t	req_type;
50377 	/* The sequence ID from the original command. */
50378 	uint16_t	seq_id;
50379 	/* The length of the response data in number of bytes. */
50380 	uint16_t	resp_len;
50381 	/* Only valid for modes 1 and 2. */
50382 	uint16_t	rx_cfa_code_a;
50383 	/* Only valid for modes 1 and 2. */
50384 	uint16_t	tx_cfa_action_a;
50385 	/* Only valid for mode 2. */
50386 	uint16_t	rx_cfa_code_b;
50387 	/* Only valid for mode 2. */
50388 	uint16_t	tx_cfa_action_b;
50389 	uint8_t	unused_0[7];
50390 	/*
50391 	 * This field is used in Output records to indicate that the output
50392 	 * is completely written to RAM. This field should be read as '1'
50393 	 * to indicate that the output has been completely written.
50394 	 * When writing a command completion or response to an internal
50395 	 * processor, the order of writes has to be such that this field is
50396 	 * written last.
50397 	 */
50398 	uint8_t	valid;
50399 } hwrm_cfa_pair_alloc_output_t, *phwrm_cfa_pair_alloc_output_t;
50400 
50401 /**********************
50402  * hwrm_cfa_pair_free *
50403  **********************/
50404 
50405 
50406 /* hwrm_cfa_pair_free_input (size:448b/56B) */
50407 
50408 typedef struct hwrm_cfa_pair_free_input {
50409 	/* The HWRM command request type. */
50410 	uint16_t	req_type;
50411 	/*
50412 	 * The completion ring to send the completion event on. This should
50413 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50414 	 */
50415 	uint16_t	cmpl_ring;
50416 	/*
50417 	 * The sequence ID is used by the driver for tracking multiple
50418 	 * commands. This ID is treated as opaque data by the firmware and
50419 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50420 	 */
50421 	uint16_t	seq_id;
50422 	/*
50423 	 * The target ID of the command:
50424 	 * * 0x0-0xFFF8 - The function ID
50425 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50426 	 * * 0xFFFD - Reserved for user-space HWRM interface
50427 	 * * 0xFFFF - HWRM
50428 	 */
50429 	uint16_t	target_id;
50430 	/*
50431 	 * A physical address pointer pointing to a host buffer that the
50432 	 * command's response data will be written. This can be either a host
50433 	 * physical address (HPA) or a guest physical address (GPA) and must
50434 	 * point to a physically contiguous block of memory.
50435 	 */
50436 	uint64_t	resp_addr;
50437 	/* VF Pair name (32 byte string). */
50438 	char	pair_name[32];
50439 	/* Logical PF (0xff-PF for command channel). */
50440 	uint8_t	pf_b_id;
50441 	uint8_t	unused_0[3];
50442 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
50443 	uint16_t	vf_id;
50444 	/*
50445 	 * Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair,
50446 	 *		5-rep2fn_mod, 6-rep2fn_modall, 7-rep2fn_truflow).
50447 	 */
50448 	uint16_t	pair_mode;
50449 	/*
50450 	 * Pair between VF on local host with PF or VF on specified host.
50451 	 * (deprecated)
50452 	 */
50453 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_VF2FN	UINT32_C(0x0)
50454 	/*
50455 	 * Pair between REP on local host with PF or VF on specified host.
50456 	 * (deprecated)
50457 	 */
50458 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN	UINT32_C(0x1)
50459 	/*
50460 	 * Pair between REP on local host with REP on specified host.
50461 	 * (deprecated)
50462 	 */
50463 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2REP	UINT32_C(0x2)
50464 	/* Pair for the proxy interface. (deprecated) */
50465 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_PROXY	UINT32_C(0x3)
50466 	/* Pair for the PF interface. (deprecated) */
50467 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_PFPAIR	UINT32_C(0x4)
50468 	/* Modify existing rep2fn pair and move pair to new PF. (deprecated) */
50469 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_MOD	UINT32_C(0x5)
50470 	/*
50471 	 * Modify existing rep2fn pairs paired with same PF and move pairs
50472 	 * to new PF. (deprecated)
50473 	 */
50474 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_MODALL  UINT32_C(0x6)
50475 	/*
50476 	 * Truflow pair between REP on local host with PF or VF on
50477 	 * specified host.
50478 	 */
50479 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_TRUFLOW UINT32_C(0x7)
50480 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_LAST	HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_TRUFLOW
50481 } hwrm_cfa_pair_free_input_t, *phwrm_cfa_pair_free_input_t;
50482 
50483 /* hwrm_cfa_pair_free_output (size:128b/16B) */
50484 
50485 typedef struct hwrm_cfa_pair_free_output {
50486 	/* The specific error status for the command. */
50487 	uint16_t	error_code;
50488 	/* The HWRM command request type. */
50489 	uint16_t	req_type;
50490 	/* The sequence ID from the original command. */
50491 	uint16_t	seq_id;
50492 	/* The length of the response data in number of bytes. */
50493 	uint16_t	resp_len;
50494 	uint8_t	unused_0[7];
50495 	/*
50496 	 * This field is used in Output records to indicate that the output
50497 	 * is completely written to RAM. This field should be read as '1'
50498 	 * to indicate that the output has been completely written.
50499 	 * When writing a command completion or response to an internal
50500 	 * processor, the order of writes has to be such that this field is
50501 	 * written last.
50502 	 */
50503 	uint8_t	valid;
50504 } hwrm_cfa_pair_free_output_t, *phwrm_cfa_pair_free_output_t;
50505 
50506 /**********************
50507  * hwrm_cfa_pair_info *
50508  **********************/
50509 
50510 
50511 /* hwrm_cfa_pair_info_input (size:448b/56B) */
50512 
50513 typedef struct hwrm_cfa_pair_info_input {
50514 	/* The HWRM command request type. */
50515 	uint16_t	req_type;
50516 	/*
50517 	 * The completion ring to send the completion event on. This should
50518 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50519 	 */
50520 	uint16_t	cmpl_ring;
50521 	/*
50522 	 * The sequence ID is used by the driver for tracking multiple
50523 	 * commands. This ID is treated as opaque data by the firmware and
50524 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50525 	 */
50526 	uint16_t	seq_id;
50527 	/*
50528 	 * The target ID of the command:
50529 	 * * 0x0-0xFFF8 - The function ID
50530 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50531 	 * * 0xFFFD - Reserved for user-space HWRM interface
50532 	 * * 0xFFFF - HWRM
50533 	 */
50534 	uint16_t	target_id;
50535 	/*
50536 	 * A physical address pointer pointing to a host buffer that the
50537 	 * command's response data will be written. This can be either a host
50538 	 * physical address (HPA) or a guest physical address (GPA) and must
50539 	 * point to a physically contiguous block of memory.
50540 	 */
50541 	uint64_t	resp_addr;
50542 	uint32_t	flags;
50543 	/* If this flag is set, lookup by name else lookup by index. */
50544 	#define HWRM_CFA_PAIR_INFO_INPUT_FLAGS_LOOKUP_TYPE	UINT32_C(0x1)
50545 	/* If this flag is set, lookup by PF id and VF id. */
50546 	#define HWRM_CFA_PAIR_INFO_INPUT_FLAGS_LOOKUP_REPRE	UINT32_C(0x2)
50547 	/* Pair table index. */
50548 	uint16_t	pair_index;
50549 	/* Pair pf index. */
50550 	uint8_t	pair_pfid;
50551 	/* Pair vf index. */
50552 	uint8_t	pair_vfid;
50553 	/* Pair name (32 byte string). */
50554 	char	pair_name[32];
50555 } hwrm_cfa_pair_info_input_t, *phwrm_cfa_pair_info_input_t;
50556 
50557 /* hwrm_cfa_pair_info_output (size:576b/72B) */
50558 
50559 typedef struct hwrm_cfa_pair_info_output {
50560 	/* The specific error status for the command. */
50561 	uint16_t	error_code;
50562 	/* The HWRM command request type. */
50563 	uint16_t	req_type;
50564 	/* The sequence ID from the original command. */
50565 	uint16_t	seq_id;
50566 	/* The length of the response data in number of bytes. */
50567 	uint16_t	resp_len;
50568 	/* Pair table index. */
50569 	uint16_t	next_pair_index;
50570 	/* Pair member a's fid. */
50571 	uint16_t	a_fid;
50572 	/* Logical host number. */
50573 	uint8_t	host_a_index;
50574 	/* Logical PF number. */
50575 	uint8_t	pf_a_index;
50576 	/* Pair member a's Linux logical VF number. */
50577 	uint16_t	vf_a_index;
50578 	/* Rx CFA code. */
50579 	uint16_t	rx_cfa_code_a;
50580 	/* Tx CFA action. */
50581 	uint16_t	tx_cfa_action_a;
50582 	/* Pair member b's fid. */
50583 	uint16_t	b_fid;
50584 	/* Logical host number. */
50585 	uint8_t	host_b_index;
50586 	/* Logical PF number. */
50587 	uint8_t	pf_b_index;
50588 	/* Pair member a's Linux logical VF number. */
50589 	uint16_t	vf_b_index;
50590 	/* Rx CFA code. */
50591 	uint16_t	rx_cfa_code_b;
50592 	/* Tx CFA action. */
50593 	uint16_t	tx_cfa_action_b;
50594 	/* Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair). */
50595 	uint8_t	pair_mode;
50596 	/*
50597 	 * Pair between VF on local host with PF or VF on specified host.
50598 	 * (deprecated)
50599 	 */
50600 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_VF2FN   UINT32_C(0x0)
50601 	/*
50602 	 * Pair between REP on local host with PF or VF on specified host.
50603 	 * (deprecated)
50604 	 */
50605 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_REP2FN  UINT32_C(0x1)
50606 	/*
50607 	 * Pair between REP on local host with REP on specified host.
50608 	 * (deprecated)
50609 	 */
50610 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_REP2REP UINT32_C(0x2)
50611 	/* Pair for the proxy interface. (deprecated) */
50612 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PROXY   UINT32_C(0x3)
50613 	/* Pair for the PF interface. (deprecated) */
50614 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PFPAIR  UINT32_C(0x4)
50615 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_LAST   HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PFPAIR
50616 	/* Pair state. */
50617 	uint8_t	pair_state;
50618 	/* Pair has been allocated */
50619 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ALLOCATED UINT32_C(0x1)
50620 	/* Both pair members are active */
50621 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE	UINT32_C(0x2)
50622 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_LAST	HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE
50623 	/* Pair name (32 byte string). */
50624 	char	pair_name[32];
50625 	uint8_t	unused_0[7];
50626 	/*
50627 	 * This field is used in Output records to indicate that the output
50628 	 * is completely written to RAM. This field should be read as '1'
50629 	 * to indicate that the output has been completely written.
50630 	 * When writing a command completion or response to an internal
50631 	 * processor, the order of writes has to be such that this field is
50632 	 * written last.
50633 	 */
50634 	uint8_t	valid;
50635 } hwrm_cfa_pair_info_output_t, *phwrm_cfa_pair_info_output_t;
50636 
50637 /**********************
50638  * hwrm_cfa_vfr_alloc *
50639  **********************/
50640 
50641 
50642 /* hwrm_cfa_vfr_alloc_input (size:448b/56B) */
50643 
50644 typedef struct hwrm_cfa_vfr_alloc_input {
50645 	/* The HWRM command request type. */
50646 	uint16_t	req_type;
50647 	/*
50648 	 * The completion ring to send the completion event on. This should
50649 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50650 	 */
50651 	uint16_t	cmpl_ring;
50652 	/*
50653 	 * The sequence ID is used by the driver for tracking multiple
50654 	 * commands. This ID is treated as opaque data by the firmware and
50655 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50656 	 */
50657 	uint16_t	seq_id;
50658 	/*
50659 	 * The target ID of the command:
50660 	 * * 0x0-0xFFF8 - The function ID
50661 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50662 	 * * 0xFFFD - Reserved for user-space HWRM interface
50663 	 * * 0xFFFF - HWRM
50664 	 */
50665 	uint16_t	target_id;
50666 	/*
50667 	 * A physical address pointer pointing to a host buffer that the
50668 	 * command's response data will be written. This can be either a host
50669 	 * physical address (HPA) or a guest physical address (GPA) and must
50670 	 * point to a physically contiguous block of memory.
50671 	 */
50672 	uint64_t	resp_addr;
50673 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
50674 	uint16_t	vf_id;
50675 	/*
50676 	 * This field is reserved for the future use.
50677 	 * It shall be set to 0.
50678 	 */
50679 	uint16_t	reserved;
50680 	uint8_t	unused_0[4];
50681 	/* VF Representor name (32 byte string). */
50682 	char	vfr_name[32];
50683 } hwrm_cfa_vfr_alloc_input_t, *phwrm_cfa_vfr_alloc_input_t;
50684 
50685 /* hwrm_cfa_vfr_alloc_output (size:128b/16B) */
50686 
50687 typedef struct hwrm_cfa_vfr_alloc_output {
50688 	/* The specific error status for the command. */
50689 	uint16_t	error_code;
50690 	/* The HWRM command request type. */
50691 	uint16_t	req_type;
50692 	/* The sequence ID from the original command. */
50693 	uint16_t	seq_id;
50694 	/* The length of the response data in number of bytes. */
50695 	uint16_t	resp_len;
50696 	/* Rx CFA code. */
50697 	uint16_t	rx_cfa_code;
50698 	/* Tx CFA action. */
50699 	uint16_t	tx_cfa_action;
50700 	uint8_t	unused_0[3];
50701 	/*
50702 	 * This field is used in Output records to indicate that the output
50703 	 * is completely written to RAM. This field should be read as '1'
50704 	 * to indicate that the output has been completely written.
50705 	 * When writing a command completion or response to an internal
50706 	 * processor, the order of writes has to be such that this field is
50707 	 * written last.
50708 	 */
50709 	uint8_t	valid;
50710 } hwrm_cfa_vfr_alloc_output_t, *phwrm_cfa_vfr_alloc_output_t;
50711 
50712 /*********************
50713  * hwrm_cfa_vfr_free *
50714  *********************/
50715 
50716 
50717 /* hwrm_cfa_vfr_free_input (size:448b/56B) */
50718 
50719 typedef struct hwrm_cfa_vfr_free_input {
50720 	/* The HWRM command request type. */
50721 	uint16_t	req_type;
50722 	/*
50723 	 * The completion ring to send the completion event on. This should
50724 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50725 	 */
50726 	uint16_t	cmpl_ring;
50727 	/*
50728 	 * The sequence ID is used by the driver for tracking multiple
50729 	 * commands. This ID is treated as opaque data by the firmware and
50730 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50731 	 */
50732 	uint16_t	seq_id;
50733 	/*
50734 	 * The target ID of the command:
50735 	 * * 0x0-0xFFF8 - The function ID
50736 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50737 	 * * 0xFFFD - Reserved for user-space HWRM interface
50738 	 * * 0xFFFF - HWRM
50739 	 */
50740 	uint16_t	target_id;
50741 	/*
50742 	 * A physical address pointer pointing to a host buffer that the
50743 	 * command's response data will be written. This can be either a host
50744 	 * physical address (HPA) or a guest physical address (GPA) and must
50745 	 * point to a physically contiguous block of memory.
50746 	 */
50747 	uint64_t	resp_addr;
50748 	/* VF Representor name (32 byte string). */
50749 	char	vfr_name[32];
50750 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
50751 	uint16_t	vf_id;
50752 	/*
50753 	 * This field is reserved for the future use.
50754 	 * It shall be set to 0.
50755 	 */
50756 	uint16_t	reserved;
50757 	uint8_t	unused_0[4];
50758 } hwrm_cfa_vfr_free_input_t, *phwrm_cfa_vfr_free_input_t;
50759 
50760 /* hwrm_cfa_vfr_free_output (size:128b/16B) */
50761 
50762 typedef struct hwrm_cfa_vfr_free_output {
50763 	/* The specific error status for the command. */
50764 	uint16_t	error_code;
50765 	/* The HWRM command request type. */
50766 	uint16_t	req_type;
50767 	/* The sequence ID from the original command. */
50768 	uint16_t	seq_id;
50769 	/* The length of the response data in number of bytes. */
50770 	uint16_t	resp_len;
50771 	uint8_t	unused_0[7];
50772 	/*
50773 	 * This field is used in Output records to indicate that the output
50774 	 * is completely written to RAM. This field should be read as '1'
50775 	 * to indicate that the output has been completely written.
50776 	 * When writing a command completion or response to an internal
50777 	 * processor, the order of writes has to be such that this field is
50778 	 * written last.
50779 	 */
50780 	uint8_t	valid;
50781 } hwrm_cfa_vfr_free_output_t, *phwrm_cfa_vfr_free_output_t;
50782 
50783 /***************************************
50784  * hwrm_cfa_redirect_query_tunnel_type *
50785  ***************************************/
50786 
50787 
50788 /* hwrm_cfa_redirect_query_tunnel_type_input (size:192b/24B) */
50789 
50790 typedef struct hwrm_cfa_redirect_query_tunnel_type_input {
50791 	/* The HWRM command request type. */
50792 	uint16_t	req_type;
50793 	/*
50794 	 * The completion ring to send the completion event on. This should
50795 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50796 	 */
50797 	uint16_t	cmpl_ring;
50798 	/*
50799 	 * The sequence ID is used by the driver for tracking multiple
50800 	 * commands. This ID is treated as opaque data by the firmware and
50801 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50802 	 */
50803 	uint16_t	seq_id;
50804 	/*
50805 	 * The target ID of the command:
50806 	 * * 0x0-0xFFF8 - The function ID
50807 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50808 	 * * 0xFFFD - Reserved for user-space HWRM interface
50809 	 * * 0xFFFF - HWRM
50810 	 */
50811 	uint16_t	target_id;
50812 	/*
50813 	 * A physical address pointer pointing to a host buffer that the
50814 	 * command's response data will be written. This can be either a host
50815 	 * physical address (HPA) or a guest physical address (GPA) and must
50816 	 * point to a physically contiguous block of memory.
50817 	 */
50818 	uint64_t	resp_addr;
50819 	/* The source function id. */
50820 	uint16_t	src_fid;
50821 	uint8_t	unused_0[6];
50822 } hwrm_cfa_redirect_query_tunnel_type_input_t, *phwrm_cfa_redirect_query_tunnel_type_input_t;
50823 
50824 /* hwrm_cfa_redirect_query_tunnel_type_output (size:128b/16B) */
50825 
50826 typedef struct hwrm_cfa_redirect_query_tunnel_type_output {
50827 	/* The specific error status for the command. */
50828 	uint16_t	error_code;
50829 	/* The HWRM command request type. */
50830 	uint16_t	req_type;
50831 	/* The sequence ID from the original command. */
50832 	uint16_t	seq_id;
50833 	/* The length of the response data in number of bytes. */
50834 	uint16_t	resp_len;
50835 	/* Tunnel Mask. */
50836 	uint32_t	tunnel_mask;
50837 	/* Non-tunnel */
50838 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_NONTUNNEL	UINT32_C(0x1)
50839 	/* Virtual eXtensible Local Area Network (VXLAN) */
50840 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN		UINT32_C(0x2)
50841 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
50842 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_NVGRE		UINT32_C(0x4)
50843 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
50844 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_L2GRE		UINT32_C(0x8)
50845 	/* IP in IP */
50846 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_IPIP		UINT32_C(0x10)
50847 	/* Generic Network Virtualization Encapsulation (Geneve) */
50848 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_GENEVE	UINT32_C(0x20)
50849 	/* Multi-Protocol Label Switching (MPLS) */
50850 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_MPLS		UINT32_C(0x40)
50851 	/* Stateless Transport Tunnel (STT) */
50852 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_STT		UINT32_C(0x80)
50853 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
50854 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_IPGRE		UINT32_C(0x100)
50855 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
50856 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN_V4	UINT32_C(0x200)
50857 	/*
50858 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
50859 	 * datagram payload
50860 	 */
50861 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_IPGRE_V1	UINT32_C(0x400)
50862 	/* Any tunneled traffic */
50863 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_ANYTUNNEL	UINT32_C(0x800)
50864 	/* Use fixed layer 2 ether type of 0xFFFF */
50865 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_L2_ETYPE	UINT32_C(0x1000)
50866 	/*
50867 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
50868 	 * (IPV6oVXLANGPE)
50869 	 */
50870 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN_GPE_V6	UINT32_C(0x2000)
50871 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
50872 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN_GPE	UINT32_C(0x4000)
50873 	uint8_t	unused_0[3];
50874 	/*
50875 	 * This field is used in Output records to indicate that the output
50876 	 * is completely written to RAM. This field should be read as '1'
50877 	 * to indicate that the output has been completely written.
50878 	 * When writing a command completion or response to an internal
50879 	 * processor, the order of writes has to be such that this field is
50880 	 * written last.
50881 	 */
50882 	uint8_t	valid;
50883 } hwrm_cfa_redirect_query_tunnel_type_output_t, *phwrm_cfa_redirect_query_tunnel_type_output_t;
50884 
50885 /*************************
50886  * hwrm_cfa_ctx_mem_rgtr *
50887  *************************/
50888 
50889 
50890 /* hwrm_cfa_ctx_mem_rgtr_input (size:256b/32B) */
50891 
50892 typedef struct hwrm_cfa_ctx_mem_rgtr_input {
50893 	/* The HWRM command request type. */
50894 	uint16_t	req_type;
50895 	/*
50896 	 * The completion ring to send the completion event on. This should
50897 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50898 	 */
50899 	uint16_t	cmpl_ring;
50900 	/*
50901 	 * The sequence ID is used by the driver for tracking multiple
50902 	 * commands. This ID is treated as opaque data by the firmware and
50903 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50904 	 */
50905 	uint16_t	seq_id;
50906 	/*
50907 	 * The target ID of the command:
50908 	 * * 0x0-0xFFF8 - The function ID
50909 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50910 	 * * 0xFFFD - Reserved for user-space HWRM interface
50911 	 * * 0xFFFF - HWRM
50912 	 */
50913 	uint16_t	target_id;
50914 	/*
50915 	 * A physical address pointer pointing to a host buffer that the
50916 	 * command's response data will be written. This can be either a host
50917 	 * physical address (HPA) or a guest physical address (GPA) and must
50918 	 * point to a physically contiguous block of memory.
50919 	 */
50920 	uint64_t	resp_addr;
50921 	uint16_t	flags;
50922 	/* Counter PBL indirect levels. */
50923 	uint8_t	page_level;
50924 	/* PBL pointer is physical start address. */
50925 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_0 UINT32_C(0x0)
50926 	/* PBL pointer points to PTE table. */
50927 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_1 UINT32_C(0x1)
50928 	/*
50929 	 * PBL pointer points to PDE table with each entry pointing to PTE
50930 	 * tables.
50931 	 */
50932 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_2 UINT32_C(0x2)
50933 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LAST HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_2
50934 	/* Page size. */
50935 	uint8_t	page_size;
50936 	/* 4KB page size. */
50937 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_4K   UINT32_C(0x0)
50938 	/* 8KB page size. */
50939 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_8K   UINT32_C(0x1)
50940 	/* 64KB page size. */
50941 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_64K  UINT32_C(0x4)
50942 	/* 256KB page size. */
50943 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_256K UINT32_C(0x6)
50944 	/* 1MB page size. */
50945 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_1M   UINT32_C(0x8)
50946 	/* 2MB page size. */
50947 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_2M   UINT32_C(0x9)
50948 	/* 4MB page size. */
50949 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_4M   UINT32_C(0xa)
50950 	/* 1GB page size. */
50951 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_1G   UINT32_C(0x12)
50952 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_LAST HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_1G
50953 	uint32_t	unused_0;
50954 	/* Pointer to the PBL, or PDL depending on number of levels */
50955 	uint64_t	page_dir;
50956 } hwrm_cfa_ctx_mem_rgtr_input_t, *phwrm_cfa_ctx_mem_rgtr_input_t;
50957 
50958 /* hwrm_cfa_ctx_mem_rgtr_output (size:128b/16B) */
50959 
50960 typedef struct hwrm_cfa_ctx_mem_rgtr_output {
50961 	/* The specific error status for the command. */
50962 	uint16_t	error_code;
50963 	/* The HWRM command request type. */
50964 	uint16_t	req_type;
50965 	/* The sequence ID from the original command. */
50966 	uint16_t	seq_id;
50967 	/* The length of the response data in number of bytes. */
50968 	uint16_t	resp_len;
50969 	/*
50970 	 * Id/Handle to the recently register context memory. This handle is
50971 	 * passed to the CFA feature.
50972 	 */
50973 	uint16_t	ctx_id;
50974 	uint8_t	unused_0[5];
50975 	/*
50976 	 * This field is used in Output records to indicate that the output
50977 	 * is completely written to RAM. This field should be read as '1'
50978 	 * to indicate that the output has been completely written.
50979 	 * When writing a command completion or response to an internal
50980 	 * processor, the order of writes has to be such that this field is
50981 	 * written last.
50982 	 */
50983 	uint8_t	valid;
50984 } hwrm_cfa_ctx_mem_rgtr_output_t, *phwrm_cfa_ctx_mem_rgtr_output_t;
50985 
50986 /***************************
50987  * hwrm_cfa_ctx_mem_unrgtr *
50988  ***************************/
50989 
50990 
50991 /* hwrm_cfa_ctx_mem_unrgtr_input (size:192b/24B) */
50992 
50993 typedef struct hwrm_cfa_ctx_mem_unrgtr_input {
50994 	/* The HWRM command request type. */
50995 	uint16_t	req_type;
50996 	/*
50997 	 * The completion ring to send the completion event on. This should
50998 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50999 	 */
51000 	uint16_t	cmpl_ring;
51001 	/*
51002 	 * The sequence ID is used by the driver for tracking multiple
51003 	 * commands. This ID is treated as opaque data by the firmware and
51004 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51005 	 */
51006 	uint16_t	seq_id;
51007 	/*
51008 	 * The target ID of the command:
51009 	 * * 0x0-0xFFF8 - The function ID
51010 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51011 	 * * 0xFFFD - Reserved for user-space HWRM interface
51012 	 * * 0xFFFF - HWRM
51013 	 */
51014 	uint16_t	target_id;
51015 	/*
51016 	 * A physical address pointer pointing to a host buffer that the
51017 	 * command's response data will be written. This can be either a host
51018 	 * physical address (HPA) or a guest physical address (GPA) and must
51019 	 * point to a physically contiguous block of memory.
51020 	 */
51021 	uint64_t	resp_addr;
51022 	/*
51023 	 * Id/Handle to the recently register context memory. This handle is
51024 	 * passed to the CFA feature.
51025 	 */
51026 	uint16_t	ctx_id;
51027 	uint8_t	unused_0[6];
51028 } hwrm_cfa_ctx_mem_unrgtr_input_t, *phwrm_cfa_ctx_mem_unrgtr_input_t;
51029 
51030 /* hwrm_cfa_ctx_mem_unrgtr_output (size:128b/16B) */
51031 
51032 typedef struct hwrm_cfa_ctx_mem_unrgtr_output {
51033 	/* The specific error status for the command. */
51034 	uint16_t	error_code;
51035 	/* The HWRM command request type. */
51036 	uint16_t	req_type;
51037 	/* The sequence ID from the original command. */
51038 	uint16_t	seq_id;
51039 	/* The length of the response data in number of bytes. */
51040 	uint16_t	resp_len;
51041 	uint8_t	unused_0[7];
51042 	/*
51043 	 * This field is used in Output records to indicate that the output
51044 	 * is completely written to RAM. This field should be read as '1'
51045 	 * to indicate that the output has been completely written.
51046 	 * When writing a command completion or response to an internal
51047 	 * processor, the order of writes has to be such that this field is
51048 	 * written last.
51049 	 */
51050 	uint8_t	valid;
51051 } hwrm_cfa_ctx_mem_unrgtr_output_t, *phwrm_cfa_ctx_mem_unrgtr_output_t;
51052 
51053 /*************************
51054  * hwrm_cfa_ctx_mem_qctx *
51055  *************************/
51056 
51057 
51058 /* hwrm_cfa_ctx_mem_qctx_input (size:192b/24B) */
51059 
51060 typedef struct hwrm_cfa_ctx_mem_qctx_input {
51061 	/* The HWRM command request type. */
51062 	uint16_t	req_type;
51063 	/*
51064 	 * The completion ring to send the completion event on. This should
51065 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51066 	 */
51067 	uint16_t	cmpl_ring;
51068 	/*
51069 	 * The sequence ID is used by the driver for tracking multiple
51070 	 * commands. This ID is treated as opaque data by the firmware and
51071 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51072 	 */
51073 	uint16_t	seq_id;
51074 	/*
51075 	 * The target ID of the command:
51076 	 * * 0x0-0xFFF8 - The function ID
51077 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51078 	 * * 0xFFFD - Reserved for user-space HWRM interface
51079 	 * * 0xFFFF - HWRM
51080 	 */
51081 	uint16_t	target_id;
51082 	/*
51083 	 * A physical address pointer pointing to a host buffer that the
51084 	 * command's response data will be written. This can be either a host
51085 	 * physical address (HPA) or a guest physical address (GPA) and must
51086 	 * point to a physically contiguous block of memory.
51087 	 */
51088 	uint64_t	resp_addr;
51089 	/*
51090 	 * Id/Handle to the recently register context memory. This handle is
51091 	 * passed to the CFA feature.
51092 	 */
51093 	uint16_t	ctx_id;
51094 	uint8_t	unused_0[6];
51095 } hwrm_cfa_ctx_mem_qctx_input_t, *phwrm_cfa_ctx_mem_qctx_input_t;
51096 
51097 /* hwrm_cfa_ctx_mem_qctx_output (size:256b/32B) */
51098 
51099 typedef struct hwrm_cfa_ctx_mem_qctx_output {
51100 	/* The specific error status for the command. */
51101 	uint16_t	error_code;
51102 	/* The HWRM command request type. */
51103 	uint16_t	req_type;
51104 	/* The sequence ID from the original command. */
51105 	uint16_t	seq_id;
51106 	/* The length of the response data in number of bytes. */
51107 	uint16_t	resp_len;
51108 	uint16_t	flags;
51109 	/* Counter PBL indirect levels. */
51110 	uint8_t	page_level;
51111 	/* PBL pointer is physical start address. */
51112 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_0 UINT32_C(0x0)
51113 	/* PBL pointer points to PTE table. */
51114 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_1 UINT32_C(0x1)
51115 	/*
51116 	 * PBL pointer points to PDE table with each entry pointing to PTE
51117 	 * tables.
51118 	 */
51119 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_2 UINT32_C(0x2)
51120 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LAST HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_2
51121 	/* Page size. */
51122 	uint8_t	page_size;
51123 	/* 4KB page size. */
51124 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_4K   UINT32_C(0x0)
51125 	/* 8KB page size. */
51126 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_8K   UINT32_C(0x1)
51127 	/* 64KB page size. */
51128 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_64K  UINT32_C(0x4)
51129 	/* 256KB page size. */
51130 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_256K UINT32_C(0x6)
51131 	/* 1MB page size. */
51132 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_1M   UINT32_C(0x8)
51133 	/* 2MB page size. */
51134 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_2M   UINT32_C(0x9)
51135 	/* 4MB page size. */
51136 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_4M   UINT32_C(0xa)
51137 	/* 1GB page size. */
51138 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_1G   UINT32_C(0x12)
51139 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_LAST HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_1G
51140 	uint8_t	unused_0[4];
51141 	/* Pointer to the PBL, or PDL depending on number of levels */
51142 	uint64_t	page_dir;
51143 	uint8_t	unused_1[7];
51144 	/*
51145 	 * This field is used in Output records to indicate that the output
51146 	 * is completely written to RAM. This field should be read as '1'
51147 	 * to indicate that the output has been completely written.
51148 	 * When writing a command completion or response to an internal
51149 	 * processor, the order of writes has to be such that this field is
51150 	 * written last.
51151 	 */
51152 	uint8_t	valid;
51153 } hwrm_cfa_ctx_mem_qctx_output_t, *phwrm_cfa_ctx_mem_qctx_output_t;
51154 
51155 /**************************
51156  * hwrm_cfa_ctx_mem_qcaps *
51157  **************************/
51158 
51159 
51160 /* hwrm_cfa_ctx_mem_qcaps_input (size:128b/16B) */
51161 
51162 typedef struct hwrm_cfa_ctx_mem_qcaps_input {
51163 	/* The HWRM command request type. */
51164 	uint16_t	req_type;
51165 	/*
51166 	 * The completion ring to send the completion event on. This should
51167 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51168 	 */
51169 	uint16_t	cmpl_ring;
51170 	/*
51171 	 * The sequence ID is used by the driver for tracking multiple
51172 	 * commands. This ID is treated as opaque data by the firmware and
51173 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51174 	 */
51175 	uint16_t	seq_id;
51176 	/*
51177 	 * The target ID of the command:
51178 	 * * 0x0-0xFFF8 - The function ID
51179 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51180 	 * * 0xFFFD - Reserved for user-space HWRM interface
51181 	 * * 0xFFFF - HWRM
51182 	 */
51183 	uint16_t	target_id;
51184 	/*
51185 	 * A physical address pointer pointing to a host buffer that the
51186 	 * command's response data will be written. This can be either a host
51187 	 * physical address (HPA) or a guest physical address (GPA) and must
51188 	 * point to a physically contiguous block of memory.
51189 	 */
51190 	uint64_t	resp_addr;
51191 } hwrm_cfa_ctx_mem_qcaps_input_t, *phwrm_cfa_ctx_mem_qcaps_input_t;
51192 
51193 /* hwrm_cfa_ctx_mem_qcaps_output (size:128b/16B) */
51194 
51195 typedef struct hwrm_cfa_ctx_mem_qcaps_output {
51196 	/* The specific error status for the command. */
51197 	uint16_t	error_code;
51198 	/* The HWRM command request type. */
51199 	uint16_t	req_type;
51200 	/* The sequence ID from the original command. */
51201 	uint16_t	seq_id;
51202 	/* The length of the response data in number of bytes. */
51203 	uint16_t	resp_len;
51204 	/*
51205 	 * Indicates the maximum number of context memory which can be
51206 	 * registered.
51207 	 */
51208 	uint16_t	max_entries;
51209 	uint8_t	unused_0[5];
51210 	/*
51211 	 * This field is used in Output records to indicate that the output
51212 	 * is completely written to RAM. This field should be read as '1'
51213 	 * to indicate that the output has been completely written.
51214 	 * When writing a command completion or response to an internal
51215 	 * processor, the order of writes has to be such that this field is
51216 	 * written last.
51217 	 */
51218 	uint8_t	valid;
51219 } hwrm_cfa_ctx_mem_qcaps_output_t, *phwrm_cfa_ctx_mem_qcaps_output_t;
51220 
51221 /**************************
51222  * hwrm_cfa_counter_qcaps *
51223  **************************/
51224 
51225 
51226 /* hwrm_cfa_counter_qcaps_input (size:128b/16B) */
51227 
51228 typedef struct hwrm_cfa_counter_qcaps_input {
51229 	/* The HWRM command request type. */
51230 	uint16_t	req_type;
51231 	/*
51232 	 * The completion ring to send the completion event on. This should
51233 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51234 	 */
51235 	uint16_t	cmpl_ring;
51236 	/*
51237 	 * The sequence ID is used by the driver for tracking multiple
51238 	 * commands. This ID is treated as opaque data by the firmware and
51239 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51240 	 */
51241 	uint16_t	seq_id;
51242 	/*
51243 	 * The target ID of the command:
51244 	 * * 0x0-0xFFF8 - The function ID
51245 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51246 	 * * 0xFFFD - Reserved for user-space HWRM interface
51247 	 * * 0xFFFF - HWRM
51248 	 */
51249 	uint16_t	target_id;
51250 	/*
51251 	 * A physical address pointer pointing to a host buffer that the
51252 	 * command's response data will be written. This can be either a host
51253 	 * physical address (HPA) or a guest physical address (GPA) and must
51254 	 * point to a physically contiguous block of memory.
51255 	 */
51256 	uint64_t	resp_addr;
51257 } hwrm_cfa_counter_qcaps_input_t, *phwrm_cfa_counter_qcaps_input_t;
51258 
51259 /* hwrm_cfa_counter_qcaps_output (size:576b/72B) */
51260 
51261 typedef struct hwrm_cfa_counter_qcaps_output {
51262 	/* The specific error status for the command. */
51263 	uint16_t	error_code;
51264 	/* The HWRM command request type. */
51265 	uint16_t	req_type;
51266 	/* The sequence ID from the original command. */
51267 	uint16_t	seq_id;
51268 	/* The length of the response data in number of bytes. */
51269 	uint16_t	resp_len;
51270 	uint32_t	flags;
51271 	/* Enumeration denoting the supported CFA counter format. */
51272 	#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT	UINT32_C(0x1)
51273 	/* CFA counter types are not supported. */
51274 		#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_NONE	UINT32_C(0x0)
51275 	/* 64-bit packet counters followed by 64-bit byte counters format. */
51276 		#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_64_BIT  UINT32_C(0x1)
51277 		#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_LAST   HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_64_BIT
51278 	uint32_t	unused_0;
51279 	/*
51280 	 * Minimum guaranteed number of flow counters supported for this
51281 	 * function, in RX direction.
51282 	 */
51283 	uint32_t	min_rx_fc;
51284 	/*
51285 	 * Maximum non-guaranteed number of flow counters supported for this
51286 	 * function, in RX direction.
51287 	 */
51288 	uint32_t	max_rx_fc;
51289 	/*
51290 	 * Minimum guaranteed number of flow counters supported for this
51291 	 * function, in TX direction.
51292 	 */
51293 	uint32_t	min_tx_fc;
51294 	/*
51295 	 * Maximum non-guaranteed number of flow counters supported for this
51296 	 * function, in TX direction.
51297 	 */
51298 	uint32_t	max_tx_fc;
51299 	/*
51300 	 * Minimum guaranteed number of extension flow counters supported for
51301 	 * this function, in RX direction.
51302 	 */
51303 	uint32_t	min_rx_efc;
51304 	/*
51305 	 * Maximum non-guaranteed number of extension flow counters supported
51306 	 * for this function, in RX direction.
51307 	 */
51308 	uint32_t	max_rx_efc;
51309 	/*
51310 	 * Minimum guaranteed number of extension flow counters supported for
51311 	 * this function, in TX direction.
51312 	 */
51313 	uint32_t	min_tx_efc;
51314 	/*
51315 	 * Maximum non-guaranteed number of extension flow counters supported
51316 	 * for this function, in TX direction.
51317 	 */
51318 	uint32_t	max_tx_efc;
51319 	/*
51320 	 * Minimum guaranteed number of meter drop counters supported for
51321 	 * this function, in RX direction.
51322 	 */
51323 	uint32_t	min_rx_mdc;
51324 	/*
51325 	 * Maximum non-guaranteed number of meter drop counters supported for
51326 	 * this function, in RX direction.
51327 	 */
51328 	uint32_t	max_rx_mdc;
51329 	/*
51330 	 * Minimum guaranteed number of meter drop counters supported for this
51331 	 * function, in TX direction.
51332 	 */
51333 	uint32_t	min_tx_mdc;
51334 	/*
51335 	 * Maximum non-guaranteed number of meter drop counters supported for
51336 	 * this function, in TX direction.
51337 	 */
51338 	uint32_t	max_tx_mdc;
51339 	/*
51340 	 * Maximum guaranteed number of flow counters which can be used during
51341 	 * flow alloc.
51342 	 */
51343 	uint32_t	max_flow_alloc_fc;
51344 	uint8_t	unused_1[3];
51345 	/*
51346 	 * This field is used in Output records to indicate that the output
51347 	 * is completely written to RAM. This field should be read as '1'
51348 	 * to indicate that the output has been completely written.
51349 	 * When writing a command completion or response to an internal
51350 	 * processor, the order of writes has to be such that this field is
51351 	 * written last.
51352 	 */
51353 	uint8_t	valid;
51354 } hwrm_cfa_counter_qcaps_output_t, *phwrm_cfa_counter_qcaps_output_t;
51355 
51356 /************************
51357  * hwrm_cfa_counter_cfg *
51358  ************************/
51359 
51360 
51361 /* hwrm_cfa_counter_cfg_input (size:256b/32B) */
51362 
51363 typedef struct hwrm_cfa_counter_cfg_input {
51364 	/* The HWRM command request type. */
51365 	uint16_t	req_type;
51366 	/*
51367 	 * The completion ring to send the completion event on. This should
51368 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51369 	 */
51370 	uint16_t	cmpl_ring;
51371 	/*
51372 	 * The sequence ID is used by the driver for tracking multiple
51373 	 * commands. This ID is treated as opaque data by the firmware and
51374 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51375 	 */
51376 	uint16_t	seq_id;
51377 	/*
51378 	 * The target ID of the command:
51379 	 * * 0x0-0xFFF8 - The function ID
51380 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51381 	 * * 0xFFFD - Reserved for user-space HWRM interface
51382 	 * * 0xFFFF - HWRM
51383 	 */
51384 	uint16_t	target_id;
51385 	/*
51386 	 * A physical address pointer pointing to a host buffer that the
51387 	 * command's response data will be written. This can be either a host
51388 	 * physical address (HPA) or a guest physical address (GPA) and must
51389 	 * point to a physically contiguous block of memory.
51390 	 */
51391 	uint64_t	resp_addr;
51392 	uint16_t	flags;
51393 	/* Enumeration denoting the configuration mode. */
51394 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE			UINT32_C(0x1)
51395 	/* Disable the configuration mode. */
51396 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_DISABLE		UINT32_C(0x0)
51397 	/* Enable the configuration mode. */
51398 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_ENABLE		UINT32_C(0x1)
51399 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_LAST		HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_ENABLE
51400 	/* Enumeration denoting the RX, TX type of the resource. */
51401 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH			UINT32_C(0x2)
51402 	/* Tx path. */
51403 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_TX			(UINT32_C(0x0) << 1)
51404 	/* Rx path. */
51405 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_RX			(UINT32_C(0x1) << 1)
51406 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_LAST			HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_RX
51407 	/* Enumeration denoting the data transfer mode. */
51408 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_MASK	UINT32_C(0xc)
51409 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_SFT	2
51410 	/* Push mode. */
51411 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PUSH	(UINT32_C(0x0) << 2)
51412 	/* Pull mode. */
51413 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL	(UINT32_C(0x1) << 2)
51414 	/* Pull on async update. */
51415 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL_ASYNC  (UINT32_C(0x2) << 2)
51416 		#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_LAST	HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL_ASYNC
51417 	uint16_t	counter_type;
51418 	/* Flow counters. */
51419 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_FC  UINT32_C(0x0)
51420 	/* Extended flow counters. */
51421 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_EFC UINT32_C(0x1)
51422 	/* Meter drop counters. */
51423 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_MDC UINT32_C(0x2)
51424 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_LAST HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_MDC
51425 	/* Ctx memory handle to be used for the counter. */
51426 	uint16_t	ctx_id;
51427 	/* Counter update cadence hint (only in Push mode). */
51428 	uint16_t	update_tmr_ms;
51429 	/* Total number of entries. */
51430 	uint32_t	num_entries;
51431 	uint32_t	unused_0;
51432 } hwrm_cfa_counter_cfg_input_t, *phwrm_cfa_counter_cfg_input_t;
51433 
51434 /* hwrm_cfa_counter_cfg_output (size:128b/16B) */
51435 
51436 typedef struct hwrm_cfa_counter_cfg_output {
51437 	/* The specific error status for the command. */
51438 	uint16_t	error_code;
51439 	/* The HWRM command request type. */
51440 	uint16_t	req_type;
51441 	/* The sequence ID from the original command. */
51442 	uint16_t	seq_id;
51443 	/* The length of the response data in number of bytes. */
51444 	uint16_t	resp_len;
51445 	uint8_t	unused_0[7];
51446 	/*
51447 	 * This field is used in Output records to indicate that the output
51448 	 * is completely written to RAM. This field should be read as '1'
51449 	 * to indicate that the output has been completely written.
51450 	 * When writing a command completion or response to an internal
51451 	 * processor, the order of writes has to be such that this field is
51452 	 * written last.
51453 	 */
51454 	uint8_t	valid;
51455 } hwrm_cfa_counter_cfg_output_t, *phwrm_cfa_counter_cfg_output_t;
51456 
51457 /*************************
51458  * hwrm_cfa_counter_qcfg *
51459  *************************/
51460 
51461 
51462 /* hwrm_cfa_counter_qcfg_input (size:192b/24B) */
51463 
51464 typedef struct hwrm_cfa_counter_qcfg_input {
51465 	/* The HWRM command request type. */
51466 	uint16_t	req_type;
51467 	/*
51468 	 * The completion ring to send the completion event on. This should
51469 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51470 	 */
51471 	uint16_t	cmpl_ring;
51472 	/*
51473 	 * The sequence ID is used by the driver for tracking multiple
51474 	 * commands. This ID is treated as opaque data by the firmware and
51475 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51476 	 */
51477 	uint16_t	seq_id;
51478 	/*
51479 	 * The target ID of the command:
51480 	 * * 0x0-0xFFF8 - The function ID
51481 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51482 	 * * 0xFFFD - Reserved for user-space HWRM interface
51483 	 * * 0xFFFF - HWRM
51484 	 */
51485 	uint16_t	target_id;
51486 	/*
51487 	 * A physical address pointer pointing to a host buffer that the
51488 	 * command's response data will be written. This can be either a host
51489 	 * physical address (HPA) or a guest physical address (GPA) and must
51490 	 * point to a physically contiguous block of memory.
51491 	 */
51492 	uint64_t	resp_addr;
51493 	uint16_t	flags;
51494 	/* Enumeration denoting the RX, TX type of the resource. */
51495 	#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_PATH			UINT32_C(0x1)
51496 	/* Tx path. */
51497 		#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_PATH_TX			UINT32_C(0x0)
51498 	/* Rx path. */
51499 		#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_PATH_RX			UINT32_C(0x1)
51500 		#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_PATH_LAST			HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_PATH_RX
51501 	/* Enumeration denoting the data transfer mode. */
51502 	#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_DATA_TRANSFER_MODE_MASK	UINT32_C(0x6)
51503 	#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_DATA_TRANSFER_MODE_SFT	1
51504 	/* Push mode. */
51505 		#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PUSH	(UINT32_C(0x0) << 1)
51506 	/* Pull mode. */
51507 		#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL	(UINT32_C(0x1) << 1)
51508 	/* Pull on async update. */
51509 		#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL_ASYNC  (UINT32_C(0x2) << 1)
51510 		#define HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_DATA_TRANSFER_MODE_LAST	HWRM_CFA_COUNTER_QCFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL_ASYNC
51511 	uint16_t	counter_type;
51512 	uint32_t	unused_0;
51513 } hwrm_cfa_counter_qcfg_input_t, *phwrm_cfa_counter_qcfg_input_t;
51514 
51515 /* hwrm_cfa_counter_qcfg_output (size:192b/24B) */
51516 
51517 typedef struct hwrm_cfa_counter_qcfg_output {
51518 	/* The specific error status for the command. */
51519 	uint16_t	error_code;
51520 	/* The HWRM command request type. */
51521 	uint16_t	req_type;
51522 	/* The sequence ID from the original command. */
51523 	uint16_t	seq_id;
51524 	/* The length of the response data in number of bytes. */
51525 	uint16_t	resp_len;
51526 	uint16_t	ctx_id;
51527 	uint16_t	update_tmr_ms;
51528 	uint32_t	num_entries;
51529 	uint8_t	unused_0[7];
51530 	/*
51531 	 * This field is used in Output records to indicate that the output
51532 	 * is completely written to RAM. This field should be read as '1'
51533 	 * to indicate that the output has been completely written.
51534 	 * When writing a command completion or response to an internal
51535 	 * processor, the order of writes has to be such that this field is
51536 	 * written last.
51537 	 */
51538 	uint8_t	valid;
51539 } hwrm_cfa_counter_qcfg_output_t, *phwrm_cfa_counter_qcfg_output_t;
51540 
51541 /***************************
51542  * hwrm_cfa_counter_qstats *
51543  ***************************/
51544 
51545 
51546 /* hwrm_cfa_counter_qstats_input (size:320b/40B) */
51547 
51548 typedef struct hwrm_cfa_counter_qstats_input {
51549 	/* The HWRM command request type. */
51550 	uint16_t	req_type;
51551 	/*
51552 	 * The completion ring to send the completion event on. This should
51553 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51554 	 */
51555 	uint16_t	cmpl_ring;
51556 	/*
51557 	 * The sequence ID is used by the driver for tracking multiple
51558 	 * commands. This ID is treated as opaque data by the firmware and
51559 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51560 	 */
51561 	uint16_t	seq_id;
51562 	/*
51563 	 * The target ID of the command:
51564 	 * * 0x0-0xFFF8 - The function ID
51565 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51566 	 * * 0xFFFD - Reserved for user-space HWRM interface
51567 	 * * 0xFFFF - HWRM
51568 	 */
51569 	uint16_t	target_id;
51570 	/*
51571 	 * A physical address pointer pointing to a host buffer that the
51572 	 * command's response data will be written. This can be either a host
51573 	 * physical address (HPA) or a guest physical address (GPA) and must
51574 	 * point to a physically contiguous block of memory.
51575 	 */
51576 	uint64_t	resp_addr;
51577 	uint16_t	flags;
51578 	/* Enumeration denoting the RX, TX type of the resource. */
51579 	#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH	UINT32_C(0x1)
51580 	/* Tx path. */
51581 		#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_TX	UINT32_C(0x0)
51582 	/* Rx path. */
51583 		#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_RX	UINT32_C(0x1)
51584 		#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_LAST HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_RX
51585 	uint16_t	counter_type;
51586 	uint16_t	input_flow_ctx_id;
51587 	uint16_t	num_entries;
51588 	uint16_t	delta_time_ms;
51589 	uint16_t	meter_instance_id;
51590 	uint16_t	mdc_ctx_id;
51591 	uint8_t	unused_0[2];
51592 	uint64_t	expected_count;
51593 } hwrm_cfa_counter_qstats_input_t, *phwrm_cfa_counter_qstats_input_t;
51594 
51595 /* hwrm_cfa_counter_qstats_output (size:128b/16B) */
51596 
51597 typedef struct hwrm_cfa_counter_qstats_output {
51598 	/* The specific error status for the command. */
51599 	uint16_t	error_code;
51600 	/* The HWRM command request type. */
51601 	uint16_t	req_type;
51602 	/* The sequence ID from the original command. */
51603 	uint16_t	seq_id;
51604 	/* The length of the response data in number of bytes. */
51605 	uint16_t	resp_len;
51606 	uint8_t	unused_0[7];
51607 	/*
51608 	 * This field is used in Output records to indicate that the output
51609 	 * is completely written to RAM. This field should be read as '1'
51610 	 * to indicate that the output has been completely written.
51611 	 * When writing a command completion or response to an internal
51612 	 * processor, the order of writes has to be such that this field is
51613 	 * written last.
51614 	 */
51615 	uint8_t	valid;
51616 } hwrm_cfa_counter_qstats_output_t, *phwrm_cfa_counter_qstats_output_t;
51617 
51618 /**********************
51619  * hwrm_cfa_eem_qcaps *
51620  **********************/
51621 
51622 
51623 /* hwrm_cfa_eem_qcaps_input (size:192b/24B) */
51624 
51625 typedef struct hwrm_cfa_eem_qcaps_input {
51626 	/* The HWRM command request type. */
51627 	uint16_t	req_type;
51628 	/*
51629 	 * The completion ring to send the completion event on. This should
51630 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51631 	 */
51632 	uint16_t	cmpl_ring;
51633 	/*
51634 	 * The sequence ID is used by the driver for tracking multiple
51635 	 * commands. This ID is treated as opaque data by the firmware and
51636 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51637 	 */
51638 	uint16_t	seq_id;
51639 	/*
51640 	 * The target ID of the command:
51641 	 * * 0x0-0xFFF8 - The function ID
51642 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51643 	 * * 0xFFFD - Reserved for user-space HWRM interface
51644 	 * * 0xFFFF - HWRM
51645 	 */
51646 	uint16_t	target_id;
51647 	/*
51648 	 * A physical address pointer pointing to a host buffer that the
51649 	 * command's response data will be written. This can be either a host
51650 	 * physical address (HPA) or a guest physical address (GPA) and must
51651 	 * point to a physically contiguous block of memory.
51652 	 */
51653 	uint64_t	resp_addr;
51654 	uint32_t	flags;
51655 	/*
51656 	 * When set to 1, indicates the configuration will apply to TX flows
51657 	 * which are to be offloaded.
51658 	 * Note if this bit is set then the path_rx bit can't be set.
51659 	 */
51660 	#define HWRM_CFA_EEM_QCAPS_INPUT_FLAGS_PATH_TX		UINT32_C(0x1)
51661 	/*
51662 	 * When set to 1, indicates the configuration will apply to RX flows
51663 	 * which are to be offloaded.
51664 	 * Note if this bit is set then the path_tx bit can't be set.
51665 	 */
51666 	#define HWRM_CFA_EEM_QCAPS_INPUT_FLAGS_PATH_RX		UINT32_C(0x2)
51667 	/* When set to 1, all offloaded flows will be sent to EEM. */
51668 	#define HWRM_CFA_EEM_QCAPS_INPUT_FLAGS_PREFERRED_OFFLOAD	UINT32_C(0x4)
51669 	uint32_t	unused_0;
51670 } hwrm_cfa_eem_qcaps_input_t, *phwrm_cfa_eem_qcaps_input_t;
51671 
51672 /* hwrm_cfa_eem_qcaps_output (size:320b/40B) */
51673 
51674 typedef struct hwrm_cfa_eem_qcaps_output {
51675 	/* The specific error status for the command. */
51676 	uint16_t	error_code;
51677 	/* The HWRM command request type. */
51678 	uint16_t	req_type;
51679 	/* The sequence ID from the original command. */
51680 	uint16_t	seq_id;
51681 	/* The length of the response data in number of bytes. */
51682 	uint16_t	resp_len;
51683 	uint32_t	flags;
51684 	/*
51685 	 * When set to 1, indicates the configuration will apply to TX flows
51686 	 * which are to be offloaded.
51687 	 * Note if this bit is set then the path_rx bit can't be set.
51688 	 */
51689 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_PATH_TX					UINT32_C(0x1)
51690 	/*
51691 	 * When set to 1, indicates the configuration will apply to RX flows
51692 	 * which are to be offloaded.
51693 	 * Note if this bit is set then the path_tx bit can't be set.
51694 	 */
51695 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_PATH_RX					UINT32_C(0x2)
51696 	/*
51697 	 * When set to 1, indicates the FW supports the Centralized
51698 	 * Memory Model. The concept designates one entity for the
51699 	 * memory allocation while all others 'subscribe' to it.
51700 	 */
51701 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_CENTRALIZED_MEMORY_MODEL_SUPPORTED		UINT32_C(0x4)
51702 	/*
51703 	 * When set to 1, indicates the FW supports the Detached
51704 	 * Centralized Memory Model. The memory is allocated and managed
51705 	 * as a separate entity. All PFs and VFs will be granted direct
51706 	 * or semi-direct access to the allocated memory while none of
51707 	 * which can interfere with the management of the memory.
51708 	 */
51709 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_DETACHED_CENTRALIZED_MEMORY_MODEL_SUPPORTED	UINT32_C(0x8)
51710 	uint32_t	unused_0;
51711 	uint32_t	supported;
51712 	/*
51713 	 * If set to 1, then EEM KEY0 table is supported using crc32 hash.
51714 	 * If set to 0, EEM KEY0 table is not supported.
51715 	 */
51716 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_KEY0_TABLE			UINT32_C(0x1)
51717 	/*
51718 	 * If set to 1, then EEM KEY1 table is supported using lookup3 hash.
51719 	 * If set to 0, EEM KEY1 table is not supported.
51720 	 */
51721 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_KEY1_TABLE			UINT32_C(0x2)
51722 	/*
51723 	 * If set to 1, then EEM External Record table is supported.
51724 	 * If set to 0, EEM External Record table is not supported.
51725 	 * (This table includes action record, EFC pointers, encap pointers)
51726 	 */
51727 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_EXTERNAL_RECORD_TABLE		UINT32_C(0x4)
51728 	/*
51729 	 * If set to 1, then EEM External Flow Counters table is supported.
51730 	 * If set to 0, EEM External Flow Counters table is not supported.
51731 	 */
51732 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_EXTERNAL_FLOW_COUNTERS_TABLE	UINT32_C(0x8)
51733 	/*
51734 	 * If set to 1, then FID table used for implicit flow flush is
51735 	 * supported.
51736 	 * If set to 0, then FID table used for implicit flow flush is
51737 	 * not supported.
51738 	 */
51739 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_FID_TABLE			UINT32_C(0x10)
51740 	/*
51741 	 * The maximum number of entries supported by EEM. When configuring
51742 	 * the host memory, the number of numbers of entries that can
51743 	 * supported are:
51744 	 *	32k, 64k 128k, 256k, 512k, 1M, 2M, 4M, 8M, 32M, 64M, 128M
51745 	 *	entries.
51746 	 * Any value that are not these values, the FW will round down to the
51747 	 * closest support number of entries.
51748 	 */
51749 	uint32_t	max_entries_supported;
51750 	/* The entry size in bytes of each entry in the EEM KEY0/KEY1 tables. */
51751 	uint16_t	key_entry_size;
51752 	/* The entry size in bytes of each entry in the EEM RECORD tables. */
51753 	uint16_t	record_entry_size;
51754 	/* The entry size in bytes of each entry in the EEM EFC tables. */
51755 	uint16_t	efc_entry_size;
51756 	/* The FID size in bytes of each entry in the EEM FID tables. */
51757 	uint16_t	fid_entry_size;
51758 	uint8_t	unused_1[7];
51759 	/*
51760 	 * This field is used in Output records to indicate that the output
51761 	 * is completely written to RAM. This field should be read as '1'
51762 	 * to indicate that the output has been completely written.
51763 	 * When writing a command completion or response to an internal
51764 	 * processor, the order of writes has to be such that this field is
51765 	 * written last.
51766 	 */
51767 	uint8_t	valid;
51768 } hwrm_cfa_eem_qcaps_output_t, *phwrm_cfa_eem_qcaps_output_t;
51769 
51770 /********************
51771  * hwrm_cfa_eem_cfg *
51772  ********************/
51773 
51774 
51775 /* hwrm_cfa_eem_cfg_input (size:384b/48B) */
51776 
51777 typedef struct hwrm_cfa_eem_cfg_input {
51778 	/* The HWRM command request type. */
51779 	uint16_t	req_type;
51780 	/*
51781 	 * The completion ring to send the completion event on. This should
51782 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51783 	 */
51784 	uint16_t	cmpl_ring;
51785 	/*
51786 	 * The sequence ID is used by the driver for tracking multiple
51787 	 * commands. This ID is treated as opaque data by the firmware and
51788 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51789 	 */
51790 	uint16_t	seq_id;
51791 	/*
51792 	 * The target ID of the command:
51793 	 * * 0x0-0xFFF8 - The function ID
51794 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51795 	 * * 0xFFFD - Reserved for user-space HWRM interface
51796 	 * * 0xFFFF - HWRM
51797 	 */
51798 	uint16_t	target_id;
51799 	/*
51800 	 * A physical address pointer pointing to a host buffer that the
51801 	 * command's response data will be written. This can be either a host
51802 	 * physical address (HPA) or a guest physical address (GPA) and must
51803 	 * point to a physically contiguous block of memory.
51804 	 */
51805 	uint64_t	resp_addr;
51806 	uint32_t	flags;
51807 	/*
51808 	 * When set to 1, indicates the configuration will apply to TX flows
51809 	 * which are to be offloaded.
51810 	 * Note if this bit is set then the path_rx bit can't be set.
51811 	 */
51812 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_PATH_TX		UINT32_C(0x1)
51813 	/*
51814 	 * When set to 1, indicates the configuration will apply to RX flows
51815 	 * which are to be offloaded.
51816 	 * Note if this bit is set then the path_tx bit can't be set.
51817 	 */
51818 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_PATH_RX		UINT32_C(0x2)
51819 	/* When set to 1, all offloaded flows will be sent to EEM. */
51820 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_PREFERRED_OFFLOAD	UINT32_C(0x4)
51821 	/* When set to 1, secondary, 0 means primary. */
51822 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_SECONDARY_PF	UINT32_C(0x8)
51823 	/*
51824 	 * Group_id which used by Firmware to identify memory pools belonging
51825 	 * to certain group.
51826 	 */
51827 	uint16_t	group_id;
51828 	uint16_t	unused_0;
51829 	/*
51830 	 * Configured EEM with the given number of entries. All the EEM tables
51831 	 * KEY0, KEY1, RECORD, EFC all have the same number of entries and all
51832 	 * tables will be configured using this value. Current minimum value
51833 	 * is 32k. Current maximum value is 128M.
51834 	 */
51835 	uint32_t	num_entries;
51836 	uint32_t	unused_1;
51837 	/* Configured EEM with the given context if for KEY0 table. */
51838 	uint16_t	key0_ctx_id;
51839 	/* Configured EEM with the given context if for KEY1 table. */
51840 	uint16_t	key1_ctx_id;
51841 	/* Configured EEM with the given context if for RECORD table. */
51842 	uint16_t	record_ctx_id;
51843 	/* Configured EEM with the given context if for EFC table. */
51844 	uint16_t	efc_ctx_id;
51845 	/* Configured EEM with the given context if for EFC table. */
51846 	uint16_t	fid_ctx_id;
51847 	uint16_t	unused_2;
51848 	uint32_t	unused_3;
51849 } hwrm_cfa_eem_cfg_input_t, *phwrm_cfa_eem_cfg_input_t;
51850 
51851 /* hwrm_cfa_eem_cfg_output (size:128b/16B) */
51852 
51853 typedef struct hwrm_cfa_eem_cfg_output {
51854 	/* The specific error status for the command. */
51855 	uint16_t	error_code;
51856 	/* The HWRM command request type. */
51857 	uint16_t	req_type;
51858 	/* The sequence ID from the original command. */
51859 	uint16_t	seq_id;
51860 	/* The length of the response data in number of bytes. */
51861 	uint16_t	resp_len;
51862 	uint8_t	unused_0[7];
51863 	/*
51864 	 * This field is used in Output records to indicate that the output
51865 	 * is completely written to RAM. This field should be read as '1'
51866 	 * to indicate that the output has been completely written.
51867 	 * When writing a command completion or response to an internal
51868 	 * processor, the order of writes has to be such that this field is
51869 	 * written last.
51870 	 */
51871 	uint8_t	valid;
51872 } hwrm_cfa_eem_cfg_output_t, *phwrm_cfa_eem_cfg_output_t;
51873 
51874 /*********************
51875  * hwrm_cfa_eem_qcfg *
51876  *********************/
51877 
51878 
51879 /* hwrm_cfa_eem_qcfg_input (size:192b/24B) */
51880 
51881 typedef struct hwrm_cfa_eem_qcfg_input {
51882 	/* The HWRM command request type. */
51883 	uint16_t	req_type;
51884 	/*
51885 	 * The completion ring to send the completion event on. This should
51886 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51887 	 */
51888 	uint16_t	cmpl_ring;
51889 	/*
51890 	 * The sequence ID is used by the driver for tracking multiple
51891 	 * commands. This ID is treated as opaque data by the firmware and
51892 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51893 	 */
51894 	uint16_t	seq_id;
51895 	/*
51896 	 * The target ID of the command:
51897 	 * * 0x0-0xFFF8 - The function ID
51898 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51899 	 * * 0xFFFD - Reserved for user-space HWRM interface
51900 	 * * 0xFFFF - HWRM
51901 	 */
51902 	uint16_t	target_id;
51903 	/*
51904 	 * A physical address pointer pointing to a host buffer that the
51905 	 * command's response data will be written. This can be either a host
51906 	 * physical address (HPA) or a guest physical address (GPA) and must
51907 	 * point to a physically contiguous block of memory.
51908 	 */
51909 	uint64_t	resp_addr;
51910 	uint32_t	flags;
51911 	/* When set to 1, indicates the configuration is the TX flow. */
51912 	#define HWRM_CFA_EEM_QCFG_INPUT_FLAGS_PATH_TX	UINT32_C(0x1)
51913 	/* When set to 1, indicates the configuration is the RX flow. */
51914 	#define HWRM_CFA_EEM_QCFG_INPUT_FLAGS_PATH_RX	UINT32_C(0x2)
51915 	uint32_t	unused_0;
51916 } hwrm_cfa_eem_qcfg_input_t, *phwrm_cfa_eem_qcfg_input_t;
51917 
51918 /* hwrm_cfa_eem_qcfg_output (size:256b/32B) */
51919 
51920 typedef struct hwrm_cfa_eem_qcfg_output {
51921 	/* The specific error status for the command. */
51922 	uint16_t	error_code;
51923 	/* The HWRM command request type. */
51924 	uint16_t	req_type;
51925 	/* The sequence ID from the original command. */
51926 	uint16_t	seq_id;
51927 	/* The length of the response data in number of bytes. */
51928 	uint16_t	resp_len;
51929 	uint32_t	flags;
51930 	/* When set to 1, indicates the configuration is the TX flow. */
51931 	#define HWRM_CFA_EEM_QCFG_OUTPUT_FLAGS_PATH_TX		UINT32_C(0x1)
51932 	/* When set to 1, indicates the configuration is the RX flow. */
51933 	#define HWRM_CFA_EEM_QCFG_OUTPUT_FLAGS_PATH_RX		UINT32_C(0x2)
51934 	/* When set to 1, all offloaded flows will be sent to EEM. */
51935 	#define HWRM_CFA_EEM_QCFG_OUTPUT_FLAGS_PREFERRED_OFFLOAD	UINT32_C(0x4)
51936 	/* The number of entries the FW has configured for EEM. */
51937 	uint32_t	num_entries;
51938 	/* Configured EEM with the given context if for KEY0 table. */
51939 	uint16_t	key0_ctx_id;
51940 	/* Configured EEM with the given context if for KEY1 table. */
51941 	uint16_t	key1_ctx_id;
51942 	/* Configured EEM with the given context if for RECORD table. */
51943 	uint16_t	record_ctx_id;
51944 	/* Configured EEM with the given context if for EFC table. */
51945 	uint16_t	efc_ctx_id;
51946 	/* Configured EEM with the given context if for EFC table. */
51947 	uint16_t	fid_ctx_id;
51948 	uint8_t	unused_2[5];
51949 	/*
51950 	 * This field is used in Output records to indicate that the output
51951 	 * is completely written to RAM. This field should be read as '1'
51952 	 * to indicate that the output has been completely written.
51953 	 * When writing a command completion or response to an internal
51954 	 * processor, the order of writes has to be such that this field is
51955 	 * written last.
51956 	 */
51957 	uint8_t	valid;
51958 } hwrm_cfa_eem_qcfg_output_t, *phwrm_cfa_eem_qcfg_output_t;
51959 
51960 /*******************
51961  * hwrm_cfa_eem_op *
51962  *******************/
51963 
51964 
51965 /* hwrm_cfa_eem_op_input (size:192b/24B) */
51966 
51967 typedef struct hwrm_cfa_eem_op_input {
51968 	/* The HWRM command request type. */
51969 	uint16_t	req_type;
51970 	/*
51971 	 * The completion ring to send the completion event on. This should
51972 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51973 	 */
51974 	uint16_t	cmpl_ring;
51975 	/*
51976 	 * The sequence ID is used by the driver for tracking multiple
51977 	 * commands. This ID is treated as opaque data by the firmware and
51978 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51979 	 */
51980 	uint16_t	seq_id;
51981 	/*
51982 	 * The target ID of the command:
51983 	 * * 0x0-0xFFF8 - The function ID
51984 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51985 	 * * 0xFFFD - Reserved for user-space HWRM interface
51986 	 * * 0xFFFF - HWRM
51987 	 */
51988 	uint16_t	target_id;
51989 	/*
51990 	 * A physical address pointer pointing to a host buffer that the
51991 	 * command's response data will be written. This can be either a host
51992 	 * physical address (HPA) or a guest physical address (GPA) and must
51993 	 * point to a physically contiguous block of memory.
51994 	 */
51995 	uint64_t	resp_addr;
51996 	uint32_t	flags;
51997 	/*
51998 	 * When set to 1, indicates the host memory which is passed will be
51999 	 * used for the TX flow offload function specified in fid.
52000 	 * Note if this bit is set then the path_rx bit can't be set.
52001 	 */
52002 	#define HWRM_CFA_EEM_OP_INPUT_FLAGS_PATH_TX	UINT32_C(0x1)
52003 	/*
52004 	 * When set to 1, indicates the host memory which is passed will be
52005 	 * used for the RX flow offload function specified in fid.
52006 	 * Note if this bit is set then the path_tx bit can't be set.
52007 	 */
52008 	#define HWRM_CFA_EEM_OP_INPUT_FLAGS_PATH_RX	UINT32_C(0x2)
52009 	uint16_t	unused_0;
52010 	/* The number of EEM key table entries to be configured. */
52011 	uint16_t	op;
52012 	/* This value is reserved and should not be used. */
52013 	#define HWRM_CFA_EEM_OP_INPUT_OP_RESERVED	UINT32_C(0x0)
52014 	/*
52015 	 * To properly stop EEM and ensure there are no DMA's, the caller
52016 	 * must disable EEM for the given PF, using this call. This will
52017 	 * safely disable EEM and ensure that all DMA'ed to the
52018 	 * keys/records/efc have been completed.
52019 	 */
52020 	#define HWRM_CFA_EEM_OP_INPUT_OP_EEM_DISABLE UINT32_C(0x1)
52021 	/*
52022 	 * Once the EEM host memory has been configured, EEM options have
52023 	 * been configured. Then the caller should enable EEM for the given
52024 	 * PF. Note once this call has been made, then the EEM mechanism
52025 	 * will be active and DMA's will occur as packets are processed.
52026 	 */
52027 	#define HWRM_CFA_EEM_OP_INPUT_OP_EEM_ENABLE  UINT32_C(0x2)
52028 	/*
52029 	 * Clear EEM settings for the given PF so that the register values
52030 	 * are reset back to there initial state.
52031 	 */
52032 	#define HWRM_CFA_EEM_OP_INPUT_OP_EEM_CLEANUP UINT32_C(0x3)
52033 	#define HWRM_CFA_EEM_OP_INPUT_OP_LAST	HWRM_CFA_EEM_OP_INPUT_OP_EEM_CLEANUP
52034 } hwrm_cfa_eem_op_input_t, *phwrm_cfa_eem_op_input_t;
52035 
52036 /* hwrm_cfa_eem_op_output (size:128b/16B) */
52037 
52038 typedef struct hwrm_cfa_eem_op_output {
52039 	/* The specific error status for the command. */
52040 	uint16_t	error_code;
52041 	/* The HWRM command request type. */
52042 	uint16_t	req_type;
52043 	/* The sequence ID from the original command. */
52044 	uint16_t	seq_id;
52045 	/* The length of the response data in number of bytes. */
52046 	uint16_t	resp_len;
52047 	uint8_t	unused_0[7];
52048 	/*
52049 	 * This field is used in Output records to indicate that the output
52050 	 * is completely written to RAM. This field should be read as '1'
52051 	 * to indicate that the output has been completely written.
52052 	 * When writing a command completion or response to an internal
52053 	 * processor, the order of writes has to be such that this field is
52054 	 * written last.
52055 	 */
52056 	uint8_t	valid;
52057 } hwrm_cfa_eem_op_output_t, *phwrm_cfa_eem_op_output_t;
52058 
52059 /********************************
52060  * hwrm_cfa_adv_flow_mgnt_qcaps *
52061  ********************************/
52062 
52063 
52064 /* hwrm_cfa_adv_flow_mgnt_qcaps_input (size:256b/32B) */
52065 
52066 typedef struct hwrm_cfa_adv_flow_mgnt_qcaps_input {
52067 	/* The HWRM command request type. */
52068 	uint16_t	req_type;
52069 	/*
52070 	 * The completion ring to send the completion event on. This should
52071 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52072 	 */
52073 	uint16_t	cmpl_ring;
52074 	/*
52075 	 * The sequence ID is used by the driver for tracking multiple
52076 	 * commands. This ID is treated as opaque data by the firmware and
52077 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52078 	 */
52079 	uint16_t	seq_id;
52080 	/*
52081 	 * The target ID of the command:
52082 	 * * 0x0-0xFFF8 - The function ID
52083 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52084 	 * * 0xFFFD - Reserved for user-space HWRM interface
52085 	 * * 0xFFFF - HWRM
52086 	 */
52087 	uint16_t	target_id;
52088 	/*
52089 	 * A physical address pointer pointing to a host buffer that the
52090 	 * command's response data will be written. This can be either a host
52091 	 * physical address (HPA) or a guest physical address (GPA) and must
52092 	 * point to a physically contiguous block of memory.
52093 	 */
52094 	uint64_t	resp_addr;
52095 	uint32_t	unused_0[4];
52096 } hwrm_cfa_adv_flow_mgnt_qcaps_input_t, *phwrm_cfa_adv_flow_mgnt_qcaps_input_t;
52097 
52098 /* hwrm_cfa_adv_flow_mgnt_qcaps_output (size:128b/16B) */
52099 
52100 typedef struct hwrm_cfa_adv_flow_mgnt_qcaps_output {
52101 	/* The specific error status for the command. */
52102 	uint16_t	error_code;
52103 	/* The HWRM command request type. */
52104 	uint16_t	req_type;
52105 	/* The sequence ID from the original command. */
52106 	uint16_t	seq_id;
52107 	/* The length of the response data in number of bytes. */
52108 	uint16_t	resp_len;
52109 	uint32_t	flags;
52110 	/*
52111 	 * Value of 1 to indicate firmware support 16-bit flow handle.
52112 	 * Value of 0 to indicate firmware not support 16-bit flow handle.
52113 	 */
52114 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_HND_16BIT_SUPPORTED			UINT32_C(0x1)
52115 	/*
52116 	 * Value of 1 to indicate firmware support 64-bit flow handle.
52117 	 * Value of 0 to indicate firmware not support 64-bit flow handle.
52118 	 */
52119 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_HND_64BIT_SUPPORTED			UINT32_C(0x2)
52120 	/*
52121 	 * Value of 1 to indicate firmware support flow batch delete
52122 	 * operation through HWRM_CFA_FLOW_FLUSH command.
52123 	 * Value of 0 to indicate that the firmware does not support flow
52124 	 * batch delete operation. (deprecated)
52125 	 */
52126 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_BATCH_DELETE_SUPPORTED		UINT32_C(0x4)
52127 	/*
52128 	 * Value of 1 to indicate that the firmware support flow reset all
52129 	 * operation through HWRM_CFA_FLOW_FLUSH command.
52130 	 * Value of 0 indicates firmware does not support flow reset all
52131 	 * operation. (deprecated)
52132 	 */
52133 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_RESET_ALL_SUPPORTED			UINT32_C(0x8)
52134 	/*
52135 	 * Value of 1 to indicate that firmware supports use of FID as
52136 	 * dest_id in HWRM_CFA_NTUPLE_ALLOC/CFG commands.
52137 	 * Value of 0 indicates firmware does not support use of FID as
52138 	 * dest_id.
52139 	 */
52140 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_DEST_FUNC_SUPPORTED		UINT32_C(0x10)
52141 	/*
52142 	 * Value of 1 to indicate that firmware supports TX EEM flows.
52143 	 * Value of 0 indicates firmware does not support TX EEM flows.
52144 	 * (deprecated)
52145 	 */
52146 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_TX_EEM_FLOW_SUPPORTED			UINT32_C(0x20)
52147 	/*
52148 	 * Value of 1 to indicate that firmware supports RX EEM flows.
52149 	 * Value of 0 indicates firmware does not support RX EEM flows.
52150 	 * (deprecated)
52151 	 */
52152 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RX_EEM_FLOW_SUPPORTED			UINT32_C(0x40)
52153 	/*
52154 	 * Value of 1 to indicate that firmware supports the dynamic
52155 	 * allocation of an on-chip flow counter which can be used for EEM
52156 	 * flows. Value of 0 indicates firmware does not support the dynamic
52157 	 * allocation of an on-chip flow counter.
52158 	 * (deprecated)
52159 	 */
52160 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_COUNTER_ALLOC_SUPPORTED		UINT32_C(0x80)
52161 	/*
52162 	 * Value of 1 to indicate that firmware supports setting of
52163 	 * rfs_ring_tbl_idx in HWRM_CFA_NTUPLE_ALLOC command.
52164 	 * Value of 0 indicates firmware does not support rfs_ring_tbl_idx.
52165 	 */
52166 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_SUPPORTED		UINT32_C(0x100)
52167 	/*
52168 	 * Value of 1 to indicate that firmware supports untagged matching
52169 	 * criteria on HWRM_CFA_L2_FILTER_ALLOC command. Value of 0
52170 	 * indicates firmware does not support untagged matching.
52171 	 */
52172 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_UNTAGGED_VLAN_SUPPORTED			UINT32_C(0x200)
52173 	/*
52174 	 * Value of 1 to indicate that firmware supports XDP filter. Value
52175 	 * of 0 indicates firmware does not support XDP filter.
52176 	 */
52177 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_XDP_SUPPORTED				UINT32_C(0x400)
52178 	/*
52179 	 * Value of 1 to indicate that the firmware support L2 header source
52180 	 * fields matching criteria on HWRM_CFA_L2_FILTER_ALLOC command.
52181 	 * Value of 0 indicates firmware does not support L2 header source
52182 	 * fields matching.
52183 	 */
52184 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_L2_HEADER_SOURCE_FIELDS_SUPPORTED		UINT32_C(0x800)
52185 	/*
52186 	 * If set to 1, firmware is capable of supporting ARP ethertype as
52187 	 * matching criteria for HWRM_CFA_NTUPLE_FILTER_ALLOC command on the
52188 	 * RX direction. By default, this flag should be 0 for older version
52189 	 * of firmware.
52190 	 */
52191 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_RX_ARP_SUPPORTED		UINT32_C(0x1000)
52192 	/*
52193 	 * Value of 1 to indicate that firmware supports setting of
52194 	 * rfs_ring_tbl_idx in dst_id field of the HWRM_CFA_NTUPLE_ALLOC
52195 	 * command. Value of 0 indicates firmware does not support
52196 	 * rfs_ring_tbl_idx in dst_id field.
52197 	 */
52198 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_V2_SUPPORTED		UINT32_C(0x2000)
52199 	/*
52200 	 * If set to 1, firmware is capable of supporting IPv4/IPv6 as
52201 	 * ethertype in HWRM_CFA_NTUPLE_FILTER_ALLOC command on the RX
52202 	 * direction. By default, this flag should be 0 for older version
52203 	 * of firmware.
52204 	 */
52205 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_RX_ETHERTYPE_IP_SUPPORTED	UINT32_C(0x4000)
52206 	/*
52207 	 * When this bit is '1', it indicates that core firmware is
52208 	 * capable of TruFlow. Driver can restrict sending HWRM CFA_FLOW_XXX
52209 	 * and CFA_ENCAP_XXX, CFA_DECAP_XXX commands.
52210 	 */
52211 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_TRUFLOW_CAPABLE				UINT32_C(0x8000)
52212 	/*
52213 	 * If set to 1, firmware is capable of supporting L2/ROCE as
52214 	 * traffic type in flags field of HWRM_CFA_L2_FILTER_ALLOC command.
52215 	 * By default, this flag should be 0 for older version of firmware.
52216 	 */
52217 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_L2_FILTER_TRAFFIC_TYPE_L2_ROCE_SUPPORTED	UINT32_C(0x10000)
52218 	/*
52219 	 * If set to 1, firmware is capable of HW LAG. This bit is only
52220 	 * advertised if the calling function is a PAXC function.
52221 	 */
52222 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_LAG_SUPPORTED				UINT32_C(0x20000)
52223 	/*
52224 	 * If set to 1, firmware is capable installing ntuple rules without
52225 	 * additional classification on the L2 Context.
52226 	 */
52227 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_NO_L2CTX_SUPPORTED		UINT32_C(0x40000)
52228 	/*
52229 	 * If set to 1, firmware is capable returning stats for nic flows
52230 	 * in cfa_flow_stats command where flow_handle value 0xF000.
52231 	 */
52232 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NIC_FLOW_STATS_SUPPORTED			UINT32_C(0x80000)
52233 	/*
52234 	 * If set to 1, firmware is capable of supporting these additional
52235 	 * ip_protocols: ICMP, ICMPV6, RSVD for ntuple rules. By default,
52236 	 * this flag should be 0 for older version of firmware.
52237 	 */
52238 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_RX_EXT_IP_PROTO_SUPPORTED	UINT32_C(0x100000)
52239 	/*
52240 	 * Value of 1 to indicate that firmware supports setting of
52241 	 * rfs_ring_tbl_idx (new offset) in HWRM_CFA_NTUPLE_ALLOC command.
52242 	 * Value of 0 indicates ring tbl idx should be passed using dst_id.
52243 	 */
52244 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_V3_SUPPORTED		UINT32_C(0x200000)
52245 	uint8_t	unused_0[3];
52246 	/*
52247 	 * This field is used in Output records to indicate that the output
52248 	 * is completely written to RAM. This field should be read as '1'
52249 	 * to indicate that the output has been completely written.
52250 	 * When writing a command completion or response to an internal
52251 	 * processor, the order of writes has to be such that this field is
52252 	 * written last.
52253 	 */
52254 	uint8_t	valid;
52255 } hwrm_cfa_adv_flow_mgnt_qcaps_output_t, *phwrm_cfa_adv_flow_mgnt_qcaps_output_t;
52256 
52257 /******************
52258  * hwrm_cfa_tflib *
52259  ******************/
52260 
52261 
52262 /* hwrm_cfa_tflib_input (size:1024b/128B) */
52263 
52264 typedef struct hwrm_cfa_tflib_input {
52265 	/* The HWRM command request type. */
52266 	uint16_t	req_type;
52267 	/*
52268 	 * The completion ring to send the completion event on. This should
52269 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52270 	 */
52271 	uint16_t	cmpl_ring;
52272 	/*
52273 	 * The sequence ID is used by the driver for tracking multiple
52274 	 * commands. This ID is treated as opaque data by the firmware and
52275 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52276 	 */
52277 	uint16_t	seq_id;
52278 	/*
52279 	 * The target ID of the command:
52280 	 * * 0x0-0xFFF8 - The function ID
52281 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52282 	 * * 0xFFFD - Reserved for user-space HWRM interface
52283 	 * * 0xFFFF - HWRM
52284 	 */
52285 	uint16_t	target_id;
52286 	/*
52287 	 * A physical address pointer pointing to a host buffer that the
52288 	 * command's response data will be written. This can be either a host
52289 	 * physical address (HPA) or a guest physical address (GPA) and must
52290 	 * point to a physically contiguous block of memory.
52291 	 */
52292 	uint64_t	resp_addr;
52293 	/* TFLIB message type. */
52294 	uint16_t	tf_type;
52295 	/* TFLIB message subtype. */
52296 	uint16_t	tf_subtype;
52297 	/* unused. */
52298 	uint8_t	unused0[4];
52299 	/* TFLIB request data. */
52300 	uint32_t	tf_req[26];
52301 } hwrm_cfa_tflib_input_t, *phwrm_cfa_tflib_input_t;
52302 
52303 /* hwrm_cfa_tflib_output (size:5632b/704B) */
52304 
52305 typedef struct hwrm_cfa_tflib_output {
52306 	/* The specific error status for the command. */
52307 	uint16_t	error_code;
52308 	/* The HWRM command request type. */
52309 	uint16_t	req_type;
52310 	/* The sequence ID from the original command. */
52311 	uint16_t	seq_id;
52312 	/* The length of the response data in number of bytes. */
52313 	uint16_t	resp_len;
52314 	/* TFLIB message type. */
52315 	uint16_t	tf_type;
52316 	/* TFLIB message subtype. */
52317 	uint16_t	tf_subtype;
52318 	/* TFLIB response code */
52319 	uint32_t	tf_resp_code;
52320 	/* TFLIB response data. */
52321 	uint32_t	tf_resp[170];
52322 	/* unused. */
52323 	uint8_t	unused1[7];
52324 	/*
52325 	 * This field is used in Output records to indicate that the output
52326 	 * is completely written to RAM. This field should be read as '1'
52327 	 * to indicate that the output has been completely written.
52328 	 * When writing a command completion or response to an internal
52329 	 * processor, the order of writes has to be such that this field is
52330 	 * written last.
52331 	 */
52332 	uint8_t	valid;
52333 } hwrm_cfa_tflib_output_t, *phwrm_cfa_tflib_output_t;
52334 
52335 /**********************************
52336  * hwrm_cfa_lag_group_member_rgtr *
52337  **********************************/
52338 
52339 
52340 /* hwrm_cfa_lag_group_member_rgtr_input (size:192b/24B) */
52341 
52342 typedef struct hwrm_cfa_lag_group_member_rgtr_input {
52343 	/* The HWRM command request type. */
52344 	uint16_t	req_type;
52345 	/*
52346 	 * The completion ring to send the completion event on. This should
52347 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52348 	 */
52349 	uint16_t	cmpl_ring;
52350 	/*
52351 	 * The sequence ID is used by the driver for tracking multiple
52352 	 * commands. This ID is treated as opaque data by the firmware and
52353 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52354 	 */
52355 	uint16_t	seq_id;
52356 	/*
52357 	 * The target ID of the command:
52358 	 * * 0x0-0xFFF8 - The function ID
52359 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52360 	 * * 0xFFFD - Reserved for user-space HWRM interface
52361 	 * * 0xFFFF - HWRM
52362 	 */
52363 	uint16_t	target_id;
52364 	/*
52365 	 * A physical address pointer pointing to a host buffer that the
52366 	 * command's response data will be written. This can be either a host
52367 	 * physical address (HPA) or a guest physical address (GPA) and must
52368 	 * point to a physically contiguous block of memory.
52369 	 */
52370 	uint64_t	resp_addr;
52371 	uint8_t	mode;
52372 	/*
52373 	 * Transmit only on the active port. Automatically failover
52374 	 * to backup port.
52375 	 */
52376 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_ACTIVE_BACKUP UINT32_C(0x1)
52377 	/*
52378 	 * Transmit based on packet header ntuple hash. Packet with only
52379 	 * layer 2 headers will hash using the destination MAC, source MAC
52380 	 * and Ethertype fields. Packets with layer 3 (IP) headers will
52381 	 * hash using the destination MAC, source MAC, IP protocol/next
52382 	 * header, source IP address and destination IP address. Packets
52383 	 * with layer 4 (TCP/UDP) headers will hash using the destination
52384 	 * MAC, source MAC, IP protocol/next header, source IP address,
52385 	 * destination IP address, source port and destination port fields.
52386 	 */
52387 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_BALANCE_XOR   UINT32_C(0x2)
52388 	/* Transmit packets on all specified ports. */
52389 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_BROADCAST	UINT32_C(0x3)
52390 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_LAST	HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_BROADCAST
52391 	/*
52392 	 * Supports up to 5 ports. bit0 = port 0, bit1 = port 1,
52393 	 * bit2 = port 2, bit3 = port 4, bit4 = loopback port
52394 	 */
52395 	uint8_t	port_bitmap;
52396 	/* Specify the active port when active-backup mode is specified */
52397 	uint8_t	active_port;
52398 	uint8_t	unused_0[5];
52399 } hwrm_cfa_lag_group_member_rgtr_input_t, *phwrm_cfa_lag_group_member_rgtr_input_t;
52400 
52401 /* hwrm_cfa_lag_group_member_rgtr_output (size:128b/16B) */
52402 
52403 typedef struct hwrm_cfa_lag_group_member_rgtr_output {
52404 	/* The specific error status for the command. */
52405 	uint16_t	error_code;
52406 	/* The HWRM command request type. */
52407 	uint16_t	req_type;
52408 	/* The sequence ID from the original command. */
52409 	uint16_t	seq_id;
52410 	/* The length of the response data in number of bytes. */
52411 	uint16_t	resp_len;
52412 	/* lag group ID configured for the function */
52413 	uint16_t	lag_id;
52414 	uint8_t	unused_0[5];
52415 	/*
52416 	 * This field is used in Output records to indicate that the output
52417 	 * is completely written to RAM. This field should be read as '1'
52418 	 * to indicate that the output has been completely written.
52419 	 * When writing a command completion or response to an internal
52420 	 * processor, the order of writes has to be such that this field is
52421 	 * written last.
52422 	 */
52423 	uint8_t	valid;
52424 } hwrm_cfa_lag_group_member_rgtr_output_t, *phwrm_cfa_lag_group_member_rgtr_output_t;
52425 
52426 /************************************
52427  * hwrm_cfa_lag_group_member_unrgtr *
52428  ************************************/
52429 
52430 
52431 /* hwrm_cfa_lag_group_member_unrgtr_input (size:192b/24B) */
52432 
52433 typedef struct hwrm_cfa_lag_group_member_unrgtr_input {
52434 	/* The HWRM command request type. */
52435 	uint16_t	req_type;
52436 	/*
52437 	 * The completion ring to send the completion event on. This should
52438 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52439 	 */
52440 	uint16_t	cmpl_ring;
52441 	/*
52442 	 * The sequence ID is used by the driver for tracking multiple
52443 	 * commands. This ID is treated as opaque data by the firmware and
52444 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52445 	 */
52446 	uint16_t	seq_id;
52447 	/*
52448 	 * The target ID of the command:
52449 	 * * 0x0-0xFFF8 - The function ID
52450 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52451 	 * * 0xFFFD - Reserved for user-space HWRM interface
52452 	 * * 0xFFFF - HWRM
52453 	 */
52454 	uint16_t	target_id;
52455 	/*
52456 	 * A physical address pointer pointing to a host buffer that the
52457 	 * command's response data will be written. This can be either a host
52458 	 * physical address (HPA) or a guest physical address (GPA) and must
52459 	 * point to a physically contiguous block of memory.
52460 	 */
52461 	uint64_t	resp_addr;
52462 	/* lag group ID configured for the function */
52463 	uint16_t	lag_id;
52464 	uint8_t	unused_0[6];
52465 } hwrm_cfa_lag_group_member_unrgtr_input_t, *phwrm_cfa_lag_group_member_unrgtr_input_t;
52466 
52467 /* hwrm_cfa_lag_group_member_unrgtr_output (size:128b/16B) */
52468 
52469 typedef struct hwrm_cfa_lag_group_member_unrgtr_output {
52470 	/* The specific error status for the command. */
52471 	uint16_t	error_code;
52472 	/* The HWRM command request type. */
52473 	uint16_t	req_type;
52474 	/* The sequence ID from the original command. */
52475 	uint16_t	seq_id;
52476 	/* The length of the response data in number of bytes. */
52477 	uint16_t	resp_len;
52478 	uint8_t	unused_0[7];
52479 	/*
52480 	 * This field is used in Output records to indicate that the output
52481 	 * is completely written to RAM. This field should be read as '1'
52482 	 * to indicate that the output has been completely written.
52483 	 * When writing a command completion or response to an internal
52484 	 * processor, the order of writes has to be such that this field is
52485 	 * written last.
52486 	 */
52487 	uint8_t	valid;
52488 } hwrm_cfa_lag_group_member_unrgtr_output_t, *phwrm_cfa_lag_group_member_unrgtr_output_t;
52489 
52490 /*****************************
52491  * hwrm_cfa_tls_filter_alloc *
52492  *****************************/
52493 
52494 
52495 /* hwrm_cfa_tls_filter_alloc_input (size:768b/96B) */
52496 
52497 typedef struct hwrm_cfa_tls_filter_alloc_input {
52498 	/* The HWRM command request type. */
52499 	uint16_t	req_type;
52500 	/*
52501 	 * The completion ring to send the completion event on. This should
52502 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52503 	 */
52504 	uint16_t	cmpl_ring;
52505 	/*
52506 	 * The sequence ID is used by the driver for tracking multiple
52507 	 * commands. This ID is treated as opaque data by the firmware and
52508 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52509 	 */
52510 	uint16_t	seq_id;
52511 	/*
52512 	 * The target ID of the command:
52513 	 * * 0x0-0xFFF8 - The function ID
52514 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52515 	 * * 0xFFFD - Reserved for user-space HWRM interface
52516 	 * * 0xFFFF - HWRM
52517 	 */
52518 	uint16_t	target_id;
52519 	/*
52520 	 * A physical address pointer pointing to a host buffer that the
52521 	 * command's response data will be written. This can be either a host
52522 	 * physical address (HPA) or a guest physical address (GPA) and must
52523 	 * point to a physically contiguous block of memory.
52524 	 */
52525 	uint64_t	resp_addr;
52526 	uint32_t	unused_0;
52527 	uint32_t	enables;
52528 	/*
52529 	 * This bit must be '1' for the l2_filter_id field to be
52530 	 * configured.
52531 	 */
52532 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID		UINT32_C(0x1)
52533 	/*
52534 	 * This bit must be '1' for the ethertype field to be
52535 	 * configured.
52536 	 */
52537 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE		UINT32_C(0x2)
52538 	/*
52539 	 * This bit must be '1' for the ipaddr_type field to be
52540 	 * configured.
52541 	 */
52542 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE		UINT32_C(0x4)
52543 	/*
52544 	 * This bit must be '1' for the src_ipaddr field to be
52545 	 * configured.
52546 	 */
52547 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR		UINT32_C(0x8)
52548 	/*
52549 	 * This bit must be '1' for the dst_ipaddr field to be
52550 	 * configured.
52551 	 */
52552 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR		UINT32_C(0x10)
52553 	/*
52554 	 * This bit must be '1' for the ip_protocol field to be
52555 	 * configured.
52556 	 */
52557 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL		UINT32_C(0x20)
52558 	/*
52559 	 * This bit must be '1' for the src_port field to be
52560 	 * configured.
52561 	 */
52562 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT		UINT32_C(0x40)
52563 	/*
52564 	 * This bit must be '1' for the dst_port field to be
52565 	 * configured.
52566 	 */
52567 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_DST_PORT		UINT32_C(0x80)
52568 	/*
52569 	 * This bit must be '1' for the kid field to be
52570 	 * configured.
52571 	 */
52572 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_KID			UINT32_C(0x100)
52573 	/*
52574 	 * This bit must be '1' for the dst_id field to be
52575 	 * configured.
52576 	 */
52577 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_DST_ID		UINT32_C(0x200)
52578 	/*
52579 	 * This bit must be '1' for the mirror_vnic_id field to be
52580 	 * configured.
52581 	 */
52582 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID	UINT32_C(0x400)
52583 	/*
52584 	 * This bit must be '1' for the quic_dst_connect_id field to be
52585 	 * configured.
52586 	 */
52587 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_QUIC_DST_CONNECT_ID	UINT32_C(0x800)
52588 	/*
52589 	 * This value identifies a set of CFA data structures used for an L2
52590 	 * context.
52591 	 */
52592 	uint64_t	l2_filter_id;
52593 	uint8_t	unused_1[6];
52594 	/* This value indicates the ethertype in the Ethernet header. */
52595 	uint16_t	ethertype;
52596 	/*
52597 	 * This value indicates the type of IP address.
52598 	 * 4 - IPv4
52599 	 * 6 - IPv6
52600 	 * All others are invalid.
52601 	 */
52602 	uint8_t	ip_addr_type;
52603 	/* invalid */
52604 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0)
52605 	/* IPv4 */
52606 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4	UINT32_C(0x4)
52607 	/* IPv6 */
52608 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6	UINT32_C(0x6)
52609 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST   HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
52610 	/*
52611 	 * The value of protocol field in IP header.
52612 	 * Applies to UDP and TCP traffic.
52613 	 * 6 - TCP
52614 	 * 17 - UDP
52615 	 */
52616 	uint8_t	ip_protocol;
52617 	/* invalid */
52618 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0)
52619 	/* TCP */
52620 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP	UINT32_C(0x6)
52621 	/* UDP */
52622 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP	UINT32_C(0x11)
52623 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST   HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP
52624 	/*
52625 	 * If set, this value shall represent the
52626 	 * Logical VNIC ID of the destination VNIC for the RX
52627 	 * path and network port id of the destination port for
52628 	 * the TX path.
52629 	 */
52630 	uint16_t	dst_id;
52631 	/*
52632 	 * Logical VNIC ID of the VNIC where traffic is
52633 	 * mirrored.
52634 	 */
52635 	uint16_t	mirror_vnic_id;
52636 	uint8_t	unused_2[2];
52637 	/*
52638 	 * The value of source IP address to be used in filtering.
52639 	 * For IPv4, first four bytes represent the IP address.
52640 	 */
52641 	uint32_t	src_ipaddr[4];
52642 	/*
52643 	 * The value of destination IP address to be used in filtering.
52644 	 * For IPv4, first four bytes represent the IP address.
52645 	 */
52646 	uint32_t	dst_ipaddr[4];
52647 	/*
52648 	 * The value of source port to be used in filtering.
52649 	 * Applies to UDP and TCP traffic.
52650 	 */
52651 	uint16_t	src_port;
52652 	/*
52653 	 * The value of destination port to be used in filtering.
52654 	 * Applies to UDP and TCP traffic.
52655 	 */
52656 	uint16_t	dst_port;
52657 	/*
52658 	 * The Key Context Identifier (KID) for use with KTLS or QUIC.
52659 	 * KID is limited to 20-bits.
52660 	 */
52661 	uint32_t	kid;
52662 	/* The Destination Connection ID of QUIC. */
52663 	uint64_t	quic_dst_connect_id;
52664 } hwrm_cfa_tls_filter_alloc_input_t, *phwrm_cfa_tls_filter_alloc_input_t;
52665 
52666 /* hwrm_cfa_tls_filter_alloc_output (size:192b/24B) */
52667 
52668 typedef struct hwrm_cfa_tls_filter_alloc_output {
52669 	/* The specific error status for the command. */
52670 	uint16_t	error_code;
52671 	/* The HWRM command request type. */
52672 	uint16_t	req_type;
52673 	/* The sequence ID from the original command. */
52674 	uint16_t	seq_id;
52675 	/* The length of the response data in number of bytes. */
52676 	uint16_t	resp_len;
52677 	/* This value is an opaque id into CFA data structures. */
52678 	uint64_t	tls_filter_id;
52679 	/*
52680 	 * The flow id value in bit 0-29 is the actual ID of the flow
52681 	 * associated with this filter and it shall be used to match
52682 	 * and associate the flow identifier returned in completion
52683 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
52684 	 * shall indicate no valid flow id.
52685 	 */
52686 	uint32_t	flow_id;
52687 	/* Indicate the flow id value. */
52688 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK UINT32_C(0x3fffffff)
52689 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
52690 	/* Indicate type of the flow. */
52691 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE	UINT32_C(0x40000000)
52692 	/*
52693 	 * If this bit set to 0, then it indicates that the flow is
52694 	 * internal flow.
52695 	 */
52696 		#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT	(UINT32_C(0x0) << 30)
52697 	/*
52698 	 * If this bit is set to 1, then it indicates that the flow is
52699 	 * external flow.
52700 	 */
52701 		#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT	(UINT32_C(0x1) << 30)
52702 		#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST  HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
52703 	/* Indicate the flow direction. */
52704 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR	UINT32_C(0x80000000)
52705 	/* If this bit set to 0, then it indicates rx flow. */
52706 		#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX	(UINT32_C(0x0) << 31)
52707 	/* If this bit is set to 1, then it indicates that tx flow. */
52708 		#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX	(UINT32_C(0x1) << 31)
52709 		#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST   HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
52710 	uint8_t	unused_0[3];
52711 	/*
52712 	 * This field is used in Output records to indicate that the output
52713 	 * is completely written to RAM. This field should be read as '1'
52714 	 * to indicate that the output has been completely written.
52715 	 * When writing a command completion or response to an internal
52716 	 * processor, the order of writes has to be such that this field is
52717 	 * written last.
52718 	 */
52719 	uint8_t	valid;
52720 } hwrm_cfa_tls_filter_alloc_output_t, *phwrm_cfa_tls_filter_alloc_output_t;
52721 
52722 /****************************
52723  * hwrm_cfa_tls_filter_free *
52724  ****************************/
52725 
52726 
52727 /* hwrm_cfa_tls_filter_free_input (size:192b/24B) */
52728 
52729 typedef struct hwrm_cfa_tls_filter_free_input {
52730 	/* The HWRM command request type. */
52731 	uint16_t	req_type;
52732 	/*
52733 	 * The completion ring to send the completion event on. This should
52734 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52735 	 */
52736 	uint16_t	cmpl_ring;
52737 	/*
52738 	 * The sequence ID is used by the driver for tracking multiple
52739 	 * commands. This ID is treated as opaque data by the firmware and
52740 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52741 	 */
52742 	uint16_t	seq_id;
52743 	/*
52744 	 * The target ID of the command:
52745 	 * * 0x0-0xFFF8 - The function ID
52746 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52747 	 * * 0xFFFD - Reserved for user-space HWRM interface
52748 	 * * 0xFFFF - HWRM
52749 	 */
52750 	uint16_t	target_id;
52751 	/*
52752 	 * A physical address pointer pointing to a host buffer that the
52753 	 * command's response data will be written. This can be either a host
52754 	 * physical address (HPA) or a guest physical address (GPA) and must
52755 	 * point to a physically contiguous block of memory.
52756 	 */
52757 	uint64_t	resp_addr;
52758 	/* This value is an opaque id into CFA data structures. */
52759 	uint64_t	tls_filter_id;
52760 } hwrm_cfa_tls_filter_free_input_t, *phwrm_cfa_tls_filter_free_input_t;
52761 
52762 /* hwrm_cfa_tls_filter_free_output (size:128b/16B) */
52763 
52764 typedef struct hwrm_cfa_tls_filter_free_output {
52765 	/* The specific error status for the command. */
52766 	uint16_t	error_code;
52767 	/* The HWRM command request type. */
52768 	uint16_t	req_type;
52769 	/* The sequence ID from the original command. */
52770 	uint16_t	seq_id;
52771 	/* The length of the response data in number of bytes. */
52772 	uint16_t	resp_len;
52773 	uint8_t	unused_0[7];
52774 	/*
52775 	 * This field is used in Output records to indicate that the output
52776 	 * is completely written to RAM. This field should be read as '1'
52777 	 * to indicate that the output has been completely written.
52778 	 * When writing a command completion or response to an internal
52779 	 * processor, the order of writes has to be such that this field is
52780 	 * written last.
52781 	 */
52782 	uint8_t	valid;
52783 } hwrm_cfa_tls_filter_free_output_t, *phwrm_cfa_tls_filter_free_output_t;
52784 
52785 /*****************************
52786  * hwrm_cfa_release_afm_func *
52787  *****************************/
52788 
52789 
52790 /* hwrm_cfa_release_afm_func_input (size:256b/32B) */
52791 
52792 typedef struct hwrm_cfa_release_afm_func_input {
52793 	/* The HWRM command request type. */
52794 	uint16_t	req_type;
52795 	/*
52796 	 * The completion ring to send the completion event on. This should
52797 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52798 	 */
52799 	uint16_t	cmpl_ring;
52800 	/*
52801 	 * The sequence ID is used by the driver for tracking multiple
52802 	 * commands. This ID is treated as opaque data by the firmware and
52803 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52804 	 */
52805 	uint16_t	seq_id;
52806 	/*
52807 	 * The target ID of the command:
52808 	 * * 0x0-0xFFF8 - The function ID
52809 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52810 	 * * 0xFFFD - Reserved for user-space HWRM interface
52811 	 * * 0xFFFF - HWRM
52812 	 */
52813 	uint16_t	target_id;
52814 	/*
52815 	 * A physical address pointer pointing to a host buffer that the
52816 	 * command's response data will be written. This can be either a host
52817 	 * physical address (HPA) or a guest physical address (GPA) and must
52818 	 * point to a physically contiguous block of memory.
52819 	 */
52820 	uint64_t	resp_addr;
52821 	/* Function identifier, may be of type efid, rfid or dfid. */
52822 	uint16_t	fid;
52823 	/* Representor function identifier. */
52824 	uint16_t	rfid;
52825 	/* Fid type. */
52826 	uint8_t	type;
52827 	/* Endpoint fid. */
52828 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_EFID UINT32_C(0x1)
52829 	/* Representor fid. */
52830 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_RFID UINT32_C(0x2)
52831 	/* Redirect fid. */
52832 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_DFID UINT32_C(0x3)
52833 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_LAST HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_DFID
52834 	uint8_t	unused_0[3];
52835 	/*
52836 	 * Flags used to control AFMs actions when releasing the function.
52837 	 * Only used when type is dfid.
52838 	 */
52839 	uint32_t	flags;
52840 	/* Remove broadcast. */
52841 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_FLAGS_BC_REM	UINT32_C(0x1)
52842 	/* Remove multicast. */
52843 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_FLAGS_MC_REM	UINT32_C(0x2)
52844 	/* Remove promiscuous. */
52845 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_FLAGS_PROMISC_REM	UINT32_C(0x4)
52846 	uint32_t	unused_1;
52847 } hwrm_cfa_release_afm_func_input_t, *phwrm_cfa_release_afm_func_input_t;
52848 
52849 /* hwrm_cfa_release_afm_func_output (size:128b/16B) */
52850 
52851 typedef struct hwrm_cfa_release_afm_func_output {
52852 	/* The specific error status for the command. */
52853 	uint16_t	error_code;
52854 	/* The HWRM command request type. */
52855 	uint16_t	req_type;
52856 	/* The sequence ID from the original command. */
52857 	uint16_t	seq_id;
52858 	/* The length of the response data in number of bytes. */
52859 	uint16_t	resp_len;
52860 	uint8_t	unused_0[7];
52861 	/*
52862 	 * This field is used in Output records to indicate that the output
52863 	 * is completely written to RAM. This field should be read as '1'
52864 	 * to indicate that the output has been completely written.
52865 	 * When writing a command completion or response to an internal
52866 	 * processor, the order of writes has to be such that this field is
52867 	 * written last.
52868 	 */
52869 	uint8_t	valid;
52870 } hwrm_cfa_release_afm_func_output_t, *phwrm_cfa_release_afm_func_output_t;
52871 
52872 /***********
52873  * hwrm_tf *
52874  ***********/
52875 
52876 
52877 /* hwrm_tf_input (size:1024b/128B) */
52878 
52879 typedef struct hwrm_tf_input {
52880 	/* The HWRM command request type. */
52881 	uint16_t	req_type;
52882 	/*
52883 	 * The completion ring to send the completion event on. This should
52884 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52885 	 */
52886 	uint16_t	cmpl_ring;
52887 	/*
52888 	 * The sequence ID is used by the driver for tracking multiple
52889 	 * commands. This ID is treated as opaque data by the firmware and
52890 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52891 	 */
52892 	uint16_t	seq_id;
52893 	/*
52894 	 * The target ID of the command:
52895 	 * * 0x0-0xFFF8 - The function ID
52896 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52897 	 * * 0xFFFD - Reserved for user-space HWRM interface
52898 	 * * 0xFFFF - HWRM
52899 	 */
52900 	uint16_t	target_id;
52901 	/*
52902 	 * A physical address pointer pointing to a host buffer that the
52903 	 * command's response data will be written. This can be either a host
52904 	 * physical address (HPA) or a guest physical address (GPA) and must
52905 	 * point to a physically contiguous block of memory.
52906 	 */
52907 	uint64_t	resp_addr;
52908 	/* TF message type. */
52909 	uint16_t	type;
52910 	/* TF message subtype. */
52911 	uint16_t	subtype;
52912 	/* unused. */
52913 	uint8_t	unused0[4];
52914 	/* TF request data. */
52915 	uint32_t	req[26];
52916 } hwrm_tf_input_t, *phwrm_tf_input_t;
52917 
52918 /* hwrm_tf_output (size:5632b/704B) */
52919 
52920 typedef struct hwrm_tf_output {
52921 	/* The specific error status for the command. */
52922 	uint16_t	error_code;
52923 	/* The HWRM command request type. */
52924 	uint16_t	req_type;
52925 	/* The sequence ID from the original command. */
52926 	uint16_t	seq_id;
52927 	/* The length of the response data in number of bytes. */
52928 	uint16_t	resp_len;
52929 	/* TF message type. */
52930 	uint16_t	type;
52931 	/* TF message subtype. */
52932 	uint16_t	subtype;
52933 	/* TF response code */
52934 	uint32_t	resp_code;
52935 	/* TF response data. */
52936 	uint32_t	resp[170];
52937 	/* unused. */
52938 	uint8_t	unused1[7];
52939 	/*
52940 	 * This field is used in Output records to indicate that the
52941 	 * output is completely written to RAM. This field should be
52942 	 * read as '1' to indicate that the output has been
52943 	 * completely written. When writing a command completion or
52944 	 * response to an internal processor, the order of writes has
52945 	 * to be such that this field is written last.
52946 	 */
52947 	uint8_t	valid;
52948 } hwrm_tf_output_t, *phwrm_tf_output_t;
52949 
52950 /***********************
52951  * hwrm_tf_version_get *
52952  ***********************/
52953 
52954 
52955 /* hwrm_tf_version_get_input (size:128b/16B) */
52956 
52957 typedef struct hwrm_tf_version_get_input {
52958 	/* The HWRM command request type. */
52959 	uint16_t	req_type;
52960 	/*
52961 	 * The completion ring to send the completion event on. This should
52962 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52963 	 */
52964 	uint16_t	cmpl_ring;
52965 	/*
52966 	 * The sequence ID is used by the driver for tracking multiple
52967 	 * commands. This ID is treated as opaque data by the firmware and
52968 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52969 	 */
52970 	uint16_t	seq_id;
52971 	/*
52972 	 * The target ID of the command:
52973 	 * * 0x0-0xFFF8 - The function ID
52974 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52975 	 * * 0xFFFD - Reserved for user-space HWRM interface
52976 	 * * 0xFFFF - HWRM
52977 	 */
52978 	uint16_t	target_id;
52979 	/*
52980 	 * A physical address pointer pointing to a host buffer that the
52981 	 * command's response data will be written. This can be either a host
52982 	 * physical address (HPA) or a guest physical address (GPA) and must
52983 	 * point to a physically contiguous block of memory.
52984 	 */
52985 	uint64_t	resp_addr;
52986 } hwrm_tf_version_get_input_t, *phwrm_tf_version_get_input_t;
52987 
52988 /* hwrm_tf_version_get_output (size:256b/32B) */
52989 
52990 typedef struct hwrm_tf_version_get_output {
52991 	/* The specific error status for the command. */
52992 	uint16_t	error_code;
52993 	/* The HWRM command request type. */
52994 	uint16_t	req_type;
52995 	/* The sequence ID from the original command. */
52996 	uint16_t	seq_id;
52997 	/* The length of the response data in number of bytes. */
52998 	uint16_t	resp_len;
52999 	/* Version Major number. */
53000 	uint8_t	major;
53001 	/* Version Minor number. */
53002 	uint8_t	minor;
53003 	/* Version Update number. */
53004 	uint8_t	update;
53005 	/* unused. */
53006 	uint8_t	unused0[5];
53007 	/*
53008 	 * This field is used to indicate device's capabilities and
53009 	 * configurations.
53010 	 */
53011 	uint64_t	dev_caps_cfg;
53012 	/* unused. */
53013 	uint8_t	unused1[7];
53014 	/*
53015 	 * This field is used in Output records to indicate that the output
53016 	 * is completely written to RAM. This field should be read as '1'
53017 	 * to indicate that the output has been completely written.
53018 	 * When writing a command completion or response to an internal
53019 	 * processor, the order of writes has to be such that this field is
53020 	 * written last.
53021 	 */
53022 	uint8_t	valid;
53023 } hwrm_tf_version_get_output_t, *phwrm_tf_version_get_output_t;
53024 
53025 /************************
53026  * hwrm_tf_session_open *
53027  ************************/
53028 
53029 
53030 /* hwrm_tf_session_open_input (size:640b/80B) */
53031 
53032 typedef struct hwrm_tf_session_open_input {
53033 	/* The HWRM command request type. */
53034 	uint16_t	req_type;
53035 	/*
53036 	 * The completion ring to send the completion event on. This should
53037 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53038 	 */
53039 	uint16_t	cmpl_ring;
53040 	/*
53041 	 * The sequence ID is used by the driver for tracking multiple
53042 	 * commands. This ID is treated as opaque data by the firmware and
53043 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53044 	 */
53045 	uint16_t	seq_id;
53046 	/*
53047 	 * The target ID of the command:
53048 	 * * 0x0-0xFFF8 - The function ID
53049 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53050 	 * * 0xFFFD - Reserved for user-space HWRM interface
53051 	 * * 0xFFFF - HWRM
53052 	 */
53053 	uint16_t	target_id;
53054 	/*
53055 	 * A physical address pointer pointing to a host buffer that the
53056 	 * command's response data will be written. This can be either a host
53057 	 * physical address (HPA) or a guest physical address (GPA) and must
53058 	 * point to a physically contiguous block of memory.
53059 	 */
53060 	uint64_t	resp_addr;
53061 	/* Name of the session. */
53062 	uint8_t	session_name[64];
53063 } hwrm_tf_session_open_input_t, *phwrm_tf_session_open_input_t;
53064 
53065 /* hwrm_tf_session_open_output (size:192b/24B) */
53066 
53067 typedef struct hwrm_tf_session_open_output {
53068 	/* The specific error status for the command. */
53069 	uint16_t	error_code;
53070 	/* The HWRM command request type. */
53071 	uint16_t	req_type;
53072 	/* The sequence ID from the original command. */
53073 	uint16_t	seq_id;
53074 	/* The length of the response data in number of bytes. */
53075 	uint16_t	resp_len;
53076 	/*
53077 	 * Unique session identifier for the session created by the
53078 	 * firmware.
53079 	 */
53080 	uint32_t	fw_session_id;
53081 	/*
53082 	 * Unique session client identifier for the first client on
53083 	 * the newly created session.
53084 	 */
53085 	uint32_t	fw_session_client_id;
53086 	/* This field is used to return the status of fw session to host. */
53087 	uint32_t	flags;
53088 	/*
53089 	 * Indicates if the shared session has been created. Shared session
53090 	 * should be the first session created ever. Its fw_rm_client_id
53091 	 * should be 1. The AFM session's fw_rm_client_id is 0.
53092 	 */
53093 	#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION		UINT32_C(0x1)
53094 	/*
53095 	 * If this bit set to 0, then it indicates the shared session
53096 	 * has been created by another session.
53097 	 */
53098 		#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_NOT_CREATOR  UINT32_C(0x0)
53099 	/*
53100 	 * If this bit is set to 1, then it indicates the shared session
53101 	 * is created by this session.
53102 	 */
53103 		#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_CREATOR	UINT32_C(0x1)
53104 		#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_LAST	HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_CREATOR
53105 	/* unused. */
53106 	uint8_t	unused1[3];
53107 	/*
53108 	 * This field is used in Output records to indicate that the output
53109 	 * is completely written to RAM. This field should be read as '1'
53110 	 * to indicate that the output has been completely written.
53111 	 * When writing a command completion or response to an internal
53112 	 * processor, the order of writes has to be such that this field is
53113 	 * written last.
53114 	 */
53115 	uint8_t	valid;
53116 } hwrm_tf_session_open_output_t, *phwrm_tf_session_open_output_t;
53117 
53118 /****************************
53119  * hwrm_tf_session_register *
53120  ****************************/
53121 
53122 
53123 /* hwrm_tf_session_register_input (size:704b/88B) */
53124 
53125 typedef struct hwrm_tf_session_register_input {
53126 	/* The HWRM command request type. */
53127 	uint16_t	req_type;
53128 	/*
53129 	 * The completion ring to send the completion event on. This should
53130 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53131 	 */
53132 	uint16_t	cmpl_ring;
53133 	/*
53134 	 * The sequence ID is used by the driver for tracking multiple
53135 	 * commands. This ID is treated as opaque data by the firmware and
53136 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53137 	 */
53138 	uint16_t	seq_id;
53139 	/*
53140 	 * The target ID of the command:
53141 	 * * 0x0-0xFFF8 - The function ID
53142 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53143 	 * * 0xFFFD - Reserved for user-space HWRM interface
53144 	 * * 0xFFFF - HWRM
53145 	 */
53146 	uint16_t	target_id;
53147 	/*
53148 	 * A physical address pointer pointing to a host buffer that the
53149 	 * command's response data will be written. This can be either a host
53150 	 * physical address (HPA) or a guest physical address (GPA) and must
53151 	 * point to a physically contiguous block of memory.
53152 	 */
53153 	uint64_t	resp_addr;
53154 	/*
53155 	 * Unique session identifier for the session that the
53156 	 * register request want to create a new client on. This
53157 	 * value originates from the first open request.
53158 	 * The fw_session_id of the attach session includes PCIe bus
53159 	 * info to distinguish the PF and session info to identify
53160 	 * the associated TruFlow session.
53161 	 */
53162 	uint32_t	fw_session_id;
53163 	/* unused. */
53164 	uint32_t	unused0;
53165 	/* Name of the session client. */
53166 	uint8_t	session_client_name[64];
53167 } hwrm_tf_session_register_input_t, *phwrm_tf_session_register_input_t;
53168 
53169 /* hwrm_tf_session_register_output (size:128b/16B) */
53170 
53171 typedef struct hwrm_tf_session_register_output {
53172 	/* The specific error status for the command. */
53173 	uint16_t	error_code;
53174 	/* The HWRM command request type. */
53175 	uint16_t	req_type;
53176 	/* The sequence ID from the original command. */
53177 	uint16_t	seq_id;
53178 	/* The length of the response data in number of bytes. */
53179 	uint16_t	resp_len;
53180 	/*
53181 	 * Unique session client identifier for the session created
53182 	 * by the firmware. It includes the session the client it
53183 	 * attached to and session client info.
53184 	 */
53185 	uint32_t	fw_session_client_id;
53186 	/* unused. */
53187 	uint8_t	unused0[3];
53188 	/*
53189 	 * This field is used in Output records to indicate that the output
53190 	 * is completely written to RAM. This field should be read as '1'
53191 	 * to indicate that the output has been completely written.
53192 	 * When writing a command completion or response to an internal
53193 	 * processor, the order of writes has to be such that this field is
53194 	 * written last.
53195 	 */
53196 	uint8_t	valid;
53197 } hwrm_tf_session_register_output_t, *phwrm_tf_session_register_output_t;
53198 
53199 /******************************
53200  * hwrm_tf_session_unregister *
53201  ******************************/
53202 
53203 
53204 /* hwrm_tf_session_unregister_input (size:192b/24B) */
53205 
53206 typedef struct hwrm_tf_session_unregister_input {
53207 	/* The HWRM command request type. */
53208 	uint16_t	req_type;
53209 	/*
53210 	 * The completion ring to send the completion event on. This should
53211 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53212 	 */
53213 	uint16_t	cmpl_ring;
53214 	/*
53215 	 * The sequence ID is used by the driver for tracking multiple
53216 	 * commands. This ID is treated as opaque data by the firmware and
53217 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53218 	 */
53219 	uint16_t	seq_id;
53220 	/*
53221 	 * The target ID of the command:
53222 	 * * 0x0-0xFFF8 - The function ID
53223 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53224 	 * * 0xFFFD - Reserved for user-space HWRM interface
53225 	 * * 0xFFFF - HWRM
53226 	 */
53227 	uint16_t	target_id;
53228 	/*
53229 	 * A physical address pointer pointing to a host buffer that the
53230 	 * command's response data will be written. This can be either a host
53231 	 * physical address (HPA) or a guest physical address (GPA) and must
53232 	 * point to a physically contiguous block of memory.
53233 	 */
53234 	uint64_t	resp_addr;
53235 	/*
53236 	 * Unique session identifier for the session that the
53237 	 * unregister request want to close a session client on.
53238 	 */
53239 	uint32_t	fw_session_id;
53240 	/*
53241 	 * Unique session client identifier for the session that the
53242 	 * unregister request want to close.
53243 	 */
53244 	uint32_t	fw_session_client_id;
53245 } hwrm_tf_session_unregister_input_t, *phwrm_tf_session_unregister_input_t;
53246 
53247 /* hwrm_tf_session_unregister_output (size:128b/16B) */
53248 
53249 typedef struct hwrm_tf_session_unregister_output {
53250 	/* The specific error status for the command. */
53251 	uint16_t	error_code;
53252 	/* The HWRM command request type. */
53253 	uint16_t	req_type;
53254 	/* The sequence ID from the original command. */
53255 	uint16_t	seq_id;
53256 	/* The length of the response data in number of bytes. */
53257 	uint16_t	resp_len;
53258 	/* unused. */
53259 	uint8_t	unused0[7];
53260 	/*
53261 	 * This field is used in Output records to indicate that the output
53262 	 * is completely written to RAM. This field should be read as '1'
53263 	 * to indicate that the output has been completely written.
53264 	 * When writing a command completion or response to an internal
53265 	 * processor, the order of writes has to be such that this field is
53266 	 * written last.
53267 	 */
53268 	uint8_t	valid;
53269 } hwrm_tf_session_unregister_output_t, *phwrm_tf_session_unregister_output_t;
53270 
53271 /*************************
53272  * hwrm_tf_session_close *
53273  *************************/
53274 
53275 
53276 /* hwrm_tf_session_close_input (size:192b/24B) */
53277 
53278 typedef struct hwrm_tf_session_close_input {
53279 	/* The HWRM command request type. */
53280 	uint16_t	req_type;
53281 	/*
53282 	 * The completion ring to send the completion event on. This should
53283 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53284 	 */
53285 	uint16_t	cmpl_ring;
53286 	/*
53287 	 * The sequence ID is used by the driver for tracking multiple
53288 	 * commands. This ID is treated as opaque data by the firmware and
53289 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53290 	 */
53291 	uint16_t	seq_id;
53292 	/*
53293 	 * The target ID of the command:
53294 	 * * 0x0-0xFFF8 - The function ID
53295 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53296 	 * * 0xFFFD - Reserved for user-space HWRM interface
53297 	 * * 0xFFFF - HWRM
53298 	 */
53299 	uint16_t	target_id;
53300 	/*
53301 	 * A physical address pointer pointing to a host buffer that the
53302 	 * command's response data will be written. This can be either a host
53303 	 * physical address (HPA) or a guest physical address (GPA) and must
53304 	 * point to a physically contiguous block of memory.
53305 	 */
53306 	uint64_t	resp_addr;
53307 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
53308 	uint32_t	fw_session_id;
53309 	/* unused. */
53310 	uint8_t	unused0[4];
53311 } hwrm_tf_session_close_input_t, *phwrm_tf_session_close_input_t;
53312 
53313 /* hwrm_tf_session_close_output (size:128b/16B) */
53314 
53315 typedef struct hwrm_tf_session_close_output {
53316 	/* The specific error status for the command. */
53317 	uint16_t	error_code;
53318 	/* The HWRM command request type. */
53319 	uint16_t	req_type;
53320 	/* The sequence ID from the original command. */
53321 	uint16_t	seq_id;
53322 	/* The length of the response data in number of bytes. */
53323 	uint16_t	resp_len;
53324 	/* unused. */
53325 	uint8_t	unused0[7];
53326 	/*
53327 	 * This field is used in Output records to indicate that the output
53328 	 * is completely written to RAM. This field should be read as '1'
53329 	 * to indicate that the output has been completely written.
53330 	 * When writing a command completion or response to an internal
53331 	 * processor, the order of writes has to be such that this field
53332 	 * is written last.
53333 	 */
53334 	uint8_t	valid;
53335 } hwrm_tf_session_close_output_t, *phwrm_tf_session_close_output_t;
53336 
53337 /************************
53338  * hwrm_tf_session_qcfg *
53339  ************************/
53340 
53341 
53342 /* hwrm_tf_session_qcfg_input (size:192b/24B) */
53343 
53344 typedef struct hwrm_tf_session_qcfg_input {
53345 	/* The HWRM command request type. */
53346 	uint16_t	req_type;
53347 	/*
53348 	 * The completion ring to send the completion event on. This should
53349 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53350 	 */
53351 	uint16_t	cmpl_ring;
53352 	/*
53353 	 * The sequence ID is used by the driver for tracking multiple
53354 	 * commands. This ID is treated as opaque data by the firmware and
53355 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53356 	 */
53357 	uint16_t	seq_id;
53358 	/*
53359 	 * The target ID of the command:
53360 	 * * 0x0-0xFFF8 - The function ID
53361 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53362 	 * * 0xFFFD - Reserved for user-space HWRM interface
53363 	 * * 0xFFFF - HWRM
53364 	 */
53365 	uint16_t	target_id;
53366 	/*
53367 	 * A physical address pointer pointing to a host buffer that the
53368 	 * command's response data will be written. This can be either a host
53369 	 * physical address (HPA) or a guest physical address (GPA) and must
53370 	 * point to a physically contiguous block of memory.
53371 	 */
53372 	uint64_t	resp_addr;
53373 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
53374 	uint32_t	fw_session_id;
53375 	/* unused. */
53376 	uint8_t	unused0[4];
53377 } hwrm_tf_session_qcfg_input_t, *phwrm_tf_session_qcfg_input_t;
53378 
53379 /* hwrm_tf_session_qcfg_output (size:128b/16B) */
53380 
53381 typedef struct hwrm_tf_session_qcfg_output {
53382 	/* The specific error status for the command. */
53383 	uint16_t	error_code;
53384 	/* The HWRM command request type. */
53385 	uint16_t	req_type;
53386 	/* The sequence ID from the original command. */
53387 	uint16_t	seq_id;
53388 	/* The length of the response data in number of bytes. */
53389 	uint16_t	resp_len;
53390 	/* RX action control settings flags. */
53391 	uint8_t	rx_act_flags;
53392 	/*
53393 	 * A value of 1 in this field indicates that Global Flow ID
53394 	 * reporting into cfa_code and cfa_metadata is enabled.
53395 	 */
53396 	#define HWRM_TF_SESSION_QCFG_OUTPUT_RX_ACT_FLAGS_ABCR_GFID_EN		UINT32_C(0x1)
53397 	/*
53398 	 * A value of 1 in this field indicates that both inner and outer
53399 	 * are stripped and inner tag is passed.
53400 	 * Enabled.
53401 	 */
53402 	#define HWRM_TF_SESSION_QCFG_OUTPUT_RX_ACT_FLAGS_ABCR_VTAG_DLT_BOTH	UINT32_C(0x2)
53403 	/*
53404 	 * A value of 1 in this field indicates that the re-use of
53405 	 * existing tunnel L2 header SMAC is enabled for
53406 	 * Non-tunnel L2, L2-L3 and IP-IP tunnel.
53407 	 */
53408 	#define HWRM_TF_SESSION_QCFG_OUTPUT_RX_ACT_FLAGS_TECT_SMAC_OVR_RUTNSL2	UINT32_C(0x4)
53409 	/* TX Action control settings flags. */
53410 	uint8_t	tx_act_flags;
53411 	/* Disabled. */
53412 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_ABCR_VEB_EN	UINT32_C(0x1)
53413 	/*
53414 	 * When set to 1 any GRE tunnels will include the
53415 	 * optional Key field.
53416 	 */
53417 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_TECT_GRE_SET_K	UINT32_C(0x2)
53418 	/*
53419 	 * When set to 1, for GRE tunnels, the IPV6 Traffic Class (TC)
53420 	 * field of the outer header is inherited from the inner header
53421 	 * (if present) or the fixed value as taken from the encap
53422 	 * record.
53423 	 */
53424 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_TECT_IPV6_TC_IH	UINT32_C(0x4)
53425 	/*
53426 	 * When set to 1, for GRE tunnels, the IPV4 Type Of Service (TOS)
53427 	 * field of the outer header is inherited from the inner header
53428 	 * (if present) or the fixed value as taken from the encap record.
53429 	 */
53430 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_TECT_IPV4_TOS_IH	UINT32_C(0x8)
53431 	/* unused. */
53432 	uint8_t	unused0[5];
53433 	/*
53434 	 * This field is used in Output records to indicate that the output
53435 	 * is completely written to RAM. This field should be read as '1'
53436 	 * to indicate that the output has been completely written.
53437 	 * When writing a command completion or response to an internal
53438 	 * processor, the order of writes has to be such that this field
53439 	 * is written last.
53440 	 */
53441 	uint8_t	valid;
53442 } hwrm_tf_session_qcfg_output_t, *phwrm_tf_session_qcfg_output_t;
53443 
53444 /******************************
53445  * hwrm_tf_session_resc_qcaps *
53446  ******************************/
53447 
53448 
53449 /* hwrm_tf_session_resc_qcaps_input (size:256b/32B) */
53450 
53451 typedef struct hwrm_tf_session_resc_qcaps_input {
53452 	/* The HWRM command request type. */
53453 	uint16_t	req_type;
53454 	/*
53455 	 * The completion ring to send the completion event on. This should
53456 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53457 	 */
53458 	uint16_t	cmpl_ring;
53459 	/*
53460 	 * The sequence ID is used by the driver for tracking multiple
53461 	 * commands. This ID is treated as opaque data by the firmware and
53462 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53463 	 */
53464 	uint16_t	seq_id;
53465 	/*
53466 	 * The target ID of the command:
53467 	 * * 0x0-0xFFF8 - The function ID
53468 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53469 	 * * 0xFFFD - Reserved for user-space HWRM interface
53470 	 * * 0xFFFF - HWRM
53471 	 */
53472 	uint16_t	target_id;
53473 	/*
53474 	 * A physical address pointer pointing to a host buffer that the
53475 	 * command's response data will be written. This can be either a host
53476 	 * physical address (HPA) or a guest physical address (GPA) and must
53477 	 * point to a physically contiguous block of memory.
53478 	 */
53479 	uint64_t	resp_addr;
53480 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
53481 	uint32_t	fw_session_id;
53482 	/* Control flags. */
53483 	uint16_t	flags;
53484 	/* Indicates the flow direction. */
53485 	#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR	UINT32_C(0x1)
53486 	/* If this bit set to 0, then it indicates rx flow. */
53487 		#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
53488 	/* If this bit is set to 1, then it indicates tx flow. */
53489 		#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
53490 		#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_LAST HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_TX
53491 	/*
53492 	 * Defines the size of the provided qcaps_addr array
53493 	 * buffer. The size should be set to the Resource Manager
53494 	 * provided max number of qcaps entries which is device
53495 	 * specific. Resource Manager gets the max size from HCAPI
53496 	 * RM.
53497 	 */
53498 	uint16_t	qcaps_size;
53499 	/*
53500 	 * This is the DMA address for the qcaps output data array
53501 	 * buffer. Array is of tf_rm_resc_req_entry type and is
53502 	 * device specific.
53503 	 */
53504 	uint64_t	qcaps_addr;
53505 } hwrm_tf_session_resc_qcaps_input_t, *phwrm_tf_session_resc_qcaps_input_t;
53506 
53507 /* hwrm_tf_session_resc_qcaps_output (size:192b/24B) */
53508 
53509 typedef struct hwrm_tf_session_resc_qcaps_output {
53510 	/* The specific error status for the command. */
53511 	uint16_t	error_code;
53512 	/* The HWRM command request type. */
53513 	uint16_t	req_type;
53514 	/* The sequence ID from the original command. */
53515 	uint16_t	seq_id;
53516 	/* The length of the response data in number of bytes. */
53517 	uint16_t	resp_len;
53518 	/* Control flags. */
53519 	uint32_t	flags;
53520 	/* Session reservation strategy. */
53521 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_MASK  UINT32_C(0x3)
53522 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_SFT   0
53523 	/* Static partitioning. */
53524 		#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_STATIC  UINT32_C(0x0)
53525 	/* Strategy 1. */
53526 		#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_1	UINT32_C(0x1)
53527 	/* Strategy 2. */
53528 		#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_2	UINT32_C(0x2)
53529 	/* Strategy 3. */
53530 		#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_3	UINT32_C(0x3)
53531 		#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_LAST   HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_3
53532 	/*
53533 	 * Size of the returned qcaps_addr data array buffer. The
53534 	 * value cannot exceed the size defined by the input msg,
53535 	 * qcaps_size.
53536 	 */
53537 	uint16_t	size;
53538 	/*
53539 	 * SRAM profile number that sets the partition of SRAM memory
53540 	 * between TF and AFM within the 4 internal memory banks (Thor).
53541 	 */
53542 	uint8_t	sram_profile;
53543 	/* unused. */
53544 	uint8_t	unused0;
53545 	/* unused. */
53546 	uint8_t	unused1[7];
53547 	/*
53548 	 * This field is used in Output records to indicate that the output
53549 	 * is completely written to RAM. This field should be read as '1'
53550 	 * to indicate that the output has been completely written.
53551 	 * When writing a command completion or response to an internal
53552 	 * processor, the order of writes has to be such that this field is
53553 	 * written last.
53554 	 */
53555 	uint8_t	valid;
53556 } hwrm_tf_session_resc_qcaps_output_t, *phwrm_tf_session_resc_qcaps_output_t;
53557 
53558 /******************************
53559  * hwrm_tf_session_resc_alloc *
53560  ******************************/
53561 
53562 
53563 /* hwrm_tf_session_resc_alloc_input (size:320b/40B) */
53564 
53565 typedef struct hwrm_tf_session_resc_alloc_input {
53566 	/* The HWRM command request type. */
53567 	uint16_t	req_type;
53568 	/*
53569 	 * The completion ring to send the completion event on. This should
53570 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53571 	 */
53572 	uint16_t	cmpl_ring;
53573 	/*
53574 	 * The sequence ID is used by the driver for tracking multiple
53575 	 * commands. This ID is treated as opaque data by the firmware and
53576 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53577 	 */
53578 	uint16_t	seq_id;
53579 	/*
53580 	 * The target ID of the command:
53581 	 * * 0x0-0xFFF8 - The function ID
53582 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53583 	 * * 0xFFFD - Reserved for user-space HWRM interface
53584 	 * * 0xFFFF - HWRM
53585 	 */
53586 	uint16_t	target_id;
53587 	/*
53588 	 * A physical address pointer pointing to a host buffer that the
53589 	 * command's response data will be written. This can be either a host
53590 	 * physical address (HPA) or a guest physical address (GPA) and must
53591 	 * point to a physically contiguous block of memory.
53592 	 */
53593 	uint64_t	resp_addr;
53594 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
53595 	uint32_t	fw_session_id;
53596 	/* Control flags. */
53597 	uint16_t	flags;
53598 	/* Indicates the flow direction. */
53599 	#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR	UINT32_C(0x1)
53600 	/* If this bit set to 0, then it indicates rx flow. */
53601 		#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
53602 	/* If this bit is set to 1, then it indicates tx flow. */
53603 		#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
53604 		#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_LAST HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_TX
53605 	/*
53606 	 * Defines the array size of the provided req_addr and
53607 	 * resv_addr array buffers. Should be set to the number of
53608 	 * request entries.
53609 	 */
53610 	uint16_t	req_size;
53611 	/*
53612 	 * This is the DMA address for the request input data array
53613 	 * buffer. Array is of tf_rm_resc_req_entry type. Size of the
53614 	 * array buffer is provided by the 'req_size' field in this
53615 	 * message.
53616 	 */
53617 	uint64_t	req_addr;
53618 	/*
53619 	 * This is the DMA address for the resc output data array
53620 	 * buffer. Array is of tf_rm_resc_entry type. Size of the array
53621 	 * buffer is provided by the 'req_size' field in this
53622 	 * message.
53623 	 */
53624 	uint64_t	resc_addr;
53625 } hwrm_tf_session_resc_alloc_input_t, *phwrm_tf_session_resc_alloc_input_t;
53626 
53627 /* hwrm_tf_session_resc_alloc_output (size:128b/16B) */
53628 
53629 typedef struct hwrm_tf_session_resc_alloc_output {
53630 	/* The specific error status for the command. */
53631 	uint16_t	error_code;
53632 	/* The HWRM command request type. */
53633 	uint16_t	req_type;
53634 	/* The sequence ID from the original command. */
53635 	uint16_t	seq_id;
53636 	/* The length of the response data in number of bytes. */
53637 	uint16_t	resp_len;
53638 	/*
53639 	 * Size of the returned tf_rm_resc_entry data array. The value
53640 	 * cannot exceed the req_size defined by the input msg. The data
53641 	 * array is returned using the resv_addr specified DMA
53642 	 * address also provided by the input msg.
53643 	 */
53644 	uint16_t	size;
53645 	/* unused. */
53646 	uint8_t	unused0[5];
53647 	/*
53648 	 * This field is used in Output records to indicate that the output
53649 	 * is completely written to RAM. This field should be read as '1'
53650 	 * to indicate that the output has been completely written.
53651 	 * When writing a command completion or response to an internal
53652 	 * processor, the order of writes has to be such that this field is
53653 	 * written last.
53654 	 */
53655 	uint8_t	valid;
53656 } hwrm_tf_session_resc_alloc_output_t, *phwrm_tf_session_resc_alloc_output_t;
53657 
53658 /******************************
53659  * hwrm_tf_session_resc_flush *
53660  ******************************/
53661 
53662 
53663 /* hwrm_tf_session_resc_flush_input (size:256b/32B) */
53664 
53665 typedef struct hwrm_tf_session_resc_flush_input {
53666 	/* The HWRM command request type. */
53667 	uint16_t	req_type;
53668 	/*
53669 	 * The completion ring to send the completion event on. This should
53670 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53671 	 */
53672 	uint16_t	cmpl_ring;
53673 	/*
53674 	 * The sequence ID is used by the driver for tracking multiple
53675 	 * commands. This ID is treated as opaque data by the firmware and
53676 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53677 	 */
53678 	uint16_t	seq_id;
53679 	/*
53680 	 * The target ID of the command:
53681 	 * * 0x0-0xFFF8 - The function ID
53682 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53683 	 * * 0xFFFD - Reserved for user-space HWRM interface
53684 	 * * 0xFFFF - HWRM
53685 	 */
53686 	uint16_t	target_id;
53687 	/*
53688 	 * A physical address pointer pointing to a host buffer that the
53689 	 * command's response data will be written. This can be either a host
53690 	 * physical address (HPA) or a guest physical address (GPA) and must
53691 	 * point to a physically contiguous block of memory.
53692 	 */
53693 	uint64_t	resp_addr;
53694 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
53695 	uint32_t	fw_session_id;
53696 	/* Control flags. */
53697 	uint16_t	flags;
53698 	/* Indicates the flow direction. */
53699 	#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR	UINT32_C(0x1)
53700 	/* If this bit set to 0, then it indicates rx flow. */
53701 		#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
53702 	/* If this bit is set to 1, then it indicates tx flow. */
53703 		#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
53704 		#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_LAST HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_TX
53705 	/*
53706 	 * Defines the size, in bytes, of the provided flush_addr
53707 	 * buffer.
53708 	 */
53709 	uint16_t	flush_size;
53710 	/*
53711 	 * This is the DMA address for the flush input data array
53712 	 * buffer. Array of tf_rm_resc_entry type. Size of the
53713 	 * buffer is provided by the 'flush_size' field in this
53714 	 * message.
53715 	 */
53716 	uint64_t	flush_addr;
53717 } hwrm_tf_session_resc_flush_input_t, *phwrm_tf_session_resc_flush_input_t;
53718 
53719 /* hwrm_tf_session_resc_flush_output (size:128b/16B) */
53720 
53721 typedef struct hwrm_tf_session_resc_flush_output {
53722 	/* The specific error status for the command. */
53723 	uint16_t	error_code;
53724 	/* The HWRM command request type. */
53725 	uint16_t	req_type;
53726 	/* The sequence ID from the original command. */
53727 	uint16_t	seq_id;
53728 	/* The length of the response data in number of bytes. */
53729 	uint16_t	resp_len;
53730 	/* unused. */
53731 	uint8_t	unused0[7];
53732 	/*
53733 	 * This field is used in Output records to indicate that the output
53734 	 * is completely written to RAM. This field should be read as '1'
53735 	 * to indicate that the output has been completely written.
53736 	 * When writing a command completion or response to an internal
53737 	 * processor, the order of writes has to be such that this field is
53738 	 * written last.
53739 	 */
53740 	uint8_t	valid;
53741 } hwrm_tf_session_resc_flush_output_t, *phwrm_tf_session_resc_flush_output_t;
53742 
53743 /*****************************
53744  * hwrm_tf_session_resc_info *
53745  *****************************/
53746 
53747 
53748 /* hwrm_tf_session_resc_info_input (size:320b/40B) */
53749 
53750 typedef struct hwrm_tf_session_resc_info_input {
53751 	/* The HWRM command request type. */
53752 	uint16_t	req_type;
53753 	/*
53754 	 * The completion ring to send the completion event on. This should
53755 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53756 	 */
53757 	uint16_t	cmpl_ring;
53758 	/*
53759 	 * The sequence ID is used by the driver for tracking multiple
53760 	 * commands. This ID is treated as opaque data by the firmware and
53761 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53762 	 */
53763 	uint16_t	seq_id;
53764 	/*
53765 	 * The target ID of the command:
53766 	 * * 0x0-0xFFF8 - The function ID
53767 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53768 	 * * 0xFFFD - Reserved for user-space HWRM interface
53769 	 * * 0xFFFF - HWRM
53770 	 */
53771 	uint16_t	target_id;
53772 	/*
53773 	 * A physical address pointer pointing to a host buffer that the
53774 	 * command's response data will be written. This can be either a host
53775 	 * physical address (HPA) or a guest physical address (GPA) and must
53776 	 * point to a physically contiguous block of memory.
53777 	 */
53778 	uint64_t	resp_addr;
53779 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
53780 	uint32_t	fw_session_id;
53781 	/* Control flags. */
53782 	uint16_t	flags;
53783 	/* Indicates the flow direction. */
53784 	#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR	UINT32_C(0x1)
53785 	/* If this bit set to 0, then it indicates rx flow. */
53786 		#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
53787 	/* If this bit is set to 1, then it indicates tx flow. */
53788 		#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
53789 		#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_LAST HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_TX
53790 	/*
53791 	 * Defines the array size of the provided req_addr and
53792 	 * resv_addr array buffers. Should be set to the number of
53793 	 * request entries.
53794 	 */
53795 	uint16_t	req_size;
53796 	/*
53797 	 * This is the DMA address for the request input data array
53798 	 * buffer. Array is of tf_rm_resc_req_entry type. Size of the
53799 	 * array buffer is provided by the 'req_size' field in this
53800 	 * message.
53801 	 */
53802 	uint64_t	req_addr;
53803 	/*
53804 	 * This is the DMA address for the resc output data array
53805 	 * buffer. Array is of tf_rm_resc_entry type. Size of the array
53806 	 * buffer is provided by the 'req_size' field in this
53807 	 * message.
53808 	 */
53809 	uint64_t	resc_addr;
53810 } hwrm_tf_session_resc_info_input_t, *phwrm_tf_session_resc_info_input_t;
53811 
53812 /* hwrm_tf_session_resc_info_output (size:128b/16B) */
53813 
53814 typedef struct hwrm_tf_session_resc_info_output {
53815 	/* The specific error status for the command. */
53816 	uint16_t	error_code;
53817 	/* The HWRM command request type. */
53818 	uint16_t	req_type;
53819 	/* The sequence ID from the original command. */
53820 	uint16_t	seq_id;
53821 	/* The length of the response data in number of bytes. */
53822 	uint16_t	resp_len;
53823 	/*
53824 	 * Size of the returned tf_rm_resc_entry data array. The value
53825 	 * cannot exceed the req_size defined by the input msg. The data
53826 	 * array is returned using the resv_addr specified DMA
53827 	 * address also provided by the input msg.
53828 	 */
53829 	uint16_t	size;
53830 	/* unused. */
53831 	uint8_t	unused0[5];
53832 	/*
53833 	 * This field is used in Output records to indicate that the output
53834 	 * is completely written to RAM. This field should be read as '1'
53835 	 * to indicate that the output has been completely written.
53836 	 * When writing a command completion or response to an internal
53837 	 * processor, the order of writes has to be such that this field is
53838 	 * written last.
53839 	 */
53840 	uint8_t	valid;
53841 } hwrm_tf_session_resc_info_output_t, *phwrm_tf_session_resc_info_output_t;
53842 
53843 /* TruFlow RM capability of a resource. */
53844 /* tf_rm_resc_req_entry (size:64b/8B) */
53845 
53846 typedef struct tf_rm_resc_req_entry {
53847 	/* Type of the resource, defined globally in HCAPI RM. */
53848 	uint32_t	type;
53849 	/* Minimum value. */
53850 	uint16_t	min;
53851 	/* Maximum value. */
53852 	uint16_t	max;
53853 } tf_rm_resc_req_entry_t, *ptf_rm_resc_req_entry_t;
53854 
53855 /* TruFlow RM reservation information. */
53856 /* tf_rm_resc_entry (size:64b/8B) */
53857 
53858 typedef struct tf_rm_resc_entry {
53859 	/* Type of the resource, defined globally in HCAPI RM. */
53860 	uint32_t	type;
53861 	/* Start offset. */
53862 	uint16_t	start;
53863 	/* Number of resources. */
53864 	uint16_t	stride;
53865 } tf_rm_resc_entry_t, *ptf_rm_resc_entry_t;
53866 
53867 /**************************
53868  * hwrm_tf_tbl_type_alloc *
53869  **************************/
53870 
53871 
53872 /* hwrm_tf_tbl_type_alloc_input (size:192b/24B) */
53873 
53874 typedef struct hwrm_tf_tbl_type_alloc_input {
53875 	/* The HWRM command request type. */
53876 	uint16_t	req_type;
53877 	/*
53878 	 * The completion ring to send the completion event on. This should
53879 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53880 	 */
53881 	uint16_t	cmpl_ring;
53882 	/*
53883 	 * The sequence ID is used by the driver for tracking multiple
53884 	 * commands. This ID is treated as opaque data by the firmware and
53885 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53886 	 */
53887 	uint16_t	seq_id;
53888 	/*
53889 	 * The target ID of the command:
53890 	 * * 0x0-0xFFF8 - The function ID
53891 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53892 	 * * 0xFFFD - Reserved for user-space HWRM interface
53893 	 * * 0xFFFF - HWRM
53894 	 */
53895 	uint16_t	target_id;
53896 	/*
53897 	 * A physical address pointer pointing to a host buffer that the
53898 	 * command's response data will be written. This can be either a host
53899 	 * physical address (HPA) or a guest physical address (GPA) and must
53900 	 * point to a physically contiguous block of memory.
53901 	 */
53902 	uint64_t	resp_addr;
53903 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
53904 	uint32_t	fw_session_id;
53905 	/* Control flags. */
53906 	uint16_t	flags;
53907 	/* Indicates the flow direction. */
53908 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR	UINT32_C(0x1)
53909 	/* If this bit set to 0, then it indicates rx flow. */
53910 		#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
53911 	/* If this bit is set to 1, then it indicates tx flow. */
53912 		#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
53913 		#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_LAST HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_TX
53914 	/* Specifies which block this idx table alloc request is for */
53915 	uint8_t	blktype;
53916 	/* CFA block type */
53917 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
53918 	/* RXP gparse block type */
53919 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
53920 	/* RE gparse block type */
53921 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
53922 	/* TE gparse block type */
53923 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
53924 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_LAST		HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
53925 	/*
53926 	 * This field is blktype specific. For any of the UPAR types it is
53927 	 * set to a non-zero value in case of a re-alloc, specifies a
53928 	 * tunnel-type of dynamic UPAR tunnel.
53929 	 */
53930 	uint8_t	type;
53931 } hwrm_tf_tbl_type_alloc_input_t, *phwrm_tf_tbl_type_alloc_input_t;
53932 
53933 /* hwrm_tf_tbl_type_alloc_output (size:128b/16B) */
53934 
53935 typedef struct hwrm_tf_tbl_type_alloc_output {
53936 	/* The specific error status for the command. */
53937 	uint16_t	error_code;
53938 	/* The HWRM command request type. */
53939 	uint16_t	req_type;
53940 	/* The sequence ID from the original command. */
53941 	uint16_t	seq_id;
53942 	/* The length of the response data in number of bytes. */
53943 	uint16_t	resp_len;
53944 	/* Response code. */
53945 	uint32_t	resp_code;
53946 	/*
53947 	 * Table entry allocated by the firmware using the
53948 	 * parameters above.
53949 	 */
53950 	uint16_t	idx_tbl_id;
53951 	/* unused */
53952 	uint8_t	unused0;
53953 	/*
53954 	 * This field is used in Output records to indicate that the output
53955 	 * is completely written to RAM. This field should be read as '1'
53956 	 * to indicate that the output has been completely written.
53957 	 * When writing a command completion or response to an internal
53958 	 * processor, the order of writes has to be such that this field
53959 	 * is written last.
53960 	 */
53961 	uint8_t	valid;
53962 } hwrm_tf_tbl_type_alloc_output_t, *phwrm_tf_tbl_type_alloc_output_t;
53963 
53964 /************************
53965  * hwrm_tf_tbl_type_get *
53966  ************************/
53967 
53968 
53969 /* hwrm_tf_tbl_type_get_input (size:256b/32B) */
53970 
53971 typedef struct hwrm_tf_tbl_type_get_input {
53972 	/* The HWRM command request type. */
53973 	uint16_t	req_type;
53974 	/*
53975 	 * The completion ring to send the completion event on. This should
53976 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53977 	 */
53978 	uint16_t	cmpl_ring;
53979 	/*
53980 	 * The sequence ID is used by the driver for tracking multiple
53981 	 * commands. This ID is treated as opaque data by the firmware and
53982 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53983 	 */
53984 	uint16_t	seq_id;
53985 	/*
53986 	 * The target ID of the command:
53987 	 * * 0x0-0xFFF8 - The function ID
53988 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53989 	 * * 0xFFFD - Reserved for user-space HWRM interface
53990 	 * * 0xFFFF - HWRM
53991 	 */
53992 	uint16_t	target_id;
53993 	/*
53994 	 * A physical address pointer pointing to a host buffer that the
53995 	 * command's response data will be written. This can be either a host
53996 	 * physical address (HPA) or a guest physical address (GPA) and must
53997 	 * point to a physically contiguous block of memory.
53998 	 */
53999 	uint64_t	resp_addr;
54000 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
54001 	uint32_t	fw_session_id;
54002 	/* Control flags. */
54003 	uint16_t	flags;
54004 	/* Indicates the flow direction. */
54005 	#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR		UINT32_C(0x1)
54006 	/* If this bit set to 0, then it indicates rx flow. */
54007 		#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_RX		UINT32_C(0x0)
54008 	/* If this bit is set to 1, then it indicates tx flow. */
54009 		#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_TX		UINT32_C(0x1)
54010 		#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_LAST	HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_TX
54011 	/*
54012 	 * When set use the special access register access to clear
54013 	 * the table entry on read.
54014 	 */
54015 	#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_CLEAR_ON_READ	UINT32_C(0x2)
54016 	/* Specifies which block this idx table alloc request is for */
54017 	uint8_t	blktype;
54018 	/* CFA block type */
54019 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
54020 	/* RXP gparse block type */
54021 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
54022 	/* RE gparse block type */
54023 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
54024 	/* TE gparse block type */
54025 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
54026 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_LAST		HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
54027 	/* unused. */
54028 	uint8_t	unused0;
54029 	/*
54030 	 * Type of the resource, defined globally in the
54031 	 * hwrm_tf_resc_type enum.
54032 	 */
54033 	uint32_t	type;
54034 	/* Index of the type to retrieve. */
54035 	uint32_t	index;
54036 } hwrm_tf_tbl_type_get_input_t, *phwrm_tf_tbl_type_get_input_t;
54037 
54038 /* hwrm_tf_tbl_type_get_output (size:2240b/280B) */
54039 
54040 typedef struct hwrm_tf_tbl_type_get_output {
54041 	/* The specific error status for the command. */
54042 	uint16_t	error_code;
54043 	/* The HWRM command request type. */
54044 	uint16_t	req_type;
54045 	/* The sequence ID from the original command. */
54046 	uint16_t	seq_id;
54047 	/* The length of the response data in number of bytes. */
54048 	uint16_t	resp_len;
54049 	/* Response code. */
54050 	uint32_t	resp_code;
54051 	/* Response size. */
54052 	uint16_t	size;
54053 	/* unused */
54054 	uint16_t	unused0;
54055 	/* Response data. */
54056 	uint8_t	data[256];
54057 	/* unused */
54058 	uint8_t	unused1[7];
54059 	/*
54060 	 * This field is used in Output records to indicate that the output
54061 	 * is completely written to RAM. This field should be read as '1'
54062 	 * to indicate that the output has been completely written.
54063 	 * When writing a command completion or response to an internal
54064 	 * processor, the order of writes has to be such that this field
54065 	 * is written last.
54066 	 */
54067 	uint8_t	valid;
54068 } hwrm_tf_tbl_type_get_output_t, *phwrm_tf_tbl_type_get_output_t;
54069 
54070 /************************
54071  * hwrm_tf_tbl_type_set *
54072  ************************/
54073 
54074 
54075 /* hwrm_tf_tbl_type_set_input (size:1024b/128B) */
54076 
54077 typedef struct hwrm_tf_tbl_type_set_input {
54078 	/* The HWRM command request type. */
54079 	uint16_t	req_type;
54080 	/*
54081 	 * The completion ring to send the completion event on. This should
54082 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54083 	 */
54084 	uint16_t	cmpl_ring;
54085 	/*
54086 	 * The sequence ID is used by the driver for tracking multiple
54087 	 * commands. This ID is treated as opaque data by the firmware and
54088 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54089 	 */
54090 	uint16_t	seq_id;
54091 	/*
54092 	 * The target ID of the command:
54093 	 * * 0x0-0xFFF8 - The function ID
54094 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54095 	 * * 0xFFFD - Reserved for user-space HWRM interface
54096 	 * * 0xFFFF - HWRM
54097 	 */
54098 	uint16_t	target_id;
54099 	/*
54100 	 * A physical address pointer pointing to a host buffer that the
54101 	 * command's response data will be written. This can be either a host
54102 	 * physical address (HPA) or a guest physical address (GPA) and must
54103 	 * point to a physically contiguous block of memory.
54104 	 */
54105 	uint64_t	resp_addr;
54106 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
54107 	uint32_t	fw_session_id;
54108 	/* Control flags. */
54109 	uint16_t	flags;
54110 	/* Indicates the flow direction. */
54111 	#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
54112 	/* If this bit set to 0, then it indicates rx flow. */
54113 		#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54114 	/* If this bit is set to 1, then it indicates tx flow. */
54115 		#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54116 		#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_LAST HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_TX
54117 	/* Indicate table data is being sent via DMA. */
54118 	#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
54119 	/* Specifies which block this idx table alloc request is for */
54120 	uint8_t	blktype;
54121 	/* CFA block type */
54122 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
54123 	/* RXP gparse block type */
54124 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
54125 	/* RE gparse block type */
54126 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
54127 	/* TE gparse block type */
54128 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
54129 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_LAST		HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
54130 	/* unused. */
54131 	uint8_t	unused0;
54132 	/*
54133 	 * Type of the resource, defined globally in the
54134 	 * hwrm_tf_resc_type enum.
54135 	 */
54136 	uint32_t	type;
54137 	/* Index of the type to retrieve. */
54138 	uint32_t	index;
54139 	/* Size of the data to set. */
54140 	uint16_t	size;
54141 	/* unused */
54142 	uint8_t	unused1[6];
54143 	/* Data to be set. */
54144 	uint8_t	data[88];
54145 } hwrm_tf_tbl_type_set_input_t, *phwrm_tf_tbl_type_set_input_t;
54146 
54147 /* hwrm_tf_tbl_type_set_output (size:128b/16B) */
54148 
54149 typedef struct hwrm_tf_tbl_type_set_output {
54150 	/* The specific error status for the command. */
54151 	uint16_t	error_code;
54152 	/* The HWRM command request type. */
54153 	uint16_t	req_type;
54154 	/* The sequence ID from the original command. */
54155 	uint16_t	seq_id;
54156 	/* The length of the response data in number of bytes. */
54157 	uint16_t	resp_len;
54158 	/* unused. */
54159 	uint8_t	unused0[7];
54160 	/*
54161 	 * This field is used in Output records to indicate that the output
54162 	 * is completely written to RAM. This field should be read as '1'
54163 	 * to indicate that the output has been completely written.
54164 	 * When writing a command completion or response to an internal
54165 	 * processor, the order of writes has to be such that this field
54166 	 * is written last.
54167 	 */
54168 	uint8_t	valid;
54169 } hwrm_tf_tbl_type_set_output_t, *phwrm_tf_tbl_type_set_output_t;
54170 
54171 /*************************
54172  * hwrm_tf_tbl_type_free *
54173  *************************/
54174 
54175 
54176 /* hwrm_tf_tbl_type_free_input (size:256b/32B) */
54177 
54178 typedef struct hwrm_tf_tbl_type_free_input {
54179 	/* The HWRM command request type. */
54180 	uint16_t	req_type;
54181 	/*
54182 	 * The completion ring to send the completion event on. This should
54183 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54184 	 */
54185 	uint16_t	cmpl_ring;
54186 	/*
54187 	 * The sequence ID is used by the driver for tracking multiple
54188 	 * commands. This ID is treated as opaque data by the firmware and
54189 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54190 	 */
54191 	uint16_t	seq_id;
54192 	/*
54193 	 * The target ID of the command:
54194 	 * * 0x0-0xFFF8 - The function ID
54195 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54196 	 * * 0xFFFD - Reserved for user-space HWRM interface
54197 	 * * 0xFFFF - HWRM
54198 	 */
54199 	uint16_t	target_id;
54200 	/*
54201 	 * A physical address pointer pointing to a host buffer that the
54202 	 * command's response data will be written. This can be either a host
54203 	 * physical address (HPA) or a guest physical address (GPA) and must
54204 	 * point to a physically contiguous block of memory.
54205 	 */
54206 	uint64_t	resp_addr;
54207 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
54208 	uint32_t	fw_session_id;
54209 	/* Control flags. */
54210 	uint16_t	flags;
54211 	/* Indicates the flow direction. */
54212 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR	UINT32_C(0x1)
54213 	/* If this bit set to 0, then it indicates rx flow. */
54214 		#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54215 	/* If this bit is set to 1, then it indicates tx flow. */
54216 		#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54217 		#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_LAST HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_TX
54218 	/* Specifies which block this idx table alloc request is for */
54219 	uint8_t	blktype;
54220 	/* CFA block type */
54221 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
54222 	/* RXP gparse block type */
54223 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
54224 	/* RE gparse block type */
54225 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
54226 	/* TE gparse block type */
54227 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
54228 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_LAST		HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
54229 	/* Unused */
54230 	uint8_t	unused0;
54231 	/*
54232 	 * Table entry to be freed by the firmware using the parameters
54233 	 * above.
54234 	 */
54235 	uint16_t	idx_tbl_id;
54236 	/* Unused */
54237 	uint8_t	unused1[6];
54238 } hwrm_tf_tbl_type_free_input_t, *phwrm_tf_tbl_type_free_input_t;
54239 
54240 /* hwrm_tf_tbl_type_free_output (size:128b/16B) */
54241 
54242 typedef struct hwrm_tf_tbl_type_free_output {
54243 	/* The specific error status for the command. */
54244 	uint16_t	error_code;
54245 	/* The HWRM command request type. */
54246 	uint16_t	req_type;
54247 	/* The sequence ID from the original command. */
54248 	uint16_t	seq_id;
54249 	/* The length of the response data in number of bytes. */
54250 	uint16_t	resp_len;
54251 	/* Response code. */
54252 	uint32_t	resp_code;
54253 	/* unused */
54254 	uint8_t	unused0[3];
54255 	/*
54256 	 * This field is used in Output records to indicate that the output
54257 	 * is completely written to RAM. This field should be read as '1'
54258 	 * to indicate that the output has been completely written.
54259 	 * When writing a command completion or response to an internal
54260 	 * processor, the order of writes has to be such that this field
54261 	 * is written last.
54262 	 */
54263 	uint8_t	valid;
54264 } hwrm_tf_tbl_type_free_output_t, *phwrm_tf_tbl_type_free_output_t;
54265 
54266 /*********************
54267  * hwrm_tf_em_insert *
54268  *********************/
54269 
54270 
54271 /* hwrm_tf_em_insert_input (size:832b/104B) */
54272 
54273 typedef struct hwrm_tf_em_insert_input {
54274 	/* The HWRM command request type. */
54275 	uint16_t	req_type;
54276 	/*
54277 	 * The completion ring to send the completion event on. This should
54278 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54279 	 */
54280 	uint16_t	cmpl_ring;
54281 	/*
54282 	 * The sequence ID is used by the driver for tracking multiple
54283 	 * commands. This ID is treated as opaque data by the firmware and
54284 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54285 	 */
54286 	uint16_t	seq_id;
54287 	/*
54288 	 * The target ID of the command:
54289 	 * * 0x0-0xFFF8 - The function ID
54290 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54291 	 * * 0xFFFD - Reserved for user-space HWRM interface
54292 	 * * 0xFFFF - HWRM
54293 	 */
54294 	uint16_t	target_id;
54295 	/*
54296 	 * A physical address pointer pointing to a host buffer that the
54297 	 * command's response data will be written. This can be either a host
54298 	 * physical address (HPA) or a guest physical address (GPA) and must
54299 	 * point to a physically contiguous block of memory.
54300 	 */
54301 	uint64_t	resp_addr;
54302 	/* Firmware Session Id. */
54303 	uint32_t	fw_session_id;
54304 	/* Control Flags. */
54305 	uint16_t	flags;
54306 	/* Indicates the flow direction. */
54307 	#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR	UINT32_C(0x1)
54308 	/* If this bit set to 0, then it indicates rx flow. */
54309 		#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54310 	/* If this bit is set to 1, then it indicates tx flow. */
54311 		#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54312 		#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_LAST HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_TX
54313 	/* Reported match strength. */
54314 	uint16_t	strength;
54315 	/* Index to action. */
54316 	uint32_t	action_ptr;
54317 	/* Index of EM record. */
54318 	uint32_t	em_record_idx;
54319 	/* EM Key value. */
54320 	uint64_t	em_key[8];
54321 	/* Number of bits in em_key. */
54322 	uint16_t	em_key_bitlen;
54323 	/* unused. */
54324 	uint16_t	unused0[3];
54325 } hwrm_tf_em_insert_input_t, *phwrm_tf_em_insert_input_t;
54326 
54327 /* hwrm_tf_em_insert_output (size:128b/16B) */
54328 
54329 typedef struct hwrm_tf_em_insert_output {
54330 	/* The specific error status for the command. */
54331 	uint16_t	error_code;
54332 	/* The HWRM command request type. */
54333 	uint16_t	req_type;
54334 	/* The sequence ID from the original command. */
54335 	uint16_t	seq_id;
54336 	/* The length of the response data in number of bytes. */
54337 	uint16_t	resp_len;
54338 	/* EM record pointer index. */
54339 	uint16_t	rptr_index;
54340 	/* EM record offset 0~3. */
54341 	uint8_t	rptr_entry;
54342 	/* Number of word entries consumed by the key. */
54343 	uint8_t	num_of_entries;
54344 	/* unused. */
54345 	uint8_t	unused0[3];
54346 	/*
54347 	 * This field is used in Output records to indicate that the output
54348 	 * is completely written to RAM. This field should be read as '1'
54349 	 * to indicate that the output has been completely written.
54350 	 * When writing a command completion or response to an internal
54351 	 * processor, the order of writes has to be such that this field
54352 	 * is written last.
54353 	 */
54354 	uint8_t	valid;
54355 } hwrm_tf_em_insert_output_t, *phwrm_tf_em_insert_output_t;
54356 
54357 /**************************
54358  * hwrm_tf_em_hash_insert *
54359  **************************/
54360 
54361 
54362 /* hwrm_tf_em_hash_insert_input (size:1024b/128B) */
54363 
54364 typedef struct hwrm_tf_em_hash_insert_input {
54365 	/* The HWRM command request type. */
54366 	uint16_t	req_type;
54367 	/*
54368 	 * The completion ring to send the completion event on. This should
54369 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54370 	 */
54371 	uint16_t	cmpl_ring;
54372 	/*
54373 	 * The sequence ID is used by the driver for tracking multiple
54374 	 * commands. This ID is treated as opaque data by the firmware and
54375 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54376 	 */
54377 	uint16_t	seq_id;
54378 	/*
54379 	 * The target ID of the command:
54380 	 * * 0x0-0xFFF8 - The function ID
54381 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54382 	 * * 0xFFFD - Reserved for user-space HWRM interface
54383 	 * * 0xFFFF - HWRM
54384 	 */
54385 	uint16_t	target_id;
54386 	/*
54387 	 * A physical address pointer pointing to a host buffer that the
54388 	 * command's response data will be written. This can be either a host
54389 	 * physical address (HPA) or a guest physical address (GPA) and must
54390 	 * point to a physically contiguous block of memory.
54391 	 */
54392 	uint64_t	resp_addr;
54393 	/* Firmware Session Id. */
54394 	uint32_t	fw_session_id;
54395 	/* Control Flags. */
54396 	uint16_t	flags;
54397 	/* Indicates the flow direction. */
54398 	#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR	UINT32_C(0x1)
54399 	/* If this bit set to 0, then it indicates rx flow. */
54400 		#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54401 	/* If this bit is set to 1, then it indicates tx flow. */
54402 		#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54403 		#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_LAST HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_TX
54404 	/* Indicates table data is being sent via DMA. */
54405 	#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DMA	UINT32_C(0x2)
54406 	/* Number of bits in the EM record. */
54407 	uint16_t	em_record_size_bits;
54408 	/* CRC32 hash of key. */
54409 	uint32_t	key0_hash;
54410 	/* Lookup3 hash of key. */
54411 	uint32_t	key1_hash;
54412 	/* Index of EM record. */
54413 	uint32_t	em_record_idx;
54414 	/* Unused. */
54415 	uint32_t	unused0;
54416 	/* EM record. */
54417 	uint64_t	em_record[11];
54418 } hwrm_tf_em_hash_insert_input_t, *phwrm_tf_em_hash_insert_input_t;
54419 
54420 /* hwrm_tf_em_hash_insert_output (size:128b/16B) */
54421 
54422 typedef struct hwrm_tf_em_hash_insert_output {
54423 	/* The specific error status for the command. */
54424 	uint16_t	error_code;
54425 	/* The HWRM command request type. */
54426 	uint16_t	req_type;
54427 	/* The sequence ID from the original command. */
54428 	uint16_t	seq_id;
54429 	/* The length of the response data in number of bytes. */
54430 	uint16_t	resp_len;
54431 	/* EM record pointer index. */
54432 	uint16_t	rptr_index;
54433 	/* EM record offset 0~3. */
54434 	uint8_t	rptr_entry;
54435 	/* Number of word entries consumed by the key. */
54436 	uint8_t	num_of_entries;
54437 	/* unused. */
54438 	uint8_t	unused0[3];
54439 	/*
54440 	 * This field is used in Output records to indicate that the output
54441 	 * is completely written to RAM. This field should be read as '1'
54442 	 * to indicate that the output has been completely written.
54443 	 * When writing a command completion or response to an internal
54444 	 * processor, the order of writes has to be such that this field
54445 	 * is written last.
54446 	 */
54447 	uint8_t	valid;
54448 } hwrm_tf_em_hash_insert_output_t, *phwrm_tf_em_hash_insert_output_t;
54449 
54450 /*********************
54451  * hwrm_tf_em_delete *
54452  *********************/
54453 
54454 
54455 /* hwrm_tf_em_delete_input (size:832b/104B) */
54456 
54457 typedef struct hwrm_tf_em_delete_input {
54458 	/* The HWRM command request type. */
54459 	uint16_t	req_type;
54460 	/*
54461 	 * The completion ring to send the completion event on. This should
54462 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54463 	 */
54464 	uint16_t	cmpl_ring;
54465 	/*
54466 	 * The sequence ID is used by the driver for tracking multiple
54467 	 * commands. This ID is treated as opaque data by the firmware and
54468 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54469 	 */
54470 	uint16_t	seq_id;
54471 	/*
54472 	 * The target ID of the command:
54473 	 * * 0x0-0xFFF8 - The function ID
54474 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54475 	 * * 0xFFFD - Reserved for user-space HWRM interface
54476 	 * * 0xFFFF - HWRM
54477 	 */
54478 	uint16_t	target_id;
54479 	/*
54480 	 * A physical address pointer pointing to a host buffer that the
54481 	 * command's response data will be written. This can be either a host
54482 	 * physical address (HPA) or a guest physical address (GPA) and must
54483 	 * point to a physically contiguous block of memory.
54484 	 */
54485 	uint64_t	resp_addr;
54486 	/* Session Id. */
54487 	uint32_t	fw_session_id;
54488 	/* Control flags. */
54489 	uint16_t	flags;
54490 	/* Indicates the flow direction. */
54491 	#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR	UINT32_C(0x1)
54492 	/* If this bit set to 0, then it indicates rx flow. */
54493 		#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54494 	/* If this bit is set to 1, then it indicates tx flow. */
54495 		#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54496 		#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_LAST HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_TX
54497 	/* Unused0 */
54498 	uint16_t	unused0;
54499 	/* EM internal flow handle. */
54500 	uint64_t	flow_handle;
54501 	/* EM Key value */
54502 	uint64_t	em_key[8];
54503 	/* Number of bits in em_key. */
54504 	uint16_t	em_key_bitlen;
54505 	/* unused. */
54506 	uint16_t	unused1[3];
54507 } hwrm_tf_em_delete_input_t, *phwrm_tf_em_delete_input_t;
54508 
54509 /* hwrm_tf_em_delete_output (size:128b/16B) */
54510 
54511 typedef struct hwrm_tf_em_delete_output {
54512 	/* The specific error status for the command. */
54513 	uint16_t	error_code;
54514 	/* The HWRM command request type. */
54515 	uint16_t	req_type;
54516 	/* The sequence ID from the original command. */
54517 	uint16_t	seq_id;
54518 	/* The length of the response data in number of bytes. */
54519 	uint16_t	resp_len;
54520 	/* Original stack allocation index. */
54521 	uint16_t	em_index;
54522 	/* unused. */
54523 	uint8_t	unused0[5];
54524 	/*
54525 	 * This field is used in Output records to indicate that the output
54526 	 * is completely written to RAM. This field should be read as '1'
54527 	 * to indicate that the output has been completely written.
54528 	 * When writing a command completion or response to an internal
54529 	 * processor, the order of writes has to be such that this field
54530 	 * is written last.
54531 	 */
54532 	uint8_t	valid;
54533 } hwrm_tf_em_delete_output_t, *phwrm_tf_em_delete_output_t;
54534 
54535 /*******************
54536  * hwrm_tf_em_move *
54537  *******************/
54538 
54539 
54540 /* hwrm_tf_em_move_input (size:320b/40B) */
54541 
54542 typedef struct hwrm_tf_em_move_input {
54543 	/* The HWRM command request type. */
54544 	uint16_t	req_type;
54545 	/*
54546 	 * The completion ring to send the completion event on. This should
54547 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54548 	 */
54549 	uint16_t	cmpl_ring;
54550 	/*
54551 	 * The sequence ID is used by the driver for tracking multiple
54552 	 * commands. This ID is treated as opaque data by the firmware and
54553 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54554 	 */
54555 	uint16_t	seq_id;
54556 	/*
54557 	 * The target ID of the command:
54558 	 * * 0x0-0xFFF8 - The function ID
54559 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54560 	 * * 0xFFFD - Reserved for user-space HWRM interface
54561 	 * * 0xFFFF - HWRM
54562 	 */
54563 	uint16_t	target_id;
54564 	/*
54565 	 * A physical address pointer pointing to a host buffer that the
54566 	 * command's response data will be written. This can be either a host
54567 	 * physical address (HPA) or a guest physical address (GPA) and must
54568 	 * point to a physically contiguous block of memory.
54569 	 */
54570 	uint64_t	resp_addr;
54571 	/* Session Id. */
54572 	uint32_t	fw_session_id;
54573 	/* Control flags. */
54574 	uint16_t	flags;
54575 	/* Indicates the flow direction. */
54576 	#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR	UINT32_C(0x1)
54577 	/* If this bit set to 0, then it indicates rx flow. */
54578 		#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54579 	/* If this bit is set to 1, then it indicates tx flow. */
54580 		#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54581 		#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_LAST HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_TX
54582 	/* Number of EM entry blocks */
54583 	uint16_t	num_blocks;
54584 	/* New index for entry */
54585 	uint32_t	new_index;
54586 	/* Unused */
54587 	uint32_t	unused0;
54588 	/* EM internal flow handle. */
54589 	uint64_t	flow_handle;
54590 } hwrm_tf_em_move_input_t, *phwrm_tf_em_move_input_t;
54591 
54592 /* hwrm_tf_em_move_output (size:128b/16B) */
54593 
54594 typedef struct hwrm_tf_em_move_output {
54595 	/* The specific error status for the command. */
54596 	uint16_t	error_code;
54597 	/* The HWRM command request type. */
54598 	uint16_t	req_type;
54599 	/* The sequence ID from the original command. */
54600 	uint16_t	seq_id;
54601 	/* The length of the response data in number of bytes. */
54602 	uint16_t	resp_len;
54603 	/* Index of old entry. */
54604 	uint16_t	em_index;
54605 	/* unused. */
54606 	uint8_t	unused0[5];
54607 	/*
54608 	 * This field is used in Output records to indicate that the output
54609 	 * is completely written to RAM. This field should be read as '1'
54610 	 * to indicate that the output has been completely written.
54611 	 * When writing a command completion or response to an internal
54612 	 * processor, the order of writes has to be such that this field
54613 	 * is written last.
54614 	 */
54615 	uint8_t	valid;
54616 } hwrm_tf_em_move_output_t, *phwrm_tf_em_move_output_t;
54617 
54618 /********************
54619  * hwrm_tf_tcam_set *
54620  ********************/
54621 
54622 
54623 /* hwrm_tf_tcam_set_input (size:1024b/128B) */
54624 
54625 typedef struct hwrm_tf_tcam_set_input {
54626 	/* The HWRM command request type. */
54627 	uint16_t	req_type;
54628 	/*
54629 	 * The completion ring to send the completion event on. This should
54630 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54631 	 */
54632 	uint16_t	cmpl_ring;
54633 	/*
54634 	 * The sequence ID is used by the driver for tracking multiple
54635 	 * commands. This ID is treated as opaque data by the firmware and
54636 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54637 	 */
54638 	uint16_t	seq_id;
54639 	/*
54640 	 * The target ID of the command:
54641 	 * * 0x0-0xFFF8 - The function ID
54642 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54643 	 * * 0xFFFD - Reserved for user-space HWRM interface
54644 	 * * 0xFFFF - HWRM
54645 	 */
54646 	uint16_t	target_id;
54647 	/*
54648 	 * A physical address pointer pointing to a host buffer that the
54649 	 * command's response data will be written. This can be either a host
54650 	 * physical address (HPA) or a guest physical address (GPA) and must
54651 	 * point to a physically contiguous block of memory.
54652 	 */
54653 	uint64_t	resp_addr;
54654 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
54655 	uint32_t	fw_session_id;
54656 	/* Control flags. */
54657 	uint32_t	flags;
54658 	/* Indicates the flow direction. */
54659 	#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
54660 	/* If this bit set to 0, then it indicates rx flow. */
54661 		#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54662 	/* If this bit is set to 1, then it indicates tx flow. */
54663 		#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54664 		#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_LAST HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_TX
54665 	/*
54666 	 * Indicate device data is being sent via DMA, the device
54667 	 * data is packing does not change.
54668 	 */
54669 	#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
54670 	/*
54671 	 * TCAM type of the resource, defined globally in the
54672 	 * hwrm_tf_resc_type enum.
54673 	 */
54674 	uint32_t	type;
54675 	/* Index of TCAM entry. */
54676 	uint16_t	idx;
54677 	/* Number of bytes in the TCAM key. */
54678 	uint8_t	key_size;
54679 	/* Number of bytes in the TCAM result. */
54680 	uint8_t	result_size;
54681 	/*
54682 	 * Offset from which the mask bytes start in the device data
54683 	 * array, key offset is always 0.
54684 	 */
54685 	uint8_t	mask_offset;
54686 	/* Offset from which the result bytes start in the device data array. */
54687 	uint8_t	result_offset;
54688 	/* unused. */
54689 	uint8_t	unused0[6];
54690 	/*
54691 	 * TCAM key located at offset 0, mask located at mask_offset
54692 	 * and result at result_offset for the device.
54693 	 */
54694 	uint8_t	dev_data[88];
54695 } hwrm_tf_tcam_set_input_t, *phwrm_tf_tcam_set_input_t;
54696 
54697 /* hwrm_tf_tcam_set_output (size:128b/16B) */
54698 
54699 typedef struct hwrm_tf_tcam_set_output {
54700 	/* The specific error status for the command. */
54701 	uint16_t	error_code;
54702 	/* The HWRM command request type. */
54703 	uint16_t	req_type;
54704 	/* The sequence ID from the original command. */
54705 	uint16_t	seq_id;
54706 	/* The length of the response data in number of bytes. */
54707 	uint16_t	resp_len;
54708 	/* unused. */
54709 	uint8_t	unused0[7];
54710 	/*
54711 	 * This field is used in Output records to indicate that the
54712 	 * output is completely written to RAM. This field should be
54713 	 * read as '1' to indicate that the output has been
54714 	 * completely written. When writing a command completion or
54715 	 * response to an internal processor, the order of writes has
54716 	 * to be such that this field is written last.
54717 	 */
54718 	uint8_t	valid;
54719 } hwrm_tf_tcam_set_output_t, *phwrm_tf_tcam_set_output_t;
54720 
54721 /********************
54722  * hwrm_tf_tcam_get *
54723  ********************/
54724 
54725 
54726 /* hwrm_tf_tcam_get_input (size:256b/32B) */
54727 
54728 typedef struct hwrm_tf_tcam_get_input {
54729 	/* The HWRM command request type. */
54730 	uint16_t	req_type;
54731 	/*
54732 	 * The completion ring to send the completion event on. This should
54733 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54734 	 */
54735 	uint16_t	cmpl_ring;
54736 	/*
54737 	 * The sequence ID is used by the driver for tracking multiple
54738 	 * commands. This ID is treated as opaque data by the firmware and
54739 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54740 	 */
54741 	uint16_t	seq_id;
54742 	/*
54743 	 * The target ID of the command:
54744 	 * * 0x0-0xFFF8 - The function ID
54745 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54746 	 * * 0xFFFD - Reserved for user-space HWRM interface
54747 	 * * 0xFFFF - HWRM
54748 	 */
54749 	uint16_t	target_id;
54750 	/*
54751 	 * A physical address pointer pointing to a host buffer that the
54752 	 * command's response data will be written. This can be either a host
54753 	 * physical address (HPA) or a guest physical address (GPA) and must
54754 	 * point to a physically contiguous block of memory.
54755 	 */
54756 	uint64_t	resp_addr;
54757 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
54758 	uint32_t	fw_session_id;
54759 	/* Control flags. */
54760 	uint32_t	flags;
54761 	/* Indicates the flow direction. */
54762 	#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR	UINT32_C(0x1)
54763 	/* If this bit set to 0, then it indicates rx flow. */
54764 		#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54765 	/* If this bit is set to 1, then it indicates tx flow. */
54766 		#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54767 		#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_LAST HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_TX
54768 	/*
54769 	 * TCAM type of the resource, defined globally in the
54770 	 * hwrm_tf_resc_type enum.
54771 	 */
54772 	uint32_t	type;
54773 	/* Index of a TCAM entry. */
54774 	uint16_t	idx;
54775 	/* unused. */
54776 	uint16_t	unused0;
54777 } hwrm_tf_tcam_get_input_t, *phwrm_tf_tcam_get_input_t;
54778 
54779 /* hwrm_tf_tcam_get_output (size:2368b/296B) */
54780 
54781 typedef struct hwrm_tf_tcam_get_output {
54782 	/* The specific error status for the command. */
54783 	uint16_t	error_code;
54784 	/* The HWRM command request type. */
54785 	uint16_t	req_type;
54786 	/* The sequence ID from the original command. */
54787 	uint16_t	seq_id;
54788 	/* The length of the response data in number of bytes. */
54789 	uint16_t	resp_len;
54790 	/* Number of bytes in the TCAM key. */
54791 	uint8_t	key_size;
54792 	/* Number of bytes in the TCAM entry. */
54793 	uint8_t	result_size;
54794 	/* Offset from which the mask bytes start in the device data array. */
54795 	uint8_t	mask_offset;
54796 	/* Offset from which the result bytes start in the device data array. */
54797 	uint8_t	result_offset;
54798 	/* unused. */
54799 	uint8_t	unused0[4];
54800 	/*
54801 	 * TCAM key located at offset 0, mask located at mask_offset
54802 	 * and result at result_offset for the device.
54803 	 */
54804 	uint8_t	dev_data[272];
54805 	/* unused. */
54806 	uint8_t	unused1[7];
54807 	/*
54808 	 * This field is used in Output records to indicate that the
54809 	 * output is completely written to RAM. This field should be
54810 	 * read as '1' to indicate that the output has been
54811 	 * completely written. When writing a command completion or
54812 	 * response to an internal processor, the order of writes has
54813 	 * to be such that this field is written last.
54814 	 */
54815 	uint8_t	valid;
54816 } hwrm_tf_tcam_get_output_t, *phwrm_tf_tcam_get_output_t;
54817 
54818 /*********************
54819  * hwrm_tf_tcam_move *
54820  *********************/
54821 
54822 
54823 /* hwrm_tf_tcam_move_input (size:1024b/128B) */
54824 
54825 typedef struct hwrm_tf_tcam_move_input {
54826 	/* The HWRM command request type. */
54827 	uint16_t	req_type;
54828 	/*
54829 	 * The completion ring to send the completion event on. This should
54830 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54831 	 */
54832 	uint16_t	cmpl_ring;
54833 	/*
54834 	 * The sequence ID is used by the driver for tracking multiple
54835 	 * commands. This ID is treated as opaque data by the firmware and
54836 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54837 	 */
54838 	uint16_t	seq_id;
54839 	/*
54840 	 * The target ID of the command:
54841 	 * * 0x0-0xFFF8 - The function ID
54842 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54843 	 * * 0xFFFD - Reserved for user-space HWRM interface
54844 	 * * 0xFFFF - HWRM
54845 	 */
54846 	uint16_t	target_id;
54847 	/*
54848 	 * A physical address pointer pointing to a host buffer that the
54849 	 * command's response data will be written. This can be either a host
54850 	 * physical address (HPA) or a guest physical address (GPA) and must
54851 	 * point to a physically contiguous block of memory.
54852 	 */
54853 	uint64_t	resp_addr;
54854 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
54855 	uint32_t	fw_session_id;
54856 	/* Control flags. */
54857 	uint32_t	flags;
54858 	/* Indicates the flow direction. */
54859 	#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR	UINT32_C(0x1)
54860 	/* If this bit set to 0, then it indicates rx flow. */
54861 		#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54862 	/* If this bit is set to 1, then it indicates tx flow. */
54863 		#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54864 		#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_LAST HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_TX
54865 	/*
54866 	 * TCAM type of the resource, defined globally in the
54867 	 * hwrm_tf_resc_type enum.
54868 	 */
54869 	uint32_t	type;
54870 	/* Number of TCAM index pairs to be swapped for the device. */
54871 	uint16_t	count;
54872 	/* unused. */
54873 	uint16_t	unused0;
54874 	/* TCAM index pairs to be swapped for the device. */
54875 	uint16_t	idx_pairs[48];
54876 } hwrm_tf_tcam_move_input_t, *phwrm_tf_tcam_move_input_t;
54877 
54878 /* hwrm_tf_tcam_move_output (size:128b/16B) */
54879 
54880 typedef struct hwrm_tf_tcam_move_output {
54881 	/* The specific error status for the command. */
54882 	uint16_t	error_code;
54883 	/* The HWRM command request type. */
54884 	uint16_t	req_type;
54885 	/* The sequence ID from the original command. */
54886 	uint16_t	seq_id;
54887 	/* The length of the response data in number of bytes. */
54888 	uint16_t	resp_len;
54889 	/* unused. */
54890 	uint8_t	unused0[7];
54891 	/*
54892 	 * This field is used in Output records to indicate that the
54893 	 * output is completely written to RAM. This field should be
54894 	 * read as '1' to indicate that the output has been
54895 	 * completely written. When writing a command completion or
54896 	 * response to an internal processor, the order of writes has
54897 	 * to be such that this field is written last.
54898 	 */
54899 	uint8_t	valid;
54900 } hwrm_tf_tcam_move_output_t, *phwrm_tf_tcam_move_output_t;
54901 
54902 /*********************
54903  * hwrm_tf_tcam_free *
54904  *********************/
54905 
54906 
54907 /* hwrm_tf_tcam_free_input (size:1024b/128B) */
54908 
54909 typedef struct hwrm_tf_tcam_free_input {
54910 	/* The HWRM command request type. */
54911 	uint16_t	req_type;
54912 	/*
54913 	 * The completion ring to send the completion event on. This should
54914 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54915 	 */
54916 	uint16_t	cmpl_ring;
54917 	/*
54918 	 * The sequence ID is used by the driver for tracking multiple
54919 	 * commands. This ID is treated as opaque data by the firmware and
54920 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54921 	 */
54922 	uint16_t	seq_id;
54923 	/*
54924 	 * The target ID of the command:
54925 	 * * 0x0-0xFFF8 - The function ID
54926 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54927 	 * * 0xFFFD - Reserved for user-space HWRM interface
54928 	 * * 0xFFFF - HWRM
54929 	 */
54930 	uint16_t	target_id;
54931 	/*
54932 	 * A physical address pointer pointing to a host buffer that the
54933 	 * command's response data will be written. This can be either a host
54934 	 * physical address (HPA) or a guest physical address (GPA) and must
54935 	 * point to a physically contiguous block of memory.
54936 	 */
54937 	uint64_t	resp_addr;
54938 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
54939 	uint32_t	fw_session_id;
54940 	/* Control flags. */
54941 	uint32_t	flags;
54942 	/* Indicates the flow direction. */
54943 	#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR	UINT32_C(0x1)
54944 	/* If this bit set to 0, then it indicates rx flow. */
54945 		#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
54946 	/* If this bit is set to 1, then it indicates tx flow. */
54947 		#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
54948 		#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_LAST HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_TX
54949 	/*
54950 	 * TCAM type of the resource, defined globally in the
54951 	 * hwrm_tf_resc_type enum.
54952 	 */
54953 	uint32_t	type;
54954 	/* Number of TCAM index to be deleted for the device. */
54955 	uint16_t	count;
54956 	/* unused. */
54957 	uint16_t	unused0;
54958 	/* TCAM index list to be deleted for the device. */
54959 	uint16_t	idx_list[48];
54960 } hwrm_tf_tcam_free_input_t, *phwrm_tf_tcam_free_input_t;
54961 
54962 /* hwrm_tf_tcam_free_output (size:128b/16B) */
54963 
54964 typedef struct hwrm_tf_tcam_free_output {
54965 	/* The specific error status for the command. */
54966 	uint16_t	error_code;
54967 	/* The HWRM command request type. */
54968 	uint16_t	req_type;
54969 	/* The sequence ID from the original command. */
54970 	uint16_t	seq_id;
54971 	/* The length of the response data in number of bytes. */
54972 	uint16_t	resp_len;
54973 	/* unused. */
54974 	uint8_t	unused0[7];
54975 	/*
54976 	 * This field is used in Output records to indicate that the
54977 	 * output is completely written to RAM. This field should be
54978 	 * read as '1' to indicate that the output has been
54979 	 * completely written. When writing a command completion or
54980 	 * response to an internal processor, the order of writes has
54981 	 * to be such that this field is written last.
54982 	 */
54983 	uint8_t	valid;
54984 } hwrm_tf_tcam_free_output_t, *phwrm_tf_tcam_free_output_t;
54985 
54986 /**************************
54987  * hwrm_tf_global_cfg_set *
54988  **************************/
54989 
54990 
54991 /* hwrm_tf_global_cfg_set_input (size:448b/56B) */
54992 
54993 typedef struct hwrm_tf_global_cfg_set_input {
54994 	/* The HWRM command request type. */
54995 	uint16_t	req_type;
54996 	/*
54997 	 * The completion ring to send the completion event on. This should
54998 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54999 	 */
55000 	uint16_t	cmpl_ring;
55001 	/*
55002 	 * The sequence ID is used by the driver for tracking multiple
55003 	 * commands. This ID is treated as opaque data by the firmware and
55004 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55005 	 */
55006 	uint16_t	seq_id;
55007 	/*
55008 	 * The target ID of the command:
55009 	 * * 0x0-0xFFF8 - The function ID
55010 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55011 	 * * 0xFFFD - Reserved for user-space HWRM interface
55012 	 * * 0xFFFF - HWRM
55013 	 */
55014 	uint16_t	target_id;
55015 	/*
55016 	 * A physical address pointer pointing to a host buffer that the
55017 	 * command's response data will be written. This can be either a host
55018 	 * physical address (HPA) or a guest physical address (GPA) and must
55019 	 * point to a physically contiguous block of memory.
55020 	 */
55021 	uint64_t	resp_addr;
55022 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55023 	uint32_t	fw_session_id;
55024 	/* Control flags. */
55025 	uint32_t	flags;
55026 	/* Indicates the flow direction. */
55027 	#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
55028 	/* If this bit set to 0, then it indicates rx flow. */
55029 		#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55030 	/* If this bit is set to 1, then it indicates tx flow. */
55031 		#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55032 		#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_LAST HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_TX
55033 	/* Indicate device data is being sent via DMA. */
55034 	#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
55035 	/* Global Cfg type */
55036 	uint32_t	type;
55037 	/* Offset of the type */
55038 	uint32_t	offset;
55039 	/* Size of the data to set in bytes */
55040 	uint16_t	size;
55041 	/* unused. */
55042 	uint8_t	unused0[6];
55043 	/* Data to set */
55044 	uint8_t	data[8];
55045 	/* Mask of data to set, 0 indicates no mask */
55046 	uint8_t	mask[8];
55047 } hwrm_tf_global_cfg_set_input_t, *phwrm_tf_global_cfg_set_input_t;
55048 
55049 /* hwrm_tf_global_cfg_set_output (size:128b/16B) */
55050 
55051 typedef struct hwrm_tf_global_cfg_set_output {
55052 	/* The specific error status for the command. */
55053 	uint16_t	error_code;
55054 	/* The HWRM command request type. */
55055 	uint16_t	req_type;
55056 	/* The sequence ID from the original command. */
55057 	uint16_t	seq_id;
55058 	/* The length of the response data in number of bytes. */
55059 	uint16_t	resp_len;
55060 	/* unused. */
55061 	uint8_t	unused0[7];
55062 	/*
55063 	 * This field is used in Output records to indicate that the
55064 	 * output is completely written to RAM. This field should be
55065 	 * read as '1' to indicate that the output has been
55066 	 * completely written. When writing a command completion or
55067 	 * response to an internal processor, the order of writes has
55068 	 * to be such that this field is written last.
55069 	 */
55070 	uint8_t	valid;
55071 } hwrm_tf_global_cfg_set_output_t, *phwrm_tf_global_cfg_set_output_t;
55072 
55073 /**************************
55074  * hwrm_tf_global_cfg_get *
55075  **************************/
55076 
55077 
55078 /* hwrm_tf_global_cfg_get_input (size:320b/40B) */
55079 
55080 typedef struct hwrm_tf_global_cfg_get_input {
55081 	/* The HWRM command request type. */
55082 	uint16_t	req_type;
55083 	/*
55084 	 * The completion ring to send the completion event on. This should
55085 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55086 	 */
55087 	uint16_t	cmpl_ring;
55088 	/*
55089 	 * The sequence ID is used by the driver for tracking multiple
55090 	 * commands. This ID is treated as opaque data by the firmware and
55091 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55092 	 */
55093 	uint16_t	seq_id;
55094 	/*
55095 	 * The target ID of the command:
55096 	 * * 0x0-0xFFF8 - The function ID
55097 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55098 	 * * 0xFFFD - Reserved for user-space HWRM interface
55099 	 * * 0xFFFF - HWRM
55100 	 */
55101 	uint16_t	target_id;
55102 	/*
55103 	 * A physical address pointer pointing to a host buffer that the
55104 	 * command's response data will be written. This can be either a host
55105 	 * physical address (HPA) or a guest physical address (GPA) and must
55106 	 * point to a physically contiguous block of memory.
55107 	 */
55108 	uint64_t	resp_addr;
55109 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55110 	uint32_t	fw_session_id;
55111 	/* Control flags. */
55112 	uint32_t	flags;
55113 	/* Indicates the flow direction. */
55114 	#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR	UINT32_C(0x1)
55115 	/* If this bit set to 0, then it indicates rx flow. */
55116 		#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55117 	/* If this bit is set to 1, then it indicates tx flow. */
55118 		#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55119 		#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_LAST HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_TX
55120 	/* Global Cfg type */
55121 	uint32_t	type;
55122 	/* Offset of the type */
55123 	uint32_t	offset;
55124 	/* Size of the data to set in bytes */
55125 	uint16_t	size;
55126 	/* unused. */
55127 	uint8_t	unused0[6];
55128 } hwrm_tf_global_cfg_get_input_t, *phwrm_tf_global_cfg_get_input_t;
55129 
55130 /* hwrm_tf_global_cfg_get_output (size:2240b/280B) */
55131 
55132 typedef struct hwrm_tf_global_cfg_get_output {
55133 	/* The specific error status for the command. */
55134 	uint16_t	error_code;
55135 	/* The HWRM command request type. */
55136 	uint16_t	req_type;
55137 	/* The sequence ID from the original command. */
55138 	uint16_t	seq_id;
55139 	/* The length of the response data in number of bytes. */
55140 	uint16_t	resp_len;
55141 	/* Size of the data read in bytes */
55142 	uint16_t	size;
55143 	/* unused. */
55144 	uint8_t	unused0[6];
55145 	/* Data to set */
55146 	uint8_t	data[256];
55147 	/* unused. */
55148 	uint8_t	unused1[7];
55149 	/*
55150 	 * This field is used in Output records to indicate that the output
55151 	 * is completely written to RAM. This field should be read as '1'
55152 	 * to indicate that the output has been completely written.
55153 	 * When writing a command completion or response to an internal
55154 	 * processor, the order of writes has to be such that this field is
55155 	 * written last.
55156 	 */
55157 	uint8_t	valid;
55158 } hwrm_tf_global_cfg_get_output_t, *phwrm_tf_global_cfg_get_output_t;
55159 
55160 /**********************
55161  * hwrm_tf_if_tbl_get *
55162  **********************/
55163 
55164 
55165 /* hwrm_tf_if_tbl_get_input (size:256b/32B) */
55166 
55167 typedef struct hwrm_tf_if_tbl_get_input {
55168 	/* The HWRM command request type. */
55169 	uint16_t	req_type;
55170 	/*
55171 	 * The completion ring to send the completion event on. This should
55172 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55173 	 */
55174 	uint16_t	cmpl_ring;
55175 	/*
55176 	 * The sequence ID is used by the driver for tracking multiple
55177 	 * commands. This ID is treated as opaque data by the firmware and
55178 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55179 	 */
55180 	uint16_t	seq_id;
55181 	/*
55182 	 * The target ID of the command:
55183 	 * * 0x0-0xFFF8 - The function ID
55184 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55185 	 * * 0xFFFD - Reserved for user-space HWRM interface
55186 	 * * 0xFFFF - HWRM
55187 	 */
55188 	uint16_t	target_id;
55189 	/*
55190 	 * A physical address pointer pointing to a host buffer that the
55191 	 * command's response data will be written. This can be either a host
55192 	 * physical address (HPA) or a guest physical address (GPA) and must
55193 	 * point to a physically contiguous block of memory.
55194 	 */
55195 	uint64_t	resp_addr;
55196 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55197 	uint32_t	fw_session_id;
55198 	/* Control flags. */
55199 	uint16_t	flags;
55200 	/* Indicates the flow direction. */
55201 	#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR	UINT32_C(0x1)
55202 	/* If this bit set to 0, then it indicates rx flow. */
55203 		#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55204 	/* If this bit is set to 1, then it indicates tx flow. */
55205 		#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55206 		#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_LAST HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX
55207 	/* Size of the data to set. */
55208 	uint16_t	size;
55209 	/*
55210 	 * Type of the resource, defined globally in the
55211 	 * hwrm_tf_resc_type enum.
55212 	 */
55213 	uint32_t	type;
55214 	/* Index of the type to retrieve. */
55215 	uint32_t	index;
55216 } hwrm_tf_if_tbl_get_input_t, *phwrm_tf_if_tbl_get_input_t;
55217 
55218 /* hwrm_tf_if_tbl_get_output (size:1216b/152B) */
55219 
55220 typedef struct hwrm_tf_if_tbl_get_output {
55221 	/* The specific error status for the command. */
55222 	uint16_t	error_code;
55223 	/* The HWRM command request type. */
55224 	uint16_t	req_type;
55225 	/* The sequence ID from the original command. */
55226 	uint16_t	seq_id;
55227 	/* The length of the response data in number of bytes. */
55228 	uint16_t	resp_len;
55229 	/* Response code. */
55230 	uint32_t	resp_code;
55231 	/* Response size. */
55232 	uint16_t	size;
55233 	/* unused */
55234 	uint16_t	unused0;
55235 	/* Response data. */
55236 	uint8_t	data[128];
55237 	/* unused */
55238 	uint8_t	unused1[7];
55239 	/*
55240 	 * This field is used in Output records to indicate that the output
55241 	 * is completely written to RAM. This field should be read as '1'
55242 	 * to indicate that the output has been completely written.
55243 	 * When writing a command completion or response to an internal
55244 	 * processor, the order of writes has to be such that this field
55245 	 * is written last.
55246 	 */
55247 	uint8_t	valid;
55248 } hwrm_tf_if_tbl_get_output_t, *phwrm_tf_if_tbl_get_output_t;
55249 
55250 /***************************
55251  * hwrm_tf_if_tbl_type_set *
55252  ***************************/
55253 
55254 
55255 /* hwrm_tf_if_tbl_set_input (size:1024b/128B) */
55256 
55257 typedef struct hwrm_tf_if_tbl_set_input {
55258 	/* The HWRM command request type. */
55259 	uint16_t	req_type;
55260 	/*
55261 	 * The completion ring to send the completion event on. This should
55262 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55263 	 */
55264 	uint16_t	cmpl_ring;
55265 	/*
55266 	 * The sequence ID is used by the driver for tracking multiple
55267 	 * commands. This ID is treated as opaque data by the firmware and
55268 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55269 	 */
55270 	uint16_t	seq_id;
55271 	/*
55272 	 * The target ID of the command:
55273 	 * * 0x0-0xFFF8 - The function ID
55274 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55275 	 * * 0xFFFD - Reserved for user-space HWRM interface
55276 	 * * 0xFFFF - HWRM
55277 	 */
55278 	uint16_t	target_id;
55279 	/*
55280 	 * A physical address pointer pointing to a host buffer that the
55281 	 * command's response data will be written. This can be either a host
55282 	 * physical address (HPA) or a guest physical address (GPA) and must
55283 	 * point to a physically contiguous block of memory.
55284 	 */
55285 	uint64_t	resp_addr;
55286 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55287 	uint32_t	fw_session_id;
55288 	/* Control flags. */
55289 	uint16_t	flags;
55290 	/* Indicates the flow direction. */
55291 	#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
55292 	/* If this bit set to 0, then it indicates rx flow. */
55293 		#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55294 	/* If this bit is set to 1, then it indicates tx flow. */
55295 		#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55296 		#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_LAST HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX
55297 	/* unused. */
55298 	uint8_t	unused0[2];
55299 	/*
55300 	 * Type of the resource, defined globally in the
55301 	 * hwrm_tf_resc_type enum.
55302 	 */
55303 	uint32_t	type;
55304 	/* Index of the type to set. */
55305 	uint32_t	index;
55306 	/* Size of the data to set. */
55307 	uint16_t	size;
55308 	/* unused */
55309 	uint8_t	unused1[6];
55310 	/* Data to be set. */
55311 	uint8_t	data[88];
55312 } hwrm_tf_if_tbl_set_input_t, *phwrm_tf_if_tbl_set_input_t;
55313 
55314 /* hwrm_tf_if_tbl_set_output (size:128b/16B) */
55315 
55316 typedef struct hwrm_tf_if_tbl_set_output {
55317 	/* The specific error status for the command. */
55318 	uint16_t	error_code;
55319 	/* The HWRM command request type. */
55320 	uint16_t	req_type;
55321 	/* The sequence ID from the original command. */
55322 	uint16_t	seq_id;
55323 	/* The length of the response data in number of bytes. */
55324 	uint16_t	resp_len;
55325 	/* unused. */
55326 	uint8_t	unused0[7];
55327 	/*
55328 	 * This field is used in Output records to indicate that the output
55329 	 * is completely written to RAM. This field should be read as '1'
55330 	 * to indicate that the output has been completely written.
55331 	 * When writing a command completion or response to an internal
55332 	 * processor, the order of writes has to be such that this field
55333 	 * is written last.
55334 	 */
55335 	uint8_t	valid;
55336 } hwrm_tf_if_tbl_set_output_t, *phwrm_tf_if_tbl_set_output_t;
55337 
55338 /*****************************
55339  * hwrm_tf_tbl_type_bulk_get *
55340  *****************************/
55341 
55342 
55343 /* hwrm_tf_tbl_type_bulk_get_input (size:384b/48B) */
55344 
55345 typedef struct hwrm_tf_tbl_type_bulk_get_input {
55346 	/* The HWRM command request type. */
55347 	uint16_t	req_type;
55348 	/*
55349 	 * The completion ring to send the completion event on. This should
55350 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55351 	 */
55352 	uint16_t	cmpl_ring;
55353 	/*
55354 	 * The sequence ID is used by the driver for tracking multiple
55355 	 * commands. This ID is treated as opaque data by the firmware and
55356 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55357 	 */
55358 	uint16_t	seq_id;
55359 	/*
55360 	 * The target ID of the command:
55361 	 * * 0x0-0xFFF8 - The function ID
55362 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55363 	 * * 0xFFFD - Reserved for user-space HWRM interface
55364 	 * * 0xFFFF - HWRM
55365 	 */
55366 	uint16_t	target_id;
55367 	/*
55368 	 * A physical address pointer pointing to a host buffer that the
55369 	 * command's response data will be written. This can be either a host
55370 	 * physical address (HPA) or a guest physical address (GPA) and must
55371 	 * point to a physically contiguous block of memory.
55372 	 */
55373 	uint64_t	resp_addr;
55374 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55375 	uint32_t	fw_session_id;
55376 	/* Control flags. */
55377 	uint16_t	flags;
55378 	/* Indicates the flow direction. */
55379 	#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR		UINT32_C(0x1)
55380 	/* If this bit set to 0, then it indicates rx flow. */
55381 		#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_RX		UINT32_C(0x0)
55382 	/* If this bit is set to 1, then it indicates tx flow. */
55383 		#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_TX		UINT32_C(0x1)
55384 		#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_LAST	HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_TX
55385 	/*
55386 	 * When set use the special access register access to clear
55387 	 * the table entries on read.
55388 	 */
55389 	#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_CLEAR_ON_READ	UINT32_C(0x2)
55390 	/* unused. */
55391 	uint8_t	unused0[2];
55392 	/*
55393 	 * Type of the resource, defined globally in the
55394 	 * hwrm_tf_resc_type enum.
55395 	 */
55396 	uint32_t	type;
55397 	/* Starting index of the type to retrieve. */
55398 	uint32_t	start_index;
55399 	/* Number of entries to retrieve. */
55400 	uint32_t	num_entries;
55401 	/* Number of entries to retrieve. */
55402 	uint32_t	unused1;
55403 	/* Host memory where data will be stored. */
55404 	uint64_t	host_addr;
55405 } hwrm_tf_tbl_type_bulk_get_input_t, *phwrm_tf_tbl_type_bulk_get_input_t;
55406 
55407 /* hwrm_tf_tbl_type_bulk_get_output (size:128b/16B) */
55408 
55409 typedef struct hwrm_tf_tbl_type_bulk_get_output {
55410 	/* The specific error status for the command. */
55411 	uint16_t	error_code;
55412 	/* The HWRM command request type. */
55413 	uint16_t	req_type;
55414 	/* The sequence ID from the original command. */
55415 	uint16_t	seq_id;
55416 	/* The length of the response data in number of bytes. */
55417 	uint16_t	resp_len;
55418 	/* Response code. */
55419 	uint32_t	resp_code;
55420 	/* Response size. */
55421 	uint16_t	size;
55422 	/* unused */
55423 	uint8_t	unused0;
55424 	/*
55425 	 * This field is used in Output records to indicate that the output
55426 	 * is completely written to RAM. This field should be read as '1'
55427 	 * to indicate that the output has been completely written.
55428 	 * When writing a command completion or response to an internal
55429 	 * processor, the order of writes has to be such that this field
55430 	 * is written last.
55431 	 */
55432 	uint8_t	valid;
55433 } hwrm_tf_tbl_type_bulk_get_output_t, *phwrm_tf_tbl_type_bulk_get_output_t;
55434 
55435 /***********************************
55436  * hwrm_tf_session_hotup_state_set *
55437  ***********************************/
55438 
55439 
55440 /* hwrm_tf_session_hotup_state_set_input (size:192b/24B) */
55441 
55442 typedef struct hwrm_tf_session_hotup_state_set_input {
55443 	/* The HWRM command request type. */
55444 	uint16_t	req_type;
55445 	/*
55446 	 * The completion ring to send the completion event on. This should
55447 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55448 	 */
55449 	uint16_t	cmpl_ring;
55450 	/*
55451 	 * The sequence ID is used by the driver for tracking multiple
55452 	 * commands. This ID is treated as opaque data by the firmware and
55453 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55454 	 */
55455 	uint16_t	seq_id;
55456 	/*
55457 	 * The target ID of the command:
55458 	 * * 0x0-0xFFF8 - The function ID
55459 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55460 	 * * 0xFFFD - Reserved for user-space HWRM interface
55461 	 * * 0xFFFF - HWRM
55462 	 */
55463 	uint16_t	target_id;
55464 	/*
55465 	 * A physical address pointer pointing to a host buffer that the
55466 	 * command's response data will be written. This can be either a host
55467 	 * physical address (HPA) or a guest physical address (GPA) and must
55468 	 * point to a physically contiguous block of memory.
55469 	 */
55470 	uint64_t	resp_addr;
55471 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55472 	uint32_t	fw_session_id;
55473 	/* Shared session state. */
55474 	uint16_t	state;
55475 	/* Control flags. */
55476 	uint16_t	flags;
55477 	/* Indicates the flow direction. */
55478 	#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
55479 	/* If this bit set to 0, then it indicates rx flow. */
55480 		#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55481 	/* If this bit is set to 1, then it indicates tx flow. */
55482 		#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55483 		#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_LAST HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_TX
55484 } hwrm_tf_session_hotup_state_set_input_t, *phwrm_tf_session_hotup_state_set_input_t;
55485 
55486 /* hwrm_tf_session_hotup_state_set_output (size:128b/16B) */
55487 
55488 typedef struct hwrm_tf_session_hotup_state_set_output {
55489 	/* The specific error status for the command. */
55490 	uint16_t	error_code;
55491 	/* The HWRM command request type. */
55492 	uint16_t	req_type;
55493 	/* The sequence ID from the original command. */
55494 	uint16_t	seq_id;
55495 	/* The length of the response data in number of bytes. */
55496 	uint16_t	resp_len;
55497 	/* unused. */
55498 	uint8_t	unused0[7];
55499 	/*
55500 	 * This field is used in Output records to indicate that the output
55501 	 * is completely written to RAM. This field should be read as '1'
55502 	 * to indicate that the output has been completely written.
55503 	 * When writing a command completion or response to an internal
55504 	 * processor, the order of writes has to be such that this field
55505 	 * is written last.
55506 	 */
55507 	uint8_t	valid;
55508 } hwrm_tf_session_hotup_state_set_output_t, *phwrm_tf_session_hotup_state_set_output_t;
55509 
55510 /***********************************
55511  * hwrm_tf_session_hotup_state_get *
55512  ***********************************/
55513 
55514 
55515 /* hwrm_tf_session_hotup_state_get_input (size:192b/24B) */
55516 
55517 typedef struct hwrm_tf_session_hotup_state_get_input {
55518 	/* The HWRM command request type. */
55519 	uint16_t	req_type;
55520 	/*
55521 	 * The completion ring to send the completion event on. This should
55522 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55523 	 */
55524 	uint16_t	cmpl_ring;
55525 	/*
55526 	 * The sequence ID is used by the driver for tracking multiple
55527 	 * commands. This ID is treated as opaque data by the firmware and
55528 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55529 	 */
55530 	uint16_t	seq_id;
55531 	/*
55532 	 * The target ID of the command:
55533 	 * * 0x0-0xFFF8 - The function ID
55534 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55535 	 * * 0xFFFD - Reserved for user-space HWRM interface
55536 	 * * 0xFFFF - HWRM
55537 	 */
55538 	uint16_t	target_id;
55539 	/*
55540 	 * A physical address pointer pointing to a host buffer that the
55541 	 * command's response data will be written. This can be either a host
55542 	 * physical address (HPA) or a guest physical address (GPA) and must
55543 	 * point to a physically contiguous block of memory.
55544 	 */
55545 	uint64_t	resp_addr;
55546 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55547 	uint32_t	fw_session_id;
55548 	/* Control flags. */
55549 	uint16_t	flags;
55550 	/* Indicates the flow direction. */
55551 	#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR	UINT32_C(0x1)
55552 	/* If this bit set to 0, then it indicates rx flow. */
55553 		#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55554 	/* If this bit is set to 1, then it indicates tx flow. */
55555 		#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55556 		#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_LAST HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_TX
55557 	/* unused. */
55558 	uint8_t	unused0[2];
55559 } hwrm_tf_session_hotup_state_get_input_t, *phwrm_tf_session_hotup_state_get_input_t;
55560 
55561 /* hwrm_tf_session_hotup_state_get_output (size:128b/16B) */
55562 
55563 typedef struct hwrm_tf_session_hotup_state_get_output {
55564 	/* The specific error status for the command. */
55565 	uint16_t	error_code;
55566 	/* The HWRM command request type. */
55567 	uint16_t	req_type;
55568 	/* The sequence ID from the original command. */
55569 	uint16_t	seq_id;
55570 	/* The length of the response data in number of bytes. */
55571 	uint16_t	resp_len;
55572 	/* Shared session HA state. */
55573 	uint16_t	state;
55574 	/* Shared session HA reference count. */
55575 	uint16_t	ref_cnt;
55576 	/* unused. */
55577 	uint8_t	unused0[3];
55578 	/*
55579 	 * This field is used in Output records to indicate that the output
55580 	 * is completely written to RAM. This field should be read as '1'
55581 	 * to indicate that the output has been completely written.
55582 	 * When writing a command completion or response to an internal
55583 	 * processor, the order of writes has to be such that this field
55584 	 * is written last.
55585 	 */
55586 	uint8_t	valid;
55587 } hwrm_tf_session_hotup_state_get_output_t, *phwrm_tf_session_hotup_state_get_output_t;
55588 
55589 /**************************
55590  * hwrm_tf_resc_usage_set *
55591  **************************/
55592 
55593 
55594 /* hwrm_tf_resc_usage_set_input (size:1024b/128B) */
55595 
55596 typedef struct hwrm_tf_resc_usage_set_input {
55597 	/* The HWRM command request type. */
55598 	uint16_t	req_type;
55599 	/*
55600 	 * The completion ring to send the completion event on. This should
55601 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55602 	 */
55603 	uint16_t	cmpl_ring;
55604 	/*
55605 	 * The sequence ID is used by the driver for tracking multiple
55606 	 * commands. This ID is treated as opaque data by the firmware and
55607 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55608 	 */
55609 	uint16_t	seq_id;
55610 	/*
55611 	 * The target ID of the command:
55612 	 * * 0x0-0xFFF8 - The function ID
55613 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55614 	 * * 0xFFFD - Reserved for user-space HWRM interface
55615 	 * * 0xFFFF - HWRM
55616 	 */
55617 	uint16_t	target_id;
55618 	/*
55619 	 * A physical address pointer pointing to a host buffer that the
55620 	 * command's response data will be written. This can be either a host
55621 	 * physical address (HPA) or a guest physical address (GPA) and must
55622 	 * point to a physically contiguous block of memory.
55623 	 */
55624 	uint64_t	resp_addr;
55625 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55626 	uint32_t	fw_session_id;
55627 	/* Control flags. */
55628 	uint16_t	flags;
55629 	/* Indicates the flow direction. */
55630 	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
55631 	/* If this bit set to 0, then it indicates rx flow. */
55632 		#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55633 	/* If this bit is set to 1, then it indicates tx flow. */
55634 		#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55635 		#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_LAST HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_TX
55636 	/* Indicate table data is being sent via DMA. */
55637 	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
55638 	/* Types of the resource to set their usage state. */
55639 	uint16_t	types;
55640 	/* WC TCAM Pool */
55641 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_WC_TCAM	UINT32_C(0x1)
55642 	/* EM Internal Memory Pool */
55643 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_EM		UINT32_C(0x2)
55644 	/* Meter Instance */
55645 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_METER		UINT32_C(0x4)
55646 	/* Counter Record Table */
55647 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_COUNTER	UINT32_C(0x8)
55648 	/* Action Record Table */
55649 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ACTION		UINT32_C(0x10)
55650 	/* ACT MODIFY/ENCAP Record Table */
55651 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ACT_MOD_ENCAP	UINT32_C(0x20)
55652 	/* Source Property SMAC Record Table */
55653 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_SP_SMAC	UINT32_C(0x40)
55654 	/* All Resource Types */
55655 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ALL		UINT32_C(0x80)
55656 	/* Size of the data to set. */
55657 	uint16_t	size;
55658 	/* unused */
55659 	uint8_t	unused1[6];
55660 	/* Data to be set. */
55661 	uint8_t	data[96];
55662 } hwrm_tf_resc_usage_set_input_t, *phwrm_tf_resc_usage_set_input_t;
55663 
55664 /* hwrm_tf_resc_usage_set_output (size:128b/16B) */
55665 
55666 typedef struct hwrm_tf_resc_usage_set_output {
55667 	/* The specific error status for the command. */
55668 	uint16_t	error_code;
55669 	/* The HWRM command request type. */
55670 	uint16_t	req_type;
55671 	/* The sequence ID from the original command. */
55672 	uint16_t	seq_id;
55673 	/* The length of the response data in number of bytes. */
55674 	uint16_t	resp_len;
55675 	/* unused. */
55676 	uint8_t	unused0[7];
55677 	/*
55678 	 * This field is used in Output records to indicate that the output
55679 	 * is completely written to RAM. This field should be read as '1'
55680 	 * to indicate that the output has been completely written.
55681 	 * When writing a command completion or response to an internal
55682 	 * processor, the order of writes has to be such that this field
55683 	 * is written last.
55684 	 */
55685 	uint8_t	valid;
55686 } hwrm_tf_resc_usage_set_output_t, *phwrm_tf_resc_usage_set_output_t;
55687 
55688 /****************************
55689  * hwrm_tf_resc_usage_query *
55690  ****************************/
55691 
55692 
55693 /* hwrm_tf_resc_usage_query_input (size:256b/32B) */
55694 
55695 typedef struct hwrm_tf_resc_usage_query_input {
55696 	/* The HWRM command request type. */
55697 	uint16_t	req_type;
55698 	/*
55699 	 * The completion ring to send the completion event on. This should
55700 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55701 	 */
55702 	uint16_t	cmpl_ring;
55703 	/*
55704 	 * The sequence ID is used by the driver for tracking multiple
55705 	 * commands. This ID is treated as opaque data by the firmware and
55706 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55707 	 */
55708 	uint16_t	seq_id;
55709 	/*
55710 	 * The target ID of the command:
55711 	 * * 0x0-0xFFF8 - The function ID
55712 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55713 	 * * 0xFFFD - Reserved for user-space HWRM interface
55714 	 * * 0xFFFF - HWRM
55715 	 */
55716 	uint16_t	target_id;
55717 	/*
55718 	 * A physical address pointer pointing to a host buffer that the
55719 	 * command's response data will be written. This can be either a host
55720 	 * physical address (HPA) or a guest physical address (GPA) and must
55721 	 * point to a physically contiguous block of memory.
55722 	 */
55723 	uint64_t	resp_addr;
55724 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
55725 	uint32_t	fw_session_id;
55726 	/* Control flags. */
55727 	uint16_t	flags;
55728 	/* Indicates the flow direction. */
55729 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR	UINT32_C(0x1)
55730 	/* If this bit set to 0, then it indicates rx flow. */
55731 		#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
55732 	/* If this bit is set to 1, then it indicates tx flow. */
55733 		#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
55734 		#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_LAST HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX
55735 	/* unused. */
55736 	uint8_t	unused0[2];
55737 	/* Types of the resource to retrieve their usage state. */
55738 	uint16_t	types;
55739 	/* WC TCAM Pool */
55740 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_WC_TCAM	UINT32_C(0x1)
55741 	/* EM Internal Memory Pool */
55742 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_EM		UINT32_C(0x2)
55743 	/* Meter Instance */
55744 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_METER		UINT32_C(0x4)
55745 	/* Counter Record Table */
55746 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_COUNTER	UINT32_C(0x8)
55747 	/* Action Record Table */
55748 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ACTION		UINT32_C(0x10)
55749 	/* ACT MODIFY/ENCAP Record Table */
55750 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ACT_MOD_ENCAP	UINT32_C(0x20)
55751 	/* Source Property SMAC Record Table */
55752 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_SP_SMAC	UINT32_C(0x40)
55753 	/* All Resource Types */
55754 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ALL		UINT32_C(0x80)
55755 	/* unused */
55756 	uint8_t	unused1[6];
55757 } hwrm_tf_resc_usage_query_input_t, *phwrm_tf_resc_usage_query_input_t;
55758 
55759 /* hwrm_tf_resc_usage_query_output (size:960b/120B) */
55760 
55761 typedef struct hwrm_tf_resc_usage_query_output {
55762 	/* The specific error status for the command. */
55763 	uint16_t	error_code;
55764 	/* The HWRM command request type. */
55765 	uint16_t	req_type;
55766 	/* The sequence ID from the original command. */
55767 	uint16_t	seq_id;
55768 	/* The length of the response data in number of bytes. */
55769 	uint16_t	resp_len;
55770 	/* Response code. */
55771 	uint32_t	resp_code;
55772 	/* Response size. */
55773 	uint16_t	size;
55774 	/* unused */
55775 	uint16_t	unused0;
55776 	/* Response data. */
55777 	uint8_t	data[96];
55778 	/* unused */
55779 	uint8_t	unused1[7];
55780 	/*
55781 	 * This field is used in Output records to indicate that the output
55782 	 * is completely written to RAM. This field should be read as '1'
55783 	 * to indicate that the output has been completely written.
55784 	 * When writing a command completion or response to an internal
55785 	 * processor, the order of writes has to be such that this field
55786 	 * is written last.
55787 	 */
55788 	uint8_t	valid;
55789 } hwrm_tf_resc_usage_query_output_t, *phwrm_tf_resc_usage_query_output_t;
55790 
55791 /****************************
55792  * hwrm_tfc_tbl_scope_qcaps *
55793  ****************************/
55794 
55795 
55796 /*
55797  * TruFlow command to check if firmware is capable of
55798  * supporting table scopes.
55799  */
55800 /* hwrm_tfc_tbl_scope_qcaps_input (size:128b/16B) */
55801 
55802 typedef struct hwrm_tfc_tbl_scope_qcaps_input {
55803 	/* The HWRM command request type. */
55804 	uint16_t	req_type;
55805 	/*
55806 	 * The completion ring to send the completion event on. This should
55807 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55808 	 */
55809 	uint16_t	cmpl_ring;
55810 	/*
55811 	 * The sequence ID is used by the driver for tracking multiple
55812 	 * commands. This ID is treated as opaque data by the firmware and
55813 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55814 	 */
55815 	uint16_t	seq_id;
55816 	/*
55817 	 * The target ID of the command:
55818 	 * * 0x0-0xFFF8 - The function ID
55819 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55820 	 * * 0xFFFD - Reserved for user-space HWRM interface
55821 	 * * 0xFFFF - HWRM
55822 	 */
55823 	uint16_t	target_id;
55824 	/*
55825 	 * A physical address pointer pointing to a host buffer that the
55826 	 * command's response data will be written. This can be either a host
55827 	 * physical address (HPA) or a guest physical address (GPA) and must
55828 	 * point to a physically contiguous block of memory.
55829 	 */
55830 	uint64_t	resp_addr;
55831 } hwrm_tfc_tbl_scope_qcaps_input_t, *phwrm_tfc_tbl_scope_qcaps_input_t;
55832 
55833 /* hwrm_tfc_tbl_scope_qcaps_output (size:192b/24B) */
55834 
55835 typedef struct hwrm_tfc_tbl_scope_qcaps_output {
55836 	/* The specific error status for the command. */
55837 	uint16_t	error_code;
55838 	/* The HWRM command request type. */
55839 	uint16_t	req_type;
55840 	/* The sequence ID from the original command. */
55841 	uint16_t	seq_id;
55842 	/* The length of the response data in number of bytes. */
55843 	uint16_t	resp_len;
55844 	/*
55845 	 * The maximum number of lookup records that a table scope can support.
55846 	 * This field is only valid if tbl_scope_capable is not zero.
55847 	 */
55848 	uint32_t	max_lkup_rec_cnt;
55849 	/*
55850 	 * The maximum number of action records that a table scope can support.
55851 	 * This field is only valid if tbl_scope_capable is not zero.
55852 	 */
55853 	uint32_t	max_act_rec_cnt;
55854 	/* Not zero if firmware capable of table scopes. */
55855 	uint8_t	tbl_scope_capable;
55856 	/*
55857 	 * log2 of the number of lookup static buckets that a table scope can
55858 	 * support. This field is only valid if tbl_scope_capable is not zero.
55859 	 */
55860 	uint8_t	max_lkup_static_buckets_exp;
55861 	/* unused. */
55862 	uint8_t	unused0[5];
55863 	/*
55864 	 * This field is used in Output records to indicate that the output
55865 	 * is completely written to RAM. This field should be read as '1'
55866 	 * to indicate that the output has been completely written.
55867 	 * When writing a command completion or response to an internal
55868 	 * processor, the order of writes has to be such that this field
55869 	 * is written last.
55870 	 */
55871 	uint8_t	valid;
55872 } hwrm_tfc_tbl_scope_qcaps_output_t, *phwrm_tfc_tbl_scope_qcaps_output_t;
55873 
55874 /*******************************
55875  * hwrm_tfc_tbl_scope_id_alloc *
55876  *******************************/
55877 
55878 
55879 /*
55880  * TruFlow command to allocate a table scope ID and create the pools.
55881  *
55882  * There is no corresponding free command since a table scope
55883  * ID will automatically be freed once the last FID is removed.
55884  * That is, when the hwrm_tfc_tbl_scope_fid_rem command returns
55885  * a fid_cnt of 0 that also means that the table scope ID has
55886  * been freed.
55887  */
55888 /* hwrm_tfc_tbl_scope_id_alloc_input (size:256b/32B) */
55889 
55890 typedef struct hwrm_tfc_tbl_scope_id_alloc_input {
55891 	/* The HWRM command request type. */
55892 	uint16_t	req_type;
55893 	/*
55894 	 * The completion ring to send the completion event on. This should
55895 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55896 	 */
55897 	uint16_t	cmpl_ring;
55898 	/*
55899 	 * The sequence ID is used by the driver for tracking multiple
55900 	 * commands. This ID is treated as opaque data by the firmware and
55901 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55902 	 */
55903 	uint16_t	seq_id;
55904 	/*
55905 	 * The target ID of the command:
55906 	 * * 0x0-0xFFF8 - The function ID
55907 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55908 	 * * 0xFFFD - Reserved for user-space HWRM interface
55909 	 * * 0xFFFF - HWRM
55910 	 */
55911 	uint16_t	target_id;
55912 	/*
55913 	 * A physical address pointer pointing to a host buffer that the
55914 	 * command's response data will be written. This can be either a host
55915 	 * physical address (HPA) or a guest physical address (GPA) and must
55916 	 * point to a physically contiguous block of memory.
55917 	 */
55918 	uint64_t	resp_addr;
55919 	/*
55920 	 * Function ID.
55921 	 * If running on a trusted VF or PF, the fid field can be used to
55922 	 * specify that the function is a non-trusted VF of the parent PF.
55923 	 * If this command is used for the target_id itself, this field is
55924 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
55925 	 * field.
55926 	 */
55927 	uint16_t	fid;
55928 	/* The maximum number of pools for this table scope. */
55929 	uint16_t	max_pools;
55930 	/* Non-zero if this table scope is shared. */
55931 	uint8_t	shared;
55932 	/*
55933 	 * The size of the lookup pools per direction expressed as
55934 	 * log2(max_records/max_pools). That is, size=2^exp.
55935 	 *
55936 	 * Array is indexed by enum cfa_dir.
55937 	 */
55938 	uint8_t	lkup_pool_sz_exp[2];
55939 	/*
55940 	 * The size of the action pools per direction expressed as
55941 	 * log2(max_records/max_pools). That is, size=2^exp.
55942 	 *
55943 	 * Array is indexed by enum cfa_dir.
55944 	 */
55945 	uint8_t	act_pool_sz_exp[2];
55946 	/* Application type. 0 (AFM), 1 (TF) */
55947 	uint8_t	app_type;
55948 	/* unused. */
55949 	uint8_t	unused0[6];
55950 } hwrm_tfc_tbl_scope_id_alloc_input_t, *phwrm_tfc_tbl_scope_id_alloc_input_t;
55951 
55952 /* hwrm_tfc_tbl_scope_id_alloc_output (size:128b/16B) */
55953 
55954 typedef struct hwrm_tfc_tbl_scope_id_alloc_output {
55955 	/* The specific error status for the command. */
55956 	uint16_t	error_code;
55957 	/* The HWRM command request type. */
55958 	uint16_t	req_type;
55959 	/* The sequence ID from the original command. */
55960 	uint16_t	seq_id;
55961 	/* The length of the response data in number of bytes. */
55962 	uint16_t	resp_len;
55963 	/* The table scope ID that was allocated. */
55964 	uint8_t	tsid;
55965 	/*
55966 	 * Non-zero if this is the first FID associated with this table scope
55967 	 * ID.
55968 	 */
55969 	uint8_t	first;
55970 	/* unused. */
55971 	uint8_t	unused0[5];
55972 	/*
55973 	 * This field is used in Output records to indicate that the output
55974 	 * is completely written to RAM. This field should be read as '1'
55975 	 * to indicate that the output has been completely written.
55976 	 * When writing a command completion or response to an internal
55977 	 * processor, the order of writes has to be such that this field
55978 	 * is written last.
55979 	 */
55980 	uint8_t	valid;
55981 } hwrm_tfc_tbl_scope_id_alloc_output_t, *phwrm_tfc_tbl_scope_id_alloc_output_t;
55982 
55983 /*****************************
55984  * hwrm_tfc_tbl_scope_config *
55985  *****************************/
55986 
55987 
55988 /* TruFlow command to configure the table scope memory. */
55989 /* hwrm_tfc_tbl_scope_config_input (size:704b/88B) */
55990 
55991 typedef struct hwrm_tfc_tbl_scope_config_input {
55992 	/* The HWRM command request type. */
55993 	uint16_t	req_type;
55994 	/*
55995 	 * The completion ring to send the completion event on. This should
55996 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55997 	 */
55998 	uint16_t	cmpl_ring;
55999 	/*
56000 	 * The sequence ID is used by the driver for tracking multiple
56001 	 * commands. This ID is treated as opaque data by the firmware and
56002 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56003 	 */
56004 	uint16_t	seq_id;
56005 	/*
56006 	 * The target ID of the command:
56007 	 * * 0x0-0xFFF8 - The function ID
56008 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56009 	 * * 0xFFFD - Reserved for user-space HWRM interface
56010 	 * * 0xFFFF - HWRM
56011 	 */
56012 	uint16_t	target_id;
56013 	/*
56014 	 * A physical address pointer pointing to a host buffer that the
56015 	 * command's response data will be written. This can be either a host
56016 	 * physical address (HPA) or a guest physical address (GPA) and must
56017 	 * point to a physically contiguous block of memory.
56018 	 */
56019 	uint64_t	resp_addr;
56020 	/*
56021 	 * The base addresses for lookup memory.
56022 	 * Array is indexed by enum cfa_dir.
56023 	 */
56024 	uint64_t	lkup_base_addr[2];
56025 	/*
56026 	 * The base addresses for action memory.
56027 	 * Array is indexed by enum cfa_dir.
56028 	 */
56029 	uint64_t	act_base_addr[2];
56030 	/*
56031 	 * The number of minimum sized lkup records per direction.
56032 	 * In this usage, records are the minimum lookup memory
56033 	 * allocation unit in a table scope. This value is the total
56034 	 * memory required for buckets and entries.
56035 	 *
56036 	 * Array is indexed by enum cfa_dir.
56037 	 */
56038 	uint64_t	lkup_rec_cnt;
56039 	/*
56040 	 * The number of minimum sized action records per direction.
56041 	 * Similar to the lkup_rec_cnt, records are the minimum
56042 	 * action memory allocation unit in a table scope.
56043 	 *
56044 	 * Array is indexed by enum cfa_dir.
56045 	 */
56046 	uint64_t	act_rec_cnt;
56047 	/*
56048 	 * The number of static lookup buckets in the table scope.
56049 	 * Array is indexed by enum cfa_dir.
56050 	 */
56051 	uint64_t	lkup_static_bucket_cnt;
56052 	/* The page size of the table scope. */
56053 	uint32_t	pbl_page_sz;
56054 	/*
56055 	 * The PBL level for lookup memory.
56056 	 * Array is indexed by enum cfa_dir.
56057 	 */
56058 	uint8_t	lkup_pbl_level[2];
56059 	/*
56060 	 * The PBL level for action memory.
56061 	 * Array is indexed by enum cfa_dir.
56062 	 */
56063 	uint8_t	act_pbl_level[2];
56064 	/* The table scope ID. */
56065 	uint8_t	tsid;
56066 	/* unused. */
56067 	uint8_t	unused0[7];
56068 } hwrm_tfc_tbl_scope_config_input_t, *phwrm_tfc_tbl_scope_config_input_t;
56069 
56070 /* hwrm_tfc_tbl_scope_config_output (size:128b/16B) */
56071 
56072 typedef struct hwrm_tfc_tbl_scope_config_output {
56073 	/* The specific error status for the command. */
56074 	uint16_t	error_code;
56075 	/* The HWRM command request type. */
56076 	uint16_t	req_type;
56077 	/* The sequence ID from the original command. */
56078 	uint16_t	seq_id;
56079 	/* The length of the response data in number of bytes. */
56080 	uint16_t	resp_len;
56081 	/* unused. */
56082 	uint8_t	unused0[7];
56083 	/*
56084 	 * This field is used in Output records to indicate that the output
56085 	 * is completely written to RAM. This field should be read as '1'
56086 	 * to indicate that the output has been completely written.
56087 	 * When writing a command completion or response to an internal
56088 	 * processor, the order of writes has to be such that this field
56089 	 * is written last.
56090 	 */
56091 	uint8_t	valid;
56092 } hwrm_tfc_tbl_scope_config_output_t, *phwrm_tfc_tbl_scope_config_output_t;
56093 
56094 /*******************************
56095  * hwrm_tfc_tbl_scope_deconfig *
56096  *******************************/
56097 
56098 
56099 /* TruFlow command to deconfigure the table scope memory. */
56100 /* hwrm_tfc_tbl_scope_deconfig_input (size:192b/24B) */
56101 
56102 typedef struct hwrm_tfc_tbl_scope_deconfig_input {
56103 	/* The HWRM command request type. */
56104 	uint16_t	req_type;
56105 	/*
56106 	 * The completion ring to send the completion event on. This should
56107 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56108 	 */
56109 	uint16_t	cmpl_ring;
56110 	/*
56111 	 * The sequence ID is used by the driver for tracking multiple
56112 	 * commands. This ID is treated as opaque data by the firmware and
56113 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56114 	 */
56115 	uint16_t	seq_id;
56116 	/*
56117 	 * The target ID of the command:
56118 	 * * 0x0-0xFFF8 - The function ID
56119 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56120 	 * * 0xFFFD - Reserved for user-space HWRM interface
56121 	 * * 0xFFFF - HWRM
56122 	 */
56123 	uint16_t	target_id;
56124 	/*
56125 	 * A physical address pointer pointing to a host buffer that the
56126 	 * command's response data will be written. This can be either a host
56127 	 * physical address (HPA) or a guest physical address (GPA) and must
56128 	 * point to a physically contiguous block of memory.
56129 	 */
56130 	uint64_t	resp_addr;
56131 	/* The table scope ID. */
56132 	uint8_t	tsid;
56133 	/* unused. */
56134 	uint8_t	unused0[7];
56135 } hwrm_tfc_tbl_scope_deconfig_input_t, *phwrm_tfc_tbl_scope_deconfig_input_t;
56136 
56137 /* hwrm_tfc_tbl_scope_deconfig_output (size:128b/16B) */
56138 
56139 typedef struct hwrm_tfc_tbl_scope_deconfig_output {
56140 	/* The specific error status for the command. */
56141 	uint16_t	error_code;
56142 	/* The HWRM command request type. */
56143 	uint16_t	req_type;
56144 	/* The sequence ID from the original command. */
56145 	uint16_t	seq_id;
56146 	/* The length of the response data in number of bytes. */
56147 	uint16_t	resp_len;
56148 	/* unused. */
56149 	uint8_t	unused0[7];
56150 	/*
56151 	 * This field is used in Output records to indicate that the output
56152 	 * is completely written to RAM. This field should be read as '1'
56153 	 * to indicate that the output has been completely written.
56154 	 * When writing a command completion or response to an internal
56155 	 * processor, the order of writes has to be such that this field
56156 	 * is written last.
56157 	 */
56158 	uint8_t	valid;
56159 } hwrm_tfc_tbl_scope_deconfig_output_t, *phwrm_tfc_tbl_scope_deconfig_output_t;
56160 
56161 /******************************
56162  * hwrm_tfc_tbl_scope_fid_add *
56163  ******************************/
56164 
56165 
56166 /* TruFlow command to add a FID to a table scope. */
56167 /* hwrm_tfc_tbl_scope_fid_add_input (size:192b/24B) */
56168 
56169 typedef struct hwrm_tfc_tbl_scope_fid_add_input {
56170 	/* The HWRM command request type. */
56171 	uint16_t	req_type;
56172 	/*
56173 	 * The completion ring to send the completion event on. This should
56174 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56175 	 */
56176 	uint16_t	cmpl_ring;
56177 	/*
56178 	 * The sequence ID is used by the driver for tracking multiple
56179 	 * commands. This ID is treated as opaque data by the firmware and
56180 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56181 	 */
56182 	uint16_t	seq_id;
56183 	/*
56184 	 * The target ID of the command:
56185 	 * * 0x0-0xFFF8 - The function ID
56186 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56187 	 * * 0xFFFD - Reserved for user-space HWRM interface
56188 	 * * 0xFFFF - HWRM
56189 	 */
56190 	uint16_t	target_id;
56191 	/*
56192 	 * A physical address pointer pointing to a host buffer that the
56193 	 * command's response data will be written. This can be either a host
56194 	 * physical address (HPA) or a guest physical address (GPA) and must
56195 	 * point to a physically contiguous block of memory.
56196 	 */
56197 	uint64_t	resp_addr;
56198 	/*
56199 	 * Function ID.
56200 	 * If running on a trusted VF or PF, the fid field can be used to
56201 	 * specify that the function is a non-trusted VF of the parent PF.
56202 	 * If this command is used for the target_id itself, this field is
56203 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56204 	 * field.
56205 	 */
56206 	uint16_t	fid;
56207 	/* The table scope ID. */
56208 	uint8_t	tsid;
56209 	/* unused. */
56210 	uint8_t	unused0[5];
56211 } hwrm_tfc_tbl_scope_fid_add_input_t, *phwrm_tfc_tbl_scope_fid_add_input_t;
56212 
56213 /* hwrm_tfc_tbl_scope_fid_add_output (size:128b/16B) */
56214 
56215 typedef struct hwrm_tfc_tbl_scope_fid_add_output {
56216 	/* The specific error status for the command. */
56217 	uint16_t	error_code;
56218 	/* The HWRM command request type. */
56219 	uint16_t	req_type;
56220 	/* The sequence ID from the original command. */
56221 	uint16_t	seq_id;
56222 	/* The length of the response data in number of bytes. */
56223 	uint16_t	resp_len;
56224 	/* The number of FIDs currently in the table scope ID. */
56225 	uint8_t	fid_cnt;
56226 	/* unused. */
56227 	uint8_t	unused0[6];
56228 	/*
56229 	 * This field is used in Output records to indicate that the output
56230 	 * is completely written to RAM. This field should be read as '1'
56231 	 * to indicate that the output has been completely written.
56232 	 * When writing a command completion or response to an internal
56233 	 * processor, the order of writes has to be such that this field
56234 	 * is written last.
56235 	 */
56236 	uint8_t	valid;
56237 } hwrm_tfc_tbl_scope_fid_add_output_t, *phwrm_tfc_tbl_scope_fid_add_output_t;
56238 
56239 /******************************
56240  * hwrm_tfc_tbl_scope_fid_rem *
56241  ******************************/
56242 
56243 
56244 /* TruFlow command to remove a FID from a table scope. */
56245 /* hwrm_tfc_tbl_scope_fid_rem_input (size:192b/24B) */
56246 
56247 typedef struct hwrm_tfc_tbl_scope_fid_rem_input {
56248 	/* The HWRM command request type. */
56249 	uint16_t	req_type;
56250 	/*
56251 	 * The completion ring to send the completion event on. This should
56252 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56253 	 */
56254 	uint16_t	cmpl_ring;
56255 	/*
56256 	 * The sequence ID is used by the driver for tracking multiple
56257 	 * commands. This ID is treated as opaque data by the firmware and
56258 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56259 	 */
56260 	uint16_t	seq_id;
56261 	/*
56262 	 * The target ID of the command:
56263 	 * * 0x0-0xFFF8 - The function ID
56264 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56265 	 * * 0xFFFD - Reserved for user-space HWRM interface
56266 	 * * 0xFFFF - HWRM
56267 	 */
56268 	uint16_t	target_id;
56269 	/*
56270 	 * A physical address pointer pointing to a host buffer that the
56271 	 * command's response data will be written. This can be either a host
56272 	 * physical address (HPA) or a guest physical address (GPA) and must
56273 	 * point to a physically contiguous block of memory.
56274 	 */
56275 	uint64_t	resp_addr;
56276 	/*
56277 	 * Function ID.
56278 	 * If running on a trusted VF or PF, the fid field can be used to
56279 	 * specify that the function is a non-trusted VF of the parent PF.
56280 	 * If this command is used for the target_id itself, this field is
56281 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56282 	 * field.
56283 	 */
56284 	uint16_t	fid;
56285 	/* The table scope ID. */
56286 	uint8_t	tsid;
56287 	/* unused. */
56288 	uint8_t	unused0[5];
56289 } hwrm_tfc_tbl_scope_fid_rem_input_t, *phwrm_tfc_tbl_scope_fid_rem_input_t;
56290 
56291 /* hwrm_tfc_tbl_scope_fid_rem_output (size:128b/16B) */
56292 
56293 typedef struct hwrm_tfc_tbl_scope_fid_rem_output {
56294 	/* The specific error status for the command. */
56295 	uint16_t	error_code;
56296 	/* The HWRM command request type. */
56297 	uint16_t	req_type;
56298 	/* The sequence ID from the original command. */
56299 	uint16_t	seq_id;
56300 	/* The length of the response data in number of bytes. */
56301 	uint16_t	resp_len;
56302 	/* The number of FIDs remaining in the table scope ID. */
56303 	uint16_t	fid_cnt;
56304 	/* unused. */
56305 	uint8_t	unused0[5];
56306 	/*
56307 	 * This field is used in Output records to indicate that the output
56308 	 * is completely written to RAM. This field should be read as '1'
56309 	 * to indicate that the output has been completely written.
56310 	 * When writing a command completion or response to an internal
56311 	 * processor, the order of writes has to be such that this field
56312 	 * is written last.
56313 	 */
56314 	uint8_t	valid;
56315 } hwrm_tfc_tbl_scope_fid_rem_output_t, *phwrm_tfc_tbl_scope_fid_rem_output_t;
56316 
56317 /*****************************
56318  * hwrm_tfc_session_id_alloc *
56319  *****************************/
56320 
56321 
56322 /*
56323  * Allocate a TFC session. Requests the firmware to allocate a TFC
56324  * session identifier and associate a forwarding function with the
56325  * session. Though there's not an explicit matching free for a session
56326  * id alloc, dis-associating the last fid from a session id (fid_cnt goes
56327  * to 0), will result in this session id being freed automatically.
56328  */
56329 /* hwrm_tfc_session_id_alloc_input (size:192b/24B) */
56330 
56331 typedef struct hwrm_tfc_session_id_alloc_input {
56332 	/* The HWRM command request type. */
56333 	uint16_t	req_type;
56334 	/*
56335 	 * The completion ring to send the completion event on. This should
56336 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56337 	 */
56338 	uint16_t	cmpl_ring;
56339 	/*
56340 	 * The sequence ID is used by the driver for tracking multiple
56341 	 * commands. This ID is treated as opaque data by the firmware and
56342 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56343 	 */
56344 	uint16_t	seq_id;
56345 	/*
56346 	 * The target ID of the command:
56347 	 * * 0x0-0xFFF8 - The function ID
56348 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56349 	 * * 0xFFFD - Reserved for user-space HWRM interface
56350 	 * * 0xFFFF - HWRM
56351 	 */
56352 	uint16_t	target_id;
56353 	/*
56354 	 * A physical address pointer pointing to a host buffer that the
56355 	 * command's response data will be written. This can be either a host
56356 	 * physical address (HPA) or a guest physical address (GPA) and must
56357 	 * point to a physically contiguous block of memory.
56358 	 */
56359 	uint64_t	resp_addr;
56360 	/*
56361 	 * Function ID.
56362 	 * If running on a trusted VF or PF, the fid field can be used to
56363 	 * specify that the function is a non-trusted VF of the parent PF.
56364 	 * If this command is used for the target_id itself, this field is
56365 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56366 	 * field.
56367 	 */
56368 	uint16_t	fid;
56369 	/* Unused field */
56370 	uint8_t	unused0[6];
56371 } hwrm_tfc_session_id_alloc_input_t, *phwrm_tfc_session_id_alloc_input_t;
56372 
56373 /* hwrm_tfc_session_id_alloc_output (size:128b/16B) */
56374 
56375 typedef struct hwrm_tfc_session_id_alloc_output {
56376 	/* The specific error status for the command. */
56377 	uint16_t	error_code;
56378 	/* The HWRM command request type. */
56379 	uint16_t	req_type;
56380 	/* The sequence ID from the original command. */
56381 	uint16_t	seq_id;
56382 	/* The length of the response data in number of bytes. */
56383 	uint16_t	resp_len;
56384 	/*
56385 	 * Unique session identifier for the session created by the
56386 	 * firmware.
56387 	 */
56388 	uint16_t	sid;
56389 	/* Unused field */
56390 	uint8_t	unused0[5];
56391 	/*
56392 	 * This field is used in Output records to indicate that the output
56393 	 * is completely written to RAM. This field should be read as '1'
56394 	 * to indicate that the output has been completely written.
56395 	 * When writing a command completion or response to an internal
56396 	 * processor, the order of writes has to be such that this field is
56397 	 * written last.
56398 	 */
56399 	uint8_t	valid;
56400 } hwrm_tfc_session_id_alloc_output_t, *phwrm_tfc_session_id_alloc_output_t;
56401 
56402 /****************************
56403  * hwrm_tfc_session_fid_add *
56404  ****************************/
56405 
56406 
56407 /*
56408  * Associate a TFC session id with a forwarding function. The target_fid
56409  * will be associated with the passed in sid.
56410  */
56411 /* hwrm_tfc_session_fid_add_input (size:192b/24B) */
56412 
56413 typedef struct hwrm_tfc_session_fid_add_input {
56414 	/* The HWRM command request type. */
56415 	uint16_t	req_type;
56416 	/*
56417 	 * The completion ring to send the completion event on. This should
56418 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56419 	 */
56420 	uint16_t	cmpl_ring;
56421 	/*
56422 	 * The sequence ID is used by the driver for tracking multiple
56423 	 * commands. This ID is treated as opaque data by the firmware and
56424 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56425 	 */
56426 	uint16_t	seq_id;
56427 	/*
56428 	 * The target ID of the command:
56429 	 * * 0x0-0xFFF8 - The function ID
56430 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56431 	 * * 0xFFFD - Reserved for user-space HWRM interface
56432 	 * * 0xFFFF - HWRM
56433 	 */
56434 	uint16_t	target_id;
56435 	/*
56436 	 * A physical address pointer pointing to a host buffer that the
56437 	 * command's response data will be written. This can be either a host
56438 	 * physical address (HPA) or a guest physical address (GPA) and must
56439 	 * point to a physically contiguous block of memory.
56440 	 */
56441 	uint64_t	resp_addr;
56442 	/*
56443 	 * Function ID.
56444 	 * If running on a trusted VF or PF, the fid field can be used to
56445 	 * specify that the function is a non-trusted VF of the parent PF.
56446 	 * If this command is used for the target_id itself, this field is
56447 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56448 	 * field.
56449 	 */
56450 	uint16_t	fid;
56451 	/*
56452 	 * Unique session identifier for the session created by the
56453 	 * firmware.
56454 	 */
56455 	uint16_t	sid;
56456 	/* Unused field */
56457 	uint8_t	unused0[4];
56458 } hwrm_tfc_session_fid_add_input_t, *phwrm_tfc_session_fid_add_input_t;
56459 
56460 /* hwrm_tfc_session_fid_add_output (size:128b/16B) */
56461 
56462 typedef struct hwrm_tfc_session_fid_add_output {
56463 	/* The specific error status for the command. */
56464 	uint16_t	error_code;
56465 	/* The HWRM command request type. */
56466 	uint16_t	req_type;
56467 	/* The sequence ID from the original command. */
56468 	uint16_t	seq_id;
56469 	/* The length of the response data in number of bytes. */
56470 	uint16_t	resp_len;
56471 	/* The number of FIDs that share this session. */
56472 	uint16_t	fid_cnt;
56473 	/* Unused field */
56474 	uint8_t	unused0[5];
56475 	/*
56476 	 * This field is used in Output records to indicate that the output
56477 	 * is completely written to RAM. This field should be read as '1'
56478 	 * to indicate that the output has been completely written.
56479 	 * When writing a command completion or response to an internal
56480 	 * processor, the order of writes has to be such that this field is
56481 	 * written last.
56482 	 */
56483 	uint8_t	valid;
56484 } hwrm_tfc_session_fid_add_output_t, *phwrm_tfc_session_fid_add_output_t;
56485 
56486 /****************************
56487  * hwrm_tfc_session_fid_rem *
56488  ****************************/
56489 
56490 
56491 /*
56492  * Dis-associate a TFC session from the target_fid.
56493  * Though there's not an explicit matching free for a
56494  * session id alloc, dis-associating the last fid from a session id
56495  * (fid_cnt goes to 0), will result in this session id being freed
56496  * automatically.
56497  */
56498 /* hwrm_tfc_session_fid_rem_input (size:192b/24B) */
56499 
56500 typedef struct hwrm_tfc_session_fid_rem_input {
56501 	/* The HWRM command request type. */
56502 	uint16_t	req_type;
56503 	/*
56504 	 * The completion ring to send the completion event on. This should
56505 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56506 	 */
56507 	uint16_t	cmpl_ring;
56508 	/*
56509 	 * The sequence ID is used by the driver for tracking multiple
56510 	 * commands. This ID is treated as opaque data by the firmware and
56511 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56512 	 */
56513 	uint16_t	seq_id;
56514 	/*
56515 	 * The target ID of the command:
56516 	 * * 0x0-0xFFF8 - The function ID
56517 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56518 	 * * 0xFFFD - Reserved for user-space HWRM interface
56519 	 * * 0xFFFF - HWRM
56520 	 */
56521 	uint16_t	target_id;
56522 	/*
56523 	 * A physical address pointer pointing to a host buffer that the
56524 	 * command's response data will be written. This can be either a host
56525 	 * physical address (HPA) or a guest physical address (GPA) and must
56526 	 * point to a physically contiguous block of memory.
56527 	 */
56528 	uint64_t	resp_addr;
56529 	/*
56530 	 * Function ID.
56531 	 * If running on a trusted VF or PF, the fid field can be used to
56532 	 * specify that the function is a non-trusted VF of the parent PF.
56533 	 * If this command is used for the target_id itself, this field is
56534 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56535 	 * field.
56536 	 */
56537 	uint16_t	fid;
56538 	/*
56539 	 * Unique session identifier for the session created by the
56540 	 * firmware.
56541 	 */
56542 	uint16_t	sid;
56543 	/* Unused field */
56544 	uint8_t	unused0[4];
56545 } hwrm_tfc_session_fid_rem_input_t, *phwrm_tfc_session_fid_rem_input_t;
56546 
56547 /* hwrm_tfc_session_fid_rem_output (size:128b/16B) */
56548 
56549 typedef struct hwrm_tfc_session_fid_rem_output {
56550 	/* The specific error status for the command. */
56551 	uint16_t	error_code;
56552 	/* The HWRM command request type. */
56553 	uint16_t	req_type;
56554 	/* The sequence ID from the original command. */
56555 	uint16_t	seq_id;
56556 	/* The length of the response data in number of bytes. */
56557 	uint16_t	resp_len;
56558 	/* The number of FIDs that share this session. */
56559 	uint16_t	fid_cnt;
56560 	/* Unused field */
56561 	uint8_t	unused0[5];
56562 	/*
56563 	 * This field is used in Output records to indicate that the output
56564 	 * is completely written to RAM. This field should be read as '1'
56565 	 * to indicate that the output has been completely written.
56566 	 * When writing a command completion or response to an internal
56567 	 * processor, the order of writes has to be such that this field is
56568 	 * written last.
56569 	 */
56570 	uint8_t	valid;
56571 } hwrm_tfc_session_fid_rem_output_t, *phwrm_tfc_session_fid_rem_output_t;
56572 
56573 /************************
56574  * hwrm_tfc_ident_alloc *
56575  ************************/
56576 
56577 
56578 /*
56579  * Allocate a TFC identifier. Requests the firmware to
56580  * allocate a TFC identifier. The session id and track_type are passed
56581  * in. The tracking_id is either the sid or target_fid depends on the
56582  * track_type. The resource subtype is passed in, an id corresponding
56583  * to all these is allocated and returned in the HWRM response.
56584  */
56585 /* hwrm_tfc_ident_alloc_input (size:192b/24B) */
56586 
56587 typedef struct hwrm_tfc_ident_alloc_input {
56588 	/* The HWRM command request type. */
56589 	uint16_t	req_type;
56590 	/*
56591 	 * The completion ring to send the completion event on. This should
56592 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56593 	 */
56594 	uint16_t	cmpl_ring;
56595 	/*
56596 	 * The sequence ID is used by the driver for tracking multiple
56597 	 * commands. This ID is treated as opaque data by the firmware and
56598 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56599 	 */
56600 	uint16_t	seq_id;
56601 	/*
56602 	 * The target ID of the command:
56603 	 * * 0x0-0xFFF8 - The function ID
56604 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56605 	 * * 0xFFFD - Reserved for user-space HWRM interface
56606 	 * * 0xFFFF - HWRM
56607 	 */
56608 	uint16_t	target_id;
56609 	/*
56610 	 * A physical address pointer pointing to a host buffer that the
56611 	 * command's response data will be written. This can be either a host
56612 	 * physical address (HPA) or a guest physical address (GPA) and must
56613 	 * point to a physically contiguous block of memory.
56614 	 */
56615 	uint64_t	resp_addr;
56616 	/*
56617 	 * Function ID.
56618 	 * If running on a trusted VF or PF, the fid field can be used to
56619 	 * specify that the function is a non-trusted VF of the parent PF.
56620 	 * If this command is used for the target_id itself, this field is
56621 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56622 	 * field.
56623 	 */
56624 	uint16_t	fid;
56625 	/*
56626 	 * Unique session identifier for the session created by the
56627 	 * firmware. Will be used to track this identifier.
56628 	 */
56629 	uint16_t	sid;
56630 	/* Control flags. Direction. */
56631 	uint8_t	flags;
56632 	/* Indicates the flow direction. */
56633 	#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR	UINT32_C(0x1)
56634 	/* If this bit set to 0, then it indicates rx flow. */
56635 		#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
56636 	/* If this bit is set to 1, then it indicates tx flow. */
56637 		#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
56638 		#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_LAST HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_TX
56639 	/*
56640 	 * CFA resource subtype. For definitions, please see
56641 	 * cfa_v3/include/cfa_resources.h.
56642 	 */
56643 	uint8_t	subtype;
56644 	/* Describes the type of tracking tag to be used */
56645 	uint8_t	track_type;
56646 	/* Invalid track type */
56647 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID UINT32_C(0x0)
56648 	/* Tracked by session id */
56649 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_SID	UINT32_C(0x1)
56650 	/* Tracked by function id */
56651 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID	UINT32_C(0x2)
56652 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_LAST		HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID
56653 	/* Unused field */
56654 	uint8_t	unused0;
56655 } hwrm_tfc_ident_alloc_input_t, *phwrm_tfc_ident_alloc_input_t;
56656 
56657 /* hwrm_tfc_ident_alloc_output (size:128b/16B) */
56658 
56659 typedef struct hwrm_tfc_ident_alloc_output {
56660 	/* The specific error status for the command. */
56661 	uint16_t	error_code;
56662 	/* The HWRM command request type. */
56663 	uint16_t	req_type;
56664 	/* The sequence ID from the original command. */
56665 	uint16_t	seq_id;
56666 	/* The length of the response data in number of bytes. */
56667 	uint16_t	resp_len;
56668 	/*
56669 	 * Resource identifier allocated by the firmware using
56670 	 * parameters above.
56671 	 */
56672 	uint16_t	ident_id;
56673 	/* Unused field */
56674 	uint8_t	unused0[5];
56675 	/*
56676 	 * This field is used in Output records to indicate that the output
56677 	 * is completely written to RAM. This field should be read as '1'
56678 	 * to indicate that the output has been completely written.
56679 	 * When writing a command completion or response to an internal
56680 	 * processor, the order of writes has to be such that this field is
56681 	 * written last.
56682 	 */
56683 	uint8_t	valid;
56684 } hwrm_tfc_ident_alloc_output_t, *phwrm_tfc_ident_alloc_output_t;
56685 
56686 /***********************
56687  * hwrm_tfc_ident_free *
56688  ***********************/
56689 
56690 
56691 /*
56692  * Requests the firmware to free a TFC resource identifier.
56693  * A resource subtype and session id are passed in.
56694  * An identifier (previously allocated) corresponding to all these is
56695  * freed, only after various sanity checks are completed.
56696  */
56697 /* hwrm_tfc_ident_free_input (size:192b/24B) */
56698 
56699 typedef struct hwrm_tfc_ident_free_input {
56700 	/* The HWRM command request type. */
56701 	uint16_t	req_type;
56702 	/*
56703 	 * The completion ring to send the completion event on. This should
56704 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56705 	 */
56706 	uint16_t	cmpl_ring;
56707 	/*
56708 	 * The sequence ID is used by the driver for tracking multiple
56709 	 * commands. This ID is treated as opaque data by the firmware and
56710 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56711 	 */
56712 	uint16_t	seq_id;
56713 	/*
56714 	 * The target ID of the command:
56715 	 * * 0x0-0xFFF8 - The function ID
56716 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56717 	 * * 0xFFFD - Reserved for user-space HWRM interface
56718 	 * * 0xFFFF - HWRM
56719 	 */
56720 	uint16_t	target_id;
56721 	/*
56722 	 * A physical address pointer pointing to a host buffer that the
56723 	 * command's response data will be written. This can be either a host
56724 	 * physical address (HPA) or a guest physical address (GPA) and must
56725 	 * point to a physically contiguous block of memory.
56726 	 */
56727 	uint64_t	resp_addr;
56728 	/*
56729 	 * Function ID.
56730 	 * If running on a trusted VF or PF, the fid field can be used to
56731 	 * specify that the function is a non-trusted VF of the parent PF.
56732 	 * If this command is used for the target_id itself, this field is
56733 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56734 	 * field.
56735 	 */
56736 	uint16_t	fid;
56737 	/*
56738 	 * Unique session identifier for the session created by the
56739 	 * firmware. Will be used to validate this request.
56740 	 */
56741 	uint16_t	sid;
56742 	/*
56743 	 * CFA resource subtype. For definitions, please see
56744 	 * cfa_v3/include/cfa_resources.h.
56745 	 */
56746 	uint8_t	subtype;
56747 	/* Control flags. Direction. */
56748 	uint8_t	flags;
56749 	/* Indicates the flow direction. */
56750 	#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR	UINT32_C(0x1)
56751 	/* If this bit set to 0, then it indicates rx flow. */
56752 		#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
56753 	/* If this bit is set to 1, then it indicates tx flow. */
56754 		#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
56755 		#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_LAST HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_TX
56756 	/* The resource identifier to be freed */
56757 	uint16_t	ident_id;
56758 } hwrm_tfc_ident_free_input_t, *phwrm_tfc_ident_free_input_t;
56759 
56760 /* hwrm_tfc_ident_free_output (size:128b/16B) */
56761 
56762 typedef struct hwrm_tfc_ident_free_output {
56763 	/* The specific error status for the command. */
56764 	uint16_t	error_code;
56765 	/* The HWRM command request type. */
56766 	uint16_t	req_type;
56767 	/* The sequence ID from the original command. */
56768 	uint16_t	seq_id;
56769 	/* The length of the response data in number of bytes. */
56770 	uint16_t	resp_len;
56771 	/* Reserved */
56772 	uint8_t	unused0[7];
56773 	/*
56774 	 * This field is used in Output records to indicate that the output
56775 	 * is completely written to RAM. This field should be read as '1'
56776 	 * to indicate that the output has been completely written.
56777 	 * When writing a command completion or response to an internal
56778 	 * processor, the order of writes has to be such that this field is
56779 	 * written last.
56780 	 */
56781 	uint8_t	valid;
56782 } hwrm_tfc_ident_free_output_t, *phwrm_tfc_ident_free_output_t;
56783 
56784 /**************************
56785  * hwrm_tfc_idx_tbl_alloc *
56786  **************************/
56787 
56788 
56789 /* hwrm_tfc_idx_tbl_alloc_input (size:192b/24B) */
56790 
56791 typedef struct hwrm_tfc_idx_tbl_alloc_input {
56792 	/* The HWRM command request type. */
56793 	uint16_t	req_type;
56794 	/*
56795 	 * The completion ring to send the completion event on. This should
56796 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56797 	 */
56798 	uint16_t	cmpl_ring;
56799 	/*
56800 	 * The sequence ID is used by the driver for tracking multiple
56801 	 * commands. This ID is treated as opaque data by the firmware and
56802 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56803 	 */
56804 	uint16_t	seq_id;
56805 	/*
56806 	 * The target ID of the command:
56807 	 * * 0x0-0xFFF8 - The function ID
56808 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56809 	 * * 0xFFFD - Reserved for user-space HWRM interface
56810 	 * * 0xFFFF - HWRM
56811 	 */
56812 	uint16_t	target_id;
56813 	/*
56814 	 * A physical address pointer pointing to a host buffer that the
56815 	 * command's response data will be written. This can be either a host
56816 	 * physical address (HPA) or a guest physical address (GPA) and must
56817 	 * point to a physically contiguous block of memory.
56818 	 */
56819 	uint64_t	resp_addr;
56820 	/*
56821 	 * Function ID.
56822 	 * If running on a trusted VF or PF, the fid field can be used to
56823 	 * specify that the function is a non-trusted VF of the parent PF.
56824 	 * If this command is used for the target_id itself, this field is
56825 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56826 	 * field.
56827 	 */
56828 	uint16_t	fid;
56829 	/*
56830 	 * Unique session id for the session created by the
56831 	 * firmware. Will be used to track this index table entry
56832 	 * only if track type is track_type_sid.
56833 	 */
56834 	uint16_t	sid;
56835 	/* Control flags. */
56836 	uint8_t	flags;
56837 	/* Indicates the flow direction. */
56838 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR	UINT32_C(0x1)
56839 	/* If this bit set to 0, then it indicates rx flow. */
56840 		#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
56841 	/* If this bit is set to 1, then it indicates tx flow. */
56842 		#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
56843 		#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_LAST HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_TX
56844 	/*
56845 	 * This field is blktype specific.
56846 	 * For blktype CFA - CFA resource subtype. For definitions,
56847 	 * please see cfa_v3/include/cfa_resources.h.
56848 	 * For blktype rxp, re_gparse, te_gparse -
56849 	 * Tunnel Type. A value of zero (or unknown) means alloc. A known
56850 	 * value (previously allocated dynamic UPAR for tunnel_type) means
56851 	 * realloc. Will fail if a realloc is for previously allocated FID,
56852 	 */
56853 	uint8_t	subtype;
56854 	/* Describes the type of tracking id to be used */
56855 	uint8_t	track_type;
56856 	/* Invalid track type */
56857 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID UINT32_C(0x0)
56858 	/* Tracked by session id */
56859 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_SID	UINT32_C(0x1)
56860 	/* Tracked by function id */
56861 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID	UINT32_C(0x2)
56862 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_LAST		HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID
56863 	/* Specifies which block this idx table alloc request is for */
56864 	uint8_t	blktype;
56865 	/* CFA block type */
56866 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
56867 	/* RXP gparse block type */
56868 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
56869 	/* RE gparse block type */
56870 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
56871 	/* TE gparse block type */
56872 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
56873 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_LAST		HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
56874 } hwrm_tfc_idx_tbl_alloc_input_t, *phwrm_tfc_idx_tbl_alloc_input_t;
56875 
56876 /* hwrm_tfc_idx_tbl_alloc_output (size:128b/16B) */
56877 
56878 typedef struct hwrm_tfc_idx_tbl_alloc_output {
56879 	/* The specific error status for the command. */
56880 	uint16_t	error_code;
56881 	/* The HWRM command request type. */
56882 	uint16_t	req_type;
56883 	/* The sequence ID from the original command. */
56884 	uint16_t	seq_id;
56885 	/* The length of the response data in number of bytes. */
56886 	uint16_t	resp_len;
56887 	/*
56888 	 * Index table entry allocated by the firmware using the
56889 	 * parameters above.
56890 	 */
56891 	uint16_t	idx_tbl_id;
56892 	/* Reserved */
56893 	uint8_t	unused0[5];
56894 	/*
56895 	 * This field is used in Output records to indicate that the output
56896 	 * is completely written to RAM. This field should be read as '1'
56897 	 * to indicate that the output has been completely written.
56898 	 * When writing a command completion or response to an internal
56899 	 * processor, the order of writes has to be such that this field
56900 	 * is written last.
56901 	 */
56902 	uint8_t	valid;
56903 } hwrm_tfc_idx_tbl_alloc_output_t, *phwrm_tfc_idx_tbl_alloc_output_t;
56904 
56905 /******************************
56906  * hwrm_tfc_idx_tbl_alloc_set *
56907  ******************************/
56908 
56909 
56910 /* hwrm_tfc_idx_tbl_alloc_set_input (size:1088b/136B) */
56911 
56912 typedef struct hwrm_tfc_idx_tbl_alloc_set_input {
56913 	/* The HWRM command request type. */
56914 	uint16_t	req_type;
56915 	/*
56916 	 * The completion ring to send the completion event on. This should
56917 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56918 	 */
56919 	uint16_t	cmpl_ring;
56920 	/*
56921 	 * The sequence ID is used by the driver for tracking multiple
56922 	 * commands. This ID is treated as opaque data by the firmware and
56923 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56924 	 */
56925 	uint16_t	seq_id;
56926 	/*
56927 	 * The target ID of the command:
56928 	 * * 0x0-0xFFF8 - The function ID
56929 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56930 	 * * 0xFFFD - Reserved for user-space HWRM interface
56931 	 * * 0xFFFF - HWRM
56932 	 */
56933 	uint16_t	target_id;
56934 	/*
56935 	 * A physical address pointer pointing to a host buffer that the
56936 	 * command's response data will be written. This can be either a host
56937 	 * physical address (HPA) or a guest physical address (GPA) and must
56938 	 * point to a physically contiguous block of memory.
56939 	 */
56940 	uint64_t	resp_addr;
56941 	/*
56942 	 * Function ID.
56943 	 * If running on a trusted VF or PF, the fid field can be used to
56944 	 * specify that the function is a non-trusted VF of the parent PF.
56945 	 * If this command is used for the target_id itself, this field is
56946 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
56947 	 * field.
56948 	 */
56949 	uint16_t	fid;
56950 	/*
56951 	 * Unique session id for the session created by the
56952 	 * firmware. Will be used to track this index table entry
56953 	 * only if track type is track_type_sid.
56954 	 */
56955 	uint16_t	sid;
56956 	/* Control flags. */
56957 	uint8_t	flags;
56958 	/* Indicates the flow direction. */
56959 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
56960 	/* If this bit set to 0, then it indicates rx flow. */
56961 		#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
56962 	/* If this bit is set to 1, then it indicates tx flow. */
56963 		#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
56964 		#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_LAST HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_TX
56965 	/*
56966 	 * Indicate device data is being sent via DMA, the device
56967 	 * data packing does not change.
56968 	 */
56969 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
56970 	/*
56971 	 * This field is blktype specific.
56972 	 * For blktype CFA - CFA resource subtype. For definitions,
56973 	 * please see cfa_v3/include/cfa_resources.h.
56974 	 * For blktype rxp, re_gparse, te_gparse -
56975 	 * Tunnel Type. A value of zero (or unknown) means alloc. A known
56976 	 * value (previously allocated dynamic UPAR for tunnel_type) means
56977 	 * realloc. Will fail if a realloc is for previously allocated FID,
56978 	 */
56979 	uint8_t	subtype;
56980 	/* Describes the type of tracking id to be used */
56981 	uint8_t	track_type;
56982 	/* Invalid track type */
56983 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID UINT32_C(0x0)
56984 	/* Tracked by session id */
56985 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_SID	UINT32_C(0x1)
56986 	/* Tracked by function id */
56987 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID	UINT32_C(0x2)
56988 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_LAST		HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID
56989 	/* Specifies which block this idx table alloc request is for */
56990 	uint8_t	blktype;
56991 	/* CFA block type */
56992 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
56993 	/* RXP gparse block type */
56994 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
56995 	/* RE gparse block type */
56996 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
56997 	/* TE gparse block type */
56998 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
56999 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_LAST		HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57000 	/* The size of the index table entry in bytes. */
57001 	uint16_t	data_size;
57002 	/* Reserved */
57003 	uint8_t	unused1[6];
57004 	/* The location of the dma buffer */
57005 	uint64_t	dma_addr;
57006 	/*
57007 	 * Index table data located at offset 0. If dma bit is set,
57008 	 * then this field contains the DMA buffer pointer.
57009 	 */
57010 	uint8_t	dev_data[96];
57011 } hwrm_tfc_idx_tbl_alloc_set_input_t, *phwrm_tfc_idx_tbl_alloc_set_input_t;
57012 
57013 /* hwrm_tfc_idx_tbl_alloc_set_output (size:128b/16B) */
57014 
57015 typedef struct hwrm_tfc_idx_tbl_alloc_set_output {
57016 	/* The specific error status for the command. */
57017 	uint16_t	error_code;
57018 	/* The HWRM command request type. */
57019 	uint16_t	req_type;
57020 	/* The sequence ID from the original command. */
57021 	uint16_t	seq_id;
57022 	/* The length of the response data in number of bytes. */
57023 	uint16_t	resp_len;
57024 	/*
57025 	 * Index table entry allocated by the firmware using the
57026 	 * parameters above.
57027 	 */
57028 	uint16_t	idx_tbl_id;
57029 	/* Reserved */
57030 	uint8_t	unused0[5];
57031 	/*
57032 	 * This field is used in Output records to indicate that the output
57033 	 * is completely written to RAM. This field should be read as '1'
57034 	 * to indicate that the output has been completely written.
57035 	 * When writing a command completion or response to an internal
57036 	 * processor, the order of writes has to be such that this field
57037 	 * is written last.
57038 	 */
57039 	uint8_t	valid;
57040 } hwrm_tfc_idx_tbl_alloc_set_output_t, *phwrm_tfc_idx_tbl_alloc_set_output_t;
57041 
57042 /************************
57043  * hwrm_tfc_idx_tbl_set *
57044  ************************/
57045 
57046 
57047 /* hwrm_tfc_idx_tbl_set_input (size:1088b/136B) */
57048 
57049 typedef struct hwrm_tfc_idx_tbl_set_input {
57050 	/* The HWRM command request type. */
57051 	uint16_t	req_type;
57052 	/*
57053 	 * The completion ring to send the completion event on. This should
57054 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57055 	 */
57056 	uint16_t	cmpl_ring;
57057 	/*
57058 	 * The sequence ID is used by the driver for tracking multiple
57059 	 * commands. This ID is treated as opaque data by the firmware and
57060 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57061 	 */
57062 	uint16_t	seq_id;
57063 	/*
57064 	 * The target ID of the command:
57065 	 * * 0x0-0xFFF8 - The function ID
57066 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57067 	 * * 0xFFFD - Reserved for user-space HWRM interface
57068 	 * * 0xFFFF - HWRM
57069 	 */
57070 	uint16_t	target_id;
57071 	/*
57072 	 * A physical address pointer pointing to a host buffer that the
57073 	 * command's response data will be written. This can be either a host
57074 	 * physical address (HPA) or a guest physical address (GPA) and must
57075 	 * point to a physically contiguous block of memory.
57076 	 */
57077 	uint64_t	resp_addr;
57078 	/* Control flags. */
57079 	uint8_t	flags;
57080 	/* Indicates the flow direction. */
57081 	#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
57082 	/* If this bit set to 0, then it indicates rx flow. */
57083 		#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
57084 	/* If this bit is set to 1, then it indicates tx flow. */
57085 		#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
57086 		#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_LAST HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_TX
57087 	/*
57088 	 * Indicate device data is being sent via DMA, the device
57089 	 * data packing does not change.
57090 	 */
57091 	#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
57092 	/*
57093 	 * CFA resource subtype. For definitions, please see
57094 	 * cfa_v3/include/cfa_resources.h.
57095 	 */
57096 	uint8_t	subtype;
57097 	/*
57098 	 * Function ID.
57099 	 * If running on a trusted VF or PF, the fid field can be used to
57100 	 * specify that the function is a non-trusted VF of the parent PF.
57101 	 * If this command is used for the target_id itself, this field is
57102 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57103 	 * field.
57104 	 */
57105 	uint16_t	fid;
57106 	/*
57107 	 * Session id associated with the firmware. Will be used
57108 	 * for validation if the track type matches.
57109 	 */
57110 	uint16_t	sid;
57111 	/*
57112 	 * Index table index returned during alloc by the
57113 	 * firmware.
57114 	 */
57115 	uint16_t	idx_tbl_id;
57116 	/* The size of the index table entry in bytes. */
57117 	uint16_t	data_size;
57118 	/* Specifies which block this idx table alloc request is for */
57119 	uint8_t	blktype;
57120 	/* CFA block type */
57121 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
57122 	/* RXP gparse block type */
57123 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
57124 	/* RE gparse block type */
57125 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
57126 	/* TE gparse block type */
57127 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
57128 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_LAST		HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57129 	/* unused. */
57130 	uint8_t	unused0[5];
57131 	/* The location of the dma buffer */
57132 	uint64_t	dma_addr;
57133 	/*
57134 	 * Index table data located at offset 0. If dma bit is set,
57135 	 * then this field contains the DMA buffer pointer.
57136 	 */
57137 	uint8_t	dev_data[96];
57138 } hwrm_tfc_idx_tbl_set_input_t, *phwrm_tfc_idx_tbl_set_input_t;
57139 
57140 /* hwrm_tfc_idx_tbl_set_output (size:128b/16B) */
57141 
57142 typedef struct hwrm_tfc_idx_tbl_set_output {
57143 	/* The specific error status for the command. */
57144 	uint16_t	error_code;
57145 	/* The HWRM command request type. */
57146 	uint16_t	req_type;
57147 	/* The sequence ID from the original command. */
57148 	uint16_t	seq_id;
57149 	/* The length of the response data in number of bytes. */
57150 	uint16_t	resp_len;
57151 	/* unused. */
57152 	uint8_t	unused0[7];
57153 	/*
57154 	 * This field is used in Output records to indicate that the output
57155 	 * is completely written to RAM. This field should be read as '1'
57156 	 * to indicate that the output has been completely written.
57157 	 * When writing a command completion or response to an internal
57158 	 * processor, the order of writes has to be such that this field
57159 	 * is written last.
57160 	 */
57161 	uint8_t	valid;
57162 } hwrm_tfc_idx_tbl_set_output_t, *phwrm_tfc_idx_tbl_set_output_t;
57163 
57164 /************************
57165  * hwrm_tfc_idx_tbl_get *
57166  ************************/
57167 
57168 
57169 /* hwrm_tfc_idx_tbl_get_input (size:320b/40B) */
57170 
57171 typedef struct hwrm_tfc_idx_tbl_get_input {
57172 	/* The HWRM command request type. */
57173 	uint16_t	req_type;
57174 	/*
57175 	 * The completion ring to send the completion event on. This should
57176 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57177 	 */
57178 	uint16_t	cmpl_ring;
57179 	/*
57180 	 * The sequence ID is used by the driver for tracking multiple
57181 	 * commands. This ID is treated as opaque data by the firmware and
57182 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57183 	 */
57184 	uint16_t	seq_id;
57185 	/*
57186 	 * The target ID of the command:
57187 	 * * 0x0-0xFFF8 - The function ID
57188 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57189 	 * * 0xFFFD - Reserved for user-space HWRM interface
57190 	 * * 0xFFFF - HWRM
57191 	 */
57192 	uint16_t	target_id;
57193 	/*
57194 	 * A physical address pointer pointing to a host buffer that the
57195 	 * command's response data will be written. This can be either a host
57196 	 * physical address (HPA) or a guest physical address (GPA) and must
57197 	 * point to a physically contiguous block of memory.
57198 	 */
57199 	uint64_t	resp_addr;
57200 	/* Control flags. */
57201 	uint8_t	flags;
57202 	/* Indicates the flow direction. */
57203 	#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR		UINT32_C(0x1)
57204 	/* If this bit set to 0, then it indicates rx flow. */
57205 		#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_RX		UINT32_C(0x0)
57206 	/* If this bit is set to 1, then it indicates tx flow. */
57207 		#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_TX		UINT32_C(0x1)
57208 		#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_LAST	HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_TX
57209 	/*
57210 	 * When set use the special access register access to clear
57211 	 * the table entry on read.
57212 	 */
57213 	#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_CLEAR_ON_READ	UINT32_C(0x2)
57214 	/*
57215 	 * CFA resource subtype. For definitions, please see
57216 	 * cfa_v3/include/cfa_resources.h.
57217 	 */
57218 	uint8_t	subtype;
57219 	/*
57220 	 * Function ID.
57221 	 * If running on a trusted VF or PF, the fid field can be used to
57222 	 * specify that the function is a non-trusted VF of the parent PF.
57223 	 * If this command is used for the target_id itself, this field is
57224 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57225 	 * field.
57226 	 */
57227 	uint16_t	fid;
57228 	/*
57229 	 * Session id associated with the firmware. Will be used
57230 	 * for validation if the track type matches.
57231 	 */
57232 	uint16_t	sid;
57233 	/*
57234 	 * Index table index returned during alloc by the
57235 	 * firmware.
57236 	 */
57237 	uint16_t	idx_tbl_id;
57238 	/* The size of the index table entry buffer in bytes. */
57239 	uint16_t	buffer_size;
57240 	/* Specifies which block this idx table alloc request is for */
57241 	uint8_t	blktype;
57242 	/* CFA block type */
57243 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
57244 	/* RXP block type */
57245 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
57246 	/* RE gparse block type */
57247 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
57248 	/* TE gparse block type */
57249 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
57250 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_LAST		HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57251 	/* unused. */
57252 	uint8_t	unused0[5];
57253 	/* The location of the response dma buffer */
57254 	uint64_t	dma_addr;
57255 } hwrm_tfc_idx_tbl_get_input_t, *phwrm_tfc_idx_tbl_get_input_t;
57256 
57257 /* hwrm_tfc_idx_tbl_get_output (size:128b/16B) */
57258 
57259 typedef struct hwrm_tfc_idx_tbl_get_output {
57260 	/* The specific error status for the command. */
57261 	uint16_t	error_code;
57262 	/* The HWRM command request type. */
57263 	uint16_t	req_type;
57264 	/* The sequence ID from the original command. */
57265 	uint16_t	seq_id;
57266 	/* The length of the response data in number of bytes. */
57267 	uint16_t	resp_len;
57268 	/* The size of the index table buffer returned in device size bytes. */
57269 	uint16_t	data_size;
57270 	/* unused */
57271 	uint8_t	unused1[5];
57272 	/*
57273 	 * This field is used in Output records to indicate that the output
57274 	 * is completely written to RAM. This field should be read as '1'
57275 	 * to indicate that the output has been completely written.
57276 	 * When writing a command completion or response to an internal
57277 	 * processor, the order of writes has to be such that this field
57278 	 * is written last.
57279 	 */
57280 	uint8_t	valid;
57281 } hwrm_tfc_idx_tbl_get_output_t, *phwrm_tfc_idx_tbl_get_output_t;
57282 
57283 /*************************
57284  * hwrm_tfc_idx_tbl_free *
57285  *************************/
57286 
57287 
57288 /* hwrm_tfc_idx_tbl_free_input (size:256b/32B) */
57289 
57290 typedef struct hwrm_tfc_idx_tbl_free_input {
57291 	/* The HWRM command request type. */
57292 	uint16_t	req_type;
57293 	/*
57294 	 * The completion ring to send the completion event on. This should
57295 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57296 	 */
57297 	uint16_t	cmpl_ring;
57298 	/*
57299 	 * The sequence ID is used by the driver for tracking multiple
57300 	 * commands. This ID is treated as opaque data by the firmware and
57301 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57302 	 */
57303 	uint16_t	seq_id;
57304 	/*
57305 	 * The target ID of the command:
57306 	 * * 0x0-0xFFF8 - The function ID
57307 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57308 	 * * 0xFFFD - Reserved for user-space HWRM interface
57309 	 * * 0xFFFF - HWRM
57310 	 */
57311 	uint16_t	target_id;
57312 	/*
57313 	 * A physical address pointer pointing to a host buffer that the
57314 	 * command's response data will be written. This can be either a host
57315 	 * physical address (HPA) or a guest physical address (GPA) and must
57316 	 * point to a physically contiguous block of memory.
57317 	 */
57318 	uint64_t	resp_addr;
57319 	/* Control flags. */
57320 	uint8_t	flags;
57321 	/* Indicates the flow direction. */
57322 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR	UINT32_C(0x1)
57323 	/* If this bit set to 0, then it indicates rx flow. */
57324 		#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
57325 	/* If this bit is set to 1, then it indicates tx flow. */
57326 		#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
57327 		#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_LAST HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_TX
57328 	/*
57329 	 * CFA resource subtype. For definitions, please see
57330 	 * cfa_v3/include/cfa_resources.h.
57331 	 */
57332 	uint8_t	subtype;
57333 	/*
57334 	 * Function ID.
57335 	 * If running on a trusted VF or PF, the fid field can be used to
57336 	 * specify that the function is a non-trusted VF of the parent PF.
57337 	 * If this command is used for the target_id itself, this field is
57338 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57339 	 * field.
57340 	 */
57341 	uint16_t	fid;
57342 	/*
57343 	 * Session id associated with the firmware. Will be used
57344 	 * for validation if the track type matches.
57345 	 */
57346 	uint16_t	sid;
57347 	/* Index table id to be freed by the firmware. */
57348 	uint16_t	idx_tbl_id;
57349 	/* Specifies which block this idx table alloc request is for */
57350 	uint8_t	blktype;
57351 	/* CFA block type */
57352 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_CFA	UINT32_C(0x0)
57353 	/* RXP block type */
57354 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_RXP	UINT32_C(0x1)
57355 	/* RE parse block type */
57356 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE UINT32_C(0x2)
57357 	/* TE parse block type */
57358 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE UINT32_C(0x3)
57359 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_LAST		HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57360 	/* unused. */
57361 	uint8_t	unused0[7];
57362 } hwrm_tfc_idx_tbl_free_input_t, *phwrm_tfc_idx_tbl_free_input_t;
57363 
57364 /* hwrm_tfc_idx_tbl_free_output (size:128b/16B) */
57365 
57366 typedef struct hwrm_tfc_idx_tbl_free_output {
57367 	/* The specific error status for the command. */
57368 	uint16_t	error_code;
57369 	/* The HWRM command request type. */
57370 	uint16_t	req_type;
57371 	/* The sequence ID from the original command. */
57372 	uint16_t	seq_id;
57373 	/* The length of the response data in number of bytes. */
57374 	uint16_t	resp_len;
57375 	/* Reserved */
57376 	uint8_t	unused0[7];
57377 	/*
57378 	 * This field is used in Output records to indicate that the output
57379 	 * is completely written to RAM. This field should be read as '1'
57380 	 * to indicate that the output has been completely written.
57381 	 * When writing a command completion or response to an internal
57382 	 * processor, the order of writes has to be such that this field
57383 	 * is written last.
57384 	 */
57385 	uint8_t	valid;
57386 } hwrm_tfc_idx_tbl_free_output_t, *phwrm_tfc_idx_tbl_free_output_t;
57387 
57388 /* TruFlow resources request for a global id. */
57389 /* tfc_global_id_hwrm_req (size:64b/8B) */
57390 
57391 typedef struct tfc_global_id_hwrm_req {
57392 	/* Type of the resource, defined in enum cfa_resource_type HCAPI RM. */
57393 	uint16_t	rtype;
57394 	/* Indicates the flow direction in type of cfa_dir. */
57395 	uint16_t	dir;
57396 	/* Subtype of the resource type. */
57397 	uint16_t	subtype;
57398 	/* Number of the type of resources. */
57399 	uint16_t	cnt;
57400 } tfc_global_id_hwrm_req_t, *ptfc_global_id_hwrm_req_t;
57401 
57402 /* The reserved resources for the global id. */
57403 /* tfc_global_id_hwrm_rsp (size:64b/8B) */
57404 
57405 typedef struct tfc_global_id_hwrm_rsp {
57406 	/* Type of the resource, defined in enum cfa_resource_type HCAPI RM. */
57407 	uint16_t	rtype;
57408 	/* Indicates the flow direction in type of cfa_dir. */
57409 	uint16_t	dir;
57410 	/* Subtype of the resource type. */
57411 	uint16_t	subtype;
57412 	/* The global id that the resources reserved for. */
57413 	uint16_t	id;
57414 } tfc_global_id_hwrm_rsp_t, *ptfc_global_id_hwrm_rsp_t;
57415 
57416 /****************************
57417  * hwrm_tfc_global_id_alloc *
57418  ****************************/
57419 
57420 
57421 /* hwrm_tfc_global_id_alloc_input (size:320b/40B) */
57422 
57423 typedef struct hwrm_tfc_global_id_alloc_input {
57424 	/* The HWRM command request type. */
57425 	uint16_t	req_type;
57426 	/*
57427 	 * The completion ring to send the completion event on. This should
57428 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57429 	 */
57430 	uint16_t	cmpl_ring;
57431 	/*
57432 	 * The sequence ID is used by the driver for tracking multiple
57433 	 * commands. This ID is treated as opaque data by the firmware and
57434 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57435 	 */
57436 	uint16_t	seq_id;
57437 	/*
57438 	 * The target ID of the command:
57439 	 * * 0x0-0xFFF8 - The function ID
57440 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57441 	 * * 0xFFFD - Reserved for user-space HWRM interface
57442 	 * * 0xFFFF - HWRM
57443 	 */
57444 	uint16_t	target_id;
57445 	/*
57446 	 * A physical address pointer pointing to a host buffer that the
57447 	 * command's response data will be written. This can be either a host
57448 	 * physical address (HPA) or a guest physical address (GPA) and must
57449 	 * point to a physically contiguous block of memory.
57450 	 */
57451 	uint64_t	resp_addr;
57452 	/*
57453 	 * Function ID.
57454 	 * If running on a trusted VF or PF, the fid field can be used to
57455 	 * specify that the function is a non-trusted VF of the parent PF.
57456 	 * If this command is used for the target_id itself, this field is
57457 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57458 	 * field.
57459 	 */
57460 	uint16_t	fid;
57461 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57462 	uint16_t	sid;
57463 	/* Global domain id. */
57464 	uint16_t	global_id;
57465 	/*
57466 	 * Defines the array size of the provided req_addr and
57467 	 * resv_addr array buffers. Should be set to the number of
57468 	 * request entries.
57469 	 */
57470 	uint16_t	req_cnt;
57471 	/*
57472 	 * This is the DMA address for the request input data array
57473 	 * buffer. Array is of tfc_global_id_hwrm_req type. Size of the
57474 	 * array buffer is provided by the 'req_cnt' field in this
57475 	 * message.
57476 	 */
57477 	uint64_t	req_addr;
57478 	/*
57479 	 * This is the DMA address for the resc output data array
57480 	 * buffer. Array is of tfc_global_id_hwrm_rsp type. Size of the array
57481 	 * buffer is provided by the 'req_cnt' field in this
57482 	 * message.
57483 	 */
57484 	uint64_t	resc_addr;
57485 } hwrm_tfc_global_id_alloc_input_t, *phwrm_tfc_global_id_alloc_input_t;
57486 
57487 /* hwrm_tfc_global_id_alloc_output (size:128b/16B) */
57488 
57489 typedef struct hwrm_tfc_global_id_alloc_output {
57490 	/* The specific error status for the command. */
57491 	uint16_t	error_code;
57492 	/* The HWRM command request type. */
57493 	uint16_t	req_type;
57494 	/* The sequence ID from the original command. */
57495 	uint16_t	seq_id;
57496 	/* The length of the response data in number of bytes. */
57497 	uint16_t	resp_len;
57498 	/*
57499 	 * Size of the returned hwrm_tfc_global_id_req data array. The value
57500 	 * cannot exceed the req_cnt defined by the input msg. The data
57501 	 * array is returned using the resv_addr specified DMA
57502 	 * address also provided by the input msg.
57503 	 */
57504 	uint16_t	rsp_cnt;
57505 	/* Non-zero if this is the first allocation for the global ID. */
57506 	uint8_t	first;
57507 	/* unused. */
57508 	uint8_t	unused0[4];
57509 	/*
57510 	 * This field is used in Output records to indicate that the output
57511 	 * is completely written to RAM. This field should be read as '1'
57512 	 * to indicate that the output has been completely written.
57513 	 * When writing a command completion or response to an internal
57514 	 * processor, the order of writes has to be such that this field
57515 	 * is written last.
57516 	 */
57517 	uint8_t	valid;
57518 } hwrm_tfc_global_id_alloc_output_t, *phwrm_tfc_global_id_alloc_output_t;
57519 
57520 /*********************
57521  * hwrm_tfc_tcam_set *
57522  *********************/
57523 
57524 
57525 /* hwrm_tfc_tcam_set_input (size:1088b/136B) */
57526 
57527 typedef struct hwrm_tfc_tcam_set_input {
57528 	/* The HWRM command request type. */
57529 	uint16_t	req_type;
57530 	/*
57531 	 * The completion ring to send the completion event on. This should
57532 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57533 	 */
57534 	uint16_t	cmpl_ring;
57535 	/*
57536 	 * The sequence ID is used by the driver for tracking multiple
57537 	 * commands. This ID is treated as opaque data by the firmware and
57538 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57539 	 */
57540 	uint16_t	seq_id;
57541 	/*
57542 	 * The target ID of the command:
57543 	 * * 0x0-0xFFF8 - The function ID
57544 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57545 	 * * 0xFFFD - Reserved for user-space HWRM interface
57546 	 * * 0xFFFF - HWRM
57547 	 */
57548 	uint16_t	target_id;
57549 	/*
57550 	 * A physical address pointer pointing to a host buffer that the
57551 	 * command's response data will be written. This can be either a host
57552 	 * physical address (HPA) or a guest physical address (GPA) and must
57553 	 * point to a physically contiguous block of memory.
57554 	 */
57555 	uint64_t	resp_addr;
57556 	/*
57557 	 * Function ID.
57558 	 * If running on a trusted VF or PF, the fid field can be used to
57559 	 * specify that the function is a non-trusted VF of the parent PF.
57560 	 * If this command is used for the target_id itself, this field is
57561 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57562 	 * field.
57563 	 */
57564 	uint16_t	fid;
57565 	/*
57566 	 * Session id associated with the firmware. Will be used
57567 	 * for validation if the track type matches.
57568 	 */
57569 	uint16_t	sid;
57570 	/* Logical TCAM ID. */
57571 	uint16_t	tcam_id;
57572 	/* Number of bytes in the TCAM key. */
57573 	uint16_t	key_size;
57574 	/* Number of bytes in the TCAM result. */
57575 	uint16_t	result_size;
57576 	/* Control flags. */
57577 	uint8_t	flags;
57578 	/* Indicates the flow direction. */
57579 	#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
57580 	/* If this bit set to 0, then it indicates rx flow. */
57581 		#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
57582 	/* If this bit is set to 1, then it indicates tx flow. */
57583 		#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
57584 		#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_LAST HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_TX
57585 	/* Indicate device data is being sent via DMA. */
57586 	#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
57587 	/*
57588 	 * Subtype of TCAM resource. See
57589 	 * cfa_v3/include/cfa_resources.h.
57590 	 */
57591 	uint8_t	subtype;
57592 	/* unused. */
57593 	uint8_t	unused0[4];
57594 	/* The location of the response dma buffer */
57595 	uint64_t	dma_addr;
57596 	/*
57597 	 * TCAM key located at offset 0, mask located at mask_offset
57598 	 * and result at result_offset for the device.
57599 	 */
57600 	uint8_t	dev_data[96];
57601 } hwrm_tfc_tcam_set_input_t, *phwrm_tfc_tcam_set_input_t;
57602 
57603 /* hwrm_tfc_tcam_set_output (size:128b/16B) */
57604 
57605 typedef struct hwrm_tfc_tcam_set_output {
57606 	/* The specific error status for the command. */
57607 	uint16_t	error_code;
57608 	/* The HWRM command request type. */
57609 	uint16_t	req_type;
57610 	/* The sequence ID from the original command. */
57611 	uint16_t	seq_id;
57612 	/* The length of the response data in number of bytes. */
57613 	uint16_t	resp_len;
57614 	/* unused. */
57615 	uint8_t	unused0[7];
57616 	/*
57617 	 * This field is used in Output records to indicate that the
57618 	 * output is completely written to RAM. This field should be
57619 	 * read as '1' to indicate that the output has been
57620 	 * completely written. When writing a command completion or
57621 	 * response to an internal processor, the order of writes has
57622 	 * to be such that this field is written last.
57623 	 */
57624 	uint8_t	valid;
57625 } hwrm_tfc_tcam_set_output_t, *phwrm_tfc_tcam_set_output_t;
57626 
57627 /*********************
57628  * hwrm_tfc_tcam_get *
57629  *********************/
57630 
57631 
57632 /* hwrm_tfc_tcam_get_input (size:192b/24B) */
57633 
57634 typedef struct hwrm_tfc_tcam_get_input {
57635 	/* The HWRM command request type. */
57636 	uint16_t	req_type;
57637 	/*
57638 	 * The completion ring to send the completion event on. This should
57639 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57640 	 */
57641 	uint16_t	cmpl_ring;
57642 	/*
57643 	 * The sequence ID is used by the driver for tracking multiple
57644 	 * commands. This ID is treated as opaque data by the firmware and
57645 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57646 	 */
57647 	uint16_t	seq_id;
57648 	/*
57649 	 * The target ID of the command:
57650 	 * * 0x0-0xFFF8 - The function ID
57651 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57652 	 * * 0xFFFD - Reserved for user-space HWRM interface
57653 	 * * 0xFFFF - HWRM
57654 	 */
57655 	uint16_t	target_id;
57656 	/*
57657 	 * A physical address pointer pointing to a host buffer that the
57658 	 * command's response data will be written. This can be either a host
57659 	 * physical address (HPA) or a guest physical address (GPA) and must
57660 	 * point to a physically contiguous block of memory.
57661 	 */
57662 	uint64_t	resp_addr;
57663 	/* Control flags. */
57664 	uint8_t	flags;
57665 	/* Indicates the flow direction. */
57666 	#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR	UINT32_C(0x1)
57667 	/* If this bit set to 0, then it indicates rx flow. */
57668 		#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
57669 	/* If this bit is set to 1, then it indicates tx flow. */
57670 		#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
57671 		#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_LAST HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_TX
57672 	/*
57673 	 * Subtype of TCAM resource See
57674 	 * cfa_v3/include/cfa_resources.h.
57675 	 */
57676 	uint8_t	subtype;
57677 	/*
57678 	 * Function ID.
57679 	 * If running on a trusted VF or PF, the fid field can be used to
57680 	 * specify that the function is a non-trusted VF of the parent PF.
57681 	 * If this command is used for the target_id itself, this field is
57682 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57683 	 * field.
57684 	 */
57685 	uint16_t	fid;
57686 	/*
57687 	 * Session id associated with the firmware. Will be used
57688 	 * for validation if the track type matches.
57689 	 */
57690 	uint16_t	sid;
57691 	/* Logical TCAM ID. */
57692 	uint16_t	tcam_id;
57693 } hwrm_tfc_tcam_get_input_t, *phwrm_tfc_tcam_get_input_t;
57694 
57695 /* hwrm_tfc_tcam_get_output (size:2368b/296B) */
57696 
57697 typedef struct hwrm_tfc_tcam_get_output {
57698 	/* The specific error status for the command. */
57699 	uint16_t	error_code;
57700 	/* The HWRM command request type. */
57701 	uint16_t	req_type;
57702 	/* The sequence ID from the original command. */
57703 	uint16_t	seq_id;
57704 	/* The length of the response data in number of bytes. */
57705 	uint16_t	resp_len;
57706 	/* Number of bytes in the TCAM key. */
57707 	uint16_t	key_size;
57708 	/* Number of bytes in the TCAM result. */
57709 	uint16_t	result_size;
57710 	/* unused. */
57711 	uint8_t	unused0[4];
57712 	/*
57713 	 * TCAM key located at offset 0, mask located at key_size
57714 	 * and result at 2 * key_size for the device.
57715 	 */
57716 	uint8_t	dev_data[272];
57717 	/* unused. */
57718 	uint8_t	unused1[7];
57719 	/*
57720 	 * This field is used in Output records to indicate that the
57721 	 * output is completely written to RAM. This field should be
57722 	 * read as '1' to indicate that the output has been
57723 	 * completely written. When writing a command completion or
57724 	 * response to an internal processor, the order of writes has
57725 	 * to be such that this field is written last.
57726 	 */
57727 	uint8_t	valid;
57728 } hwrm_tfc_tcam_get_output_t, *phwrm_tfc_tcam_get_output_t;
57729 
57730 /***********************
57731  * hwrm_tfc_tcam_alloc *
57732  ***********************/
57733 
57734 
57735 /* hwrm_tfc_tcam_alloc_input (size:256b/32B) */
57736 
57737 typedef struct hwrm_tfc_tcam_alloc_input {
57738 	/* The HWRM command request type. */
57739 	uint16_t	req_type;
57740 	/*
57741 	 * The completion ring to send the completion event on. This should
57742 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57743 	 */
57744 	uint16_t	cmpl_ring;
57745 	/*
57746 	 * The sequence ID is used by the driver for tracking multiple
57747 	 * commands. This ID is treated as opaque data by the firmware and
57748 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57749 	 */
57750 	uint16_t	seq_id;
57751 	/*
57752 	 * The target ID of the command:
57753 	 * * 0x0-0xFFF8 - The function ID
57754 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57755 	 * * 0xFFFD - Reserved for user-space HWRM interface
57756 	 * * 0xFFFF - HWRM
57757 	 */
57758 	uint16_t	target_id;
57759 	/*
57760 	 * A physical address pointer pointing to a host buffer that the
57761 	 * command's response data will be written. This can be either a host
57762 	 * physical address (HPA) or a guest physical address (GPA) and must
57763 	 * point to a physically contiguous block of memory.
57764 	 */
57765 	uint64_t	resp_addr;
57766 	/* Control flags. */
57767 	uint8_t	flags;
57768 	/* Indicates the flow direction. */
57769 	#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR	UINT32_C(0x1)
57770 	/* If this bit set to 0, then it indicates rx flow. */
57771 		#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
57772 	/* If this bit is set to 1, then it indicates tx flow. */
57773 		#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
57774 		#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_LAST HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_TX
57775 	/*
57776 	 * Subtype of TCAM resource. See
57777 	 * cfa_v3/include/cfa_resources.h.
57778 	 */
57779 	uint8_t	subtype;
57780 	/*
57781 	 * Function ID.
57782 	 * If running on a trusted VF or PF, the fid field can be used to
57783 	 * specify that the function is a non-trusted VF of the parent PF.
57784 	 * If this command is used for the target_id itself, this field is
57785 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57786 	 * field.
57787 	 */
57788 	uint16_t	fid;
57789 	/*
57790 	 * Unique session id for the session created by the
57791 	 * firmware. Will be used to track this index table entry
57792 	 * only if track type is track_type_sid.
57793 	 */
57794 	uint16_t	sid;
57795 	/* Number of bytes in the TCAM key. */
57796 	uint16_t	key_size;
57797 	/* Entry priority. */
57798 	uint16_t	priority;
57799 	/* Describes the type of tracking id to be used */
57800 	uint8_t	track_type;
57801 	/* Invalid track type */
57802 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID UINT32_C(0x0)
57803 	/* Tracked by session id */
57804 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_SID	UINT32_C(0x1)
57805 	/* Tracked by function id */
57806 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID	UINT32_C(0x2)
57807 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_LAST		HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID
57808 	/* Unused. */
57809 	uint8_t	unused0[5];
57810 } hwrm_tfc_tcam_alloc_input_t, *phwrm_tfc_tcam_alloc_input_t;
57811 
57812 /* hwrm_tfc_tcam_alloc_output (size:128b/16B) */
57813 
57814 typedef struct hwrm_tfc_tcam_alloc_output {
57815 	/* The specific error status for the command. */
57816 	uint16_t	error_code;
57817 	/* The HWRM command request type. */
57818 	uint16_t	req_type;
57819 	/* The sequence ID from the original command. */
57820 	uint16_t	seq_id;
57821 	/* The length of the response data in number of bytes. */
57822 	uint16_t	resp_len;
57823 	/*
57824 	 * Index table entry allocated by the firmware using the
57825 	 * parameters above.
57826 	 */
57827 	uint16_t	idx;
57828 	/* Reserved */
57829 	uint8_t	unused0[5];
57830 	/*
57831 	 * This field is used in Output records to indicate that the output
57832 	 * is completely written to RAM. This field should be read as '1'
57833 	 * to indicate that the output has been completely written.
57834 	 * When writing a command completion or response to an internal
57835 	 * processor, the order of writes has to be such that this field
57836 	 * is written last.
57837 	 */
57838 	uint8_t	valid;
57839 } hwrm_tfc_tcam_alloc_output_t, *phwrm_tfc_tcam_alloc_output_t;
57840 
57841 /***************************
57842  * hwrm_tfc_tcam_alloc_set *
57843  ***************************/
57844 
57845 
57846 /* hwrm_tfc_tcam_alloc_set_input (size:1088b/136B) */
57847 
57848 typedef struct hwrm_tfc_tcam_alloc_set_input {
57849 	/* The HWRM command request type. */
57850 	uint16_t	req_type;
57851 	/*
57852 	 * The completion ring to send the completion event on. This should
57853 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57854 	 */
57855 	uint16_t	cmpl_ring;
57856 	/*
57857 	 * The sequence ID is used by the driver for tracking multiple
57858 	 * commands. This ID is treated as opaque data by the firmware and
57859 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57860 	 */
57861 	uint16_t	seq_id;
57862 	/*
57863 	 * The target ID of the command:
57864 	 * * 0x0-0xFFF8 - The function ID
57865 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57866 	 * * 0xFFFD - Reserved for user-space HWRM interface
57867 	 * * 0xFFFF - HWRM
57868 	 */
57869 	uint16_t	target_id;
57870 	/*
57871 	 * A physical address pointer pointing to a host buffer that the
57872 	 * command's response data will be written. This can be either a host
57873 	 * physical address (HPA) or a guest physical address (GPA) and must
57874 	 * point to a physically contiguous block of memory.
57875 	 */
57876 	uint64_t	resp_addr;
57877 	/* Control flags. */
57878 	uint8_t	flags;
57879 	/* Indicates the flow direction. */
57880 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
57881 	/* If this bit set to 0, then it indicates rx flow. */
57882 		#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
57883 	/* If this bit is set to 1, then it indicates tx flow. */
57884 		#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
57885 		#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_LAST HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_TX
57886 	/* Indicate device data is being sent via DMA. */
57887 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DMA	UINT32_C(0x2)
57888 	/*
57889 	 * Subtype of TCAM resource. See
57890 	 * cfa_v3/include/cfa_resources.h.
57891 	 */
57892 	uint8_t	subtype;
57893 	/*
57894 	 * Function ID.
57895 	 * If running on a trusted VF or PF, the fid field can be used to
57896 	 * specify that the function is a non-trusted VF of the parent PF.
57897 	 * If this command is used for the target_id itself, this field is
57898 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
57899 	 * field.
57900 	 */
57901 	uint16_t	fid;
57902 	/*
57903 	 * Unique session id for the session created by the
57904 	 * firmware. Will be used to track this index table entry
57905 	 * only if track type is track_type_sid.
57906 	 */
57907 	uint16_t	sid;
57908 	/* Number of bytes in the TCAM key. */
57909 	uint16_t	key_size;
57910 	/* The size of the TCAM table entry in bytes. */
57911 	uint16_t	result_size;
57912 	/* Entry priority. */
57913 	uint16_t	priority;
57914 	/* Describes the type of tracking id to be used */
57915 	uint8_t	track_type;
57916 	/* Invalid track type */
57917 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID UINT32_C(0x0)
57918 	/* Tracked by session id */
57919 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_SID	UINT32_C(0x1)
57920 	/* Tracked by function id */
57921 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID	UINT32_C(0x2)
57922 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_LAST		HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID
57923 	/* Unused */
57924 	uint8_t	unused[3];
57925 	/* The location of the response dma buffer */
57926 	uint64_t	dma_addr;
57927 	/*
57928 	 * Index table data located at offset 0. If dma bit is set,
57929 	 * then this field contains the DMA buffer pointer.
57930 	 */
57931 	uint8_t	dev_data[96];
57932 } hwrm_tfc_tcam_alloc_set_input_t, *phwrm_tfc_tcam_alloc_set_input_t;
57933 
57934 /* hwrm_tfc_tcam_alloc_set_output (size:128b/16B) */
57935 
57936 typedef struct hwrm_tfc_tcam_alloc_set_output {
57937 	/* The specific error status for the command. */
57938 	uint16_t	error_code;
57939 	/* The HWRM command request type. */
57940 	uint16_t	req_type;
57941 	/* The sequence ID from the original command. */
57942 	uint16_t	seq_id;
57943 	/* The length of the response data in number of bytes. */
57944 	uint16_t	resp_len;
57945 	/* Logical TCAM ID. */
57946 	uint16_t	tcam_id;
57947 	/* Reserved */
57948 	uint8_t	unused0[5];
57949 	/*
57950 	 * This field is used in Output records to indicate that the output
57951 	 * is completely written to RAM. This field should be read as '1'
57952 	 * to indicate that the output has been completely written.
57953 	 * When writing a command completion or response to an internal
57954 	 * processor, the order of writes has to be such that this field
57955 	 * is written last.
57956 	 */
57957 	uint8_t	valid;
57958 } hwrm_tfc_tcam_alloc_set_output_t, *phwrm_tfc_tcam_alloc_set_output_t;
57959 
57960 /**********************
57961  * hwrm_tfc_tcam_free *
57962  **********************/
57963 
57964 
57965 /* hwrm_tfc_tcam_free_input (size:192b/24B) */
57966 
57967 typedef struct hwrm_tfc_tcam_free_input {
57968 	/* The HWRM command request type. */
57969 	uint16_t	req_type;
57970 	/*
57971 	 * The completion ring to send the completion event on. This should
57972 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57973 	 */
57974 	uint16_t	cmpl_ring;
57975 	/*
57976 	 * The sequence ID is used by the driver for tracking multiple
57977 	 * commands. This ID is treated as opaque data by the firmware and
57978 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57979 	 */
57980 	uint16_t	seq_id;
57981 	/*
57982 	 * The target ID of the command:
57983 	 * * 0x0-0xFFF8 - The function ID
57984 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57985 	 * * 0xFFFD - Reserved for user-space HWRM interface
57986 	 * * 0xFFFF - HWRM
57987 	 */
57988 	uint16_t	target_id;
57989 	/*
57990 	 * A physical address pointer pointing to a host buffer that the
57991 	 * command's response data will be written. This can be either a host
57992 	 * physical address (HPA) or a guest physical address (GPA) and must
57993 	 * point to a physically contiguous block of memory.
57994 	 */
57995 	uint64_t	resp_addr;
57996 	/* Control flags. */
57997 	uint8_t	flags;
57998 	/* Indicates the flow direction. */
57999 	#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR	UINT32_C(0x1)
58000 	/* If this bit set to 0, then it indicates rx flow. */
58001 		#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
58002 	/* If this bit is set to 1, then it indicates tx flow. */
58003 		#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
58004 		#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_LAST HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_TX
58005 	/*
58006 	 * Subtype of TCAM resource. See
58007 	 * cfa_v3/include/cfa_resources.h.
58008 	 */
58009 	uint8_t	subtype;
58010 	/*
58011 	 * Function ID.
58012 	 * If running on a trusted VF or PF, the fid field can be used to
58013 	 * specify that the function is a non-trusted VF of the parent PF.
58014 	 * If this command is used for the target_id itself, this field is
58015 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
58016 	 * field.
58017 	 */
58018 	uint16_t	fid;
58019 	/*
58020 	 * Session id associated with the firmware. Will be used
58021 	 * for validation if the track type matches.
58022 	 */
58023 	uint16_t	sid;
58024 	/* Logical TCAM ID. */
58025 	uint16_t	tcam_id;
58026 } hwrm_tfc_tcam_free_input_t, *phwrm_tfc_tcam_free_input_t;
58027 
58028 /* hwrm_tfc_tcam_free_output (size:128b/16B) */
58029 
58030 typedef struct hwrm_tfc_tcam_free_output {
58031 	/* The specific error status for the command. */
58032 	uint16_t	error_code;
58033 	/* The HWRM command request type. */
58034 	uint16_t	req_type;
58035 	/* The sequence ID from the original command. */
58036 	uint16_t	seq_id;
58037 	/* The length of the response data in number of bytes. */
58038 	uint16_t	resp_len;
58039 	/* Reserved */
58040 	uint8_t	unused0[7];
58041 	/*
58042 	 * This field is used in Output records to indicate that the output
58043 	 * is completely written to RAM. This field should be read as '1'
58044 	 * to indicate that the output has been completely written.
58045 	 * When writing a command completion or response to an internal
58046 	 * processor, the order of writes has to be such that this field
58047 	 * is written last.
58048 	 */
58049 	uint8_t	valid;
58050 } hwrm_tfc_tcam_free_output_t, *phwrm_tfc_tcam_free_output_t;
58051 
58052 /***********************
58053  * hwrm_tfc_if_tbl_set *
58054  ***********************/
58055 
58056 
58057 /* hwrm_tfc_if_tbl_set_input (size:960b/120B) */
58058 
58059 typedef struct hwrm_tfc_if_tbl_set_input {
58060 	/* The HWRM command request type. */
58061 	uint16_t	req_type;
58062 	/*
58063 	 * The completion ring to send the completion event on. This should
58064 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58065 	 */
58066 	uint16_t	cmpl_ring;
58067 	/*
58068 	 * The sequence ID is used by the driver for tracking multiple
58069 	 * commands. This ID is treated as opaque data by the firmware and
58070 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58071 	 */
58072 	uint16_t	seq_id;
58073 	/*
58074 	 * The target ID of the command:
58075 	 * * 0x0-0xFFF8 - The function ID
58076 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58077 	 * * 0xFFFD - Reserved for user-space HWRM interface
58078 	 * * 0xFFFF - HWRM
58079 	 */
58080 	uint16_t	target_id;
58081 	/*
58082 	 * A physical address pointer pointing to a host buffer that the
58083 	 * command's response data will be written. This can be either a host
58084 	 * physical address (HPA) or a guest physical address (GPA) and must
58085 	 * point to a physically contiguous block of memory.
58086 	 */
58087 	uint64_t	resp_addr;
58088 	/* Session identifier. */
58089 	uint16_t	sid;
58090 	/* Function identifier. */
58091 	uint16_t	fid;
58092 	/*
58093 	 * Subtype identifying IF table type. See
58094 	 * cfa_v3/include/cfa_resources.h.
58095 	 */
58096 	uint8_t	subtype;
58097 	/* Control flags. */
58098 	uint8_t	flags;
58099 	/* Indicates the flow direction. */
58100 	#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR	UINT32_C(0x1)
58101 	/* If this bit set to 0, then it indicates rx flow. */
58102 		#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
58103 	/* If this bit is set to 1, then it indicates tx flow. */
58104 		#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
58105 		#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_LAST HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_TX
58106 	/* Table entry index. */
58107 	uint16_t	index;
58108 	/* Size of data in data field. */
58109 	uint8_t	data_size;
58110 	/* Reserved */
58111 	uint8_t	unused0[7];
58112 	/* Table data. */
58113 	uint8_t	data[88];
58114 } hwrm_tfc_if_tbl_set_input_t, *phwrm_tfc_if_tbl_set_input_t;
58115 
58116 /* hwrm_tfc_if_tbl_set_output (size:128b/16B) */
58117 
58118 typedef struct hwrm_tfc_if_tbl_set_output {
58119 	/* The specific error status for the command. */
58120 	uint16_t	error_code;
58121 	/* The HWRM command request type. */
58122 	uint16_t	req_type;
58123 	/* The sequence ID from the original command. */
58124 	uint16_t	seq_id;
58125 	/* The length of the response data in number of bytes. */
58126 	uint16_t	resp_len;
58127 	/* Reserved */
58128 	uint8_t	unused0[7];
58129 	/*
58130 	 * This field is used in Output records to indicate that the output
58131 	 * is completely written to RAM. This field should be read as '1'
58132 	 * to indicate that the output has been completely written.
58133 	 * When writing a command completion or response to an internal
58134 	 * processor, the order of writes has to be such that this field
58135 	 * is written last.
58136 	 */
58137 	uint8_t	valid;
58138 } hwrm_tfc_if_tbl_set_output_t, *phwrm_tfc_if_tbl_set_output_t;
58139 
58140 /***********************
58141  * hwrm_tfc_if_tbl_get *
58142  ***********************/
58143 
58144 
58145 /* hwrm_tfc_if_tbl_get_input (size:256b/32B) */
58146 
58147 typedef struct hwrm_tfc_if_tbl_get_input {
58148 	/* The HWRM command request type. */
58149 	uint16_t	req_type;
58150 	/*
58151 	 * The completion ring to send the completion event on. This should
58152 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58153 	 */
58154 	uint16_t	cmpl_ring;
58155 	/*
58156 	 * The sequence ID is used by the driver for tracking multiple
58157 	 * commands. This ID is treated as opaque data by the firmware and
58158 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58159 	 */
58160 	uint16_t	seq_id;
58161 	/*
58162 	 * The target ID of the command:
58163 	 * * 0x0-0xFFF8 - The function ID
58164 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58165 	 * * 0xFFFD - Reserved for user-space HWRM interface
58166 	 * * 0xFFFF - HWRM
58167 	 */
58168 	uint16_t	target_id;
58169 	/*
58170 	 * A physical address pointer pointing to a host buffer that the
58171 	 * command's response data will be written. This can be either a host
58172 	 * physical address (HPA) or a guest physical address (GPA) and must
58173 	 * point to a physically contiguous block of memory.
58174 	 */
58175 	uint64_t	resp_addr;
58176 	/* Session identifier. */
58177 	uint16_t	sid;
58178 	/* Function identifier. */
58179 	uint16_t	fid;
58180 	/*
58181 	 * Subtype identifying IF table type. See
58182 	 * cfa_v3/include/cfa_resources.h.
58183 	 */
58184 	uint8_t	subtype;
58185 	/* Control flags. */
58186 	uint8_t	flags;
58187 	/* Indicates the flow direction. */
58188 	#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR	UINT32_C(0x1)
58189 	/* If this bit set to 0, then it indicates rx flow. */
58190 		#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
58191 	/* If this bit is set to 1, then it indicates tx flow. */
58192 		#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
58193 		#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_LAST HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_TX
58194 	/* Table entry index. */
58195 	uint16_t	index;
58196 	/* Size of data in data field. */
58197 	uint8_t	data_size;
58198 	/* Reserved */
58199 	uint8_t	unused0[7];
58200 } hwrm_tfc_if_tbl_get_input_t, *phwrm_tfc_if_tbl_get_input_t;
58201 
58202 /* hwrm_tfc_if_tbl_get_output (size:960b/120B) */
58203 
58204 typedef struct hwrm_tfc_if_tbl_get_output {
58205 	/* The specific error status for the command. */
58206 	uint16_t	error_code;
58207 	/* The HWRM command request type. */
58208 	uint16_t	req_type;
58209 	/* The sequence ID from the original command. */
58210 	uint16_t	seq_id;
58211 	/* The length of the response data in number of bytes. */
58212 	uint16_t	resp_len;
58213 	/* Session identifier. */
58214 	uint16_t	sid;
58215 	/* Function identifier. */
58216 	uint16_t	fid;
58217 	/*
58218 	 * Subtype identifying IF table type. See
58219 	 * cfa_v3/include/cfa_resources.h.
58220 	 */
58221 	uint8_t	subtype;
58222 	/* Control flags. */
58223 	uint8_t	flags;
58224 	/* Indicates the flow direction. */
58225 	#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR	UINT32_C(0x1)
58226 	/* If this bit set to 0, then it indicates rx flow. */
58227 		#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_RX	UINT32_C(0x0)
58228 	/* If this bit is set to 1, then it indicates tx flow. */
58229 		#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_TX	UINT32_C(0x1)
58230 		#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_LAST HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_TX
58231 	/* Table entry index. */
58232 	uint16_t	index;
58233 	/* Size of data in data field. */
58234 	uint8_t	data_size;
58235 	/* Reserved */
58236 	uint8_t	unused0[7];
58237 	/* Table data. */
58238 	uint8_t	data[88];
58239 	/* Reserved */
58240 	uint8_t	unused1[7];
58241 	/*
58242 	 * This field is used in Output records to indicate that the output
58243 	 * is completely written to RAM. This field should be read as '1'
58244 	 * to indicate that the output has been completely written.
58245 	 * When writing a command completion or response to an internal
58246 	 * processor, the order of writes has to be such that this field
58247 	 * is written last.
58248 	 */
58249 	uint8_t	valid;
58250 } hwrm_tfc_if_tbl_get_output_t, *phwrm_tfc_if_tbl_get_output_t;
58251 
58252 /*********************************
58253  * hwrm_tfc_tbl_scope_config_get *
58254  *********************************/
58255 
58256 
58257 /* TruFlow command to return whether the table scope is fully configured. */
58258 /* hwrm_tfc_tbl_scope_config_get_input (size:192b/24B) */
58259 
58260 typedef struct hwrm_tfc_tbl_scope_config_get_input {
58261 	/* The HWRM command request type. */
58262 	uint16_t	req_type;
58263 	/*
58264 	 * The completion ring to send the completion event on. This should
58265 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58266 	 */
58267 	uint16_t	cmpl_ring;
58268 	/*
58269 	 * The sequence ID is used by the driver for tracking multiple
58270 	 * commands. This ID is treated as opaque data by the firmware and
58271 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58272 	 */
58273 	uint16_t	seq_id;
58274 	/*
58275 	 * The target ID of the command:
58276 	 * * 0x0-0xFFF8 - The function ID
58277 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58278 	 * * 0xFFFD - Reserved for user-space HWRM interface
58279 	 * * 0xFFFF - HWRM
58280 	 */
58281 	uint16_t	target_id;
58282 	/*
58283 	 * A physical address pointer pointing to a host buffer that the
58284 	 * command's response data will be written. This can be either a host
58285 	 * physical address (HPA) or a guest physical address (GPA) and must
58286 	 * point to a physically contiguous block of memory.
58287 	 */
58288 	uint64_t	resp_addr;
58289 	/* The table scope ID. */
58290 	uint8_t	tsid;
58291 	/* unused. */
58292 	uint8_t	unused0[7];
58293 } hwrm_tfc_tbl_scope_config_get_input_t, *phwrm_tfc_tbl_scope_config_get_input_t;
58294 
58295 /* hwrm_tfc_tbl_scope_config_get_output (size:128b/16B) */
58296 
58297 typedef struct hwrm_tfc_tbl_scope_config_get_output {
58298 	/* The specific error status for the command. */
58299 	uint16_t	error_code;
58300 	/* The HWRM command request type. */
58301 	uint16_t	req_type;
58302 	/* The sequence ID from the original command. */
58303 	uint16_t	seq_id;
58304 	/* The length of the response data in number of bytes. */
58305 	uint16_t	resp_len;
58306 	/* If set to 1, the table scope is configured. */
58307 	uint8_t	configured;
58308 	/* unused. */
58309 	uint8_t	unused0[6];
58310 	/*
58311 	 * This field is used in Output records to indicate that the output
58312 	 * is completely written to RAM. This field should be read as '1'
58313 	 * to indicate that the output has been completely written.
58314 	 * When writing a command completion or response to an internal
58315 	 * processor, the order of writes has to be such that this field
58316 	 * is written last.
58317 	 */
58318 	uint8_t	valid;
58319 } hwrm_tfc_tbl_scope_config_get_output_t, *phwrm_tfc_tbl_scope_config_get_output_t;
58320 
58321 /*****************************
58322  * hwrm_tfc_resc_usage_query *
58323  *****************************/
58324 
58325 
58326 /* hwrm_tfc_resc_usage_query_input (size:256b/32B) */
58327 
58328 typedef struct hwrm_tfc_resc_usage_query_input {
58329 	/* The HWRM command request type. */
58330 	uint16_t	req_type;
58331 	/*
58332 	 * The completion ring to send the completion event on. This should
58333 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58334 	 */
58335 	uint16_t	cmpl_ring;
58336 	/*
58337 	 * The sequence ID is used by the driver for tracking multiple
58338 	 * commands. This ID is treated as opaque data by the firmware and
58339 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58340 	 */
58341 	uint16_t	seq_id;
58342 	/*
58343 	 * The target ID of the command:
58344 	 * * 0x0-0xFFF8 - The function ID
58345 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58346 	 * * 0xFFFD - Reserved for user-space HWRM interface
58347 	 * * 0xFFFF - HWRM
58348 	 */
58349 	uint16_t	target_id;
58350 	/*
58351 	 * A physical address pointer pointing to a host buffer that the
58352 	 * command's response data will be written. This can be either a host
58353 	 * physical address (HPA) or a guest physical address (GPA) and must
58354 	 * point to a physically contiguous block of memory.
58355 	 */
58356 	uint64_t	resp_addr;
58357 	/* Session identifier. */
58358 	uint16_t	sid;
58359 	/* Function identifier. */
58360 	uint16_t	fid;
58361 	/* Control flags. */
58362 	uint8_t	flags;
58363 	/* Indicates the flow direction. */
58364 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR	UINT32_C(0x1)
58365 	/* If this bit set to 0, then it indicates rx flow. */
58366 		#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_RX	UINT32_C(0x0)
58367 	/* If this bit is set to 1, then it indicates tx flow. */
58368 		#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX	UINT32_C(0x1)
58369 		#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_LAST HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX
58370 	/* Describes the type of tracking id to be used */
58371 	uint8_t	track_type;
58372 	/* Invalid track type */
58373 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID UINT32_C(0x0)
58374 	/* Tracked by session id */
58375 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_SID	UINT32_C(0x1)
58376 	/* Tracked by function id */
58377 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_FID	UINT32_C(0x2)
58378 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_LAST		HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_FID
58379 	/* Size of data in data field. */
58380 	uint16_t	data_size;
58381 	/* unused */
58382 	uint8_t	unused1[8];
58383 } hwrm_tfc_resc_usage_query_input_t, *phwrm_tfc_resc_usage_query_input_t;
58384 
58385 /* hwrm_tfc_resc_usage_query_output (size:960b/120B) */
58386 
58387 typedef struct hwrm_tfc_resc_usage_query_output {
58388 	/* The specific error status for the command. */
58389 	uint16_t	error_code;
58390 	/* The HWRM command request type. */
58391 	uint16_t	req_type;
58392 	/* The sequence ID from the original command. */
58393 	uint16_t	seq_id;
58394 	/* The length of the response data in number of bytes. */
58395 	uint16_t	resp_len;
58396 	/* Response code. */
58397 	uint32_t	resp_code;
58398 	/* Size of data in data field. */
58399 	uint16_t	data_size;
58400 	/* unused */
58401 	uint16_t	unused0;
58402 	/* Response data. */
58403 	uint8_t	data[96];
58404 	/* unused */
58405 	uint8_t	unused1[7];
58406 	/*
58407 	 * This field is used in Output records to indicate that the output
58408 	 * is completely written to RAM. This field should be read as '1'
58409 	 * to indicate that the output has been completely written.
58410 	 * When writing a command completion or response to an internal
58411 	 * processor, the order of writes has to be such that this field
58412 	 * is written last.
58413 	 */
58414 	uint8_t	valid;
58415 } hwrm_tfc_resc_usage_query_output_t, *phwrm_tfc_resc_usage_query_output_t;
58416 
58417 /******************************
58418  * hwrm_tunnel_dst_port_query *
58419  ******************************/
58420 
58421 
58422 /* hwrm_tunnel_dst_port_query_input (size:192b/24B) */
58423 
58424 typedef struct hwrm_tunnel_dst_port_query_input {
58425 	/* The HWRM command request type. */
58426 	uint16_t	req_type;
58427 	/*
58428 	 * The completion ring to send the completion event on. This should
58429 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58430 	 */
58431 	uint16_t	cmpl_ring;
58432 	/*
58433 	 * The sequence ID is used by the driver for tracking multiple
58434 	 * commands. This ID is treated as opaque data by the firmware and
58435 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58436 	 */
58437 	uint16_t	seq_id;
58438 	/*
58439 	 * The target ID of the command:
58440 	 * * 0x0-0xFFF8 - The function ID
58441 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58442 	 * * 0xFFFD - Reserved for user-space HWRM interface
58443 	 * * 0xFFFF - HWRM
58444 	 */
58445 	uint16_t	target_id;
58446 	/*
58447 	 * A physical address pointer pointing to a host buffer that the
58448 	 * command's response data will be written. This can be either a host
58449 	 * physical address (HPA) or a guest physical address (GPA) and must
58450 	 * point to a physically contiguous block of memory.
58451 	 */
58452 	uint64_t	resp_addr;
58453 	/* Tunnel Type. */
58454 	uint8_t	tunnel_type;
58455 	/* Virtual eXtensible Local Area Network (VXLAN) */
58456 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN		UINT32_C(0x1)
58457 	/* Generic Network Virtualization Encapsulation (Geneve) */
58458 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_GENEVE		UINT32_C(0x5)
58459 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
58460 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
58461 	/*
58462 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
58463 	 * datagram payload
58464 	 */
58465 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
58466 	/* Use fixed layer 2 ether type of 0xFFFF */
58467 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
58468 	/*
58469 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
58470 	 * (IPV6oVXLANGPE)
58471 	 */
58472 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6	UINT32_C(0xc)
58473 	/* Custom GRE uses UPAR to parse customized GRE packets */
58474 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_CUSTOM_GRE	UINT32_C(0xd)
58475 	/* Enhanced Common Packet Radio Interface (eCPRI) */
58476 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ECPRI		UINT32_C(0xe)
58477 	/* IPv6 Segment Routing (SRv6) */
58478 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_SRV6		UINT32_C(0xf)
58479 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
58480 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
58481 	/* Generic Routing Encapsulation */
58482 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_GRE		UINT32_C(0x11)
58483 	/* ULP Dynamic UPAR tunnel */
58484 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR	UINT32_C(0x12)
58485 	/* ULP Dynamic UPAR tunnel reserved 1 */
58486 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES01 UINT32_C(0x13)
58487 	/* ULP Dynamic UPAR tunnel reserved 2 */
58488 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES02 UINT32_C(0x14)
58489 	/* ULP Dynamic UPAR tunnel reserved 3 */
58490 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES03 UINT32_C(0x15)
58491 	/* ULP Dynamic UPAR tunnel reserved 4 */
58492 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES04 UINT32_C(0x16)
58493 	/* ULP Dynamic UPAR tunnel reserved 5 */
58494 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES05 UINT32_C(0x17)
58495 	/* ULP Dynamic UPAR tunnel reserved 6 */
58496 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES06 UINT32_C(0x18)
58497 	/* ULP Dynamic UPAR tunnel reserved 7 */
58498 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07 UINT32_C(0x19)
58499 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_LAST		HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07
58500 	/*
58501 	 * This field is used to specify the next protocol value defined in the
58502 	 * corresponding RFC spec for the applicable tunnel type.
58503 	 */
58504 	uint8_t	tunnel_next_proto;
58505 	uint8_t	unused_0[6];
58506 } hwrm_tunnel_dst_port_query_input_t, *phwrm_tunnel_dst_port_query_input_t;
58507 
58508 /* hwrm_tunnel_dst_port_query_output (size:128b/16B) */
58509 
58510 typedef struct hwrm_tunnel_dst_port_query_output {
58511 	/* The specific error status for the command. */
58512 	uint16_t	error_code;
58513 	/* The HWRM command request type. */
58514 	uint16_t	req_type;
58515 	/* The sequence ID from the original command. */
58516 	uint16_t	seq_id;
58517 	/* The length of the response data in number of bytes. */
58518 	uint16_t	resp_len;
58519 	/*
58520 	 * This field represents the identifier of L4 destination port
58521 	 * used for the given tunnel type. This field is valid for
58522 	 * specific tunnel types that use layer 4 (e.g. UDP)
58523 	 * transports for tunneling.
58524 	 */
58525 	uint16_t	tunnel_dst_port_id;
58526 	/*
58527 	 * This field represents the value of L4 destination port
58528 	 * identified by tunnel_dst_port_id. This field is valid for
58529 	 * specific tunnel types that use layer 4 (e.g. UDP)
58530 	 * transports for tunneling.
58531 	 * This field is in network byte order.
58532 	 *
58533 	 * A value of 0 means that the destination port is not
58534 	 * configured.
58535 	 */
58536 	uint16_t	tunnel_dst_port_val;
58537 	/*
58538 	 * This field represents the UPAR usage status.
58539 	 * Available UPARs on wh+ are UPAR0 and UPAR1
58540 	 * Available UPARs on Thor are UPAR0 to UPAR3
58541 	 * Available UPARs on Thor2 are UPAR0 to UPAR7
58542 	 */
58543 	uint8_t	upar_in_use;
58544 	/* This bit will be '1' when UPAR0 is IN_USE */
58545 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR0	UINT32_C(0x1)
58546 	/* This bit will be '1' when UPAR1 is IN_USE */
58547 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR1	UINT32_C(0x2)
58548 	/* This bit will be '1' when UPAR2 is IN_USE */
58549 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR2	UINT32_C(0x4)
58550 	/* This bit will be '1' when UPAR3 is IN_USE */
58551 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR3	UINT32_C(0x8)
58552 	/* This bit will be '1' when UPAR4 is IN_USE */
58553 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR4	UINT32_C(0x10)
58554 	/* This bit will be '1' when UPAR5 is IN_USE */
58555 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR5	UINT32_C(0x20)
58556 	/* This bit will be '1' when UPAR6 is IN_USE */
58557 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR6	UINT32_C(0x40)
58558 	/* This bit will be '1' when UPAR7 is IN_USE */
58559 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR7	UINT32_C(0x80)
58560 	/*
58561 	 * This field is used to convey the status of non udp port based
58562 	 * tunnel parsing at chip level and at function level.
58563 	 */
58564 	uint8_t	status;
58565 	/* This bit will be '1' when tunnel parsing is enabled globally. */
58566 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_STATUS_CHIP_LEVEL	UINT32_C(0x1)
58567 	/*
58568 	 * This bit will be '1' when tunnel parsing is enabled
58569 	 * on the corresponding function.
58570 	 */
58571 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_STATUS_FUNC_LEVEL	UINT32_C(0x2)
58572 	uint8_t	unused_0;
58573 	/*
58574 	 * This field is used in Output records to indicate that the output
58575 	 * is completely written to RAM. This field should be read as '1'
58576 	 * to indicate that the output has been completely written. When
58577 	 * writing a command completion or response to an internal processor,
58578 	 * the order of writes has to be such that this field is written last.
58579 	 */
58580 	uint8_t	valid;
58581 } hwrm_tunnel_dst_port_query_output_t, *phwrm_tunnel_dst_port_query_output_t;
58582 
58583 /******************************
58584  * hwrm_tunnel_dst_port_alloc *
58585  ******************************/
58586 
58587 
58588 /* hwrm_tunnel_dst_port_alloc_input (size:192b/24B) */
58589 
58590 typedef struct hwrm_tunnel_dst_port_alloc_input {
58591 	/* The HWRM command request type. */
58592 	uint16_t	req_type;
58593 	/*
58594 	 * The completion ring to send the completion event on. This should
58595 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58596 	 */
58597 	uint16_t	cmpl_ring;
58598 	/*
58599 	 * The sequence ID is used by the driver for tracking multiple
58600 	 * commands. This ID is treated as opaque data by the firmware and
58601 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58602 	 */
58603 	uint16_t	seq_id;
58604 	/*
58605 	 * The target ID of the command:
58606 	 * * 0x0-0xFFF8 - The function ID
58607 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58608 	 * * 0xFFFD - Reserved for user-space HWRM interface
58609 	 * * 0xFFFF - HWRM
58610 	 */
58611 	uint16_t	target_id;
58612 	/*
58613 	 * A physical address pointer pointing to a host buffer that the
58614 	 * command's response data will be written. This can be either a host
58615 	 * physical address (HPA) or a guest physical address (GPA) and must
58616 	 * point to a physically contiguous block of memory.
58617 	 */
58618 	uint64_t	resp_addr;
58619 	/* Tunnel Type. */
58620 	uint8_t	tunnel_type;
58621 	/* Virtual eXtensible Local Area Network (VXLAN) */
58622 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN		UINT32_C(0x1)
58623 	/* Generic Network Virtualization Encapsulation (Geneve) */
58624 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE		UINT32_C(0x5)
58625 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
58626 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
58627 	/*
58628 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
58629 	 * datagram payload
58630 	 */
58631 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
58632 	/* Use fixed layer 2 ether type of 0xFFFF */
58633 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
58634 	/*
58635 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
58636 	 * (IPV6oVXLANGPE)
58637 	 */
58638 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6	UINT32_C(0xc)
58639 	/*
58640 	 * Custom GRE uses UPAR to parse customized GRE packets. This is not
58641 	 * supported.
58642 	 */
58643 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_CUSTOM_GRE	UINT32_C(0xd)
58644 	/* Enhanced Common Packet Radio Interface (eCPRI) */
58645 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI		UINT32_C(0xe)
58646 	/* IPv6 Segment Routing (SRv6) */
58647 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_SRV6		UINT32_C(0xf)
58648 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
58649 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
58650 	/* Generic Routing Encapsulation */
58651 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GRE		UINT32_C(0x11)
58652 	/* ULP Dynamic UPAR tunnel */
58653 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR	UINT32_C(0x12)
58654 	/* ULP Dynamic UPAR tunnel reserved 1 */
58655 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES01 UINT32_C(0x13)
58656 	/* ULP Dynamic UPAR tunnel reserved 2 */
58657 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES02 UINT32_C(0x14)
58658 	/* ULP Dynamic UPAR tunnel reserved 3 */
58659 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES03 UINT32_C(0x15)
58660 	/* ULP Dynamic UPAR tunnel reserved 4 */
58661 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES04 UINT32_C(0x16)
58662 	/* ULP Dynamic UPAR tunnel reserved 5 */
58663 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES05 UINT32_C(0x17)
58664 	/* ULP Dynamic UPAR tunnel reserved 6 */
58665 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES06 UINT32_C(0x18)
58666 	/* ULP Dynamic UPAR tunnel reserved 7 */
58667 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07 UINT32_C(0x19)
58668 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_LAST		HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07
58669 	/*
58670 	 * This field is used to specify the next protocol value defined in the
58671 	 * corresponding RFC spec for the applicable tunnel type.
58672 	 */
58673 	uint8_t	tunnel_next_proto;
58674 	/*
58675 	 * This field represents the value of L4 destination port used
58676 	 * for the given tunnel type. This field is valid for
58677 	 * specific tunnel types that use layer 4 (e.g. UDP)
58678 	 * transports for tunneling.
58679 	 *
58680 	 * This field is in network byte order.
58681 	 *
58682 	 * A value of 0 shall fail the command.
58683 	 */
58684 	uint16_t	tunnel_dst_port_val;
58685 	uint8_t	unused_0[4];
58686 } hwrm_tunnel_dst_port_alloc_input_t, *phwrm_tunnel_dst_port_alloc_input_t;
58687 
58688 /* hwrm_tunnel_dst_port_alloc_output (size:128b/16B) */
58689 
58690 typedef struct hwrm_tunnel_dst_port_alloc_output {
58691 	/* The specific error status for the command. */
58692 	uint16_t	error_code;
58693 	/* The HWRM command request type. */
58694 	uint16_t	req_type;
58695 	/* The sequence ID from the original command. */
58696 	uint16_t	seq_id;
58697 	/* The length of the response data in number of bytes. */
58698 	uint16_t	resp_len;
58699 	/*
58700 	 * Identifier of a tunnel L4 destination port value. Only applies to
58701 	 * tunnel types that has l4 destination port parameters.
58702 	 */
58703 	uint16_t	tunnel_dst_port_id;
58704 	/* Error information */
58705 	uint8_t	error_info;
58706 	/* No error */
58707 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_SUCCESS	UINT32_C(0x0)
58708 	/* Tunnel port is already allocated */
58709 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ALLOCATED   UINT32_C(0x1)
58710 	/* Out of resources error */
58711 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_NO_RESOURCE UINT32_C(0x2)
58712 	/* Tunnel type is already enabled */
58713 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ENABLED	UINT32_C(0x3)
58714 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_LAST	HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ENABLED
58715 	/*
58716 	 * This field represents the UPAR usage status.
58717 	 * Available UPARs on wh+ are UPAR0 and UPAR1
58718 	 * Available UPARs on Thor are UPAR0 to UPAR3
58719 	 * Available UPARs on Thor2 are UPAR0 to UPAR7
58720 	 */
58721 	uint8_t	upar_in_use;
58722 	/* This bit will be '1' when UPAR0 is IN_USE */
58723 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR0	UINT32_C(0x1)
58724 	/* This bit will be '1' when UPAR1 is IN_USE */
58725 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR1	UINT32_C(0x2)
58726 	/* This bit will be '1' when UPAR2 is IN_USE */
58727 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR2	UINT32_C(0x4)
58728 	/* This bit will be '1' when UPAR3 is IN_USE */
58729 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR3	UINT32_C(0x8)
58730 	/* This bit will be '1' when UPAR4 is IN_USE */
58731 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR4	UINT32_C(0x10)
58732 	/* This bit will be '1' when UPAR5 is IN_USE */
58733 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR5	UINT32_C(0x20)
58734 	/* This bit will be '1' when UPAR6 is IN_USE */
58735 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR6	UINT32_C(0x40)
58736 	/* This bit will be '1' when UPAR7 is IN_USE */
58737 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR7	UINT32_C(0x80)
58738 	uint8_t	unused_0[3];
58739 	/*
58740 	 * This field is used in Output records to indicate that the output
58741 	 * is completely written to RAM. This field should be read as '1'
58742 	 * to indicate that the output has been completely written. When
58743 	 * writing a command completion or response to an internal processor,
58744 	 * the order of writes has to be such that this field is written last.
58745 	 */
58746 	uint8_t	valid;
58747 } hwrm_tunnel_dst_port_alloc_output_t, *phwrm_tunnel_dst_port_alloc_output_t;
58748 
58749 /*****************************
58750  * hwrm_tunnel_dst_port_free *
58751  *****************************/
58752 
58753 
58754 /* hwrm_tunnel_dst_port_free_input (size:192b/24B) */
58755 
58756 typedef struct hwrm_tunnel_dst_port_free_input {
58757 	/* The HWRM command request type. */
58758 	uint16_t	req_type;
58759 	/*
58760 	 * The completion ring to send the completion event on. This should
58761 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58762 	 */
58763 	uint16_t	cmpl_ring;
58764 	/*
58765 	 * The sequence ID is used by the driver for tracking multiple
58766 	 * commands. This ID is treated as opaque data by the firmware and
58767 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58768 	 */
58769 	uint16_t	seq_id;
58770 	/*
58771 	 * The target ID of the command:
58772 	 * * 0x0-0xFFF8 - The function ID
58773 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58774 	 * * 0xFFFD - Reserved for user-space HWRM interface
58775 	 * * 0xFFFF - HWRM
58776 	 */
58777 	uint16_t	target_id;
58778 	/*
58779 	 * A physical address pointer pointing to a host buffer that the
58780 	 * command's response data will be written. This can be either a host
58781 	 * physical address (HPA) or a guest physical address (GPA) and must
58782 	 * point to a physically contiguous block of memory.
58783 	 */
58784 	uint64_t	resp_addr;
58785 	/* Tunnel Type. */
58786 	uint8_t	tunnel_type;
58787 	/* Virtual eXtensible Local Area Network (VXLAN) */
58788 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN		UINT32_C(0x1)
58789 	/* Generic Network Virtualization Encapsulation (Geneve) */
58790 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE		UINT32_C(0x5)
58791 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
58792 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_V4	UINT32_C(0x9)
58793 	/*
58794 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
58795 	 * datagram payload
58796 	 */
58797 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1	UINT32_C(0xa)
58798 	/* Use fixed layer 2 ether type of 0xFFFF */
58799 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_L2_ETYPE	UINT32_C(0xb)
58800 	/*
58801 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
58802 	 * (IPV6oVXLANGPE)
58803 	 */
58804 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6	UINT32_C(0xc)
58805 	/*
58806 	 * Custom GRE uses UPAR to parse customized GRE packets. This is not
58807 	 * supported.
58808 	 */
58809 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_CUSTOM_GRE	UINT32_C(0xd)
58810 	/* Enhanced Common Packet Radio Interface (eCPRI) */
58811 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ECPRI		UINT32_C(0xe)
58812 	/* IPv6 Segment Routing (SRv6) */
58813 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_SRV6		UINT32_C(0xf)
58814 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
58815 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE	UINT32_C(0x10)
58816 	/* Generic Routing Encapsulation */
58817 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GRE		UINT32_C(0x11)
58818 	/* ULP Dynamic UPAR tunnel */
58819 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR	UINT32_C(0x12)
58820 	/* ULP Dynamic UPAR tunnel reserved 1 */
58821 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES01 UINT32_C(0x13)
58822 	/* ULP Dynamic UPAR tunnel reserved 2 */
58823 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES02 UINT32_C(0x14)
58824 	/* ULP Dynamic UPAR tunnel reserved 3 */
58825 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES03 UINT32_C(0x15)
58826 	/* ULP Dynamic UPAR tunnel reserved 4 */
58827 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES04 UINT32_C(0x16)
58828 	/* ULP Dynamic UPAR tunnel reserved 5 */
58829 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES05 UINT32_C(0x17)
58830 	/* ULP Dynamic UPAR tunnel reserved 6 */
58831 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES06 UINT32_C(0x18)
58832 	/* ULP Dynamic UPAR tunnel reserved 7 */
58833 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07 UINT32_C(0x19)
58834 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_LAST		HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07
58835 	/*
58836 	 * This field is used to specify the next protocol value defined in the
58837 	 * corresponding RFC spec for the applicable tunnel type.
58838 	 */
58839 	uint8_t	tunnel_next_proto;
58840 	/*
58841 	 * Identifier of a tunnel L4 destination port value. Only applies to
58842 	 * tunnel types that has l4 destination port parameters.
58843 	 */
58844 	uint16_t	tunnel_dst_port_id;
58845 	uint8_t	unused_0[4];
58846 } hwrm_tunnel_dst_port_free_input_t, *phwrm_tunnel_dst_port_free_input_t;
58847 
58848 /* hwrm_tunnel_dst_port_free_output (size:128b/16B) */
58849 
58850 typedef struct hwrm_tunnel_dst_port_free_output {
58851 	/* The specific error status for the command. */
58852 	uint16_t	error_code;
58853 	/* The HWRM command request type. */
58854 	uint16_t	req_type;
58855 	/* The sequence ID from the original command. */
58856 	uint16_t	seq_id;
58857 	/* The length of the response data in number of bytes. */
58858 	uint16_t	resp_len;
58859 	/* Error information */
58860 	uint8_t	error_info;
58861 	/* No error */
58862 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_SUCCESS	UINT32_C(0x0)
58863 	/* Not owner error */
58864 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_ERR_NOT_OWNER	UINT32_C(0x1)
58865 	/* Not allocated error */
58866 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_ERR_NOT_ALLOCATED UINT32_C(0x2)
58867 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_LAST		HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_ERR_NOT_ALLOCATED
58868 	uint8_t	unused_1[6];
58869 	/*
58870 	 * This field is used in Output records to indicate that the output
58871 	 * is completely written to RAM. This field should be read as '1'
58872 	 * to indicate that the output has been completely written. When
58873 	 * writing a command completion or response to an internal processor,
58874 	 * the order of writes has to be such that this field is written last.
58875 	 */
58876 	uint8_t	valid;
58877 } hwrm_tunnel_dst_port_free_output_t, *phwrm_tunnel_dst_port_free_output_t;
58878 
58879 /* Periodic statistics context DMA to host. */
58880 /* ctx_hw_stats (size:1280b/160B) */
58881 
58882 typedef struct ctx_hw_stats {
58883 	/* Number of received unicast packets */
58884 	uint64_t	rx_ucast_pkts;
58885 	/* Number of received multicast packets */
58886 	uint64_t	rx_mcast_pkts;
58887 	/* Number of received broadcast packets */
58888 	uint64_t	rx_bcast_pkts;
58889 	/* Number of discarded packets on receive path */
58890 	uint64_t	rx_discard_pkts;
58891 	/* Number of packets on receive path with error */
58892 	uint64_t	rx_error_pkts;
58893 	/* Number of received bytes for unicast traffic */
58894 	uint64_t	rx_ucast_bytes;
58895 	/* Number of received bytes for multicast traffic */
58896 	uint64_t	rx_mcast_bytes;
58897 	/* Number of received bytes for broadcast traffic */
58898 	uint64_t	rx_bcast_bytes;
58899 	/* Number of transmitted unicast packets */
58900 	uint64_t	tx_ucast_pkts;
58901 	/* Number of transmitted multicast packets */
58902 	uint64_t	tx_mcast_pkts;
58903 	/* Number of transmitted broadcast packets */
58904 	uint64_t	tx_bcast_pkts;
58905 	/* Number of packets on transmit path with error */
58906 	uint64_t	tx_error_pkts;
58907 	/* Number of discarded packets on transmit path */
58908 	uint64_t	tx_discard_pkts;
58909 	/* Number of transmitted bytes for unicast traffic */
58910 	uint64_t	tx_ucast_bytes;
58911 	/* Number of transmitted bytes for multicast traffic */
58912 	uint64_t	tx_mcast_bytes;
58913 	/* Number of transmitted bytes for broadcast traffic */
58914 	uint64_t	tx_bcast_bytes;
58915 	/* Number of TPA packets */
58916 	uint64_t	tpa_pkts;
58917 	/* Number of TPA bytes */
58918 	uint64_t	tpa_bytes;
58919 	/* Number of TPA events */
58920 	uint64_t	tpa_events;
58921 	/* Number of TPA aborts */
58922 	uint64_t	tpa_aborts;
58923 } ctx_hw_stats_t, *pctx_hw_stats_t;
58924 
58925 /*
58926  * Extended periodic statistics context DMA to host. On cards that
58927  * support TPA v2, additional TPA related stats exist and can be retrieved
58928  * by DMA of ctx_hw_stats_ext, rather than legacy ctx_hw_stats structure.
58929  */
58930 /* ctx_hw_stats_ext (size:1408b/176B) */
58931 
58932 typedef struct ctx_hw_stats_ext {
58933 	/* Number of received unicast packets */
58934 	uint64_t	rx_ucast_pkts;
58935 	/* Number of received multicast packets */
58936 	uint64_t	rx_mcast_pkts;
58937 	/* Number of received broadcast packets */
58938 	uint64_t	rx_bcast_pkts;
58939 	/* Number of discarded packets on receive path */
58940 	uint64_t	rx_discard_pkts;
58941 	/* Number of packets on receive path with error */
58942 	uint64_t	rx_error_pkts;
58943 	/* Number of received bytes for unicast traffic */
58944 	uint64_t	rx_ucast_bytes;
58945 	/* Number of received bytes for multicast traffic */
58946 	uint64_t	rx_mcast_bytes;
58947 	/* Number of received bytes for broadcast traffic */
58948 	uint64_t	rx_bcast_bytes;
58949 	/* Number of transmitted unicast packets */
58950 	uint64_t	tx_ucast_pkts;
58951 	/* Number of transmitted multicast packets */
58952 	uint64_t	tx_mcast_pkts;
58953 	/* Number of transmitted broadcast packets */
58954 	uint64_t	tx_bcast_pkts;
58955 	/* Number of packets on transmit path with error */
58956 	uint64_t	tx_error_pkts;
58957 	/* Number of discarded packets on transmit path */
58958 	uint64_t	tx_discard_pkts;
58959 	/* Number of transmitted bytes for unicast traffic */
58960 	uint64_t	tx_ucast_bytes;
58961 	/* Number of transmitted bytes for multicast traffic */
58962 	uint64_t	tx_mcast_bytes;
58963 	/* Number of transmitted bytes for broadcast traffic */
58964 	uint64_t	tx_bcast_bytes;
58965 	/* Number of TPA eligible packets */
58966 	uint64_t	rx_tpa_eligible_pkt;
58967 	/* Number of TPA eligible bytes */
58968 	uint64_t	rx_tpa_eligible_bytes;
58969 	/* Number of TPA packets */
58970 	uint64_t	rx_tpa_pkt;
58971 	/* Number of TPA bytes */
58972 	uint64_t	rx_tpa_bytes;
58973 	/* Number of TPA errors */
58974 	uint64_t	rx_tpa_errors;
58975 	/* Number of TPA events */
58976 	uint64_t	rx_tpa_events;
58977 } ctx_hw_stats_ext_t, *pctx_hw_stats_ext_t;
58978 
58979 /* Periodic Engine statistics context DMA to host. */
58980 /* ctx_eng_stats (size:512b/64B) */
58981 
58982 typedef struct ctx_eng_stats {
58983 	/*
58984 	 * Count of data bytes into the Engine.
58985 	 * This includes any user supplied prefix,
58986 	 * but does not include any predefined
58987 	 * prefix data.
58988 	 */
58989 	uint64_t	eng_bytes_in;
58990 	/* Count of data bytes out of the Engine. */
58991 	uint64_t	eng_bytes_out;
58992 	/*
58993 	 * Count, in 4-byte (dword) units, of bytes
58994 	 * that are input as auxiliary data.
58995 	 * This includes the aux_cmd data.
58996 	 */
58997 	uint64_t	aux_bytes_in;
58998 	/*
58999 	 * Count, in 4-byte (dword) units, of bytes
59000 	 * that are output as auxiliary data.
59001 	 * This count is the buffer space for aux_data
59002 	 * output provided in the RQE, not the actual
59003 	 * aux_data written
59004 	 */
59005 	uint64_t	aux_bytes_out;
59006 	/* Count of number of commands executed. */
59007 	uint64_t	commands;
59008 	/*
59009 	 * Count of number of error commands.
59010 	 * These are the commands with a
59011 	 * non-zero status value.
59012 	 */
59013 	uint64_t	error_commands;
59014 	/*
59015 	 * Compression/Encryption Engine usage,
59016 	 * the unit is count of clock cycles
59017 	 */
59018 	uint64_t	cce_engine_usage;
59019 	/*
59020 	 * De-Compression/De-cryption Engine usage,
59021 	 * the unit is count of clock cycles
59022 	 */
59023 	uint64_t	cdd_engine_usage;
59024 } ctx_eng_stats_t, *pctx_eng_stats_t;
59025 
59026 /***********************
59027  * hwrm_stat_ctx_alloc *
59028  ***********************/
59029 
59030 
59031 /* hwrm_stat_ctx_alloc_input (size:320b/40B) */
59032 
59033 typedef struct hwrm_stat_ctx_alloc_input {
59034 	/* The HWRM command request type. */
59035 	uint16_t	req_type;
59036 	/*
59037 	 * The completion ring to send the completion event on. This should
59038 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59039 	 */
59040 	uint16_t	cmpl_ring;
59041 	/*
59042 	 * The sequence ID is used by the driver for tracking multiple
59043 	 * commands. This ID is treated as opaque data by the firmware and
59044 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59045 	 */
59046 	uint16_t	seq_id;
59047 	/*
59048 	 * The target ID of the command:
59049 	 * * 0x0-0xFFF8 - The function ID
59050 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59051 	 * * 0xFFFD - Reserved for user-space HWRM interface
59052 	 * * 0xFFFF - HWRM
59053 	 */
59054 	uint16_t	target_id;
59055 	/*
59056 	 * A physical address pointer pointing to a host buffer that the
59057 	 * command's response data will be written. This can be either a host
59058 	 * physical address (HPA) or a guest physical address (GPA) and must
59059 	 * point to a physically contiguous block of memory.
59060 	 */
59061 	uint64_t	resp_addr;
59062 	/*
59063 	 * This is the address for statistic block.
59064 	 * > For new versions of the chip, this address should be 128B
59065 	 * > aligned.
59066 	 */
59067 	uint64_t	stats_dma_addr;
59068 	/*
59069 	 * The statistic block update period in ms.
59070 	 * e.g. 250ms, 500ms, 750ms, 1000ms.
59071 	 * If update_period_ms is 0, then the stats update
59072 	 * shall be never done and the DMA address shall not be used.
59073 	 * In this case, the stat block can only be read by
59074 	 * hwrm_stat_ctx_query command.
59075 	 * On Ethernet/L2 based devices:
59076 	 *   if tpa v2 supported (hwrm_vnic_qcaps[max_aggs_supported]>0),
59077 	 *	ctx_hw_stats_ext is used for DMA,
59078 	 *   else
59079 	 *	ctx_hw_stats is used for DMA.
59080 	 */
59081 	uint32_t	update_period_ms;
59082 	/*
59083 	 * This field is used to specify statistics context specific
59084 	 * configuration flags.
59085 	 */
59086 	uint8_t	stat_ctx_flags;
59087 	/*
59088 	 * When this bit is set to '1', the statistics context shall be
59089 	 * allocated for RoCE traffic only. In this case, traffic other
59090 	 * than offloaded RoCE traffic shall not be included in this
59091 	 * statistic context.
59092 	 * When this bit is set to '0', the statistics context shall be
59093 	 * used for network traffic or engine traffic.
59094 	 */
59095 	#define HWRM_STAT_CTX_ALLOC_INPUT_STAT_CTX_FLAGS_ROCE	UINT32_C(0x1)
59096 	uint8_t	unused_0;
59097 	/*
59098 	 * This is the size of the structure (ctx_hw_stats or
59099 	 * ctx_hw_stats_ext) that the driver has allocated to be used
59100 	 * for the periodic DMA updates.
59101 	 */
59102 	uint16_t	stats_dma_length;
59103 	uint16_t	flags;
59104 	/* This stats context uses the steering tag specified in the command. */
59105 	#define HWRM_STAT_CTX_ALLOC_INPUT_FLAGS_STEERING_TAG_VALID	UINT32_C(0x1)
59106 	/*
59107 	 * Steering tag to use for memory transactions from the periodic DMA
59108 	 * updates. 'steering_tag_valid' should be set and 'steering_tag'
59109 	 * should be specified, when the 'steering_tag_supported' bit is set
59110 	 * under the 'flags_ext2' field of the hwrm_func_qcaps_output.
59111 	 */
59112 	uint16_t	steering_tag;
59113 	uint32_t	unused_1;
59114 } hwrm_stat_ctx_alloc_input_t, *phwrm_stat_ctx_alloc_input_t;
59115 
59116 /* hwrm_stat_ctx_alloc_output (size:128b/16B) */
59117 
59118 typedef struct hwrm_stat_ctx_alloc_output {
59119 	/* The specific error status for the command. */
59120 	uint16_t	error_code;
59121 	/* The HWRM command request type. */
59122 	uint16_t	req_type;
59123 	/* The sequence ID from the original command. */
59124 	uint16_t	seq_id;
59125 	/* The length of the response data in number of bytes. */
59126 	uint16_t	resp_len;
59127 	/* This is the statistics context ID value. */
59128 	uint32_t	stat_ctx_id;
59129 	uint8_t	unused_0[3];
59130 	/*
59131 	 * This field is used in Output records to indicate that the output
59132 	 * is completely written to RAM. This field should be read as '1'
59133 	 * to indicate that the output has been completely written. When
59134 	 * writing a command completion or response to an internal processor,
59135 	 * the order of writes has to be such that this field is written last.
59136 	 */
59137 	uint8_t	valid;
59138 } hwrm_stat_ctx_alloc_output_t, *phwrm_stat_ctx_alloc_output_t;
59139 
59140 /**********************
59141  * hwrm_stat_ctx_free *
59142  **********************/
59143 
59144 
59145 /* hwrm_stat_ctx_free_input (size:192b/24B) */
59146 
59147 typedef struct hwrm_stat_ctx_free_input {
59148 	/* The HWRM command request type. */
59149 	uint16_t	req_type;
59150 	/*
59151 	 * The completion ring to send the completion event on. This should
59152 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59153 	 */
59154 	uint16_t	cmpl_ring;
59155 	/*
59156 	 * The sequence ID is used by the driver for tracking multiple
59157 	 * commands. This ID is treated as opaque data by the firmware and
59158 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59159 	 */
59160 	uint16_t	seq_id;
59161 	/*
59162 	 * The target ID of the command:
59163 	 * * 0x0-0xFFF8 - The function ID
59164 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59165 	 * * 0xFFFD - Reserved for user-space HWRM interface
59166 	 * * 0xFFFF - HWRM
59167 	 */
59168 	uint16_t	target_id;
59169 	/*
59170 	 * A physical address pointer pointing to a host buffer that the
59171 	 * command's response data will be written. This can be either a host
59172 	 * physical address (HPA) or a guest physical address (GPA) and must
59173 	 * point to a physically contiguous block of memory.
59174 	 */
59175 	uint64_t	resp_addr;
59176 	/* ID of the statistics context that is being queried. */
59177 	uint32_t	stat_ctx_id;
59178 	uint8_t	unused_0[4];
59179 } hwrm_stat_ctx_free_input_t, *phwrm_stat_ctx_free_input_t;
59180 
59181 /* hwrm_stat_ctx_free_output (size:128b/16B) */
59182 
59183 typedef struct hwrm_stat_ctx_free_output {
59184 	/* The specific error status for the command. */
59185 	uint16_t	error_code;
59186 	/* The HWRM command request type. */
59187 	uint16_t	req_type;
59188 	/* The sequence ID from the original command. */
59189 	uint16_t	seq_id;
59190 	/* The length of the response data in number of bytes. */
59191 	uint16_t	resp_len;
59192 	/* This is the statistics context ID value. */
59193 	uint32_t	stat_ctx_id;
59194 	uint8_t	unused_0[3];
59195 	/*
59196 	 * This field is used in Output records to indicate that the output
59197 	 * is completely written to RAM. This field should be read as '1'
59198 	 * to indicate that the output has been completely written. When
59199 	 * writing a command completion or response to an internal processor,
59200 	 * the order of writes has to be such that this field is written last.
59201 	 */
59202 	uint8_t	valid;
59203 } hwrm_stat_ctx_free_output_t, *phwrm_stat_ctx_free_output_t;
59204 
59205 /***********************
59206  * hwrm_stat_ctx_query *
59207  ***********************/
59208 
59209 
59210 /* hwrm_stat_ctx_query_input (size:192b/24B) */
59211 
59212 typedef struct hwrm_stat_ctx_query_input {
59213 	/* The HWRM command request type. */
59214 	uint16_t	req_type;
59215 	/*
59216 	 * The completion ring to send the completion event on. This should
59217 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59218 	 */
59219 	uint16_t	cmpl_ring;
59220 	/*
59221 	 * The sequence ID is used by the driver for tracking multiple
59222 	 * commands. This ID is treated as opaque data by the firmware and
59223 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59224 	 */
59225 	uint16_t	seq_id;
59226 	/*
59227 	 * The target ID of the command:
59228 	 * * 0x0-0xFFF8 - The function ID
59229 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59230 	 * * 0xFFFD - Reserved for user-space HWRM interface
59231 	 * * 0xFFFF - HWRM
59232 	 */
59233 	uint16_t	target_id;
59234 	/*
59235 	 * A physical address pointer pointing to a host buffer that the
59236 	 * command's response data will be written. This can be either a host
59237 	 * physical address (HPA) or a guest physical address (GPA) and must
59238 	 * point to a physically contiguous block of memory.
59239 	 */
59240 	uint64_t	resp_addr;
59241 	/* ID of the statistics context that is being queried. */
59242 	uint32_t	stat_ctx_id;
59243 	uint8_t	flags;
59244 	/*
59245 	 * This bit is set to 1 when request is for a counter mask,
59246 	 * representing the width of each of the stats counters, rather
59247 	 * than counters themselves.
59248 	 */
59249 	#define HWRM_STAT_CTX_QUERY_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x1)
59250 	uint8_t	unused_0[3];
59251 } hwrm_stat_ctx_query_input_t, *phwrm_stat_ctx_query_input_t;
59252 
59253 /* hwrm_stat_ctx_query_output (size:1408b/176B) */
59254 
59255 typedef struct hwrm_stat_ctx_query_output {
59256 	/* The specific error status for the command. */
59257 	uint16_t	error_code;
59258 	/* The HWRM command request type. */
59259 	uint16_t	req_type;
59260 	/* The sequence ID from the original command. */
59261 	uint16_t	seq_id;
59262 	/* The length of the response data in number of bytes. */
59263 	uint16_t	resp_len;
59264 	/* Number of transmitted unicast packets */
59265 	uint64_t	tx_ucast_pkts;
59266 	/* Number of transmitted multicast packets */
59267 	uint64_t	tx_mcast_pkts;
59268 	/* Number of transmitted broadcast packets */
59269 	uint64_t	tx_bcast_pkts;
59270 	/* Number of packets discarded in transmit path */
59271 	uint64_t	tx_discard_pkts;
59272 	/* Number of packets in transmit path with error */
59273 	uint64_t	tx_error_pkts;
59274 	/* Number of transmitted bytes for unicast traffic */
59275 	uint64_t	tx_ucast_bytes;
59276 	/* Number of transmitted bytes for multicast traffic */
59277 	uint64_t	tx_mcast_bytes;
59278 	/* Number of transmitted bytes for broadcast traffic */
59279 	uint64_t	tx_bcast_bytes;
59280 	/* Number of received unicast packets */
59281 	uint64_t	rx_ucast_pkts;
59282 	/* Number of received multicast packets */
59283 	uint64_t	rx_mcast_pkts;
59284 	/* Number of received broadcast packets */
59285 	uint64_t	rx_bcast_pkts;
59286 	/* Number of packets discarded in receive path */
59287 	uint64_t	rx_discard_pkts;
59288 	/* Number of packets in receive path with errors */
59289 	uint64_t	rx_error_pkts;
59290 	/* Number of received bytes for unicast traffic */
59291 	uint64_t	rx_ucast_bytes;
59292 	/* Number of received bytes for multicast traffic */
59293 	uint64_t	rx_mcast_bytes;
59294 	/* Number of received bytes for broadcast traffic */
59295 	uint64_t	rx_bcast_bytes;
59296 	/* Number of aggregated unicast packets */
59297 	uint64_t	rx_agg_pkts;
59298 	/* Number of aggregated unicast bytes */
59299 	uint64_t	rx_agg_bytes;
59300 	/* Number of aggregation events */
59301 	uint64_t	rx_agg_events;
59302 	/* Number of aborted aggregations */
59303 	uint64_t	rx_agg_aborts;
59304 	uint8_t	unused_0[7];
59305 	/*
59306 	 * This field is used in Output records to indicate that the output
59307 	 * is completely written to RAM. This field should be read as '1'
59308 	 * to indicate that the output has been completely written. When
59309 	 * writing a command completion or response to an internal processor,
59310 	 * the order of writes has to be such that this field is written last.
59311 	 */
59312 	uint8_t	valid;
59313 } hwrm_stat_ctx_query_output_t, *phwrm_stat_ctx_query_output_t;
59314 
59315 /***************************
59316  * hwrm_stat_ext_ctx_query *
59317  ***************************/
59318 
59319 
59320 /* hwrm_stat_ext_ctx_query_input (size:192b/24B) */
59321 
59322 typedef struct hwrm_stat_ext_ctx_query_input {
59323 	/* The HWRM command request type. */
59324 	uint16_t	req_type;
59325 	/*
59326 	 * The completion ring to send the completion event on. This should
59327 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59328 	 */
59329 	uint16_t	cmpl_ring;
59330 	/*
59331 	 * The sequence ID is used by the driver for tracking multiple
59332 	 * commands. This ID is treated as opaque data by the firmware and
59333 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59334 	 */
59335 	uint16_t	seq_id;
59336 	/*
59337 	 * The target ID of the command:
59338 	 * * 0x0-0xFFF8 - The function ID
59339 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59340 	 * * 0xFFFD - Reserved for user-space HWRM interface
59341 	 * * 0xFFFF - HWRM
59342 	 */
59343 	uint16_t	target_id;
59344 	/*
59345 	 * A physical address pointer pointing to a host buffer that the
59346 	 * command's response data will be written. This can be either a host
59347 	 * physical address (HPA) or a guest physical address (GPA) and must
59348 	 * point to a physically contiguous block of memory.
59349 	 */
59350 	uint64_t	resp_addr;
59351 	/* ID of the extended statistics context that is being queried. */
59352 	uint32_t	stat_ctx_id;
59353 	uint8_t	flags;
59354 	/*
59355 	 * This bit is set to 1 when request is for a counter mask,
59356 	 * representing the width of each of the stats counters, rather
59357 	 * than counters themselves.
59358 	 */
59359 	#define HWRM_STAT_EXT_CTX_QUERY_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x1)
59360 	uint8_t	unused_0[3];
59361 } hwrm_stat_ext_ctx_query_input_t, *phwrm_stat_ext_ctx_query_input_t;
59362 
59363 /* hwrm_stat_ext_ctx_query_output (size:1536b/192B) */
59364 
59365 typedef struct hwrm_stat_ext_ctx_query_output {
59366 	/* The specific error status for the command. */
59367 	uint16_t	error_code;
59368 	/* The HWRM command request type. */
59369 	uint16_t	req_type;
59370 	/* The sequence ID from the original command. */
59371 	uint16_t	seq_id;
59372 	/* The length of the response data in number of bytes. */
59373 	uint16_t	resp_len;
59374 	/* Number of received unicast packets */
59375 	uint64_t	rx_ucast_pkts;
59376 	/* Number of received multicast packets */
59377 	uint64_t	rx_mcast_pkts;
59378 	/* Number of received broadcast packets */
59379 	uint64_t	rx_bcast_pkts;
59380 	/* Number of discarded packets on receive path */
59381 	uint64_t	rx_discard_pkts;
59382 	/* Number of packets on receive path with error */
59383 	uint64_t	rx_error_pkts;
59384 	/* Number of received bytes for unicast traffic */
59385 	uint64_t	rx_ucast_bytes;
59386 	/* Number of received bytes for multicast traffic */
59387 	uint64_t	rx_mcast_bytes;
59388 	/* Number of received bytes for broadcast traffic */
59389 	uint64_t	rx_bcast_bytes;
59390 	/* Number of transmitted unicast packets */
59391 	uint64_t	tx_ucast_pkts;
59392 	/* Number of transmitted multicast packets */
59393 	uint64_t	tx_mcast_pkts;
59394 	/* Number of transmitted broadcast packets */
59395 	uint64_t	tx_bcast_pkts;
59396 	/* Number of packets on transmit path with error */
59397 	uint64_t	tx_error_pkts;
59398 	/* Number of discarded packets on transmit path */
59399 	uint64_t	tx_discard_pkts;
59400 	/* Number of transmitted bytes for unicast traffic */
59401 	uint64_t	tx_ucast_bytes;
59402 	/* Number of transmitted bytes for multicast traffic */
59403 	uint64_t	tx_mcast_bytes;
59404 	/* Number of transmitted bytes for broadcast traffic */
59405 	uint64_t	tx_bcast_bytes;
59406 	/* Number of TPA eligible packets */
59407 	uint64_t	rx_tpa_eligible_pkt;
59408 	/* Number of TPA eligible bytes */
59409 	uint64_t	rx_tpa_eligible_bytes;
59410 	/* Number of TPA packets */
59411 	uint64_t	rx_tpa_pkt;
59412 	/* Number of TPA bytes */
59413 	uint64_t	rx_tpa_bytes;
59414 	/* Number of TPA errors */
59415 	uint64_t	rx_tpa_errors;
59416 	/* Number of TPA events */
59417 	uint64_t	rx_tpa_events;
59418 	uint8_t	unused_0[7];
59419 	/*
59420 	 * This field is used in Output records to indicate that the output
59421 	 * is completely written to RAM. This field should be read as '1'
59422 	 * to indicate that the output has been completely written. When
59423 	 * writing a command completion or response to an internal processor,
59424 	 * the order of writes has to be such that this field is written last.
59425 	 */
59426 	uint8_t	valid;
59427 } hwrm_stat_ext_ctx_query_output_t, *phwrm_stat_ext_ctx_query_output_t;
59428 
59429 /***************************
59430  * hwrm_stat_ctx_eng_query *
59431  ***************************/
59432 
59433 
59434 /* hwrm_stat_ctx_eng_query_input (size:192b/24B) */
59435 
59436 typedef struct hwrm_stat_ctx_eng_query_input {
59437 	/* The HWRM command request type. */
59438 	uint16_t	req_type;
59439 	/*
59440 	 * The completion ring to send the completion event on. This should
59441 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59442 	 */
59443 	uint16_t	cmpl_ring;
59444 	/*
59445 	 * The sequence ID is used by the driver for tracking multiple
59446 	 * commands. This ID is treated as opaque data by the firmware and
59447 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59448 	 */
59449 	uint16_t	seq_id;
59450 	/*
59451 	 * The target ID of the command:
59452 	 * * 0x0-0xFFF8 - The function ID
59453 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59454 	 * * 0xFFFD - Reserved for user-space HWRM interface
59455 	 * * 0xFFFF - HWRM
59456 	 */
59457 	uint16_t	target_id;
59458 	/*
59459 	 * A physical address pointer pointing to a host buffer that the
59460 	 * command's response data will be written. This can be either a host
59461 	 * physical address (HPA) or a guest physical address (GPA) and must
59462 	 * point to a physically contiguous block of memory.
59463 	 */
59464 	uint64_t	resp_addr;
59465 	/* ID of the statistics context that is being queried. */
59466 	uint32_t	stat_ctx_id;
59467 	uint8_t	unused_0[4];
59468 } hwrm_stat_ctx_eng_query_input_t, *phwrm_stat_ctx_eng_query_input_t;
59469 
59470 /* hwrm_stat_ctx_eng_query_output (size:640b/80B) */
59471 
59472 typedef struct hwrm_stat_ctx_eng_query_output {
59473 	/* The specific error status for the command. */
59474 	uint16_t	error_code;
59475 	/* The HWRM command request type. */
59476 	uint16_t	req_type;
59477 	/* The sequence ID from the original command. */
59478 	uint16_t	seq_id;
59479 	/* The length of the response data in number of bytes. */
59480 	uint16_t	resp_len;
59481 	/*
59482 	 * Count of data bytes into the Engine.
59483 	 * This includes any user supplied prefix,
59484 	 * but does not include any predefined
59485 	 * prefix data.
59486 	 */
59487 	uint64_t	eng_bytes_in;
59488 	/* Count of data bytes out of the Engine. */
59489 	uint64_t	eng_bytes_out;
59490 	/*
59491 	 * Count, in 4-byte (dword) units, of bytes
59492 	 * that are input as auxiliary data.
59493 	 * This includes the aux_cmd data.
59494 	 */
59495 	uint64_t	aux_bytes_in;
59496 	/*
59497 	 * Count, in 4-byte (dword) units, of bytes
59498 	 * that are output as auxiliary data.
59499 	 * This count is the buffer space for aux_data
59500 	 * output provided in the RQE, not the actual
59501 	 * aux_data written
59502 	 */
59503 	uint64_t	aux_bytes_out;
59504 	/* Count of number of commands executed. */
59505 	uint64_t	commands;
59506 	/*
59507 	 * Count of number of error commands.
59508 	 * These are the commands with a
59509 	 * non-zero status value.
59510 	 */
59511 	uint64_t	error_commands;
59512 	/*
59513 	 * Compression/Encryption Engine usage,
59514 	 * the unit is count of clock cycles
59515 	 */
59516 	uint64_t	cce_engine_usage;
59517 	/*
59518 	 * De-Compression/De-cryption Engine usage,
59519 	 * the unit is count of clock cycles
59520 	 */
59521 	uint64_t	cdd_engine_usage;
59522 	uint8_t	unused_0[7];
59523 	/*
59524 	 * This field is used in Output records to indicate that the output
59525 	 * is completely written to RAM. This field should be read as '1'
59526 	 * to indicate that the output has been completely written. When
59527 	 * writing a command completion or response to an internal processor,
59528 	 * the order of writes has to be such that this field is written last.
59529 	 */
59530 	uint8_t	valid;
59531 } hwrm_stat_ctx_eng_query_output_t, *phwrm_stat_ctx_eng_query_output_t;
59532 
59533 /***************************
59534  * hwrm_stat_ctx_clr_stats *
59535  ***************************/
59536 
59537 
59538 /* hwrm_stat_ctx_clr_stats_input (size:192b/24B) */
59539 
59540 typedef struct hwrm_stat_ctx_clr_stats_input {
59541 	/* The HWRM command request type. */
59542 	uint16_t	req_type;
59543 	/*
59544 	 * The completion ring to send the completion event on. This should
59545 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59546 	 */
59547 	uint16_t	cmpl_ring;
59548 	/*
59549 	 * The sequence ID is used by the driver for tracking multiple
59550 	 * commands. This ID is treated as opaque data by the firmware and
59551 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59552 	 */
59553 	uint16_t	seq_id;
59554 	/*
59555 	 * The target ID of the command:
59556 	 * * 0x0-0xFFF8 - The function ID
59557 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59558 	 * * 0xFFFD - Reserved for user-space HWRM interface
59559 	 * * 0xFFFF - HWRM
59560 	 */
59561 	uint16_t	target_id;
59562 	/*
59563 	 * A physical address pointer pointing to a host buffer that the
59564 	 * command's response data will be written. This can be either a host
59565 	 * physical address (HPA) or a guest physical address (GPA) and must
59566 	 * point to a physically contiguous block of memory.
59567 	 */
59568 	uint64_t	resp_addr;
59569 	/* ID of the statistics context that is being queried. */
59570 	uint32_t	stat_ctx_id;
59571 	uint8_t	unused_0[4];
59572 } hwrm_stat_ctx_clr_stats_input_t, *phwrm_stat_ctx_clr_stats_input_t;
59573 
59574 /* hwrm_stat_ctx_clr_stats_output (size:128b/16B) */
59575 
59576 typedef struct hwrm_stat_ctx_clr_stats_output {
59577 	/* The specific error status for the command. */
59578 	uint16_t	error_code;
59579 	/* The HWRM command request type. */
59580 	uint16_t	req_type;
59581 	/* The sequence ID from the original command. */
59582 	uint16_t	seq_id;
59583 	/* The length of the response data in number of bytes. */
59584 	uint16_t	resp_len;
59585 	uint8_t	unused_0[7];
59586 	/*
59587 	 * This field is used in Output records to indicate that the output
59588 	 * is completely written to RAM. This field should be read as '1'
59589 	 * to indicate that the output has been completely written. When
59590 	 * writing a command completion or response to an internal processor,
59591 	 * the order of writes has to be such that this field is written last.
59592 	 */
59593 	uint8_t	valid;
59594 } hwrm_stat_ctx_clr_stats_output_t, *phwrm_stat_ctx_clr_stats_output_t;
59595 
59596 /********************
59597  * hwrm_pcie_qstats *
59598  ********************/
59599 
59600 
59601 /* hwrm_pcie_qstats_input (size:256b/32B) */
59602 
59603 typedef struct hwrm_pcie_qstats_input {
59604 	/* The HWRM command request type. */
59605 	uint16_t	req_type;
59606 	/*
59607 	 * The completion ring to send the completion event on. This should
59608 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59609 	 */
59610 	uint16_t	cmpl_ring;
59611 	/*
59612 	 * The sequence ID is used by the driver for tracking multiple
59613 	 * commands. This ID is treated as opaque data by the firmware and
59614 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59615 	 */
59616 	uint16_t	seq_id;
59617 	/*
59618 	 * The target ID of the command:
59619 	 * * 0x0-0xFFF8 - The function ID
59620 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59621 	 * * 0xFFFD - Reserved for user-space HWRM interface
59622 	 * * 0xFFFF - HWRM
59623 	 */
59624 	uint16_t	target_id;
59625 	/*
59626 	 * A physical address pointer pointing to a host buffer that the
59627 	 * command's response data will be written. This can be either a host
59628 	 * physical address (HPA) or a guest physical address (GPA) and must
59629 	 * point to a physically contiguous block of memory.
59630 	 */
59631 	uint64_t	resp_addr;
59632 	/*
59633 	 * The size of PCIe statistics block in bytes.
59634 	 * Firmware will DMA the PCIe statistics to
59635 	 * the host with this field size in the response.
59636 	 */
59637 	uint16_t	pcie_stat_size;
59638 	uint8_t	unused_0[6];
59639 	/*
59640 	 * This is the host address where
59641 	 * PCIe statistics will be stored
59642 	 */
59643 	uint64_t	pcie_stat_host_addr;
59644 } hwrm_pcie_qstats_input_t, *phwrm_pcie_qstats_input_t;
59645 
59646 /* hwrm_pcie_qstats_output (size:128b/16B) */
59647 
59648 typedef struct hwrm_pcie_qstats_output {
59649 	/* The specific error status for the command. */
59650 	uint16_t	error_code;
59651 	/* The HWRM command request type. */
59652 	uint16_t	req_type;
59653 	/* The sequence ID from the original command. */
59654 	uint16_t	seq_id;
59655 	/* The length of the response data in number of bytes. */
59656 	uint16_t	resp_len;
59657 	/* The size of PCIe statistics block in bytes. */
59658 	uint16_t	pcie_stat_size;
59659 	uint8_t	unused_0[5];
59660 	/*
59661 	 * This field is used in Output records to indicate that the output
59662 	 * is completely written to RAM. This field should be read as '1'
59663 	 * to indicate that the output has been completely written. When
59664 	 * writing a command completion or response to an internal processor,
59665 	 * the order of writes has to be such that this field is written last.
59666 	 */
59667 	uint8_t	valid;
59668 } hwrm_pcie_qstats_output_t, *phwrm_pcie_qstats_output_t;
59669 
59670 /* PCIe Statistics Formats */
59671 /* pcie_ctx_hw_stats (size:768b/96B) */
59672 
59673 typedef struct pcie_ctx_hw_stats {
59674 	/* Number of physical layer receiver errors */
59675 	uint64_t	pcie_pl_signal_integrity;
59676 	/* Number of DLLP CRC errors detected by Data Link Layer */
59677 	uint64_t	pcie_dl_signal_integrity;
59678 	/*
59679 	 * Number of TLP LCRC and sequence number errors detected
59680 	 * by Data Link Layer
59681 	 */
59682 	uint64_t	pcie_tl_signal_integrity;
59683 	/* Number of times LTSSM entered Recovery state */
59684 	uint64_t	pcie_link_integrity;
59685 	/* Report number of TLP bits that have been transmitted in Mbps */
59686 	uint64_t	pcie_tx_traffic_rate;
59687 	/* Report number of TLP bits that have been received in Mbps */
59688 	uint64_t	pcie_rx_traffic_rate;
59689 	/* Number of DLLP bytes that have been transmitted */
59690 	uint64_t	pcie_tx_dllp_statistics;
59691 	/* Number of DLLP bytes that have been received */
59692 	uint64_t	pcie_rx_dllp_statistics;
59693 	/*
59694 	 * Number of times spent in each phase of gen3
59695 	 * equalization
59696 	 */
59697 	uint64_t	pcie_equalization_time;
59698 	/* Records the last 16 transitions of the LTSSM */
59699 	uint32_t	pcie_ltssm_histogram[4];
59700 	/*
59701 	 * Record the last 8 reasons on why LTSSM transitioned
59702 	 * to Recovery
59703 	 */
59704 	uint64_t	pcie_recovery_histogram;
59705 } pcie_ctx_hw_stats_t, *ppcie_ctx_hw_stats_t;
59706 
59707 /****************************
59708  * hwrm_stat_generic_qstats *
59709  ****************************/
59710 
59711 
59712 /* hwrm_stat_generic_qstats_input (size:256b/32B) */
59713 
59714 typedef struct hwrm_stat_generic_qstats_input {
59715 	/* The HWRM command request type. */
59716 	uint16_t	req_type;
59717 	/*
59718 	 * The completion ring to send the completion event on. This should
59719 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59720 	 */
59721 	uint16_t	cmpl_ring;
59722 	/*
59723 	 * The sequence ID is used by the driver for tracking multiple
59724 	 * commands. This ID is treated as opaque data by the firmware and
59725 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59726 	 */
59727 	uint16_t	seq_id;
59728 	/*
59729 	 * The target ID of the command:
59730 	 * * 0x0-0xFFF8 - The function ID
59731 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59732 	 * * 0xFFFD - Reserved for user-space HWRM interface
59733 	 * * 0xFFFF - HWRM
59734 	 */
59735 	uint16_t	target_id;
59736 	/*
59737 	 * A physical address pointer pointing to a host buffer that the
59738 	 * command's response data will be written. This can be either a host
59739 	 * physical address (HPA) or a guest physical address (GPA) and must
59740 	 * point to a physically contiguous block of memory.
59741 	 */
59742 	uint64_t	resp_addr;
59743 	/*
59744 	 * The size of the generic statistics buffer passed in the
59745 	 * generic_stat_host_addr in bytes.
59746 	 * Firmware will not exceed this size when it DMAs the
59747 	 * statistics structure to the host. The actual DMA size
59748 	 * will be returned in the response.
59749 	 */
59750 	uint16_t	generic_stat_size;
59751 	uint8_t	flags;
59752 	/*
59753 	 * The bit should be set to 1 when request is for the counter mask
59754 	 * representing the width of each of the stats counters, rather
59755 	 * than counters themselves.
59756 	 */
59757 	#define HWRM_STAT_GENERIC_QSTATS_INPUT_FLAGS_COUNTER_MASK	UINT32_C(0x1)
59758 	uint8_t	unused_0[5];
59759 	/*
59760 	 * This is the host address where
59761 	 * generic statistics will be stored
59762 	 */
59763 	uint64_t	generic_stat_host_addr;
59764 } hwrm_stat_generic_qstats_input_t, *phwrm_stat_generic_qstats_input_t;
59765 
59766 /* hwrm_stat_generic_qstats_output (size:128b/16B) */
59767 
59768 typedef struct hwrm_stat_generic_qstats_output {
59769 	/* The specific error status for the command. */
59770 	uint16_t	error_code;
59771 	/* The HWRM command request type. */
59772 	uint16_t	req_type;
59773 	/* The sequence ID from the original command. */
59774 	uint16_t	seq_id;
59775 	/* The length of the response data in number of bytes. */
59776 	uint16_t	resp_len;
59777 	/* The size of Generic Statistics block in bytes. */
59778 	uint16_t	generic_stat_size;
59779 	uint8_t	unused_0[5];
59780 	/*
59781 	 * This field is used in Output records to indicate that the output
59782 	 * is completely written to RAM. This field should be read as '1'
59783 	 * to indicate that the output has been completely written.
59784 	 * When writing a command completion or response to an internal
59785 	 * processor, the order of writes has to be such that this field is
59786 	 * written last.
59787 	 */
59788 	uint8_t	valid;
59789 } hwrm_stat_generic_qstats_output_t, *phwrm_stat_generic_qstats_output_t;
59790 
59791 /* Generic Statistic Format */
59792 /* generic_sw_hw_stats (size:1472b/184B) */
59793 
59794 typedef struct generic_sw_hw_stats {
59795 	/*
59796 	 * This is the number of TLP bytes that have been transmitted for
59797 	 * the caller PF.
59798 	 */
59799 	uint64_t	pcie_statistics_tx_tlp;
59800 	/*
59801 	 * This is the number of TLP bytes that have been received
59802 	 * for the caller PF.
59803 	 */
59804 	uint64_t	pcie_statistics_rx_tlp;
59805 	/* Posted Header Flow Control credits available for the caller PF. */
59806 	uint64_t	pcie_credit_fc_hdr_posted;
59807 	/* Non-posted Header Flow Control credits available for the caller PF. */
59808 	uint64_t	pcie_credit_fc_hdr_nonposted;
59809 	/* Completion Header Flow Control credits available for the caller PF. */
59810 	uint64_t	pcie_credit_fc_hdr_cmpl;
59811 	/* Posted Data Flow Control credits available for the caller PF. */
59812 	uint64_t	pcie_credit_fc_data_posted;
59813 	/* Non-Posted Data Flow Control credits available for the caller PF. */
59814 	uint64_t	pcie_credit_fc_data_nonposted;
59815 	/* Completion Data Flow Control credits available for the caller PF. */
59816 	uint64_t	pcie_credit_fc_data_cmpl;
59817 	/*
59818 	 * Available Non-posted credit for target flow control reads or
59819 	 * config for the caller PF.
59820 	 */
59821 	uint64_t	pcie_credit_fc_tgt_nonposted;
59822 	/*
59823 	 * Available posted data credit for target flow control writes
59824 	 * for the caller PF.
59825 	 */
59826 	uint64_t	pcie_credit_fc_tgt_data_posted;
59827 	/*
59828 	 * Available posted header credit for target flow control writes
59829 	 * for the caller PF.
59830 	 */
59831 	uint64_t	pcie_credit_fc_tgt_hdr_posted;
59832 	/* Available completion flow control header credits for the caller PF. */
59833 	uint64_t	pcie_credit_fc_cmpl_hdr_posted;
59834 	/* Available completion flow control data credits. */
59835 	uint64_t	pcie_credit_fc_cmpl_data_posted;
59836 	/*
59837 	 * Displays Time information of the longest completion time from any of
59838 	 * the 4 tags for the caller PF. The unit of time recorded is in
59839 	 * microseconds.
59840 	 */
59841 	uint64_t	pcie_cmpl_longest;
59842 	/*
59843 	 * Displays Time information of the shortest completion time from any
59844 	 * of the 4 tags for the caller PF. The unit of time recorded is in
59845 	 * microseconds.
59846 	 */
59847 	uint64_t	pcie_cmpl_shortest;
59848 	/*
59849 	 * This field contains the total number of CFCQ 'misses' observed for
59850 	 * all the PF's.
59851 	 */
59852 	uint64_t	cache_miss_count_cfcq;
59853 	/*
59854 	 * This field contains the total number of CFCS 'misses' observed for
59855 	 * all the PF's.
59856 	 */
59857 	uint64_t	cache_miss_count_cfcs;
59858 	/*
59859 	 * This field contains the total number of CFCC 'misses' observed for
59860 	 * all the PF's.
59861 	 */
59862 	uint64_t	cache_miss_count_cfcc;
59863 	/*
59864 	 * This field contains the total number of CFCM 'misses' observed
59865 	 * for all the PF's.
59866 	 */
59867 	uint64_t	cache_miss_count_cfcm;
59868 	/*
59869 	 * Total number of Doorbell messages dropped from the DB FIFO.
59870 	 * This counter is only applicable for devices that support
59871 	 * the hardware based doorbell drop recovery feature.
59872 	 */
59873 	uint64_t	hw_db_recov_dbs_dropped;
59874 	/*
59875 	 * Total number of doorbell drops serviced.
59876 	 * This counter is only applicable for devices that support
59877 	 * the hardware based doorbell drop recovery feature.
59878 	 */
59879 	uint64_t	hw_db_recov_drops_serviced;
59880 	/*
59881 	 * Total number of dropped doorbells recovered.
59882 	 * This counter is only applicable for devices that support
59883 	 * the hardware based doorbell drop recovery feature.
59884 	 */
59885 	uint64_t	hw_db_recov_dbs_recovered;
59886 	/*
59887 	 * Total number of out of order doorbell messages dropped.
59888 	 * This counter is only applicable for devices that support
59889 	 * the hardware based doorbell drop recovery feature.
59890 	 */
59891 	uint64_t	hw_db_recov_oo_drop_count;
59892 } generic_sw_hw_stats_t, *pgeneric_sw_hw_stats_t;
59893 
59894 /*****************************
59895  * hwrm_stat_db_error_qstats *
59896  *****************************/
59897 
59898 
59899 /* hwrm_stat_db_error_qstats_input (size:128b/16B) */
59900 
59901 typedef struct hwrm_stat_db_error_qstats_input {
59902 	/* The HWRM command request type. */
59903 	uint16_t	req_type;
59904 	/*
59905 	 * The completion ring to send the completion event on. This should
59906 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59907 	 */
59908 	uint16_t	cmpl_ring;
59909 	/*
59910 	 * The sequence ID is used by the driver for tracking multiple
59911 	 * commands. This ID is treated as opaque data by the firmware and
59912 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59913 	 */
59914 	uint16_t	seq_id;
59915 	/*
59916 	 * The target ID of the command:
59917 	 * * 0x0-0xFFF8 - The function ID
59918 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59919 	 * * 0xFFFD - Reserved for user-space HWRM interface
59920 	 * * 0xFFFF - HWRM
59921 	 */
59922 	uint16_t	target_id;
59923 	/*
59924 	 * A physical address pointer pointing to a host buffer that the
59925 	 * command's response data will be written. This can be either a host
59926 	 * physical address (HPA) or a guest physical address (GPA) and must
59927 	 * point to a physically contiguous block of memory.
59928 	 */
59929 	uint64_t	resp_addr;
59930 } hwrm_stat_db_error_qstats_input_t, *phwrm_stat_db_error_qstats_input_t;
59931 
59932 /* hwrm_stat_db_error_qstats_output (size:320b/40B) */
59933 
59934 typedef struct hwrm_stat_db_error_qstats_output {
59935 	/* The specific error status for the command. */
59936 	uint16_t	error_code;
59937 	/* The HWRM command request type. */
59938 	uint16_t	req_type;
59939 	/* The sequence ID from the original command. */
59940 	uint16_t	seq_id;
59941 	/* The length of the response data in number of bytes. */
59942 	uint16_t	resp_len;
59943 	/*
59944 	 * Specifies count of doorbells dropped due to RoCE SQs or L2
59945 	 * Tx Rings being in invalid state.
59946 	 */
59947 	uint32_t	tx_db_drop_invalid_qp_state;
59948 	/*
59949 	 * Specifies count of doorbells dropped due to RoCE RQs/SRQs or
59950 	 * L2 Rx Rings being used in invalid state.
59951 	 */
59952 	uint32_t	rx_db_drop_invalid_rq_state;
59953 	/*
59954 	 * Specifies count of doorbells dropped for any doorbell type
59955 	 * due to formatting errors such as illegal doorbell message
59956 	 * type, index out of range etc.
59957 	 */
59958 	uint32_t	tx_db_drop_format_error;
59959 	/*
59960 	 * Specifies count of express mode doorbells dropped for any
59961 	 * doorbell type due to error conditions such as DPI check,
59962 	 * context load error etc.
59963 	 */
59964 	uint32_t	express_db_dropped_misc_error;
59965 	/*
59966 	 * Specifies count of express mode doorbells dropped due to
59967 	 * RoCE SQ overflow.
59968 	 */
59969 	uint32_t	express_db_dropped_sq_overflow;
59970 	/*
59971 	 * Specifies count of express mode doorbells dropped due to
59972 	 * RoCE RQ overflow.
59973 	 */
59974 	uint32_t	express_db_dropped_rq_overflow;
59975 	uint8_t	unused_0[7];
59976 	/*
59977 	 * This field is used in Output records to indicate that the output
59978 	 * is completely written to RAM. This field should be read as '1'
59979 	 * to indicate that the output has been completely written.
59980 	 * When writing a command completion or response to an internal
59981 	 * processor, the order of writes has to be such that this field is
59982 	 * written last.
59983 	 */
59984 	uint8_t	valid;
59985 } hwrm_stat_db_error_qstats_output_t, *phwrm_stat_db_error_qstats_output_t;
59986 
59987 /*****************
59988  * hwrm_fw_reset *
59989  *****************/
59990 
59991 
59992 /* hwrm_fw_reset_input (size:192b/24B) */
59993 
59994 typedef struct hwrm_fw_reset_input {
59995 	/* The HWRM command request type. */
59996 	uint16_t	req_type;
59997 	/*
59998 	 * The completion ring to send the completion event on. This should
59999 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60000 	 */
60001 	uint16_t	cmpl_ring;
60002 	/*
60003 	 * The sequence ID is used by the driver for tracking multiple
60004 	 * commands. This ID is treated as opaque data by the firmware and
60005 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60006 	 */
60007 	uint16_t	seq_id;
60008 	/*
60009 	 * The target ID of the command:
60010 	 * * 0x0-0xFFF8 - The function ID
60011 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60012 	 * * 0xFFFD - Reserved for user-space HWRM interface
60013 	 * * 0xFFFF - HWRM
60014 	 */
60015 	uint16_t	target_id;
60016 	/*
60017 	 * A physical address pointer pointing to a host buffer that the
60018 	 * command's response data will be written. This can be either a host
60019 	 * physical address (HPA) or a guest physical address (GPA) and must
60020 	 * point to a physically contiguous block of memory.
60021 	 */
60022 	uint64_t	resp_addr;
60023 	/* Type of embedded processor. */
60024 	uint8_t	embedded_proc_type;
60025 	/* Boot Processor */
60026 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_BOOT		UINT32_C(0x0)
60027 	/* Management Processor */
60028 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_MGMT		UINT32_C(0x1)
60029 	/* Network control processor */
60030 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_NETCTRL		UINT32_C(0x2)
60031 	/* RoCE control processor */
60032 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_ROCE		UINT32_C(0x3)
60033 	/*
60034 	 * Host (in multi-host environment): This is only valid if requester
60035 	 * is IPC. Reinit host hardware resources and PCIe.
60036 	 */
60037 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_HOST		UINT32_C(0x4)
60038 	/*
60039 	 * AP processor complex (in multi-host environment).
60040 	 * Use host_idx to control which core is reset.
60041 	 */
60042 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_AP			UINT32_C(0x5)
60043 	/* Reset all blocks of the chip (including all processors) */
60044 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_CHIP		UINT32_C(0x6)
60045 	/*
60046 	 * Host (in multi-host environment): This is only valid if requester
60047 	 * is IPC. Reinit host hardware resources.
60048 	 */
60049 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_HOST_RESOURCE_REINIT  UINT32_C(0x7)
60050 	/*
60051 	 * Activate firmware that has been programmed to NVM. The
60052 	 * activation is done in an impactless manner as part of the scheme
60053 	 * where hwrm_fw_state_backup precedes the call, and
60054 	 * hwrm_fw_state_restore follows it. Before this call returns, FW
60055 	 * status is set to a non-0x8000 value to disambiguate reset pending
60056 	 * from reset complete. The reset process begins after this call
60057 	 * returns to ensure this HWRM has completed before reset begins.
60058 	 */
60059 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_IMPACTLESS_ACTIVATION UINT32_C(0x8)
60060 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_LAST		HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_IMPACTLESS_ACTIVATION
60061 	/* Type of self reset. */
60062 	uint8_t	selfrst_status;
60063 	/* No Self Reset */
60064 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTNONE	UINT32_C(0x0)
60065 	/* Self Reset as soon as possible to do so safely */
60066 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTASAP	UINT32_C(0x1)
60067 	/* Self Reset on PCIe Reset */
60068 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTPCIERST   UINT32_C(0x2)
60069 	/* Self Reset immediately after notification to all clients. */
60070 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTIMMEDIATE UINT32_C(0x3)
60071 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_LAST		HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTIMMEDIATE
60072 	/*
60073 	 * Indicate which host is being reset. 0 means first host.
60074 	 * Only valid when embedded_proc_type is host in multihost
60075 	 * environment
60076 	 */
60077 	uint8_t	host_idx;
60078 	uint8_t	flags;
60079 	/*
60080 	 * When this bit is '1', then the core firmware initiates
60081 	 * the reset only after graceful shut down of all registered
60082 	 * instances. If not, the device will continue with the existing
60083 	 * firmware.
60084 	 */
60085 	#define HWRM_FW_RESET_INPUT_FLAGS_RESET_GRACEFUL	UINT32_C(0x1)
60086 	/*
60087 	 * When this bit is '1', then drivers will be notified that
60088 	 * that the purpose of the reset was a firmware activation.
60089 	 * Such notifications are delivered via the RESET_NOTIFY async
60090 	 * event (reason_code: fw_activation).
60091 	 */
60092 	#define HWRM_FW_RESET_INPUT_FLAGS_FW_ACTIVATION	UINT32_C(0x2)
60093 	uint8_t	unused_0[4];
60094 } hwrm_fw_reset_input_t, *phwrm_fw_reset_input_t;
60095 
60096 /* hwrm_fw_reset_output (size:128b/16B) */
60097 
60098 typedef struct hwrm_fw_reset_output {
60099 	/* The specific error status for the command. */
60100 	uint16_t	error_code;
60101 	/* The HWRM command request type. */
60102 	uint16_t	req_type;
60103 	/* The sequence ID from the original command. */
60104 	uint16_t	seq_id;
60105 	/* The length of the response data in number of bytes. */
60106 	uint16_t	resp_len;
60107 	/* Type of self reset. */
60108 	uint8_t	selfrst_status;
60109 	/* No Self Reset */
60110 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTNONE	UINT32_C(0x0)
60111 	/* Self Reset as soon as possible to do so safely */
60112 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTASAP	UINT32_C(0x1)
60113 	/* Self Reset on PCIe Reset */
60114 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTPCIERST   UINT32_C(0x2)
60115 	/* Self Reset immediately after notification to all clients. */
60116 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTIMMEDIATE UINT32_C(0x3)
60117 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_LAST		HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTIMMEDIATE
60118 	uint8_t	unused_0[6];
60119 	/*
60120 	 * This field is used in Output records to indicate that the output
60121 	 * is completely written to RAM. This field should be read as '1'
60122 	 * to indicate that the output has been completely written. When
60123 	 * writing a command completion or response to an internal processor,
60124 	 * the order of writes has to be such that this field is written last.
60125 	 */
60126 	uint8_t	valid;
60127 } hwrm_fw_reset_output_t, *phwrm_fw_reset_output_t;
60128 
60129 /*******************
60130  * hwrm_fw_qstatus *
60131  *******************/
60132 
60133 
60134 /* hwrm_fw_qstatus_input (size:192b/24B) */
60135 
60136 typedef struct hwrm_fw_qstatus_input {
60137 	/* The HWRM command request type. */
60138 	uint16_t	req_type;
60139 	/*
60140 	 * The completion ring to send the completion event on. This should
60141 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60142 	 */
60143 	uint16_t	cmpl_ring;
60144 	/*
60145 	 * The sequence ID is used by the driver for tracking multiple
60146 	 * commands. This ID is treated as opaque data by the firmware and
60147 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60148 	 */
60149 	uint16_t	seq_id;
60150 	/*
60151 	 * The target ID of the command:
60152 	 * * 0x0-0xFFF8 - The function ID
60153 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60154 	 * * 0xFFFD - Reserved for user-space HWRM interface
60155 	 * * 0xFFFF - HWRM
60156 	 */
60157 	uint16_t	target_id;
60158 	/*
60159 	 * A physical address pointer pointing to a host buffer that the
60160 	 * command's response data will be written. This can be either a host
60161 	 * physical address (HPA) or a guest physical address (GPA) and must
60162 	 * point to a physically contiguous block of memory.
60163 	 */
60164 	uint64_t	resp_addr;
60165 	/* Type of embedded processor. */
60166 	uint8_t	embedded_proc_type;
60167 	/* Boot Processor */
60168 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_BOOT	UINT32_C(0x0)
60169 	/* Management Processor */
60170 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_MGMT	UINT32_C(0x1)
60171 	/* Network control processor */
60172 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_NETCTRL UINT32_C(0x2)
60173 	/* RoCE control processor */
60174 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_ROCE	UINT32_C(0x3)
60175 	/*
60176 	 * Host (in multi-host environment): This is only valid if requester
60177 	 * is IPC
60178 	 */
60179 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_HOST	UINT32_C(0x4)
60180 	/*
60181 	 * AP processor complex (in multi-host environment). Use host_idx to
60182 	 * control which core is reset
60183 	 */
60184 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_AP	UINT32_C(0x5)
60185 	/* Reset all blocks of the chip (including all processors) */
60186 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_CHIP	UINT32_C(0x6)
60187 	#define HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_LAST   HWRM_FW_QSTATUS_INPUT_EMBEDDED_PROC_TYPE_CHIP
60188 	uint8_t	unused_0[7];
60189 } hwrm_fw_qstatus_input_t, *phwrm_fw_qstatus_input_t;
60190 
60191 /* hwrm_fw_qstatus_output (size:128b/16B) */
60192 
60193 typedef struct hwrm_fw_qstatus_output {
60194 	/* The specific error status for the command. */
60195 	uint16_t	error_code;
60196 	/* The HWRM command request type. */
60197 	uint16_t	req_type;
60198 	/* The sequence ID from the original command. */
60199 	uint16_t	seq_id;
60200 	/* The length of the response data in number of bytes. */
60201 	uint16_t	resp_len;
60202 	/* Type of self reset. */
60203 	uint8_t	selfrst_status;
60204 	/* No Self Reset */
60205 	#define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTNONE	UINT32_C(0x0)
60206 	/* Self Reset as soon as possible to do so safely */
60207 	#define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTASAP	UINT32_C(0x1)
60208 	/* Self Reset on PCIe Reset */
60209 	#define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTPCIERST UINT32_C(0x2)
60210 	/* NIC power cycle (system cold boot) required */
60211 	#define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTPOWER   UINT32_C(0x3)
60212 	#define HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_LAST	HWRM_FW_QSTATUS_OUTPUT_SELFRST_STATUS_SELFRSTPOWER
60213 	/*
60214 	 * The action needed to apply any pend nvm option changes.
60215 	 * If multiple options have been set the highest level
60216 	 * action is reported.
60217 	 */
60218 	uint8_t	nvm_option_action_status;
60219 	/* No Action needed */
60220 	#define HWRM_FW_QSTATUS_OUTPUT_NVM_OPTION_ACTION_STATUS_NVMOPT_ACTION_NONE	UINT32_C(0x0)
60221 	/* Hot reset needed to apply nvm options */
60222 	#define HWRM_FW_QSTATUS_OUTPUT_NVM_OPTION_ACTION_STATUS_NVMOPT_ACTION_HOTRESET UINT32_C(0x1)
60223 	/* Warm boot needed to apply nvm options */
60224 	#define HWRM_FW_QSTATUS_OUTPUT_NVM_OPTION_ACTION_STATUS_NVMOPT_ACTION_WARMBOOT UINT32_C(0x2)
60225 	/* Cold boot needed to apply nvm options */
60226 	#define HWRM_FW_QSTATUS_OUTPUT_NVM_OPTION_ACTION_STATUS_NVMOPT_ACTION_COLDBOOT UINT32_C(0x3)
60227 	#define HWRM_FW_QSTATUS_OUTPUT_NVM_OPTION_ACTION_STATUS_LAST		HWRM_FW_QSTATUS_OUTPUT_NVM_OPTION_ACTION_STATUS_NVMOPT_ACTION_COLDBOOT
60228 	uint8_t	unused_0[5];
60229 	/*
60230 	 * This field is used in Output records to indicate that the output
60231 	 * is completely written to RAM. This field should be read as '1'
60232 	 * to indicate that the output has been completely written. When
60233 	 * writing a command completion or response to an internal processor,
60234 	 * the order of writes has to be such that this field is written last.
60235 	 */
60236 	uint8_t	valid;
60237 } hwrm_fw_qstatus_output_t, *phwrm_fw_qstatus_output_t;
60238 
60239 /********************
60240  * hwrm_fw_set_time *
60241  ********************/
60242 
60243 
60244 /* hwrm_fw_set_time_input (size:256b/32B) */
60245 
60246 typedef struct hwrm_fw_set_time_input {
60247 	/* The HWRM command request type. */
60248 	uint16_t	req_type;
60249 	/*
60250 	 * The completion ring to send the completion event on. This should
60251 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60252 	 */
60253 	uint16_t	cmpl_ring;
60254 	/*
60255 	 * The sequence ID is used by the driver for tracking multiple
60256 	 * commands. This ID is treated as opaque data by the firmware and
60257 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60258 	 */
60259 	uint16_t	seq_id;
60260 	/*
60261 	 * The target ID of the command:
60262 	 * * 0x0-0xFFF8 - The function ID
60263 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60264 	 * * 0xFFFD - Reserved for user-space HWRM interface
60265 	 * * 0xFFFF - HWRM
60266 	 */
60267 	uint16_t	target_id;
60268 	/*
60269 	 * A physical address pointer pointing to a host buffer that the
60270 	 * command's response data will be written. This can be either a host
60271 	 * physical address (HPA) or a guest physical address (GPA) and must
60272 	 * point to a physically contiguous block of memory.
60273 	 */
60274 	uint64_t	resp_addr;
60275 	/* Current year */
60276 	uint16_t	year;
60277 	/* Date/time is not known */
60278 	#define HWRM_FW_SET_TIME_INPUT_YEAR_UNKNOWN UINT32_C(0x0)
60279 	#define HWRM_FW_SET_TIME_INPUT_YEAR_LAST   HWRM_FW_SET_TIME_INPUT_YEAR_UNKNOWN
60280 	/* Current month of year (1-12) */
60281 	uint8_t	month;
60282 	/* Current day of month (1-31) */
60283 	uint8_t	day;
60284 	/* Current hour (0-23) */
60285 	uint8_t	hour;
60286 	/* Current minute (0-59) */
60287 	uint8_t	minute;
60288 	/* Current second (0-59) */
60289 	uint8_t	second;
60290 	uint8_t	unused_0;
60291 	/* Current millisecond (0-999) */
60292 	uint16_t	millisecond;
60293 	/* Minutes east of UTC, 0xffff if TZ is not known */
60294 	int16_t	zone;
60295 	/* Time zone is Coordinated Universal Time (UTC) */
60296 	#define HWRM_FW_SET_TIME_INPUT_ZONE_UTC	0
60297 	/* Time zone is not known */
60298 	#define HWRM_FW_SET_TIME_INPUT_ZONE_UNKNOWN 65535
60299 	#define HWRM_FW_SET_TIME_INPUT_ZONE_LAST   HWRM_FW_SET_TIME_INPUT_ZONE_UNKNOWN
60300 	uint8_t	unused_1[4];
60301 } hwrm_fw_set_time_input_t, *phwrm_fw_set_time_input_t;
60302 
60303 /* hwrm_fw_set_time_output (size:128b/16B) */
60304 
60305 typedef struct hwrm_fw_set_time_output {
60306 	/* The specific error status for the command. */
60307 	uint16_t	error_code;
60308 	/* The HWRM command request type. */
60309 	uint16_t	req_type;
60310 	/* The sequence ID from the original command. */
60311 	uint16_t	seq_id;
60312 	/* The length of the response data in number of bytes. */
60313 	uint16_t	resp_len;
60314 	uint8_t	unused_0[7];
60315 	/*
60316 	 * This field is used in Output records to indicate that the output
60317 	 * is completely written to RAM. This field should be read as '1'
60318 	 * to indicate that the output has been completely written. When
60319 	 * writing a command completion or response to an internal processor,
60320 	 * the order of writes has to be such that this field is written last.
60321 	 */
60322 	uint8_t	valid;
60323 } hwrm_fw_set_time_output_t, *phwrm_fw_set_time_output_t;
60324 
60325 /********************
60326  * hwrm_fw_get_time *
60327  ********************/
60328 
60329 
60330 /* hwrm_fw_get_time_input (size:128b/16B) */
60331 
60332 typedef struct hwrm_fw_get_time_input {
60333 	/* The HWRM command request type. */
60334 	uint16_t	req_type;
60335 	/*
60336 	 * The completion ring to send the completion event on. This should
60337 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60338 	 */
60339 	uint16_t	cmpl_ring;
60340 	/*
60341 	 * The sequence ID is used by the driver for tracking multiple
60342 	 * commands. This ID is treated as opaque data by the firmware and
60343 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60344 	 */
60345 	uint16_t	seq_id;
60346 	/*
60347 	 * The target ID of the command:
60348 	 * * 0x0-0xFFF8 - The function ID
60349 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60350 	 * * 0xFFFD - Reserved for user-space HWRM interface
60351 	 * * 0xFFFF - HWRM
60352 	 */
60353 	uint16_t	target_id;
60354 	/*
60355 	 * A physical address pointer pointing to a host buffer that the
60356 	 * command's response data will be written. This can be either a host
60357 	 * physical address (HPA) or a guest physical address (GPA) and must
60358 	 * point to a physically contiguous block of memory.
60359 	 */
60360 	uint64_t	resp_addr;
60361 } hwrm_fw_get_time_input_t, *phwrm_fw_get_time_input_t;
60362 
60363 /* hwrm_fw_get_time_output (size:192b/24B) */
60364 
60365 typedef struct hwrm_fw_get_time_output {
60366 	/* The specific error status for the command. */
60367 	uint16_t	error_code;
60368 	/* The HWRM command request type. */
60369 	uint16_t	req_type;
60370 	/* The sequence ID from the original command. */
60371 	uint16_t	seq_id;
60372 	/* The length of the response data in number of bytes. */
60373 	uint16_t	resp_len;
60374 	/* Current year */
60375 	uint16_t	year;
60376 	/* Date/time is not known */
60377 	#define HWRM_FW_GET_TIME_OUTPUT_YEAR_UNKNOWN UINT32_C(0x0)
60378 	#define HWRM_FW_GET_TIME_OUTPUT_YEAR_LAST   HWRM_FW_GET_TIME_OUTPUT_YEAR_UNKNOWN
60379 	/* Current month of year (1-12) */
60380 	uint8_t	month;
60381 	/* Current day of month (1-31) */
60382 	uint8_t	day;
60383 	/* Current hour (0-23) */
60384 	uint8_t	hour;
60385 	/* Current minute (0-59) */
60386 	uint8_t	minute;
60387 	/* Current second (0-59) */
60388 	uint8_t	second;
60389 	uint8_t	unused_0;
60390 	/* Current millisecond (0-999) */
60391 	uint16_t	millisecond;
60392 	/* Minutes east of UTC, 0xffff if TZ is not known */
60393 	int16_t	zone;
60394 	/* Time zone is Coordinated Universal Time (UTC) */
60395 	#define HWRM_FW_GET_TIME_OUTPUT_ZONE_UTC	0
60396 	/* Time zone is not known */
60397 	#define HWRM_FW_GET_TIME_OUTPUT_ZONE_UNKNOWN 65535
60398 	#define HWRM_FW_GET_TIME_OUTPUT_ZONE_LAST   HWRM_FW_GET_TIME_OUTPUT_ZONE_UNKNOWN
60399 	uint8_t	unused_1[3];
60400 	/*
60401 	 * This field is used in Output records to indicate that the output
60402 	 * is completely written to RAM. This field should be read as '1'
60403 	 * to indicate that the output has been completely written. When
60404 	 * writing a command completion or response to an internal processor,
60405 	 * the order of writes has to be such that this field is written last.
60406 	 */
60407 	uint8_t	valid;
60408 } hwrm_fw_get_time_output_t, *phwrm_fw_get_time_output_t;
60409 
60410 /* hwrm_struct_hdr (size:128b/16B) */
60411 
60412 typedef struct hwrm_struct_hdr {
60413 	/* This value indicates the structured data ID. */
60414 	uint16_t	struct_id;
60415 	/* LLDP configuration structured data ID. */
60416 	#define HWRM_STRUCT_HDR_STRUCT_ID_LLDP_CFG	UINT32_C(0x41b)
60417 	/* DCBX ETS configuration structured data ID. */
60418 	#define HWRM_STRUCT_HDR_STRUCT_ID_DCBX_ETS	UINT32_C(0x41d)
60419 	/* DCBX PFC configuration structured data ID. */
60420 	#define HWRM_STRUCT_HDR_STRUCT_ID_DCBX_PFC	UINT32_C(0x41f)
60421 	/* DCBX APP configuration structured data ID. */
60422 	#define HWRM_STRUCT_HDR_STRUCT_ID_DCBX_APP	UINT32_C(0x421)
60423 	/* DCBX state configuration structured data ID for all DCBX features. */
60424 	#define HWRM_STRUCT_HDR_STRUCT_ID_DCBX_FEATURE_STATE UINT32_C(0x422)
60425 	/*
60426 	 * LLDP generic structured data ID. This is used with
60427 	 * GET_STRUCTURED_DATA only.
60428 	 */
60429 	#define HWRM_STRUCT_HDR_STRUCT_ID_LLDP_GENERIC	UINT32_C(0x424)
60430 	/*
60431 	 * LLDP device structured data ID. This is used with
60432 	 * GET_STRUCTURED_DATA only.
60433 	 */
60434 	#define HWRM_STRUCT_HDR_STRUCT_ID_LLDP_DEVICE	UINT32_C(0x426)
60435 	/* Power Backup info */
60436 	#define HWRM_STRUCT_HDR_STRUCT_ID_POWER_BKUP	UINT32_C(0x427)
60437 	/* reserved for AFM usage. */
60438 	#define HWRM_STRUCT_HDR_STRUCT_ID_AFM_OPAQUE	UINT32_C(0x1)
60439 	/* Port description. */
60440 	#define HWRM_STRUCT_HDR_STRUCT_ID_PORT_DESCRIPTION   UINT32_C(0xa)
60441 	/* RSSv2 Configuration. */
60442 	#define HWRM_STRUCT_HDR_STRUCT_ID_RSS_V2		UINT32_C(0x64)
60443 	/* MSI-X vectors per VF table. */
60444 	#define HWRM_STRUCT_HDR_STRUCT_ID_MSIX_PER_VF	UINT32_C(0xc8)
60445 	#define HWRM_STRUCT_HDR_STRUCT_ID_LAST		HWRM_STRUCT_HDR_STRUCT_ID_MSIX_PER_VF
60446 	/* This value indicates the length of structured data. */
60447 	uint16_t	len;
60448 	/* This value indicates the version of structured data. */
60449 	uint8_t	version;
60450 	/* This value indicates the number of structured data elements. */
60451 	uint8_t	count;
60452 	/* This value indicates the subtype. */
60453 	uint16_t	subtype;
60454 	/*
60455 	 * This value indicates the count of 64-bit values that point to the next
60456 	 * header. A value of 0 means that this is the last element. The value is
60457 	 * a count of 64-bit words from the beginning of the current header.
60458 	 */
60459 	uint16_t	next_offset;
60460 	/* This value indicates this is the last element */
60461 	#define HWRM_STRUCT_HDR_NEXT_OFFSET_LAST UINT32_C(0x0)
60462 	uint8_t	unused_0[6];
60463 } hwrm_struct_hdr_t, *phwrm_struct_hdr_t;
60464 
60465 /* hwrm_struct_data_dcbx_ets (size:256b/32B) */
60466 
60467 typedef struct hwrm_struct_data_dcbx_ets {
60468 	/*
60469 	 * This field indicates if this configuration is ETS recommendation or
60470 	 * ETS configuration. A value 1 means it is ETS configuration, A value of
60471 	 * 2 means it is a ETS recommendation.
60472 	 */
60473 	uint8_t	destination;
60474 	/* ETS configuration */
60475 	#define HWRM_STRUCT_DATA_DCBX_ETS_DESTINATION_CONFIGURATION   UINT32_C(0x1)
60476 	/* ETS recommendation */
60477 	#define HWRM_STRUCT_DATA_DCBX_ETS_DESTINATION_RECOMMMENDATION UINT32_C(0x2)
60478 	#define HWRM_STRUCT_DATA_DCBX_ETS_DESTINATION_LAST	HWRM_STRUCT_DATA_DCBX_ETS_DESTINATION_RECOMMMENDATION
60479 	/* This value indicates maximum ETS TCs supported. */
60480 	uint8_t	max_tcs;
60481 	/* unused. */
60482 	uint16_t	unused1;
60483 	/* ETS priority 0 to TC map. */
60484 	uint8_t	pri0_to_tc_map;
60485 	/* ETS priority 1 to TC map. */
60486 	uint8_t	pri1_to_tc_map;
60487 	/* ETS priority 2 to TC map. */
60488 	uint8_t	pri2_to_tc_map;
60489 	/* ETS priority 3 to TC map. */
60490 	uint8_t	pri3_to_tc_map;
60491 	/* ETS priority 4 to TC map. */
60492 	uint8_t	pri4_to_tc_map;
60493 	/* ETS priority 5 to TC map. */
60494 	uint8_t	pri5_to_tc_map;
60495 	/* ETS priority 6 to TC map. */
60496 	uint8_t	pri6_to_tc_map;
60497 	/* ETS priority 7 to TC map. */
60498 	uint8_t	pri7_to_tc_map;
60499 	/* ETS TC 0 to bandwidth map. */
60500 	uint8_t	tc0_to_bw_map;
60501 	/* ETS TC 1 to bandwidth map. */
60502 	uint8_t	tc1_to_bw_map;
60503 	/* ETS TC 2 to bandwidth map. */
60504 	uint8_t	tc2_to_bw_map;
60505 	/* ETS TC 3 to bandwidth map. */
60506 	uint8_t	tc3_to_bw_map;
60507 	/* ETS TC 4 to bandwidth map. */
60508 	uint8_t	tc4_to_bw_map;
60509 	/* ETS TC 5 to bandwidth map. */
60510 	uint8_t	tc5_to_bw_map;
60511 	/* ETS TC 6 to bandwidth map. */
60512 	uint8_t	tc6_to_bw_map;
60513 	/* ETS TC 7 to bandwidth map. */
60514 	uint8_t	tc7_to_bw_map;
60515 	/* ETS TC 0 to TSA map. */
60516 	uint8_t	tc0_to_tsa_map;
60517 	/* strict priority */
60518 	#define HWRM_STRUCT_DATA_DCBX_ETS_TC0_TO_TSA_MAP_TSA_TYPE_SP		UINT32_C(0x0)
60519 	/* credit based shaper */
60520 	#define HWRM_STRUCT_DATA_DCBX_ETS_TC0_TO_TSA_MAP_TSA_TYPE_CBS		UINT32_C(0x1)
60521 	/* ETS */
60522 	#define HWRM_STRUCT_DATA_DCBX_ETS_TC0_TO_TSA_MAP_TSA_TYPE_ETS		UINT32_C(0x2)
60523 	/* vendor specific */
60524 	#define HWRM_STRUCT_DATA_DCBX_ETS_TC0_TO_TSA_MAP_TSA_TYPE_VENDOR_SPECIFIC UINT32_C(0xff)
60525 	#define HWRM_STRUCT_DATA_DCBX_ETS_TC0_TO_TSA_MAP_LAST			HWRM_STRUCT_DATA_DCBX_ETS_TC0_TO_TSA_MAP_TSA_TYPE_VENDOR_SPECIFIC
60526 	/* ETS TC 1 to TSA map. */
60527 	uint8_t	tc1_to_tsa_map;
60528 	/* ETS TC 2 to TSA map. */
60529 	uint8_t	tc2_to_tsa_map;
60530 	/* ETS TC 3 to TSA map. */
60531 	uint8_t	tc3_to_tsa_map;
60532 	/* ETS TC 4 to TSA map. */
60533 	uint8_t	tc4_to_tsa_map;
60534 	/* ETS TC 5 to TSA map. */
60535 	uint8_t	tc5_to_tsa_map;
60536 	/* ETS TC 6 to TSA map. */
60537 	uint8_t	tc6_to_tsa_map;
60538 	/* ETS TC 7 to TSA map. */
60539 	uint8_t	tc7_to_tsa_map;
60540 	uint8_t	unused_0[4];
60541 } hwrm_struct_data_dcbx_ets_t, *phwrm_struct_data_dcbx_ets_t;
60542 
60543 /* hwrm_struct_data_dcbx_pfc (size:64b/8B) */
60544 
60545 typedef struct hwrm_struct_data_dcbx_pfc {
60546 	/*
60547 	 * This field indicates PFC priority bit map. A value of '0' indicates
60548 	 * PFC is disabled. A value of '1' indicates PFC is enabled on that
60549 	 * priority.
60550 	 */
60551 	uint8_t	pfc_priority_bitmap;
60552 	/*
60553 	 * This field indicates max PFC TCs supported. Each PFC TC will map to
60554 	 * a lossless CoS queue.
60555 	 */
60556 	uint8_t	max_pfc_tcs;
60557 	/*
60558 	 * This field indicates if MACSec bypass capability is enabled. A value
60559 	 * of '1' indicates MBC is enabled. A value of '0' indicates MBC is
60560 	 * disabled.
60561 	 */
60562 	uint8_t	mbc;
60563 	uint8_t	unused_0[5];
60564 } hwrm_struct_data_dcbx_pfc_t, *phwrm_struct_data_dcbx_pfc_t;
60565 
60566 /* hwrm_struct_data_dcbx_app (size:64b/8B) */
60567 
60568 typedef struct hwrm_struct_data_dcbx_app {
60569 	/*
60570 	 * This field indicates the protocol identifier. This should be specified
60571 	 *		in big endian format.
60572 	 */
60573 	uint16_t	protocol_id;
60574 	/*
60575 	 * This field indicates the protocol selector. The valid values are
60576 	 *		mentioned below.
60577 	 */
60578 	uint8_t	protocol_selector;
60579 	/* ether type */
60580 	#define HWRM_STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_ETHER_TYPE   UINT32_C(0x1)
60581 	/* TCP port */
60582 	#define HWRM_STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_TCP_PORT	UINT32_C(0x2)
60583 	/* UDP port */
60584 	#define HWRM_STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_UDP_PORT	UINT32_C(0x3)
60585 	/* TCP & UDP port */
60586 	#define HWRM_STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_TCP_UDP_PORT UINT32_C(0x4)
60587 	#define HWRM_STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_LAST	HWRM_STRUCT_DATA_DCBX_APP_PROTOCOL_SELECTOR_TCP_UDP_PORT
60588 	/* This field indicates application priority. */
60589 	uint8_t	priority;
60590 	/* This field indicates this entry is valid. */
60591 	uint8_t	valid;
60592 	uint8_t	unused_0[3];
60593 } hwrm_struct_data_dcbx_app_t, *phwrm_struct_data_dcbx_app_t;
60594 
60595 /* hwrm_struct_data_dcbx_feature_state (size:64b/8B) */
60596 
60597 typedef struct hwrm_struct_data_dcbx_feature_state {
60598 	/* DCBX mode - IEEE or CEE. This is read only field. */
60599 	uint8_t	dcbx_mode;
60600 	/* DCBX disabled mode. */
60601 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_DCBX_MODE_DCBX_DISABLED UINT32_C(0x0)
60602 	/* DCBX IEEE mode. */
60603 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_DCBX_MODE_DCBX_IEEE	UINT32_C(0x1)
60604 	/* DCBX CEE mode. */
60605 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_DCBX_MODE_DCBX_CEE	UINT32_C(0x2)
60606 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_DCBX_MODE_LAST	HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_DCBX_MODE_DCBX_CEE
60607 	/* ETS TLV state. */
60608 	uint8_t	ets_state;
60609 	/* PFC TLV state. */
60610 	uint8_t	pfc_state;
60611 	/* App TLV state. */
60612 	uint8_t	app_state;
60613 	/* Feature enable bit position. */
60614 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_APP_STATE_ENABLE_BIT_POS	UINT32_C(0x7)
60615 	/* Feature willing bit position. */
60616 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_APP_STATE_WILLING_BIT_POS   UINT32_C(0x6)
60617 	/* Feature advertise bit position. */
60618 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_APP_STATE_ADVERTISE_BIT_POS UINT32_C(0x5)
60619 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_APP_STATE_LAST		HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_APP_STATE_ADVERTISE_BIT_POS
60620 	/* unused. */
60621 	uint8_t	unused[3];
60622 	/*
60623 	 * This field is used to reset the DCBX configuration to factory
60624 	 * defaults.
60625 	 */
60626 	uint8_t	resets;
60627 	/* reset ETS configuration. */
60628 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_RESETS_RESET_ETS   UINT32_C(0x1)
60629 	/* reset PFC configuration. */
60630 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_RESETS_RESET_PFC   UINT32_C(0x2)
60631 	/* reset application configuration. */
60632 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_RESETS_RESET_APP   UINT32_C(0x4)
60633 	/* reset DCBX state configuration. */
60634 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_RESETS_RESET_STATE UINT32_C(0x8)
60635 	#define HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_RESETS_LAST	HWRM_STRUCT_DATA_DCBX_FEATURE_STATE_RESETS_RESET_STATE
60636 } hwrm_struct_data_dcbx_feature_state_t, *phwrm_struct_data_dcbx_feature_state_t;
60637 
60638 /* hwrm_struct_data_lldp (size:64b/8B) */
60639 
60640 typedef struct hwrm_struct_data_lldp {
60641 	/* Port admin state */
60642 	uint8_t	admin_state;
60643 	/* Disable both Tx and Rx */
60644 	#define HWRM_STRUCT_DATA_LLDP_ADMIN_STATE_DISABLE UINT32_C(0x0)
60645 	/* Enable Tx only */
60646 	#define HWRM_STRUCT_DATA_LLDP_ADMIN_STATE_TX	UINT32_C(0x1)
60647 	/* Enable Rx only */
60648 	#define HWRM_STRUCT_DATA_LLDP_ADMIN_STATE_RX	UINT32_C(0x2)
60649 	/* Enable both Tx and Rx */
60650 	#define HWRM_STRUCT_DATA_LLDP_ADMIN_STATE_ENABLE  UINT32_C(0x3)
60651 	#define HWRM_STRUCT_DATA_LLDP_ADMIN_STATE_LAST   HWRM_STRUCT_DATA_LLDP_ADMIN_STATE_ENABLE
60652 	/* Port description TLV transmit state (enable(1)/disable(0)). */
60653 	uint8_t	port_description_state;
60654 	/* Disable */
60655 	#define HWRM_STRUCT_DATA_LLDP_PORT_DESCRIPTION_STATE_DISABLE UINT32_C(0x0)
60656 	/* Enable. */
60657 	#define HWRM_STRUCT_DATA_LLDP_PORT_DESCRIPTION_STATE_ENABLE  UINT32_C(0x1)
60658 	#define HWRM_STRUCT_DATA_LLDP_PORT_DESCRIPTION_STATE_LAST   HWRM_STRUCT_DATA_LLDP_PORT_DESCRIPTION_STATE_ENABLE
60659 	/* System name TLV transmit state (enable(1)/disable(0)). */
60660 	uint8_t	system_name_state;
60661 	/* Disable */
60662 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_NAME_STATE_DISABLE UINT32_C(0x0)
60663 	/* Enable. */
60664 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_NAME_STATE_ENABLE  UINT32_C(0x1)
60665 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_NAME_STATE_LAST   HWRM_STRUCT_DATA_LLDP_SYSTEM_NAME_STATE_ENABLE
60666 	/* System description TLV transmit state (enable(1)/disable(0)). */
60667 	uint8_t	system_desc_state;
60668 	/* Disable */
60669 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_DESC_STATE_DISABLE UINT32_C(0x0)
60670 	/* Enable. */
60671 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_DESC_STATE_ENABLE  UINT32_C(0x1)
60672 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_DESC_STATE_LAST   HWRM_STRUCT_DATA_LLDP_SYSTEM_DESC_STATE_ENABLE
60673 	/* System capabilities TLV transmit state (enable(1)/disable(0)). */
60674 	uint8_t	system_cap_state;
60675 	/* Disable */
60676 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_CAP_STATE_DISABLE UINT32_C(0x0)
60677 	/* Enable. */
60678 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_CAP_STATE_ENABLE  UINT32_C(0x1)
60679 	#define HWRM_STRUCT_DATA_LLDP_SYSTEM_CAP_STATE_LAST   HWRM_STRUCT_DATA_LLDP_SYSTEM_CAP_STATE_ENABLE
60680 	/* Management address TLV transmit state (enable(1)/disable(0)). */
60681 	uint8_t	mgmt_addr_state;
60682 	/* Disable */
60683 	#define HWRM_STRUCT_DATA_LLDP_MGMT_ADDR_STATE_DISABLE UINT32_C(0x0)
60684 	/* Enable. */
60685 	#define HWRM_STRUCT_DATA_LLDP_MGMT_ADDR_STATE_ENABLE  UINT32_C(0x1)
60686 	#define HWRM_STRUCT_DATA_LLDP_MGMT_ADDR_STATE_LAST   HWRM_STRUCT_DATA_LLDP_MGMT_ADDR_STATE_ENABLE
60687 	/* Async event notification state (enable(1)/disable(0)). */
60688 	uint8_t	async_event_notification_state;
60689 	/* Disable */
60690 	#define HWRM_STRUCT_DATA_LLDP_ASYNC_EVENT_NOTIFICATION_STATE_DISABLE UINT32_C(0x0)
60691 	/* Enable. */
60692 	#define HWRM_STRUCT_DATA_LLDP_ASYNC_EVENT_NOTIFICATION_STATE_ENABLE  UINT32_C(0x1)
60693 	#define HWRM_STRUCT_DATA_LLDP_ASYNC_EVENT_NOTIFICATION_STATE_LAST   HWRM_STRUCT_DATA_LLDP_ASYNC_EVENT_NOTIFICATION_STATE_ENABLE
60694 	uint8_t	unused_0;
60695 } hwrm_struct_data_lldp_t, *phwrm_struct_data_lldp_t;
60696 
60697 /* hwrm_struct_data_lldp_generic (size:2112b/264B) */
60698 
60699 typedef struct hwrm_struct_data_lldp_generic {
60700 	/* TLV type. */
60701 	uint8_t	tlv_type;
60702 	/* Chassis ID TLV */
60703 	#define HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_CHASSIS		UINT32_C(0x1)
60704 	/* Port ID TLV */
60705 	#define HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_PORT		UINT32_C(0x2)
60706 	/* System name TLV */
60707 	#define HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_SYSTEM_NAME	UINT32_C(0x3)
60708 	/* System description TLV */
60709 	#define HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_SYSTEM_DESCRIPTION UINT32_C(0x4)
60710 	/* Port name TLV */
60711 	#define HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_PORT_NAME	UINT32_C(0x5)
60712 	/* Port description TLV */
60713 	#define HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_PORT_DESCRIPTION   UINT32_C(0x6)
60714 	#define HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_LAST		HWRM_STRUCT_DATA_LLDP_GENERIC_TLV_TYPE_PORT_DESCRIPTION
60715 	/* TLV sub-type. */
60716 	uint8_t	subtype;
60717 	/* Length. */
60718 	uint8_t	length;
60719 	/* unused. */
60720 	uint8_t	unused1[5];
60721 	/* TLV value. */
60722 	uint32_t	tlv_value[64];
60723 } hwrm_struct_data_lldp_generic_t, *phwrm_struct_data_lldp_generic_t;
60724 
60725 /* hwrm_struct_data_lldp_device (size:1472b/184B) */
60726 
60727 typedef struct hwrm_struct_data_lldp_device {
60728 	/* Time to Live. */
60729 	uint16_t	ttl;
60730 	/* Management address length. */
60731 	uint8_t	mgmt_addr_len;
60732 	/* Management address type. */
60733 	uint8_t	mgmt_addr_type;
60734 	uint8_t	unused_3[4];
60735 	/* Management address. */
60736 	uint32_t	mgmt_addr[8];
60737 	/* System capabilities. */
60738 	uint32_t	system_caps;
60739 	/* Interface number type. */
60740 	uint8_t	intf_num_type;
60741 	/* Management address OID length. */
60742 	uint8_t	mgmt_addr_oid_length;
60743 	uint8_t	unused_4[2];
60744 	/* Interface number. */
60745 	uint32_t	intf_num;
60746 	uint8_t	unused_5[4];
60747 	/* Management address OID. */
60748 	uint32_t	mgmt_addr_oid[32];
60749 } hwrm_struct_data_lldp_device_t, *phwrm_struct_data_lldp_device_t;
60750 
60751 /* hwrm_struct_data_port_description (size:64b/8B) */
60752 
60753 typedef struct hwrm_struct_data_port_description {
60754 	/*
60755 	 * Port #. Port number starts at 0 and anything greater than number of
60756 	 * ports minus 1 is an error.
60757 	 */
60758 	uint8_t	port_id;
60759 	uint8_t	unused_0[7];
60760 } hwrm_struct_data_port_description_t, *phwrm_struct_data_port_description_t;
60761 
60762 /* hwrm_struct_data_rss_v2 (size:128b/16B) */
60763 
60764 typedef struct hwrm_struct_data_rss_v2 {
60765 	uint16_t	flags;
60766 	/* When this bit is '1', the hash type and hash key are included. */
60767 	#define HWRM_STRUCT_DATA_RSS_V2_FLAGS_HASH_VALID	UINT32_C(0x1)
60768 	/* RSS Context index. */
60769 	uint16_t	rss_ctx_id;
60770 	/* Number ring group IDs. */
60771 	uint16_t	num_ring_groups;
60772 	uint16_t	hash_type;
60773 	/*
60774 	 * When this bit is '1', the RSS hash shall be computed
60775 	 * over source and destination IPv4 addresses of IPv4
60776 	 * packets.
60777 	 */
60778 	#define HWRM_STRUCT_DATA_RSS_V2_HASH_TYPE_IPV4	UINT32_C(0x1)
60779 	/*
60780 	 * When this bit is '1', the RSS hash shall be computed
60781 	 * over source/destination IPv4 addresses and
60782 	 * source/destination ports of TCP/IPv4 packets.
60783 	 */
60784 	#define HWRM_STRUCT_DATA_RSS_V2_HASH_TYPE_TCP_IPV4	UINT32_C(0x2)
60785 	/*
60786 	 * When this bit is '1', the RSS hash shall be computed
60787 	 * over source/destination IPv4 addresses and
60788 	 * source/destination ports of UDP/IPv4 packets.
60789 	 */
60790 	#define HWRM_STRUCT_DATA_RSS_V2_HASH_TYPE_UDP_IPV4	UINT32_C(0x4)
60791 	/*
60792 	 * When this bit is '1', the RSS hash shall be computed
60793 	 * over source and destination IPv4 addresses of IPv6
60794 	 * packets.
60795 	 */
60796 	#define HWRM_STRUCT_DATA_RSS_V2_HASH_TYPE_IPV6	UINT32_C(0x8)
60797 	/*
60798 	 * When this bit is '1', the RSS hash shall be computed
60799 	 * over source/destination IPv6 addresses and
60800 	 * source/destination ports of TCP/IPv6 packets.
60801 	 */
60802 	#define HWRM_STRUCT_DATA_RSS_V2_HASH_TYPE_TCP_IPV6	UINT32_C(0x10)
60803 	/*
60804 	 * When this bit is '1', the RSS hash shall be computed
60805 	 * over source/destination IPv6 addresses and
60806 	 * source/destination ports of UDP/IPv6 packets.
60807 	 */
60808 	#define HWRM_STRUCT_DATA_RSS_V2_HASH_TYPE_UDP_IPV6	UINT32_C(0x20)
60809 	/* Hash key. This field is optional. */
60810 	uint64_t	hash_key_ring_group_ids;
60811 } hwrm_struct_data_rss_v2_t, *phwrm_struct_data_rss_v2_t;
60812 
60813 /* hwrm_struct_data_power_information (size:192b/24B) */
60814 
60815 typedef struct hwrm_struct_data_power_information {
60816 	/* Backup power information version */
60817 	uint32_t	bkup_power_info_ver;
60818 	/* Platform backup power count */
60819 	uint32_t	platform_bkup_power_count;
60820 	/* Load in milliwatts */
60821 	uint32_t	load_milli_watt;
60822 	/* Backup time in milliseconds */
60823 	uint32_t	bkup_time_milli_seconds;
60824 	/* Backup power status */
60825 	uint32_t	bkup_power_status;
60826 	/* Backup power charge time */
60827 	uint32_t	bkup_power_charge_time;
60828 } hwrm_struct_data_power_information_t, *phwrm_struct_data_power_information_t;
60829 
60830 /* hwrm_struct_data_msix_per_vf (size:320b/40B) */
60831 
60832 typedef struct hwrm_struct_data_msix_per_vf {
60833 	/* PF ID */
60834 	uint16_t	pf_id;
60835 	/* Number of rows in table. */
60836 	uint16_t	count;
60837 	uint32_t	unused_0;
60838 	/* Starting VF for row 0 */
60839 	uint16_t	start_vf_0;
60840 	/* MSI-X vectors per VF for row 0 */
60841 	uint16_t	msix_0;
60842 	/* Starting VF for row 1 */
60843 	uint16_t	start_vf_1;
60844 	/* MSI-X vectors per VF for row 1 */
60845 	uint16_t	msix_1;
60846 	/* Starting VF for row 2 */
60847 	uint16_t	start_vf_2;
60848 	/* MSI-X vectors per VF for row 2 */
60849 	uint16_t	msix_2;
60850 	/* Starting VF for row 3 */
60851 	uint16_t	start_vf_3;
60852 	/* MSI-X vectors per VF for row 3 */
60853 	uint16_t	msix_3;
60854 	/* Starting VF for row 4 */
60855 	uint16_t	start_vf_4;
60856 	/* MSI-X vectors per VF for row 4 */
60857 	uint16_t	msix_4;
60858 	/* Starting VF for row 5 */
60859 	uint16_t	start_vf_5;
60860 	/* MSI-X vectors per VF for row 5 */
60861 	uint16_t	msix_5;
60862 	/* Starting VF for row 6 */
60863 	uint16_t	start_vf_6;
60864 	/* MSI-X vectors per VF for row 6 */
60865 	uint16_t	msix_6;
60866 	/* Starting VF for row 7 */
60867 	uint16_t	start_vf_7;
60868 	/* MSI-X vectors per VF for row 7 */
60869 	uint16_t	msix_7;
60870 } hwrm_struct_data_msix_per_vf_t, *phwrm_struct_data_msix_per_vf_t;
60871 
60872 /*******************************
60873  * hwrm_fw_set_structured_data *
60874  *******************************/
60875 
60876 
60877 /* hwrm_fw_set_structured_data_input (size:256b/32B) */
60878 
60879 typedef struct hwrm_fw_set_structured_data_input {
60880 	/* The HWRM command request type. */
60881 	uint16_t	req_type;
60882 	/*
60883 	 * The completion ring to send the completion event on. This should
60884 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60885 	 */
60886 	uint16_t	cmpl_ring;
60887 	/*
60888 	 * The sequence ID is used by the driver for tracking multiple
60889 	 * commands. This ID is treated as opaque data by the firmware and
60890 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60891 	 */
60892 	uint16_t	seq_id;
60893 	/*
60894 	 * The target ID of the command:
60895 	 * * 0x0-0xFFF8 - The function ID
60896 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60897 	 * * 0xFFFD - Reserved for user-space HWRM interface
60898 	 * * 0xFFFF - HWRM
60899 	 */
60900 	uint16_t	target_id;
60901 	/*
60902 	 * A physical address pointer pointing to a host buffer that the
60903 	 * command's response data will be written. This can be either a host
60904 	 * physical address (HPA) or a guest physical address (GPA) and must
60905 	 * point to a physically contiguous block of memory.
60906 	 */
60907 	uint64_t	resp_addr;
60908 	/*
60909 	 * This is the host address where
60910 	 * structured data will be copied from
60911 	 */
60912 	uint64_t	src_data_addr;
60913 	/* size of data in bytes */
60914 	uint16_t	data_len;
60915 	/*
60916 	 * a count of the number of Structured Data Headers in the data
60917 	 * pointed by src_data_addr.
60918 	 */
60919 	uint8_t	hdr_cnt;
60920 	uint8_t	unused_0[5];
60921 } hwrm_fw_set_structured_data_input_t, *phwrm_fw_set_structured_data_input_t;
60922 
60923 /* hwrm_fw_set_structured_data_output (size:128b/16B) */
60924 
60925 typedef struct hwrm_fw_set_structured_data_output {
60926 	/* The specific error status for the command. */
60927 	uint16_t	error_code;
60928 	/* The HWRM command request type. */
60929 	uint16_t	req_type;
60930 	/* The sequence ID from the original command. */
60931 	uint16_t	seq_id;
60932 	/* The length of the response data in number of bytes. */
60933 	uint16_t	resp_len;
60934 	uint8_t	unused_0[7];
60935 	/*
60936 	 * This field is used in Output records to indicate that the output
60937 	 * is completely written to RAM. This field should be read as '1'
60938 	 * to indicate that the output has been completely written. When
60939 	 * writing a command completion or response to an internal processor,
60940 	 * the order of writes has to be such that this field is written last.
60941 	 */
60942 	uint8_t	valid;
60943 } hwrm_fw_set_structured_data_output_t, *phwrm_fw_set_structured_data_output_t;
60944 
60945 /* hwrm_fw_set_structured_data_cmd_err (size:64b/8B) */
60946 
60947 typedef struct hwrm_fw_set_structured_data_cmd_err {
60948 	/*
60949 	 * command specific error codes that goes to
60950 	 * the cmd_err field in Common HWRM Error Response.
60951 	 */
60952 	uint8_t	code;
60953 	/* Unknown error */
60954 	#define HWRM_FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
60955 	/* count_of_headers is incorrect */
60956 	#define HWRM_FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_HDR_CNT UINT32_C(0x1)
60957 	/* data improperly formatted */
60958 	#define HWRM_FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_FMT	UINT32_C(0x2)
60959 	/* unknown structure ID(s) */
60960 	#define HWRM_FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID	UINT32_C(0x3)
60961 	#define HWRM_FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_LAST	HWRM_FW_SET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID
60962 	uint8_t	unused_0[7];
60963 } hwrm_fw_set_structured_data_cmd_err_t, *phwrm_fw_set_structured_data_cmd_err_t;
60964 
60965 /*******************************
60966  * hwrm_fw_get_structured_data *
60967  *******************************/
60968 
60969 
60970 /* hwrm_fw_get_structured_data_input (size:256b/32B) */
60971 
60972 typedef struct hwrm_fw_get_structured_data_input {
60973 	/* The HWRM command request type. */
60974 	uint16_t	req_type;
60975 	/*
60976 	 * The completion ring to send the completion event on. This should
60977 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60978 	 */
60979 	uint16_t	cmpl_ring;
60980 	/*
60981 	 * The sequence ID is used by the driver for tracking multiple
60982 	 * commands. This ID is treated as opaque data by the firmware and
60983 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60984 	 */
60985 	uint16_t	seq_id;
60986 	/*
60987 	 * The target ID of the command:
60988 	 * * 0x0-0xFFF8 - The function ID
60989 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60990 	 * * 0xFFFD - Reserved for user-space HWRM interface
60991 	 * * 0xFFFF - HWRM
60992 	 */
60993 	uint16_t	target_id;
60994 	/*
60995 	 * A physical address pointer pointing to a host buffer that the
60996 	 * command's response data will be written. This can be either a host
60997 	 * physical address (HPA) or a guest physical address (GPA) and must
60998 	 * point to a physically contiguous block of memory.
60999 	 */
61000 	uint64_t	resp_addr;
61001 	/*
61002 	 * This is the host address where
61003 	 * structured data will be copied to
61004 	 */
61005 	uint64_t	dest_data_addr;
61006 	/* size of data in bytes */
61007 	uint16_t	data_len;
61008 	/*
61009 	 * Structure_id is the id of the structure data requesting and count is
61010 	 * a requested number of instances of this data requested. The actual
61011 	 * number will be returned in count_of_headers
61012 	 */
61013 	uint16_t	structure_id;
61014 	/*
61015 	 * Subtype is an optional field used to specify additional information
61016 	 * of the data being retrieved. For example, if data can be categorized
61017 	 * as "live" vs "saved" then this field can be used to provide an
61018 	 * indication of "saved" vs "live" data. Not all structured data
61019 	 * supports subtypes and if they are supported then the structured data
61020 	 * will specify the valid values. If structured data is requested that
61021 	 * supports subtypes but no subtype is given then it is implementation
61022 	 * specific what will be returned. Some structure data can support a
61023 	 * subtype of "All" which would cause a list of structures to be
61024 	 * returned for all supported subtypes. "All" is only used on the
61025 	 * hwrm_get_structured_data command.
61026 	 */
61027 	uint16_t	subtype;
61028 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_UNUSED		UINT32_C(0x0)
61029 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_ALL			UINT32_C(0xffff)
61030 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_NEAR_BRIDGE_ADMIN	UINT32_C(0x100)
61031 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_NEAR_BRIDGE_PEER	UINT32_C(0x101)
61032 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_NEAR_BRIDGE_OPERATIONAL UINT32_C(0x102)
61033 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_NON_TPMR_ADMIN	UINT32_C(0x200)
61034 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_NON_TPMR_PEER	UINT32_C(0x201)
61035 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_NON_TPMR_OPERATIONAL	UINT32_C(0x202)
61036 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_HOST_OPERATIONAL	UINT32_C(0x300)
61037 	#define HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_LAST		HWRM_FW_GET_STRUCTURED_DATA_INPUT_SUBTYPE_HOST_OPERATIONAL
61038 	/* Number of elements. This allows support of arrayed data */
61039 	uint8_t	count;
61040 	uint8_t	unused_0;
61041 } hwrm_fw_get_structured_data_input_t, *phwrm_fw_get_structured_data_input_t;
61042 
61043 /* hwrm_fw_get_structured_data_output (size:128b/16B) */
61044 
61045 typedef struct hwrm_fw_get_structured_data_output {
61046 	/* The specific error status for the command. */
61047 	uint16_t	error_code;
61048 	/* The HWRM command request type. */
61049 	uint16_t	req_type;
61050 	/* The sequence ID from the original command. */
61051 	uint16_t	seq_id;
61052 	/* The length of the response data in number of bytes. */
61053 	uint16_t	resp_len;
61054 	/*
61055 	 * a count of the number of Structured Data Headers in the data
61056 	 * pointed by dest_data_addr.
61057 	 */
61058 	uint8_t	hdr_cnt;
61059 	uint8_t	unused_0[6];
61060 	/*
61061 	 * This field is used in Output records to indicate that the output
61062 	 * is completely written to RAM. This field should be read as '1'
61063 	 * to indicate that the output has been completely written. When
61064 	 * writing a command completion or response to an internal processor,
61065 	 * the order of writes has to be such that this field is written last.
61066 	 */
61067 	uint8_t	valid;
61068 } hwrm_fw_get_structured_data_output_t, *phwrm_fw_get_structured_data_output_t;
61069 
61070 /* hwrm_fw_get_structured_data_cmd_err (size:64b/8B) */
61071 
61072 typedef struct hwrm_fw_get_structured_data_cmd_err {
61073 	/*
61074 	 * command specific error codes that goes to
61075 	 * the cmd_err field in Common HWRM Error Response.
61076 	 */
61077 	uint8_t	code;
61078 	/* Unknown error */
61079 	#define HWRM_FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
61080 	/* unknown structure ID(s) */
61081 	#define HWRM_FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID  UINT32_C(0x3)
61082 	#define HWRM_FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_LAST   HWRM_FW_GET_STRUCTURED_DATA_CMD_ERR_CODE_BAD_ID
61083 	uint8_t	unused_0[7];
61084 } hwrm_fw_get_structured_data_cmd_err_t, *phwrm_fw_get_structured_data_cmd_err_t;
61085 
61086 /*******************
61087  * hwrm_fw_ipc_msg *
61088  *******************/
61089 
61090 
61091 /* hwrm_fw_ipc_msg_input (size:320b/40B) */
61092 
61093 typedef struct hwrm_fw_ipc_msg_input {
61094 	/* The HWRM command request type. */
61095 	uint16_t	req_type;
61096 	/*
61097 	 * The completion ring to send the completion event on. This should
61098 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61099 	 */
61100 	uint16_t	cmpl_ring;
61101 	/*
61102 	 * The sequence ID is used by the driver for tracking multiple
61103 	 * commands. This ID is treated as opaque data by the firmware and
61104 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61105 	 */
61106 	uint16_t	seq_id;
61107 	/*
61108 	 * The target ID of the command:
61109 	 * * 0x0-0xFFF8 - The function ID
61110 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61111 	 * * 0xFFFD - Reserved for user-space HWRM interface
61112 	 * * 0xFFFF - HWRM
61113 	 */
61114 	uint16_t	target_id;
61115 	/*
61116 	 * A physical address pointer pointing to a host buffer that the
61117 	 * command's response data will be written. This can be either a host
61118 	 * physical address (HPA) or a guest physical address (GPA) and must
61119 	 * point to a physically contiguous block of memory.
61120 	 */
61121 	uint64_t	resp_addr;
61122 	uint32_t	enables;
61123 	/*
61124 	 * This bit must be '1' for the command_id field to be
61125 	 * configured.
61126 	 */
61127 	#define HWRM_FW_IPC_MSG_INPUT_ENABLES_COMMAND_ID	UINT32_C(0x1)
61128 	/*
61129 	 * This bit must be '1' for the src_processor field to be
61130 	 * configured.
61131 	 */
61132 	#define HWRM_FW_IPC_MSG_INPUT_ENABLES_SRC_PROCESSOR	UINT32_C(0x2)
61133 	/*
61134 	 * This bit must be '1' for the data_offset field to be
61135 	 * configured.
61136 	 */
61137 	#define HWRM_FW_IPC_MSG_INPUT_ENABLES_DATA_OFFSET	UINT32_C(0x4)
61138 	/*
61139 	 * This bit must be '1' for the length field to be
61140 	 * configured.
61141 	 */
61142 	#define HWRM_FW_IPC_MSG_INPUT_ENABLES_LENGTH		UINT32_C(0x8)
61143 	/* Command ID */
61144 	uint16_t	command_id;
61145 	/* RoCE LAG message */
61146 	#define HWRM_FW_IPC_MSG_INPUT_COMMAND_ID_ROCE_LAG	UINT32_C(0x1)
61147 	/* Query information on PF mapping for x86 and MAIA. */
61148 	#define HWRM_FW_IPC_MSG_INPUT_COMMAND_ID_MHB_HOST	UINT32_C(0x2)
61149 	/* RoCE driver version details to be sent to chimp */
61150 	#define HWRM_FW_IPC_MSG_INPUT_COMMAND_ID_ROCE_DRVR_VERSION UINT32_C(0x3)
61151 	#define HWRM_FW_IPC_MSG_INPUT_COMMAND_ID_LAST		HWRM_FW_IPC_MSG_INPUT_COMMAND_ID_ROCE_DRVR_VERSION
61152 	/* Source processor for this command. */
61153 	uint8_t	src_processor;
61154 	/* Chimp processor */
61155 	#define HWRM_FW_IPC_MSG_INPUT_SRC_PROCESSOR_CFW  UINT32_C(0x1)
61156 	/* BONO processor */
61157 	#define HWRM_FW_IPC_MSG_INPUT_SRC_PROCESSOR_BONO UINT32_C(0x2)
61158 	/* APE processor */
61159 	#define HWRM_FW_IPC_MSG_INPUT_SRC_PROCESSOR_APE  UINT32_C(0x3)
61160 	/* KONG processor */
61161 	#define HWRM_FW_IPC_MSG_INPUT_SRC_PROCESSOR_KONG UINT32_C(0x4)
61162 	#define HWRM_FW_IPC_MSG_INPUT_SRC_PROCESSOR_LAST HWRM_FW_IPC_MSG_INPUT_SRC_PROCESSOR_KONG
61163 	uint8_t	unused_0;
61164 	/* Offset of the data in the source processor memory. */
61165 	uint32_t	data_offset;
61166 	/* Length of the data in source processor. */
61167 	uint16_t	length;
61168 	uint8_t	unused_1[2];
61169 	/* This is for storing FW opaque data. */
61170 	uint64_t	opaque;
61171 } hwrm_fw_ipc_msg_input_t, *phwrm_fw_ipc_msg_input_t;
61172 
61173 /* hwrm_fw_ipc_msg_output (size:256b/32B) */
61174 
61175 typedef struct hwrm_fw_ipc_msg_output {
61176 	/* The specific error status for the command. */
61177 	uint16_t	error_code;
61178 	/* The HWRM command request type. */
61179 	uint16_t	req_type;
61180 	/* The sequence ID from the original command. */
61181 	uint16_t	seq_id;
61182 	/* The length of the response data in number of bytes. */
61183 	uint16_t	resp_len;
61184 	uint32_t	msg_data_1;
61185 	uint32_t	msg_data_2;
61186 	uint64_t	reserved64;
61187 	uint8_t	reserved48[7];
61188 	/*
61189 	 * This field is used in Output records to indicate that the output
61190 	 * is completely written to RAM. This field should be read as '1'
61191 	 * to indicate that the output has been completely written. When
61192 	 * writing a command completion or response to an internal processor,
61193 	 * the order of writes has to be such that this field is written last.
61194 	 */
61195 	uint8_t	valid;
61196 } hwrm_fw_ipc_msg_output_t, *phwrm_fw_ipc_msg_output_t;
61197 
61198 /***********************
61199  * hwrm_fw_ipc_mailbox *
61200  ***********************/
61201 
61202 
61203 /* hwrm_fw_ipc_mailbox_input (size:256b/32B) */
61204 
61205 typedef struct hwrm_fw_ipc_mailbox_input {
61206 	/* The HWRM command request type. */
61207 	uint16_t	req_type;
61208 	/*
61209 	 * The completion ring to send the completion event on. This should
61210 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61211 	 */
61212 	uint16_t	cmpl_ring;
61213 	/*
61214 	 * The sequence ID is used by the driver for tracking multiple
61215 	 * commands. This ID is treated as opaque data by the firmware and
61216 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61217 	 */
61218 	uint16_t	seq_id;
61219 	/*
61220 	 * The target ID of the command:
61221 	 * * 0x0-0xFFF8 - The function ID
61222 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61223 	 * * 0xFFFD - Reserved for user-space HWRM interface
61224 	 * * 0xFFFF - HWRM
61225 	 */
61226 	uint16_t	target_id;
61227 	/*
61228 	 * A physical address pointer pointing to a host buffer that the
61229 	 * command's response data will be written. This can be either a host
61230 	 * physical address (HPA) or a guest physical address (GPA) and must
61231 	 * point to a physically contiguous block of memory.
61232 	 */
61233 	uint64_t	resp_addr;
61234 	uint8_t	flags;
61235 	/* unused is 8 b */
61236 	uint8_t	unused;
61237 	/* asynchronous event to hosts. */
61238 	uint8_t	event_id;
61239 	/* PORT ID */
61240 	uint8_t	port_id;
61241 	/* event data1 of asynchronous event */
61242 	uint32_t	event_data1;
61243 	/* event data2 of asynchronous event */
61244 	uint32_t	event_data2;
61245 	uint8_t	unused_0[4];
61246 } hwrm_fw_ipc_mailbox_input_t, *phwrm_fw_ipc_mailbox_input_t;
61247 
61248 /* hwrm_fw_ipc_mailbox_output (size:128b/16B) */
61249 
61250 typedef struct hwrm_fw_ipc_mailbox_output {
61251 	/* The specific error status for the command. */
61252 	uint16_t	error_code;
61253 	/* The HWRM command request type. */
61254 	uint16_t	req_type;
61255 	/* The sequence ID from the original command. */
61256 	uint16_t	seq_id;
61257 	/* The length of the response data in number of bytes. */
61258 	uint16_t	resp_len;
61259 	uint8_t	unused_0[7];
61260 	/*
61261 	 * This field is used in Output records to indicate that the output
61262 	 * is completely written to RAM. This field should be read as '1'
61263 	 * to indicate that the output has been completely written. When
61264 	 * writing a command completion or response to an internal processor,
61265 	 * the order of writes has to be such that this field is written last.
61266 	 */
61267 	uint8_t	valid;
61268 } hwrm_fw_ipc_mailbox_output_t, *phwrm_fw_ipc_mailbox_output_t;
61269 
61270 /* hwrm_fw_ipc_mailbox_cmd_err (size:64b/8B) */
61271 
61272 typedef struct hwrm_fw_ipc_mailbox_cmd_err {
61273 	/*
61274 	 * command specific error codes that goes to
61275 	 * the cmd_err field in Common HWRM Error Response.
61276 	 */
61277 	uint8_t	code;
61278 	/* Unknown error */
61279 	#define HWRM_FW_IPC_MAILBOX_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
61280 	/* invalid event */
61281 	#define HWRM_FW_IPC_MAILBOX_CMD_ERR_CODE_BAD_ID  UINT32_C(0x3)
61282 	#define HWRM_FW_IPC_MAILBOX_CMD_ERR_CODE_LAST   HWRM_FW_IPC_MAILBOX_CMD_ERR_CODE_BAD_ID
61283 	uint8_t	unused_0[7];
61284 } hwrm_fw_ipc_mailbox_cmd_err_t, *phwrm_fw_ipc_mailbox_cmd_err_t;
61285 
61286 /*******************
61287  * hwrm_fw_ecn_cfg *
61288  *******************/
61289 
61290 
61291 /* hwrm_fw_ecn_cfg_input (size:192b/24B) */
61292 
61293 typedef struct hwrm_fw_ecn_cfg_input {
61294 	/* The HWRM command request type. */
61295 	uint16_t	req_type;
61296 	/*
61297 	 * The completion ring to send the completion event on. This should
61298 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61299 	 */
61300 	uint16_t	cmpl_ring;
61301 	/*
61302 	 * The sequence ID is used by the driver for tracking multiple
61303 	 * commands. This ID is treated as opaque data by the firmware and
61304 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61305 	 */
61306 	uint16_t	seq_id;
61307 	/*
61308 	 * The target ID of the command:
61309 	 * * 0x0-0xFFF8 - The function ID
61310 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61311 	 * * 0xFFFD - Reserved for user-space HWRM interface
61312 	 * * 0xFFFF - HWRM
61313 	 */
61314 	uint16_t	target_id;
61315 	/*
61316 	 * A physical address pointer pointing to a host buffer that the
61317 	 * command's response data will be written. This can be either a host
61318 	 * physical address (HPA) or a guest physical address (GPA) and must
61319 	 * point to a physically contiguous block of memory.
61320 	 */
61321 	uint64_t	resp_addr;
61322 	uint16_t	flags;
61323 	/*
61324 	 * When this bit is '1', Explicit Congestion Notification (ECN) is
61325 	 * enabled device-wide. When ECN is enabled on a multi-host system,
61326 	 * it is enabled for all hosts. This setting takes effect
61327 	 * immediately. When ECN is enabled, the firmware activates
61328 	 * additional receive Class of Service (CoS) queues that are enabled
61329 	 * for ECN marking and steers ECN-capable packets to those queues.
61330 	 * This setting is not saved persistently. To enable ECN
61331 	 * persistently, set NVM option 173, ENABLE_ECN.
61332 	 * Setting this bit to '0' disables ECN immediately.
61333 	 */
61334 	#define HWRM_FW_ECN_CFG_INPUT_FLAGS_ENABLE_ECN	UINT32_C(0x1)
61335 	uint8_t	unused_0[6];
61336 } hwrm_fw_ecn_cfg_input_t, *phwrm_fw_ecn_cfg_input_t;
61337 
61338 /* hwrm_fw_ecn_cfg_output (size:128b/16B) */
61339 
61340 typedef struct hwrm_fw_ecn_cfg_output {
61341 	/* The specific error status for the command. */
61342 	uint16_t	error_code;
61343 	/* The HWRM command request type. */
61344 	uint16_t	req_type;
61345 	/* The sequence ID from the original command. */
61346 	uint16_t	seq_id;
61347 	/* The length of the response data in number of bytes. */
61348 	uint16_t	resp_len;
61349 	uint8_t	unused_0[7];
61350 	/*
61351 	 * This field is used in Output records to indicate that the output
61352 	 * is completely written to RAM. This field should be read as '1'
61353 	 * to indicate that the output has been completely written. When
61354 	 * writing a command completion or response to an internal processor,
61355 	 * the order of writes has to be such that this field is written last.
61356 	 */
61357 	uint8_t	valid;
61358 } hwrm_fw_ecn_cfg_output_t, *phwrm_fw_ecn_cfg_output_t;
61359 
61360 /********************
61361  * hwrm_fw_ecn_qcfg *
61362  ********************/
61363 
61364 
61365 /* hwrm_fw_ecn_qcfg_input (size:128b/16B) */
61366 
61367 typedef struct hwrm_fw_ecn_qcfg_input {
61368 	/* The HWRM command request type. */
61369 	uint16_t	req_type;
61370 	/*
61371 	 * The completion ring to send the completion event on. This should
61372 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61373 	 */
61374 	uint16_t	cmpl_ring;
61375 	/*
61376 	 * The sequence ID is used by the driver for tracking multiple
61377 	 * commands. This ID is treated as opaque data by the firmware and
61378 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61379 	 */
61380 	uint16_t	seq_id;
61381 	/*
61382 	 * The target ID of the command:
61383 	 * * 0x0-0xFFF8 - The function ID
61384 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61385 	 * * 0xFFFD - Reserved for user-space HWRM interface
61386 	 * * 0xFFFF - HWRM
61387 	 */
61388 	uint16_t	target_id;
61389 	/*
61390 	 * A physical address pointer pointing to a host buffer that the
61391 	 * command's response data will be written. This can be either a host
61392 	 * physical address (HPA) or a guest physical address (GPA) and must
61393 	 * point to a physically contiguous block of memory.
61394 	 */
61395 	uint64_t	resp_addr;
61396 } hwrm_fw_ecn_qcfg_input_t, *phwrm_fw_ecn_qcfg_input_t;
61397 
61398 /* hwrm_fw_ecn_qcfg_output (size:128b/16B) */
61399 
61400 typedef struct hwrm_fw_ecn_qcfg_output {
61401 	/* The specific error status for the command. */
61402 	uint16_t	error_code;
61403 	/* The HWRM command request type. */
61404 	uint16_t	req_type;
61405 	/* The sequence ID from the original command. */
61406 	uint16_t	seq_id;
61407 	/* The length of the response data in number of bytes. */
61408 	uint16_t	resp_len;
61409 	uint16_t	flags;
61410 	/* When this bit is '1', ECN is enabled device-wide. */
61411 	#define HWRM_FW_ECN_QCFG_OUTPUT_FLAGS_ENABLE_ECN	UINT32_C(0x1)
61412 	uint8_t	unused_0[5];
61413 	/*
61414 	 * This field is used in Output records to indicate that the output
61415 	 * is completely written to RAM. This field should be read as '1'
61416 	 * to indicate that the output has been completely written. When
61417 	 * writing a command completion or response to an internal processor,
61418 	 * the order of writes has to be such that this field is written last.
61419 	 */
61420 	uint8_t	valid;
61421 } hwrm_fw_ecn_qcfg_output_t, *phwrm_fw_ecn_qcfg_output_t;
61422 
61423 /************************
61424  * hwrm_fw_health_check *
61425  ************************/
61426 
61427 
61428 /* hwrm_fw_health_check_input (size:128b/16B) */
61429 
61430 typedef struct hwrm_fw_health_check_input {
61431 	/* The HWRM command request type. */
61432 	uint16_t	req_type;
61433 	/*
61434 	 * The completion ring to send the completion event on. This should
61435 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61436 	 */
61437 	uint16_t	cmpl_ring;
61438 	/*
61439 	 * The sequence ID is used by the driver for tracking multiple
61440 	 * commands. This ID is treated as opaque data by the firmware and
61441 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61442 	 */
61443 	uint16_t	seq_id;
61444 	/*
61445 	 * The target ID of the command:
61446 	 * * 0x0-0xFFF8 - The function ID
61447 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61448 	 * * 0xFFFD - Reserved for user-space HWRM interface
61449 	 * * 0xFFFF - HWRM
61450 	 */
61451 	uint16_t	target_id;
61452 	/*
61453 	 * A physical address pointer pointing to a host buffer that the
61454 	 * command's response data will be written. This can be either a host
61455 	 * physical address (HPA) or a guest physical address (GPA) and must
61456 	 * point to a physically contiguous block of memory.
61457 	 */
61458 	uint64_t	resp_addr;
61459 } hwrm_fw_health_check_input_t, *phwrm_fw_health_check_input_t;
61460 
61461 /* hwrm_fw_health_check_output (size:128b/16B) */
61462 
61463 typedef struct hwrm_fw_health_check_output {
61464 	/* The specific error status for the command. */
61465 	uint16_t	error_code;
61466 	/* The HWRM command request type. */
61467 	uint16_t	req_type;
61468 	/* The sequence ID from the original command. */
61469 	uint16_t	seq_id;
61470 	/* The length of the response data in number of bytes. */
61471 	uint16_t	resp_len;
61472 	uint32_t	fw_status;
61473 	/*
61474 	 * This bit is '0' if the primary SBI was used this boot,
61475 	 * or '1' if the secondary SBI was used.
61476 	 */
61477 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_SBI_BOOTED	UINT32_C(0x1)
61478 	/*
61479 	 * This bit is '0' if the primary and secondary SBI images
61480 	 * match, or '1' if they do not match.
61481 	 */
61482 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_SBI_MISMATCH	UINT32_C(0x2)
61483 	/*
61484 	 * This bit is '0' if the primary SRT was used this boot,
61485 	 * or '1' if the secondary SRT was used.
61486 	 */
61487 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_SRT_BOOTED	UINT32_C(0x4)
61488 	/*
61489 	 * This bit is '0' if the primary and secondary SRT images
61490 	 * match, or '1' if they do not match.
61491 	 */
61492 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_SRT_MISMATCH	UINT32_C(0x8)
61493 	/*
61494 	 * This bit is '0' if the primary CRT (or second stage SRT)
61495 	 * was used this boot, or '1' if the secondary CRT (or
61496 	 * second stage SRT) was used.
61497 	 */
61498 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_CRT_BOOTED	UINT32_C(0x10)
61499 	/*
61500 	 * This bit is '0' if the primary and secondary CRT images
61501 	 * (or second stage SRT images) match, or '1' if they do not
61502 	 * match.
61503 	 */
61504 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_CRT_MISMATCH	UINT32_C(0x20)
61505 	/*
61506 	 * This bit is '0' if the second stage RT image is a CRT,
61507 	 * or '1' if the second stage RT image is an SRT.
61508 	 */
61509 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_SECOND_RT		UINT32_C(0x40)
61510 	/*
61511 	 * This bit is '0' if the image was loaded from flash,
61512 	 * or '1' if the image was fastbooted.
61513 	 */
61514 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_FASTBOOTED	UINT32_C(0x80)
61515 	/*
61516 	 * This bit is '0' if the primary dir_hdr was used to locate
61517 	 * the firmware, or '1' if the secondary dir_hdr was used.
61518 	 */
61519 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_DIR_HDR_BOOTED	UINT32_C(0x100)
61520 	/*
61521 	 * This bit is '0' if the primary and secondary dir_hdr match,
61522 	 * or '1' if they do not match.
61523 	 */
61524 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_DIR_HDR_MISMATCH	UINT32_C(0x200)
61525 	/*
61526 	 * This bit is '0' if the Master Boot Record is in good condition,
61527 	 * or '1' if it is corrupted.
61528 	 */
61529 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_MBR_CORRUPT	UINT32_C(0x400)
61530 	/*
61531 	 * This bit is '0' if the configuration is in good condition,
61532 	 * or '1' if it is corrupted.
61533 	 */
61534 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_CFG_MISMATCH	UINT32_C(0x800)
61535 	/*
61536 	 * This bit is '0' if both FRU entries match,
61537 	 * or '1' if they do not match.
61538 	 */
61539 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_FRU_MISMATCH	UINT32_C(0x1000)
61540 	/*
61541 	 * This bit is '0' if the primary CRT2 was used this boot,
61542 	 * or '1' if the secondary CRT2 was used.
61543 	 */
61544 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_CRT2_BOOTED	UINT32_C(0x2000)
61545 	/*
61546 	 * This bit is '0' if the primary and secondary CRT2 images
61547 	 * match, or '1' if they do not match.
61548 	 */
61549 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_CRT2_MISMATCH	UINT32_C(0x4000)
61550 	/*
61551 	 * This bit is '0' if the primary GXRT was used this boot,
61552 	 * or '1' if the secondary GXRT was used.
61553 	 */
61554 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_GXRT_BOOTED	UINT32_C(0x8000)
61555 	/*
61556 	 * This bit is '0' if the primary and secondary GXRT images
61557 	 * match, or '1' if they do not match.
61558 	 */
61559 	#define HWRM_FW_HEALTH_CHECK_OUTPUT_FW_STATUS_GXRT_MISMATCH	UINT32_C(0x10000)
61560 	uint8_t	unused_0[3];
61561 	/*
61562 	 * This field is used in Output records to indicate that the output
61563 	 * is completely written to RAM. This field should be read as '1'
61564 	 * to indicate that the output has been completely written. When
61565 	 * writing a command completion or response to an internal processor,
61566 	 * the order of writes has to be such that this field is written last.
61567 	 */
61568 	uint8_t	valid;
61569 } hwrm_fw_health_check_output_t, *phwrm_fw_health_check_output_t;
61570 
61571 /***************************
61572  * hwrm_fw_livepatch_query *
61573  ***************************/
61574 
61575 
61576 /* hwrm_fw_livepatch_query_input (size:192b/24B) */
61577 
61578 typedef struct hwrm_fw_livepatch_query_input {
61579 	/* The HWRM command request type. */
61580 	uint16_t	req_type;
61581 	/*
61582 	 * The completion ring to send the completion event on. This should
61583 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61584 	 */
61585 	uint16_t	cmpl_ring;
61586 	/*
61587 	 * The sequence ID is used by the driver for tracking multiple
61588 	 * commands. This ID is treated as opaque data by the firmware and
61589 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61590 	 */
61591 	uint16_t	seq_id;
61592 	/*
61593 	 * The target ID of the command:
61594 	 * * 0x0-0xFFF8 - The function ID
61595 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61596 	 * * 0xFFFD - Reserved for user-space HWRM interface
61597 	 * * 0xFFFF - HWRM
61598 	 */
61599 	uint16_t	target_id;
61600 	/*
61601 	 * A physical address pointer pointing to a host buffer that the
61602 	 * command's response data will be written. This can be either a host
61603 	 * physical address (HPA) or a guest physical address (GPA) and must
61604 	 * point to a physically contiguous block of memory.
61605 	 */
61606 	uint64_t	resp_addr;
61607 	/* Firmware target to which to apply the livepatch query */
61608 	uint8_t	fw_target;
61609 	/* Common firmware livepatch query. */
61610 	#define HWRM_FW_LIVEPATCH_QUERY_INPUT_FW_TARGET_COMMON_FW UINT32_C(0x1)
61611 	/* Secure firmware livepatch query. */
61612 	#define HWRM_FW_LIVEPATCH_QUERY_INPUT_FW_TARGET_SECURE_FW UINT32_C(0x2)
61613 	#define HWRM_FW_LIVEPATCH_QUERY_INPUT_FW_TARGET_LAST	HWRM_FW_LIVEPATCH_QUERY_INPUT_FW_TARGET_SECURE_FW
61614 	uint8_t	unused_0[7];
61615 } hwrm_fw_livepatch_query_input_t, *phwrm_fw_livepatch_query_input_t;
61616 
61617 /* hwrm_fw_livepatch_query_output (size:640b/80B) */
61618 
61619 typedef struct hwrm_fw_livepatch_query_output {
61620 	/* The specific error status for the command. */
61621 	uint16_t	error_code;
61622 	/* The HWRM command request type. */
61623 	uint16_t	req_type;
61624 	/* The sequence ID from the original command. */
61625 	uint16_t	seq_id;
61626 	/* The length of the response data in number of bytes. */
61627 	uint16_t	resp_len;
61628 	/*
61629 	 * This field represents the patch version string of the NVM installed
61630 	 * livepatch. (ASCII chars with NULL at the end).
61631 	 */
61632 	char	install_ver[32];
61633 	/*
61634 	 * This field represents the patch version string of the active
61635 	 * livepatch. (ASCII chars with NULL at the end).
61636 	 */
61637 	char	active_ver[32];
61638 	uint16_t	status_flags;
61639 	/* This bit is '1' if a livepatch image is installed to NVM. */
61640 	#define HWRM_FW_LIVEPATCH_QUERY_OUTPUT_STATUS_FLAGS_INSTALL	UINT32_C(0x1)
61641 	/* This bit is '1' if firmware livepatch is active. */
61642 	#define HWRM_FW_LIVEPATCH_QUERY_OUTPUT_STATUS_FLAGS_ACTIVE	UINT32_C(0x2)
61643 	uint8_t	unused_0[5];
61644 	/*
61645 	 * This field is used in Output records to indicate that the output
61646 	 * is completely written to RAM. This field should be read as '1'
61647 	 * to indicate that the output has been completely written. When
61648 	 * writing a command completion or response to an internal processor,
61649 	 * the order of writes has to be such that this field is written last.
61650 	 */
61651 	uint8_t	valid;
61652 } hwrm_fw_livepatch_query_output_t, *phwrm_fw_livepatch_query_output_t;
61653 
61654 /*********************
61655  * hwrm_fw_livepatch *
61656  *********************/
61657 
61658 
61659 /* hwrm_fw_livepatch_input (size:256b/32B) */
61660 
61661 typedef struct hwrm_fw_livepatch_input {
61662 	/* The HWRM command request type. */
61663 	uint16_t	req_type;
61664 	/*
61665 	 * The completion ring to send the completion event on. This should
61666 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61667 	 */
61668 	uint16_t	cmpl_ring;
61669 	/*
61670 	 * The sequence ID is used by the driver for tracking multiple
61671 	 * commands. This ID is treated as opaque data by the firmware and
61672 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61673 	 */
61674 	uint16_t	seq_id;
61675 	/*
61676 	 * The target ID of the command:
61677 	 * * 0x0-0xFFF8 - The function ID
61678 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61679 	 * * 0xFFFD - Reserved for user-space HWRM interface
61680 	 * * 0xFFFF - HWRM
61681 	 */
61682 	uint16_t	target_id;
61683 	/*
61684 	 * A physical address pointer pointing to a host buffer that the
61685 	 * command's response data will be written. This can be either a host
61686 	 * physical address (HPA) or a guest physical address (GPA) and must
61687 	 * point to a physically contiguous block of memory.
61688 	 */
61689 	uint64_t	resp_addr;
61690 	/* Livepatch operation */
61691 	uint8_t	opcode;
61692 	/*
61693 	 * Activate a livepatch that is NVM installed or via direct load
61694 	 * from host memory. Activate will authenticate a signed patch,
61695 	 * verify the patch version for compatibility and apply the
61696 	 * livepatch to existing firmware at run-time.
61697 	 */
61698 	#define HWRM_FW_LIVEPATCH_INPUT_OPCODE_ACTIVATE   UINT32_C(0x1)
61699 	/*
61700 	 * Deactivate a livepatch and restore to the original firmware
61701 	 * operation state.
61702 	 */
61703 	#define HWRM_FW_LIVEPATCH_INPUT_OPCODE_DEACTIVATE UINT32_C(0x2)
61704 	#define HWRM_FW_LIVEPATCH_INPUT_OPCODE_LAST	HWRM_FW_LIVEPATCH_INPUT_OPCODE_DEACTIVATE
61705 	/* Firmware target to which to apply the livepatch operation. */
61706 	uint8_t	fw_target;
61707 	/* Common firmware livepatch. */
61708 	#define HWRM_FW_LIVEPATCH_INPUT_FW_TARGET_COMMON_FW UINT32_C(0x1)
61709 	/* Secure firmware livepatch. */
61710 	#define HWRM_FW_LIVEPATCH_INPUT_FW_TARGET_SECURE_FW UINT32_C(0x2)
61711 	#define HWRM_FW_LIVEPATCH_INPUT_FW_TARGET_LAST	HWRM_FW_LIVEPATCH_INPUT_FW_TARGET_SECURE_FW
61712 	/* Load method for livepatch. */
61713 	uint8_t	loadtype;
61714 	/* Load a livepatch currently installed on NVM. */
61715 	#define HWRM_FW_LIVEPATCH_INPUT_LOADTYPE_NVM_INSTALL   UINT32_C(0x1)
61716 	/*
61717 	 * Load a livepatch directly from host memory. The livepatch image
61718 	 * is available at host_addr.
61719 	 */
61720 	#define HWRM_FW_LIVEPATCH_INPUT_LOADTYPE_MEMORY_DIRECT UINT32_C(0x2)
61721 	#define HWRM_FW_LIVEPATCH_INPUT_LOADTYPE_LAST	HWRM_FW_LIVEPATCH_INPUT_LOADTYPE_MEMORY_DIRECT
61722 	/* Reserved for future use. */
61723 	uint8_t	flags;
61724 	/* Length of livepatch image for memory direct loading, in bytes. */
61725 	uint32_t	patch_len;
61726 	/* 64-bit Host address of livepatch image for memory direct loading. */
61727 	uint64_t	host_addr;
61728 } hwrm_fw_livepatch_input_t, *phwrm_fw_livepatch_input_t;
61729 
61730 /* hwrm_fw_livepatch_output (size:128b/16B) */
61731 
61732 typedef struct hwrm_fw_livepatch_output {
61733 	/* The specific error status for the command. */
61734 	uint16_t	error_code;
61735 	/* The HWRM command request type. */
61736 	uint16_t	req_type;
61737 	/* The sequence ID from the original command. */
61738 	uint16_t	seq_id;
61739 	/* The length of the response data in number of bytes. */
61740 	uint16_t	resp_len;
61741 	uint8_t	unused_0[7];
61742 	/*
61743 	 * This field is used in Output records to indicate that the output
61744 	 * is completely written to RAM. This field should be read as '1'
61745 	 * to indicate that the output has been completely written. When
61746 	 * writing a command completion or response to an internal processor,
61747 	 * the order of writes has to be such that this field is written last.
61748 	 */
61749 	uint8_t	valid;
61750 } hwrm_fw_livepatch_output_t, *phwrm_fw_livepatch_output_t;
61751 
61752 /* hwrm_fw_livepatch_cmd_err (size:64b/8B) */
61753 
61754 typedef struct hwrm_fw_livepatch_cmd_err {
61755 	/*
61756 	 * command specific error codes that goes to
61757 	 * the cmd_err field in Common HWRM Error Response.
61758 	 */
61759 	uint8_t	code;
61760 	/* Unknown error. */
61761 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
61762 	/* Opcode invalid. */
61763 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_INVALID_OPCODE  UINT32_C(0x1)
61764 	/* Firmware target invalid. */
61765 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_INVALID_TARGET  UINT32_C(0x2)
61766 	/* Livepatch operation not supported. */
61767 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_NOT_SUPPORTED   UINT32_C(0x3)
61768 	/* Livepatch image is not installed in NVRAM. */
61769 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_NOT_INSTALLED   UINT32_C(0x4)
61770 	/* Deactivate failed. Firmware is not currently patched. */
61771 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_NOT_PATCHED	UINT32_C(0x5)
61772 	/* Authentication of a signed livepatch failed. */
61773 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_AUTH_FAIL	UINT32_C(0x6)
61774 	/* Livepatch header check failed. Patch incompatible. */
61775 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_INVALID_HEADER  UINT32_C(0x7)
61776 	/* Livepatch size incompatible. */
61777 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_INVALID_SIZE	UINT32_C(0x8)
61778 	/*
61779 	 * Activate failed. Firmware has already been patched. Deactivate
61780 	 * existing livepatch before proceeding.
61781 	 */
61782 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_ALREADY_PATCHED UINT32_C(0x9)
61783 	#define HWRM_FW_LIVEPATCH_CMD_ERR_CODE_LAST	HWRM_FW_LIVEPATCH_CMD_ERR_CODE_ALREADY_PATCHED
61784 	uint8_t	unused_0[7];
61785 } hwrm_fw_livepatch_cmd_err_t, *phwrm_fw_livepatch_cmd_err_t;
61786 
61787 /****************
61788  * hwrm_fw_sync *
61789  ****************/
61790 
61791 
61792 /* hwrm_fw_sync_input (size:192b/24B) */
61793 
61794 typedef struct hwrm_fw_sync_input {
61795 	/* The HWRM command request type. */
61796 	uint16_t	req_type;
61797 	/*
61798 	 * The completion ring to send the completion event on. This should
61799 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61800 	 */
61801 	uint16_t	cmpl_ring;
61802 	/*
61803 	 * The sequence ID is used by the driver for tracking multiple
61804 	 * commands. This ID is treated as opaque data by the firmware and
61805 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61806 	 */
61807 	uint16_t	seq_id;
61808 	/*
61809 	 * The target ID of the command:
61810 	 * * 0x0-0xFFF8 - The function ID
61811 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61812 	 * * 0xFFFD - Reserved for user-space HWRM interface
61813 	 * * 0xFFFF - HWRM
61814 	 */
61815 	uint16_t	target_id;
61816 	/*
61817 	 * A physical address pointer pointing to a host buffer that the
61818 	 * command's response data will be written. This can be either a host
61819 	 * physical address (HPA) or a guest physical address (GPA) and must
61820 	 * point to a physically contiguous block of memory.
61821 	 */
61822 	uint64_t	resp_addr;
61823 	uint32_t	sync_action;
61824 	/*
61825 	 * If action is '1' (sync) and this bit is set, the SBI
61826 	 * images will be synchronized, copying from the instance
61827 	 * used for boot to the other instance, if they currently
61828 	 * do not match.
61829 	 */
61830 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_SBI	UINT32_C(0x1)
61831 	/*
61832 	 * If action is '1' (sync) and this bit is set, the SRT
61833 	 * images will be synchronized, copying from the instance
61834 	 * used for boot to the other instance, if they currently
61835 	 * do not match.
61836 	 */
61837 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_SRT	UINT32_C(0x2)
61838 	/*
61839 	 * If action is '1' (sync) and this bit is set, the CRT
61840 	 * images will be synchronized (or second stage SRT if that
61841 	 * is used in place of CRT), copying from the instance
61842 	 * used for boot to the other instance, if they currently
61843 	 * do not match.
61844 	 */
61845 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_CRT	UINT32_C(0x4)
61846 	/*
61847 	 * If action is '1' (sync) and this bit is set, the dir_hdr
61848 	 * partition will be synchronized, copying from the instance
61849 	 * used for boot to the other instance, if they currently
61850 	 * do not match.
61851 	 */
61852 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_DIR_HDR	UINT32_C(0x8)
61853 	/*
61854 	 * If action is '1' (sync) and this bit is set, the MBR
61855 	 * will be erased and reprogrammed with valid content.
61856 	 */
61857 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_WRITE_MBR	UINT32_C(0x10)
61858 	/*
61859 	 * If action is '1' (sync) and this bit is set, the
61860 	 * configuration will be resynced or repaired as needed.
61861 	 */
61862 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_CFG	UINT32_C(0x20)
61863 	/*
61864 	 * If action is '1' (sync) and this bit is set, the
61865 	 * FRU in NVM file will be synchronized, copying the active
61866 	 * FRU to the backup FRU.
61867 	 */
61868 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_FRU	UINT32_C(0x40)
61869 	/*
61870 	 * If action is '1' (sync) and this bit is set, the CRT2
61871 	 * images will be synchronized, copying from the instance
61872 	 * used for boot to the other instance, if they currently
61873 	 * do not match.
61874 	 */
61875 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_CRT2	UINT32_C(0x80)
61876 	/*
61877 	 * If action is '1' (sync) and this bit is set, the GXRT
61878 	 * images will be synchronized, copying from the instance
61879 	 * used for boot to the other instance, if they currently
61880 	 * do not match.
61881 	 */
61882 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_SYNC_GXRT	UINT32_C(0x100)
61883 	/*
61884 	 * A value of '1' instructs the firmware to perform an image
61885 	 * synchronization of the firmware types denoted by the
61886 	 * sync_sbi, sync_srt, sync_crt, sync_crt2 bits. A value of '0' just
61887 	 * requests the status for the previously requested sync
61888 	 * operation.
61889 	 */
61890 	#define HWRM_FW_SYNC_INPUT_SYNC_ACTION_ACTION	UINT32_C(0x80000000)
61891 	uint8_t	unused_0[4];
61892 } hwrm_fw_sync_input_t, *phwrm_fw_sync_input_t;
61893 
61894 /* hwrm_fw_sync_output (size:128b/16B) */
61895 
61896 typedef struct hwrm_fw_sync_output {
61897 	/* The specific error status for the command. */
61898 	uint16_t	error_code;
61899 	/* The HWRM command request type. */
61900 	uint16_t	req_type;
61901 	/* The sequence ID from the original command. */
61902 	uint16_t	seq_id;
61903 	/* The length of the response data in number of bytes. */
61904 	uint16_t	resp_len;
61905 	uint32_t	sync_status;
61906 	/* This bit field indicates the error if 'sync_err' bit is set. */
61907 	#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_MASK	UINT32_C(0xff)
61908 	#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_SFT	0
61909 	/* Success, no error */
61910 		#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_SUCCESS	UINT32_C(0x0)
61911 	/*
61912 	 * A previously requested synchronization command is still
61913 	 * in progress.
61914 	 */
61915 		#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_IN_PROGRESS  UINT32_C(0x1)
61916 	/* An NVRAM operation has timed out. */
61917 		#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_TIMEOUT	UINT32_C(0x2)
61918 	/* General NVRAM error code. */
61919 		#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_GENERAL	UINT32_C(0x3)
61920 		#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_LAST	HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_ERR_CODE_GENERAL
61921 	/*
61922 	 * This bit is '1' if the synchronization request has completed
61923 	 * with an error; the 'err_code' field can be used to obtain
61924 	 * information about error type.
61925 	 */
61926 	#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_SYNC_ERR		UINT32_C(0x40000000)
61927 	/*
61928 	 * This bit is '0' if the previously requested synchronization
61929 	 * command is still in progress, or '1' if the previously
61930 	 * requested sync command has completed. If '1', the 'sync_err'
61931 	 * field will indicate if it completed successfully or with
61932 	 * an error.
61933 	 */
61934 	#define HWRM_FW_SYNC_OUTPUT_SYNC_STATUS_SYNC_COMPLETE	UINT32_C(0x80000000)
61935 	uint8_t	unused_0[3];
61936 	/*
61937 	 * This field is used in Output records to indicate that the output
61938 	 * is completely written to RAM. This field should be read as '1'
61939 	 * to indicate that the output has been completely written. When
61940 	 * writing a command completion or response to an internal processor,
61941 	 * the order of writes has to be such that this field is written last.
61942 	 */
61943 	uint8_t	valid;
61944 } hwrm_fw_sync_output_t, *phwrm_fw_sync_output_t;
61945 
61946 /***********************
61947  * hwrm_fw_state_qcaps *
61948  ***********************/
61949 
61950 
61951 /* hwrm_fw_state_qcaps_input (size:128b/16B) */
61952 
61953 typedef struct hwrm_fw_state_qcaps_input {
61954 	/* The HWRM command request type. */
61955 	uint16_t	req_type;
61956 	/*
61957 	 * The completion ring to send the completion event on. This should
61958 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61959 	 */
61960 	uint16_t	cmpl_ring;
61961 	/*
61962 	 * The sequence ID is used by the driver for tracking multiple
61963 	 * commands. This ID is treated as opaque data by the firmware and
61964 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61965 	 */
61966 	uint16_t	seq_id;
61967 	/*
61968 	 * The target ID of the command:
61969 	 * * 0x0-0xFFF8 - The function ID
61970 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61971 	 * * 0xFFFD - Reserved for user-space HWRM interface
61972 	 * * 0xFFFF - HWRM
61973 	 */
61974 	uint16_t	target_id;
61975 	/*
61976 	 * A physical address pointer pointing to a host buffer that the
61977 	 * command's response data will be written. This can be either a host
61978 	 * physical address (HPA) or a guest physical address (GPA) and must
61979 	 * point to a physically contiguous block of memory.
61980 	 */
61981 	uint64_t	resp_addr;
61982 } hwrm_fw_state_qcaps_input_t, *phwrm_fw_state_qcaps_input_t;
61983 
61984 /* hwrm_fw_state_qcaps_output (size:256b/32B) */
61985 
61986 typedef struct hwrm_fw_state_qcaps_output {
61987 	/* The specific error status for the command. */
61988 	uint16_t	error_code;
61989 	/* The HWRM command request type. */
61990 	uint16_t	req_type;
61991 	/* The sequence ID from the original command. */
61992 	uint16_t	seq_id;
61993 	/* The length of the response data in number of bytes. */
61994 	uint16_t	resp_len;
61995 	/*
61996 	 * This field indicates the size in bytes required by host backup
61997 	 * memory. Host software should allocate memory according to this
61998 	 * size requirement and pass the allocated memory to the
61999 	 * HWRM_FW_STATE_BACKUP and HWRM_FW_STATE_RESTORE commands in the form
62000 	 * of PBL data as specified in those commands.
62001 	 */
62002 	uint32_t	backup_memory;
62003 	/*
62004 	 * This field indicates the max time in milliseconds that firmware
62005 	 * waits for quiesce to complete. Firmware indicates successful
62006 	 * quiesce completion if the quiesce operation completes within this
62007 	 * timeout. If firmware is still waiting for the quiesce operation
62008 	 * to complete when this timeout is reached, firmware stops waiting
62009 	 * (without canceling any quiesce action such as pausing or
62010 	 * clearing meter profiles) and indicates a timeout status result
62011 	 * via NQE completion notification. This timeout value may also be
62012 	 * used by the driver to know the max time to wait for any NQE
62013 	 * notification response to the HWRM_FW_STATE_QUIESCE command. After
62014 	 * a timeout, the driver may elect to invoke HWRM_FW_STATE_QUIESCE
62015 	 * again to keep trying or to invoke HWRM_FW_STATE_UNQUIESCE to
62016 	 * revert the operation. Since there is no identifier correlating
62017 	 * each HWRM_FW_STATE_QUIESCE command with its NQE response, it is
62018 	 * important for the driver to wait for the NQE response before
62019 	 * issuing a subsequent HWRM_FW_STATE_QUIESCE command.
62020 	 */
62021 	uint32_t	quiesce_timeout;
62022 	/*
62023 	 * This field indicates time in milliseconds that the driver should
62024 	 * wait after return from HWRM_FW_RESET to begin polling the device
62025 	 * for status 0x8000.
62026 	 */
62027 	uint32_t	fw_status_blackout;
62028 	/*
62029 	 * This field indicates a max time for firmware to poll for status
62030 	 * 0x8000 before assuming a reset failure occurred. This time does
62031 	 * not include fw_status_blackout time which would immediately precede
62032 	 * this wait.
62033 	 */
62034 	uint32_t	fw_status_max_wait;
62035 	uint8_t	unused_0[4];
62036 	uint8_t	unused_1[3];
62037 	/*
62038 	 * This field is used in Output records to indicate that the output
62039 	 * is completely written to RAM. This field should be read as '1'
62040 	 * to indicate that the output has been completely written. When
62041 	 * writing a command completion or response to an internal processor,
62042 	 * the order of writes has to be such that this field is written last.
62043 	 */
62044 	uint8_t	valid;
62045 } hwrm_fw_state_qcaps_output_t, *phwrm_fw_state_qcaps_output_t;
62046 
62047 /*************************
62048  * hwrm_fw_state_quiesce *
62049  *************************/
62050 
62051 
62052 /* hwrm_fw_state_quiesce_input (size:192b/24B) */
62053 
62054 typedef struct hwrm_fw_state_quiesce_input {
62055 	/* The HWRM command request type. */
62056 	uint16_t	req_type;
62057 	/*
62058 	 * The completion ring to send the completion event on. This should
62059 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62060 	 */
62061 	uint16_t	cmpl_ring;
62062 	/*
62063 	 * The sequence ID is used by the driver for tracking multiple
62064 	 * commands. This ID is treated as opaque data by the firmware and
62065 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62066 	 */
62067 	uint16_t	seq_id;
62068 	/*
62069 	 * The target ID of the command:
62070 	 * * 0x0-0xFFF8 - The function ID
62071 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62072 	 * * 0xFFFD - Reserved for user-space HWRM interface
62073 	 * * 0xFFFF - HWRM
62074 	 */
62075 	uint16_t	target_id;
62076 	/*
62077 	 * A physical address pointer pointing to a host buffer that the
62078 	 * command's response data will be written. This can be either a host
62079 	 * physical address (HPA) or a guest physical address (GPA) and must
62080 	 * point to a physically contiguous block of memory.
62081 	 */
62082 	uint64_t	resp_addr;
62083 	uint8_t	flags;
62084 	/*
62085 	 * Setting this bit to '1', indicates impactless firmware update
62086 	 * is in a recovery mode where hardware is in an error state and
62087 	 * where recovery is desired with reasonably minimal impact to
62088 	 * connected clients. The quiesce operation may require separate
62089 	 * steps to handle quiescing when hardware is in a hung or locked
62090 	 * state. For example, quiesce via draining may not be possible
62091 	 * depending on the type of error. This flag's state would be kept
62092 	 * in firmware if recovery-specific steps are also needed for the
62093 	 * HWRM_FW_STATE_BACKUP. Note this option is available only for
62094 	 * specific recovery scenarios and may not be operational across
62095 	 * all controllers.
62096 	 */
62097 	#define HWRM_FW_STATE_QUIESCE_INPUT_FLAGS_ERROR_RECOVERY	UINT32_C(0x1)
62098 	uint8_t	unused_0[7];
62099 } hwrm_fw_state_quiesce_input_t, *phwrm_fw_state_quiesce_input_t;
62100 
62101 /* hwrm_fw_state_quiesce_output (size:192b/24B) */
62102 
62103 typedef struct hwrm_fw_state_quiesce_output {
62104 	/* The specific error status for the command. */
62105 	uint16_t	error_code;
62106 	/* The HWRM command request type. */
62107 	uint16_t	req_type;
62108 	/* The sequence ID from the original command. */
62109 	uint16_t	seq_id;
62110 	/* The length of the response data in number of bytes. */
62111 	uint16_t	resp_len;
62112 	uint32_t	quiesce_status;
62113 	/*
62114 	 * This bit is '1' if the quiesce request has been successfully
62115 	 * initiated.
62116 	 */
62117 	#define HWRM_FW_STATE_QUIESCE_OUTPUT_QUIESCE_STATUS_INITIATED	UINT32_C(0x80000000)
62118 	uint8_t	unused_0[4];
62119 	uint8_t	unused_1[7];
62120 	/*
62121 	 * This field is used in Output records to indicate that the output
62122 	 * is completely written to RAM. This field should be read as '1' to
62123 	 * indicate that the output has been completely written. When
62124 	 * writing a command completion or response to an internal
62125 	 * processor, the order of writes has to be such that this field is
62126 	 * written last.
62127 	 */
62128 	uint8_t	valid;
62129 } hwrm_fw_state_quiesce_output_t, *phwrm_fw_state_quiesce_output_t;
62130 
62131 /***************************
62132  * hwrm_fw_state_unquiesce *
62133  ***************************/
62134 
62135 
62136 /* hwrm_fw_state_unquiesce_input (size:128b/16B) */
62137 
62138 typedef struct hwrm_fw_state_unquiesce_input {
62139 	/* The HWRM command request type. */
62140 	uint16_t	req_type;
62141 	/*
62142 	 * The completion ring to send the completion event on. This should
62143 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62144 	 */
62145 	uint16_t	cmpl_ring;
62146 	/*
62147 	 * The sequence ID is used by the driver for tracking multiple
62148 	 * commands. This ID is treated as opaque data by the firmware and
62149 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62150 	 */
62151 	uint16_t	seq_id;
62152 	/*
62153 	 * The target ID of the command:
62154 	 * * 0x0-0xFFF8 - The function ID
62155 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62156 	 * * 0xFFFD - Reserved for user-space HWRM interface
62157 	 * * 0xFFFF - HWRM
62158 	 */
62159 	uint16_t	target_id;
62160 	/*
62161 	 * A physical address pointer pointing to a host buffer that the
62162 	 * command's response data will be written. This can be either a host
62163 	 * physical address (HPA) or a guest physical address (GPA) and must
62164 	 * point to a physically contiguous block of memory.
62165 	 */
62166 	uint64_t	resp_addr;
62167 } hwrm_fw_state_unquiesce_input_t, *phwrm_fw_state_unquiesce_input_t;
62168 
62169 /* hwrm_fw_state_unquiesce_output (size:192b/24B) */
62170 
62171 typedef struct hwrm_fw_state_unquiesce_output {
62172 	/* The specific error status for the command. */
62173 	uint16_t	error_code;
62174 	/* The HWRM command request type. */
62175 	uint16_t	req_type;
62176 	/* The sequence ID from the original command. */
62177 	uint16_t	seq_id;
62178 	/* The length of the response data in number of bytes. */
62179 	uint16_t	resp_len;
62180 	uint32_t	unquiesce_status;
62181 	/* This bit is '1' if the unquiesce request has fully completed. */
62182 	#define HWRM_FW_STATE_UNQUIESCE_OUTPUT_UNQUIESCE_STATUS_COMPLETE	UINT32_C(0x80000000)
62183 	uint8_t	unused_0[4];
62184 	uint8_t	unused_1[7];
62185 	/*
62186 	 * This field is used in Output records to indicate that the output
62187 	 * is completely written to RAM. This field should be read as '1'
62188 	 * to indicate that the output has been completely written. When
62189 	 * writing a command completion or response to an internal processor,
62190 	 * the order of writes has to be such that this field is written last.
62191 	 */
62192 	uint8_t	valid;
62193 } hwrm_fw_state_unquiesce_output_t, *phwrm_fw_state_unquiesce_output_t;
62194 
62195 /************************
62196  * hwrm_fw_state_backup *
62197  ************************/
62198 
62199 
62200 /* hwrm_fw_state_backup_input (size:256b/32B) */
62201 
62202 typedef struct hwrm_fw_state_backup_input {
62203 	/* The HWRM command request type. */
62204 	uint16_t	req_type;
62205 	/*
62206 	 * The completion ring to send the completion event on. This should
62207 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62208 	 */
62209 	uint16_t	cmpl_ring;
62210 	/*
62211 	 * The sequence ID is used by the driver for tracking multiple
62212 	 * commands. This ID is treated as opaque data by the firmware and
62213 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62214 	 */
62215 	uint16_t	seq_id;
62216 	/*
62217 	 * The target ID of the command:
62218 	 * * 0x0-0xFFF8 - The function ID
62219 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62220 	 * * 0xFFFD - Reserved for user-space HWRM interface
62221 	 * * 0xFFFF - HWRM
62222 	 */
62223 	uint16_t	target_id;
62224 	/*
62225 	 * A physical address pointer pointing to a host buffer that the
62226 	 * command's response data will be written. This can be either a host
62227 	 * physical address (HPA) or a guest physical address (GPA) and must
62228 	 * point to a physically contiguous block of memory.
62229 	 */
62230 	uint64_t	resp_addr;
62231 	/* State backup page size and level. */
62232 	uint8_t	backup_pg_size_backup_lvl;
62233 	/* State backup PBL indirect levels. */
62234 	#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_LVL_MASK	UINT32_C(0xf)
62235 	#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_LVL_SFT	0
62236 	/* PBL pointer is physical start address. */
62237 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_LVL_LVL_0	UINT32_C(0x0)
62238 	/* PBL pointer points to PTE table. */
62239 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_LVL_LVL_1	UINT32_C(0x1)
62240 	/*
62241 	 * PBL pointer points to PDE table with each entry pointing to PTE
62242 	 * tables.
62243 	 */
62244 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_LVL_LVL_2	UINT32_C(0x2)
62245 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_LVL_LAST	HWRM_FW_STATE_BACKUP_INPUT_BACKUP_LVL_LVL_2
62246 	/* State backup page size. */
62247 	#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_MASK  UINT32_C(0xf0)
62248 	#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_SFT   4
62249 	/* 4KB. */
62250 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
62251 	/* 8KB. */
62252 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
62253 	/* 64KB. */
62254 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
62255 	/* 2MB. */
62256 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
62257 	/* 8MB. */
62258 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
62259 	/* 1GB. */
62260 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
62261 		#define HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_LAST   HWRM_FW_STATE_BACKUP_INPUT_BACKUP_PG_SIZE_PG_1G
62262 	uint8_t	unused_0[7];
62263 	/* State backup page directory. */
62264 	uint64_t	backup_page_dir;
62265 } hwrm_fw_state_backup_input_t, *phwrm_fw_state_backup_input_t;
62266 
62267 /* hwrm_fw_state_backup_output (size:192b/24B) */
62268 
62269 typedef struct hwrm_fw_state_backup_output {
62270 	/* The specific error status for the command. */
62271 	uint16_t	error_code;
62272 	/* The HWRM command request type. */
62273 	uint16_t	req_type;
62274 	/* The sequence ID from the original command. */
62275 	uint16_t	seq_id;
62276 	/* The length of the response data in number of bytes. */
62277 	uint16_t	resp_len;
62278 	uint32_t	backup_status;
62279 	/*
62280 	 * This bit field provides additional information if the error if
62281 	 * error_code in the common HWRM header is set.
62282 	 */
62283 	#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_ERR_CODE_MASK	UINT32_C(0xff)
62284 	#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_ERR_CODE_SFT	0
62285 	/* Success, no error */
62286 		#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_ERR_CODE_SUCCESS	UINT32_C(0x0)
62287 	/* Data or control plane detected as non-quiesced */
62288 		#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_ERR_CODE_QUIESCE_ERROR  UINT32_C(0x1)
62289 	/* General backup error */
62290 		#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_ERR_CODE_GENERAL	UINT32_C(0x3)
62291 		#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_ERR_CODE_LAST	HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_ERR_CODE_GENERAL
62292 	/*
62293 	 * This bit is '0' if the backout was done in a way that firmware
62294 	 * may continue running normally after the backup, for example if
62295 	 * the host elects to skip the subsequent reset and restore for any
62296 	 * reason. A value of '1' indicates the act of backing up has left
62297 	 * the firmware/device in a state where subsequent reset is
62298 	 * required, for example of probing state of a queue leaves changes
62299 	 * state in a way that is detectable by users.
62300 	 */
62301 	#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_RESET_REQUIRED	UINT32_C(0x40000000)
62302 	/* This bit is '1' if the backup request has fully completed. */
62303 	#define HWRM_FW_STATE_BACKUP_OUTPUT_BACKUP_STATUS_COMPLETE		UINT32_C(0x80000000)
62304 	uint8_t	unused_0[4];
62305 	uint8_t	unused_1[7];
62306 	/*
62307 	 * This field is used in Output records to indicate that the output
62308 	 * is completely written to RAM. This field should be read as '1'
62309 	 * to indicate that the output has been completely written. When
62310 	 * writing a command completion or response to an internal processor,
62311 	 * the order of writes has to be such that this field is written last.
62312 	 */
62313 	uint8_t	valid;
62314 } hwrm_fw_state_backup_output_t, *phwrm_fw_state_backup_output_t;
62315 
62316 /*************************
62317  * hwrm_fw_state_restore *
62318  *************************/
62319 
62320 
62321 /* hwrm_fw_state_restore_input (size:256b/32B) */
62322 
62323 typedef struct hwrm_fw_state_restore_input {
62324 	/* The HWRM command request type. */
62325 	uint16_t	req_type;
62326 	/*
62327 	 * The completion ring to send the completion event on. This should
62328 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62329 	 */
62330 	uint16_t	cmpl_ring;
62331 	/*
62332 	 * The sequence ID is used by the driver for tracking multiple
62333 	 * commands. This ID is treated as opaque data by the firmware and
62334 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62335 	 */
62336 	uint16_t	seq_id;
62337 	/*
62338 	 * The target ID of the command:
62339 	 * * 0x0-0xFFF8 - The function ID
62340 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62341 	 * * 0xFFFD - Reserved for user-space HWRM interface
62342 	 * * 0xFFFF - HWRM
62343 	 */
62344 	uint16_t	target_id;
62345 	/*
62346 	 * A physical address pointer pointing to a host buffer that the
62347 	 * command's response data will be written. This can be either a host
62348 	 * physical address (HPA) or a guest physical address (GPA) and must
62349 	 * point to a physically contiguous block of memory.
62350 	 */
62351 	uint64_t	resp_addr;
62352 	/* State restore page size and level. */
62353 	uint8_t	restore_pg_size_restore_lvl;
62354 	/* State restore PBL indirect levels. */
62355 	#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_LVL_MASK	UINT32_C(0xf)
62356 	#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_LVL_SFT	0
62357 	/* PBL pointer is physical start address. */
62358 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_LVL_LVL_0	UINT32_C(0x0)
62359 	/* PBL pointer points to PTE table. */
62360 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_LVL_LVL_1	UINT32_C(0x1)
62361 	/*
62362 	 * PBL pointer points to PDE table with each entry pointing to PTE
62363 	 * tables.
62364 	 */
62365 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_LVL_LVL_2	UINT32_C(0x2)
62366 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_LVL_LAST	HWRM_FW_STATE_RESTORE_INPUT_RESTORE_LVL_LVL_2
62367 	/* State restore page size. */
62368 	#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_MASK  UINT32_C(0xf0)
62369 	#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_SFT   4
62370 	/* 4KB. */
62371 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
62372 	/* 8KB. */
62373 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
62374 	/* 64KB. */
62375 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
62376 	/* 2MB. */
62377 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
62378 	/* 8MB. */
62379 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
62380 	/* 1GB. */
62381 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
62382 		#define HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_LAST   HWRM_FW_STATE_RESTORE_INPUT_RESTORE_PG_SIZE_PG_1G
62383 	uint8_t	unused_0[7];
62384 	/* State restore page directory. */
62385 	uint64_t	restore_page_dir;
62386 } hwrm_fw_state_restore_input_t, *phwrm_fw_state_restore_input_t;
62387 
62388 /* hwrm_fw_state_restore_output (size:128b/16B) */
62389 
62390 typedef struct hwrm_fw_state_restore_output {
62391 	/* The specific error status for the command. */
62392 	uint16_t	error_code;
62393 	/* The HWRM command request type. */
62394 	uint16_t	req_type;
62395 	/* The sequence ID from the original command. */
62396 	uint16_t	seq_id;
62397 	/* The length of the response data in number of bytes. */
62398 	uint16_t	resp_len;
62399 	uint32_t	restore_status;
62400 	/*
62401 	 * This bit field provides additional information if the error if
62402 	 * error_code in the common HWRM header is set.
62403 	 */
62404 	#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_MASK		UINT32_C(0xff)
62405 	#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_SFT		0
62406 	/* Success, no error */
62407 		#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_SUCCESS		UINT32_C(0x0)
62408 	/* General restore error */
62409 		#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_GENERAL		UINT32_C(0x1)
62410 	/* Format parse error */
62411 		#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_FORMAT_PARSE		UINT32_C(0x2)
62412 	/* Integrity check error */
62413 		#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_INTEGRITY_CHECK	UINT32_C(0x3)
62414 		#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_LAST		HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_ERR_CODE_INTEGRITY_CHECK
62415 	/*
62416 	 * If a failure occurs (complete is 0), restore attempts to
62417 	 * completely roll back any state applied so that the failure
62418 	 * results in no state change. This flag indicates whether that
62419 	 * rollback completed successfully and thoroughly.
62420 	 */
62421 	#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_FAILURE_ROLLBACK_COMPLETED	UINT32_C(0x40000000)
62422 	/* This bit is '1' if the restore request has fully completed. */
62423 	#define HWRM_FW_STATE_RESTORE_OUTPUT_RESTORE_STATUS_COMPLETE			UINT32_C(0x80000000)
62424 	uint8_t	unused_0[3];
62425 	/*
62426 	 * This field is used in Output records to indicate that the output
62427 	 * is completely written to RAM. This field should be read as '1'
62428 	 * to indicate that the output has been completely written. When
62429 	 * writing a command completion or response to an internal processor,
62430 	 * the order of writes has to be such that this field is written last.
62431 	 */
62432 	uint8_t	valid;
62433 } hwrm_fw_state_restore_output_t, *phwrm_fw_state_restore_output_t;
62434 
62435 /**********************
62436  * hwrm_fw_secure_cfg *
62437  **********************/
62438 
62439 
62440 /* hwrm_fw_secure_cfg_input (size:256b/32B) */
62441 
62442 typedef struct hwrm_fw_secure_cfg_input {
62443 	/* The HWRM command request type. */
62444 	uint16_t	req_type;
62445 	/*
62446 	 * The completion ring to send the completion event on. This should
62447 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62448 	 */
62449 	uint16_t	cmpl_ring;
62450 	/*
62451 	 * The sequence ID is used by the driver for tracking multiple
62452 	 * commands. This ID is treated as opaque data by the firmware and
62453 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62454 	 */
62455 	uint16_t	seq_id;
62456 	/*
62457 	 * The target ID of the command:
62458 	 * * 0x0-0xFFF8 - The function ID
62459 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62460 	 * * 0xFFFD - Reserved for user-space HWRM interface
62461 	 * * 0xFFFF - HWRM
62462 	 */
62463 	uint16_t	target_id;
62464 	/*
62465 	 * A physical address pointer pointing to a host buffer that the
62466 	 * command's response data will be written. This can be either a host
62467 	 * physical address (HPA) or a guest physical address (GPA) and must
62468 	 * point to a physically contiguous block of memory.
62469 	 */
62470 	uint64_t	resp_addr;
62471 	/* Specify the type of security option. */
62472 	uint8_t	enable;
62473 	/* Fields for the nvm lock mode are valid. */
62474 	#define HWRM_FW_SECURE_CFG_INPUT_ENABLE_NVRAM UINT32_C(0x1)
62475 	/* Fields for the grc access control are valid. */
62476 	#define HWRM_FW_SECURE_CFG_INPUT_ENABLE_GRC   UINT32_C(0x2)
62477 	/* Fields for the uart access control are valid. */
62478 	#define HWRM_FW_SECURE_CFG_INPUT_ENABLE_UART  UINT32_C(0x3)
62479 	#define HWRM_FW_SECURE_CFG_INPUT_ENABLE_LAST HWRM_FW_SECURE_CFG_INPUT_ENABLE_UART
62480 	/*
62481 	 * This bit field indicates the type of the configuration to be
62482 	 * updated.
62483 	 */
62484 	uint8_t	config_mode;
62485 	/* When this bit is '1', persistent config would be updated. */
62486 	#define HWRM_FW_SECURE_CFG_INPUT_CONFIG_MODE_PERSISTENT	UINT32_C(0x1)
62487 	/* When this bit is '1', runtime config would be updated. */
62488 	#define HWRM_FW_SECURE_CFG_INPUT_CONFIG_MODE_RUNTIME	UINT32_C(0x2)
62489 	/* define lock mode for nvram. */
62490 	uint8_t	nvm_lock_mode;
62491 	/*
62492 	 * Contents of the entire NVRAM including FW and Config can be
62493 	 * altered by a HWRM client.
62494 	 */
62495 	#define HWRM_FW_SECURE_CFG_INPUT_NVM_LOCK_MODE_NONE	UINT32_C(0x0)
62496 	/*
62497 	 * Only partial sections of the NVM are to be locked. To specify
62498 	 * section to be locked the 'nvm_partial_lock_mask' should be used.
62499 	 */
62500 	#define HWRM_FW_SECURE_CFG_INPUT_NVM_LOCK_MODE_PARTIAL UINT32_C(0x1)
62501 	/*
62502 	 * Contents of the entire NVM including FW and Config are to be
62503 	 * locked against any alteration by any HWRM client.
62504 	 */
62505 	#define HWRM_FW_SECURE_CFG_INPUT_NVM_LOCK_MODE_FULL	UINT32_C(0x2)
62506 	/*
62507 	 * This is a HW lock of the NVM itself. Once locked firmware has no
62508 	 * control to unlock. Contents of the NVM cannot be altered.
62509 	 * Require a power cycle to unlock.
62510 	 */
62511 	#define HWRM_FW_SECURE_CFG_INPUT_NVM_LOCK_MODE_CHIP	UINT32_C(0x3)
62512 	#define HWRM_FW_SECURE_CFG_INPUT_NVM_LOCK_MODE_LAST   HWRM_FW_SECURE_CFG_INPUT_NVM_LOCK_MODE_CHIP
62513 	/*
62514 	 * bit field indicating the type of partial_lock.
62515 	 * This field is only applicable if the partial_lock is set.
62516 	 */
62517 	uint8_t	nvm_partial_lock_mask;
62518 	/* When this bit is '1', updating the FW images are locked. */
62519 	#define HWRM_FW_SECURE_CFG_INPUT_NVM_PARTIAL_LOCK_MASK_EXE	UINT32_C(0x1)
62520 	/* When this bit is '1', updating the CFG are locked. */
62521 	#define HWRM_FW_SECURE_CFG_INPUT_NVM_PARTIAL_LOCK_MASK_CFG	UINT32_C(0x2)
62522 	/* specify grc access control for specified HWRM clients. */
62523 	uint8_t	grc_ctrl;
62524 	/* Read Only */
62525 	#define HWRM_FW_SECURE_CFG_INPUT_GRC_CTRL_RO UINT32_C(0x0)
62526 	/* Read-Write */
62527 	#define HWRM_FW_SECURE_CFG_INPUT_GRC_CTRL_RW UINT32_C(0x1)
62528 	#define HWRM_FW_SECURE_CFG_INPUT_GRC_CTRL_LAST HWRM_FW_SECURE_CFG_INPUT_GRC_CTRL_RW
62529 	/* specify debug access control via UART */
62530 	uint8_t	uart_ctrl;
62531 	/* disable UART access for debugging */
62532 	#define HWRM_FW_SECURE_CFG_INPUT_UART_CTRL_DISABLE UINT32_C(0x0)
62533 	/* enable UART access for debugging */
62534 	#define HWRM_FW_SECURE_CFG_INPUT_UART_CTRL_ENABLE  UINT32_C(0x1)
62535 	#define HWRM_FW_SECURE_CFG_INPUT_UART_CTRL_LAST   HWRM_FW_SECURE_CFG_INPUT_UART_CTRL_ENABLE
62536 	uint8_t	unused_0[2];
62537 	uint64_t	unused_1;
62538 } hwrm_fw_secure_cfg_input_t, *phwrm_fw_secure_cfg_input_t;
62539 
62540 /* hwrm_fw_secure_cfg_output (size:128b/16B) */
62541 
62542 typedef struct hwrm_fw_secure_cfg_output {
62543 	/* The specific error status for the command. */
62544 	uint16_t	error_code;
62545 	/* The HWRM command request type. */
62546 	uint16_t	req_type;
62547 	/* The sequence ID from the original command. */
62548 	uint16_t	seq_id;
62549 	/* The length of the response data in number of bytes. */
62550 	uint16_t	resp_len;
62551 	uint8_t	unused_0[7];
62552 	/*
62553 	 * This field is used in Output records to indicate that the output
62554 	 * is completely written to RAM. This field should be read as '1'
62555 	 * to indicate that the output has been completely written.
62556 	 * When writing a command completion or response to an internal
62557 	 * processor, the order of writes has to be such that this field is
62558 	 * written last.
62559 	 */
62560 	uint8_t	valid;
62561 } hwrm_fw_secure_cfg_output_t, *phwrm_fw_secure_cfg_output_t;
62562 
62563 /**********************
62564  * hwrm_exec_fwd_resp *
62565  **********************/
62566 
62567 
62568 /* hwrm_exec_fwd_resp_input (size:1024b/128B) */
62569 
62570 typedef struct hwrm_exec_fwd_resp_input {
62571 	/* The HWRM command request type. */
62572 	uint16_t	req_type;
62573 	/*
62574 	 * The completion ring to send the completion event on. This should
62575 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62576 	 */
62577 	uint16_t	cmpl_ring;
62578 	/*
62579 	 * The sequence ID is used by the driver for tracking multiple
62580 	 * commands. This ID is treated as opaque data by the firmware and
62581 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62582 	 */
62583 	uint16_t	seq_id;
62584 	/*
62585 	 * The target ID of the command:
62586 	 * * 0x0-0xFFF8 - The function ID
62587 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62588 	 * * 0xFFFD - Reserved for user-space HWRM interface
62589 	 * * 0xFFFF - HWRM
62590 	 */
62591 	uint16_t	target_id;
62592 	/*
62593 	 * A physical address pointer pointing to a host buffer that the
62594 	 * command's response data will be written. This can be either a host
62595 	 * physical address (HPA) or a guest physical address (GPA) and must
62596 	 * point to a physically contiguous block of memory.
62597 	 */
62598 	uint64_t	resp_addr;
62599 	/*
62600 	 * This is an encapsulated request. This request should
62601 	 * be executed by the HWRM and the response should be
62602 	 * provided in the response buffer inside the encapsulated
62603 	 * request.
62604 	 */
62605 	uint32_t	encap_request[26];
62606 	/*
62607 	 * This value indicates the target id of the response to
62608 	 * the encapsulated request.
62609 	 * 0x0 - 0xFFF8 - Used for function ids
62610 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
62611 	 * 0xFFFF - HWRM
62612 	 */
62613 	uint16_t	encap_resp_target_id;
62614 	uint8_t	unused_0[6];
62615 } hwrm_exec_fwd_resp_input_t, *phwrm_exec_fwd_resp_input_t;
62616 
62617 /* hwrm_exec_fwd_resp_output (size:128b/16B) */
62618 
62619 typedef struct hwrm_exec_fwd_resp_output {
62620 	/* The specific error status for the command. */
62621 	uint16_t	error_code;
62622 	/* The HWRM command request type. */
62623 	uint16_t	req_type;
62624 	/* The sequence ID from the original command. */
62625 	uint16_t	seq_id;
62626 	/* The length of the response data in number of bytes. */
62627 	uint16_t	resp_len;
62628 	uint8_t	unused_0[7];
62629 	/*
62630 	 * This field is used in Output records to indicate that the output
62631 	 * is completely written to RAM. This field should be read as '1'
62632 	 * to indicate that the output has been completely written. When
62633 	 * writing a command completion or response to an internal processor,
62634 	 * the order of writes has to be such that this field is written last.
62635 	 */
62636 	uint8_t	valid;
62637 } hwrm_exec_fwd_resp_output_t, *phwrm_exec_fwd_resp_output_t;
62638 
62639 /************************
62640  * hwrm_reject_fwd_resp *
62641  ************************/
62642 
62643 
62644 /* hwrm_reject_fwd_resp_input (size:1024b/128B) */
62645 
62646 typedef struct hwrm_reject_fwd_resp_input {
62647 	/* The HWRM command request type. */
62648 	uint16_t	req_type;
62649 	/*
62650 	 * The completion ring to send the completion event on. This should
62651 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62652 	 */
62653 	uint16_t	cmpl_ring;
62654 	/*
62655 	 * The sequence ID is used by the driver for tracking multiple
62656 	 * commands. This ID is treated as opaque data by the firmware and
62657 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62658 	 */
62659 	uint16_t	seq_id;
62660 	/*
62661 	 * The target ID of the command:
62662 	 * * 0x0-0xFFF8 - The function ID
62663 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62664 	 * * 0xFFFD - Reserved for user-space HWRM interface
62665 	 * * 0xFFFF - HWRM
62666 	 */
62667 	uint16_t	target_id;
62668 	/*
62669 	 * A physical address pointer pointing to a host buffer that the
62670 	 * command's response data will be written. This can be either a host
62671 	 * physical address (HPA) or a guest physical address (GPA) and must
62672 	 * point to a physically contiguous block of memory.
62673 	 */
62674 	uint64_t	resp_addr;
62675 	/*
62676 	 * This is an encapsulated request. This request should
62677 	 * be rejected by the HWRM and the error response should be
62678 	 * provided in the response buffer inside the encapsulated
62679 	 * request.
62680 	 */
62681 	uint32_t	encap_request[26];
62682 	/*
62683 	 * This value indicates the target id of the response to
62684 	 * the encapsulated request.
62685 	 * 0x0 - 0xFFF8 - Used for function ids
62686 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
62687 	 * 0xFFFF - HWRM
62688 	 */
62689 	uint16_t	encap_resp_target_id;
62690 	uint8_t	unused_0[6];
62691 } hwrm_reject_fwd_resp_input_t, *phwrm_reject_fwd_resp_input_t;
62692 
62693 /* hwrm_reject_fwd_resp_output (size:128b/16B) */
62694 
62695 typedef struct hwrm_reject_fwd_resp_output {
62696 	/* The specific error status for the command. */
62697 	uint16_t	error_code;
62698 	/* The HWRM command request type. */
62699 	uint16_t	req_type;
62700 	/* The sequence ID from the original command. */
62701 	uint16_t	seq_id;
62702 	/* The length of the response data in number of bytes. */
62703 	uint16_t	resp_len;
62704 	uint8_t	unused_0[7];
62705 	/*
62706 	 * This field is used in Output records to indicate that the output
62707 	 * is completely written to RAM. This field should be read as '1'
62708 	 * to indicate that the output has been completely written. When
62709 	 * writing a command completion or response to an internal processor,
62710 	 * the order of writes has to be such that this field is written last.
62711 	 */
62712 	uint8_t	valid;
62713 } hwrm_reject_fwd_resp_output_t, *phwrm_reject_fwd_resp_output_t;
62714 
62715 /*****************
62716  * hwrm_fwd_resp *
62717  *****************/
62718 
62719 
62720 /* hwrm_fwd_resp_input (size:1024b/128B) */
62721 
62722 typedef struct hwrm_fwd_resp_input {
62723 	/* The HWRM command request type. */
62724 	uint16_t	req_type;
62725 	/*
62726 	 * The completion ring to send the completion event on. This should
62727 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62728 	 */
62729 	uint16_t	cmpl_ring;
62730 	/*
62731 	 * The sequence ID is used by the driver for tracking multiple
62732 	 * commands. This ID is treated as opaque data by the firmware and
62733 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62734 	 */
62735 	uint16_t	seq_id;
62736 	/*
62737 	 * The target ID of the command:
62738 	 * * 0x0-0xFFF8 - The function ID
62739 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62740 	 * * 0xFFFD - Reserved for user-space HWRM interface
62741 	 * * 0xFFFF - HWRM
62742 	 */
62743 	uint16_t	target_id;
62744 	/*
62745 	 * A physical address pointer pointing to a host buffer that the
62746 	 * command's response data will be written. This can be either a host
62747 	 * physical address (HPA) or a guest physical address (GPA) and must
62748 	 * point to a physically contiguous block of memory.
62749 	 */
62750 	uint64_t	resp_addr;
62751 	/*
62752 	 * This value indicates the target id of the encapsulated
62753 	 * response.
62754 	 * 0x0 - 0xFFF8 - Used for function ids
62755 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
62756 	 * 0xFFFF - HWRM
62757 	 */
62758 	uint16_t	encap_resp_target_id;
62759 	/*
62760 	 * This value indicates the completion ring the encapsulated
62761 	 * response will be optionally completed on. If the value is
62762 	 * -1, then no CR completion shall be generated for the
62763 	 * encapsulated response. Any other value must be a
62764 	 * valid CR ring_id value. If a valid encap_resp_cmpl_ring
62765 	 * is provided, then a CR completion shall be generated for
62766 	 * the encapsulated response.
62767 	 */
62768 	uint16_t	encap_resp_cmpl_ring;
62769 	/* This field indicates the length of encapsulated response. */
62770 	uint16_t	encap_resp_len;
62771 	uint8_t	unused_0;
62772 	uint8_t	unused_1;
62773 	/*
62774 	 * This is the host address where the encapsulated response
62775 	 * will be written.
62776 	 * This area must be 16B aligned and must be cleared to zero
62777 	 * before the original request is made.
62778 	 */
62779 	uint64_t	encap_resp_addr;
62780 	/* This is an encapsulated response. */
62781 	uint32_t	encap_resp[24];
62782 } hwrm_fwd_resp_input_t, *phwrm_fwd_resp_input_t;
62783 
62784 /* hwrm_fwd_resp_output (size:128b/16B) */
62785 
62786 typedef struct hwrm_fwd_resp_output {
62787 	/* The specific error status for the command. */
62788 	uint16_t	error_code;
62789 	/* The HWRM command request type. */
62790 	uint16_t	req_type;
62791 	/* The sequence ID from the original command. */
62792 	uint16_t	seq_id;
62793 	/* The length of the response data in number of bytes. */
62794 	uint16_t	resp_len;
62795 	uint8_t	unused_0[7];
62796 	/*
62797 	 * This field is used in Output records to indicate that the output
62798 	 * is completely written to RAM. This field should be read as '1'
62799 	 * to indicate that the output has been completely written. When
62800 	 * writing a command completion or response to an internal processor,
62801 	 * the order of writes has to be such that this field is written last.
62802 	 */
62803 	uint8_t	valid;
62804 } hwrm_fwd_resp_output_t, *phwrm_fwd_resp_output_t;
62805 
62806 /*****************************
62807  * hwrm_fwd_async_event_cmpl *
62808  *****************************/
62809 
62810 
62811 /* hwrm_fwd_async_event_cmpl_input (size:320b/40B) */
62812 
62813 typedef struct hwrm_fwd_async_event_cmpl_input {
62814 	/* The HWRM command request type. */
62815 	uint16_t	req_type;
62816 	/*
62817 	 * The completion ring to send the completion event on. This should
62818 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62819 	 */
62820 	uint16_t	cmpl_ring;
62821 	/*
62822 	 * The sequence ID is used by the driver for tracking multiple
62823 	 * commands. This ID is treated as opaque data by the firmware and
62824 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62825 	 */
62826 	uint16_t	seq_id;
62827 	/*
62828 	 * The target ID of the command:
62829 	 * * 0x0-0xFFF8 - The function ID
62830 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62831 	 * * 0xFFFD - Reserved for user-space HWRM interface
62832 	 * * 0xFFFF - HWRM
62833 	 */
62834 	uint16_t	target_id;
62835 	/*
62836 	 * A physical address pointer pointing to a host buffer that the
62837 	 * command's response data will be written. This can be either a host
62838 	 * physical address (HPA) or a guest physical address (GPA) and must
62839 	 * point to a physically contiguous block of memory.
62840 	 */
62841 	uint64_t	resp_addr;
62842 	/*
62843 	 * This value indicates the target id of the encapsulated
62844 	 * asynchronous event.
62845 	 * 0x0 - 0xFFF8 - Used for function ids
62846 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
62847 	 * 0xFFFF - Broadcast to all children VFs (only applicable when
62848 	 * a PF is the requester)
62849 	 */
62850 	uint16_t	encap_async_event_target_id;
62851 	uint8_t	unused_0[6];
62852 	/* This is an encapsulated asynchronous event completion. */
62853 	uint32_t	encap_async_event_cmpl[4];
62854 } hwrm_fwd_async_event_cmpl_input_t, *phwrm_fwd_async_event_cmpl_input_t;
62855 
62856 /* hwrm_fwd_async_event_cmpl_output (size:128b/16B) */
62857 
62858 typedef struct hwrm_fwd_async_event_cmpl_output {
62859 	/* The specific error status for the command. */
62860 	uint16_t	error_code;
62861 	/* The HWRM command request type. */
62862 	uint16_t	req_type;
62863 	/* The sequence ID from the original command. */
62864 	uint16_t	seq_id;
62865 	/* The length of the response data in number of bytes. */
62866 	uint16_t	resp_len;
62867 	uint8_t	unused_0[7];
62868 	/*
62869 	 * This field is used in Output records to indicate that the output
62870 	 * is completely written to RAM. This field should be read as '1'
62871 	 * to indicate that the output has been completely written. When
62872 	 * writing a command completion or response to an internal processor,
62873 	 * the order of writes has to be such that this field is written last.
62874 	 */
62875 	uint8_t	valid;
62876 } hwrm_fwd_async_event_cmpl_output_t, *phwrm_fwd_async_event_cmpl_output_t;
62877 
62878 /***************************
62879  * hwrm_temp_monitor_query *
62880  ***************************/
62881 
62882 
62883 /* hwrm_temp_monitor_query_input (size:128b/16B) */
62884 
62885 typedef struct hwrm_temp_monitor_query_input {
62886 	/* The HWRM command request type. */
62887 	uint16_t	req_type;
62888 	/*
62889 	 * The completion ring to send the completion event on. This should
62890 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62891 	 */
62892 	uint16_t	cmpl_ring;
62893 	/*
62894 	 * The sequence ID is used by the driver for tracking multiple
62895 	 * commands. This ID is treated as opaque data by the firmware and
62896 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62897 	 */
62898 	uint16_t	seq_id;
62899 	/*
62900 	 * The target ID of the command:
62901 	 * * 0x0-0xFFF8 - The function ID
62902 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62903 	 * * 0xFFFD - Reserved for user-space HWRM interface
62904 	 * * 0xFFFF - HWRM
62905 	 */
62906 	uint16_t	target_id;
62907 	/*
62908 	 * A physical address pointer pointing to a host buffer that the
62909 	 * command's response data will be written. This can be either a host
62910 	 * physical address (HPA) or a guest physical address (GPA) and must
62911 	 * point to a physically contiguous block of memory.
62912 	 */
62913 	uint64_t	resp_addr;
62914 } hwrm_temp_monitor_query_input_t, *phwrm_temp_monitor_query_input_t;
62915 
62916 /* hwrm_temp_monitor_query_output (size:192b/24B) */
62917 
62918 typedef struct hwrm_temp_monitor_query_output {
62919 	/* The specific error status for the command. */
62920 	uint16_t	error_code;
62921 	/* The HWRM command request type. */
62922 	uint16_t	req_type;
62923 	/* The sequence ID from the original command. */
62924 	uint16_t	seq_id;
62925 	/* The length of the response data in number of bytes. */
62926 	uint16_t	resp_len;
62927 	/*
62928 	 * The HWRM shall provide the current temperature of
62929 	 * the device in Celsius. This is the max of PCIe_temp
62930 	 * and PM_temp
62931 	 */
62932 	uint8_t	temp;
62933 	/*
62934 	 * The HWRM shall provide the current temperature of
62935 	 * the phy in Celsius.
62936 	 */
62937 	uint8_t	phy_temp;
62938 	/*
62939 	 * The HWRM shall provide the current temperature of
62940 	 * the module_index in Celsius.
62941 	 */
62942 	uint8_t	om_temp;
62943 	/* Describe individual temperature sensor condition. */
62944 	uint8_t	flags;
62945 	/*
62946 	 * "1" in this bit indicates temperature read not
62947 	 * successful.
62948 	 */
62949 	#define HWRM_TEMP_MONITOR_QUERY_OUTPUT_FLAGS_TEMP_NOT_AVAILABLE		UINT32_C(0x1)
62950 	/*
62951 	 * "1" in this bit indicates phy temperature read not
62952 	 * successful.
62953 	 */
62954 	#define HWRM_TEMP_MONITOR_QUERY_OUTPUT_FLAGS_PHY_TEMP_NOT_AVAILABLE	UINT32_C(0x2)
62955 	/* "1" in this bit indicates optical module(s) not present. */
62956 	#define HWRM_TEMP_MONITOR_QUERY_OUTPUT_FLAGS_OM_NOT_PRESENT		UINT32_C(0x4)
62957 	/*
62958 	 * "1" in this bit indicates om temperature read not
62959 	 * successful.
62960 	 */
62961 	#define HWRM_TEMP_MONITOR_QUERY_OUTPUT_FLAGS_OM_TEMP_NOT_AVAILABLE	UINT32_C(0x8)
62962 	/*
62963 	 * "1" in this bit indicates the extended temperature fields are
62964 	 * available.
62965 	 */
62966 	#define HWRM_TEMP_MONITOR_QUERY_OUTPUT_FLAGS_EXT_TEMP_FIELDS_AVAILABLE	UINT32_C(0x10)
62967 	/*
62968 	 * "1" in this bit indicates the thermal threshold values are
62969 	 * available.
62970 	 */
62971 	#define HWRM_TEMP_MONITOR_QUERY_OUTPUT_FLAGS_THRESHOLD_VALUES_AVAILABLE	UINT32_C(0x20)
62972 	/*
62973 	 * This field encodes the current device temperature in Celsius.
62974 	 * This field is unsigned and the value range of 0 to 255 is used to
62975 	 * indicate a temperature range from -64 to +191. The actual
62976 	 * temperature is derived by subtracting 64 from this field.
62977 	 * Example: A value of 0 represents a temperature of -64, a value of
62978 	 * 255 represents a temperature of 191.
62979 	 */
62980 	uint8_t	temp2;
62981 	/*
62982 	 * This field encodes the current phy temperature in Celsius. This
62983 	 * field is unsigned and the value range of 0 to 255 is used to
62984 	 * indicate a temperature range from -64 to +191. The actual
62985 	 * temperature is derived by subtracting 64 from this field.
62986 	 * Example: A value of 0 represents a temperature of -64, a value of
62987 	 * 255 represents a temperature of 191.
62988 	 */
62989 	uint8_t	phy_temp2;
62990 	/*
62991 	 * This field encodes the current module index temperature in Celsius.
62992 	 * This field is unsigned and the value range of 0 to 255 is used to
62993 	 * indicate a temperature range from -64 to +191. The actual
62994 	 * temperature is derived by subtracting 64 from this field.
62995 	 * Example: A value of 0 represents a temperature of -64, a value of
62996 	 * 255 represents a temperature of 191.
62997 	 */
62998 	uint8_t	om_temp2;
62999 	/*
63000 	 * This field reports the device's threshold value for reporting
63001 	 * a warning indication. The temperature is reported in Celsius.
63002 	 */
63003 	uint8_t	warn_threshold;
63004 	/*
63005 	 * This field reports the device's threshold value for reporting
63006 	 * a critical indication. The temperature is reported in Celsius.
63007 	 */
63008 	uint8_t	critical_threshold;
63009 	/*
63010 	 * This field reports the device's threshold value for reporting
63011 	 * a fatal indication. The temperature is reported in Celsius.
63012 	 */
63013 	uint8_t	fatal_threshold;
63014 	/*
63015 	 * This field reports the threshold value at which the device will
63016 	 * a perform a self shutdown. The temperature is reported in Celsius.
63017 	 * If the value is zero, then that indicates self shutdown is not
63018 	 * configured.
63019 	 */
63020 	uint8_t	shutdown_threshold;
63021 	uint8_t	unused_0[4];
63022 	/*
63023 	 * This field is used in Output records to indicate that the output
63024 	 * is completely written to RAM. This field should be read as '1'
63025 	 * to indicate that the output has been completely written. When
63026 	 * writing a command completion or response to an internal processor,
63027 	 * the order of writes has to be such that this field is written last.
63028 	 */
63029 	uint8_t	valid;
63030 } hwrm_temp_monitor_query_output_t, *phwrm_temp_monitor_query_output_t;
63031 
63032 /************************
63033  * hwrm_reg_power_query *
63034  ************************/
63035 
63036 
63037 /* hwrm_reg_power_query_input (size:128b/16B) */
63038 
63039 typedef struct hwrm_reg_power_query_input {
63040 	/* The HWRM command request type. */
63041 	uint16_t	req_type;
63042 	/*
63043 	 * The completion ring to send the completion event on. This should
63044 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63045 	 */
63046 	uint16_t	cmpl_ring;
63047 	/*
63048 	 * The sequence ID is used by the driver for tracking multiple
63049 	 * commands. This ID is treated as opaque data by the firmware and
63050 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63051 	 */
63052 	uint16_t	seq_id;
63053 	/*
63054 	 * The target ID of the command:
63055 	 * * 0x0-0xFFF8 - The function ID
63056 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63057 	 * * 0xFFFD - Reserved for user-space HWRM interface
63058 	 * * 0xFFFF - HWRM
63059 	 */
63060 	uint16_t	target_id;
63061 	/*
63062 	 * A physical address pointer pointing to a host buffer that the
63063 	 * command's response data will be written. This can be either a host
63064 	 * physical address (HPA) or a guest physical address (GPA) and must
63065 	 * point to a physically contiguous block of memory.
63066 	 */
63067 	uint64_t	resp_addr;
63068 } hwrm_reg_power_query_input_t, *phwrm_reg_power_query_input_t;
63069 
63070 /* hwrm_reg_power_query_output (size:192b/24B) */
63071 
63072 typedef struct hwrm_reg_power_query_output {
63073 	/* The specific error status for the command. */
63074 	uint16_t	error_code;
63075 	/* The HWRM command request type. */
63076 	uint16_t	req_type;
63077 	/* The sequence ID from the original command. */
63078 	uint16_t	seq_id;
63079 	/* The length of the response data in number of bytes. */
63080 	uint16_t	resp_len;
63081 	/* Describe availability of switching regulator power values. */
63082 	uint32_t	flags;
63083 	/* When this bit is set to '1', the input power is available. */
63084 	#define HWRM_REG_POWER_QUERY_OUTPUT_FLAGS_IN_POWER_AVAILABLE	UINT32_C(0x1)
63085 	/* When this bit is set to '1', the output power is available. */
63086 	#define HWRM_REG_POWER_QUERY_OUTPUT_FLAGS_OUT_POWER_AVAILABLE	UINT32_C(0x2)
63087 	/*
63088 	 * The HWRM shall provide the current switching regulator
63089 	 * input power in mW, if available.
63090 	 */
63091 	uint32_t	in_power_mw;
63092 	/*
63093 	 * The HWRM shall provide the current switching regulator
63094 	 * output power in mW, if available.
63095 	 */
63096 	uint32_t	out_power_mw;
63097 	uint8_t	unused_0[3];
63098 	/*
63099 	 * This field is used in Output records to indicate that the output
63100 	 * is completely written to RAM. This field should be read as '1'
63101 	 * to indicate that the output has been completely written. When
63102 	 * writing a command completion or response to an internal processor,
63103 	 * the order of writes has to be such that this field is written last.
63104 	 */
63105 	uint8_t	valid;
63106 } hwrm_reg_power_query_output_t, *phwrm_reg_power_query_output_t;
63107 
63108 /*****************************
63109  * hwrm_core_frequency_query *
63110  *****************************/
63111 
63112 
63113 /* hwrm_core_frequency_query_input (size:128b/16B) */
63114 
63115 typedef struct hwrm_core_frequency_query_input {
63116 	/* The HWRM command request type. */
63117 	uint16_t	req_type;
63118 	/*
63119 	 * The completion ring to send the completion event on. This should
63120 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63121 	 */
63122 	uint16_t	cmpl_ring;
63123 	/*
63124 	 * The sequence ID is used by the driver for tracking multiple
63125 	 * commands. This ID is treated as opaque data by the firmware and
63126 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63127 	 */
63128 	uint16_t	seq_id;
63129 	/*
63130 	 * The target ID of the command:
63131 	 * * 0x0-0xFFF8 - The function ID
63132 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63133 	 * * 0xFFFD - Reserved for user-space HWRM interface
63134 	 * * 0xFFFF - HWRM
63135 	 */
63136 	uint16_t	target_id;
63137 	/*
63138 	 * A physical address pointer pointing to a host buffer that the
63139 	 * command's response data will be written. This can be either a host
63140 	 * physical address (HPA) or a guest physical address (GPA) and must
63141 	 * point to a physically contiguous block of memory.
63142 	 */
63143 	uint64_t	resp_addr;
63144 } hwrm_core_frequency_query_input_t, *phwrm_core_frequency_query_input_t;
63145 
63146 /* hwrm_core_frequency_query_output (size:128b/16B) */
63147 
63148 typedef struct hwrm_core_frequency_query_output {
63149 	/* The specific error status for the command. */
63150 	uint16_t	error_code;
63151 	/* The HWRM command request type. */
63152 	uint16_t	req_type;
63153 	/* The sequence ID from the original command. */
63154 	uint16_t	seq_id;
63155 	/* The length of the response data in number of bytes. */
63156 	uint16_t	resp_len;
63157 	/* The HWRM shall provide the core frequency in Hz. */
63158 	uint32_t	core_frequency_hz;
63159 	uint8_t	unused_0[3];
63160 	/*
63161 	 * This field is used in Output records to indicate that the output
63162 	 * is completely written to RAM. This field should be read as '1'
63163 	 * to indicate that the output has been completely written. When
63164 	 * writing a command completion or response to an internal processor,
63165 	 * the order of writes has to be such that this field is written last.
63166 	 */
63167 	uint8_t	valid;
63168 } hwrm_core_frequency_query_output_t, *phwrm_core_frequency_query_output_t;
63169 
63170 /****************************
63171  * hwrm_reg_power_histogram *
63172  ****************************/
63173 
63174 
63175 /* hwrm_reg_power_histogram_input (size:192b/24B) */
63176 
63177 typedef struct hwrm_reg_power_histogram_input {
63178 	/* The HWRM command request type. */
63179 	uint16_t	req_type;
63180 	/*
63181 	 * The completion ring to send the completion event on. This should
63182 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63183 	 */
63184 	uint16_t	cmpl_ring;
63185 	/*
63186 	 * The sequence ID is used by the driver for tracking multiple
63187 	 * commands. This ID is treated as opaque data by the firmware and
63188 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63189 	 */
63190 	uint16_t	seq_id;
63191 	/*
63192 	 * The target ID of the command:
63193 	 * * 0x0-0xFFF8 - The function ID
63194 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63195 	 * * 0xFFFD - Reserved for user-space HWRM interface
63196 	 * * 0xFFFF - HWRM
63197 	 */
63198 	uint16_t	target_id;
63199 	/*
63200 	 * A physical address pointer pointing to a host buffer that the
63201 	 * command's response data will be written. This can be either a host
63202 	 * physical address (HPA) or a guest physical address (GPA) and must
63203 	 * point to a physically contiguous block of memory.
63204 	 */
63205 	uint64_t	resp_addr;
63206 	/* Describe operational mode of power histogram command. */
63207 	uint32_t	flags;
63208 	/*
63209 	 * When this bit is set to '1', histogram data for the respective
63210 	 * client (HWRM or BMC) is cleared after read.
63211 	 */
63212 	#define HWRM_REG_POWER_HISTOGRAM_INPUT_FLAGS_CLEAR_HISTOGRAM	UINT32_C(0x1)
63213 	uint32_t	unused_0;
63214 } hwrm_reg_power_histogram_input_t, *phwrm_reg_power_histogram_input_t;
63215 
63216 /* hwrm_reg_power_histogram_output (size:1088b/136B) */
63217 
63218 typedef struct hwrm_reg_power_histogram_output {
63219 	/* The specific error status for the command. */
63220 	uint16_t	error_code;
63221 	/* The HWRM command request type. */
63222 	uint16_t	req_type;
63223 	/* The sequence ID from the original command. */
63224 	uint16_t	seq_id;
63225 	/* The length of the response data in number of bytes. */
63226 	uint16_t	resp_len;
63227 	/* Describe output characteristics of power histogram command. */
63228 	uint16_t	flags;
63229 	/*
63230 	 * Indicates whether input or output power is used. Some switching
63231 	 * regulators provide both input and output voltage and current
63232 	 * measurements, and others provide only output measurements. When
63233 	 * both are available, input is used. This value is constant for a
63234 	 * given board.
63235 	 */
63236 	#define HWRM_REG_POWER_HISTOGRAM_OUTPUT_FLAGS_POWER_IN_OUT	UINT32_C(0x1)
63237 	/*
63238 	 * The switching regulator's input power is used
63239 	 * data.
63240 	 */
63241 		#define HWRM_REG_POWER_HISTOGRAM_OUTPUT_FLAGS_POWER_IN_OUT_INPUT   UINT32_C(0x0)
63242 	/*
63243 	 * The switching regulator's output power is used
63244 	 * data.
63245 	 */
63246 		#define HWRM_REG_POWER_HISTOGRAM_OUTPUT_FLAGS_POWER_IN_OUT_OUTPUT  UINT32_C(0x1)
63247 		#define HWRM_REG_POWER_HISTOGRAM_OUTPUT_FLAGS_POWER_IN_OUT_LAST   HWRM_REG_POWER_HISTOGRAM_OUTPUT_FLAGS_POWER_IN_OUT_OUTPUT
63248 	uint8_t	unused_0[2];
63249 	/*
63250 	 * Time in microseconds between samples. This value is constant in
63251 	 * firmware. The initial design sets this constant at 10000 us (10
63252 	 * ms). Power values for voltage regulators calculate a power value
63253 	 * over a 300 us period, so a 10 ms sampling period covers 3% of
63254 	 * time ranges. Future firmware designs may opt for different
63255 	 * sampling periods, so this value is provided on output.
63256 	 */
63257 	uint32_t	sampling_period;
63258 	/*
63259 	 * Total samples taken since last clear. If no counter has
63260 	 * saturated, the sum of counts in each bucket equates to this
63261 	 * sample_count value. If a single counter has saturated, its value
63262 	 * can be calculated by subtracting the remaining bucket values from
63263 	 * this sample_count value.
63264 	 */
63265 	uint64_t	sample_count;
63266 	/*
63267 	 * The power usage expressed in histogram buckets. Bucket value
63268 	 * ranges and array indices are defined per the enumeration
63269 	 * power_histogram_bucket_enum. Values saturate at the max 32-bit
63270 	 * value, 0xFFFFFFFF, and do not roll over. Clients should use the
63271 	 * clear bit on input to clear the histogram array periodically or
63272 	 * when saturation is observed.
63273 	 */
63274 	uint32_t	power_hist[26];
63275 	uint8_t	unused_1[7];
63276 	/*
63277 	 * This field is used in Output records to indicate that the output
63278 	 * is completely written to RAM. This field should be read as '1'
63279 	 * to indicate that the output has been completely written. When
63280 	 * writing a command completion or response to an internal processor,
63281 	 * the order of writes has to be such that this field is written last.
63282 	 */
63283 	uint8_t	valid;
63284 } hwrm_reg_power_histogram_output_t, *phwrm_reg_power_histogram_output_t;
63285 
63286 /*
63287  * Count of timer callback routines run with no data measured. This
63288  * may occur when data from the switching regulator is not available
63289  * to the firmware timer callback routine. One possible reason for
63290  * this is contention with other users of the i2c bus which is used
63291  * to communicate with the switching regulator, for example when a
63292  * call to hwrm_reg_power_query occurs while the timer routine is
63293  * running.
63294  */
63295 #define BUCKET_NO_DATA_FOR_SAMPLE UINT32_C(0x0)
63296 /* Count of samples measured at less than 8W */
63297 #define BUCKET_RANGE_8W_OR_LESS   UINT32_C(0x1)
63298 /* Count of samples measured >= 8 W and < 9 W */
63299 #define BUCKET_RANGE_8W_TO_9W	UINT32_C(0x2)
63300 /* Count of samples measured >= 9 W and < 10 W */
63301 #define BUCKET_RANGE_9W_TO_10W	UINT32_C(0x3)
63302 /* Count of samples measured >= 10 W and < 11 W */
63303 #define BUCKET_RANGE_10W_TO_11W   UINT32_C(0x4)
63304 /* Count of samples measured >= 11 W and < 12 W */
63305 #define BUCKET_RANGE_11W_TO_12W   UINT32_C(0x5)
63306 /* Count of samples measured >= 12 W and < 13 W */
63307 #define BUCKET_RANGE_12W_TO_13W   UINT32_C(0x6)
63308 /* Count of samples measured >= 13 W and < 14 W */
63309 #define BUCKET_RANGE_13W_TO_14W   UINT32_C(0x7)
63310 /* Count of samples measured >= 14 W and < 15 W */
63311 #define BUCKET_RANGE_14W_TO_15W   UINT32_C(0x8)
63312 /* Count of samples measured >= 15 W and < 16 W */
63313 #define BUCKET_RANGE_15W_TO_16W   UINT32_C(0x9)
63314 /* Count of samples measured >= 16 W and < 18 W */
63315 #define BUCKET_RANGE_16W_TO_18W   UINT32_C(0xa)
63316 /* Count of samples measured >= 18 W and < 20 W */
63317 #define BUCKET_RANGE_18W_TO_20W   UINT32_C(0xb)
63318 /* Count of samples measured >= 20 W and < 22 W */
63319 #define BUCKET_RANGE_20W_TO_22W   UINT32_C(0xc)
63320 /* Count of samples measured >= 22 W and < 24 W */
63321 #define BUCKET_RANGE_22W_TO_24W   UINT32_C(0xd)
63322 /* Count of samples measured >= 24 W and < 26 W */
63323 #define BUCKET_RANGE_24W_TO_26W   UINT32_C(0xe)
63324 /* Count of samples measured >= 26 W and < 28 W */
63325 #define BUCKET_RANGE_26W_TO_28W   UINT32_C(0xf)
63326 /* Count of samples measured >= 28 W and < 30 W */
63327 #define BUCKET_RANGE_28W_TO_30W   UINT32_C(0x10)
63328 /* Count of samples measured >= 30 W and < 32 W */
63329 #define BUCKET_RANGE_30W_TO_32W   UINT32_C(0x11)
63330 /* Count of samples measured >= 32 W and < 34 W */
63331 #define BUCKET_RANGE_32W_TO_34W   UINT32_C(0x12)
63332 /* Count of samples measured >= 34 W and < 36 W */
63333 #define BUCKET_RANGE_34W_TO_36W   UINT32_C(0x13)
63334 /* Count of samples measured >= 36 W and < 38 W */
63335 #define BUCKET_RANGE_36W_TO_38W   UINT32_C(0x14)
63336 /* Count of samples measured >= 38 W and < 40 W */
63337 #define BUCKET_RANGE_38W_TO_40W   UINT32_C(0x15)
63338 /* Count of samples measured >= 40 W and < 42 W */
63339 #define BUCKET_RANGE_40W_TO_42W   UINT32_C(0x16)
63340 /* Count of samples measured >= 42 W and < 44 W */
63341 #define BUCKET_RANGE_42W_TO_44W   UINT32_C(0x17)
63342 /* Count of samples measured >= 44 W and < 50 W */
63343 #define BUCKET_RANGE_44W_TO_50W   UINT32_C(0x18)
63344 /* Count of samples measured at 50 W or greater */
63345 #define BUCKET_RANGE_OVER_50W	UINT32_C(0x19)
63346 #define BUCKET_LAST		BUCKET_RANGE_OVER_50W
63347 
63348 
63349 /*************************
63350  * hwrm_wol_filter_alloc *
63351  *************************/
63352 
63353 
63354 /* hwrm_wol_filter_alloc_input (size:512b/64B) */
63355 
63356 typedef struct hwrm_wol_filter_alloc_input {
63357 	/* The HWRM command request type. */
63358 	uint16_t	req_type;
63359 	/*
63360 	 * The completion ring to send the completion event on. This should
63361 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63362 	 */
63363 	uint16_t	cmpl_ring;
63364 	/*
63365 	 * The sequence ID is used by the driver for tracking multiple
63366 	 * commands. This ID is treated as opaque data by the firmware and
63367 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63368 	 */
63369 	uint16_t	seq_id;
63370 	/*
63371 	 * The target ID of the command:
63372 	 * * 0x0-0xFFF8 - The function ID
63373 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63374 	 * * 0xFFFD - Reserved for user-space HWRM interface
63375 	 * * 0xFFFF - HWRM
63376 	 */
63377 	uint16_t	target_id;
63378 	/*
63379 	 * A physical address pointer pointing to a host buffer that the
63380 	 * command's response data will be written. This can be either a host
63381 	 * physical address (HPA) or a guest physical address (GPA) and must
63382 	 * point to a physically contiguous block of memory.
63383 	 */
63384 	uint64_t	resp_addr;
63385 	uint32_t	flags;
63386 	uint32_t	enables;
63387 	/*
63388 	 * This bit must be '1' for the mac_address field to be
63389 	 * configured.
63390 	 */
63391 	#define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_MAC_ADDRESS	UINT32_C(0x1)
63392 	/*
63393 	 * This bit must be '1' for the pattern_offset field to be
63394 	 * configured.
63395 	 */
63396 	#define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_OFFSET	UINT32_C(0x2)
63397 	/*
63398 	 * This bit must be '1' for the pattern_buf_size field to be
63399 	 * configured.
63400 	 */
63401 	#define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_BUF_SIZE	UINT32_C(0x4)
63402 	/*
63403 	 * This bit must be '1' for the pattern_buf_addr field to be
63404 	 * configured.
63405 	 */
63406 	#define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_BUF_ADDR	UINT32_C(0x8)
63407 	/*
63408 	 * This bit must be '1' for the pattern_mask_addr field to be
63409 	 * configured.
63410 	 */
63411 	#define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_MASK_ADDR	UINT32_C(0x10)
63412 	/*
63413 	 * This bit must be '1' for the pattern_mask_size field to be
63414 	 * configured.
63415 	 */
63416 	#define HWRM_WOL_FILTER_ALLOC_INPUT_ENABLES_PATTERN_MASK_SIZE	UINT32_C(0x20)
63417 	/* Port ID of port on which WoL filter is configured. */
63418 	uint16_t	port_id;
63419 	/* This value represents a Wake-on-LAN type. */
63420 	uint8_t	wol_type;
63421 	/* Magic Packet */
63422 	#define HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_MAGICPKT UINT32_C(0x0)
63423 	/* Bitmap */
63424 	#define HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_BMP	UINT32_C(0x1)
63425 	/* Invalid */
63426 	#define HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_INVALID  UINT32_C(0xff)
63427 	#define HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_LAST	HWRM_WOL_FILTER_ALLOC_INPUT_WOL_TYPE_INVALID
63428 	uint8_t	unused_0[5];
63429 	/*
63430 	 * # If this field is enabled and magic packet WoL filter
63431 	 * type is specified in this command, the value set in this
63432 	 * field shall be used in setting the magic packet based
63433 	 * WoL filter.
63434 	 * # If this field is not enabled and magic packet WoL
63435 	 * filter type is specified and port id is specified to
63436 	 * 0xFF in this command, then the HWRM
63437 	 * shall use default MAC address configured on the
63438 	 * function associated with the HWRM client.
63439 	 * # If this field is not enabled and magic packet WoL
63440 	 * filter type is specified and port id is not specified to
63441 	 * 0xFF in this command, then the HWRM
63442 	 * shall use default MAC address configured on the port.
63443 	 */
63444 	uint8_t	mac_address[6];
63445 	/*
63446 	 * The offset from the beginning of MAC header where
63447 	 * pattern should be matched.
63448 	 * Applies to bitmap WoL.
63449 	 */
63450 	uint16_t	pattern_offset;
63451 	/*
63452 	 * The size of the pattern that is being matched.
63453 	 * Applies to bitmap WoL.
63454 	 */
63455 	uint16_t	pattern_buf_size;
63456 	/*
63457 	 * The size of the pattern mask.
63458 	 * Applies to bitmap WoL.
63459 	 */
63460 	uint16_t	pattern_mask_size;
63461 	uint8_t	unused_1[4];
63462 	/*
63463 	 * Physical address of the pattern buffer.
63464 	 * Applies to bitmap WoL.
63465 	 */
63466 	uint64_t	pattern_buf_addr;
63467 	/*
63468 	 * Physical address of the pattern mask.
63469 	 * Applies to bitmap WoL.
63470 	 */
63471 	uint64_t	pattern_mask_addr;
63472 } hwrm_wol_filter_alloc_input_t, *phwrm_wol_filter_alloc_input_t;
63473 
63474 /* hwrm_wol_filter_alloc_output (size:128b/16B) */
63475 
63476 typedef struct hwrm_wol_filter_alloc_output {
63477 	/* The specific error status for the command. */
63478 	uint16_t	error_code;
63479 	/* The HWRM command request type. */
63480 	uint16_t	req_type;
63481 	/* The sequence ID from the original command. */
63482 	uint16_t	seq_id;
63483 	/* The length of the response data in number of bytes. */
63484 	uint16_t	resp_len;
63485 	/* This value identifies a Wake-on-LAN (WoL) filter. */
63486 	uint8_t	wol_filter_id;
63487 	uint8_t	unused_0[6];
63488 	/*
63489 	 * This field is used in Output records to indicate that the output
63490 	 * is completely written to RAM. This field should be read as '1'
63491 	 * to indicate that the output has been completely written. When
63492 	 * writing a command completion or response to an internal processor,
63493 	 * the order of writes has to be such that this field is written last.
63494 	 */
63495 	uint8_t	valid;
63496 } hwrm_wol_filter_alloc_output_t, *phwrm_wol_filter_alloc_output_t;
63497 
63498 /************************
63499  * hwrm_wol_filter_free *
63500  ************************/
63501 
63502 
63503 /* hwrm_wol_filter_free_input (size:256b/32B) */
63504 
63505 typedef struct hwrm_wol_filter_free_input {
63506 	/* The HWRM command request type. */
63507 	uint16_t	req_type;
63508 	/*
63509 	 * The completion ring to send the completion event on. This should
63510 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63511 	 */
63512 	uint16_t	cmpl_ring;
63513 	/*
63514 	 * The sequence ID is used by the driver for tracking multiple
63515 	 * commands. This ID is treated as opaque data by the firmware and
63516 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63517 	 */
63518 	uint16_t	seq_id;
63519 	/*
63520 	 * The target ID of the command:
63521 	 * * 0x0-0xFFF8 - The function ID
63522 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63523 	 * * 0xFFFD - Reserved for user-space HWRM interface
63524 	 * * 0xFFFF - HWRM
63525 	 */
63526 	uint16_t	target_id;
63527 	/*
63528 	 * A physical address pointer pointing to a host buffer that the
63529 	 * command's response data will be written. This can be either a host
63530 	 * physical address (HPA) or a guest physical address (GPA) and must
63531 	 * point to a physically contiguous block of memory.
63532 	 */
63533 	uint64_t	resp_addr;
63534 	uint32_t	flags;
63535 	/*
63536 	 * # When this bit is set to '1', then all active WoL
63537 	 * filters on the port are requested to be freed.
63538 	 * # If the a function driver sets this flag to '1', then
63539 	 * the HWRM shall free all active WoL filters that are not
63540 	 * set by other function drivers on that port.
63541 	 */
63542 	#define HWRM_WOL_FILTER_FREE_INPUT_FLAGS_FREE_ALL_WOL_FILTERS	UINT32_C(0x1)
63543 	uint32_t	enables;
63544 	/*
63545 	 * This bit must be '1' for the wol_filter_id field to be
63546 	 * configured.
63547 	 */
63548 	#define HWRM_WOL_FILTER_FREE_INPUT_ENABLES_WOL_FILTER_ID	UINT32_C(0x1)
63549 	/* Port ID of the port on which WoL filter(s) is (are) being freed. */
63550 	uint16_t	port_id;
63551 	/*
63552 	 * The HWRM shall ignore this field if free_all_wol_filters
63553 	 * flag is set.
63554 	 */
63555 	uint8_t	wol_filter_id;
63556 	uint8_t	unused_0[5];
63557 } hwrm_wol_filter_free_input_t, *phwrm_wol_filter_free_input_t;
63558 
63559 /* hwrm_wol_filter_free_output (size:128b/16B) */
63560 
63561 typedef struct hwrm_wol_filter_free_output {
63562 	/* The specific error status for the command. */
63563 	uint16_t	error_code;
63564 	/* The HWRM command request type. */
63565 	uint16_t	req_type;
63566 	/* The sequence ID from the original command. */
63567 	uint16_t	seq_id;
63568 	/* The length of the response data in number of bytes. */
63569 	uint16_t	resp_len;
63570 	uint8_t	unused_0[7];
63571 	/*
63572 	 * This field is used in Output records to indicate that the output
63573 	 * is completely written to RAM. This field should be read as '1'
63574 	 * to indicate that the output has been completely written. When
63575 	 * writing a command completion or response to an internal processor,
63576 	 * the order of writes has to be such that this field is written last.
63577 	 */
63578 	uint8_t	valid;
63579 } hwrm_wol_filter_free_output_t, *phwrm_wol_filter_free_output_t;
63580 
63581 /************************
63582  * hwrm_wol_filter_qcfg *
63583  ************************/
63584 
63585 
63586 /* hwrm_wol_filter_qcfg_input (size:448b/56B) */
63587 
63588 typedef struct hwrm_wol_filter_qcfg_input {
63589 	/* The HWRM command request type. */
63590 	uint16_t	req_type;
63591 	/*
63592 	 * The completion ring to send the completion event on. This should
63593 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63594 	 */
63595 	uint16_t	cmpl_ring;
63596 	/*
63597 	 * The sequence ID is used by the driver for tracking multiple
63598 	 * commands. This ID is treated as opaque data by the firmware and
63599 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63600 	 */
63601 	uint16_t	seq_id;
63602 	/*
63603 	 * The target ID of the command:
63604 	 * * 0x0-0xFFF8 - The function ID
63605 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63606 	 * * 0xFFFD - Reserved for user-space HWRM interface
63607 	 * * 0xFFFF - HWRM
63608 	 */
63609 	uint16_t	target_id;
63610 	/*
63611 	 * A physical address pointer pointing to a host buffer that the
63612 	 * command's response data will be written. This can be either a host
63613 	 * physical address (HPA) or a guest physical address (GPA) and must
63614 	 * point to a physically contiguous block of memory.
63615 	 */
63616 	uint64_t	resp_addr;
63617 	/* Port ID of port on which WoL filter that is being queried. */
63618 	uint16_t	port_id;
63619 	/*
63620 	 * This is an opaque handle used to access filters.
63621 	 * # The HWRM client shall set this field to 0x0000 to begin
63622 	 * the query.
63623 	 * # After the first query, the HWRM client shall retrieve
63624 	 * next filters (if they exist) using the HWRM provided handle
63625 	 * in the response.
63626 	 */
63627 	uint16_t	handle;
63628 	uint8_t	unused_0[4];
63629 	/*
63630 	 * Physical address of the pattern buffer.
63631 	 * Applies to bitmap WoL filter only.
63632 	 * # Value of 0 indicates an invalid buffer address.
63633 	 * If this field is set to 0, then HWRM shall ignore
63634 	 * pattern_buf_size.
63635 	 * # If the HWRM client provides an invalid buffer address
63636 	 * for the pattern, then the HWRM is not required to
63637 	 * provide pattern when the response contains a bitmap WoL
63638 	 * filter.
63639 	 */
63640 	uint64_t	pattern_buf_addr;
63641 	/*
63642 	 * The size of the pattern buffer.
63643 	 * Applies to bitmap WoL filter only.
63644 	 */
63645 	uint16_t	pattern_buf_size;
63646 	uint8_t	unused_1[6];
63647 	/*
63648 	 * Physical address of the pattern mask.
63649 	 * Applies to bitmap WoL filter only.
63650 	 * # Value of 0 indicates an invalid pattern mask address.
63651 	 * If this field is set to 0, then HWRM shall ignore
63652 	 * pattern_mask_size.
63653 	 * # If the HWRM client provides an invalid mask address
63654 	 * for the pattern, then the HWRM is not required to
63655 	 * provide mask when the response contains a bitmap WoL
63656 	 * filter.
63657 	 */
63658 	uint64_t	pattern_mask_addr;
63659 	/*
63660 	 * The size of the buffer for pattern mask.
63661 	 * Applies to bitmap WoL filter only.
63662 	 */
63663 	uint16_t	pattern_mask_size;
63664 	uint8_t	unused_2[6];
63665 } hwrm_wol_filter_qcfg_input_t, *phwrm_wol_filter_qcfg_input_t;
63666 
63667 /* hwrm_wol_filter_qcfg_output (size:256b/32B) */
63668 
63669 typedef struct hwrm_wol_filter_qcfg_output {
63670 	/* The specific error status for the command. */
63671 	uint16_t	error_code;
63672 	/* The HWRM command request type. */
63673 	uint16_t	req_type;
63674 	/* The sequence ID from the original command. */
63675 	uint16_t	seq_id;
63676 	/* The length of the response data in number of bytes. */
63677 	uint16_t	resp_len;
63678 	/*
63679 	 * This is the next handle that is used to access filters.
63680 	 * # If this field is set to 0x0000, then no WoL filters are
63681 	 * currently configured on this port and all other fields in
63682 	 * the output shall be ignored by the HWRM client.
63683 	 * # If this field is set to neither 0x0000 nor 0xFFFF, then the
63684 	 * wol_filter_id is valid and the parameters provided in the
63685 	 * response are based on the wol_type.
63686 	 * # If this field is set to 0xFFFF, then there are no remaining
63687 	 * configured WoL filters to be queried for the queried function
63688 	 * after this response, wol_filter_id is valid and the parameters
63689 	 * provided in the response are based on the wol_type.
63690 	 */
63691 	uint16_t	next_handle;
63692 	/*
63693 	 * This value identifies the filter returned in this
63694 	 * response.
63695 	 */
63696 	uint8_t	wol_filter_id;
63697 	/*
63698 	 * This value identifies the type of WoL filter returned
63699 	 * in this response.
63700 	 */
63701 	uint8_t	wol_type;
63702 	/* Magic Packet */
63703 	#define HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_MAGICPKT UINT32_C(0x0)
63704 	/* Bitmap */
63705 	#define HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_BMP	UINT32_C(0x1)
63706 	/* Invalid */
63707 	#define HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_INVALID  UINT32_C(0xff)
63708 	#define HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_LAST	HWRM_WOL_FILTER_QCFG_OUTPUT_WOL_TYPE_INVALID
63709 	uint32_t	unused_0;
63710 	/*
63711 	 * The MAC address value used by the WoL filter.
63712 	 * Applies to magic packet based WoL.
63713 	 */
63714 	uint8_t	mac_address[6];
63715 	/*
63716 	 * The offset from the beginning of MAC header where
63717 	 * pattern should be matched.
63718 	 * Applies to bitmap WoL.
63719 	 */
63720 	uint16_t	pattern_offset;
63721 	/*
63722 	 * The actual size of the pattern that is being returned.
63723 	 * Applies to bitmap WoL.
63724 	 */
63725 	uint16_t	pattern_size;
63726 	/*
63727 	 * The actual size of the pattern mask that is being returned.
63728 	 * Applies to bitmap WoL.
63729 	 */
63730 	uint16_t	pattern_mask_size;
63731 	uint8_t	unused_1[3];
63732 	/*
63733 	 * This field is used in Output records to indicate that the output
63734 	 * is completely written to RAM. This field should be read as '1'
63735 	 * to indicate that the output has been completely written. When
63736 	 * writing a command completion or response to an internal processor,
63737 	 * the order of writes has to be such that this field is written last.
63738 	 */
63739 	uint8_t	valid;
63740 } hwrm_wol_filter_qcfg_output_t, *phwrm_wol_filter_qcfg_output_t;
63741 
63742 /************************
63743  * hwrm_wol_reason_qcfg *
63744  ************************/
63745 
63746 
63747 /* hwrm_wol_reason_qcfg_input (size:320b/40B) */
63748 
63749 typedef struct hwrm_wol_reason_qcfg_input {
63750 	/* The HWRM command request type. */
63751 	uint16_t	req_type;
63752 	/*
63753 	 * The completion ring to send the completion event on. This should
63754 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63755 	 */
63756 	uint16_t	cmpl_ring;
63757 	/*
63758 	 * The sequence ID is used by the driver for tracking multiple
63759 	 * commands. This ID is treated as opaque data by the firmware and
63760 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63761 	 */
63762 	uint16_t	seq_id;
63763 	/*
63764 	 * The target ID of the command:
63765 	 * * 0x0-0xFFF8 - The function ID
63766 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63767 	 * * 0xFFFD - Reserved for user-space HWRM interface
63768 	 * * 0xFFFF - HWRM
63769 	 */
63770 	uint16_t	target_id;
63771 	/*
63772 	 * A physical address pointer pointing to a host buffer that the
63773 	 * command's response data will be written. This can be either a host
63774 	 * physical address (HPA) or a guest physical address (GPA) and must
63775 	 * point to a physically contiguous block of memory.
63776 	 */
63777 	uint64_t	resp_addr;
63778 	/* Port ID of port for which this query is for. */
63779 	uint16_t	port_id;
63780 	uint8_t	unused_0[6];
63781 	/*
63782 	 * Physical address of the packet buffer for querying
63783 	 * WoL packet.
63784 	 */
63785 	uint64_t	wol_pkt_buf_addr;
63786 	/* The size of the buffer for the WoL packet. */
63787 	uint16_t	wol_pkt_buf_size;
63788 	uint8_t	unused_1[6];
63789 } hwrm_wol_reason_qcfg_input_t, *phwrm_wol_reason_qcfg_input_t;
63790 
63791 /* hwrm_wol_reason_qcfg_output (size:128b/16B) */
63792 
63793 typedef struct hwrm_wol_reason_qcfg_output {
63794 	/* The specific error status for the command. */
63795 	uint16_t	error_code;
63796 	/* The HWRM command request type. */
63797 	uint16_t	req_type;
63798 	/* The sequence ID from the original command. */
63799 	uint16_t	seq_id;
63800 	/* The length of the response data in number of bytes. */
63801 	uint16_t	resp_len;
63802 	/*
63803 	 * This value identifies the filter that matched
63804 	 * the last WoL packet.
63805 	 * This id is only valid with valid WoL reason.
63806 	 */
63807 	uint8_t	wol_filter_id;
63808 	/*
63809 	 * This value identifies the type of WoL reason returned
63810 	 * in this response.
63811 	 * When the wol_type is set to invalid, then there is
63812 	 * no WoL event that happened during last system
63813 	 * wake-up.
63814 	 */
63815 	uint8_t	wol_reason;
63816 	/* Magic Packet */
63817 	#define HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_MAGICPKT UINT32_C(0x0)
63818 	/* Bitmap */
63819 	#define HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_BMP	UINT32_C(0x1)
63820 	/* Invalid */
63821 	#define HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_INVALID  UINT32_C(0xff)
63822 	#define HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_LAST	HWRM_WOL_REASON_QCFG_OUTPUT_WOL_REASON_INVALID
63823 	/* The value identifies the length of the WoL packet in bytes. */
63824 	uint8_t	wol_pkt_len;
63825 	uint8_t	unused_0[4];
63826 	/*
63827 	 * This field is used in Output records to indicate that the output
63828 	 * is completely written to RAM. This field should be read as '1'
63829 	 * to indicate that the output has been completely written. When
63830 	 * writing a command completion or response to an internal processor,
63831 	 * the order of writes has to be such that this field is written last.
63832 	 */
63833 	uint8_t	valid;
63834 } hwrm_wol_reason_qcfg_output_t, *phwrm_wol_reason_qcfg_output_t;
63835 
63836 /************************
63837  * hwrm_dbg_read_direct *
63838  ************************/
63839 
63840 
63841 /* hwrm_dbg_read_direct_input (size:256b/32B) */
63842 
63843 typedef struct hwrm_dbg_read_direct_input {
63844 	/* The HWRM command request type. */
63845 	uint16_t	req_type;
63846 	/*
63847 	 * The completion ring to send the completion event on. This should
63848 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63849 	 */
63850 	uint16_t	cmpl_ring;
63851 	/*
63852 	 * The sequence ID is used by the driver for tracking multiple
63853 	 * commands. This ID is treated as opaque data by the firmware and
63854 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63855 	 */
63856 	uint16_t	seq_id;
63857 	/*
63858 	 * The target ID of the command:
63859 	 * * 0x0-0xFFF8 - The function ID
63860 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63861 	 * * 0xFFFD - Reserved for user-space HWRM interface
63862 	 * * 0xFFFF - HWRM
63863 	 */
63864 	uint16_t	target_id;
63865 	/*
63866 	 * A physical address pointer pointing to a host buffer that the
63867 	 * command's response data will be written. This can be either a host
63868 	 * physical address (HPA) or a guest physical address (GPA) and must
63869 	 * point to a physically contiguous block of memory.
63870 	 */
63871 	uint64_t	resp_addr;
63872 	/*
63873 	 * host address where the data content will be written
63874 	 * when the request is complete. This area must be 16B aligned.
63875 	 */
63876 	uint64_t	host_dest_addr;
63877 	/* address(in ChiMP view) to start reading */
63878 	uint32_t	read_addr;
63879 	/* number of dwords to read */
63880 	uint32_t	read_len32;
63881 } hwrm_dbg_read_direct_input_t, *phwrm_dbg_read_direct_input_t;
63882 
63883 /* hwrm_dbg_read_direct_output (size:128b/16B) */
63884 
63885 typedef struct hwrm_dbg_read_direct_output {
63886 	/* The specific error status for the command. */
63887 	uint16_t	error_code;
63888 	/* The HWRM command request type. */
63889 	uint16_t	req_type;
63890 	/* The sequence ID from the original command. */
63891 	uint16_t	seq_id;
63892 	/* The length of the response data in number of bytes. */
63893 	uint16_t	resp_len;
63894 	/*
63895 	 * This field, if not zero, contains the IEEE 802.3 CRC-32 checksum of
63896 	 * the number of dwords read in this request using this polynomial:
63897 	 * x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1
63898 	 */
63899 	uint32_t	crc32;
63900 	uint8_t	unused_0[3];
63901 	/*
63902 	 * This field is used in Output records to indicate that the output
63903 	 * is completely written to RAM. This field should be read as '1'
63904 	 * to indicate that the output has been completely written. When
63905 	 * writing a command completion or response to an internal processor,
63906 	 * the order of writes has to be such that this field is written last.
63907 	 */
63908 	uint8_t	valid;
63909 } hwrm_dbg_read_direct_output_t, *phwrm_dbg_read_direct_output_t;
63910 
63911 /*************************
63912  * hwrm_dbg_write_direct *
63913  *************************/
63914 
63915 
63916 /* hwrm_dbg_write_direct_input (size:448b/56B) */
63917 
63918 typedef struct hwrm_dbg_write_direct_input {
63919 	/* The HWRM command request type. */
63920 	uint16_t	req_type;
63921 	/*
63922 	 * The completion ring to send the completion event on. This should
63923 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63924 	 */
63925 	uint16_t	cmpl_ring;
63926 	/*
63927 	 * The sequence ID is used by the driver for tracking multiple
63928 	 * commands. This ID is treated as opaque data by the firmware and
63929 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63930 	 */
63931 	uint16_t	seq_id;
63932 	/*
63933 	 * The target ID of the command:
63934 	 * * 0x0-0xFFF8 - The function ID
63935 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63936 	 * * 0xFFFD - Reserved for user-space HWRM interface
63937 	 * * 0xFFFF - HWRM
63938 	 */
63939 	uint16_t	target_id;
63940 	/*
63941 	 * A physical address pointer pointing to a host buffer that the
63942 	 * command's response data will be written. This can be either a host
63943 	 * physical address (HPA) or a guest physical address (GPA) and must
63944 	 * point to a physically contiguous block of memory.
63945 	 */
63946 	uint64_t	resp_addr;
63947 	/* address(in ChiMP view) to start writing */
63948 	uint32_t	write_addr;
63949 	/* number of dwords to write (up to 8 dwords) */
63950 	uint32_t	write_len32;
63951 	/* write data (up to 8 dwords) */
63952 	uint32_t	write_data[8];
63953 } hwrm_dbg_write_direct_input_t, *phwrm_dbg_write_direct_input_t;
63954 
63955 /* hwrm_dbg_write_direct_output (size:128b/16B) */
63956 
63957 typedef struct hwrm_dbg_write_direct_output {
63958 	/* The specific error status for the command. */
63959 	uint16_t	error_code;
63960 	/* The HWRM command request type. */
63961 	uint16_t	req_type;
63962 	/* The sequence ID from the original command. */
63963 	uint16_t	seq_id;
63964 	/* The length of the response data in number of bytes. */
63965 	uint16_t	resp_len;
63966 	uint8_t	unused_0[7];
63967 	/*
63968 	 * This field is used in Output records to indicate that the output
63969 	 * is completely written to RAM. This field should be read as '1'
63970 	 * to indicate that the output has been completely written. When
63971 	 * writing a command completion or response to an internal processor,
63972 	 * the order of writes has to be such that this field is written last.
63973 	 */
63974 	uint8_t	valid;
63975 } hwrm_dbg_write_direct_output_t, *phwrm_dbg_write_direct_output_t;
63976 
63977 /**************************
63978  * hwrm_dbg_read_indirect *
63979  **************************/
63980 
63981 
63982 /* hwrm_dbg_read_indirect_input (size:640b/80B) */
63983 
63984 typedef struct hwrm_dbg_read_indirect_input {
63985 	/* The HWRM command request type. */
63986 	uint16_t	req_type;
63987 	/*
63988 	 * The completion ring to send the completion event on. This should
63989 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63990 	 */
63991 	uint16_t	cmpl_ring;
63992 	/*
63993 	 * The sequence ID is used by the driver for tracking multiple
63994 	 * commands. This ID is treated as opaque data by the firmware and
63995 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63996 	 */
63997 	uint16_t	seq_id;
63998 	/*
63999 	 * The target ID of the command:
64000 	 * * 0x0-0xFFF8 - The function ID
64001 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64002 	 * * 0xFFFD - Reserved for user-space HWRM interface
64003 	 * * 0xFFFF - HWRM
64004 	 */
64005 	uint16_t	target_id;
64006 	/*
64007 	 * A physical address pointer pointing to a host buffer that the
64008 	 * command's response data will be written. This can be either a host
64009 	 * physical address (HPA) or a guest physical address (GPA) and must
64010 	 * point to a physically contiguous block of memory.
64011 	 */
64012 	uint64_t	resp_addr;
64013 	/*
64014 	 * host address where the data content will be written
64015 	 * when the request is complete. This area must be 16B aligned.
64016 	 */
64017 	uint64_t	host_dest_addr;
64018 	/* Length of host buffer used for transferring debug data. */
64019 	uint32_t	host_dest_addr_len;
64020 	/* Indirect access type to on-chip data structures. */
64021 	uint8_t	indirect_access_type;
64022 	/* L2 Mgmt filters in Transmit Engine (TE) */
64023 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_TE_MGMT_FILTERS_L2	UINT32_C(0x0)
64024 	/* L3/L4 Mgmt filters in Transmit Engine (TE) */
64025 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_TE_MGMT_FILTERS_L3L4	UINT32_C(0x1)
64026 	/* L2 Mgmt filters in Receive Engine (RE) */
64027 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_RE_MGMT_FILTERS_L2	UINT32_C(0x2)
64028 	/* L3/L4 Mgmt filters in Receive Engine (RE) */
64029 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_RE_MGMT_FILTERS_L3L4	UINT32_C(0x3)
64030 	/* Statistics contexts */
64031 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_STAT_CTXS		UINT32_C(0x4)
64032 	/* TX L2 TCAM */
64033 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_L2_TCAM		UINT32_C(0x5)
64034 	/* RX L2 TCAM */
64035 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_L2_TCAM		UINT32_C(0x6)
64036 	/* TX IPv6 subnet TCAM */
64037 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_IPV6_SUBNET_TCAM	UINT32_C(0x7)
64038 	/* RX IPv6 subnet TCAM */
64039 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_IPV6_SUBNET_TCAM	UINT32_C(0x8)
64040 	/* TX source properties TCAM */
64041 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_SRC_PROPERTIES_TCAM UINT32_C(0x9)
64042 	/* RX source properties TCAM */
64043 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_SRC_PROPERTIES_TCAM UINT32_C(0xa)
64044 	/* VEB Lookup TCAM */
64045 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_VEB_LOOKUP_TCAM	UINT32_C(0xb)
64046 	/* TX Profile Lookup TCAM */
64047 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_PROFILE_LOOKUP_TCAM UINT32_C(0xc)
64048 	/* RX Profile Lookup TCAM */
64049 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_PROFILE_LOOKUP_TCAM UINT32_C(0xd)
64050 	/* TX Lookup TCAM */
64051 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_LOOKUP_TCAM	UINT32_C(0xe)
64052 	/* RX Lookup TCAM */
64053 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_LOOKUP_TCAM	UINT32_C(0xf)
64054 	/* MHB registers (valid for multi-host environment) */
64055 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_MHB			UINT32_C(0x10)
64056 	/* PCIE global registers (valid for multi-host environment) */
64057 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_PCIE_GBL		UINT32_C(0x11)
64058 	/* SOC registers (valid for multi-host environment) */
64059 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_MULTI_HOST_SOC		UINT32_C(0x12)
64060 	/* PCIE private registers */
64061 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_PCIE_PRIVATE		UINT32_C(0x13)
64062 	/* Host DMA read */
64063 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_HOST_DMA		UINT32_C(0x14)
64064 	/*
64065 	 * Elog (valid for only smartNIC only)
64066 	 * Three sub-types will be supported which will be specified
64067 	 * in the opaque[0] field.
64068 	 * 1) sub-type CHECK(0) if ELOG is available in media.
64069 	 * 2) sub-type READ(1) a portion of the elog.
64070 	 * 3) sub-type ERASE(2) a portion of the elog.
64071 	 *	> opaque[1] Erase offset.
64072 	 *	> opaque[2] Erase size.
64073 	 */
64074 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_SOC_ELOG		UINT32_C(0x15)
64075 	/* Context operation */
64076 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CTX			UINT32_C(0x16)
64077 	/* Port Stats */
64078 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_STATS			UINT32_C(0x17)
64079 	#define HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_LAST			HWRM_DBG_READ_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_STATS
64080 	uint8_t	unused_0[3];
64081 	/* Entry number to start reading */
64082 	uint32_t	start_index;
64083 	/* Total number of entries to read */
64084 	uint32_t	num_of_entries;
64085 	/*
64086 	 * command dependent data (e.g. function id for host dma command or
64087 	 * sub-code, erase offset and erase size for soc_elog)
64088 	 */
64089 	uint32_t	opaque[10];
64090 } hwrm_dbg_read_indirect_input_t, *phwrm_dbg_read_indirect_input_t;
64091 
64092 /* hwrm_dbg_read_indirect_output (size:128b/16B) */
64093 
64094 typedef struct hwrm_dbg_read_indirect_output {
64095 	/* The specific error status for the command. */
64096 	uint16_t	error_code;
64097 	/* The HWRM command request type. */
64098 	uint16_t	req_type;
64099 	/* The sequence ID from the original command. */
64100 	uint16_t	seq_id;
64101 	/* The length of the response data in number of bytes. */
64102 	uint16_t	resp_len;
64103 	uint8_t	unused_0[7];
64104 	/*
64105 	 * This field is used in Output records to indicate that the output
64106 	 * is completely written to RAM. This field should be read as '1'
64107 	 * to indicate that the output has been completely written. When
64108 	 * writing a command completion or response to an internal processor,
64109 	 * the order of writes has to be such that this field is written last.
64110 	 */
64111 	uint8_t	valid;
64112 } hwrm_dbg_read_indirect_output_t, *phwrm_dbg_read_indirect_output_t;
64113 
64114 /***************************
64115  * hwrm_dbg_write_indirect *
64116  ***************************/
64117 
64118 
64119 /* hwrm_dbg_write_indirect_input (size:832b/104B) */
64120 
64121 typedef struct hwrm_dbg_write_indirect_input {
64122 	/* The HWRM command request type. */
64123 	uint16_t	req_type;
64124 	/*
64125 	 * The completion ring to send the completion event on. This should
64126 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64127 	 */
64128 	uint16_t	cmpl_ring;
64129 	/*
64130 	 * The sequence ID is used by the driver for tracking multiple
64131 	 * commands. This ID is treated as opaque data by the firmware and
64132 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64133 	 */
64134 	uint16_t	seq_id;
64135 	/*
64136 	 * The target ID of the command:
64137 	 * * 0x0-0xFFF8 - The function ID
64138 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64139 	 * * 0xFFFD - Reserved for user-space HWRM interface
64140 	 * * 0xFFFF - HWRM
64141 	 */
64142 	uint16_t	target_id;
64143 	/*
64144 	 * A physical address pointer pointing to a host buffer that the
64145 	 * command's response data will be written. This can be either a host
64146 	 * physical address (HPA) or a guest physical address (GPA) and must
64147 	 * point to a physically contiguous block of memory.
64148 	 */
64149 	uint64_t	resp_addr;
64150 	/* Indirect access type to on-chip data structures. */
64151 	uint8_t	indirect_access_type;
64152 	/* L2 Mgmt filters in Transmit Engine (TE) */
64153 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_TE_MGMT_FILTERS_L2	UINT32_C(0x0)
64154 	/* L3/L4 Mgmt filters in Transmit Engine (TE) */
64155 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_TE_MGMT_FILTERS_L3L4	UINT32_C(0x1)
64156 	/* L2 Mgmt filters in Receive Engine (RE) */
64157 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_RE_MGMT_FILTERS_L2	UINT32_C(0x2)
64158 	/* L3/L4 Mgmt filters in Receive Engine (RE) */
64159 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_RE_MGMT_FILTERS_L3L4	UINT32_C(0x3)
64160 	/* Statistics contexts */
64161 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_STAT_CTXS		UINT32_C(0x4)
64162 	/* TX L2 TCAM */
64163 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_L2_TCAM		UINT32_C(0x5)
64164 	/* RX L2 TCAM */
64165 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_L2_TCAM		UINT32_C(0x6)
64166 	/* TX IPv6 subnet TCAM */
64167 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_IPV6_SUBNET_TCAM	UINT32_C(0x7)
64168 	/* RX IPv6 subnet TCAM */
64169 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_IPV6_SUBNET_TCAM	UINT32_C(0x8)
64170 	/* TX source properties TCAM */
64171 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_SRC_PROPERTIES_TCAM UINT32_C(0x9)
64172 	/* RX source properties TCAM */
64173 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_SRC_PROPERTIES_TCAM UINT32_C(0xa)
64174 	/* VEB Lookup TCAM */
64175 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_VEB_LOOKUP_TCAM	UINT32_C(0xb)
64176 	/* TX Profile Lookup TCAM */
64177 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_PROFILE_LOOKUP_TCAM UINT32_C(0xc)
64178 	/* RX Profile Lookup TCAM */
64179 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_PROFILE_LOOKUP_TCAM UINT32_C(0xd)
64180 	/* TX Lookup TCAM */
64181 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_TX_LOOKUP_TCAM	UINT32_C(0xe)
64182 	/* RX Lookup TCAM */
64183 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CFA_RX_LOOKUP_TCAM	UINT32_C(0xf)
64184 	/* MHB registers (valid for multi-host environment) */
64185 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_MHB			UINT32_C(0x10)
64186 	/* PCIE global registers (valid for multi-host environment) */
64187 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_PCIE_GBL		UINT32_C(0x11)
64188 	/* SOC registers (valid for multi-host environment) */
64189 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_MULTI_HOST_SOC		UINT32_C(0x12)
64190 	/* PCIE private registers */
64191 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_PCIE_PRIVATE		UINT32_C(0x13)
64192 	/* Host DMA write */
64193 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_HOST_DMA		UINT32_C(0x14)
64194 	/* Invalid */
64195 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_SOC_ELOG		UINT32_C(0x15)
64196 	/* Context operation */
64197 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_CTX			UINT32_C(0x16)
64198 	/* Port Stats */
64199 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_STATS			UINT32_C(0x17)
64200 	#define HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_LAST			HWRM_DBG_WRITE_INDIRECT_INPUT_INDIRECT_ACCESS_TYPE_STATS
64201 	uint8_t	unused_0[3];
64202 	/* Entry number to start reading */
64203 	uint32_t	start_index;
64204 	/* Total number of entries to read */
64205 	uint32_t	num_of_entries;
64206 	uint8_t	unused_1[4];
64207 	/* write data (up to 8 dwords) */
64208 	uint32_t	write_data[8];
64209 	/* command dependent data (e.g. function id for host dma command) */
64210 	uint32_t	opaque[10];
64211 } hwrm_dbg_write_indirect_input_t, *phwrm_dbg_write_indirect_input_t;
64212 
64213 /* hwrm_dbg_write_indirect_output (size:128b/16B) */
64214 
64215 typedef struct hwrm_dbg_write_indirect_output {
64216 	/* The specific error status for the command. */
64217 	uint16_t	error_code;
64218 	/* The HWRM command request type. */
64219 	uint16_t	req_type;
64220 	/* The sequence ID from the original command. */
64221 	uint16_t	seq_id;
64222 	/* The length of the response data in number of bytes. */
64223 	uint16_t	resp_len;
64224 	uint8_t	unused_0[7];
64225 	/*
64226 	 * This field is used in Output records to indicate that the output
64227 	 * is completely written to RAM. This field should be read as '1'
64228 	 * to indicate that the output has been completely written. When
64229 	 * writing a command completion or response to an internal processor,
64230 	 * the order of writes has to be such that this field is written last.
64231 	 */
64232 	uint8_t	valid;
64233 } hwrm_dbg_write_indirect_output_t, *phwrm_dbg_write_indirect_output_t;
64234 
64235 /*****************
64236  * hwrm_dbg_dump *
64237  *****************/
64238 
64239 
64240 /* hwrm_dbg_dump_input (size:320b/40B) */
64241 
64242 typedef struct hwrm_dbg_dump_input {
64243 	/* The HWRM command request type. */
64244 	uint16_t	req_type;
64245 	/*
64246 	 * The completion ring to send the completion event on. This should
64247 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64248 	 */
64249 	uint16_t	cmpl_ring;
64250 	/*
64251 	 * The sequence ID is used by the driver for tracking multiple
64252 	 * commands. This ID is treated as opaque data by the firmware and
64253 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64254 	 */
64255 	uint16_t	seq_id;
64256 	/*
64257 	 * The target ID of the command:
64258 	 * * 0x0-0xFFF8 - The function ID
64259 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64260 	 * * 0xFFFD - Reserved for user-space HWRM interface
64261 	 * * 0xFFFF - HWRM
64262 	 */
64263 	uint16_t	target_id;
64264 	/*
64265 	 * A physical address pointer pointing to a host buffer that the
64266 	 * command's response data will be written. This can be either a host
64267 	 * physical address (HPA) or a guest physical address (GPA) and must
64268 	 * point to a physically contiguous block of memory.
64269 	 */
64270 	uint64_t	resp_addr;
64271 	/*
64272 	 * Handle used to dump debug data.
64273 	 * handle = 0 indicates the beginning of the dump.
64274 	 * handle != 0 indicates the request to dump the next part.
64275 	 */
64276 	uint32_t	handle;
64277 	uint8_t	unused_0[4];
64278 	/*
64279 	 * Address of the host buffer where the debug data is
64280 	 * requested to be dumped.
64281 	 */
64282 	uint64_t	host_dbg_dump_addr;
64283 	/* Length of host buffer used for transferring debug data. */
64284 	uint64_t	host_dbg_dump_addr_len;
64285 } hwrm_dbg_dump_input_t, *phwrm_dbg_dump_input_t;
64286 
64287 /* hwrm_dbg_dump_output (size:192b/24B) */
64288 
64289 typedef struct hwrm_dbg_dump_output {
64290 	/* The specific error status for the command. */
64291 	uint16_t	error_code;
64292 	/* The HWRM command request type. */
64293 	uint16_t	req_type;
64294 	/* The sequence ID from the original command. */
64295 	uint16_t	seq_id;
64296 	/* The length of the response data in number of bytes. */
64297 	uint16_t	resp_len;
64298 	/*
64299 	 * Handle used to indicate availability of additional
64300 	 * debug data.
64301 	 * nexthandle = 0 indicates that there is no more debug data
64302 	 * available.
64303 	 * nexthandle != 0 indicates the handle value that should be used
64304 	 * to request the next part of debug data.
64305 	 */
64306 	uint32_t	nexthandle;
64307 	/*
64308 	 * The number of bytes of debug data written to debug dump
64309 	 * buffer.
64310 	 */
64311 	uint32_t	dbg_data_len;
64312 	uint8_t	unused_0[7];
64313 	/*
64314 	 * This field is used in Output records to indicate that the output
64315 	 * is completely written to RAM. This field should be read as '1'
64316 	 * to indicate that the output has been completely written. When
64317 	 * writing a command completion or response to an internal processor,
64318 	 * the order of writes has to be such that this field is written last.
64319 	 */
64320 	uint8_t	valid;
64321 } hwrm_dbg_dump_output_t, *phwrm_dbg_dump_output_t;
64322 
64323 /**********************
64324  * hwrm_dbg_erase_nvm *
64325  **********************/
64326 
64327 
64328 /* hwrm_dbg_erase_nvm_input (size:192b/24B) */
64329 
64330 typedef struct hwrm_dbg_erase_nvm_input {
64331 	/* The HWRM command request type. */
64332 	uint16_t	req_type;
64333 	/*
64334 	 * The completion ring to send the completion event on. This should
64335 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64336 	 */
64337 	uint16_t	cmpl_ring;
64338 	/*
64339 	 * The sequence ID is used by the driver for tracking multiple
64340 	 * commands. This ID is treated as opaque data by the firmware and
64341 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64342 	 */
64343 	uint16_t	seq_id;
64344 	/*
64345 	 * The target ID of the command:
64346 	 * * 0x0-0xFFF8 - The function ID
64347 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64348 	 * * 0xFFFD - Reserved for user-space HWRM interface
64349 	 * * 0xFFFF - HWRM
64350 	 */
64351 	uint16_t	target_id;
64352 	/*
64353 	 * A physical address pointer pointing to a host buffer that the
64354 	 * command's response data will be written. This can be either a host
64355 	 * physical address (HPA) or a guest physical address (GPA) and must
64356 	 * point to a physically contiguous block of memory.
64357 	 */
64358 	uint64_t	resp_addr;
64359 	uint16_t	flags;
64360 	/* If set to 1, then erase all locations in persistent storage. */
64361 	#define HWRM_DBG_ERASE_NVM_INPUT_FLAGS_ERASE_ALL	UINT32_C(0x1)
64362 	uint8_t	unused_0[6];
64363 } hwrm_dbg_erase_nvm_input_t, *phwrm_dbg_erase_nvm_input_t;
64364 
64365 /* hwrm_dbg_erase_nvm_output (size:128b/16B) */
64366 
64367 typedef struct hwrm_dbg_erase_nvm_output {
64368 	/* The specific error status for the command. */
64369 	uint16_t	error_code;
64370 	/* The HWRM command request type. */
64371 	uint16_t	req_type;
64372 	/* The sequence ID from the original command. */
64373 	uint16_t	seq_id;
64374 	/* The length of the response data in number of bytes. */
64375 	uint16_t	resp_len;
64376 	uint8_t	unused_0[7];
64377 	/*
64378 	 * This field is used in Output records to indicate that the output
64379 	 * is completely written to RAM. This field should be read as '1'
64380 	 * to indicate that the output has been completely written. When
64381 	 * writing a command completion or response to an internal processor,
64382 	 * the order of writes has to be such that this field is written last.
64383 	 */
64384 	uint8_t	valid;
64385 } hwrm_dbg_erase_nvm_output_t, *phwrm_dbg_erase_nvm_output_t;
64386 
64387 /****************
64388  * hwrm_dbg_cfg *
64389  ****************/
64390 
64391 
64392 /* hwrm_dbg_cfg_input (size:192b/24B) */
64393 
64394 typedef struct hwrm_dbg_cfg_input {
64395 	/* The HWRM command request type. */
64396 	uint16_t	req_type;
64397 	/*
64398 	 * The completion ring to send the completion event on. This should
64399 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64400 	 */
64401 	uint16_t	cmpl_ring;
64402 	/*
64403 	 * The sequence ID is used by the driver for tracking multiple
64404 	 * commands. This ID is treated as opaque data by the firmware and
64405 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64406 	 */
64407 	uint16_t	seq_id;
64408 	/*
64409 	 * The target ID of the command:
64410 	 * * 0x0-0xFFF8 - The function ID
64411 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64412 	 * * 0xFFFD - Reserved for user-space HWRM interface
64413 	 * * 0xFFFF - HWRM
64414 	 */
64415 	uint16_t	target_id;
64416 	/*
64417 	 * A physical address pointer pointing to a host buffer that the
64418 	 * command's response data will be written. This can be either a host
64419 	 * physical address (HPA) or a guest physical address (GPA) and must
64420 	 * point to a physically contiguous block of memory.
64421 	 */
64422 	uint64_t	resp_addr;
64423 	uint32_t	flags;
64424 	/*
64425 	 * If set to 1, then UART logging will be enabled for the primary
64426 	 * firmware. Disabled otherwise.
64427 	 */
64428 	#define HWRM_DBG_CFG_INPUT_FLAGS_UART_LOG		UINT32_C(0x1)
64429 	/*
64430 	 * If set to 1, then UART logging will be enabled for the secondary
64431 	 * firmware. Disabled otherwise. If a single UART is available then
64432 	 * setting this bit will override the uart_log bit.
64433 	 */
64434 	#define HWRM_DBG_CFG_INPUT_FLAGS_UART_LOG_SECONDARY	UINT32_C(0x2)
64435 	/*
64436 	 * If set to 1, then completion ring logging will be enabled for the
64437 	 * primary firmware. Disabled otherwise.
64438 	 */
64439 	#define HWRM_DBG_CFG_INPUT_FLAGS_FW_TRACE		UINT32_C(0x4)
64440 	/*
64441 	 * If set to 1, then completion ring logging will be enabled for the
64442 	 * secondary firmware. Disabled otherwise.
64443 	 */
64444 	#define HWRM_DBG_CFG_INPUT_FLAGS_FW_TRACE_SECONDARY	UINT32_C(0x8)
64445 	/*
64446 	 * If set to 1, firmware will generate debug_notification async
64447 	 * events to the driver as applicable.
64448 	 */
64449 	#define HWRM_DBG_CFG_INPUT_FLAGS_DEBUG_NOTIFY	UINT32_C(0x10)
64450 	/*
64451 	 * If set to 1, firmware is allowed to be unresponsive to heartbeat
64452 	 * health checks, allowing for JTAG debugging scenarios where the
64453 	 * debugger has the firmware processes stopped indefinitely. This
64454 	 * flag has effect only on debug builds of firmware.
64455 	 */
64456 	#define HWRM_DBG_CFG_INPUT_FLAGS_JTAG_DEBUG		UINT32_C(0x20)
64457 	/*
64458 	 * Notification queue (completion ring) used by the firmware to post
64459 	 * async debug notifications and fw trace logs. This field is valid
64460 	 * when fw_trace, fw_trace_secondary or debug_notify flags are set.
64461 	 */
64462 	uint16_t	async_cmpl_ring;
64463 	uint8_t	unused_0[2];
64464 } hwrm_dbg_cfg_input_t, *phwrm_dbg_cfg_input_t;
64465 
64466 /* hwrm_dbg_cfg_output (size:128b/16B) */
64467 
64468 typedef struct hwrm_dbg_cfg_output {
64469 	/* The specific error status for the command. */
64470 	uint16_t	error_code;
64471 	/* The HWRM command request type. */
64472 	uint16_t	req_type;
64473 	/* The sequence ID from the original command. */
64474 	uint16_t	seq_id;
64475 	/* The length of the response data in number of bytes. */
64476 	uint16_t	resp_len;
64477 	uint8_t	unused_0[7];
64478 	/*
64479 	 * This field is used in Output records to indicate that the output
64480 	 * is completely written to RAM. This field should be read as '1'
64481 	 * to indicate that the output has been completely written. When
64482 	 * writing a command completion or response to an internal processor,
64483 	 * the order of writes has to be such that this field is written last.
64484 	 */
64485 	uint8_t	valid;
64486 } hwrm_dbg_cfg_output_t, *phwrm_dbg_cfg_output_t;
64487 
64488 /*****************************
64489  * hwrm_dbg_crashdump_header *
64490  *****************************/
64491 
64492 
64493 /* hwrm_dbg_crashdump_header_input (size:192b/24B) */
64494 
64495 typedef struct hwrm_dbg_crashdump_header_input {
64496 	/* The HWRM command request type. */
64497 	uint16_t	req_type;
64498 	/*
64499 	 * The completion ring to send the completion event on. This should
64500 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64501 	 */
64502 	uint16_t	cmpl_ring;
64503 	/*
64504 	 * The sequence ID is used by the driver for tracking multiple
64505 	 * commands. This ID is treated as opaque data by the firmware and
64506 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64507 	 */
64508 	uint16_t	seq_id;
64509 	/*
64510 	 * The target ID of the command:
64511 	 * * 0x0-0xFFF8 - The function ID
64512 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64513 	 * * 0xFFFD - Reserved for user-space HWRM interface
64514 	 * * 0xFFFF - HWRM
64515 	 */
64516 	uint16_t	target_id;
64517 	/*
64518 	 * A physical address pointer pointing to a host buffer that the
64519 	 * command's response data will be written. This can be either a host
64520 	 * physical address (HPA) or a guest physical address (GPA) and must
64521 	 * point to a physically contiguous block of memory.
64522 	 */
64523 	uint64_t	resp_addr;
64524 	uint64_t	unused_0;
64525 } hwrm_dbg_crashdump_header_input_t, *phwrm_dbg_crashdump_header_input_t;
64526 
64527 /* hwrm_dbg_crashdump_header_output (size:512b/64B) */
64528 
64529 typedef struct hwrm_dbg_crashdump_header_output {
64530 	/* The specific error status for the command. */
64531 	uint16_t	error_code;
64532 	/* The HWRM command request type. */
64533 	uint16_t	req_type;
64534 	/* The sequence ID from the original command. */
64535 	uint16_t	seq_id;
64536 	/* The length of the response data in number of bytes. */
64537 	uint16_t	resp_len;
64538 	/* Major version. */
64539 	uint8_t	version_hi;
64540 	/* Minor version. */
64541 	uint8_t	version_low;
64542 	/*
64543 	 * Header length in bytes. This includes all fields from version
64544 	 * to dev_uid (whose length is specified in dev_uid_length).
64545 	 */
64546 	uint16_t	header_len;
64547 	/* This is the crash dump size in bytes. */
64548 	uint32_t	dump_size;
64549 	/*
64550 	 * This is a "wall clock" timestamp value of when the crash occurred.
64551 	 * Format is of time_t type.
64552 	 */
64553 	uint32_t	crash_time;
64554 	/* This is the timezone information for the crash_time. */
64555 	int8_t	utc_offset;
64556 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_UTC				0
64557 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMSTERDAM			4
64558 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_EGYPT			8
64559 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_EUROPE_MOSCOW		12
64560 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_IRAN			14
64561 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_DUBAI			16
64562 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_KABUL			18
64563 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ANTARCTICA_MAWSON		20
64564 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_COLOMBO		22
64565 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_KATHMANDU		23
64566 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_INDIAN_CHAGOS		24
64567 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_INDIAN_COCOS		26
64568 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_BANGKOK		28
64569 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_HONG_KONG		32
64570 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_PYONGYANG		34
64571 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_EUCLA		35
64572 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_TOKYO			36
64573 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_ADELAIDE		38
64574 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_BROKEN_HILL	38
64575 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_DARWIN		38
64576 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_SYDNEY		40
64577 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_LORD_HOWE		42
64578 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ANTARCTICA_MACQUARIE	44
64579 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ANTARCTICA_SOUTH_POLE	48
64580 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_CHATHAM		51
64581 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_APIA		52
64582 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_KIRITIMATIS		56
64583 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ATLANTIC_CAPE_VERDE		-4
64584 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ATLANTIC_SOUTH_GEORGIA	-8
64585 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_ARGENTINA_BUENOS_AIRES -12
64586 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_SAO_PAULO		-12
64587 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_NEWFOUNDLAND	-14
64588 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_BARBADOS		-16
64589 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_CANCUN		-20
64590 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_COSTA_RICA		-24
64591 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_PHOENIX		-28
64592 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_US_ARIZONA			-28
64593 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_US_PACIFIC			-32
64594 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_US_ALASKA			-36
64595 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_MARQUESAS		-38
64596 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_HAWAII		-40
64597 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_MIDWAY		-44
64598 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_LAST			HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_MIDWAY
64599 	/*
64600 	 * This field is a counter value of the crash dump available. This
64601 	 * value is incremented monotonically at each crash.
64602 	 */
64603 	uint8_t	crash_cntr;
64604 	/*
64605 	 * This specifies the length of the dev_uid in bytes. The maximum
64606 	 * value is 31.
64607 	 */
64608 	uint16_t	dev_uid_length;
64609 	/*
64610 	 * This is a unique device identifier (e.g. the first port MAC
64611 	 * address for a network controller or a serial number for an
64612 	 * en/decryption device) in ASCII format. It is used to identify
64613 	 * where the crash dump content is coming from. Unused bytes must
64614 	 * have '\0' character.
64615 	 */
64616 	uint8_t	dev_uid[32];
64617 	/*
64618 	 * This is a count value tracking the number of successful boots
64619 	 * before the crash occurred.
64620 	 */
64621 	uint32_t	power_on_count;
64622 	uint8_t	unused_2[3];
64623 	/*
64624 	 * This field is used in Output records to indicate that the output
64625 	 * is completely written to RAM. This field should be read as '1'
64626 	 * to indicate that the output has been completely written. When
64627 	 * writing a command completion or response to an internal processor,
64628 	 * the order of writes has to be such that this field is written last.
64629 	 */
64630 	uint8_t	valid;
64631 } hwrm_dbg_crashdump_header_output_t, *phwrm_dbg_crashdump_header_output_t;
64632 
64633 /****************************
64634  * hwrm_dbg_crashdump_erase *
64635  ****************************/
64636 
64637 
64638 /* hwrm_dbg_crashdump_erase_input (size:192b/24B) */
64639 
64640 typedef struct hwrm_dbg_crashdump_erase_input {
64641 	/* The HWRM command request type. */
64642 	uint16_t	req_type;
64643 	/*
64644 	 * The completion ring to send the completion event on. This should
64645 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64646 	 */
64647 	uint16_t	cmpl_ring;
64648 	/*
64649 	 * The sequence ID is used by the driver for tracking multiple
64650 	 * commands. This ID is treated as opaque data by the firmware and
64651 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64652 	 */
64653 	uint16_t	seq_id;
64654 	/*
64655 	 * The target ID of the command:
64656 	 * * 0x0-0xFFF8 - The function ID
64657 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64658 	 * * 0xFFFD - Reserved for user-space HWRM interface
64659 	 * * 0xFFFF - HWRM
64660 	 */
64661 	uint16_t	target_id;
64662 	/*
64663 	 * A physical address pointer pointing to a host buffer that the
64664 	 * command's response data will be written. This can be either a host
64665 	 * physical address (HPA) or a guest physical address (GPA) and must
64666 	 * point to a physically contiguous block of memory.
64667 	 */
64668 	uint64_t	resp_addr;
64669 	/* The scope of the erase */
64670 	uint8_t	scope;
64671 	/*
64672 	 * Wipe all crashdump data blocks, making them available for
64673 	 * the next crash(es). This is the typical value to be used.
64674 	 */
64675 	#define HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_INVALIDATE UINT32_C(0x0)
64676 	/*
64677 	 * Experimental: Remove all data blocks from the directory
64678 	 * (without erasing any existing contents), re-allocate and
64679 	 * re-initialize new ones. In case where the crash dump feature
64680 	 * stops functioning, this can be used to restore it back to the
64681 	 * clean slate.
64682 	 */
64683 	#define HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_REINIT	UINT32_C(0x1)
64684 	#define HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_LAST	HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_REINIT
64685 	uint8_t	unused_0[3];
64686 	uint32_t	unused_1;
64687 } hwrm_dbg_crashdump_erase_input_t, *phwrm_dbg_crashdump_erase_input_t;
64688 
64689 /* hwrm_dbg_crashdump_erase_output (size:128b/16B) */
64690 
64691 typedef struct hwrm_dbg_crashdump_erase_output {
64692 	/* The specific error status for the command. */
64693 	uint16_t	error_code;
64694 	/* The HWRM command request type. */
64695 	uint16_t	req_type;
64696 	/* The sequence ID from the original command. */
64697 	uint16_t	seq_id;
64698 	/* The length of the response data in number of bytes. */
64699 	uint16_t	resp_len;
64700 	uint8_t	unused_1[7];
64701 	/*
64702 	 * This field is used in Output records to indicate that the output
64703 	 * is completely written to RAM. This field should be read as '1'
64704 	 * to indicate that the output has been completely written. When
64705 	 * writing a command completion or response to an internal processor,
64706 	 * the order of writes has to be such that this field is written last.
64707 	 */
64708 	uint8_t	valid;
64709 } hwrm_dbg_crashdump_erase_output_t, *phwrm_dbg_crashdump_erase_output_t;
64710 
64711 /******************
64712  * hwrm_dbg_qcaps *
64713  ******************/
64714 
64715 
64716 /* hwrm_dbg_qcaps_input (size:192b/24B) */
64717 
64718 typedef struct hwrm_dbg_qcaps_input {
64719 	/* The HWRM command request type. */
64720 	uint16_t	req_type;
64721 	/*
64722 	 * The completion ring to send the completion event on. This should
64723 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64724 	 */
64725 	uint16_t	cmpl_ring;
64726 	/*
64727 	 * The sequence ID is used by the driver for tracking multiple
64728 	 * commands. This ID is treated as opaque data by the firmware and
64729 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64730 	 */
64731 	uint16_t	seq_id;
64732 	/*
64733 	 * The target ID of the command:
64734 	 * * 0x0-0xFFF8 - The function ID
64735 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64736 	 * * 0xFFFD - Reserved for user-space HWRM interface
64737 	 * * 0xFFFF - HWRM
64738 	 */
64739 	uint16_t	target_id;
64740 	/*
64741 	 * A physical address pointer pointing to a host buffer that the
64742 	 * command's response data will be written. This can be either a host
64743 	 * physical address (HPA) or a guest physical address (GPA) and must
64744 	 * point to a physically contiguous block of memory.
64745 	 */
64746 	uint64_t	resp_addr;
64747 	/*
64748 	 * Function ID of the function that is being queried.
64749 	 * 0xFF... (All Fs) if the query is for the requesting
64750 	 * function.
64751 	 */
64752 	uint16_t	fid;
64753 	uint8_t	unused_0[6];
64754 } hwrm_dbg_qcaps_input_t, *phwrm_dbg_qcaps_input_t;
64755 
64756 /* hwrm_dbg_qcaps_output (size:192b/24B) */
64757 
64758 typedef struct hwrm_dbg_qcaps_output {
64759 	/* The specific error status for the command. */
64760 	uint16_t	error_code;
64761 	/* The HWRM command request type. */
64762 	uint16_t	req_type;
64763 	/* The sequence ID from the original command. */
64764 	uint16_t	seq_id;
64765 	/* The length of the response data in number of bytes. */
64766 	uint16_t	resp_len;
64767 	/*
64768 	 * FID value. This value is used to identify operations on the PCI
64769 	 * bus as belonging to a particular PCI function.
64770 	 */
64771 	uint16_t	fid;
64772 	uint8_t	unused_0[2];
64773 	/*
64774 	 * Bitwise field of components FW supports skipping during collection
64775 	 * of coredump as part of a crash collection.
64776 	 */
64777 	uint32_t	coredump_component_disable_caps;
64778 	/*
64779 	 * If 1, FW supports disabling the collection of NVM during a
64780 	 * coredump taken as part of crash collection.
64781 	 */
64782 	#define HWRM_DBG_QCAPS_OUTPUT_COREDUMP_COMPONENT_DISABLE_CAPS_NVRAM	UINT32_C(0x1)
64783 	uint32_t	flags;
64784 	/* If 1, FW supports writing a crashdump to NVM. */
64785 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_NVM	UINT32_C(0x1)
64786 	/* If 1, FW supports writing a crashdump to host ddr. */
64787 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_HOST_DDR	UINT32_C(0x2)
64788 	/* If 1, FW supports writing a crashdump to soc ddr. */
64789 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_SOC_DDR	UINT32_C(0x4)
64790 	/* If 1, FW supports USEQ operations */
64791 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_USEQ		UINT32_C(0x8)
64792 	uint8_t	unused_1[3];
64793 	/*
64794 	 * This field is used in Output records to indicate that the output
64795 	 * is completely written to RAM. This field should be read as '1'
64796 	 * to indicate that the output has been completely written. When
64797 	 * writing a command completion or response to an internal processor,
64798 	 * the order of writes has to be such that this field is written last.
64799 	 */
64800 	uint8_t	valid;
64801 } hwrm_dbg_qcaps_output_t, *phwrm_dbg_qcaps_output_t;
64802 
64803 /*****************
64804  * hwrm_dbg_qcfg *
64805  *****************/
64806 
64807 
64808 /* hwrm_dbg_qcfg_input (size:192b/24B) */
64809 
64810 typedef struct hwrm_dbg_qcfg_input {
64811 	/* The HWRM command request type. */
64812 	uint16_t	req_type;
64813 	/*
64814 	 * The completion ring to send the completion event on. This should
64815 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64816 	 */
64817 	uint16_t	cmpl_ring;
64818 	/*
64819 	 * The sequence ID is used by the driver for tracking multiple
64820 	 * commands. This ID is treated as opaque data by the firmware and
64821 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64822 	 */
64823 	uint16_t	seq_id;
64824 	/*
64825 	 * The target ID of the command:
64826 	 * * 0x0-0xFFF8 - The function ID
64827 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64828 	 * * 0xFFFD - Reserved for user-space HWRM interface
64829 	 * * 0xFFFF - HWRM
64830 	 */
64831 	uint16_t	target_id;
64832 	/*
64833 	 * A physical address pointer pointing to a host buffer that the
64834 	 * command's response data will be written. This can be either a host
64835 	 * physical address (HPA) or a guest physical address (GPA) and must
64836 	 * point to a physically contiguous block of memory.
64837 	 */
64838 	uint64_t	resp_addr;
64839 	/*
64840 	 * Function ID of the function that is being queried.
64841 	 * 0xFF... (All Fs) if the query is for the requesting
64842 	 * function.
64843 	 */
64844 	uint16_t	fid;
64845 	uint16_t	flags;
64846 	/*
64847 	 * The crashdump size represents size of crashdump
64848 	 * written to the specified destination.
64849 	 */
64850 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_MASK	UINT32_C(0x3)
64851 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_SFT	0
64852 	/* crashdump size written to nvm */
64853 		#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_NVM	UINT32_C(0x0)
64854 	/* crashdump size written to host_ddr */
64855 		#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_HOST_DDR  UINT32_C(0x1)
64856 	/* crashdump size written to soc_ddr */
64857 		#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_SOC_DDR   UINT32_C(0x2)
64858 		#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_LAST	HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_SOC_DDR
64859 	/*
64860 	 * Bitwise field of components requested for FW to skip when
64861 	 * calculating the size of a coredump collection.
64862 	 */
64863 	uint32_t	coredump_component_disable_flags;
64864 	/*
64865 	 * If 1, NVM will not be collected during a coredump taken as part
64866 	 * of crash collection.
64867 	 */
64868 	#define HWRM_DBG_QCFG_INPUT_COREDUMP_COMPONENT_DISABLE_FLAGS_NVRAM	UINT32_C(0x1)
64869 } hwrm_dbg_qcfg_input_t, *phwrm_dbg_qcfg_input_t;
64870 
64871 /* hwrm_dbg_qcfg_output (size:256b/32B) */
64872 
64873 typedef struct hwrm_dbg_qcfg_output {
64874 	/* The specific error status for the command. */
64875 	uint16_t	error_code;
64876 	/* The HWRM command request type. */
64877 	uint16_t	req_type;
64878 	/* The sequence ID from the original command. */
64879 	uint16_t	seq_id;
64880 	/* The length of the response data in number of bytes. */
64881 	uint16_t	resp_len;
64882 	/*
64883 	 * FID value. This value is used to identify operations on the PCI
64884 	 * bus as belonging to a particular PCI function.
64885 	 */
64886 	uint16_t	fid;
64887 	uint8_t	unused_0[2];
64888 	/*
64889 	 * Size in bytes of a coredump file created by the FW. This takes into
64890 	 * consideration any components selected in the
64891 	 * coredump_component_disable_flags field from hwrm_dbg_qcfg_input.
64892 	 */
64893 	uint32_t	coredump_size;
64894 	uint32_t	flags;
64895 	/*
64896 	 * If set to 1, then UART logging is enabled for the primary
64897 	 * firmware. Disabled otherwise.
64898 	 */
64899 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_UART_LOG		UINT32_C(0x1)
64900 	/*
64901 	 * If set to 1, then UART logging is enabled for the secondary
64902 	 * firmware. Disabled otherwise.
64903 	 */
64904 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_UART_LOG_SECONDARY	UINT32_C(0x2)
64905 	/*
64906 	 * If set to 1, then completion ring logging is enabled for the
64907 	 * primary firmware. Disabled otherwise.
64908 	 */
64909 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_FW_TRACE		UINT32_C(0x4)
64910 	/*
64911 	 * If set to 1, then completion ring logging is enabled for the
64912 	 * secondary firmware. Disabled otherwise.
64913 	 */
64914 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_FW_TRACE_SECONDARY	UINT32_C(0x8)
64915 	/*
64916 	 * If set to 1, firmware will generate debug_notification async
64917 	 * events to the driver as applicable.
64918 	 */
64919 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_DEBUG_NOTIFY	UINT32_C(0x10)
64920 	/*
64921 	 * If set to 1, firmware is allowed to be unresponsive to heartbeat
64922 	 * health checks, allowing for JTAG debugging scenarios where the
64923 	 * debugger has the firmware processes stopped indefinitely. This
64924 	 * flag has effect only on debug builds of firmware.
64925 	 */
64926 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_JTAG_DEBUG		UINT32_C(0x20)
64927 	/*
64928 	 * Notification queue (completion ring) used by the firmware to post
64929 	 * async debug notifications and fw trace logs. This field is valid
64930 	 * when fw_trace, fw_trace_secondary or debug_notify flags are set.
64931 	 */
64932 	uint16_t	async_cmpl_ring;
64933 	uint8_t	unused_2[2];
64934 	/*
64935 	 * Size in bytes of a crashdump file created by the FW. Uses input
64936 	 * flags to determine medium destination and corresponding size.
64937 	 */
64938 	uint32_t	crashdump_size;
64939 	uint8_t	unused_3[3];
64940 	/*
64941 	 * This field is used in Output records to indicate that the output
64942 	 * is completely written to RAM. This field should be read as '1'
64943 	 * to indicate that the output has been completely written. When
64944 	 * writing a command completion or response to an internal processor,
64945 	 * the order of writes has to be such that this field is written last.
64946 	 */
64947 	uint8_t	valid;
64948 } hwrm_dbg_qcfg_output_t, *phwrm_dbg_qcfg_output_t;
64949 
64950 /*********************************
64951  * hwrm_dbg_crashdump_medium_cfg *
64952  *********************************/
64953 
64954 
64955 /* hwrm_dbg_crashdump_medium_cfg_input (size:320b/40B) */
64956 
64957 typedef struct hwrm_dbg_crashdump_medium_cfg_input {
64958 	/* The HWRM command request type. */
64959 	uint16_t	req_type;
64960 	/*
64961 	 * The completion ring to send the completion event on. This should
64962 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64963 	 */
64964 	uint16_t	cmpl_ring;
64965 	/*
64966 	 * The sequence ID is used by the driver for tracking multiple
64967 	 * commands. This ID is treated as opaque data by the firmware and
64968 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64969 	 */
64970 	uint16_t	seq_id;
64971 	/*
64972 	 * The target ID of the command:
64973 	 * * 0x0-0xFFF8 - The function ID
64974 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64975 	 * * 0xFFFD - Reserved for user-space HWRM interface
64976 	 * * 0xFFFF - HWRM
64977 	 */
64978 	uint16_t	target_id;
64979 	/*
64980 	 * A physical address pointer pointing to a host buffer that the
64981 	 * command's response data will be written. This can be either a host
64982 	 * physical address (HPA) or a guest physical address (GPA) and must
64983 	 * point to a physically contiguous block of memory.
64984 	 */
64985 	uint64_t	resp_addr;
64986 	uint16_t	output_dest_flags;
64987 	/* Destination is DDR ram. */
64988 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_TYPE_DDR	UINT32_C(0x1)
64989 	uint16_t	pg_size_lvl;
64990 	/* PBL indirect levels. */
64991 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_MASK	UINT32_C(0x3)
64992 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_SFT	0
64993 	/* PBL pointer is physical start address. */
64994 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_0	UINT32_C(0x0)
64995 	/* PBL pointer points to PTE table. */
64996 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_1	UINT32_C(0x1)
64997 	/*
64998 	 * PBL pointer points to PDE table with each entry pointing to
64999 	 * PTE tables.
65000 	 */
65001 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_2	UINT32_C(0x2)
65002 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LAST	HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_2
65003 	/* page size. */
65004 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_MASK  UINT32_C(0x1c)
65005 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_SFT   2
65006 	/* 4KB. */
65007 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_4K   (UINT32_C(0x0) << 2)
65008 	/* 8KB. */
65009 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_8K   (UINT32_C(0x1) << 2)
65010 	/* 64KB. */
65011 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_64K  (UINT32_C(0x2) << 2)
65012 	/* 2MB. */
65013 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_2M   (UINT32_C(0x3) << 2)
65014 	/* 8MB. */
65015 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_8M   (UINT32_C(0x4) << 2)
65016 	/* 1GB. */
65017 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_1G   (UINT32_C(0x5) << 2)
65018 		#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_LAST   HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_1G
65019 	/* unused11 is 11 b */
65020 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_UNUSED11_MASK UINT32_C(0xffe0)
65021 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_UNUSED11_SFT  5
65022 	/* Crashdump buffer size. */
65023 	uint32_t	size;
65024 	/*
65025 	 * Bitwise field of components that FW is requested to skip during
65026 	 * coredump as part of a crash collection.
65027 	 */
65028 	uint32_t	coredump_component_disable_flags;
65029 	/*
65030 	 * If 1, then NVM will not be collected during a coredump taken as
65031 	 * part of crash collection.
65032 	 */
65033 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_NVRAM	UINT32_C(0x1)
65034 	uint32_t	unused_0;
65035 	/* Crashdump buffer PBL physical address. */
65036 	uint64_t	pbl;
65037 } hwrm_dbg_crashdump_medium_cfg_input_t, *phwrm_dbg_crashdump_medium_cfg_input_t;
65038 
65039 /* hwrm_dbg_crashdump_medium_cfg_output (size:128b/16B) */
65040 
65041 typedef struct hwrm_dbg_crashdump_medium_cfg_output {
65042 	/* The specific error status for the command. */
65043 	uint16_t	error_code;
65044 	/* The HWRM command request type. */
65045 	uint16_t	req_type;
65046 	/* The sequence ID from the original command. */
65047 	uint16_t	seq_id;
65048 	/* The length of the response data in number of bytes. */
65049 	uint16_t	resp_len;
65050 	uint8_t	unused_1[7];
65051 	/*
65052 	 * This field is used in Output records to indicate that the output
65053 	 * is completely written to RAM. This field should be read as '1'
65054 	 * to indicate that the output has been completely written. When
65055 	 * writing a command completion or response to an internal processor,
65056 	 * the order of writes has to be such that this field is written last.
65057 	 */
65058 	uint8_t	valid;
65059 } hwrm_dbg_crashdump_medium_cfg_output_t, *phwrm_dbg_crashdump_medium_cfg_output_t;
65060 
65061 /* coredump_segment_record (size:128b/16B) */
65062 
65063 typedef struct coredump_segment_record {
65064 	/* Component id of the returned component. */
65065 	uint16_t	component_id;
65066 	/* Segment id of the returned component. */
65067 	uint16_t	segment_id;
65068 	/* Not used. */
65069 	uint16_t	max_instances;
65070 	/* Major version. */
65071 	uint8_t	version_hi;
65072 	/* Minor version. */
65073 	uint8_t	version_low;
65074 	/*
65075 	 * bit 0: live data
65076 	 * bit 1: crashed data
65077 	 */
65078 	uint8_t	seg_flags;
65079 	/* This field is used to indicate the segment is compressed. */
65080 	uint8_t	compress_flags;
65081 	/*
65082 	 * SFLAG_COMPRESSED_ZLIB indicates that the segment data is
65083 	 * compressed.
65084 	 */
65085 	#define SFLAG_COMPRESSED_ZLIB	UINT32_C(0x1)
65086 	uint8_t	unused_0[2];
65087 	/*
65088 	 * This field is the length of the segment data. It will be zero if
65089 	 * the firmware does not support returning the segment data length.
65090 	 */
65091 	uint32_t	segment_len;
65092 } coredump_segment_record_t, *pcoredump_segment_record_t;
65093 
65094 /**************************
65095  * hwrm_dbg_coredump_list *
65096  **************************/
65097 
65098 
65099 /* hwrm_dbg_coredump_list_input (size:256b/32B) */
65100 
65101 typedef struct hwrm_dbg_coredump_list_input {
65102 	/* The HWRM command request type. */
65103 	uint16_t	req_type;
65104 	/*
65105 	 * The completion ring to send the completion event on. This should
65106 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65107 	 */
65108 	uint16_t	cmpl_ring;
65109 	/*
65110 	 * The sequence ID is used by the driver for tracking multiple
65111 	 * commands. This ID is treated as opaque data by the firmware and
65112 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65113 	 */
65114 	uint16_t	seq_id;
65115 	/*
65116 	 * The target ID of the command:
65117 	 * * 0x0-0xFFF8 - The function ID
65118 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65119 	 * * 0xFFFD - Reserved for user-space HWRM interface
65120 	 * * 0xFFFF - HWRM
65121 	 */
65122 	uint16_t	target_id;
65123 	/*
65124 	 * A physical address pointer pointing to a host buffer that the
65125 	 * command's response data will be written. This can be either a host
65126 	 * physical address (HPA) or a guest physical address (GPA) and must
65127 	 * point to a physically contiguous block of memory.
65128 	 */
65129 	uint64_t	resp_addr;
65130 	/*
65131 	 * host address where the data content will be written
65132 	 * when the request is complete. This area must be 16B aligned.
65133 	 */
65134 	uint64_t	host_dest_addr;
65135 	/* Length of host buffer used for transferring debug data. */
65136 	uint32_t	host_buf_len;
65137 	/* Sequence number of the request. Starts at 0. */
65138 	uint16_t	seq_no;
65139 	/*  */
65140 	uint8_t	flags;
65141 	/*
65142 	 * If set to 1, crash dump is requested.
65143 	 * If set to 0, both live core and crash dump are requested.
65144 	 */
65145 	#define HWRM_DBG_COREDUMP_LIST_INPUT_FLAGS_CRASHDUMP	UINT32_C(0x1)
65146 	uint8_t	unused_0[1];
65147 } hwrm_dbg_coredump_list_input_t, *phwrm_dbg_coredump_list_input_t;
65148 
65149 /* hwrm_dbg_coredump_list_output (size:128b/16B) */
65150 
65151 typedef struct hwrm_dbg_coredump_list_output {
65152 	/* The specific error status for the command. */
65153 	uint16_t	error_code;
65154 	/* The HWRM command request type. */
65155 	uint16_t	req_type;
65156 	/* The sequence ID from the original command. */
65157 	uint16_t	seq_id;
65158 	/* The length of the response data in number of bytes. */
65159 	uint16_t	resp_len;
65160 	uint8_t	flags;
65161 	/*
65162 	 * Value of 1 means that there is more data available.
65163 	 * Issue the request again with the next sequence number.
65164 	 */
65165 	#define HWRM_DBG_COREDUMP_LIST_OUTPUT_FLAGS_MORE	UINT32_C(0x1)
65166 	uint8_t	unused_0;
65167 	/* Total number of segments to be returned. */
65168 	uint16_t	total_segments;
65169 	/* Actual length of data returned in bytes. */
65170 	uint16_t	data_len;
65171 	uint8_t	unused_1;
65172 	/*
65173 	 * This field is used in Output records to indicate that the output
65174 	 * is completely written to RAM. This field should be read as '1'
65175 	 * to indicate that the output has been completely written. When
65176 	 * writing a command completion or response to an internal processor,
65177 	 * the order of writes has to be such that this field is written last.
65178 	 */
65179 	uint8_t	valid;
65180 } hwrm_dbg_coredump_list_output_t, *phwrm_dbg_coredump_list_output_t;
65181 
65182 /******************************
65183  * hwrm_dbg_coredump_initiate *
65184  ******************************/
65185 
65186 
65187 /* hwrm_dbg_coredump_initiate_input (size:256b/32B) */
65188 
65189 typedef struct hwrm_dbg_coredump_initiate_input {
65190 	/* The HWRM command request type. */
65191 	uint16_t	req_type;
65192 	/*
65193 	 * The completion ring to send the completion event on. This should
65194 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65195 	 */
65196 	uint16_t	cmpl_ring;
65197 	/*
65198 	 * The sequence ID is used by the driver for tracking multiple
65199 	 * commands. This ID is treated as opaque data by the firmware and
65200 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65201 	 */
65202 	uint16_t	seq_id;
65203 	/*
65204 	 * The target ID of the command:
65205 	 * * 0x0-0xFFF8 - The function ID
65206 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65207 	 * * 0xFFFD - Reserved for user-space HWRM interface
65208 	 * * 0xFFFF - HWRM
65209 	 */
65210 	uint16_t	target_id;
65211 	/*
65212 	 * A physical address pointer pointing to a host buffer that the
65213 	 * command's response data will be written. This can be either a host
65214 	 * physical address (HPA) or a guest physical address (GPA) and must
65215 	 * point to a physically contiguous block of memory.
65216 	 */
65217 	uint64_t	resp_addr;
65218 	/* Component id of the returned component. */
65219 	uint16_t	component_id;
65220 	/* Segment id of the returned component. */
65221 	uint16_t	segment_id;
65222 	/* Not used. */
65223 	uint16_t	instance;
65224 	/* Not used. */
65225 	uint16_t	unused_0;
65226 	/*
65227 	 * bit 0: live data
65228 	 * bit 1: crashed data
65229 	 */
65230 	uint8_t	seg_flags;
65231 	/* Not used. */
65232 	uint8_t	unused_1[7];
65233 } hwrm_dbg_coredump_initiate_input_t, *phwrm_dbg_coredump_initiate_input_t;
65234 
65235 /* hwrm_dbg_coredump_initiate_output (size:128b/16B) */
65236 
65237 typedef struct hwrm_dbg_coredump_initiate_output {
65238 	/* The specific error status for the command. */
65239 	uint16_t	error_code;
65240 	/* The HWRM command request type. */
65241 	uint16_t	req_type;
65242 	/* The sequence ID from the original command. */
65243 	uint16_t	seq_id;
65244 	/* The length of the response data in number of bytes. */
65245 	uint16_t	resp_len;
65246 	uint8_t	unused_0[7];
65247 	/*
65248 	 * This field is used in Output records to indicate that the output
65249 	 * is completely written to RAM. This field should be read as '1'
65250 	 * to indicate that the output has been completely written. When
65251 	 * writing a command completion or response to an internal processor,
65252 	 * the order of writes has to be such that this field is written last.
65253 	 */
65254 	uint8_t	valid;
65255 } hwrm_dbg_coredump_initiate_output_t, *phwrm_dbg_coredump_initiate_output_t;
65256 
65257 /* coredump_data_hdr (size:128b/16B) */
65258 
65259 typedef struct coredump_data_hdr {
65260 	/* Starting address of the register range. */
65261 	uint32_t	address;
65262 	/*
65263 	 * length: 0 - 23 bits represents the actual data without the pad.
65264 	 * flags: 24 - 31 bits represents indirect register ranges.
65265 	 *   - bit 24: Set if registers in this segment are indirect accessed.
65266 	 */
65267 	uint32_t	flags_length;
65268 	/* These bits represents the actual length of the data segment */
65269 	#define COREDUMP_DATA_HDR_FLAGS_LENGTH_ACTUAL_LEN_MASK	UINT32_C(0xffffff)
65270 	#define COREDUMP_DATA_HDR_FLAGS_LENGTH_ACTUAL_LEN_SFT	0
65271 	/* Set if registers in this segment are indirect accessed. */
65272 	#define COREDUMP_DATA_HDR_FLAGS_LENGTH_INDIRECT_ACCESS	UINT32_C(0x1000000)
65273 	/* Value in the partner register for indirect or multi-field registers. */
65274 	uint32_t	instance;
65275 	/* Starting address of the next register after the current data range */
65276 	uint32_t	next_offset;
65277 } coredump_data_hdr_t, *pcoredump_data_hdr_t;
65278 
65279 /******************************
65280  * hwrm_dbg_coredump_retrieve *
65281  ******************************/
65282 
65283 
65284 /* hwrm_dbg_coredump_retrieve_input (size:448b/56B) */
65285 
65286 typedef struct hwrm_dbg_coredump_retrieve_input {
65287 	/* The HWRM command request type. */
65288 	uint16_t	req_type;
65289 	/*
65290 	 * The completion ring to send the completion event on. This should
65291 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65292 	 */
65293 	uint16_t	cmpl_ring;
65294 	/*
65295 	 * The sequence ID is used by the driver for tracking multiple
65296 	 * commands. This ID is treated as opaque data by the firmware and
65297 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65298 	 */
65299 	uint16_t	seq_id;
65300 	/*
65301 	 * The target ID of the command:
65302 	 * * 0x0-0xFFF8 - The function ID
65303 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65304 	 * * 0xFFFD - Reserved for user-space HWRM interface
65305 	 * * 0xFFFF - HWRM
65306 	 */
65307 	uint16_t	target_id;
65308 	/*
65309 	 * A physical address pointer pointing to a host buffer that the
65310 	 * command's response data will be written. This can be either a host
65311 	 * physical address (HPA) or a guest physical address (GPA) and must
65312 	 * point to a physically contiguous block of memory.
65313 	 */
65314 	uint64_t	resp_addr;
65315 	/*
65316 	 * host address where the data content will be written
65317 	 * when the request is complete. This area must be 16B aligned.
65318 	 */
65319 	uint64_t	host_dest_addr;
65320 	/* Length of host buffer used for transferring debug data. */
65321 	uint32_t	host_buf_len;
65322 	/* Not used. */
65323 	uint32_t	unused_0;
65324 	/* Component id of the returned component. */
65325 	uint16_t	component_id;
65326 	/* Segment id of the returned component. */
65327 	uint16_t	segment_id;
65328 	/* Not used. */
65329 	uint16_t	instance;
65330 	/* Not used. */
65331 	uint16_t	unused_1;
65332 	/*
65333 	 * bit 0: live data
65334 	 * bit 1: crashed data
65335 	 */
65336 	uint8_t	seg_flags;
65337 	uint8_t	unused_2;
65338 	uint16_t	unused_3;
65339 	/* Not used. */
65340 	uint32_t	unused_4;
65341 	/* Sequence number is used per segment request. Starts at 0. */
65342 	uint32_t	seq_no;
65343 	uint32_t	unused_5;
65344 } hwrm_dbg_coredump_retrieve_input_t, *phwrm_dbg_coredump_retrieve_input_t;
65345 
65346 /* hwrm_dbg_coredump_retrieve_output (size:128b/16B) */
65347 
65348 typedef struct hwrm_dbg_coredump_retrieve_output {
65349 	/* The specific error status for the command. */
65350 	uint16_t	error_code;
65351 	/* The HWRM command request type. */
65352 	uint16_t	req_type;
65353 	/* The sequence ID from the original command. */
65354 	uint16_t	seq_id;
65355 	/* The length of the response data in number of bytes. */
65356 	uint16_t	resp_len;
65357 	uint8_t	flags;
65358 	/*
65359 	 * Value of 1 means that there is more data available.
65360 	 * Issue the request again with the next sequence number.
65361 	 */
65362 	#define HWRM_DBG_COREDUMP_RETRIEVE_OUTPUT_FLAGS_MORE	UINT32_C(0x1)
65363 	uint8_t	unused_0;
65364 	/* Actual length of data returned in bytes. */
65365 	uint16_t	data_len;
65366 	uint8_t	unused_1[3];
65367 	/*
65368 	 * This field is used in Output records to indicate that the output
65369 	 * is completely written to RAM. This field should be read as '1'
65370 	 * to indicate that the output has been completely written. When
65371 	 * writing a command completion or response to an internal processor,
65372 	 * the order of writes has to be such that this field is written last.
65373 	 */
65374 	uint8_t	valid;
65375 } hwrm_dbg_coredump_retrieve_output_t, *phwrm_dbg_coredump_retrieve_output_t;
65376 
65377 /********************
65378  * hwrm_dbg_i2c_cmd *
65379  ********************/
65380 
65381 
65382 /* hwrm_dbg_i2c_cmd_input (size:320b/40B) */
65383 
65384 typedef struct hwrm_dbg_i2c_cmd_input {
65385 	/* The HWRM command request type. */
65386 	uint16_t	req_type;
65387 	/*
65388 	 * The completion ring to send the completion event on. This should
65389 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65390 	 */
65391 	uint16_t	cmpl_ring;
65392 	/*
65393 	 * The sequence ID is used by the driver for tracking multiple
65394 	 * commands. This ID is treated as opaque data by the firmware and
65395 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65396 	 */
65397 	uint16_t	seq_id;
65398 	/*
65399 	 * The target ID of the command:
65400 	 * * 0x0-0xFFF8 - The function ID
65401 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65402 	 * * 0xFFFD - Reserved for user-space HWRM interface
65403 	 * * 0xFFFF - HWRM
65404 	 */
65405 	uint16_t	target_id;
65406 	/*
65407 	 * A physical address pointer pointing to a host buffer that the
65408 	 * command's response data will be written. This can be either a host
65409 	 * physical address (HPA) or a guest physical address (GPA) and must
65410 	 * point to a physically contiguous block of memory.
65411 	 */
65412 	uint64_t	resp_addr;
65413 	/*
65414 	 * host address where the data content will be read or written.
65415 	 * For master write, data content will be read from host memory and
65416 	 * write to i2c slave. (size defined by write_size)
65417 	 * For master read, data content will be read from i2c slave and write
65418 	 * to the host memory. (size defined by read_size)
65419 	 * For master write/read, data content will be first read from host
65420 	 * memory and write to i2c slave. (size defined by write_size) then
65421 	 * data read from i2c slave will be written back to the same host
65422 	 * memory. (size defined by read_size)
65423 	 */
65424 	uint64_t	host_dest_addr;
65425 	/* read size in bytes, valid only for master read and write/read */
65426 	uint16_t	read_size;
65427 	/* write size in bytes, valid only for master write and write/read */
65428 	uint16_t	write_size;
65429 	/*
65430 	 * instance of i2c channel for this operation. Valid if multiple
65431 	 * instances
65432 	 * of i2c channels are connected to external i2c devices.
65433 	 */
65434 	uint8_t	chnl_id;
65435 	uint8_t	options;
65436 	/*
65437 	 * This bit must be '1' for 10-bit i2c addressing,
65438 	 * 7-bit addressing otherwise.
65439 	 */
65440 	#define HWRM_DBG_I2C_CMD_INPUT_OPTIONS_10_BIT_ADDRESSING	UINT32_C(0x1)
65441 	/*
65442 	 * This bit must be '1' for 400 kbit/s, 100 kbit/s
65443 	 * otherwise.
65444 	 */
65445 	#define HWRM_DBG_I2C_CMD_INPUT_OPTIONS_FAST_MODE		UINT32_C(0x2)
65446 	/* I2C slave address. */
65447 	uint16_t	slave_addr;
65448 	/* I2C transfer mode. */
65449 	uint8_t	xfer_mode;
65450 	/* read data from slave device */
65451 	#define HWRM_DBG_I2C_CMD_INPUT_XFER_MODE_MASTER_READ	UINT32_C(0x0)
65452 	/* write data to slave device */
65453 	#define HWRM_DBG_I2C_CMD_INPUT_XFER_MODE_MASTER_WRITE	UINT32_C(0x1)
65454 	/* write follow by read data from slave device */
65455 	#define HWRM_DBG_I2C_CMD_INPUT_XFER_MODE_MASTER_WRITE_READ UINT32_C(0x2)
65456 	#define HWRM_DBG_I2C_CMD_INPUT_XFER_MODE_LAST		HWRM_DBG_I2C_CMD_INPUT_XFER_MODE_MASTER_WRITE_READ
65457 	uint8_t	unused_1[7];
65458 } hwrm_dbg_i2c_cmd_input_t, *phwrm_dbg_i2c_cmd_input_t;
65459 
65460 /* hwrm_dbg_i2c_cmd_output (size:128b/16B) */
65461 
65462 typedef struct hwrm_dbg_i2c_cmd_output {
65463 	/* The specific error status for the command. */
65464 	uint16_t	error_code;
65465 	/* The HWRM command request type. */
65466 	uint16_t	req_type;
65467 	/* The sequence ID from the original command. */
65468 	uint16_t	seq_id;
65469 	/* The length of the response data in number of bytes. */
65470 	uint16_t	resp_len;
65471 	uint8_t	unused_0[7];
65472 	/*
65473 	 * This field is used in Output records to indicate that the output
65474 	 * is completely written to RAM. This field should be read as '1'
65475 	 * to indicate that the output has been completely written. When
65476 	 * writing a command completion or response to an internal processor,
65477 	 * the order of writes has to be such that this field is written last.
65478 	 */
65479 	uint8_t	valid;
65480 } hwrm_dbg_i2c_cmd_output_t, *phwrm_dbg_i2c_cmd_output_t;
65481 
65482 /*******************
65483  * hwrm_dbg_fw_cli *
65484  *******************/
65485 
65486 
65487 /* hwrm_dbg_fw_cli_input (size:1024b/128B) */
65488 
65489 typedef struct hwrm_dbg_fw_cli_input {
65490 	/* The HWRM command request type. */
65491 	uint16_t	req_type;
65492 	/*
65493 	 * The completion ring to send the completion event on. This should
65494 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65495 	 */
65496 	uint16_t	cmpl_ring;
65497 	/*
65498 	 * The sequence ID is used by the driver for tracking multiple
65499 	 * commands. This ID is treated as opaque data by the firmware and
65500 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65501 	 */
65502 	uint16_t	seq_id;
65503 	/*
65504 	 * The target ID of the command:
65505 	 * * 0x0-0xFFF8 - The function ID
65506 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65507 	 * * 0xFFFD - Reserved for user-space HWRM interface
65508 	 * * 0xFFFF - HWRM
65509 	 */
65510 	uint16_t	target_id;
65511 	/*
65512 	 * A physical address pointer pointing to a host buffer that the
65513 	 * command's response data will be written. This can be either a host
65514 	 * physical address (HPA) or a guest physical address (GPA) and must
65515 	 * point to a physically contiguous block of memory.
65516 	 */
65517 	uint64_t	resp_addr;
65518 	/*
65519 	 * Address of the host buffer where debug CLI data
65520 	 * is requested to be dumped.
65521 	 */
65522 	uint64_t	host_dest_addr;
65523 	/* Length of host buffer used for transferring debug data. */
65524 	uint32_t	host_buf_len;
65525 	/* Length of CLI command. */
65526 	uint16_t	cli_cmd_len;
65527 	uint8_t	unused_0[2];
65528 	/* CLI command string, a single ASCII encoded null terminated string. */
65529 	uint8_t	cli_cmd[96];
65530 } hwrm_dbg_fw_cli_input_t, *phwrm_dbg_fw_cli_input_t;
65531 
65532 /* hwrm_dbg_fw_cli_output (size:128b/16B) */
65533 
65534 typedef struct hwrm_dbg_fw_cli_output {
65535 	/* The specific error status for the command. */
65536 	uint16_t	error_code;
65537 	/* The HWRM command request type. */
65538 	uint16_t	req_type;
65539 	/* The sequence ID from the original command. */
65540 	uint16_t	seq_id;
65541 	/* The length of the response data in number of bytes. */
65542 	uint16_t	resp_len;
65543 	/* Size of debug CLI data returned in bytes. */
65544 	uint32_t	cli_data_len;
65545 	uint8_t	unused_0[3];
65546 	/*
65547 	 * This field is used in Output records to indicate that the output
65548 	 * is completely written to RAM. This field should be read as '1'
65549 	 * to indicate that the output has been completely written. When
65550 	 * writing a command completion or response to an internal processor,
65551 	 * the order of writes has to be such that this field is written last.
65552 	 */
65553 	uint8_t	valid;
65554 } hwrm_dbg_fw_cli_output_t, *phwrm_dbg_fw_cli_output_t;
65555 
65556 /**************************
65557  * hwrm_dbg_ring_info_get *
65558  **************************/
65559 
65560 
65561 /* hwrm_dbg_ring_info_get_input (size:192b/24B) */
65562 
65563 typedef struct hwrm_dbg_ring_info_get_input {
65564 	/* The HWRM command request type. */
65565 	uint16_t	req_type;
65566 	/*
65567 	 * The completion ring to send the completion event on. This should
65568 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65569 	 */
65570 	uint16_t	cmpl_ring;
65571 	/*
65572 	 * The sequence ID is used by the driver for tracking multiple
65573 	 * commands. This ID is treated as opaque data by the firmware and
65574 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65575 	 */
65576 	uint16_t	seq_id;
65577 	/*
65578 	 * The target ID of the command:
65579 	 * * 0x0-0xFFF8 - The function ID
65580 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65581 	 * * 0xFFFD - Reserved for user-space HWRM interface
65582 	 * * 0xFFFF - HWRM
65583 	 */
65584 	uint16_t	target_id;
65585 	/*
65586 	 * A physical address pointer pointing to a host buffer that the
65587 	 * command's response data will be written. This can be either a host
65588 	 * physical address (HPA) or a guest physical address (GPA) and must
65589 	 * point to a physically contiguous block of memory.
65590 	 */
65591 	uint64_t	resp_addr;
65592 	/* Ring Type. */
65593 	uint8_t	ring_type;
65594 	/* L2 Completion Ring (CR) */
65595 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_L2_CMPL UINT32_C(0x0)
65596 	/* TX Ring (TR) */
65597 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_TX	UINT32_C(0x1)
65598 	/* RX Ring (RR) */
65599 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_RX	UINT32_C(0x2)
65600 	/* Notification Queue (NQ) */
65601 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_NQ	UINT32_C(0x3)
65602 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_LAST   HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_NQ
65603 	uint8_t	unused_0[3];
65604 	/* Firmware ring ID associated with ring being queried. */
65605 	uint32_t	fw_ring_id;
65606 } hwrm_dbg_ring_info_get_input_t, *phwrm_dbg_ring_info_get_input_t;
65607 
65608 /* hwrm_dbg_ring_info_get_output (size:192b/24B) */
65609 
65610 typedef struct hwrm_dbg_ring_info_get_output {
65611 	/* The specific error status for the command. */
65612 	uint16_t	error_code;
65613 	/* The HWRM command request type. */
65614 	uint16_t	req_type;
65615 	/* The sequence ID from the original command. */
65616 	uint16_t	seq_id;
65617 	/* The length of the response data in number of bytes. */
65618 	uint16_t	resp_len;
65619 	/* Producer index for the queried ring. */
65620 	uint32_t	producer_index;
65621 	/* Consumer index for the queried ring. */
65622 	uint32_t	consumer_index;
65623 	/*
65624 	 * CAG Vector Control for the queried NQ ring.
65625 	 * Not valid for other ring types.
65626 	 */
65627 	uint32_t	cag_vector_ctrl;
65628 	/*
65629 	 * Steering Tag. The current value of the steering tag for the ring.
65630 	 * The steering tag is only valid if it is advertised by Firmware in
65631 	 * flags_ext2.steering_tag_supported of hwrm_func_qcaps response.
65632 	 */
65633 	uint16_t	st_tag;
65634 	uint8_t	unused_0;
65635 	/*
65636 	 * This field is used in Output records to indicate that the output
65637 	 * is completely written to RAM. This field should be read as '1'
65638 	 * to indicate that the output has been completely written. When
65639 	 * writing a command completion or response to an internal processor,
65640 	 * the order of writes has to be such that this field is written last.
65641 	 */
65642 	uint8_t	valid;
65643 } hwrm_dbg_ring_info_get_output_t, *phwrm_dbg_ring_info_get_output_t;
65644 
65645 /**********************
65646  * hwrm_dbg_drv_trace *
65647  **********************/
65648 
65649 
65650 /* hwrm_dbg_drv_trace_input (size:1024b/128B) */
65651 
65652 typedef struct hwrm_dbg_drv_trace_input {
65653 	/* The HWRM command request type. */
65654 	uint16_t	req_type;
65655 	/*
65656 	 * The completion ring to send the completion event on. This should
65657 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65658 	 */
65659 	uint16_t	cmpl_ring;
65660 	/*
65661 	 * The sequence ID is used by the driver for tracking multiple
65662 	 * commands. This ID is treated as opaque data by the firmware and
65663 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65664 	 */
65665 	uint16_t	seq_id;
65666 	/*
65667 	 * The target ID of the command:
65668 	 * * 0x0-0xFFF8 - The function ID
65669 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65670 	 * * 0xFFFD - Reserved for user-space HWRM interface
65671 	 * * 0xFFFF - HWRM
65672 	 */
65673 	uint16_t	target_id;
65674 	/*
65675 	 * A physical address pointer pointing to a host buffer that the
65676 	 * command's response data will be written. This can be either a host
65677 	 * physical address (HPA) or a guest physical address (GPA) and must
65678 	 * point to a physically contiguous block of memory.
65679 	 */
65680 	uint64_t	resp_addr;
65681 	/* Severity of the message. */
65682 	uint8_t	severity;
65683 	/* Fatal */
65684 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_FATAL   UINT32_C(0x0)
65685 	/* Error */
65686 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_ERROR   UINT32_C(0x1)
65687 	/* Warning */
65688 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_WARNING UINT32_C(0x2)
65689 	/* Info */
65690 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_INFO	UINT32_C(0x3)
65691 	/* Debug */
65692 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_DEBUG   UINT32_C(0x4)
65693 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_LAST		HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_DEBUG
65694 	/* Number of bytes to write including terminating 'NULL' if any. */
65695 	uint8_t	write_len;
65696 	uint8_t	unused_0[6];
65697 	/*
65698 	 * This field represents the debug data sent by driver
65699 	 * ASCII chars, 'NULL' termination not required.
65700 	 */
65701 	char	trace_data[104];
65702 } hwrm_dbg_drv_trace_input_t, *phwrm_dbg_drv_trace_input_t;
65703 
65704 /* hwrm_dbg_drv_trace_output (size:128b/16B) */
65705 
65706 typedef struct hwrm_dbg_drv_trace_output {
65707 	/* The specific error status for the command. */
65708 	uint16_t	error_code;
65709 	/* The HWRM command request type. */
65710 	uint16_t	req_type;
65711 	/* The sequence ID from the original command. */
65712 	uint16_t	seq_id;
65713 	/* The length of the response data in number of bytes. */
65714 	uint16_t	resp_len;
65715 	uint8_t	unused_0[7];
65716 	/*
65717 	 * This field is used in Output records to indicate that the output
65718 	 * is completely written to RAM. This field should be read as '1'
65719 	 * to indicate that the output has been completely written. When
65720 	 * writing a command completion or response to an internal processor,
65721 	 * the order of writes has to be such that this field is written last.
65722 	 */
65723 	uint8_t	valid;
65724 } hwrm_dbg_drv_trace_output_t, *phwrm_dbg_drv_trace_output_t;
65725 
65726 /***********************
65727  * hwrm_dbg_useq_alloc *
65728  ***********************/
65729 
65730 
65731 /* hwrm_dbg_useq_alloc_input (size:192b/24B) */
65732 
65733 typedef struct hwrm_dbg_useq_alloc_input {
65734 	/* The HWRM command request type. */
65735 	uint16_t	req_type;
65736 	/*
65737 	 * The completion ring to send the completion event on. This should
65738 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65739 	 */
65740 	uint16_t	cmpl_ring;
65741 	/*
65742 	 * The sequence ID is used by the driver for tracking multiple
65743 	 * commands. This ID is treated as opaque data by the firmware and
65744 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65745 	 */
65746 	uint16_t	seq_id;
65747 	/*
65748 	 * The target ID of the command:
65749 	 * * 0x0-0xFFF8 - The function ID
65750 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65751 	 * * 0xFFFD - Reserved for user-space HWRM interface
65752 	 * * 0xFFFF - HWRM
65753 	 */
65754 	uint16_t	target_id;
65755 	/*
65756 	 * A physical address pointer pointing to a host buffer that the
65757 	 * command's response data will be written. This can be either a host
65758 	 * physical address (HPA) or a guest physical address (GPA) and must
65759 	 * point to a physically contiguous block of memory.
65760 	 */
65761 	uint64_t	resp_addr;
65762 	/*
65763 	 * Number size of the allocation, in bytes, for the USEQ in the code
65764 	 * words array
65765 	 */
65766 	uint32_t	size;
65767 	/*
65768 	 * Number of bytes executing the USEQ will produce. Must be a multiple
65769 	 * of 4
65770 	 */
65771 	uint16_t	output_bytes;
65772 	/* This field is reserved */
65773 	uint16_t	unused_0;
65774 } hwrm_dbg_useq_alloc_input_t, *phwrm_dbg_useq_alloc_input_t;
65775 
65776 /* hwrm_dbg_useq_alloc_output (size:256b/32B) */
65777 
65778 typedef struct hwrm_dbg_useq_alloc_output {
65779 	/* The specific error status for the command. */
65780 	uint16_t	error_code;
65781 	/* The HWRM command request type. */
65782 	uint16_t	req_type;
65783 	/* The sequence ID from the original command. */
65784 	uint16_t	seq_id;
65785 	/* The length of the response data in number of bytes. */
65786 	uint16_t	resp_len;
65787 	/* Non-zero firmware timestamp */
65788 	uint32_t	nz_fw_timestamp;
65789 	/* The last selected USID */
65790 	uint16_t	last_usid;
65791 	/* The number of USEQs currently allocated */
65792 	uint16_t	num_useq_allocd;
65793 	/* Flags indicating current USEQ engine state */
65794 	uint32_t	useq_resp_flags;
65795 	/* When set, there is at least some data available to be delivered */
65796 	#define HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
65797 	/* When set, all internal buffers are full */
65798 	#define HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
65799 	#define HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
65800 	/* Current count of the number of full buffers available for delivery */
65801 	uint8_t	full_cnt;
65802 	/* Reserved */
65803 	uint8_t	useq_resp_unused_0[3];
65804 	/* This is the allocated usid */
65805 	uint16_t	alloc_usid;
65806 	/* This field is reserved */
65807 	uint16_t	unused_0;
65808 	/*
65809 	 * This field is used in Output records to indicate that the output
65810 	 * is completely written to RAM. This field should be read as '1'
65811 	 * to indicate that the output has been completely written. When
65812 	 * writing a command completion or response to an internal processor,
65813 	 * the order of writes has to be such that this field is written last.
65814 	 */
65815 	uint32_t	valid;
65816 } hwrm_dbg_useq_alloc_output_t, *phwrm_dbg_useq_alloc_output_t;
65817 
65818 /**********************
65819  * hwrm_dbg_useq_free *
65820  **********************/
65821 
65822 
65823 /* hwrm_dbg_useq_free_input (size:192b/24B) */
65824 
65825 typedef struct hwrm_dbg_useq_free_input {
65826 	/* The HWRM command request type. */
65827 	uint16_t	req_type;
65828 	/*
65829 	 * The completion ring to send the completion event on. This should
65830 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65831 	 */
65832 	uint16_t	cmpl_ring;
65833 	/*
65834 	 * The sequence ID is used by the driver for tracking multiple
65835 	 * commands. This ID is treated as opaque data by the firmware and
65836 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65837 	 */
65838 	uint16_t	seq_id;
65839 	/*
65840 	 * The target ID of the command:
65841 	 * * 0x0-0xFFF8 - The function ID
65842 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65843 	 * * 0xFFFD - Reserved for user-space HWRM interface
65844 	 * * 0xFFFF - HWRM
65845 	 */
65846 	uint16_t	target_id;
65847 	/*
65848 	 * A physical address pointer pointing to a host buffer that the
65849 	 * command's response data will be written. This can be either a host
65850 	 * physical address (HPA) or a guest physical address (GPA) and must
65851 	 * point to a physically contiguous block of memory.
65852 	 */
65853 	uint64_t	resp_addr;
65854 	/* The USID of the sequence to free */
65855 	uint16_t	usid;
65856 	/* This field is reserved */
65857 	uint8_t	unused_0[6];
65858 } hwrm_dbg_useq_free_input_t, *phwrm_dbg_useq_free_input_t;
65859 
65860 /* hwrm_dbg_useq_free_output (size:256b/32B) */
65861 
65862 typedef struct hwrm_dbg_useq_free_output {
65863 	/* The specific error status for the command. */
65864 	uint16_t	error_code;
65865 	/* The HWRM command request type. */
65866 	uint16_t	req_type;
65867 	/* The sequence ID from the original command. */
65868 	uint16_t	seq_id;
65869 	/* The length of the response data in number of bytes. */
65870 	uint16_t	resp_len;
65871 	/* Non-zero firmware timestamp */
65872 	uint32_t	nz_fw_timestamp;
65873 	/* The last selected USID */
65874 	uint16_t	last_usid;
65875 	/* The number of USEQs currently allocated */
65876 	uint16_t	num_useq_allocd;
65877 	/* Flags indicating current USEQ engine state */
65878 	uint32_t	useq_resp_flags;
65879 	/* When set, there is at least some data available to be delivered */
65880 	#define HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
65881 	/* When set, all internal buffers are full */
65882 	#define HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
65883 	#define HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
65884 	/* Current count of the number of full buffers available for delivery */
65885 	uint8_t	full_cnt;
65886 	/* Reserved */
65887 	uint8_t	useq_resp_unused_0[3];
65888 	/* This field is reserved */
65889 	uint32_t	unused_0;
65890 	/*
65891 	 * This field is used in Output records to indicate that the output
65892 	 * is completely written to RAM. This field should be read as '1'
65893 	 * to indicate that the output has been completely written. When
65894 	 * writing a command completion or response to an internal processor,
65895 	 * the order of writes has to be such that this field is written last.
65896 	 */
65897 	uint32_t	valid;
65898 } hwrm_dbg_useq_free_output_t, *phwrm_dbg_useq_free_output_t;
65899 
65900 /***********************
65901  * hwrm_dbg_useq_flush *
65902  ***********************/
65903 
65904 
65905 /* hwrm_dbg_useq_flush_input (size:192b/24B) */
65906 
65907 typedef struct hwrm_dbg_useq_flush_input {
65908 	/* The HWRM command request type. */
65909 	uint16_t	req_type;
65910 	/*
65911 	 * The completion ring to send the completion event on. This should
65912 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65913 	 */
65914 	uint16_t	cmpl_ring;
65915 	/*
65916 	 * The sequence ID is used by the driver for tracking multiple
65917 	 * commands. This ID is treated as opaque data by the firmware and
65918 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65919 	 */
65920 	uint16_t	seq_id;
65921 	/*
65922 	 * The target ID of the command:
65923 	 * * 0x0-0xFFF8 - The function ID
65924 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65925 	 * * 0xFFFD - Reserved for user-space HWRM interface
65926 	 * * 0xFFFF - HWRM
65927 	 */
65928 	uint16_t	target_id;
65929 	/*
65930 	 * A physical address pointer pointing to a host buffer that the
65931 	 * command's response data will be written. This can be either a host
65932 	 * physical address (HPA) or a guest physical address (GPA) and must
65933 	 * point to a physically contiguous block of memory.
65934 	 */
65935 	uint64_t	resp_addr;
65936 	/* Bitwise flags described below */
65937 	uint16_t	flags;
65938 	/* Flush all USEQ code words, resetting all USIDs to invalid */
65939 	#define HWRM_DBG_USEQ_FLUSH_INPUT_USEQ_CODE_WORDS UINT32_C(0x1)
65940 	/* Initialize all buffers, clearing out any collected data */
65941 	#define HWRM_DBG_USEQ_FLUSH_INPUT_BUFFERS	UINT32_C(0x2)
65942 	#define HWRM_DBG_USEQ_FLUSH_INPUT_LAST	HWRM_DBG_USEQ_FLUSH_INPUT_BUFFERS
65943 	/* This field is reserved */
65944 	uint8_t	unused_0[6];
65945 } hwrm_dbg_useq_flush_input_t, *phwrm_dbg_useq_flush_input_t;
65946 
65947 /* hwrm_dbg_useq_flush_output (size:256b/32B) */
65948 
65949 typedef struct hwrm_dbg_useq_flush_output {
65950 	/* The specific error status for the command. */
65951 	uint16_t	error_code;
65952 	/* The HWRM command request type. */
65953 	uint16_t	req_type;
65954 	/* The sequence ID from the original command. */
65955 	uint16_t	seq_id;
65956 	/* The length of the response data in number of bytes. */
65957 	uint16_t	resp_len;
65958 	/* Non-zero firmware timestamp */
65959 	uint32_t	nz_fw_timestamp;
65960 	/* The last selected USID */
65961 	uint16_t	last_usid;
65962 	/* The number of USEQs currently allocated */
65963 	uint16_t	num_useq_allocd;
65964 	/* Flags indicating current USEQ engine state */
65965 	uint32_t	useq_resp_flags;
65966 	/* When set, there is at least some data available to be delivered */
65967 	#define HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
65968 	/* When set, all internal buffers are full */
65969 	#define HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
65970 	#define HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
65971 	/* Current count of the number of full buffers available for delivery */
65972 	uint8_t	full_cnt;
65973 	/* Reserved */
65974 	uint8_t	useq_resp_unused_0[3];
65975 	/* This field is reserved */
65976 	uint32_t	unused_0;
65977 	/*
65978 	 * This field is used in Output records to indicate that the output
65979 	 * is completely written to RAM. This field should be read as '1'
65980 	 * to indicate that the output has been completely written. When
65981 	 * writing a command completion or response to an internal processor,
65982 	 * the order of writes has to be such that this field is written last.
65983 	 */
65984 	uint32_t	valid;
65985 } hwrm_dbg_useq_flush_output_t, *phwrm_dbg_useq_flush_output_t;
65986 
65987 /************************
65988  * hwrm_dbg_useq_cw_cfg *
65989  ************************/
65990 
65991 
65992 /* hwrm_dbg_useq_cw_cfg_input (size:960b/120B) */
65993 
65994 typedef struct hwrm_dbg_useq_cw_cfg_input {
65995 	/* The HWRM command request type. */
65996 	uint16_t	req_type;
65997 	/*
65998 	 * The completion ring to send the completion event on. This should
65999 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66000 	 */
66001 	uint16_t	cmpl_ring;
66002 	/*
66003 	 * The sequence ID is used by the driver for tracking multiple
66004 	 * commands. This ID is treated as opaque data by the firmware and
66005 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66006 	 */
66007 	uint16_t	seq_id;
66008 	/*
66009 	 * The target ID of the command:
66010 	 * * 0x0-0xFFF8 - The function ID
66011 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66012 	 * * 0xFFFD - Reserved for user-space HWRM interface
66013 	 * * 0xFFFF - HWRM
66014 	 */
66015 	uint16_t	target_id;
66016 	/*
66017 	 * A physical address pointer pointing to a host buffer that the
66018 	 * command's response data will be written. This can be either a host
66019 	 * physical address (HPA) or a guest physical address (GPA) and must
66020 	 * point to a physically contiguous block of memory.
66021 	 */
66022 	uint64_t	resp_addr;
66023 	/* The USID of the sequence being configured */
66024 	uint16_t	usid;
66025 	/*
66026 	 * The code words given in this message will be placed
66027 	 * at this offset from the starting code word for this
66028 	 * usid. NOTE: when offset is zero, the first 6 32-bit
66029 	 * words may contain values for F0-F7 as well as the
66030 	 * main code word index. This is determined by checking
66031 	 * the usid_ctrl_present flag.
66032 	 */
66033 	uint16_t	offset;
66034 	/*
66035 	 * When the use_dma flag is clear, this is the length in bytes
66036 	 * to be digested from the opaque data area.
66037 	 */
66038 	uint16_t	size;
66039 	/*
66040 	 * Flags associated with the current message
66041 	 * data area.
66042 	 */
66043 	uint16_t	flags;
66044 	/*
66045 	 * When set, the opaque data begins with a block of control
66046 	 * information to be associated with the usid. This includes
66047 	 * F0-F7 code word indexes as well as the code word index for
66048 	 * main.
66049 	 */
66050 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_USID_CTRL_PRESENT UINT32_C(0x1)
66051 	/*
66052 	 * When set, opaque contains a 64b host address used to DMA
66053 	 * the entire code word sequence. The offset within the
66054 	 * opaque data depends on the state of other flags.
66055 	 */
66056 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_USE_DMA	UINT32_C(0x2)
66057 	/*
66058 	 * When set, this message is the last configuration message
66059 	 * for the given usid.
66060 	 */
66061 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_END		UINT32_C(0x8000)
66062 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_LAST		HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_END
66063 	/* command dependent data (e.g. function id for host dma command) */
66064 	uint32_t	opaque[24];
66065 } hwrm_dbg_useq_cw_cfg_input_t, *phwrm_dbg_useq_cw_cfg_input_t;
66066 
66067 /* hwrm_dbg_useq_cw_cfg_output (size:192b/24B) */
66068 
66069 typedef struct hwrm_dbg_useq_cw_cfg_output {
66070 	/* The specific error status for the command. */
66071 	uint16_t	error_code;
66072 	/* The HWRM command request type. */
66073 	uint16_t	req_type;
66074 	/* The sequence ID from the original command. */
66075 	uint16_t	seq_id;
66076 	/* The length of the response data in number of bytes. */
66077 	uint16_t	resp_len;
66078 	/* Non-zero firmware timestamp */
66079 	uint32_t	nz_fw_timestamp;
66080 	/* The last selected USID */
66081 	uint16_t	last_usid;
66082 	/* The number of USEQs currently allocated */
66083 	uint16_t	num_useq_allocd;
66084 	/* Flags indicating current USEQ engine state */
66085 	uint32_t	useq_resp_flags;
66086 	/* When set, there is at least some data available to be delivered */
66087 	#define HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
66088 	/* When set, all internal buffers are full */
66089 	#define HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
66090 	#define HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
66091 	/* Current count of the number of full buffers available for delivery */
66092 	uint8_t	full_cnt;
66093 	/* Reserved */
66094 	uint8_t	useq_resp_unused_0[3];
66095 } hwrm_dbg_useq_cw_cfg_output_t, *phwrm_dbg_useq_cw_cfg_output_t;
66096 
66097 /***********************
66098  * hwrm_dbg_useq_qcaps *
66099  ***********************/
66100 
66101 
66102 /* hwrm_dbg_useq_qcaps_input (size:128b/16B) */
66103 
66104 typedef struct hwrm_dbg_useq_qcaps_input {
66105 	/* The HWRM command request type. */
66106 	uint16_t	req_type;
66107 	/*
66108 	 * The completion ring to send the completion event on. This should
66109 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66110 	 */
66111 	uint16_t	cmpl_ring;
66112 	/*
66113 	 * The sequence ID is used by the driver for tracking multiple
66114 	 * commands. This ID is treated as opaque data by the firmware and
66115 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66116 	 */
66117 	uint16_t	seq_id;
66118 	/*
66119 	 * The target ID of the command:
66120 	 * * 0x0-0xFFF8 - The function ID
66121 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66122 	 * * 0xFFFD - Reserved for user-space HWRM interface
66123 	 * * 0xFFFF - HWRM
66124 	 */
66125 	uint16_t	target_id;
66126 	/*
66127 	 * A physical address pointer pointing to a host buffer that the
66128 	 * command's response data will be written. This can be either a host
66129 	 * physical address (HPA) or a guest physical address (GPA) and must
66130 	 * point to a physically contiguous block of memory.
66131 	 */
66132 	uint64_t	resp_addr;
66133 } hwrm_dbg_useq_qcaps_input_t, *phwrm_dbg_useq_qcaps_input_t;
66134 
66135 /* hwrm_dbg_useq_qcaps_output (size:384b/48B) */
66136 
66137 typedef struct hwrm_dbg_useq_qcaps_output {
66138 	/* The specific error status for the command. */
66139 	uint16_t	error_code;
66140 	/* The HWRM command request type. */
66141 	uint16_t	req_type;
66142 	/* The sequence ID from the original command. */
66143 	uint16_t	seq_id;
66144 	/* The length of the response data in number of bytes. */
66145 	uint16_t	resp_len;
66146 	/* Non-zero firmware timestamp */
66147 	uint32_t	nz_fw_timestamp;
66148 	/* The last selected USID */
66149 	uint16_t	last_usid;
66150 	/* The number of USEQs currently allocated */
66151 	uint16_t	num_useq_allocd;
66152 	/* Flags indicating current USEQ engine state */
66153 	uint32_t	useq_resp_flags;
66154 	/* When set, there is at least some data available to be delivered */
66155 	#define HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
66156 	/* When set, all internal buffers are full */
66157 	#define HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
66158 	#define HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
66159 	/* Current count of the number of full buffers available for delivery */
66160 	uint8_t	full_cnt;
66161 	/* Reserved */
66162 	uint8_t	useq_resp_unused_0[3];
66163 	/* Maximum number of USEQ that can be tracked by firmware */
66164 	uint32_t	max_num_useq;
66165 	/* Maximum number of code word bytes for a single USEQ */
66166 	uint32_t	max_useq_size;
66167 	/* The maximum number of output bytes a single USEQ may generate */
66168 	uint32_t	max_useq_32b_output_size;
66169 	/* The number of internal USEQ output buffers, each of 4096 bytes */
66170 	uint32_t	num_buf;
66171 	/* This field is reserved */
66172 	uint32_t	unused_0;
66173 	/*
66174 	 * This field is used in Output records to indicate that the output
66175 	 * is completely written to RAM. This field should be read as '1'
66176 	 * to indicate that the output has been completely written. When
66177 	 * writing a command completion or response to an internal processor,
66178 	 * the order of writes has to be such that this field is written last.
66179 	 */
66180 	uint32_t	valid;
66181 } hwrm_dbg_useq_qcaps_output_t, *phwrm_dbg_useq_qcaps_output_t;
66182 
66183 /***************************
66184  * hwrm_dbg_useq_sched_cfg *
66185  ***************************/
66186 
66187 
66188 /* hwrm_dbg_useq_sched_cfg_input (size:192b/24B) */
66189 
66190 typedef struct hwrm_dbg_useq_sched_cfg_input {
66191 	/* The HWRM command request type. */
66192 	uint16_t	req_type;
66193 	/*
66194 	 * The completion ring to send the completion event on. This should
66195 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66196 	 */
66197 	uint16_t	cmpl_ring;
66198 	/*
66199 	 * The sequence ID is used by the driver for tracking multiple
66200 	 * commands. This ID is treated as opaque data by the firmware and
66201 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66202 	 */
66203 	uint16_t	seq_id;
66204 	/*
66205 	 * The target ID of the command:
66206 	 * * 0x0-0xFFF8 - The function ID
66207 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66208 	 * * 0xFFFD - Reserved for user-space HWRM interface
66209 	 * * 0xFFFF - HWRM
66210 	 */
66211 	uint16_t	target_id;
66212 	/*
66213 	 * A physical address pointer pointing to a host buffer that the
66214 	 * command's response data will be written. This can be either a host
66215 	 * physical address (HPA) or a guest physical address (GPA) and must
66216 	 * point to a physically contiguous block of memory.
66217 	 */
66218 	uint64_t	resp_addr;
66219 	/* Enumeration values for enabling, disabling scheduler */
66220 	uint16_t	global_cfg;
66221 	/* This value will leave the global scheduler in its current state */
66222 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_NO_CHANGE UINT32_C(0x0)
66223 	/*
66224 	 * This value disables the global scheduler. This mode must be used
66225 	 * when the RUN command is being used to run individual sequences.
66226 	 */
66227 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_DISABLE   UINT32_C(0x1)
66228 	/*
66229 	 * This value enables the global scheduler. When enabled, USEQs will
66230 	 * be scheduled based on their polling intervals
66231 	 */
66232 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_ENABLE	UINT32_C(0x2)
66233 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_LAST	HWRM_DBG_USEQ_SCHED_CFG_INPUT_ENABLE
66234 	/*
66235 	 * The given polling interval will be associated with this USID. A
66236 	 * value of -1 indicates that the USID is invalid. The invalid USID is
66237 	 * used when using this message only for global scheduler
66238 	 * configuration.
66239 	 */
66240 	uint16_t	usid;
66241 	/* This value represents microseconds between runs of the USEQ */
66242 	uint32_t	polling_interval;
66243 } hwrm_dbg_useq_sched_cfg_input_t, *phwrm_dbg_useq_sched_cfg_input_t;
66244 
66245 /* hwrm_dbg_useq_sched_cfg_output (size:256b/32B) */
66246 
66247 typedef struct hwrm_dbg_useq_sched_cfg_output {
66248 	/* The specific error status for the command. */
66249 	uint16_t	error_code;
66250 	/* The HWRM command request type. */
66251 	uint16_t	req_type;
66252 	/* The sequence ID from the original command. */
66253 	uint16_t	seq_id;
66254 	/* The length of the response data in number of bytes. */
66255 	uint16_t	resp_len;
66256 	/* Non-zero firmware timestamp */
66257 	uint32_t	nz_fw_timestamp;
66258 	/* The last selected USID */
66259 	uint16_t	last_usid;
66260 	/* The number of USEQs currently allocated */
66261 	uint16_t	num_useq_allocd;
66262 	/* Flags indicating current USEQ engine state */
66263 	uint32_t	useq_resp_flags;
66264 	/* When set, there is at least some data available to be delivered */
66265 	#define HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
66266 	/* When set, all internal buffers are full */
66267 	#define HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
66268 	#define HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
66269 	/* Current count of the number of full buffers available for delivery */
66270 	uint8_t	full_cnt;
66271 	/* Reserved */
66272 	uint8_t	useq_resp_unused_0[3];
66273 	/* This field is reserved */
66274 	uint32_t	unused_0;
66275 	/*
66276 	 * This field is used in Output records to indicate that the output
66277 	 * is completely written to RAM. This field should be read as '1'
66278 	 * to indicate that the output has been completely written. When
66279 	 * writing a command completion or response to an internal processor,
66280 	 * the order of writes has to be such that this field is written last.
66281 	 */
66282 	uint32_t	valid;
66283 } hwrm_dbg_useq_sched_cfg_output_t, *phwrm_dbg_useq_sched_cfg_output_t;
66284 
66285 /*********************
66286  * hwrm_dbg_useq_run *
66287  *********************/
66288 
66289 
66290 /* hwrm_dbg_useq_run_input (size:320b/40B) */
66291 
66292 typedef struct hwrm_dbg_useq_run_input {
66293 	/* The HWRM command request type. */
66294 	uint16_t	req_type;
66295 	/*
66296 	 * The completion ring to send the completion event on. This should
66297 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66298 	 */
66299 	uint16_t	cmpl_ring;
66300 	/*
66301 	 * The sequence ID is used by the driver for tracking multiple
66302 	 * commands. This ID is treated as opaque data by the firmware and
66303 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66304 	 */
66305 	uint16_t	seq_id;
66306 	/*
66307 	 * The target ID of the command:
66308 	 * * 0x0-0xFFF8 - The function ID
66309 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66310 	 * * 0xFFFD - Reserved for user-space HWRM interface
66311 	 * * 0xFFFF - HWRM
66312 	 */
66313 	uint16_t	target_id;
66314 	/*
66315 	 * A physical address pointer pointing to a host buffer that the
66316 	 * command's response data will be written. This can be either a host
66317 	 * physical address (HPA) or a guest physical address (GPA) and must
66318 	 * point to a physically contiguous block of memory.
66319 	 */
66320 	uint64_t	resp_addr;
66321 	/* The USID to be run */
66322 	uint16_t	usid;
66323 	/* Type of run to execute for the given USID */
66324 	uint8_t	run_type;
66325 	/* This run type will execute the requested USEQ only a single time */
66326 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_SINGLE   UINT32_C(0x0)
66327 	/*
66328 	 * This run type will execute the requested USEQ a number of times
66329 	 * given by run_cnt with a run interval given by the run_interval
66330 	 * parameter.
66331 	 */
66332 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_CNT	UINT32_C(0x1)
66333 	/*
66334 	 * This run type will execute the requested USEQ as many times as it
66335 	 * needs to fill an entire buffer to return to the host. The runs
66336 	 * will occur with a run interval given by the run_interval
66337 	 * parameter.
66338 	 */
66339 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_FILL_BUF UINT32_C(0x2)
66340 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_LAST	HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_FILL_BUF
66341 	/*
66342 	 * If indicated by flags, this represents the number of times to run
66343 	 * the USEQ. Note that runs are stopped if the buffer fills prior
66344 	 * regardless of the number of runs. For example, if a run_cnt of 10 is
66345 	 * specified and 3 runs results in the buffer being full then only 3
66346 	 * runs are executed.
66347 	 */
66348 	uint8_t	run_cnt;
66349 	/*
66350 	 * This value represents microseconds between runs of the USEQ when
66351 	 * running multiple times as indicated by flags.
66352 	 */
66353 	uint32_t	run_interval;
66354 	/*
66355 	 * Address of the host buffer where collected USEQ output data will be
66356 	 * placed
66357 	 */
66358 	uint64_t	host_dest_addr;
66359 	/*
66360 	 * Size, in bytes, of the memory associated with host_dest_addr. It is
66361 	 * expected that this is >= 4096
66362 	 */
66363 	uint32_t	host_dest_len;
66364 	/* This field is reserved */
66365 	uint32_t	unused_0;
66366 } hwrm_dbg_useq_run_input_t, *phwrm_dbg_useq_run_input_t;
66367 
66368 /* hwrm_dbg_useq_run_output (size:256b/32B) */
66369 
66370 typedef struct hwrm_dbg_useq_run_output {
66371 	/* The specific error status for the command. */
66372 	uint16_t	error_code;
66373 	/* The HWRM command request type. */
66374 	uint16_t	req_type;
66375 	/* The sequence ID from the original command. */
66376 	uint16_t	seq_id;
66377 	/* The length of the response data in number of bytes. */
66378 	uint16_t	resp_len;
66379 	/* Non-zero firmware timestamp */
66380 	uint32_t	nz_fw_timestamp;
66381 	/* The last selected USID */
66382 	uint16_t	last_usid;
66383 	/* The number of USEQs currently allocated */
66384 	uint16_t	num_useq_allocd;
66385 	/* Flags indicating current USEQ engine state */
66386 	uint32_t	useq_resp_flags;
66387 	/* When set, there is at least some data available to be delivered */
66388 	#define HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
66389 	/* When set, all internal buffers are full */
66390 	#define HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
66391 	#define HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
66392 	/* Current count of the number of full buffers available for delivery */
66393 	uint8_t	full_cnt;
66394 	/* Reserved */
66395 	uint8_t	useq_resp_unused_0[3];
66396 	/*
66397 	 * The length, in bytes, of the amount of data placed in the
66398 	 * corresponding host_dest_addr given in the input message. This will
66399 	 * always be a multiple of 4096
66400 	 */
66401 	uint32_t	host_dest_filled_len;
66402 	/*
66403 	 * This field is used in Output records to indicate that the output
66404 	 * is completely written to RAM. This field should be read as '1'
66405 	 * to indicate that the output has been completely written. When
66406 	 * writing a command completion or response to an internal processor,
66407 	 * the order of writes has to be such that this field is written last.
66408 	 */
66409 	uint32_t	valid;
66410 } hwrm_dbg_useq_run_output_t, *phwrm_dbg_useq_run_output_t;
66411 
66412 /******************************
66413  * hwrm_dbg_useq_delivery_req *
66414  ******************************/
66415 
66416 
66417 /* hwrm_dbg_useq_delivery_req_input (size:896b/112B) */
66418 
66419 typedef struct hwrm_dbg_useq_delivery_req_input {
66420 	/* The HWRM command request type. */
66421 	uint16_t	req_type;
66422 	/*
66423 	 * The completion ring to send the completion event on. This should
66424 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66425 	 */
66426 	uint16_t	cmpl_ring;
66427 	/*
66428 	 * The sequence ID is used by the driver for tracking multiple
66429 	 * commands. This ID is treated as opaque data by the firmware and
66430 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66431 	 */
66432 	uint16_t	seq_id;
66433 	/*
66434 	 * The target ID of the command:
66435 	 * * 0x0-0xFFF8 - The function ID
66436 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66437 	 * * 0xFFFD - Reserved for user-space HWRM interface
66438 	 * * 0xFFFF - HWRM
66439 	 */
66440 	uint16_t	target_id;
66441 	/*
66442 	 * A physical address pointer pointing to a host buffer that the
66443 	 * command's response data will be written. This can be either a host
66444 	 * physical address (HPA) or a guest physical address (GPA) and must
66445 	 * point to a physically contiguous block of memory.
66446 	 */
66447 	uint64_t	resp_addr;
66448 	/*
66449 	 * Eight destination addresses provide host memory space for FW to
66450 	 * deliver USEQ output details. A value of 0x0 for the address can be
66451 	 * used to inform FW that the buffer is not available.
66452 	 */
66453 	uint64_t	host_dest_addrs[8];
66454 	/*
66455 	 * The length, in bytes, of the corresponding host_dest_addrs array
66456 	 * entry. Each valid hist_dest_addrs entry must have a len of at least
66457 	 * 4096 bytes.
66458 	 */
66459 	uint32_t	host_dest_len[8];
66460 } hwrm_dbg_useq_delivery_req_input_t, *phwrm_dbg_useq_delivery_req_input_t;
66461 
66462 /* hwrm_dbg_useq_delivery_req_output (size:512b/64B) */
66463 
66464 typedef struct hwrm_dbg_useq_delivery_req_output {
66465 	/* The specific error status for the command. */
66466 	uint16_t	error_code;
66467 	/* The HWRM command request type. */
66468 	uint16_t	req_type;
66469 	/* The sequence ID from the original command. */
66470 	uint16_t	seq_id;
66471 	/* The length of the response data in number of bytes. */
66472 	uint16_t	resp_len;
66473 	/* Non-zero firmware timestamp */
66474 	uint32_t	nz_fw_timestamp;
66475 	/* The last selected USID */
66476 	uint16_t	last_usid;
66477 	/* The number of USEQs currently allocated */
66478 	uint16_t	num_useq_allocd;
66479 	/* Flags indicating current USEQ engine state */
66480 	uint32_t	useq_resp_flags;
66481 	/* When set, there is at least some data available to be delivered */
66482 	#define HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL	UINT32_C(0x1)
66483 	/* When set, all internal buffers are full */
66484 	#define HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW UINT32_C(0x2)
66485 	#define HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST	HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
66486 	/* Current count of the number of full buffers available for delivery */
66487 	uint8_t	full_cnt;
66488 	/* Reserved */
66489 	uint8_t	useq_resp_unused_0[3];
66490 	/*
66491 	 * The length, in bytes, of the amount of data placed in the
66492 	 * corresponding host_dest_addrs entry given in the input message. This
66493 	 * will always be a multiple of 4096.
66494 	 */
66495 	uint32_t	host_dest_filled_len[8];
66496 	/* This field is reserved */
66497 	uint32_t	unused_0;
66498 	/*
66499 	 * This field is used in Output records to indicate that the output
66500 	 * is completely written to RAM. This field should be read as '1'
66501 	 * to indicate that the output has been completely written. When
66502 	 * writing a command completion or response to an internal processor,
66503 	 * the order of writes has to be such that this field is written last.
66504 	 */
66505 	uint32_t	valid;
66506 } hwrm_dbg_useq_delivery_req_output_t, *phwrm_dbg_useq_delivery_req_output_t;
66507 
66508 /*****************************
66509  * hwrm_dbg_log_buffer_flush *
66510  *****************************/
66511 
66512 
66513 /* hwrm_dbg_log_buffer_flush_input (size:192b/24B) */
66514 
66515 typedef struct hwrm_dbg_log_buffer_flush_input {
66516 	/* The HWRM command request type. */
66517 	uint16_t	req_type;
66518 	/*
66519 	 * The completion ring to send the completion event on. This should
66520 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66521 	 */
66522 	uint16_t	cmpl_ring;
66523 	/*
66524 	 * The sequence ID is used by the driver for tracking multiple
66525 	 * commands. This ID is treated as opaque data by the firmware and
66526 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66527 	 */
66528 	uint16_t	seq_id;
66529 	/*
66530 	 * The target ID of the command:
66531 	 * * 0x0-0xFFF8 - The function ID
66532 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66533 	 * * 0xFFFD - Reserved for user-space HWRM interface
66534 	 * * 0xFFFF - HWRM
66535 	 */
66536 	uint16_t	target_id;
66537 	/*
66538 	 * A physical address pointer pointing to a host buffer that the
66539 	 * command's response data will be written. This can be either a host
66540 	 * physical address (HPA) or a guest physical address (GPA) and must
66541 	 * point to a physically contiguous block of memory.
66542 	 */
66543 	uint64_t	resp_addr;
66544 	/* Type of trace buffer to flush. */
66545 	uint16_t	type;
66546 	/* SRT trace. */
66547 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_SRT_TRACE	UINT32_C(0x0)
66548 	/* SRT2 trace. */
66549 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_SRT2_TRACE	UINT32_C(0x1)
66550 	/* CRT trace. */
66551 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_CRT_TRACE	UINT32_C(0x2)
66552 	/* CRT2 trace. */
66553 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_CRT2_TRACE	UINT32_C(0x3)
66554 	/* RIGP0 trace. */
66555 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_RIGP0_TRACE	UINT32_C(0x4)
66556 	/* L2 HWRM trace. */
66557 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_L2_HWRM_TRACE   UINT32_C(0x5)
66558 	/* RoCE HWRM trace. */
66559 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_ROCE_HWRM_TRACE UINT32_C(0x6)
66560 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_LAST	HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_ROCE_HWRM_TRACE
66561 	uint8_t	unused_1[2];
66562 	/* Control flags. */
66563 	uint32_t	flags;
66564 	/*
66565 	 * When set, it indicates that all buffers should be flushed.
66566 	 * The type will be ignored.
66567 	 */
66568 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_FLAGS_FLUSH_ALL_BUFFERS	UINT32_C(0x1)
66569 } hwrm_dbg_log_buffer_flush_input_t, *phwrm_dbg_log_buffer_flush_input_t;
66570 
66571 /* hwrm_dbg_log_buffer_flush_output (size:128b/16B) */
66572 
66573 typedef struct hwrm_dbg_log_buffer_flush_output {
66574 	/* The specific error status for the command. */
66575 	uint16_t	error_code;
66576 	/* The HWRM command request type. */
66577 	uint16_t	req_type;
66578 	/* The sequence ID from the original command. */
66579 	uint16_t	seq_id;
66580 	/* The length of the response data in number of bytes. */
66581 	uint16_t	resp_len;
66582 	/*
66583 	 * Specifies the current host buffer offset. Data up to this offset
66584 	 * has been populated by the firmware. For example, if the firmware
66585 	 * has DMA-ed 8192 bytes to the host buffer, then this field has a
66586 	 * value of 8192. This field rolls over to zero once the firmware
66587 	 * writes the last page of the host buffer
66588 	 */
66589 	uint32_t	current_buffer_offset;
66590 	uint8_t	unused_1[3];
66591 	/*
66592 	 * This field is used in Output records to indicate that the output
66593 	 * is completely written to RAM. This field should be read as '1'
66594 	 * to indicate that the output has been completely written. When
66595 	 * writing a command completion or response to an internal processor,
66596 	 * the order of writes has to be such that this field is written last.
66597 	 */
66598 	uint8_t	valid;
66599 } hwrm_dbg_log_buffer_flush_output_t, *phwrm_dbg_log_buffer_flush_output_t;
66600 
66601 /**************************
66602  * hwrm_nvm_raw_write_blk *
66603  **************************/
66604 
66605 
66606 /* hwrm_nvm_raw_write_blk_input (size:320b/40B) */
66607 
66608 typedef struct hwrm_nvm_raw_write_blk_input {
66609 	/* The HWRM command request type. */
66610 	uint16_t	req_type;
66611 	/*
66612 	 * The completion ring to send the completion event on. This should
66613 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66614 	 */
66615 	uint16_t	cmpl_ring;
66616 	/*
66617 	 * The sequence ID is used by the driver for tracking multiple
66618 	 * commands. This ID is treated as opaque data by the firmware and
66619 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66620 	 */
66621 	uint16_t	seq_id;
66622 	/*
66623 	 * The target ID of the command:
66624 	 * * 0x0-0xFFF8 - The function ID
66625 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66626 	 * * 0xFFFD - Reserved for user-space HWRM interface
66627 	 * * 0xFFFF - HWRM
66628 	 */
66629 	uint16_t	target_id;
66630 	/*
66631 	 * A physical address pointer pointing to a host buffer that the
66632 	 * command's response data will be written. This can be either a host
66633 	 * physical address (HPA) or a guest physical address (GPA) and must
66634 	 * point to a physically contiguous block of memory.
66635 	 */
66636 	uint64_t	resp_addr;
66637 	/*
66638 	 * 64-bit Host Source Address.
66639 	 * This is the location of the source data to be written.
66640 	 */
66641 	uint64_t	host_src_addr;
66642 	/*
66643 	 * 32-bit Destination Address.
66644 	 * This is the NVRAM byte-offset where the source data will be written
66645 	 * to.
66646 	 */
66647 	uint32_t	dest_addr;
66648 	/* Length of data to be written, in bytes. */
66649 	uint32_t	len;
66650 	uint8_t	flags;
66651 	/*
66652 	 * This bit is only used when external secure SoC is used for
66653 	 * secure boot. This bit is utilized to differentiate between
66654 	 * writes for NIC or Security SoC non-volatile storage on the
66655 	 * device. If this bit is set, then this write is for the
66656 	 * Security SoC non-volatile storage on the device.
66657 	 */
66658 	#define HWRM_NVM_RAW_WRITE_BLK_INPUT_FLAGS_SECURITY_SOC_NVM	UINT32_C(0x1)
66659 	uint8_t	unused_0[7];
66660 } hwrm_nvm_raw_write_blk_input_t, *phwrm_nvm_raw_write_blk_input_t;
66661 
66662 /* hwrm_nvm_raw_write_blk_output (size:128b/16B) */
66663 
66664 typedef struct hwrm_nvm_raw_write_blk_output {
66665 	/* The specific error status for the command. */
66666 	uint16_t	error_code;
66667 	/* The HWRM command request type. */
66668 	uint16_t	req_type;
66669 	/* The sequence ID from the original command. */
66670 	uint16_t	seq_id;
66671 	/* The length of the response data in number of bytes. */
66672 	uint16_t	resp_len;
66673 	uint8_t	unused_0[7];
66674 	/*
66675 	 * This field is used in Output records to indicate that the output
66676 	 * is completely written to RAM. This field should be read as '1'
66677 	 * to indicate that the output has been completely written. When
66678 	 * writing a command completion or response to an internal processor,
66679 	 * the order of writes has to be such that this field is written last.
66680 	 */
66681 	uint8_t	valid;
66682 } hwrm_nvm_raw_write_blk_output_t, *phwrm_nvm_raw_write_blk_output_t;
66683 
66684 /*****************
66685  * hwrm_nvm_read *
66686  *****************/
66687 
66688 
66689 /* hwrm_nvm_read_input (size:320b/40B) */
66690 
66691 typedef struct hwrm_nvm_read_input {
66692 	/* The HWRM command request type. */
66693 	uint16_t	req_type;
66694 	/*
66695 	 * The completion ring to send the completion event on. This should
66696 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66697 	 */
66698 	uint16_t	cmpl_ring;
66699 	/*
66700 	 * The sequence ID is used by the driver for tracking multiple
66701 	 * commands. This ID is treated as opaque data by the firmware and
66702 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66703 	 */
66704 	uint16_t	seq_id;
66705 	/*
66706 	 * The target ID of the command:
66707 	 * * 0x0-0xFFF8 - The function ID
66708 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66709 	 * * 0xFFFD - Reserved for user-space HWRM interface
66710 	 * * 0xFFFF - HWRM
66711 	 */
66712 	uint16_t	target_id;
66713 	/*
66714 	 * A physical address pointer pointing to a host buffer that the
66715 	 * command's response data will be written. This can be either a host
66716 	 * physical address (HPA) or a guest physical address (GPA) and must
66717 	 * point to a physically contiguous block of memory.
66718 	 */
66719 	uint64_t	resp_addr;
66720 	/*
66721 	 * 64-bit Host Destination Address.
66722 	 * This is the host address where the data will be written to.
66723 	 */
66724 	uint64_t	host_dest_addr;
66725 	/* The 0-based index of the directory entry. */
66726 	uint16_t	dir_idx;
66727 	uint8_t	unused_0[2];
66728 	/* The NVRAM byte-offset to read from. */
66729 	uint32_t	offset;
66730 	/* The length of the data to be read, in bytes. */
66731 	uint32_t	len;
66732 	uint8_t	unused_1[4];
66733 } hwrm_nvm_read_input_t, *phwrm_nvm_read_input_t;
66734 
66735 /* hwrm_nvm_read_output (size:128b/16B) */
66736 
66737 typedef struct hwrm_nvm_read_output {
66738 	/* The specific error status for the command. */
66739 	uint16_t	error_code;
66740 	/* The HWRM command request type. */
66741 	uint16_t	req_type;
66742 	/* The sequence ID from the original command. */
66743 	uint16_t	seq_id;
66744 	/* The length of the response data in number of bytes. */
66745 	uint16_t	resp_len;
66746 	uint8_t	unused_0[7];
66747 	/*
66748 	 * This field is used in Output records to indicate that the output
66749 	 * is completely written to RAM. This field should be read as '1'
66750 	 * to indicate that the output has been completely written. When
66751 	 * writing a command completion or response to an internal processor,
66752 	 * the order of writes has to be such that this field is written last.
66753 	 */
66754 	uint8_t	valid;
66755 } hwrm_nvm_read_output_t, *phwrm_nvm_read_output_t;
66756 
66757 /*********************
66758  * hwrm_nvm_raw_dump *
66759  *********************/
66760 
66761 
66762 /* hwrm_nvm_raw_dump_input (size:320b/40B) */
66763 
66764 typedef struct hwrm_nvm_raw_dump_input {
66765 	/* The HWRM command request type. */
66766 	uint16_t	req_type;
66767 	/*
66768 	 * The completion ring to send the completion event on. This should
66769 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66770 	 */
66771 	uint16_t	cmpl_ring;
66772 	/*
66773 	 * The sequence ID is used by the driver for tracking multiple
66774 	 * commands. This ID is treated as opaque data by the firmware and
66775 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66776 	 */
66777 	uint16_t	seq_id;
66778 	/*
66779 	 * The target ID of the command:
66780 	 * * 0x0-0xFFF8 - The function ID
66781 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66782 	 * * 0xFFFD - Reserved for user-space HWRM interface
66783 	 * * 0xFFFF - HWRM
66784 	 */
66785 	uint16_t	target_id;
66786 	/*
66787 	 * A physical address pointer pointing to a host buffer that the
66788 	 * command's response data will be written. This can be either a host
66789 	 * physical address (HPA) or a guest physical address (GPA) and must
66790 	 * point to a physically contiguous block of memory.
66791 	 */
66792 	uint64_t	resp_addr;
66793 	/*
66794 	 * 64-bit Host Destination Address.
66795 	 * This is the host address where the data will be written to.
66796 	 */
66797 	uint64_t	host_dest_addr;
66798 	/* 32-bit NVRAM byte-offset to read from. */
66799 	uint32_t	offset;
66800 	/* Total length of NVRAM contents to be read, in bytes. */
66801 	uint32_t	len;
66802 	uint8_t	flags;
66803 	/*
66804 	 * This bit is only used when external secure SoC is used for
66805 	 * secure boot. This bit is utilized to differentiate between
66806 	 * read for NIC or Security SoC non-volatile storage on the
66807 	 * device. If this bit is set, then this read is for the Security
66808 	 * SoC non-volatile storage on the device.
66809 	 */
66810 	#define HWRM_NVM_RAW_DUMP_INPUT_FLAGS_SECURITY_SOC_NVM	UINT32_C(0x1)
66811 	uint8_t	unused_0[7];
66812 } hwrm_nvm_raw_dump_input_t, *phwrm_nvm_raw_dump_input_t;
66813 
66814 /* hwrm_nvm_raw_dump_output (size:128b/16B) */
66815 
66816 typedef struct hwrm_nvm_raw_dump_output {
66817 	/* The specific error status for the command. */
66818 	uint16_t	error_code;
66819 	/* The HWRM command request type. */
66820 	uint16_t	req_type;
66821 	/* The sequence ID from the original command. */
66822 	uint16_t	seq_id;
66823 	/* The length of the response data in number of bytes. */
66824 	uint16_t	resp_len;
66825 	uint8_t	unused_0[7];
66826 	/*
66827 	 * This field is used in Output records to indicate that the output
66828 	 * is completely written to RAM. This field should be read as '1'
66829 	 * to indicate that the output has been completely written. When
66830 	 * writing a command completion or response to an internal processor,
66831 	 * the order of writes has to be such that this field is written last.
66832 	 */
66833 	uint8_t	valid;
66834 } hwrm_nvm_raw_dump_output_t, *phwrm_nvm_raw_dump_output_t;
66835 
66836 /****************************
66837  * hwrm_nvm_get_dir_entries *
66838  ****************************/
66839 
66840 
66841 /* hwrm_nvm_get_dir_entries_input (size:192b/24B) */
66842 
66843 typedef struct hwrm_nvm_get_dir_entries_input {
66844 	/* The HWRM command request type. */
66845 	uint16_t	req_type;
66846 	/*
66847 	 * The completion ring to send the completion event on. This should
66848 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66849 	 */
66850 	uint16_t	cmpl_ring;
66851 	/*
66852 	 * The sequence ID is used by the driver for tracking multiple
66853 	 * commands. This ID is treated as opaque data by the firmware and
66854 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66855 	 */
66856 	uint16_t	seq_id;
66857 	/*
66858 	 * The target ID of the command:
66859 	 * * 0x0-0xFFF8 - The function ID
66860 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66861 	 * * 0xFFFD - Reserved for user-space HWRM interface
66862 	 * * 0xFFFF - HWRM
66863 	 */
66864 	uint16_t	target_id;
66865 	/*
66866 	 * A physical address pointer pointing to a host buffer that the
66867 	 * command's response data will be written. This can be either a host
66868 	 * physical address (HPA) or a guest physical address (GPA) and must
66869 	 * point to a physically contiguous block of memory.
66870 	 */
66871 	uint64_t	resp_addr;
66872 	/*
66873 	 * 64-bit Host Destination Address.
66874 	 * This is the host address where the directory will be written.
66875 	 */
66876 	uint64_t	host_dest_addr;
66877 } hwrm_nvm_get_dir_entries_input_t, *phwrm_nvm_get_dir_entries_input_t;
66878 
66879 /* hwrm_nvm_get_dir_entries_output (size:128b/16B) */
66880 
66881 typedef struct hwrm_nvm_get_dir_entries_output {
66882 	/* The specific error status for the command. */
66883 	uint16_t	error_code;
66884 	/* The HWRM command request type. */
66885 	uint16_t	req_type;
66886 	/* The sequence ID from the original command. */
66887 	uint16_t	seq_id;
66888 	/* The length of the response data in number of bytes. */
66889 	uint16_t	resp_len;
66890 	uint8_t	unused_0[7];
66891 	/*
66892 	 * This field is used in Output records to indicate that the output
66893 	 * is completely written to RAM. This field should be read as '1'
66894 	 * to indicate that the output has been completely written. When
66895 	 * writing a command completion or response to an internal processor,
66896 	 * the order of writes has to be such that this field is written last.
66897 	 */
66898 	uint8_t	valid;
66899 } hwrm_nvm_get_dir_entries_output_t, *phwrm_nvm_get_dir_entries_output_t;
66900 
66901 /*************************
66902  * hwrm_nvm_get_dir_info *
66903  *************************/
66904 
66905 
66906 /* hwrm_nvm_get_dir_info_input (size:128b/16B) */
66907 
66908 typedef struct hwrm_nvm_get_dir_info_input {
66909 	/* The HWRM command request type. */
66910 	uint16_t	req_type;
66911 	/*
66912 	 * The completion ring to send the completion event on. This should
66913 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66914 	 */
66915 	uint16_t	cmpl_ring;
66916 	/*
66917 	 * The sequence ID is used by the driver for tracking multiple
66918 	 * commands. This ID is treated as opaque data by the firmware and
66919 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66920 	 */
66921 	uint16_t	seq_id;
66922 	/*
66923 	 * The target ID of the command:
66924 	 * * 0x0-0xFFF8 - The function ID
66925 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66926 	 * * 0xFFFD - Reserved for user-space HWRM interface
66927 	 * * 0xFFFF - HWRM
66928 	 */
66929 	uint16_t	target_id;
66930 	/*
66931 	 * A physical address pointer pointing to a host buffer that the
66932 	 * command's response data will be written. This can be either a host
66933 	 * physical address (HPA) or a guest physical address (GPA) and must
66934 	 * point to a physically contiguous block of memory.
66935 	 */
66936 	uint64_t	resp_addr;
66937 } hwrm_nvm_get_dir_info_input_t, *phwrm_nvm_get_dir_info_input_t;
66938 
66939 /* hwrm_nvm_get_dir_info_output (size:192b/24B) */
66940 
66941 typedef struct hwrm_nvm_get_dir_info_output {
66942 	/* The specific error status for the command. */
66943 	uint16_t	error_code;
66944 	/* The HWRM command request type. */
66945 	uint16_t	req_type;
66946 	/* The sequence ID from the original command. */
66947 	uint16_t	seq_id;
66948 	/* The length of the response data in number of bytes. */
66949 	uint16_t	resp_len;
66950 	/* Number of directory entries in the directory. */
66951 	uint32_t	entries;
66952 	/* Size of each directory entry, in bytes. */
66953 	uint32_t	entry_length;
66954 	uint8_t	unused_0[7];
66955 	/*
66956 	 * This field is used in Output records to indicate that the output
66957 	 * is completely written to RAM. This field should be read as '1'
66958 	 * to indicate that the output has been completely written. When
66959 	 * writing a command completion or response to an internal processor,
66960 	 * the order of writes has to be such that this field is written last.
66961 	 */
66962 	uint8_t	valid;
66963 } hwrm_nvm_get_dir_info_output_t, *phwrm_nvm_get_dir_info_output_t;
66964 
66965 /******************
66966  * hwrm_nvm_write *
66967  ******************/
66968 
66969 
66970 /* hwrm_nvm_write_input (size:448b/56B) */
66971 
66972 typedef struct hwrm_nvm_write_input {
66973 	/* The HWRM command request type. */
66974 	uint16_t	req_type;
66975 	/*
66976 	 * The completion ring to send the completion event on. This should
66977 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66978 	 */
66979 	uint16_t	cmpl_ring;
66980 	/*
66981 	 * The sequence ID is used by the driver for tracking multiple
66982 	 * commands. This ID is treated as opaque data by the firmware and
66983 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66984 	 */
66985 	uint16_t	seq_id;
66986 	/*
66987 	 * The target ID of the command:
66988 	 * * 0x0-0xFFF8 - The function ID
66989 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66990 	 * * 0xFFFD - Reserved for user-space HWRM interface
66991 	 * * 0xFFFF - HWRM
66992 	 */
66993 	uint16_t	target_id;
66994 	/*
66995 	 * A physical address pointer pointing to a host buffer that the
66996 	 * command's response data will be written. This can be either a host
66997 	 * physical address (HPA) or a guest physical address (GPA) and must
66998 	 * point to a physically contiguous block of memory.
66999 	 */
67000 	uint64_t	resp_addr;
67001 	/*
67002 	 * 64-bit Host Source Address.
67003 	 * This is where the source data is.
67004 	 */
67005 	uint64_t	host_src_addr;
67006 	/*
67007 	 * The Directory Entry Type (valid values are defined in the
67008 	 * bnxnvm_directory_type enum defined in the file bnxnvm_defs.h).
67009 	 */
67010 	uint16_t	dir_type;
67011 	/*
67012 	 * Directory ordinal.
67013 	 * The 0-based instance of the combined Directory Entry Type and
67014 	 * Extension.
67015 	 */
67016 	uint16_t	dir_ordinal;
67017 	/*
67018 	 * The Directory Entry Extension flags (see BNX_DIR_EXT_* in the file
67019 	 * bnxnvm_defs.h).
67020 	 */
67021 	uint16_t	dir_ext;
67022 	/*
67023 	 * Directory Entry Attribute flags (see BNX_DIR_ATTR_* in the file
67024 	 * bnxnvm_defs.h).
67025 	 */
67026 	uint16_t	dir_attr;
67027 	/*
67028 	 * Length of data to write, in bytes. May be less than or equal to the
67029 	 * allocated size for the directory entry.
67030 	 * The data length stored in the directory entry will be updated to
67031 	 * reflect this value once the write is complete.
67032 	 */
67033 	uint32_t	dir_data_length;
67034 	/* Option. */
67035 	uint16_t	option;
67036 	uint16_t	flags;
67037 	/*
67038 	 * When this bit is '1', the original active image
67039 	 * will not be removed. TBD: what purpose is this?
67040 	 */
67041 	#define HWRM_NVM_WRITE_INPUT_FLAGS_KEEP_ORIG_ACTIVE_IMG	UINT32_C(0x1)
67042 	/*
67043 	 * This flag indicates the sender wants to modify a continuous
67044 	 * NVRAM area using a batch of this HWRM requests. The
67045 	 * offset of a request must be continuous to the end of previous
67046 	 * request's. Firmware does not update the directory entry until
67047 	 * receiving the last request, which is indicated by the batch_last
67048 	 * flag. This flag is set usually when a sender does not have a
67049 	 * block of memory that is big enough to hold the entire NVRAM
67050 	 * data for send at one time.
67051 	 */
67052 	#define HWRM_NVM_WRITE_INPUT_FLAGS_BATCH_MODE		UINT32_C(0x2)
67053 	/*
67054 	 * This flag can be used only when the batch_mode flag is set. It
67055 	 * indicates this request is the last of batch requests.
67056 	 */
67057 	#define HWRM_NVM_WRITE_INPUT_FLAGS_BATCH_LAST		UINT32_C(0x4)
67058 	/*
67059 	 * The requested length of the allocated NVM for the item, in bytes.
67060 	 * This value may be greater than or equal to the specified data
67061 	 * length (dir_data_length).
67062 	 * If this value is less than the specified data length, it will be
67063 	 * ignored. The response will contain the actual allocated item length,
67064 	 * which may be greater than the requested item length.
67065 	 * The purpose for allocating more than the required number of bytes
67066 	 * for an item's data is to pre-allocate extra storage (padding) to
67067 	 * accommodate the potential future growth of an item (e.g. upgraded
67068 	 * firmware with a size increase, log growth, expanded configuration
67069 	 * data).
67070 	 */
67071 	uint32_t	dir_item_length;
67072 	/*
67073 	 * 32-bit offset of data blob from where data is being written.
67074 	 * Only valid for batch mode. For non-batch writes 'dont care'.
67075 	 */
67076 	uint32_t	offset;
67077 	/*
67078 	 * Length of data to be written.Should be non-zero.
67079 	 * Only valid for batch mode. For non-batch writes 'dont care'.
67080 	 */
67081 	uint32_t	len;
67082 	uint32_t	unused_0;
67083 } hwrm_nvm_write_input_t, *phwrm_nvm_write_input_t;
67084 
67085 /* hwrm_nvm_write_output (size:128b/16B) */
67086 
67087 typedef struct hwrm_nvm_write_output {
67088 	/* The specific error status for the command. */
67089 	uint16_t	error_code;
67090 	/* The HWRM command request type. */
67091 	uint16_t	req_type;
67092 	/* The sequence ID from the original command. */
67093 	uint16_t	seq_id;
67094 	/* The length of the response data in number of bytes. */
67095 	uint16_t	resp_len;
67096 	/*
67097 	 * Length of the allocated NVM for the item, in bytes. The value may be
67098 	 * greater than or equal to the specified data length or the requested
67099 	 * item length.
67100 	 * The actual item length used when creating a new directory entry will
67101 	 * be a multiple of an NVM block size.
67102 	 */
67103 	uint32_t	dir_item_length;
67104 	/* The directory index of the created or modified item. */
67105 	uint16_t	dir_idx;
67106 	uint8_t	unused_0;
67107 	/*
67108 	 * This field is used in Output records to indicate that the output
67109 	 * is completely written to RAM. This field should be read as '1'
67110 	 * to indicate that the output has been completely written. When
67111 	 * writing a command completion or response to an internal processor,
67112 	 * the order of writes has to be such that this field is written last.
67113 	 */
67114 	uint8_t	valid;
67115 } hwrm_nvm_write_output_t, *phwrm_nvm_write_output_t;
67116 
67117 /* hwrm_nvm_write_cmd_err (size:64b/8B) */
67118 
67119 typedef struct hwrm_nvm_write_cmd_err {
67120 	/*
67121 	 * command specific error codes that goes to
67122 	 * the cmd_err field in Common HWRM Error Response.
67123 	 */
67124 	uint8_t	code;
67125 	/* Unknown error */
67126 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_UNKNOWN  UINT32_C(0x0)
67127 	/* Unable to complete operation due to fragmentation */
67128 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_FRAG_ERR UINT32_C(0x1)
67129 	/* nvm is completely full. */
67130 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE UINT32_C(0x2)
67131 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_LAST	HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE
67132 	uint8_t	unused_0[7];
67133 } hwrm_nvm_write_cmd_err_t, *phwrm_nvm_write_cmd_err_t;
67134 
67135 /*******************
67136  * hwrm_nvm_modify *
67137  *******************/
67138 
67139 
67140 /* hwrm_nvm_modify_input (size:320b/40B) */
67141 
67142 typedef struct hwrm_nvm_modify_input {
67143 	/* The HWRM command request type. */
67144 	uint16_t	req_type;
67145 	/*
67146 	 * The completion ring to send the completion event on. This should
67147 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67148 	 */
67149 	uint16_t	cmpl_ring;
67150 	/*
67151 	 * The sequence ID is used by the driver for tracking multiple
67152 	 * commands. This ID is treated as opaque data by the firmware and
67153 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67154 	 */
67155 	uint16_t	seq_id;
67156 	/*
67157 	 * The target ID of the command:
67158 	 * * 0x0-0xFFF8 - The function ID
67159 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67160 	 * * 0xFFFD - Reserved for user-space HWRM interface
67161 	 * * 0xFFFF - HWRM
67162 	 */
67163 	uint16_t	target_id;
67164 	/*
67165 	 * A physical address pointer pointing to a host buffer that the
67166 	 * command's response data will be written. This can be either a host
67167 	 * physical address (HPA) or a guest physical address (GPA) and must
67168 	 * point to a physically contiguous block of memory.
67169 	 */
67170 	uint64_t	resp_addr;
67171 	/*
67172 	 * 64-bit Host Source Address.
67173 	 * This is where the modified data is.
67174 	 */
67175 	uint64_t	host_src_addr;
67176 	/* 16-bit directory entry index. */
67177 	uint16_t	dir_idx;
67178 	uint16_t	flags;
67179 	/*
67180 	 * This flag indicates the sender wants to modify a continuous NVRAM
67181 	 * area using a batch of this HWRM requests. The offset of a request
67182 	 * must be continuous to the end of previous request's. Firmware does
67183 	 * not update the directory entry until receiving the last request,
67184 	 * which is indicated by the batch_last flag.
67185 	 * This flag is set usually when a sender does not have a block of
67186 	 * memory that is big enough to hold the entire NVRAM data for send
67187 	 * at one time.
67188 	 */
67189 	#define HWRM_NVM_MODIFY_INPUT_FLAGS_BATCH_MODE	UINT32_C(0x1)
67190 	/*
67191 	 * This flag can be used only when the batch_mode flag is set.
67192 	 * It indicates this request is the last of batch requests.
67193 	 */
67194 	#define HWRM_NVM_MODIFY_INPUT_FLAGS_BATCH_LAST	UINT32_C(0x2)
67195 	/* 32-bit NVRAM byte-offset to modify content from. */
67196 	uint32_t	offset;
67197 	/*
67198 	 * Length of data to be modified, in bytes. The length shall
67199 	 * be non-zero.
67200 	 */
67201 	uint32_t	len;
67202 	uint8_t	unused_1[4];
67203 } hwrm_nvm_modify_input_t, *phwrm_nvm_modify_input_t;
67204 
67205 /* hwrm_nvm_modify_output (size:128b/16B) */
67206 
67207 typedef struct hwrm_nvm_modify_output {
67208 	/* The specific error status for the command. */
67209 	uint16_t	error_code;
67210 	/* The HWRM command request type. */
67211 	uint16_t	req_type;
67212 	/* The sequence ID from the original command. */
67213 	uint16_t	seq_id;
67214 	/* The length of the response data in number of bytes. */
67215 	uint16_t	resp_len;
67216 	uint8_t	unused_0[7];
67217 	/*
67218 	 * This field is used in Output records to indicate that the output
67219 	 * is completely written to RAM. This field should be read as '1'
67220 	 * to indicate that the output has been completely written. When
67221 	 * writing a command completion or response to an internal processor,
67222 	 * the order of writes has to be such that this field is written last.
67223 	 */
67224 	uint8_t	valid;
67225 } hwrm_nvm_modify_output_t, *phwrm_nvm_modify_output_t;
67226 
67227 /***************************
67228  * hwrm_nvm_find_dir_entry *
67229  ***************************/
67230 
67231 
67232 /* hwrm_nvm_find_dir_entry_input (size:256b/32B) */
67233 
67234 typedef struct hwrm_nvm_find_dir_entry_input {
67235 	/* The HWRM command request type. */
67236 	uint16_t	req_type;
67237 	/*
67238 	 * The completion ring to send the completion event on. This should
67239 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67240 	 */
67241 	uint16_t	cmpl_ring;
67242 	/*
67243 	 * The sequence ID is used by the driver for tracking multiple
67244 	 * commands. This ID is treated as opaque data by the firmware and
67245 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67246 	 */
67247 	uint16_t	seq_id;
67248 	/*
67249 	 * The target ID of the command:
67250 	 * * 0x0-0xFFF8 - The function ID
67251 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67252 	 * * 0xFFFD - Reserved for user-space HWRM interface
67253 	 * * 0xFFFF - HWRM
67254 	 */
67255 	uint16_t	target_id;
67256 	/*
67257 	 * A physical address pointer pointing to a host buffer that the
67258 	 * command's response data will be written. This can be either a host
67259 	 * physical address (HPA) or a guest physical address (GPA) and must
67260 	 * point to a physically contiguous block of memory.
67261 	 */
67262 	uint64_t	resp_addr;
67263 	uint32_t	enables;
67264 	/*
67265 	 * This bit must be '1' for the dir_idx_valid field to be
67266 	 * configured.
67267 	 */
67268 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_ENABLES_DIR_IDX_VALID	UINT32_C(0x1)
67269 	/* Directory Entry Index */
67270 	uint16_t	dir_idx;
67271 	/* Directory Entry (Image) Type */
67272 	uint16_t	dir_type;
67273 	/*
67274 	 * Directory ordinal.
67275 	 * The instance of this Directory Type
67276 	 */
67277 	uint16_t	dir_ordinal;
67278 	/* The Directory Entry Extension flags. */
67279 	uint16_t	dir_ext;
67280 	/* This value indicates the search option using dir_ordinal. */
67281 	uint8_t	opt_ordinal;
67282 	/* This value indicates the search option using dir_ordinal. */
67283 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_MASK UINT32_C(0x3)
67284 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_SFT 0
67285 	/* Equal to specified ordinal value. */
67286 		#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_EQ	UINT32_C(0x0)
67287 	/* Greater than or equal to specified ordinal value */
67288 		#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GE	UINT32_C(0x1)
67289 	/* Greater than specified ordinal value */
67290 		#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT	UINT32_C(0x2)
67291 		#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_LAST HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT
67292 	uint8_t	unused_0[3];
67293 } hwrm_nvm_find_dir_entry_input_t, *phwrm_nvm_find_dir_entry_input_t;
67294 
67295 /* hwrm_nvm_find_dir_entry_output (size:256b/32B) */
67296 
67297 typedef struct hwrm_nvm_find_dir_entry_output {
67298 	/* The specific error status for the command. */
67299 	uint16_t	error_code;
67300 	/* The HWRM command request type. */
67301 	uint16_t	req_type;
67302 	/* The sequence ID from the original command. */
67303 	uint16_t	seq_id;
67304 	/* The length of the response data in number of bytes. */
67305 	uint16_t	resp_len;
67306 	/* Allocated NVRAM for this directory entry, in bytes. */
67307 	uint32_t	dir_item_length;
67308 	/* Size of the stored data for this directory entry, in bytes. */
67309 	uint32_t	dir_data_length;
67310 	/*
67311 	 * Firmware version.
67312 	 * Only valid if the directory entry is for embedded firmware stored
67313 	 * in APE_BIN Format.
67314 	 */
67315 	uint32_t	fw_ver;
67316 	/* Directory ordinal. */
67317 	uint16_t	dir_ordinal;
67318 	/* Directory Entry Index */
67319 	uint16_t	dir_idx;
67320 	uint8_t	unused_0[7];
67321 	/*
67322 	 * This field is used in Output records to indicate that the output
67323 	 * is completely written to RAM. This field should be read as '1'
67324 	 * to indicate that the output has been completely written. When
67325 	 * writing a command completion or response to an internal processor,
67326 	 * the order of writes has to be such that this field is written last.
67327 	 */
67328 	uint8_t	valid;
67329 } hwrm_nvm_find_dir_entry_output_t, *phwrm_nvm_find_dir_entry_output_t;
67330 
67331 /****************************
67332  * hwrm_nvm_erase_dir_entry *
67333  ****************************/
67334 
67335 
67336 /* hwrm_nvm_erase_dir_entry_input (size:192b/24B) */
67337 
67338 typedef struct hwrm_nvm_erase_dir_entry_input {
67339 	/* The HWRM command request type. */
67340 	uint16_t	req_type;
67341 	/*
67342 	 * The completion ring to send the completion event on. This should
67343 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67344 	 */
67345 	uint16_t	cmpl_ring;
67346 	/*
67347 	 * The sequence ID is used by the driver for tracking multiple
67348 	 * commands. This ID is treated as opaque data by the firmware and
67349 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67350 	 */
67351 	uint16_t	seq_id;
67352 	/*
67353 	 * The target ID of the command:
67354 	 * * 0x0-0xFFF8 - The function ID
67355 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67356 	 * * 0xFFFD - Reserved for user-space HWRM interface
67357 	 * * 0xFFFF - HWRM
67358 	 */
67359 	uint16_t	target_id;
67360 	/*
67361 	 * A physical address pointer pointing to a host buffer that the
67362 	 * command's response data will be written. This can be either a host
67363 	 * physical address (HPA) or a guest physical address (GPA) and must
67364 	 * point to a physically contiguous block of memory.
67365 	 */
67366 	uint64_t	resp_addr;
67367 	/* Directory Entry Index */
67368 	uint16_t	dir_idx;
67369 	uint8_t	unused_0[6];
67370 } hwrm_nvm_erase_dir_entry_input_t, *phwrm_nvm_erase_dir_entry_input_t;
67371 
67372 /* hwrm_nvm_erase_dir_entry_output (size:128b/16B) */
67373 
67374 typedef struct hwrm_nvm_erase_dir_entry_output {
67375 	/* The specific error status for the command. */
67376 	uint16_t	error_code;
67377 	/* The HWRM command request type. */
67378 	uint16_t	req_type;
67379 	/* The sequence ID from the original command. */
67380 	uint16_t	seq_id;
67381 	/* The length of the response data in number of bytes. */
67382 	uint16_t	resp_len;
67383 	uint8_t	unused_0[7];
67384 	/*
67385 	 * This field is used in Output records to indicate that the output
67386 	 * is completely written to RAM. This field should be read as '1'
67387 	 * to indicate that the output has been completely written. When
67388 	 * writing a command completion or response to an internal processor,
67389 	 * the order of writes has to be such that this field is written last.
67390 	 */
67391 	uint8_t	valid;
67392 } hwrm_nvm_erase_dir_entry_output_t, *phwrm_nvm_erase_dir_entry_output_t;
67393 
67394 /*************************
67395  * hwrm_nvm_get_dev_info *
67396  *************************/
67397 
67398 
67399 /* hwrm_nvm_get_dev_info_input (size:128b/16B) */
67400 
67401 typedef struct hwrm_nvm_get_dev_info_input {
67402 	/* The HWRM command request type. */
67403 	uint16_t	req_type;
67404 	/*
67405 	 * The completion ring to send the completion event on. This should
67406 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67407 	 */
67408 	uint16_t	cmpl_ring;
67409 	/*
67410 	 * The sequence ID is used by the driver for tracking multiple
67411 	 * commands. This ID is treated as opaque data by the firmware and
67412 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67413 	 */
67414 	uint16_t	seq_id;
67415 	/*
67416 	 * The target ID of the command:
67417 	 * * 0x0-0xFFF8 - The function ID
67418 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67419 	 * * 0xFFFD - Reserved for user-space HWRM interface
67420 	 * * 0xFFFF - HWRM
67421 	 */
67422 	uint16_t	target_id;
67423 	/*
67424 	 * A physical address pointer pointing to a host buffer that the
67425 	 * command's response data will be written. This can be either a host
67426 	 * physical address (HPA) or a guest physical address (GPA) and must
67427 	 * point to a physically contiguous block of memory.
67428 	 */
67429 	uint64_t	resp_addr;
67430 } hwrm_nvm_get_dev_info_input_t, *phwrm_nvm_get_dev_info_input_t;
67431 
67432 /* hwrm_nvm_get_dev_info_output (size:704b/88B) */
67433 
67434 typedef struct hwrm_nvm_get_dev_info_output {
67435 	/* The specific error status for the command. */
67436 	uint16_t	error_code;
67437 	/* The HWRM command request type. */
67438 	uint16_t	req_type;
67439 	/* The sequence ID from the original command. */
67440 	uint16_t	seq_id;
67441 	/* The length of the response data in number of bytes. */
67442 	uint16_t	resp_len;
67443 	/* Manufacturer ID. */
67444 	uint16_t	manufacturer_id;
67445 	/* Device ID. */
67446 	uint16_t	device_id;
67447 	/* Sector size of the NVRAM device. */
67448 	uint32_t	sector_size;
67449 	/* Total size, in bytes of the NVRAM device. */
67450 	uint32_t	nvram_size;
67451 	uint32_t	reserved_size;
67452 	/*
67453 	 * Available size that can be used, in bytes. Available size is the
67454 	 * NVRAM size take away the used size and reserved size.
67455 	 */
67456 	uint32_t	available_size;
67457 	/* This field represents the major version of NVM cfg */
67458 	uint8_t	nvm_cfg_ver_maj;
67459 	/* This field represents the minor version of NVM cfg */
67460 	uint8_t	nvm_cfg_ver_min;
67461 	/* This field represents the update version of NVM cfg */
67462 	uint8_t	nvm_cfg_ver_upd;
67463 	uint8_t	flags;
67464 	/*
67465 	 * If set to 1, firmware will provide various firmware version
67466 	 * information stored in the flash.
67467 	 */
67468 	#define HWRM_NVM_GET_DEV_INFO_OUTPUT_FLAGS_FW_VER_VALID	UINT32_C(0x1)
67469 	/*
67470 	 * This field represents the board package name stored in the flash.
67471 	 * (ASCII chars with NULL at the end).
67472 	 */
67473 	char	pkg_name[16];
67474 	/*
67475 	 * This field represents the major version of HWRM firmware, stored in
67476 	 * the flash.
67477 	 */
67478 	uint16_t	hwrm_fw_major;
67479 	/*
67480 	 * This field represents the minor version of HWRM firmware, stored in
67481 	 * the flash.
67482 	 */
67483 	uint16_t	hwrm_fw_minor;
67484 	/*
67485 	 * This field represents the build version of HWRM firmware, stored in
67486 	 * the flash.
67487 	 */
67488 	uint16_t	hwrm_fw_build;
67489 	/*
67490 	 * This field can be used to represent firmware branches or customer
67491 	 * specific releases tied to a specific (major, minor, build) version
67492 	 * of the HWRM firmware.
67493 	 */
67494 	uint16_t	hwrm_fw_patch;
67495 	/*
67496 	 * This field represents the major version of mgmt firmware, stored in
67497 	 * the flash.
67498 	 */
67499 	uint16_t	mgmt_fw_major;
67500 	/*
67501 	 * This field represents the minor version of mgmt firmware, stored in
67502 	 * the flash.
67503 	 */
67504 	uint16_t	mgmt_fw_minor;
67505 	/*
67506 	 * This field represents the build version of mgmt firmware, stored in
67507 	 * the flash.
67508 	 */
67509 	uint16_t	mgmt_fw_build;
67510 	/*
67511 	 * This field can be used to represent firmware branches or customer
67512 	 * specific releases tied to a specific (major, minor, build) version
67513 	 * of the mgmt firmware.
67514 	 */
67515 	uint16_t	mgmt_fw_patch;
67516 	/*
67517 	 * This field represents the major version of roce firmware, stored in
67518 	 * the flash.
67519 	 */
67520 	uint16_t	roce_fw_major;
67521 	/*
67522 	 * This field represents the minor version of roce firmware, stored in
67523 	 * the flash.
67524 	 */
67525 	uint16_t	roce_fw_minor;
67526 	/*
67527 	 * This field represents the build version of roce firmware, stored in
67528 	 * the flash.
67529 	 */
67530 	uint16_t	roce_fw_build;
67531 	/*
67532 	 * This field can be used to represent firmware branches or customer
67533 	 * specific releases tied to a specific (major, minor, build) version
67534 	 * of the roce firmware.
67535 	 */
67536 	uint16_t	roce_fw_patch;
67537 	/*
67538 	 * This field represents the major version of network control firmware,
67539 	 * stored in the flash.
67540 	 */
67541 	uint16_t	netctrl_fw_major;
67542 	/*
67543 	 * This field represents the minor version of network control firmware,
67544 	 * stored in the flash.
67545 	 */
67546 	uint16_t	netctrl_fw_minor;
67547 	/*
67548 	 * This field represents the build version of network control firmware,
67549 	 * stored in the flash.
67550 	 */
67551 	uint16_t	netctrl_fw_build;
67552 	/*
67553 	 * This field can be used to represent firmware branches or customer
67554 	 * specific releases tied to a specific (major, minor, build) version
67555 	 * of the network control firmware.
67556 	 */
67557 	uint16_t	netctrl_fw_patch;
67558 	uint8_t	unused_0[7];
67559 	/*
67560 	 * This field is used in Output records to indicate that the output
67561 	 * is completely written to RAM. This field should be read as '1'
67562 	 * to indicate that the output has been completely written. When
67563 	 * writing a command completion or response to an internal processor,
67564 	 * the order of writes has to be such that this field is written last.
67565 	 */
67566 	uint8_t	valid;
67567 } hwrm_nvm_get_dev_info_output_t, *phwrm_nvm_get_dev_info_output_t;
67568 
67569 /**************************
67570  * hwrm_nvm_mod_dir_entry *
67571  **************************/
67572 
67573 
67574 /* hwrm_nvm_mod_dir_entry_input (size:256b/32B) */
67575 
67576 typedef struct hwrm_nvm_mod_dir_entry_input {
67577 	/* The HWRM command request type. */
67578 	uint16_t	req_type;
67579 	/*
67580 	 * The completion ring to send the completion event on. This should
67581 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67582 	 */
67583 	uint16_t	cmpl_ring;
67584 	/*
67585 	 * The sequence ID is used by the driver for tracking multiple
67586 	 * commands. This ID is treated as opaque data by the firmware and
67587 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67588 	 */
67589 	uint16_t	seq_id;
67590 	/*
67591 	 * The target ID of the command:
67592 	 * * 0x0-0xFFF8 - The function ID
67593 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67594 	 * * 0xFFFD - Reserved for user-space HWRM interface
67595 	 * * 0xFFFF - HWRM
67596 	 */
67597 	uint16_t	target_id;
67598 	/*
67599 	 * A physical address pointer pointing to a host buffer that the
67600 	 * command's response data will be written. This can be either a host
67601 	 * physical address (HPA) or a guest physical address (GPA) and must
67602 	 * point to a physically contiguous block of memory.
67603 	 */
67604 	uint64_t	resp_addr;
67605 	uint32_t	enables;
67606 	/*
67607 	 * This bit must be '1' for the checksum field to be
67608 	 * configured.
67609 	 */
67610 	#define HWRM_NVM_MOD_DIR_ENTRY_INPUT_ENABLES_CHECKSUM	UINT32_C(0x1)
67611 	/* Directory Entry Index */
67612 	uint16_t	dir_idx;
67613 	/*
67614 	 * Directory ordinal.
67615 	 * The (0-based) instance of this Directory Type.
67616 	 */
67617 	uint16_t	dir_ordinal;
67618 	/*
67619 	 * The Directory Entry Extension flags (see BNX_DIR_EXT_* for
67620 	 * extension flag definitions).
67621 	 */
67622 	uint16_t	dir_ext;
67623 	/*
67624 	 * Directory Entry Attribute flags (see BNX_DIR_ATTR_* for attribute
67625 	 * flag definitions).
67626 	 */
67627 	uint16_t	dir_attr;
67628 	/*
67629 	 * If valid, then this field updates the checksum
67630 	 * value of the content in the directory entry.
67631 	 */
67632 	uint32_t	checksum;
67633 } hwrm_nvm_mod_dir_entry_input_t, *phwrm_nvm_mod_dir_entry_input_t;
67634 
67635 /* hwrm_nvm_mod_dir_entry_output (size:128b/16B) */
67636 
67637 typedef struct hwrm_nvm_mod_dir_entry_output {
67638 	/* The specific error status for the command. */
67639 	uint16_t	error_code;
67640 	/* The HWRM command request type. */
67641 	uint16_t	req_type;
67642 	/* The sequence ID from the original command. */
67643 	uint16_t	seq_id;
67644 	/* The length of the response data in number of bytes. */
67645 	uint16_t	resp_len;
67646 	uint8_t	unused_0[7];
67647 	/*
67648 	 * This field is used in Output records to indicate that the output
67649 	 * is completely written to RAM. This field should be read as '1'
67650 	 * to indicate that the output has been completely written. When
67651 	 * writing a command completion or response to an internal processor,
67652 	 * the order of writes has to be such that this field is written last.
67653 	 */
67654 	uint8_t	valid;
67655 } hwrm_nvm_mod_dir_entry_output_t, *phwrm_nvm_mod_dir_entry_output_t;
67656 
67657 /**************************
67658  * hwrm_nvm_verify_update *
67659  **************************/
67660 
67661 
67662 /* hwrm_nvm_verify_update_input (size:192b/24B) */
67663 
67664 typedef struct hwrm_nvm_verify_update_input {
67665 	/* The HWRM command request type. */
67666 	uint16_t	req_type;
67667 	/*
67668 	 * The completion ring to send the completion event on. This should
67669 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67670 	 */
67671 	uint16_t	cmpl_ring;
67672 	/*
67673 	 * The sequence ID is used by the driver for tracking multiple
67674 	 * commands. This ID is treated as opaque data by the firmware and
67675 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67676 	 */
67677 	uint16_t	seq_id;
67678 	/*
67679 	 * The target ID of the command:
67680 	 * * 0x0-0xFFF8 - The function ID
67681 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67682 	 * * 0xFFFD - Reserved for user-space HWRM interface
67683 	 * * 0xFFFF - HWRM
67684 	 */
67685 	uint16_t	target_id;
67686 	/*
67687 	 * A physical address pointer pointing to a host buffer that the
67688 	 * command's response data will be written. This can be either a host
67689 	 * physical address (HPA) or a guest physical address (GPA) and must
67690 	 * point to a physically contiguous block of memory.
67691 	 */
67692 	uint64_t	resp_addr;
67693 	/* Directory Entry Type, to be verified. */
67694 	uint16_t	dir_type;
67695 	/*
67696 	 * Directory ordinal.
67697 	 * The instance of the Directory Type to be verified.
67698 	 */
67699 	uint16_t	dir_ordinal;
67700 	/*
67701 	 * The Directory Entry Extension flags.
67702 	 * The "UPDATE" extension flag must be set in this value.
67703 	 * A corresponding directory entry with the same type and ordinal
67704 	 * values but *without*
67705 	 * the "UPDATE" extension flag must also exist. The other flags of
67706 	 * the extension must
67707 	 * be identical between the active and update entries.
67708 	 */
67709 	uint16_t	dir_ext;
67710 	uint8_t	unused_0[2];
67711 } hwrm_nvm_verify_update_input_t, *phwrm_nvm_verify_update_input_t;
67712 
67713 /* hwrm_nvm_verify_update_output (size:128b/16B) */
67714 
67715 typedef struct hwrm_nvm_verify_update_output {
67716 	/* The specific error status for the command. */
67717 	uint16_t	error_code;
67718 	/* The HWRM command request type. */
67719 	uint16_t	req_type;
67720 	/* The sequence ID from the original command. */
67721 	uint16_t	seq_id;
67722 	/* The length of the response data in number of bytes. */
67723 	uint16_t	resp_len;
67724 	uint8_t	unused_0[7];
67725 	/*
67726 	 * This field is used in Output records to indicate that the output
67727 	 * is completely written to RAM. This field should be read as '1'
67728 	 * to indicate that the output has been completely written. When
67729 	 * writing a command completion or response to an internal processor,
67730 	 * the order of writes has to be such that this field is written last.
67731 	 */
67732 	uint8_t	valid;
67733 } hwrm_nvm_verify_update_output_t, *phwrm_nvm_verify_update_output_t;
67734 
67735 /***************************
67736  * hwrm_nvm_install_update *
67737  ***************************/
67738 
67739 
67740 /* hwrm_nvm_install_update_input (size:192b/24B) */
67741 
67742 typedef struct hwrm_nvm_install_update_input {
67743 	/* The HWRM command request type. */
67744 	uint16_t	req_type;
67745 	/*
67746 	 * The completion ring to send the completion event on. This should
67747 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67748 	 */
67749 	uint16_t	cmpl_ring;
67750 	/*
67751 	 * The sequence ID is used by the driver for tracking multiple
67752 	 * commands. This ID is treated as opaque data by the firmware and
67753 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67754 	 */
67755 	uint16_t	seq_id;
67756 	/*
67757 	 * The target ID of the command:
67758 	 * * 0x0-0xFFF8 - The function ID
67759 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67760 	 * * 0xFFFD - Reserved for user-space HWRM interface
67761 	 * * 0xFFFF - HWRM
67762 	 */
67763 	uint16_t	target_id;
67764 	/*
67765 	 * A physical address pointer pointing to a host buffer that the
67766 	 * command's response data will be written. This can be either a host
67767 	 * physical address (HPA) or a guest physical address (GPA) and must
67768 	 * point to a physically contiguous block of memory.
67769 	 */
67770 	uint64_t	resp_addr;
67771 	/*
67772 	 * Installation type. If the value 3 through 0xffff is used,
67773 	 * only packaged items with that type value will be installed and
67774 	 * conditional installation directives for those packaged items
67775 	 * will be over-ridden (i.e. 'create' or 'replace' will be treated
67776 	 * as 'install').
67777 	 */
67778 	uint32_t	install_type;
67779 	/*
67780 	 * Perform a normal package installation. Conditional installation
67781 	 * directives (e.g. 'create' and 'replace') of packaged items
67782 	 * will be followed.
67783 	 */
67784 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_NORMAL UINT32_C(0x0)
67785 	/*
67786 	 * Install all packaged items regardless of installation directive
67787 	 * (i.e. treat all packaged items as though they have an installation
67788 	 * directive of 'install').
67789 	 */
67790 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_ALL	UINT32_C(0xffffffff)
67791 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_LAST  HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_ALL
67792 	uint16_t	flags;
67793 	/*
67794 	 * If set to 1, then securely erase all unused locations in
67795 	 * persistent storage.
67796 	 */
67797 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_ERASE_UNUSED_SPACE	UINT32_C(0x1)
67798 	/*
67799 	 * If set to 1, then unspecified images, images not in the package
67800 	 * file, will be safely deleted.
67801 	 * When combined with erase_unused_space then unspecified images will
67802 	 * be securely erased.
67803 	 */
67804 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_REMOVE_UNUSED_PKG	UINT32_C(0x2)
67805 	/*
67806 	 * If set to 1, FW will defragment the NVM if defragmentation is
67807 	 * required for the update.
67808 	 * Allow additional time for this command to complete if this bit is
67809 	 * set to 1.
67810 	 */
67811 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_ALLOWED_TO_DEFRAG	UINT32_C(0x4)
67812 	/*
67813 	 * If set to 1, FW will verify the package in the "UPDATE" NVM item
67814 	 * without installing it. This flag is for FW internal use only.
67815 	 * Users should not set this flag. The request will otherwise fail.
67816 	 */
67817 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_VERIFY_ONLY		UINT32_C(0x8)
67818 	uint8_t	unused_0[2];
67819 } hwrm_nvm_install_update_input_t, *phwrm_nvm_install_update_input_t;
67820 
67821 /* hwrm_nvm_install_update_output (size:192b/24B) */
67822 
67823 typedef struct hwrm_nvm_install_update_output {
67824 	/* The specific error status for the command. */
67825 	uint16_t	error_code;
67826 	/* The HWRM command request type. */
67827 	uint16_t	req_type;
67828 	/* The sequence ID from the original command. */
67829 	uint16_t	seq_id;
67830 	/* The length of the response data in number of bytes. */
67831 	uint16_t	resp_len;
67832 	/*
67833 	 * Bit-mask of successfully installed items.
67834 	 * Bit-0 corresponding to the first packaged item, Bit-1 for the second
67835 	 * item, etc. A value of 0 indicates that no items were successfully
67836 	 * installed.
67837 	 */
67838 	uint64_t	installed_items;
67839 	/* result is 8 b corresponding to BCMRETVAL error codes */
67840 	uint8_t	result;
67841 	/* There was no problem with the package installation. */
67842 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_SUCCESS			UINT32_C(0x0)
67843 	/* Generic failure */
67844 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_FAILURE			UINT32_C(0xff)
67845 	/* Allocation error malloc failure */
67846 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_MALLOC_FAILURE		UINT32_C(0xfd)
67847 	/* NVM install error due to invalid index */
67848 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_INDEX_PARAMETER	UINT32_C(0xfb)
67849 	/* NVM install error due to invalid type */
67850 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_TYPE_PARAMETER	UINT32_C(0xf3)
67851 	/* Invalid package due to invalid prerequisite */
67852 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_PREREQUISITE	UINT32_C(0xf2)
67853 	/* Invalid package due to invalid file header */
67854 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_FILE_HEADER	UINT32_C(0xec)
67855 	/* Invalid package due to invalid format */
67856 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_SIGNATURE		UINT32_C(0xeb)
67857 	/* Invalid package due to invalid property stream */
67858 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_PROP_STREAM	UINT32_C(0xea)
67859 	/* Invalid package due to invalid property length */
67860 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_PROP_LENGTH	UINT32_C(0xe9)
67861 	/* Invalid package due to invalid manifest */
67862 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_MANIFEST		UINT32_C(0xe8)
67863 	/* Invalid package due to invalid trailer */
67864 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_TRAILER		UINT32_C(0xe7)
67865 	/* Invalid package due to invalid checksum */
67866 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_CHECKSUM		UINT32_C(0xe6)
67867 	/* Invalid package due to invalid item checksum */
67868 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_ITEM_CHECKSUM	UINT32_C(0xe5)
67869 	/* Invalid package due to invalid length */
67870 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_DATA_LENGTH	UINT32_C(0xe4)
67871 	/* Invalid package due to invalid directive */
67872 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_DIRECTIVE		UINT32_C(0xe1)
67873 	/* Invalid device due to unsupported chip revision */
67874 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_CHIP_REV	UINT32_C(0xce)
67875 	/* Invalid device due to unsupported device ID */
67876 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_DEVICE_ID	UINT32_C(0xcd)
67877 	/* Invalid device due to unsupported subsystem vendor */
67878 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_SUBSYS_VENDOR	UINT32_C(0xcc)
67879 	/* Invalid device due to unsupported subsystem ID */
67880 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_SUBSYS_ID	UINT32_C(0xcb)
67881 	/* Invalid device due to unsupported product ID or customer ID */
67882 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_PLATFORM	UINT32_C(0xc5)
67883 	/* Invalid package due to duplicate item */
67884 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_DUPLICATE_ITEM		UINT32_C(0xc4)
67885 	/* Invalid package due to zero length item */
67886 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ZERO_LENGTH_ITEM		UINT32_C(0xc3)
67887 	/* NVM integrity error checksum */
67888 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INSTALL_CHECKSUM_ERROR	UINT32_C(0xb9)
67889 	/* NVM integrity error */
67890 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INSTALL_DATA_ERROR	UINT32_C(0xb8)
67891 	/* Authentication error */
67892 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INSTALL_AUTHENTICATION_ERROR UINT32_C(0xb7)
67893 	/* NVM install error item not found */
67894 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ITEM_NOT_FOUND		UINT32_C(0xb0)
67895 	/* NVM install error item locked */
67896 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ITEM_LOCKED		UINT32_C(0xa7)
67897 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_LAST			HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ITEM_LOCKED
67898 	/* problem_item is 8 b */
67899 	uint8_t	problem_item;
67900 	/* There was no problem with any packaged items. */
67901 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_NONE	UINT32_C(0x0)
67902 	/* There was a problem with the NVM package itself. */
67903 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_PACKAGE UINT32_C(0xff)
67904 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_LAST   HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_PACKAGE
67905 	/* reset_required is 8 b */
67906 	uint8_t	reset_required;
67907 	/*
67908 	 * No reset is required for installed/updated firmware or
67909 	 * microcode to take effect.
67910 	 */
67911 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_NONE  UINT32_C(0x0)
67912 	/*
67913 	 * A PCIe reset (e.g. system reboot) is
67914 	 * required for newly installed/updated firmware or
67915 	 * microcode to take effect.
67916 	 */
67917 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_PCI   UINT32_C(0x1)
67918 	/*
67919 	 * A controller power reset (e.g. system power-cycle) is
67920 	 * required for newly installed/updated firmware or
67921 	 * microcode to take effect. Some newly installed/updated
67922 	 * firmware or microcode may still take effect upon the
67923 	 * next PCIe reset.
67924 	 */
67925 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_POWER UINT32_C(0x2)
67926 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_LAST HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_POWER
67927 	uint8_t	unused_0[4];
67928 	/*
67929 	 * This field is used in Output records to indicate that the output
67930 	 * is completely written to RAM. This field should be read as '1'
67931 	 * to indicate that the output has been completely written. When
67932 	 * writing a command completion or response to an internal processor,
67933 	 * the order of writes has to be such that this field is written last.
67934 	 */
67935 	uint8_t	valid;
67936 } hwrm_nvm_install_update_output_t, *phwrm_nvm_install_update_output_t;
67937 
67938 /* hwrm_nvm_install_update_cmd_err (size:64b/8B) */
67939 
67940 typedef struct hwrm_nvm_install_update_cmd_err {
67941 	/*
67942 	 * command specific error codes that goes to
67943 	 * the cmd_err field in Common HWRM Error Response.
67944 	 */
67945 	uint8_t	code;
67946 	/* Unknown error */
67947 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_UNKNOWN		UINT32_C(0x0)
67948 	/* Unable to complete operation due to fragmentation */
67949 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR	UINT32_C(0x1)
67950 	/* nvm is completely full. */
67951 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_SPACE	UINT32_C(0x2)
67952 	/* Firmware update failed due to Anti-rollback. */
67953 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_ANTI_ROLLBACK	UINT32_C(0x3)
67954 	/* Firmware update does not support voltage regulators on the device. */
67955 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_VOLTREG_SUPPORT UINT32_C(0x4)
67956 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_LAST		HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_VOLTREG_SUPPORT
67957 	uint8_t	unused_0[7];
67958 } hwrm_nvm_install_update_cmd_err_t, *phwrm_nvm_install_update_cmd_err_t;
67959 
67960 /******************
67961  * hwrm_nvm_flush *
67962  ******************/
67963 
67964 
67965 /* hwrm_nvm_flush_input (size:128b/16B) */
67966 
67967 typedef struct hwrm_nvm_flush_input {
67968 	/* The HWRM command request type. */
67969 	uint16_t	req_type;
67970 	/*
67971 	 * The completion ring to send the completion event on. This should
67972 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67973 	 */
67974 	uint16_t	cmpl_ring;
67975 	/*
67976 	 * The sequence ID is used by the driver for tracking multiple
67977 	 * commands. This ID is treated as opaque data by the firmware and
67978 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67979 	 */
67980 	uint16_t	seq_id;
67981 	/*
67982 	 * The target ID of the command:
67983 	 * * 0x0-0xFFF8 - The function ID
67984 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67985 	 * * 0xFFFD - Reserved for user-space HWRM interface
67986 	 * * 0xFFFF - HWRM
67987 	 */
67988 	uint16_t	target_id;
67989 	/*
67990 	 * A physical address pointer pointing to a host buffer that the
67991 	 * command's response data will be written. This can be either a host
67992 	 * physical address (HPA) or a guest physical address (GPA) and must
67993 	 * point to a physically contiguous block of memory.
67994 	 */
67995 	uint64_t	resp_addr;
67996 } hwrm_nvm_flush_input_t, *phwrm_nvm_flush_input_t;
67997 
67998 /* hwrm_nvm_flush_output (size:128b/16B) */
67999 
68000 typedef struct hwrm_nvm_flush_output {
68001 	/* The specific error status for the command. */
68002 	uint16_t	error_code;
68003 	/* The HWRM command request type. */
68004 	uint16_t	req_type;
68005 	/* The sequence ID from the original command. */
68006 	uint16_t	seq_id;
68007 	/* The length of the response data in number of bytes. */
68008 	uint16_t	resp_len;
68009 	uint8_t	unused_0[7];
68010 	/*
68011 	 * This field is used in Output records to indicate that the output
68012 	 * is completely written to RAM. This field should be read as '1'
68013 	 * to indicate that the output has been completely written. When
68014 	 * writing a command completion or response to an internal processor,
68015 	 * the order of writes has to be such that this field is written last.
68016 	 */
68017 	uint8_t	valid;
68018 } hwrm_nvm_flush_output_t, *phwrm_nvm_flush_output_t;
68019 
68020 /* hwrm_nvm_flush_cmd_err (size:64b/8B) */
68021 
68022 typedef struct hwrm_nvm_flush_cmd_err {
68023 	/*
68024 	 * command specific error codes that goes to
68025 	 * the cmd_err field in Common HWRM Error Response.
68026 	 */
68027 	uint8_t	code;
68028 	/* Unknown error */
68029 	#define HWRM_NVM_FLUSH_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
68030 	/* flush could not be performed */
68031 	#define HWRM_NVM_FLUSH_CMD_ERR_CODE_FAIL	UINT32_C(0x1)
68032 	#define HWRM_NVM_FLUSH_CMD_ERR_CODE_LAST   HWRM_NVM_FLUSH_CMD_ERR_CODE_FAIL
68033 	uint8_t	unused_0[7];
68034 } hwrm_nvm_flush_cmd_err_t, *phwrm_nvm_flush_cmd_err_t;
68035 
68036 /*************************
68037  * hwrm_nvm_get_variable *
68038  *************************/
68039 
68040 
68041 /* hwrm_nvm_get_variable_input (size:320b/40B) */
68042 
68043 typedef struct hwrm_nvm_get_variable_input {
68044 	/* The HWRM command request type. */
68045 	uint16_t	req_type;
68046 	/*
68047 	 * The completion ring to send the completion event on. This should
68048 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68049 	 */
68050 	uint16_t	cmpl_ring;
68051 	/*
68052 	 * The sequence ID is used by the driver for tracking multiple
68053 	 * commands. This ID is treated as opaque data by the firmware and
68054 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68055 	 */
68056 	uint16_t	seq_id;
68057 	/*
68058 	 * The target ID of the command:
68059 	 * * 0x0-0xFFF8 - The function ID
68060 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68061 	 * * 0xFFFD - Reserved for user-space HWRM interface
68062 	 * * 0xFFFF - HWRM
68063 	 */
68064 	uint16_t	target_id;
68065 	/*
68066 	 * A physical address pointer pointing to a host buffer that the
68067 	 * command's response data will be written. This can be either a host
68068 	 * physical address (HPA) or a guest physical address (GPA) and must
68069 	 * point to a physically contiguous block of memory.
68070 	 */
68071 	uint64_t	resp_addr;
68072 	/*
68073 	 * This is the host address where
68074 	 * nvm variable will be stored
68075 	 */
68076 	uint64_t	dest_data_addr;
68077 	/* size of data in bits */
68078 	uint16_t	data_len;
68079 	/* nvm cfg option number */
68080 	uint16_t	option_num;
68081 	/* reserved. */
68082 	#define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_0	UINT32_C(0x0)
68083 	/* reserved. */
68084 	#define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF UINT32_C(0xffff)
68085 	#define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_LAST	HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF
68086 	/*
68087 	 * Number of dimensions for this nvm configuration variable.
68088 	 * This value indicates how many of the indexN values to use.
68089 	 * A value of 0 means that none of the indexN values are valid.
68090 	 * A value of 1 requires at index0 is valued, a value of 2
68091 	 * requires that index0 and index1 are valid, and so forth
68092 	 */
68093 	uint16_t	dimensions;
68094 	/* index for the 1st dimensions */
68095 	uint16_t	index_0;
68096 	/* index for the 2nd dimensions */
68097 	uint16_t	index_1;
68098 	/* index for the 3rd dimensions */
68099 	uint16_t	index_2;
68100 	/* index for the 4th dimensions */
68101 	uint16_t	index_3;
68102 	uint8_t	flags;
68103 	/*
68104 	 * When this bit is set to 1, the factory default value will be
68105 	 * returned, 0 returns the operational value.
68106 	 */
68107 	#define HWRM_NVM_GET_VARIABLE_INPUT_FLAGS_FACTORY_DFLT	UINT32_C(0x1)
68108 	uint8_t	unused_0;
68109 } hwrm_nvm_get_variable_input_t, *phwrm_nvm_get_variable_input_t;
68110 
68111 /* hwrm_nvm_get_variable_output (size:128b/16B) */
68112 
68113 typedef struct hwrm_nvm_get_variable_output {
68114 	/* The specific error status for the command. */
68115 	uint16_t	error_code;
68116 	/* The HWRM command request type. */
68117 	uint16_t	req_type;
68118 	/* The sequence ID from the original command. */
68119 	uint16_t	seq_id;
68120 	/* The length of the response data in number of bytes. */
68121 	uint16_t	resp_len;
68122 	/* size of data of the actual variable retrieved in bits */
68123 	uint16_t	data_len;
68124 	/*
68125 	 * option_num is the option number for the data retrieved. It is
68126 	 * possible in the future that the option number returned would be
68127 	 * different than requested. This condition could occur if an option is
68128 	 * deprecated and a new option id is defined with similar
68129 	 * characteristics, but has a slightly different definition. This
68130 	 * also makes it convenient for the caller to identify the variable
68131 	 * result with the option id from the response.
68132 	 */
68133 	uint16_t	option_num;
68134 	/* reserved. */
68135 	#define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_0	UINT32_C(0x0)
68136 	/* reserved. */
68137 	#define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_FFFF UINT32_C(0xffff)
68138 	#define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_LAST	HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_FFFF
68139 	uint8_t	unused_0[3];
68140 	/*
68141 	 * This field is used in Output records to indicate that the output
68142 	 * is completely written to RAM. This field should be read as '1'
68143 	 * to indicate that the output has been completely written. When
68144 	 * writing a command completion or response to an internal processor,
68145 	 * the order of writes has to be such that this field is written last.
68146 	 */
68147 	uint8_t	valid;
68148 } hwrm_nvm_get_variable_output_t, *phwrm_nvm_get_variable_output_t;
68149 
68150 /* hwrm_nvm_get_variable_cmd_err (size:64b/8B) */
68151 
68152 typedef struct hwrm_nvm_get_variable_cmd_err {
68153 	/*
68154 	 * command specific error codes that goes to
68155 	 * the cmd_err field in Common HWRM Error Response.
68156 	 */
68157 	uint8_t	code;
68158 	/* Unknown error */
68159 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
68160 	/* variable does not exist */
68161 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST UINT32_C(0x1)
68162 	/* configuration is corrupted and the variable cannot be saved */
68163 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR   UINT32_C(0x2)
68164 	/* length specified is too small */
68165 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT UINT32_C(0x3)
68166 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LAST	HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT
68167 	uint8_t	unused_0[7];
68168 } hwrm_nvm_get_variable_cmd_err_t, *phwrm_nvm_get_variable_cmd_err_t;
68169 
68170 /*************************
68171  * hwrm_nvm_set_variable *
68172  *************************/
68173 
68174 
68175 /* hwrm_nvm_set_variable_input (size:320b/40B) */
68176 
68177 typedef struct hwrm_nvm_set_variable_input {
68178 	/* The HWRM command request type. */
68179 	uint16_t	req_type;
68180 	/*
68181 	 * The completion ring to send the completion event on. This should
68182 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68183 	 */
68184 	uint16_t	cmpl_ring;
68185 	/*
68186 	 * The sequence ID is used by the driver for tracking multiple
68187 	 * commands. This ID is treated as opaque data by the firmware and
68188 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68189 	 */
68190 	uint16_t	seq_id;
68191 	/*
68192 	 * The target ID of the command:
68193 	 * * 0x0-0xFFF8 - The function ID
68194 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68195 	 * * 0xFFFD - Reserved for user-space HWRM interface
68196 	 * * 0xFFFF - HWRM
68197 	 */
68198 	uint16_t	target_id;
68199 	/*
68200 	 * A physical address pointer pointing to a host buffer that the
68201 	 * command's response data will be written. This can be either a host
68202 	 * physical address (HPA) or a guest physical address (GPA) and must
68203 	 * point to a physically contiguous block of memory.
68204 	 */
68205 	uint64_t	resp_addr;
68206 	/*
68207 	 * This is the host address where
68208 	 * nvm variable will be copied from
68209 	 */
68210 	uint64_t	src_data_addr;
68211 	/* size of data in bits */
68212 	uint16_t	data_len;
68213 	/* nvm cfg option number */
68214 	uint16_t	option_num;
68215 	/* reserved. */
68216 	#define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_0	UINT32_C(0x0)
68217 	/* reserved. */
68218 	#define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF UINT32_C(0xffff)
68219 	#define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_LAST	HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF
68220 	/*
68221 	 * Number of dimensions for this nvm configuration variable.
68222 	 * This value indicates how many of the indexN values to use.
68223 	 * A value of 0 means that none of the indexN values are valid.
68224 	 * A value of 1 requires at index0 is valued, a value of 2
68225 	 * requires that index0 and index1 are valid, and so forth
68226 	 */
68227 	uint16_t	dimensions;
68228 	/* index for the 1st dimensions */
68229 	uint16_t	index_0;
68230 	/* index for the 2nd dimensions */
68231 	uint16_t	index_1;
68232 	/* index for the 3rd dimensions */
68233 	uint16_t	index_2;
68234 	/* index for the 4th dimensions */
68235 	uint16_t	index_3;
68236 	uint8_t	flags;
68237 	/*
68238 	 * When this bit is 1, flush internal cache after this write
68239 	 * operation (see hwrm_nvm_flush command.)
68240 	 */
68241 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FORCE_FLUSH		UINT32_C(0x1)
68242 	/* encryption method */
68243 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_MASK	UINT32_C(0xe)
68244 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_SFT	1
68245 	/* No encryption. */
68246 		#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_NONE		(UINT32_C(0x0) << 1)
68247 	/* one-way encryption. */
68248 		#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1	(UINT32_C(0x1) << 1)
68249 	/* symmetric AES256 encryption. */
68250 		#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_AES256	(UINT32_C(0x2) << 1)
68251 	/* SHA1 digest appended to plaintext contents, for authentication */
68252 		#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH  (UINT32_C(0x3) << 1)
68253 		#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_LAST	HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH
68254 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FLAGS_UNUSED_0_MASK	UINT32_C(0x70)
68255 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FLAGS_UNUSED_0_SFT	4
68256 	/* When this bit is 1, update the factory default region */
68257 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FACTORY_DEFAULT		UINT32_C(0x80)
68258 	uint8_t	unused_0;
68259 } hwrm_nvm_set_variable_input_t, *phwrm_nvm_set_variable_input_t;
68260 
68261 /* hwrm_nvm_set_variable_output (size:128b/16B) */
68262 
68263 typedef struct hwrm_nvm_set_variable_output {
68264 	/* The specific error status for the command. */
68265 	uint16_t	error_code;
68266 	/* The HWRM command request type. */
68267 	uint16_t	req_type;
68268 	/* The sequence ID from the original command. */
68269 	uint16_t	seq_id;
68270 	/* The length of the response data in number of bytes. */
68271 	uint16_t	resp_len;
68272 	uint8_t	unused_0[7];
68273 	/*
68274 	 * This field is used in Output records to indicate that the output
68275 	 * is completely written to RAM. This field should be read as '1'
68276 	 * to indicate that the output has been completely written. When
68277 	 * writing a command completion or response to an internal processor,
68278 	 * the order of writes has to be such that this field is written last.
68279 	 */
68280 	uint8_t	valid;
68281 } hwrm_nvm_set_variable_output_t, *phwrm_nvm_set_variable_output_t;
68282 
68283 /* hwrm_nvm_set_variable_cmd_err (size:64b/8B) */
68284 
68285 typedef struct hwrm_nvm_set_variable_cmd_err {
68286 	/*
68287 	 * command specific error codes that goes to
68288 	 * the cmd_err field in Common HWRM Error Response.
68289 	 */
68290 	uint8_t	code;
68291 	/* Unknown error */
68292 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
68293 	/* variable does not exist */
68294 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST UINT32_C(0x1)
68295 	/* configuration is corrupted and the variable cannot be saved */
68296 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR   UINT32_C(0x2)
68297 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_LAST	HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR
68298 	uint8_t	unused_0[7];
68299 } hwrm_nvm_set_variable_cmd_err_t, *phwrm_nvm_set_variable_cmd_err_t;
68300 
68301 /****************************
68302  * hwrm_nvm_validate_option *
68303  ****************************/
68304 
68305 
68306 /* hwrm_nvm_validate_option_input (size:320b/40B) */
68307 
68308 typedef struct hwrm_nvm_validate_option_input {
68309 	/* The HWRM command request type. */
68310 	uint16_t	req_type;
68311 	/*
68312 	 * The completion ring to send the completion event on. This should
68313 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68314 	 */
68315 	uint16_t	cmpl_ring;
68316 	/*
68317 	 * The sequence ID is used by the driver for tracking multiple
68318 	 * commands. This ID is treated as opaque data by the firmware and
68319 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68320 	 */
68321 	uint16_t	seq_id;
68322 	/*
68323 	 * The target ID of the command:
68324 	 * * 0x0-0xFFF8 - The function ID
68325 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68326 	 * * 0xFFFD - Reserved for user-space HWRM interface
68327 	 * * 0xFFFF - HWRM
68328 	 */
68329 	uint16_t	target_id;
68330 	/*
68331 	 * A physical address pointer pointing to a host buffer that the
68332 	 * command's response data will be written. This can be either a host
68333 	 * physical address (HPA) or a guest physical address (GPA) and must
68334 	 * point to a physically contiguous block of memory.
68335 	 */
68336 	uint64_t	resp_addr;
68337 	/*
68338 	 * This is the host address where
68339 	 * nvm variable will be copied from
68340 	 */
68341 	uint64_t	src_data_addr;
68342 	/* size of data in bits */
68343 	uint16_t	data_len;
68344 	/* nvm cfg option number */
68345 	uint16_t	option_num;
68346 	/* reserved. */
68347 	#define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_0	UINT32_C(0x0)
68348 	/* reserved. */
68349 	#define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_FFFF UINT32_C(0xffff)
68350 	#define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_LAST	HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_FFFF
68351 	/*
68352 	 * Number of dimensions for this nvm configuration variable.
68353 	 * This value indicates how many of the indexN values to use.
68354 	 * A value of 0 means that none of the indexN values are valid.
68355 	 * A value of 1 requires at index0 is valued, a value of 2
68356 	 * requires that index0 and index1 are valid, and so forth
68357 	 */
68358 	uint16_t	dimensions;
68359 	/* index for the 1st dimensions */
68360 	uint16_t	index_0;
68361 	/* index for the 2nd dimensions */
68362 	uint16_t	index_1;
68363 	/* index for the 3rd dimensions */
68364 	uint16_t	index_2;
68365 	/* index for the 4th dimensions */
68366 	uint16_t	index_3;
68367 	uint8_t	unused_0[2];
68368 } hwrm_nvm_validate_option_input_t, *phwrm_nvm_validate_option_input_t;
68369 
68370 /* hwrm_nvm_validate_option_output (size:128b/16B) */
68371 
68372 typedef struct hwrm_nvm_validate_option_output {
68373 	/* The specific error status for the command. */
68374 	uint16_t	error_code;
68375 	/* The HWRM command request type. */
68376 	uint16_t	req_type;
68377 	/* The sequence ID from the original command. */
68378 	uint16_t	seq_id;
68379 	/* The length of the response data in number of bytes. */
68380 	uint16_t	resp_len;
68381 	uint8_t	result;
68382 	/*
68383 	 * indicates that the value provided for the option is not matching
68384 	 * with the saved data.
68385 	 */
68386 	#define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_NOT_MATCH UINT32_C(0x0)
68387 	/*
68388 	 * indicates that the value provided for the option is matching the
68389 	 * saved data.
68390 	 */
68391 	#define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_MATCH	UINT32_C(0x1)
68392 	#define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_LAST	HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_MATCH
68393 	uint8_t	unused_0[6];
68394 	/*
68395 	 * This field is used in Output records to indicate that the output
68396 	 * is completely written to RAM. This field should be read as '1'
68397 	 * to indicate that the output has been completely written. When
68398 	 * writing a command completion or response to an internal processor,
68399 	 * the order of writes has to be such that this field is written last.
68400 	 */
68401 	uint8_t	valid;
68402 } hwrm_nvm_validate_option_output_t, *phwrm_nvm_validate_option_output_t;
68403 
68404 /* hwrm_nvm_validate_option_cmd_err (size:64b/8B) */
68405 
68406 typedef struct hwrm_nvm_validate_option_cmd_err {
68407 	/*
68408 	 * command specific error codes that goes to
68409 	 * the cmd_err field in Common HWRM Error Response.
68410 	 */
68411 	uint8_t	code;
68412 	/* Unknown error */
68413 	#define HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
68414 	#define HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_LAST   HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_UNKNOWN
68415 	uint8_t	unused_0[7];
68416 } hwrm_nvm_validate_option_cmd_err_t, *phwrm_nvm_validate_option_cmd_err_t;
68417 
68418 /*****************************
68419  * hwrm_nvm_factory_defaults *
68420  *****************************/
68421 
68422 
68423 /* hwrm_nvm_factory_defaults_input (size:192b/24B) */
68424 
68425 typedef struct hwrm_nvm_factory_defaults_input {
68426 	/* The HWRM command request type. */
68427 	uint16_t	req_type;
68428 	/*
68429 	 * The completion ring to send the completion event on. This should
68430 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68431 	 */
68432 	uint16_t	cmpl_ring;
68433 	/*
68434 	 * The sequence ID is used by the driver for tracking multiple
68435 	 * commands. This ID is treated as opaque data by the firmware and
68436 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68437 	 */
68438 	uint16_t	seq_id;
68439 	/*
68440 	 * The target ID of the command:
68441 	 * * 0x0-0xFFF8 - The function ID
68442 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68443 	 * * 0xFFFD - Reserved for user-space HWRM interface
68444 	 * * 0xFFFF - HWRM
68445 	 */
68446 	uint16_t	target_id;
68447 	/*
68448 	 * A physical address pointer pointing to a host buffer that the
68449 	 * command's response data will be written. This can be either a host
68450 	 * physical address (HPA) or a guest physical address (GPA) and must
68451 	 * point to a physically contiguous block of memory.
68452 	 */
68453 	uint64_t	resp_addr;
68454 	/* mode is 8 b */
68455 	uint8_t	mode;
68456 	/*
68457 	 * If set to 1, it triggers restoration of factory default data.
68458 	 * If the selection field is zero, all data are restored to default.
68459 	 * If the selection field is non-zero, only the selected data are
68460 	 * restored.
68461 	 */
68462 	#define HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_RESTORE UINT32_C(0x0)
68463 	/*
68464 	 * If set to 1, it triggers creation of factory default data.
68465 	 * If the selection field is zero, all default data are created.
68466 	 * If the selection field is non-zero, only the selected data are
68467 	 * created.
68468 	 */
68469 	#define HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_CREATE  UINT32_C(0x1)
68470 	#define HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_LAST   HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_CREATE
68471 	uint8_t	unused_0[1];
68472 	/*
68473 	 * This field selects which data the factory default operation applies.
68474 	 * If it is '0', the operation applies to all data. If it is not '0',
68475 	 * the operation only applies to the data selected by this field.
68476 	 */
68477 	uint16_t	selection;
68478 	/* When this bit is '1', config option is selected. */
68479 	#define HWRM_NVM_FACTORY_DEFAULTS_INPUT_SELECTION_CFG_OPTION	UINT32_C(0x1)
68480 	/* When this bit is '1', crashdump is selected. */
68481 	#define HWRM_NVM_FACTORY_DEFAULTS_INPUT_SELECTION_CRASHDUMP	UINT32_C(0x2)
68482 	uint8_t	unused_1[4];
68483 } hwrm_nvm_factory_defaults_input_t, *phwrm_nvm_factory_defaults_input_t;
68484 
68485 /* hwrm_nvm_factory_defaults_output (size:128b/16B) */
68486 
68487 typedef struct hwrm_nvm_factory_defaults_output {
68488 	/* The specific error status for the command. */
68489 	uint16_t	error_code;
68490 	/* The HWRM command request type. */
68491 	uint16_t	req_type;
68492 	/* The sequence ID from the original command. */
68493 	uint16_t	seq_id;
68494 	/* The length of the response data in number of bytes. */
68495 	uint16_t	resp_len;
68496 	uint8_t	result;
68497 	/* factory defaults created successfully. */
68498 	#define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_CREATE_OK	UINT32_C(0x0)
68499 	/* factory defaults restored successfully. */
68500 	#define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_RESTORE_OK	UINT32_C(0x1)
68501 	/* factory defaults already created. */
68502 	#define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_CREATE_ALREADY UINT32_C(0x2)
68503 	#define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_LAST	HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_CREATE_ALREADY
68504 	uint8_t	unused_0[6];
68505 	/*
68506 	 * This field is used in Output records to indicate that the output
68507 	 * is completely written to RAM. This field should be read as '1'
68508 	 * to indicate that the output has been completely written. When
68509 	 * writing a command completion or response to an internal processor,
68510 	 * the order of writes has to be such that this field is written last.
68511 	 */
68512 	uint8_t	valid;
68513 } hwrm_nvm_factory_defaults_output_t, *phwrm_nvm_factory_defaults_output_t;
68514 
68515 /* hwrm_nvm_factory_defaults_cmd_err (size:64b/8B) */
68516 
68517 typedef struct hwrm_nvm_factory_defaults_cmd_err {
68518 	/*
68519 	 * command specific error codes that goes to
68520 	 * the cmd_err field in Common HWRM Error Response.
68521 	 */
68522 	uint8_t	code;
68523 	/* Unknown error */
68524 	#define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
68525 	/* valid configuration not present to create defaults */
68526 	#define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_NO_VALID_CFG UINT32_C(0x1)
68527 	/* No saved configuration present to restore, restore failed */
68528 	#define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_NO_SAVED_CFG UINT32_C(0x2)
68529 	#define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_LAST	HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_NO_SAVED_CFG
68530 	uint8_t	unused_0[7];
68531 } hwrm_nvm_factory_defaults_cmd_err_t, *phwrm_nvm_factory_defaults_cmd_err_t;
68532 
68533 /****************************
68534  * hwrm_nvm_req_arbitration *
68535  ****************************/
68536 
68537 
68538 /* hwrm_nvm_req_arbitration_input (size:192b/24B) */
68539 
68540 typedef struct hwrm_nvm_req_arbitration_input {
68541 	/* The HWRM command request type. */
68542 	uint16_t	req_type;
68543 	/*
68544 	 * The completion ring to send the completion event on. This should
68545 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68546 	 */
68547 	uint16_t	cmpl_ring;
68548 	/*
68549 	 * The sequence ID is used by the driver for tracking multiple
68550 	 * commands. This ID is treated as opaque data by the firmware and
68551 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68552 	 */
68553 	uint16_t	seq_id;
68554 	/*
68555 	 * The target ID of the command:
68556 	 * * 0x0-0xFFF8 - The function ID
68557 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68558 	 * * 0xFFFD - Reserved for user-space HWRM interface
68559 	 * * 0xFFFF - HWRM
68560 	 */
68561 	uint16_t	target_id;
68562 	/*
68563 	 * A physical address pointer pointing to a host buffer that the
68564 	 * command's response data will be written. This can be either a host
68565 	 * physical address (HPA) or a guest physical address (GPA) and must
68566 	 * point to a physically contiguous block of memory.
68567 	 */
68568 	uint64_t	resp_addr;
68569 	/* Type of NVRAM arbitration request */
68570 	uint8_t	type;
68571 	/* Query if NVRAM arbitration semaphore is acquired outside of Nitro */
68572 	#define HWRM_NVM_REQ_ARBITRATION_INPUT_TYPE_STATUS  UINT32_C(0x0)
68573 	/* Acquire NVRAM arbitration semaphore */
68574 	#define HWRM_NVM_REQ_ARBITRATION_INPUT_TYPE_ACQUIRE UINT32_C(0x1)
68575 	/* Release NVRAM arbitration semaphore */
68576 	#define HWRM_NVM_REQ_ARBITRATION_INPUT_TYPE_RELEASE UINT32_C(0x2)
68577 	#define HWRM_NVM_REQ_ARBITRATION_INPUT_TYPE_LAST   HWRM_NVM_REQ_ARBITRATION_INPUT_TYPE_RELEASE
68578 	uint8_t	unused_0[7];
68579 } hwrm_nvm_req_arbitration_input_t, *phwrm_nvm_req_arbitration_input_t;
68580 
68581 /* hwrm_nvm_req_arbitration_output (size:128b/16B) */
68582 
68583 typedef struct hwrm_nvm_req_arbitration_output {
68584 	/* The specific error status for the command. */
68585 	uint16_t	error_code;
68586 	/* The HWRM command request type. */
68587 	uint16_t	req_type;
68588 	/* The sequence ID from the original command. */
68589 	uint16_t	seq_id;
68590 	/* The length of the response data in number of bytes. */
68591 	uint16_t	resp_len;
68592 	/* NVRAM arbitration semaphore is acquired if value is 1 */
68593 	uint8_t	acquired;
68594 	uint8_t	unused_0[6];
68595 	/*
68596 	 * This field is used in Output records to indicate that the output
68597 	 * is completely written to RAM. This field should be read as '1'
68598 	 * to indicate that the output has been completely written. When
68599 	 * writing a command completion or response to an internal processor,
68600 	 * the order of writes has to be such that this field is written last.
68601 	 */
68602 	uint8_t	valid;
68603 } hwrm_nvm_req_arbitration_output_t, *phwrm_nvm_req_arbitration_output_t;
68604 
68605 /*******************
68606  * hwrm_nvm_defrag *
68607  *******************/
68608 
68609 
68610 /* hwrm_nvm_defrag_input (size:192b/24B) */
68611 
68612 typedef struct hwrm_nvm_defrag_input {
68613 	/* The HWRM command request type. */
68614 	uint16_t	req_type;
68615 	/*
68616 	 * The completion ring to send the completion event on. This should
68617 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68618 	 */
68619 	uint16_t	cmpl_ring;
68620 	/*
68621 	 * The sequence ID is used by the driver for tracking multiple
68622 	 * commands. This ID is treated as opaque data by the firmware and
68623 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68624 	 */
68625 	uint16_t	seq_id;
68626 	/*
68627 	 * The target ID of the command:
68628 	 * * 0x0-0xFFF8 - The function ID
68629 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68630 	 * * 0xFFFD - Reserved for user-space HWRM interface
68631 	 * * 0xFFFF - HWRM
68632 	 */
68633 	uint16_t	target_id;
68634 	/*
68635 	 * A physical address pointer pointing to a host buffer that the
68636 	 * command's response data will be written. This can be either a host
68637 	 * physical address (HPA) or a guest physical address (GPA) and must
68638 	 * point to a physically contiguous block of memory.
68639 	 */
68640 	uint64_t	resp_addr;
68641 	uint32_t	flags;
68642 	/* This bit must be '1' to perform NVM defragmentation. */
68643 	#define HWRM_NVM_DEFRAG_INPUT_FLAGS_DEFRAG	UINT32_C(0x1)
68644 	uint8_t	unused_0[4];
68645 } hwrm_nvm_defrag_input_t, *phwrm_nvm_defrag_input_t;
68646 
68647 /* hwrm_nvm_defrag_output (size:128b/16B) */
68648 
68649 typedef struct hwrm_nvm_defrag_output {
68650 	/* The specific error status for the command. */
68651 	uint16_t	error_code;
68652 	/* The HWRM command request type. */
68653 	uint16_t	req_type;
68654 	/* The sequence ID from the original command. */
68655 	uint16_t	seq_id;
68656 	/* The length of the response data in number of bytes. */
68657 	uint16_t	resp_len;
68658 	uint8_t	unused_0[7];
68659 	/*
68660 	 * This field is used in Output records to indicate that the output
68661 	 * is completely written to RAM. This field should be read as '1'
68662 	 * to indicate that the output has been completely written. When
68663 	 * writing a command completion or response to an internal processor,
68664 	 * the order of writes has to be such that this field is written last.
68665 	 */
68666 	uint8_t	valid;
68667 } hwrm_nvm_defrag_output_t, *phwrm_nvm_defrag_output_t;
68668 
68669 /* hwrm_nvm_defrag_cmd_err (size:64b/8B) */
68670 
68671 typedef struct hwrm_nvm_defrag_cmd_err {
68672 	/*
68673 	 * command specific error codes that goes to
68674 	 * the cmd_err field in Common HWRM Error Response.
68675 	 */
68676 	uint8_t	code;
68677 	/* Unknown error */
68678 	#define HWRM_NVM_DEFRAG_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
68679 	/* NVM defragmentation could not be performed */
68680 	#define HWRM_NVM_DEFRAG_CMD_ERR_CODE_FAIL	UINT32_C(0x1)
68681 	#define HWRM_NVM_DEFRAG_CMD_ERR_CODE_LAST   HWRM_NVM_DEFRAG_CMD_ERR_CODE_FAIL
68682 	uint8_t	unused_0[7];
68683 } hwrm_nvm_defrag_cmd_err_t, *phwrm_nvm_defrag_cmd_err_t;
68684 
68685 /*******************************
68686  * hwrm_nvm_get_vpd_field_info *
68687  *******************************/
68688 
68689 
68690 /* hwrm_nvm_get_vpd_field_info_input (size:192b/24B) */
68691 
68692 typedef struct hwrm_nvm_get_vpd_field_info_input {
68693 	/* The HWRM command request type. */
68694 	uint16_t	req_type;
68695 	/*
68696 	 * The completion ring to send the completion event on. This should
68697 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68698 	 */
68699 	uint16_t	cmpl_ring;
68700 	/*
68701 	 * The sequence ID is used by the driver for tracking multiple
68702 	 * commands. This ID is treated as opaque data by the firmware and
68703 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68704 	 */
68705 	uint16_t	seq_id;
68706 	/*
68707 	 * The target ID of the command:
68708 	 * * 0x0-0xFFF8 - The function ID
68709 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68710 	 * * 0xFFFD - Reserved for user-space HWRM interface
68711 	 * * 0xFFFF - HWRM
68712 	 */
68713 	uint16_t	target_id;
68714 	/*
68715 	 * A physical address pointer pointing to a host buffer that the
68716 	 * command's response data will be written. This can be either a host
68717 	 * physical address (HPA) or a guest physical address (GPA) and must
68718 	 * point to a physically contiguous block of memory.
68719 	 */
68720 	uint64_t	resp_addr;
68721 	/*
68722 	 * Tag ID of the requested field. To request the Product Name
68723 	 * a value of [0x00, 0x82] should be used. All other fields
68724 	 * would use the two byte hexadecimal value of the ASCII
68725 	 * characters. The first letter of the ASCII keyword is recorded
68726 	 * in tag_id[0] and the next letter in tag_id[1].
68727 	 */
68728 	uint8_t	tag_id[2];
68729 	uint8_t	unused_0[6];
68730 } hwrm_nvm_get_vpd_field_info_input_t, *phwrm_nvm_get_vpd_field_info_input_t;
68731 
68732 /* hwrm_nvm_get_vpd_field_info_output (size:2176b/272B) */
68733 
68734 typedef struct hwrm_nvm_get_vpd_field_info_output {
68735 	/* The specific error status for the command. */
68736 	uint16_t	error_code;
68737 	/* The HWRM command request type. */
68738 	uint16_t	req_type;
68739 	/* The sequence ID from the original command. */
68740 	uint16_t	seq_id;
68741 	/* The length of the response data in number of bytes. */
68742 	uint16_t	resp_len;
68743 	/* Data retrieved from VPD field */
68744 	uint8_t	data[256];
68745 	/* size of data retrieved in bytes */
68746 	uint16_t	data_len;
68747 	uint8_t	unused_0[5];
68748 	/*
68749 	 * This field is used in Output records to indicate that the output
68750 	 * is completely written to RAM. This field should be read as '1'
68751 	 * to indicate that the output has been completely written. When
68752 	 * writing a command completion or response to an internal processor,
68753 	 * the order of writes has to be such that this field is written last.
68754 	 */
68755 	uint8_t	valid;
68756 } hwrm_nvm_get_vpd_field_info_output_t, *phwrm_nvm_get_vpd_field_info_output_t;
68757 
68758 /*******************************
68759  * hwrm_nvm_set_vpd_field_info *
68760  *******************************/
68761 
68762 
68763 /* hwrm_nvm_set_vpd_field_info_input (size:256b/32B) */
68764 
68765 typedef struct hwrm_nvm_set_vpd_field_info_input {
68766 	/* The HWRM command request type. */
68767 	uint16_t	req_type;
68768 	/*
68769 	 * The completion ring to send the completion event on. This should
68770 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68771 	 */
68772 	uint16_t	cmpl_ring;
68773 	/*
68774 	 * The sequence ID is used by the driver for tracking multiple
68775 	 * commands. This ID is treated as opaque data by the firmware and
68776 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68777 	 */
68778 	uint16_t	seq_id;
68779 	/*
68780 	 * The target ID of the command:
68781 	 * * 0x0-0xFFF8 - The function ID
68782 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68783 	 * * 0xFFFD - Reserved for user-space HWRM interface
68784 	 * * 0xFFFF - HWRM
68785 	 */
68786 	uint16_t	target_id;
68787 	/*
68788 	 * A physical address pointer pointing to a host buffer that the
68789 	 * command's response data will be written. This can be either a host
68790 	 * physical address (HPA) or a guest physical address (GPA) and must
68791 	 * point to a physically contiguous block of memory.
68792 	 */
68793 	uint64_t	resp_addr;
68794 	/*
68795 	 * This is the host address where
68796 	 * VPD data value will be copied from
68797 	 */
68798 	uint64_t	host_src_addr;
68799 	/*
68800 	 * Tag ID of the requested field. To request the Product Name
68801 	 * a value of [0x00, 0x82] should be used. All other fields
68802 	 * would use the two byte hexadecimal value of the ASCII
68803 	 * characters. The first letter of the ASCII keyword is recorded
68804 	 * in tag_id[0] and the next letter in tag_id[1].
68805 	 */
68806 	uint8_t	tag_id[2];
68807 	/* size of data in bytes */
68808 	uint16_t	data_len;
68809 	uint8_t	unused_0[4];
68810 } hwrm_nvm_set_vpd_field_info_input_t, *phwrm_nvm_set_vpd_field_info_input_t;
68811 
68812 /* hwrm_nvm_set_vpd_field_info_output (size:128b/16B) */
68813 
68814 typedef struct hwrm_nvm_set_vpd_field_info_output {
68815 	/* The specific error status for the command. */
68816 	uint16_t	error_code;
68817 	/* The HWRM command request type. */
68818 	uint16_t	req_type;
68819 	/* The sequence ID from the original command. */
68820 	uint16_t	seq_id;
68821 	/* The length of the response data in number of bytes. */
68822 	uint16_t	resp_len;
68823 	uint8_t	unused_0[7];
68824 	/*
68825 	 * This field is used in Output records to indicate that the output
68826 	 * is completely written to RAM. This field should be read as '1'
68827 	 * to indicate that the output has been completely written. When
68828 	 * writing a command completion or response to an internal processor,
68829 	 * the order of writes has to be such that this field is written last.
68830 	 */
68831 	uint8_t	valid;
68832 } hwrm_nvm_set_vpd_field_info_output_t, *phwrm_nvm_set_vpd_field_info_output_t;
68833 
68834 #define ROCE_SP_HSI_VERSION_MAJOR 1
68835 #define ROCE_SP_HSI_VERSION_MINOR 8
68836 #define ROCE_SP_HSI_VERSION_UPDATE 4
68837 #define ROCE_SP_HSI_VERSION_STR "1.8.4"
68838 /*
68839  * Following is the signature for ROCE_SP_HSI message field that indicates
68840  * not applicable (All F's). Need to cast it the size of the field if
68841  * needed.
68842  */
68843 #define ROCE_SP_HSI_NA_SIGNATURE ((uint32_t)(-1))
68844 
68845 /* cmdq_init (size:128b/16B) */
68846 
68847 typedef struct cmdq_init {
68848 	/* CMDQ PBL physical address. */
68849 	uint64_t	cmdq_pbl;
68850 	uint16_t	cmdq_size_cmdq_lvl;
68851 	/* CMDQ PBL indirection levels. */
68852 	#define CMDQ_INIT_CMDQ_LVL_MASK UINT32_C(0x3)
68853 	#define CMDQ_INIT_CMDQ_LVL_SFT  0
68854 	/* CMDQ size. */
68855 	#define CMDQ_INIT_CMDQ_SIZE_MASK UINT32_C(0xfffc)
68856 	#define CMDQ_INIT_CMDQ_SIZE_SFT 2
68857 	/* CREQ completion ring id. */
68858 	uint16_t	creq_ring_id;
68859 	/* Mailbox producer index. MSB must also be set. */
68860 	uint32_t	prod_idx;
68861 } cmdq_init_t, *pcmdq_init_t;
68862 
68863 /* cmdq_update (size:128b/16B) */
68864 
68865 typedef struct cmdq_update {
68866 	/* reserved64 is 64 b */
68867 	uint64_t	reserved64;
68868 	/* reserved32 is 32 b */
68869 	uint32_t	reserved32;
68870 	/* Mailbox producer index. */
68871 	uint32_t	prod_idx;
68872 } cmdq_update_t, *pcmdq_update_t;
68873 
68874 /* cmdq_base (size:128b/16B) */
68875 
68876 typedef struct cmdq_base {
68877 	/* Command opcode. */
68878 	uint8_t	opcode;
68879 	/*
68880 	 * Create QP command allocates QP context with the specified
68881 	 * SQ, RQ/SRQ, CQ and other parameters.
68882 	 */
68883 	#define CMDQ_BASE_OPCODE_CREATE_QP			UINT32_C(0x1)
68884 	/*
68885 	 * Destroy QP command deletes the QP context and ceases
68886 	 * any further reference.
68887 	 */
68888 	#define CMDQ_BASE_OPCODE_DESTROY_QP			UINT32_C(0x2)
68889 	/*
68890 	 * Modify QP command changes QP states and other QP specific
68891 	 * parameters.
68892 	 */
68893 	#define CMDQ_BASE_OPCODE_MODIFY_QP			UINT32_C(0x3)
68894 	/* Query QP command retrieves info about the specified QP. */
68895 	#define CMDQ_BASE_OPCODE_QUERY_QP			UINT32_C(0x4)
68896 	/* Create SRQ command allocates a SRQ with the specified parameters. */
68897 	#define CMDQ_BASE_OPCODE_CREATE_SRQ			UINT32_C(0x5)
68898 	/* Destroy SRQ command deletes and flushes the specified SRQ. */
68899 	#define CMDQ_BASE_OPCODE_DESTROY_SRQ			UINT32_C(0x6)
68900 	/* Query SRP command retrieves info about the specified SRQ. */
68901 	#define CMDQ_BASE_OPCODE_QUERY_SRQ			UINT32_C(0x8)
68902 	/* Create CQ command allocates a CQ with the specified parameters. */
68903 	#define CMDQ_BASE_OPCODE_CREATE_CQ			UINT32_C(0x9)
68904 	/* Destroy CQ command deletes and flushes the specified CQ. */
68905 	#define CMDQ_BASE_OPCODE_DESTROY_CQ			UINT32_C(0xa)
68906 	/* Resize CQ command resizes the specified CQ. */
68907 	#define CMDQ_BASE_OPCODE_RESIZE_CQ			UINT32_C(0xc)
68908 	/*
68909 	 * Allocate MRW command allocates a MR/MW with the specified parameters
68910 	 * and returns the region's L_KEY/R_KEY
68911 	 */
68912 	#define CMDQ_BASE_OPCODE_ALLOCATE_MRW			UINT32_C(0xd)
68913 	/*
68914 	 * De-allocate key command frees a MR/MW entry associated with the
68915 	 * specified key.
68916 	 */
68917 	#define CMDQ_BASE_OPCODE_DEALLOCATE_KEY		UINT32_C(0xe)
68918 	/* Register MR command registers memory to the specified MR. */
68919 	#define CMDQ_BASE_OPCODE_REGISTER_MR			UINT32_C(0xf)
68920 	/* Deregister MR command de-registers memory from the specified MR. */
68921 	#define CMDQ_BASE_OPCODE_DEREGISTER_MR		UINT32_C(0x10)
68922 	/* Add GID command adds a GID to the local address table. */
68923 	#define CMDQ_BASE_OPCODE_ADD_GID			UINT32_C(0x11)
68924 	/* Delete GID command deletes a GID from the local address table. */
68925 	#define CMDQ_BASE_OPCODE_DELETE_GID			UINT32_C(0x12)
68926 	/* Modify GID command modifies a GID in the local address table. */
68927 	#define CMDQ_BASE_OPCODE_MODIFY_GID			UINT32_C(0x17)
68928 	/* Query GID command queries a GID in the local address table. */
68929 	#define CMDQ_BASE_OPCODE_QUERY_GID			UINT32_C(0x18)
68930 	/* Create QP1 command allocates a QP1 only. */
68931 	#define CMDQ_BASE_OPCODE_CREATE_QP1			UINT32_C(0x13)
68932 	/* Destroy QP1 command deletes and flushes the specified QP1. */
68933 	#define CMDQ_BASE_OPCODE_DESTROY_QP1			UINT32_C(0x14)
68934 	/* Create AH command allocates an AH with the specified parameters. */
68935 	#define CMDQ_BASE_OPCODE_CREATE_AH			UINT32_C(0x15)
68936 	/* Destroy AH command deletes the specified AH. */
68937 	#define CMDQ_BASE_OPCODE_DESTROY_AH			UINT32_C(0x16)
68938 	/*
68939 	 * Initialize firmware command initializes the firmware with
68940 	 * the specified parameters.
68941 	 */
68942 	#define CMDQ_BASE_OPCODE_INITIALIZE_FW		UINT32_C(0x80)
68943 	/* De-initialize firmware command deinitializes the firmware. */
68944 	#define CMDQ_BASE_OPCODE_DEINITIALIZE_FW		UINT32_C(0x81)
68945 	/* Stop the function */
68946 	#define CMDQ_BASE_OPCODE_STOP_FUNC			UINT32_C(0x82)
68947 	/* Query the HW capabilities for the function. */
68948 	#define CMDQ_BASE_OPCODE_QUERY_FUNC			UINT32_C(0x83)
68949 	/*
68950 	 * Set the following resources for the function:
68951 	 * - Max QP, CQ, MR+MW, SRQ per PF
68952 	 * - Max QP, CQ, MR+MW, SRQ per VF
68953 	 */
68954 	#define CMDQ_BASE_OPCODE_SET_FUNC_RESOURCES		UINT32_C(0x84)
68955 	/*
68956 	 * Read the current state of any internal resource context. Can only be
68957 	 * issued from a PF.
68958 	 */
68959 	#define CMDQ_BASE_OPCODE_READ_CONTEXT			UINT32_C(0x85)
68960 	/*
68961 	 * Send a request from VF to pass a command to the PF. VF HSI is
68962 	 * suspended until the PF returns the response
68963 	 */
68964 	#define CMDQ_BASE_OPCODE_VF_BACKCHANNEL_REQUEST	UINT32_C(0x86)
68965 	/*
68966 	 * Read VF memory (primarily to get the backchannel request blob). Can
68967 	 * only be issued from a PF.
68968 	 */
68969 	#define CMDQ_BASE_OPCODE_READ_VF_MEMORY		UINT32_C(0x87)
68970 	/*
68971 	 * Write VF memory (primarily to put the backchannel response blob),
68972 	 * and reenable VF HSI (post a CAG completion to it). Can only be
68973 	 * issued from a PF.
68974 	 */
68975 	#define CMDQ_BASE_OPCODE_COMPLETE_VF_REQUEST		UINT32_C(0x88)
68976 	/*
68977 	 * Deprecated.
68978 	 * Extend resource (QPC, MRW, CQ, SRQ) array, after the host allocates
68979 	 * more. Can only be issued from a PF.
68980 	 */
68981 	#define CMDQ_BASE_OPCODE_EXTEND_CONTEXT_ARRAY_DEPRECATED UINT32_C(0x89)
68982 	/* Map TC to COS. Can only be issued from a PF. */
68983 	#define CMDQ_BASE_OPCODE_MAP_TC_TO_COS		UINT32_C(0x8a)
68984 	/* Query version. */
68985 	#define CMDQ_BASE_OPCODE_QUERY_VERSION		UINT32_C(0x8b)
68986 	/* Modify congestion control. Can only be issued from a PF. */
68987 	#define CMDQ_BASE_OPCODE_MODIFY_ROCE_CC		UINT32_C(0x8c)
68988 	/* Query congestion control. */
68989 	#define CMDQ_BASE_OPCODE_QUERY_ROCE_CC		UINT32_C(0x8d)
68990 	/* Query RoCE statistics. */
68991 	#define CMDQ_BASE_OPCODE_QUERY_ROCE_STATS		UINT32_C(0x8e)
68992 	/* Set LAG mode. */
68993 	#define CMDQ_BASE_OPCODE_SET_LINK_AGGR_MODE		UINT32_C(0x8f)
68994 	/* Modify CQ */
68995 	#define CMDQ_BASE_OPCODE_MODIFY_CQ			UINT32_C(0x90)
68996 	/*
68997 	 * Query QP for a PF other than the requesting PF. Also can query for
68998 	 * more than one QP.
68999 	 */
69000 	#define CMDQ_BASE_OPCODE_QUERY_QP_EXTEND		UINT32_C(0x91)
69001 	/* Query extended RoCE statistics. */
69002 	#define CMDQ_BASE_OPCODE_QUERY_ROCE_STATS_EXT		UINT32_C(0x92)
69003 	/*
69004 	 * This command updates the QP context id ranges on the PF,
69005 	 * to orchestrate QP context id range migration.
69006 	 * This command is valid for devices that
69007 	 * support the pseudo-static QP allocation feature.
69008 	 */
69009 	#define CMDQ_BASE_OPCODE_ORCHESTRATE_QID_MIGRATION	UINT32_C(0x93)
69010 	/*
69011 	 * This command allocates a batch of the requested count of QPs
69012 	 * in a sequential range.
69013 	 */
69014 	#define CMDQ_BASE_OPCODE_CREATE_QP_BATCH		UINT32_C(0x94)
69015 	/*
69016 	 * This command deletes a batch of the requested count of QPs.
69017 	 * The starting QP ID can be specified to request a batch deletion
69018 	 * of a sequential range.
69019 	 */
69020 	#define CMDQ_BASE_OPCODE_DESTROY_QP_BATCH		UINT32_C(0x95)
69021 	/*
69022 	 * This command allocates an extended RoCE statistics context
69023 	 * that supports periodic DMA to a host address. The extended
69024 	 * statistics context id can be assigned by the driver
69025 	 * via `create_qp`, `create_qp_batch`, or `modify_qp` to a specific QP,
69026 	 * a subset of QPs or to all QPs of a specific function.
69027 	 * These statistics can be queried via `query_roce_stats_ext_v2`.
69028 	 */
69029 	#define CMDQ_BASE_OPCODE_ALLOCATE_ROCE_STATS_EXT_CTX	UINT32_C(0x96)
69030 	/* This command deallocates an extended RoCE statistics context. */
69031 	#define CMDQ_BASE_OPCODE_DEALLOCATE_ROCE_STATS_EXT_CTX   UINT32_C(0x97)
69032 	/*
69033 	 * This command queries extended RoCE statistics for context
69034 	 * allocated via `allocate_roce_stats_ext_ctx`.
69035 	 */
69036 	#define CMDQ_BASE_OPCODE_QUERY_ROCE_STATS_EXT_V2	UINT32_C(0x98)
69037 	#define CMDQ_BASE_OPCODE_LAST			CMDQ_BASE_OPCODE_QUERY_ROCE_STATS_EXT_V2
69038 	/* Size of the command in 16-byte units. */
69039 	uint8_t	cmd_size;
69040 	/* Flags and attribs of the command. */
69041 	uint16_t	flags;
69042 	/* Driver supplied handle to associate the command and the response. */
69043 	uint16_t	cookie;
69044 	/* Size of the response buffer in 16-byte units. */
69045 	uint8_t	resp_size;
69046 	uint8_t	reserved8;
69047 	/* Host address of the response. */
69048 	uint64_t	resp_addr;
69049 } cmdq_base_t, *pcmdq_base_t;
69050 
69051 /* creq_base (size:128b/16B) */
69052 
69053 typedef struct creq_base {
69054 	uint8_t	type;
69055 	/*
69056 	 * This field indicates the exact type of the completion.
69057 	 * By convention, the LSB identifies the length of the
69058 	 * record in 16B units. Even values indicate 16B
69059 	 * records. Odd values indicate 32B
69060 	 * records.
69061 	 */
69062 	#define CREQ_BASE_TYPE_MASK	UINT32_C(0x3f)
69063 	#define CREQ_BASE_TYPE_SFT	0
69064 	/* QP Async Notification */
69065 		#define CREQ_BASE_TYPE_QP_EVENT	UINT32_C(0x38)
69066 	/* Function Async Notification */
69067 		#define CREQ_BASE_TYPE_FUNC_EVENT  UINT32_C(0x3a)
69068 		#define CREQ_BASE_TYPE_LAST	CREQ_BASE_TYPE_FUNC_EVENT
69069 	uint8_t	reserved56[7];
69070 	uint8_t	v;
69071 	/*
69072 	 * This value is written by the NIC such that it will be different
69073 	 * for each pass through the completion queue. The even passes
69074 	 * will write 1. The odd passes will write 0.
69075 	 */
69076 	#define CREQ_BASE_V	UINT32_C(0x1)
69077 	/* This is the modifier on to the type field. */
69078 	uint8_t	event;
69079 	uint8_t	reserved48[6];
69080 } creq_base_t, *pcreq_base_t;
69081 
69082 /* creq_resp_sb_hdr (size:64b/8B) */
69083 
69084 typedef struct creq_resp_sb_hdr {
69085 	/* Command opcode. */
69086 	uint8_t	opcode;
69087 	/* Query QP command response. */
69088 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_QP		UINT32_C(0x4)
69089 	/* Query SRQ command response. */
69090 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_SRQ		UINT32_C(0x8)
69091 	/* Query GID command response. */
69092 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_GID		UINT32_C(0x18)
69093 	/* Query info PF command response */
69094 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_FUNC		UINT32_C(0x83)
69095 	/* Query version response. */
69096 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_VERSION	UINT32_C(0x8b)
69097 	/* Query congestion control response. */
69098 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_ROCE_CC	UINT32_C(0x8d)
69099 	/* Query RoCE statistics response. */
69100 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_ROCE_STATS	UINT32_C(0x8e)
69101 	/* Query QP extended response. */
69102 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_QP_EXTEND	UINT32_C(0x91)
69103 	/* Query extended RoCE statistics response. */
69104 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_ROCE_STATS_EXT	UINT32_C(0x92)
69105 	/* Query extended RoCE statistics v2 response. */
69106 	#define CREQ_RESP_SB_HDR_OPCODE_QUERY_ROCE_STATS_EXT_V2 UINT32_C(0x98)
69107 	#define CREQ_RESP_SB_HDR_OPCODE_LAST		CREQ_RESP_SB_HDR_OPCODE_QUERY_ROCE_STATS_EXT_V2
69108 	/* Status of the response. */
69109 	uint8_t	status;
69110 	/* Driver supplied handle to associate the command and the response. */
69111 	uint16_t	cookie;
69112 	/* Flags and attribs of the command. */
69113 	uint16_t	flags;
69114 	/* Size of the response buffer in 16-byte units. */
69115 	uint8_t	resp_size;
69116 	uint8_t	reserved8;
69117 } creq_resp_sb_hdr_t, *pcreq_resp_sb_hdr_t;
69118 
69119 /*
69120  * Structure to be used for the qp_params array of
69121  * the `create_qp_batch` command.
69122  */
69123 /* create_qp_batch_data (size:768b/96B) */
69124 
69125 typedef struct create_qp_batch_data {
69126 	/* QP handle. */
69127 	uint64_t	qp_handle;
69128 	/* Create QP flags. */
69129 	uint32_t	qp_flags;
69130 	/*
69131 	 * SRQ is used.
69132 	 * This flag is not supported on express mode QPs.
69133 	 */
69134 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_SRQ_USED		UINT32_C(0x1)
69135 	/* post CQE for all SQ WQEs. */
69136 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_FORCE_COMPLETION	UINT32_C(0x2)
69137 	/* This QP can use reserved L_Key */
69138 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_RESERVED_LKEY_ENABLE	UINT32_C(0x4)
69139 	/* This QP can fast register physical memory */
69140 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_FR_PMR_ENABLED		UINT32_C(0x8)
69141 	/* This QP can send variable sized WQEs. */
69142 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_VARIABLE_SIZED_WQE_ENABLED UINT32_C(0x10)
69143 	/*
69144 	 * WQEs with inline data sent on this QP are able to flow
69145 	 * through an optimized transmit path to lower latency. This
69146 	 * transmit path is opportunistic and not guaranteed to always
69147 	 * occur.
69148 	 */
69149 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_OPTIMIZED_TRANSMIT_ENABLED UINT32_C(0x20)
69150 	/*
69151 	 * For UD QPs the default responder CQE format is `cq_res_ud`.
69152 	 * This flag specifies the `cq_res_ud_cfa` format to be used
69153 	 * instead.
69154 	 */
69155 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_RESPONDER_UD_CQE_WITH_CFA  UINT32_C(0x40)
69156 	/*
69157 	 * This QP must be included in the extended RoCE statistics
69158 	 * that can be queried via `query_roce_stats_ext`.
69159 	 */
69160 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_EXT_STATS_ENABLED	UINT32_C(0x80)
69161 	/* This QP uses express mode. */
69162 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_EXPRESS_MODE_ENABLED	UINT32_C(0x100)
69163 	/* This QP uses the steering tag specified in the command. */
69164 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_STEERING_TAG_VALID	UINT32_C(0x200)
69165 	/*
69166 	 * This QP can be used for RDMA Read or Atomic operations.
69167 	 * This value is used to optimize metadata memory allocation
69168 	 * when the device supports `internal_queue_memory` feature.
69169 	 */
69170 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_RDMA_READ_OR_ATOMICS_USED  UINT32_C(0x400)
69171 	/*
69172 	 * This QP must be included in the extended RoCE statistics context
69173 	 * specified in the field `ext_stats_ctx_id`
69174 	 */
69175 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_EXT_STATS_CTX_VALID	UINT32_C(0x800)
69176 	/* The schq_id field passed in by the caller is valid. */
69177 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_SCHQ_ID_VALID		UINT32_C(0x1000)
69178 	#define CREATE_QP_BATCH_DATA_QP_FLAGS_LAST			CREATE_QP_BATCH_DATA_QP_FLAGS_SCHQ_ID_VALID
69179 	/* Supported QP types. */
69180 	uint8_t	type;
69181 	/* Reliable Connection. */
69182 	#define CREATE_QP_BATCH_DATA_TYPE_RC		UINT32_C(0x2)
69183 	/* Unreliable Datagram. */
69184 	#define CREATE_QP_BATCH_DATA_TYPE_UD		UINT32_C(0x4)
69185 	/* Raw Ethertype. */
69186 	#define CREATE_QP_BATCH_DATA_TYPE_RAW_ETHERTYPE UINT32_C(0x6)
69187 	/* General Services Interface on QP1 over UD. */
69188 	#define CREATE_QP_BATCH_DATA_TYPE_GSI	UINT32_C(0x7)
69189 	#define CREATE_QP_BATCH_DATA_TYPE_LAST	CREATE_QP_BATCH_DATA_TYPE_GSI
69190 	uint8_t	sq_pg_size_sq_lvl;
69191 	/*
69192 	 * SQ PBL indirect levels.
69193 	 * This field is ignored for express mode QPs.
69194 	 */
69195 	#define CREATE_QP_BATCH_DATA_SQ_LVL_MASK	UINT32_C(0xf)
69196 	#define CREATE_QP_BATCH_DATA_SQ_LVL_SFT	0
69197 	/* PBL pointer is physical start address. */
69198 		#define CREATE_QP_BATCH_DATA_SQ_LVL_LVL_0	UINT32_C(0x0)
69199 	/* PBL pointer points to PTE table. */
69200 		#define CREATE_QP_BATCH_DATA_SQ_LVL_LVL_1	UINT32_C(0x1)
69201 	/*
69202 	 * PBL pointer points to PDE table with each entry pointing to
69203 	 * PTE tables.
69204 	 */
69205 		#define CREATE_QP_BATCH_DATA_SQ_LVL_LVL_2	UINT32_C(0x2)
69206 		#define CREATE_QP_BATCH_DATA_SQ_LVL_LAST	CREATE_QP_BATCH_DATA_SQ_LVL_LVL_2
69207 	/*
69208 	 * SQ page size.
69209 	 * This field is ignored for express mode QPs.
69210 	 */
69211 	#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_MASK  UINT32_C(0xf0)
69212 	#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_SFT   4
69213 	/* 4KB. */
69214 		#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69215 	/* 8KB. */
69216 		#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69217 	/* 64KB. */
69218 		#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69219 	/* 2MB. */
69220 		#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69221 	/* 8MB. */
69222 		#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69223 	/* 1GB. */
69224 		#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69225 		#define CREATE_QP_BATCH_DATA_SQ_PG_SIZE_LAST   CREATE_QP_BATCH_DATA_SQ_PG_SIZE_PG_1G
69226 	uint8_t	rq_pg_size_rq_lvl;
69227 	/*
69228 	 * RQ PBL indirect levels.
69229 	 * This field is ignored for express mode QPs.
69230 	 */
69231 	#define CREATE_QP_BATCH_DATA_RQ_LVL_MASK	UINT32_C(0xf)
69232 	#define CREATE_QP_BATCH_DATA_RQ_LVL_SFT	0
69233 	/* PBL pointer is physical start address. */
69234 		#define CREATE_QP_BATCH_DATA_RQ_LVL_LVL_0	UINT32_C(0x0)
69235 	/* PBL pointer points to PTE table. */
69236 		#define CREATE_QP_BATCH_DATA_RQ_LVL_LVL_1	UINT32_C(0x1)
69237 	/*
69238 	 * PBL pointer points to PDE table with each entry pointing to
69239 	 * PTE tables.
69240 	 */
69241 		#define CREATE_QP_BATCH_DATA_RQ_LVL_LVL_2	UINT32_C(0x2)
69242 		#define CREATE_QP_BATCH_DATA_RQ_LVL_LAST	CREATE_QP_BATCH_DATA_RQ_LVL_LVL_2
69243 	/*
69244 	 * RQ page size.
69245 	 * This field is ignored for express mode QPs.
69246 	 */
69247 	#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_MASK  UINT32_C(0xf0)
69248 	#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_SFT   4
69249 	/* 4KB. */
69250 		#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69251 	/* 8KB. */
69252 		#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69253 	/* 64KB. */
69254 		#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69255 	/* 2MB. */
69256 		#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69257 	/* 8MB. */
69258 		#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69259 	/* 1GB. */
69260 		#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69261 		#define CREATE_QP_BATCH_DATA_RQ_PG_SIZE_LAST   CREATE_QP_BATCH_DATA_RQ_PG_SIZE_PG_1G
69262 	uint8_t	unused_0;
69263 	/* Doorbell page index. */
69264 	uint32_t	dpi;
69265 	/*
69266 	 * When the SQ is configured to use variable-size WQE, 'sq_size'
69267 	 * denotes the SQ size with a unit of 16B. When the SQ is configured
69268 	 * to use fixed-size WQE, 'sq_size' denotes the max number of SQ WQEs.
69269 	 */
69270 	uint32_t	sq_size;
69271 	/* Max number of RQ wqes. */
69272 	uint32_t	rq_size;
69273 	uint16_t	sq_fwo_sq_sge;
69274 	/*
69275 	 * Max send SGEs per SWQE. This is only applicable to fixed-size
69276 	 * WQE support. On variable-size WQE, this is ignored.
69277 	 */
69278 	#define CREATE_QP_BATCH_DATA_SQ_SGE_MASK UINT32_C(0xf)
69279 	#define CREATE_QP_BATCH_DATA_SQ_SGE_SFT 0
69280 	/*
69281 	 * Offset of First WQE in the first SQ page, in 128 byte units.
69282 	 * This field is ignored for express mode QPs.
69283 	 */
69284 	#define CREATE_QP_BATCH_DATA_SQ_FWO_MASK UINT32_C(0xfff0)
69285 	#define CREATE_QP_BATCH_DATA_SQ_FWO_SFT 4
69286 	uint16_t	rq_fwo_rq_sge;
69287 	/*
69288 	 * Max recv SGEs per RWQE.
69289 	 * On chips with variable-size WQE support, a value of zero implies
69290 	 * 30 SGEs.
69291 	 */
69292 	#define CREATE_QP_BATCH_DATA_RQ_SGE_MASK UINT32_C(0xf)
69293 	#define CREATE_QP_BATCH_DATA_RQ_SGE_SFT 0
69294 	/*
69295 	 * Offset of First WQE in the first RQ page, in 128 byte units.
69296 	 * This field is ignored for express mode QPs.
69297 	 */
69298 	#define CREATE_QP_BATCH_DATA_RQ_FWO_MASK UINT32_C(0xfff0)
69299 	#define CREATE_QP_BATCH_DATA_RQ_FWO_SFT 4
69300 	/* Send CQ context id. */
69301 	uint32_t	scq_cid;
69302 	/* Receive CQ context id. */
69303 	uint32_t	rcq_cid;
69304 	/* SRQ context id. */
69305 	uint32_t	srq_cid;
69306 	/* Protection domain id. */
69307 	uint32_t	pd_id;
69308 	/*
69309 	 * SQ PBL physical address.
69310 	 * This field is ignored for express mode QPs.
69311 	 */
69312 	uint64_t	sq_pbl;
69313 	/*
69314 	 * RQ PBL physical address.
69315 	 * This field is ignored for express mode QPs.
69316 	 */
69317 	uint64_t	rq_pbl;
69318 	/*
69319 	 * IRRQ address. This field is ignored on devices that
69320 	 * support the `internal_queue_memory` feature.
69321 	 */
69322 	uint64_t	irrq_addr;
69323 	/*
69324 	 * ORRQ address. This field is ignored on devices that
69325 	 * support the `internal_queue_memory` feature.
69326 	 */
69327 	uint64_t	orrq_addr;
69328 	/*
69329 	 * xid to use for the non-QP1 QP.
69330 	 * The requested xid must be within the valid range
69331 	 * of the predetermined assignment scheme of the
69332 	 * pseudo static QP allocation feature. The valid range
69333 	 * for the data QPs is determined by the start_qid and
69334 	 * max_qp fields of query_func response. When the value is zero,
69335 	 * firmware will automatically choose an xid from its free pool.
69336 	 * QP1 allocation, indicated by specifying `type` field as gsi,
69337 	 * must specify a request_xid as zero.
69338 	 * This field is ignored on devices that do not support
69339 	 * the pseudo static QP allocation feature.
69340 	 */
69341 	uint32_t	request_xid;
69342 	/* Steering tag to use for memory transactions. */
69343 	uint16_t	steering_tag;
69344 	/*
69345 	 * This value is used to optimize metadata memory allocation when
69346 	 * the device supports `internal_queue_memory` feature.
69347 	 * When the SQ is configured to use variable-size WQEs, the SQ size is
69348 	 * only specified in units of 16 Bytes. This value hints the max number
69349 	 * of WQEs that would ever be present on the SQ.
69350 	 */
69351 	uint16_t	sq_max_num_wqes;
69352 	/* Extended RoCE statistics context id. */
69353 	uint32_t	ext_stats_ctx_id;
69354 	/*
69355 	 * Identifies the new scheduling queue to associate with
69356 	 * the RoCE QP. A value of zero indicates that the QP is being
69357 	 * created with the default scheduling queue. Can only be specified
69358 	 * by the PF driver. VFs get assigned a scheduling queue based on PF
69359 	 * configuration (via HWRM_FUNC_CFG). Specified scheduling queue id is
69360 	 * allocated by firmware (via HWRM_SCHQ_ALLOC) when the device supports
69361 	 * the `scheduling queue` feature.
69362 	 */
69363 	uint16_t	schq_id;
69364 	uint16_t	reserved16;
69365 } create_qp_batch_data_t, *pcreate_qp_batch_data_t;
69366 
69367 /* Periodic extended RoCE statistics context DMA to host. */
69368 /* roce_stats_ext_ctx (size:1856b/232B) */
69369 
69370 typedef struct roce_stats_ext_ctx {
69371 	/* Number of transmitted Atomic request packets without errors. */
69372 	uint64_t	tx_atomic_req_pkts;
69373 	/* Number of transmitted Read request packets without errors. */
69374 	uint64_t	tx_read_req_pkts;
69375 	/* Number of transmitted Read response packets without errors. */
69376 	uint64_t	tx_read_res_pkts;
69377 	/* Number of transmitted Write request packets without errors. */
69378 	uint64_t	tx_write_req_pkts;
69379 	/* Number of transmitted RC Send packets without errors. */
69380 	uint64_t	tx_rc_send_req_pkts;
69381 	/*
69382 	 * Number of transmitted UD Send (including QP1) packets
69383 	 * without errors.
69384 	 */
69385 	uint64_t	tx_ud_send_req_pkts;
69386 	/* Number of transmitted CNPs. Includes DCN_CNPs. */
69387 	uint64_t	tx_cnp_pkts;
69388 	/*
69389 	 * Number of transmitted RoCE packets.
69390 	 * This includes RC, UD, RawEth, and QP1 packets
69391 	 */
69392 	uint64_t	tx_roce_pkts;
69393 	/*
69394 	 * Number of transmitted RoCE header and payload bytes.
69395 	 * This includes RC, UD, RawEth, and QP1 packets.
69396 	 */
69397 	uint64_t	tx_roce_bytes;
69398 	/*
69399 	 * Number of drops that occurred to lack of buffers.
69400 	 * This count includes RC sends, RC writes with immediate,
69401 	 * UD sends, RawEth, and QP1 packets dropped due to lack of buffers.
69402 	 */
69403 	uint64_t	rx_out_of_buffer_pkts;
69404 	/* Number of packets that were received out of sequence. */
69405 	uint64_t	rx_out_of_sequence_pkts;
69406 	/*
69407 	 * Number of duplicate read/atomic requests resulting in responder
69408 	 * hardware retransmission.
69409 	 */
69410 	uint64_t	dup_req;
69411 	/*
69412 	 * Number of missing response packets resulting in hardware
69413 	 * retransmission.
69414 	 */
69415 	uint64_t	missing_resp;
69416 	/*
69417 	 * Number of sequence error NAKs received resulting in hardware
69418 	 * retransmission.
69419 	 */
69420 	uint64_t	seq_err_naks_rcvd;
69421 	/* Number of RNR NAKs received resulting in hardware retransmission. */
69422 	uint64_t	rnr_naks_rcvd;
69423 	/* Number of timeouts resulting in hardware retransmission. */
69424 	uint64_t	to_retransmits;
69425 	/* Number of received Atomic request packets without errors. */
69426 	uint64_t	rx_atomic_req_pkts;
69427 	/* Number of received Read request packets without errors. */
69428 	uint64_t	rx_read_req_pkts;
69429 	/* Number of received Read response packets without errors. */
69430 	uint64_t	rx_read_res_pkts;
69431 	/* Number of received Write request packets without errors. */
69432 	uint64_t	rx_write_req_pkts;
69433 	/* Number of received RC Send packets without errors. */
69434 	uint64_t	rx_rc_send_pkts;
69435 	/* Number of received UD Send packets without errors. */
69436 	uint64_t	rx_ud_send_pkts;
69437 	/* Number of received DCN payload cut packets. */
69438 	uint64_t	rx_dcn_payload_cut;
69439 	/* Number of received ECN-marked packets. */
69440 	uint64_t	rx_ecn_marked_pkts;
69441 	/* Number of received CNP packets. Includes DCN_CNPs. */
69442 	uint64_t	rx_cnp_pkts;
69443 	/*
69444 	 * Number of received RoCE packets including RoCE packets with errors.
69445 	 * This includes RC, UD, RawEth, and QP1 packets
69446 	 */
69447 	uint64_t	rx_roce_pkts;
69448 	/*
69449 	 * Number of received RoCE header and payload bytes including RoCE
69450 	 * packets with errors.
69451 	 * This includes RC, UD, RawEth, and QP1 packets.
69452 	 */
69453 	uint64_t	rx_roce_bytes;
69454 	/*
69455 	 * Number of received RoCE packets without errors.
69456 	 * This includes RC, UD, RawEth, and QP1 packets
69457 	 */
69458 	uint64_t	rx_roce_good_pkts;
69459 	/*
69460 	 * Number of received RoCE header and payload bytes without errors.
69461 	 * This includes RC, UD, RawEth, and QP1 packets.
69462 	 */
69463 	uint64_t	rx_roce_good_bytes;
69464 } roce_stats_ext_ctx_t, *proce_stats_ext_ctx_t;
69465 
69466 /*****************
69467  * query_version *
69468  *****************/
69469 
69470 
69471 /* cmdq_query_version (size:128b/16B) */
69472 
69473 typedef struct cmdq_query_version {
69474 	/* Command opcode. */
69475 	uint8_t	opcode;
69476 	/* Query version. */
69477 	#define CMDQ_QUERY_VERSION_OPCODE_QUERY_VERSION UINT32_C(0x8b)
69478 	#define CMDQ_QUERY_VERSION_OPCODE_LAST	CMDQ_QUERY_VERSION_OPCODE_QUERY_VERSION
69479 	/* Size of the command in 16-byte units. */
69480 	uint8_t	cmd_size;
69481 	/* Flags and attribs of the command. */
69482 	uint16_t	flags;
69483 	/* Driver supplied handle to associate the command and the response. */
69484 	uint16_t	cookie;
69485 	/* Size of the response buffer in 16-byte units. */
69486 	uint8_t	resp_size;
69487 	uint8_t	reserved8;
69488 	/* Host address of the response. */
69489 	uint64_t	resp_addr;
69490 } cmdq_query_version_t, *pcmdq_query_version_t;
69491 
69492 /* creq_query_version_resp (size:128b/16B) */
69493 
69494 typedef struct creq_query_version_resp {
69495 	uint8_t	type;
69496 	/*
69497 	 * This field indicates the exact type of the completion.
69498 	 * By convention, the LSB identifies the length of the
69499 	 * record in 16B units. Even values indicate 16B
69500 	 * records. Odd values indicate 32B
69501 	 * records.
69502 	 */
69503 	#define CREQ_QUERY_VERSION_RESP_TYPE_MASK	UINT32_C(0x3f)
69504 	#define CREQ_QUERY_VERSION_RESP_TYPE_SFT	0
69505 	/* QP Async Notification */
69506 		#define CREQ_QUERY_VERSION_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
69507 		#define CREQ_QUERY_VERSION_RESP_TYPE_LAST	CREQ_QUERY_VERSION_RESP_TYPE_QP_EVENT
69508 	/* Status of the response. */
69509 	uint8_t	status;
69510 	/* Driver supplied handle to associate the command and the response. */
69511 	uint16_t	cookie;
69512 	/* firmware major version */
69513 	uint8_t	fw_maj;
69514 	/* firmware minor version */
69515 	uint8_t	fw_minor;
69516 	/* firmware build version */
69517 	uint8_t	fw_bld;
69518 	/* firmware reserved version */
69519 	uint8_t	fw_rsvd;
69520 	uint8_t	v;
69521 	/*
69522 	 * This value is written by the NIC such that it will be different
69523 	 * for each pass through the completion queue. The even passes
69524 	 * will write 1. The odd passes will write 0.
69525 	 */
69526 	#define CREQ_QUERY_VERSION_RESP_V	UINT32_C(0x1)
69527 	/* Event or command opcode. */
69528 	uint8_t	event;
69529 	/* Query firmware and interface version response. */
69530 	#define CREQ_QUERY_VERSION_RESP_EVENT_QUERY_VERSION UINT32_C(0x8b)
69531 	#define CREQ_QUERY_VERSION_RESP_EVENT_LAST	CREQ_QUERY_VERSION_RESP_EVENT_QUERY_VERSION
69532 	uint16_t	reserved16;
69533 	/* interface major version */
69534 	uint8_t	intf_maj;
69535 	/* interface minor version */
69536 	uint8_t	intf_minor;
69537 	/* interface build version */
69538 	uint8_t	intf_bld;
69539 	/* interface reserved version */
69540 	uint8_t	intf_rsvd;
69541 } creq_query_version_resp_t, *pcreq_query_version_resp_t;
69542 
69543 /*****************
69544  * initialize_fw *
69545  *****************/
69546 
69547 
69548 /* cmdq_initialize_fw (size:1024b/128B) */
69549 
69550 typedef struct cmdq_initialize_fw {
69551 	/* Command opcode. */
69552 	uint8_t	opcode;
69553 	/*
69554 	 * Initialize firmware command initializes the firmware with
69555 	 * the specified parameters.
69556 	 */
69557 	#define CMDQ_INITIALIZE_FW_OPCODE_INITIALIZE_FW UINT32_C(0x80)
69558 	#define CMDQ_INITIALIZE_FW_OPCODE_LAST	CMDQ_INITIALIZE_FW_OPCODE_INITIALIZE_FW
69559 	/* Size of the command in 16-byte units. */
69560 	uint8_t	cmd_size;
69561 	/* Flags and attribs of the command. */
69562 	uint16_t	flags;
69563 	/*
69564 	 * When set, the 32b `max_mrw_per_vf` field is logically divided
69565 	 * into two 16b fields, `max_mr_per_vf` and `max_av_per_vf`.
69566 	 */
69567 	#define CMDQ_INITIALIZE_FW_FLAGS_MRAV_RESERVATION_SPLIT	UINT32_C(0x1)
69568 	/*
69569 	 * When set, the hardware based requester retransmission
69570 	 * feature is supported.
69571 	 */
69572 	#define CMDQ_INITIALIZE_FW_FLAGS_HW_REQUESTER_RETX_SUPPORTED	UINT32_C(0x2)
69573 	/* When set, the driver version is provided. */
69574 	#define CMDQ_INITIALIZE_FW_FLAGS_DRV_VERSION			UINT32_C(0x4)
69575 	/* When set, driver supports optimizing Modify QP operation. */
69576 	#define CMDQ_INITIALIZE_FW_FLAGS_OPTIMIZE_MODIFY_QP_SUPPORTED	UINT32_C(0x8)
69577 	/*
69578 	 * When set, the VF RoCE resources will be managed by the L2
69579 	 * driver via func_cfg.
69580 	 */
69581 	#define CMDQ_INITIALIZE_FW_FLAGS_L2_VF_RESOURCE_MGMT		UINT32_C(0x10)
69582 	/* Driver supplied handle to associate the command and the response. */
69583 	uint16_t	cookie;
69584 	/* Size of the response buffer in 16-byte units. */
69585 	uint8_t	resp_size;
69586 	uint8_t	reserved8;
69587 	/* Host address of the response. */
69588 	uint64_t	resp_addr;
69589 	uint8_t	qpc_pg_size_qpc_lvl;
69590 	/* QPC PBL indirect levels. */
69591 	#define CMDQ_INITIALIZE_FW_QPC_LVL_MASK	UINT32_C(0xf)
69592 	#define CMDQ_INITIALIZE_FW_QPC_LVL_SFT	0
69593 	/* PBL pointer is physical start address. */
69594 		#define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_0	UINT32_C(0x0)
69595 	/* PBL pointer points to PTE table. */
69596 		#define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_1	UINT32_C(0x1)
69597 	/*
69598 	 * PBL pointer points to PDE table with each entry pointing to
69599 	 * PTE tables.
69600 	 */
69601 		#define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_2	UINT32_C(0x2)
69602 		#define CMDQ_INITIALIZE_FW_QPC_LVL_LAST	CMDQ_INITIALIZE_FW_QPC_LVL_LVL_2
69603 	/* QPC page size. */
69604 	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_MASK  UINT32_C(0xf0)
69605 	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_SFT   4
69606 	/* 4KB. */
69607 		#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69608 	/* 8KB. */
69609 		#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69610 	/* 64KB. */
69611 		#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69612 	/* 2MB. */
69613 		#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69614 	/* 8MB. */
69615 		#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69616 	/* 1GB. */
69617 		#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69618 		#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_1G
69619 	uint8_t	mrw_pg_size_mrw_lvl;
69620 	/* MRW PBL indirect levels. */
69621 	#define CMDQ_INITIALIZE_FW_MRW_LVL_MASK	UINT32_C(0xf)
69622 	#define CMDQ_INITIALIZE_FW_MRW_LVL_SFT	0
69623 	/* PBL pointer is physical start address. */
69624 		#define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_0	UINT32_C(0x0)
69625 	/* PBL pointer points to PTE table. */
69626 		#define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_1	UINT32_C(0x1)
69627 	/*
69628 	 * PBL pointer points to PDE table with each entry pointing to PTE
69629 	 * tables.
69630 	 */
69631 		#define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_2	UINT32_C(0x2)
69632 		#define CMDQ_INITIALIZE_FW_MRW_LVL_LAST	CMDQ_INITIALIZE_FW_MRW_LVL_LVL_2
69633 	/* MRW page size. */
69634 	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_MASK  UINT32_C(0xf0)
69635 	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_SFT   4
69636 	/* 4KB. */
69637 		#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69638 	/* 8KB. */
69639 		#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69640 	/* 64KB. */
69641 		#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69642 	/* 2MB. */
69643 		#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69644 	/* 8MB. */
69645 		#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69646 	/* 1GB. */
69647 		#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69648 		#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_1G
69649 	uint8_t	srq_pg_size_srq_lvl;
69650 	/* SRQ PBL indirect levels. */
69651 	#define CMDQ_INITIALIZE_FW_SRQ_LVL_MASK	UINT32_C(0xf)
69652 	#define CMDQ_INITIALIZE_FW_SRQ_LVL_SFT	0
69653 	/* PBL pointer is physical start address. */
69654 		#define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_0	UINT32_C(0x0)
69655 	/* PBL pointer points to PTE table. */
69656 		#define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_1	UINT32_C(0x1)
69657 	/*
69658 	 * PBL pointer points to PDE table with each entry pointing to PTE
69659 	 * tables.
69660 	 */
69661 		#define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_2	UINT32_C(0x2)
69662 		#define CMDQ_INITIALIZE_FW_SRQ_LVL_LAST	CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_2
69663 	/* SRQ page size. */
69664 	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_MASK  UINT32_C(0xf0)
69665 	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_SFT   4
69666 	/* 4KB. */
69667 		#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69668 	/* 8KB. */
69669 		#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69670 	/* 64KB. */
69671 		#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69672 	/* 2MB. */
69673 		#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69674 	/* 8MB. */
69675 		#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69676 	/* 1GB. */
69677 		#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69678 		#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_1G
69679 	uint8_t	cq_pg_size_cq_lvl;
69680 	/* CQ PBL indirect levels. */
69681 	#define CMDQ_INITIALIZE_FW_CQ_LVL_MASK	UINT32_C(0xf)
69682 	#define CMDQ_INITIALIZE_FW_CQ_LVL_SFT	0
69683 	/* PBL pointer is physical start address. */
69684 		#define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_0	UINT32_C(0x0)
69685 	/* PBL pointer points to PTE table. */
69686 		#define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_1	UINT32_C(0x1)
69687 	/*
69688 	 * PBL pointer points to PDE table with each entry pointing to PTE
69689 	 * tables.
69690 	 */
69691 		#define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_2	UINT32_C(0x2)
69692 		#define CMDQ_INITIALIZE_FW_CQ_LVL_LAST	CMDQ_INITIALIZE_FW_CQ_LVL_LVL_2
69693 	/* CQ page size. */
69694 	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_MASK  UINT32_C(0xf0)
69695 	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_SFT   4
69696 	/* 4KB. */
69697 		#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69698 	/* 8KB. */
69699 		#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69700 	/* 64KB. */
69701 		#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69702 	/* 2MB. */
69703 		#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69704 	/* 8MB. */
69705 		#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69706 	/* 1GB. */
69707 		#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69708 		#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_1G
69709 	uint8_t	tqm_pg_size_tqm_lvl;
69710 	/* TQM PBL indirect levels. */
69711 	#define CMDQ_INITIALIZE_FW_TQM_LVL_MASK	UINT32_C(0xf)
69712 	#define CMDQ_INITIALIZE_FW_TQM_LVL_SFT	0
69713 	/* PBL pointer is physical start address. */
69714 		#define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_0	UINT32_C(0x0)
69715 	/* PBL pointer points to PTE table. */
69716 		#define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_1	UINT32_C(0x1)
69717 	/*
69718 	 * PBL pointer points to PDE table with each entry pointing to PTE
69719 	 * tables.
69720 	 */
69721 		#define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_2	UINT32_C(0x2)
69722 		#define CMDQ_INITIALIZE_FW_TQM_LVL_LAST	CMDQ_INITIALIZE_FW_TQM_LVL_LVL_2
69723 	/* TQM page size. */
69724 	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_MASK  UINT32_C(0xf0)
69725 	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_SFT   4
69726 	/* 4KB. */
69727 		#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69728 	/* 8KB. */
69729 		#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69730 	/* 64KB. */
69731 		#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69732 	/* 2MB. */
69733 		#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69734 	/* 8MB. */
69735 		#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69736 	/* 1GB. */
69737 		#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69738 		#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_1G
69739 	uint8_t	tim_pg_size_tim_lvl;
69740 	/* TIM PBL indirect levels. */
69741 	#define CMDQ_INITIALIZE_FW_TIM_LVL_MASK	UINT32_C(0xf)
69742 	#define CMDQ_INITIALIZE_FW_TIM_LVL_SFT	0
69743 	/* PBL pointer is physical start address. */
69744 		#define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_0	UINT32_C(0x0)
69745 	/* PBL pointer points to PTE table. */
69746 		#define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_1	UINT32_C(0x1)
69747 	/*
69748 	 * PBL pointer points to PDE table with each entry pointing to PTE
69749 	 * tables.
69750 	 */
69751 		#define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_2	UINT32_C(0x2)
69752 		#define CMDQ_INITIALIZE_FW_TIM_LVL_LAST	CMDQ_INITIALIZE_FW_TIM_LVL_LVL_2
69753 	/* TIM page size. */
69754 	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_MASK  UINT32_C(0xf0)
69755 	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_SFT   4
69756 	/* 4KB. */
69757 		#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
69758 	/* 8KB. */
69759 		#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
69760 	/* 64KB. */
69761 		#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
69762 	/* 2MB. */
69763 		#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
69764 	/* 8MB. */
69765 		#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
69766 	/* 1GB. */
69767 		#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
69768 		#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_1G
69769 	uint16_t	log2_dbr_pg_size;
69770 	/*
69771 	 * Log base 2 of DBR page size - 12. 0 for 4KB. HW supported values
69772 	 * are enumerated below.
69773 	 */
69774 	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_MASK   UINT32_C(0xf)
69775 	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_SFT	0
69776 	/* 4KB. */
69777 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_4K	UINT32_C(0x0)
69778 	/* 8KB. */
69779 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_8K	UINT32_C(0x1)
69780 	/* 16KB. */
69781 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_16K   UINT32_C(0x2)
69782 	/* 32KB. */
69783 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_32K   UINT32_C(0x3)
69784 	/* 64KB. */
69785 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_64K   UINT32_C(0x4)
69786 	/* 128KB. */
69787 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128K  UINT32_C(0x5)
69788 	/* 256KB. */
69789 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_256K  UINT32_C(0x6)
69790 	/* 512KB. */
69791 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_512K  UINT32_C(0x7)
69792 	/* 1MB. */
69793 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_1M	UINT32_C(0x8)
69794 	/* 2MB. */
69795 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_2M	UINT32_C(0x9)
69796 	/* 4MB. */
69797 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_4M	UINT32_C(0xa)
69798 	/* 8MB. */
69799 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_8M	UINT32_C(0xb)
69800 	/* 16MB. */
69801 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_16M   UINT32_C(0xc)
69802 	/* 32MB. */
69803 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_32M   UINT32_C(0xd)
69804 	/* 64MB. */
69805 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_64M   UINT32_C(0xe)
69806 	/* 128MB. */
69807 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128M  UINT32_C(0xf)
69808 		#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_LAST	CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128M
69809 	/* rsvd is 12 b */
69810 	#define CMDQ_INITIALIZE_FW_RSVD_MASK		UINT32_C(0xfff0)
69811 	#define CMDQ_INITIALIZE_FW_RSVD_SFT		4
69812 	/* Kernel notification queue page directory. */
69813 	uint64_t	qpc_page_dir;
69814 	/* MRW page directory. */
69815 	uint64_t	mrw_page_dir;
69816 	/* SRQ page directory. */
69817 	uint64_t	srq_page_dir;
69818 	/* CQ page directory. */
69819 	uint64_t	cq_page_dir;
69820 	/* TQM page directory. */
69821 	uint64_t	tqm_page_dir;
69822 	/* TIM page directory. */
69823 	uint64_t	tim_page_dir;
69824 	/*
69825 	 * Number of QPs. This field is ignored when the backing store HWRM's
69826 	 * are used.
69827 	 */
69828 	uint32_t	number_of_qp;
69829 	/*
69830 	 * Number of MRWs. This field is ignored when the backing store HWRM's
69831 	 * are used.
69832 	 */
69833 	uint32_t	number_of_mrw;
69834 	/*
69835 	 * Number of SRQs. This field is ignored when the backing store HWRM's
69836 	 * are used.
69837 	 */
69838 	uint32_t	number_of_srq;
69839 	/*
69840 	 * Number of CQs. This field is ignored when the backing store HWRM's
69841 	 * are used.
69842 	 */
69843 	uint32_t	number_of_cq;
69844 	/*
69845 	 * Number of QPs per VF. This field must be set to zero when the flag,
69846 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
69847 	 */
69848 	uint32_t	max_qp_per_vf;
69849 	/*
69850 	 * If the MR/AV split reservation flag is not set, then this field
69851 	 * represents the total number of MR plus AV entries allowed per
69852 	 * VF. For versions of firmware that support the split reservation,
69853 	 * when it is not specified half of the entries will be reserved
69854 	 * for MRs and the other half for AVs.
69855 	 *
69856 	 * If the MR/AV split reservation flag is set, then this
69857 	 * field is logically divided into two 16b fields. Bits `[31:16]`
69858 	 * represents the `max_mr_per_vf` and bits `[15:0]` represents
69859 	 * `max_av_per_vf`. The granularity of these values is defined by
69860 	 * the `mrav_num_entries_unit` field returned by the
69861 	 * `backing_store_qcaps` command.
69862 	 *
69863 	 * This field must be set to zero when the flag, l2_vf_resource_mgmt,
69864 	 * is set and RoCE SRIOV is enabled.
69865 	 */
69866 	uint32_t	max_mrw_per_vf;
69867 	/*
69868 	 * Number of SRQs per VF. This field must be set to zero when the flag,
69869 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
69870 	 */
69871 	uint32_t	max_srq_per_vf;
69872 	/*
69873 	 * Number of CQs per VF. This field must be set to zero when the flag,
69874 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
69875 	 */
69876 	uint32_t	max_cq_per_vf;
69877 	/*
69878 	 * Number of GIDs per VF. This field must be set to zero when the flag,
69879 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
69880 	 */
69881 	uint32_t	max_gid_per_vf;
69882 	/* Statistics context index for this function. */
69883 	uint32_t	stat_ctx_id;
69884 	/* The driver HSI major version number. */
69885 	uint8_t	drv_hsi_ver_maj;
69886 	/* The driver HSI minor version number. */
69887 	uint8_t	drv_hsi_ver_min;
69888 	/* The driver HSI update version number. */
69889 	uint8_t	drv_hsi_ver_upd;
69890 	/* This is the 40bit unused. */
69891 	uint8_t	unused40[5];
69892 	/* The driver build major version number. */
69893 	uint16_t	drv_build_ver_maj;
69894 	/* The driver build minor version number. */
69895 	uint16_t	drv_build_ver_min;
69896 	/* The driver build update version number. */
69897 	uint16_t	drv_build_ver_upd;
69898 	/* The driver build patch version number. */
69899 	uint16_t	drv_build_ver_patch;
69900 } cmdq_initialize_fw_t, *pcmdq_initialize_fw_t;
69901 
69902 /* creq_initialize_fw_resp (size:128b/16B) */
69903 
69904 typedef struct creq_initialize_fw_resp {
69905 	uint8_t	type;
69906 	/*
69907 	 * This field indicates the exact type of the completion.
69908 	 * By convention, the LSB identifies the length of the
69909 	 * record in 16B units. Even values indicate 16B
69910 	 * records. Odd values indicate 32B
69911 	 * records.
69912 	 */
69913 	#define CREQ_INITIALIZE_FW_RESP_TYPE_MASK	UINT32_C(0x3f)
69914 	#define CREQ_INITIALIZE_FW_RESP_TYPE_SFT	0
69915 	/* QP Async Notification */
69916 		#define CREQ_INITIALIZE_FW_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
69917 		#define CREQ_INITIALIZE_FW_RESP_TYPE_LAST	CREQ_INITIALIZE_FW_RESP_TYPE_QP_EVENT
69918 	/* Status of the response. */
69919 	uint8_t	status;
69920 	/* Driver supplied handle to associate the command and the response. */
69921 	uint16_t	cookie;
69922 	uint32_t	reserved32;
69923 	uint8_t	v;
69924 	/*
69925 	 * This value is written by the NIC such that it will be different
69926 	 * for each pass through the completion queue. The even passes
69927 	 * will write 1. The odd passes will write 0.
69928 	 */
69929 	#define CREQ_INITIALIZE_FW_RESP_V	UINT32_C(0x1)
69930 	/* Event or command opcode. */
69931 	uint8_t	event;
69932 	/* Initialize firmware command response. */
69933 	#define CREQ_INITIALIZE_FW_RESP_EVENT_INITIALIZE_FW UINT32_C(0x80)
69934 	#define CREQ_INITIALIZE_FW_RESP_EVENT_LAST	CREQ_INITIALIZE_FW_RESP_EVENT_INITIALIZE_FW
69935 	uint8_t	reserved48[6];
69936 } creq_initialize_fw_resp_t, *pcreq_initialize_fw_resp_t;
69937 
69938 /*******************
69939  * deinitialize_fw *
69940  *******************/
69941 
69942 
69943 /* cmdq_deinitialize_fw (size:128b/16B) */
69944 
69945 typedef struct cmdq_deinitialize_fw {
69946 	/* Command opcode. */
69947 	uint8_t	opcode;
69948 	/* De-initialize firmware command deinitializes the firmware. */
69949 	#define CMDQ_DEINITIALIZE_FW_OPCODE_DEINITIALIZE_FW UINT32_C(0x81)
69950 	#define CMDQ_DEINITIALIZE_FW_OPCODE_LAST	CMDQ_DEINITIALIZE_FW_OPCODE_DEINITIALIZE_FW
69951 	/* Size of the command in 16-byte units. */
69952 	uint8_t	cmd_size;
69953 	/* Flags and attribs of the command. */
69954 	uint16_t	flags;
69955 	/* Driver supplied handle to associate the command and the response. */
69956 	uint16_t	cookie;
69957 	/* Size of the response buffer in 16-byte units. */
69958 	uint8_t	resp_size;
69959 	uint8_t	reserved8;
69960 	/* Host address of the response. */
69961 	uint64_t	resp_addr;
69962 } cmdq_deinitialize_fw_t, *pcmdq_deinitialize_fw_t;
69963 
69964 /* creq_deinitialize_fw_resp (size:128b/16B) */
69965 
69966 typedef struct creq_deinitialize_fw_resp {
69967 	uint8_t	type;
69968 	/*
69969 	 * This field indicates the exact type of the completion.
69970 	 * By convention, the LSB identifies the length of the
69971 	 * record in 16B units. Even values indicate 16B
69972 	 * records. Odd values indicate 32B
69973 	 * records.
69974 	 */
69975 	#define CREQ_DEINITIALIZE_FW_RESP_TYPE_MASK	UINT32_C(0x3f)
69976 	#define CREQ_DEINITIALIZE_FW_RESP_TYPE_SFT	0
69977 	/* QP Async Notification */
69978 		#define CREQ_DEINITIALIZE_FW_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
69979 		#define CREQ_DEINITIALIZE_FW_RESP_TYPE_LAST	CREQ_DEINITIALIZE_FW_RESP_TYPE_QP_EVENT
69980 	/* Status of the response. */
69981 	uint8_t	status;
69982 	/* Driver supplied handle to associate the command and the response. */
69983 	uint16_t	cookie;
69984 	uint32_t	reserved32;
69985 	uint8_t	v;
69986 	/*
69987 	 * This value is written by the NIC such that it will be different
69988 	 * for each pass through the completion queue. The even passes
69989 	 * will write 1. The odd passes will write 0.
69990 	 */
69991 	#define CREQ_DEINITIALIZE_FW_RESP_V	UINT32_C(0x1)
69992 	/* Event or command opcode. */
69993 	uint8_t	event;
69994 	/* De-initialize firmware command response. */
69995 	#define CREQ_DEINITIALIZE_FW_RESP_EVENT_DEINITIALIZE_FW UINT32_C(0x81)
69996 	#define CREQ_DEINITIALIZE_FW_RESP_EVENT_LAST	CREQ_DEINITIALIZE_FW_RESP_EVENT_DEINITIALIZE_FW
69997 	uint8_t	reserved48[6];
69998 } creq_deinitialize_fw_resp_t, *pcreq_deinitialize_fw_resp_t;
69999 
70000 /*************
70001  * create_qp *
70002  *************/
70003 
70004 
70005 /* cmdq_create_qp (size:896b/112B) */
70006 
70007 typedef struct cmdq_create_qp {
70008 	/* Command opcode. */
70009 	uint8_t	opcode;
70010 	/*
70011 	 * Create QP command allocates QP context with the specified
70012 	 * SQ, RQ/SRQ, CQ and other parameters.
70013 	 */
70014 	#define CMDQ_CREATE_QP_OPCODE_CREATE_QP UINT32_C(0x1)
70015 	#define CMDQ_CREATE_QP_OPCODE_LAST	CMDQ_CREATE_QP_OPCODE_CREATE_QP
70016 	/* Size of the command in 16-byte units. */
70017 	uint8_t	cmd_size;
70018 	/* Flags and attribs of the command. */
70019 	uint16_t	flags;
70020 	/* Driver supplied handle to associate the command and the response. */
70021 	uint16_t	cookie;
70022 	/* Size of the response buffer in 16-byte units. */
70023 	uint8_t	resp_size;
70024 	uint8_t	reserved8;
70025 	/* Host address of the response. */
70026 	uint64_t	resp_addr;
70027 	/* QP handle. */
70028 	uint64_t	qp_handle;
70029 	/* Create QP flags. */
70030 	uint32_t	qp_flags;
70031 	/*
70032 	 * SRQ is used.
70033 	 * This flag is not supported on express mode QPs.
70034 	 */
70035 	#define CMDQ_CREATE_QP_QP_FLAGS_SRQ_USED		UINT32_C(0x1)
70036 	/* post CQE for all SQ WQEs. */
70037 	#define CMDQ_CREATE_QP_QP_FLAGS_FORCE_COMPLETION	UINT32_C(0x2)
70038 	/* This QP can use reserved L_Key */
70039 	#define CMDQ_CREATE_QP_QP_FLAGS_RESERVED_LKEY_ENABLE	UINT32_C(0x4)
70040 	/* This QP can fast register physical memory */
70041 	#define CMDQ_CREATE_QP_QP_FLAGS_FR_PMR_ENABLED		UINT32_C(0x8)
70042 	/* This QP can send variable sized WQEs. */
70043 	#define CMDQ_CREATE_QP_QP_FLAGS_VARIABLE_SIZED_WQE_ENABLED UINT32_C(0x10)
70044 	/*
70045 	 * WQEs with inline data sent on this QP are able to flow
70046 	 * through an optimized transmit path to lower latency. This
70047 	 * transmit path is opportunistic and not guaranteed to always
70048 	 * occur.
70049 	 */
70050 	#define CMDQ_CREATE_QP_QP_FLAGS_OPTIMIZED_TRANSMIT_ENABLED UINT32_C(0x20)
70051 	/*
70052 	 * For UD QPs the default responder CQE format is `cq_res_ud`.
70053 	 * This flag specifies the `cq_res_ud_cfa` format to be used
70054 	 * instead.
70055 	 */
70056 	#define CMDQ_CREATE_QP_QP_FLAGS_RESPONDER_UD_CQE_WITH_CFA  UINT32_C(0x40)
70057 	/*
70058 	 * This QP must be included in the extended RoCE statistics
70059 	 * that can be queried via `query_roce_stats_ext`.
70060 	 */
70061 	#define CMDQ_CREATE_QP_QP_FLAGS_EXT_STATS_ENABLED	UINT32_C(0x80)
70062 	/* This QP uses express mode. */
70063 	#define CMDQ_CREATE_QP_QP_FLAGS_EXPRESS_MODE_ENABLED	UINT32_C(0x100)
70064 	/* This QP uses the steering tag specified in the command. */
70065 	#define CMDQ_CREATE_QP_QP_FLAGS_STEERING_TAG_VALID	UINT32_C(0x200)
70066 	/*
70067 	 * This QP can be used for RDMA Read or Atomic operations.
70068 	 * This value is used to optimize metadata memory allocation
70069 	 * when the device supports `internal_queue_memory` feature.
70070 	 */
70071 	#define CMDQ_CREATE_QP_QP_FLAGS_RDMA_READ_OR_ATOMICS_USED  UINT32_C(0x400)
70072 	/*
70073 	 * This QP must be included in the extended RoCE statistics context
70074 	 * specified in the field `ext_stats_ctx_id`
70075 	 */
70076 	#define CMDQ_CREATE_QP_QP_FLAGS_EXT_STATS_CTX_VALID	UINT32_C(0x800)
70077 	/* The schq_id field passed in by the caller is valid. */
70078 	#define CMDQ_CREATE_QP_QP_FLAGS_SCHQ_ID_VALID		UINT32_C(0x1000)
70079 	#define CMDQ_CREATE_QP_QP_FLAGS_LAST			CMDQ_CREATE_QP_QP_FLAGS_SCHQ_ID_VALID
70080 	/* Supported QP types. */
70081 	uint8_t	type;
70082 	/* Reliable Connection. */
70083 	#define CMDQ_CREATE_QP_TYPE_RC		UINT32_C(0x2)
70084 	/* Unreliable Datagram. */
70085 	#define CMDQ_CREATE_QP_TYPE_UD		UINT32_C(0x4)
70086 	/* Raw Ethertype. */
70087 	#define CMDQ_CREATE_QP_TYPE_RAW_ETHERTYPE UINT32_C(0x6)
70088 	/* General Services Interface on QP1 over UD. */
70089 	#define CMDQ_CREATE_QP_TYPE_GSI	UINT32_C(0x7)
70090 	#define CMDQ_CREATE_QP_TYPE_LAST	CMDQ_CREATE_QP_TYPE_GSI
70091 	uint8_t	sq_pg_size_sq_lvl;
70092 	/*
70093 	 * SQ PBL indirect levels.
70094 	 * This field is ignored for express mode QPs.
70095 	 */
70096 	#define CMDQ_CREATE_QP_SQ_LVL_MASK	UINT32_C(0xf)
70097 	#define CMDQ_CREATE_QP_SQ_LVL_SFT	0
70098 	/* PBL pointer is physical start address. */
70099 		#define CMDQ_CREATE_QP_SQ_LVL_LVL_0	UINT32_C(0x0)
70100 	/* PBL pointer points to PTE table. */
70101 		#define CMDQ_CREATE_QP_SQ_LVL_LVL_1	UINT32_C(0x1)
70102 	/*
70103 	 * PBL pointer points to PDE table with each entry pointing to
70104 	 * PTE tables.
70105 	 */
70106 		#define CMDQ_CREATE_QP_SQ_LVL_LVL_2	UINT32_C(0x2)
70107 		#define CMDQ_CREATE_QP_SQ_LVL_LAST	CMDQ_CREATE_QP_SQ_LVL_LVL_2
70108 	/*
70109 	 * SQ page size.
70110 	 * This field is ignored for express mode QPs.
70111 	 */
70112 	#define CMDQ_CREATE_QP_SQ_PG_SIZE_MASK  UINT32_C(0xf0)
70113 	#define CMDQ_CREATE_QP_SQ_PG_SIZE_SFT   4
70114 	/* 4KB. */
70115 		#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
70116 	/* 8KB. */
70117 		#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
70118 	/* 64KB. */
70119 		#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
70120 	/* 2MB. */
70121 		#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
70122 	/* 8MB. */
70123 		#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
70124 	/* 1GB. */
70125 		#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
70126 		#define CMDQ_CREATE_QP_SQ_PG_SIZE_LAST   CMDQ_CREATE_QP_SQ_PG_SIZE_PG_1G
70127 	uint8_t	rq_pg_size_rq_lvl;
70128 	/*
70129 	 * RQ PBL indirect levels.
70130 	 * This field is ignored for express mode QPs.
70131 	 */
70132 	#define CMDQ_CREATE_QP_RQ_LVL_MASK	UINT32_C(0xf)
70133 	#define CMDQ_CREATE_QP_RQ_LVL_SFT	0
70134 	/* PBL pointer is physical start address. */
70135 		#define CMDQ_CREATE_QP_RQ_LVL_LVL_0	UINT32_C(0x0)
70136 	/* PBL pointer points to PTE table. */
70137 		#define CMDQ_CREATE_QP_RQ_LVL_LVL_1	UINT32_C(0x1)
70138 	/*
70139 	 * PBL pointer points to PDE table with each entry pointing to
70140 	 * PTE tables.
70141 	 */
70142 		#define CMDQ_CREATE_QP_RQ_LVL_LVL_2	UINT32_C(0x2)
70143 		#define CMDQ_CREATE_QP_RQ_LVL_LAST	CMDQ_CREATE_QP_RQ_LVL_LVL_2
70144 	/*
70145 	 * RQ page size.
70146 	 * This field is ignored for express mode QPs.
70147 	 */
70148 	#define CMDQ_CREATE_QP_RQ_PG_SIZE_MASK  UINT32_C(0xf0)
70149 	#define CMDQ_CREATE_QP_RQ_PG_SIZE_SFT   4
70150 	/* 4KB. */
70151 		#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
70152 	/* 8KB. */
70153 		#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
70154 	/* 64KB. */
70155 		#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
70156 	/* 2MB. */
70157 		#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
70158 	/* 8MB. */
70159 		#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
70160 	/* 1GB. */
70161 		#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
70162 		#define CMDQ_CREATE_QP_RQ_PG_SIZE_LAST   CMDQ_CREATE_QP_RQ_PG_SIZE_PG_1G
70163 	uint8_t	unused_0;
70164 	/* Doorbell page index. */
70165 	uint32_t	dpi;
70166 	/*
70167 	 * When the SQ is configured to use variable-size WQE, 'sq_size'
70168 	 * denotes the SQ size with a unit of 16B. When the SQ is configured
70169 	 * to use fixed-size WQE, 'sq_size' denotes the max number of SQ WQEs.
70170 	 */
70171 	uint32_t	sq_size;
70172 	/* Max number of RQ wqes. */
70173 	uint32_t	rq_size;
70174 	uint16_t	sq_fwo_sq_sge;
70175 	/*
70176 	 * Max send SGEs per SWQE. This is only applicable to fixed-size
70177 	 * WQE support. On variable-size WQE, this is ignored.
70178 	 */
70179 	#define CMDQ_CREATE_QP_SQ_SGE_MASK UINT32_C(0xf)
70180 	#define CMDQ_CREATE_QP_SQ_SGE_SFT 0
70181 	/*
70182 	 * Offset of First WQE in the first SQ page, in 128 byte units.
70183 	 * This field is ignored for express mode QPs.
70184 	 */
70185 	#define CMDQ_CREATE_QP_SQ_FWO_MASK UINT32_C(0xfff0)
70186 	#define CMDQ_CREATE_QP_SQ_FWO_SFT 4
70187 	uint16_t	rq_fwo_rq_sge;
70188 	/*
70189 	 * Max recv SGEs per RWQE.
70190 	 * On chips with variable-size WQE support, a value of zero implies
70191 	 * 30 SGEs.
70192 	 */
70193 	#define CMDQ_CREATE_QP_RQ_SGE_MASK UINT32_C(0xf)
70194 	#define CMDQ_CREATE_QP_RQ_SGE_SFT 0
70195 	/*
70196 	 * Offset of First WQE in the first RQ page, in 128 byte units.
70197 	 * This field is ignored for express mode QPs.
70198 	 */
70199 	#define CMDQ_CREATE_QP_RQ_FWO_MASK UINT32_C(0xfff0)
70200 	#define CMDQ_CREATE_QP_RQ_FWO_SFT 4
70201 	/* Send CQ context id. */
70202 	uint32_t	scq_cid;
70203 	/* Receive CQ context id. */
70204 	uint32_t	rcq_cid;
70205 	/* SRQ context id. */
70206 	uint32_t	srq_cid;
70207 	/* Protection domain id. */
70208 	uint32_t	pd_id;
70209 	/*
70210 	 * SQ PBL physical address.
70211 	 * This field is ignored for express mode QPs.
70212 	 */
70213 	uint64_t	sq_pbl;
70214 	/*
70215 	 * RQ PBL physical address.
70216 	 * This field is ignored for express mode QPs.
70217 	 */
70218 	uint64_t	rq_pbl;
70219 	/*
70220 	 * IRRQ address. This field is ignored on devices that
70221 	 * support the `internal_queue_memory` feature.
70222 	 */
70223 	uint64_t	irrq_addr;
70224 	/*
70225 	 * ORRQ address. This field is ignored on devices that
70226 	 * support the `internal_queue_memory` feature.
70227 	 */
70228 	uint64_t	orrq_addr;
70229 	/*
70230 	 * xid to use for the non-QP1 QP.
70231 	 * The requested xid must be within the valid range
70232 	 * of the predetermined assignment scheme of the
70233 	 * pseudo static QP allocation feature. The valid range
70234 	 * for the data QPs is determined by the start_qid and
70235 	 * max_qp fields of query_func response. When the value is zero,
70236 	 * firmware will automatically choose an xid from its free pool.
70237 	 * QP1 allocation, indicated by specifying `type` field as gsi,
70238 	 * must specify a request_xid as zero.
70239 	 * This field is ignored on devices that do not support
70240 	 * the pseudo static QP allocation feature.
70241 	 */
70242 	uint32_t	request_xid;
70243 	/* Steering tag to use for memory transactions. */
70244 	uint16_t	steering_tag;
70245 	/*
70246 	 * This value is used to optimize metadata memory allocation when
70247 	 * the device supports `internal_queue_memory` feature.
70248 	 * When the SQ is configured to use variable-size WQEs, the SQ size is
70249 	 * only specified in units of 16 Bytes. This value hints the max number
70250 	 * of WQEs that would ever be present on the SQ.
70251 	 */
70252 	uint16_t	sq_max_num_wqes;
70253 	/* Extended RoCE statistics context id. */
70254 	uint32_t	ext_stats_ctx_id;
70255 	/*
70256 	 * Identifies the new scheduling queue to associate with
70257 	 * the RoCE QP. A value of zero indicates that the QP is being
70258 	 * created with the default scheduling queue. Can only be specified
70259 	 * by the PF driver. VFs get assigned a scheduling queue based on PF
70260 	 * configuration (via HWRM_FUNC_CFG). Specified scheduling queue id is
70261 	 * allocated by firmware (via HWRM_SCHQ_ALLOC) when the device supports
70262 	 * the `scheduling queue` feature.
70263 	 */
70264 	uint16_t	schq_id;
70265 	uint16_t	reserved16;
70266 } cmdq_create_qp_t, *pcmdq_create_qp_t;
70267 
70268 /* creq_create_qp_resp (size:128b/16B) */
70269 
70270 typedef struct creq_create_qp_resp {
70271 	uint8_t	type;
70272 	/*
70273 	 * This field indicates the exact type of the completion.
70274 	 * By convention, the LSB identifies the length of the
70275 	 * record in 16B units. Even values indicate 16B
70276 	 * records. Odd values indicate 32B
70277 	 * records.
70278 	 */
70279 	#define CREQ_CREATE_QP_RESP_TYPE_MASK	UINT32_C(0x3f)
70280 	#define CREQ_CREATE_QP_RESP_TYPE_SFT	0
70281 	/* QP Async Notification */
70282 		#define CREQ_CREATE_QP_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
70283 		#define CREQ_CREATE_QP_RESP_TYPE_LAST	CREQ_CREATE_QP_RESP_TYPE_QP_EVENT
70284 	/* Status of the response. */
70285 	uint8_t	status;
70286 	/* Driver supplied handle to associate the command and the response. */
70287 	uint16_t	cookie;
70288 	/* QP context id */
70289 	uint32_t	xid;
70290 	uint8_t	v;
70291 	/*
70292 	 * This value is written by the NIC such that it will be different
70293 	 * for each pass through the completion queue. The even passes
70294 	 * will write 1. The odd passes will write 0.
70295 	 */
70296 	#define CREQ_CREATE_QP_RESP_V	UINT32_C(0x1)
70297 	/* Event or command opcode. */
70298 	uint8_t	event;
70299 	/* Create QP command response. */
70300 	#define CREQ_CREATE_QP_RESP_EVENT_CREATE_QP UINT32_C(0x1)
70301 	#define CREQ_CREATE_QP_RESP_EVENT_LAST	CREQ_CREATE_QP_RESP_EVENT_CREATE_QP
70302 	/*
70303 	 * Support for optimized transmit path to lower latency
70304 	 * for WQEs with inline data has been enabled for this QP.
70305 	 */
70306 	uint8_t	optimized_transmit_enabled;
70307 	uint8_t	reserved48[5];
70308 } creq_create_qp_resp_t, *pcreq_create_qp_resp_t;
70309 
70310 /**************
70311  * destroy_qp *
70312  **************/
70313 
70314 
70315 /* cmdq_destroy_qp (size:192b/24B) */
70316 
70317 typedef struct cmdq_destroy_qp {
70318 	/* Command opcode. */
70319 	uint8_t	opcode;
70320 	/*
70321 	 * Destroy QP command deletes the QP context and ceases
70322 	 * any further reference.
70323 	 */
70324 	#define CMDQ_DESTROY_QP_OPCODE_DESTROY_QP UINT32_C(0x2)
70325 	#define CMDQ_DESTROY_QP_OPCODE_LAST	CMDQ_DESTROY_QP_OPCODE_DESTROY_QP
70326 	/* Size of the command in 16-byte units. */
70327 	uint8_t	cmd_size;
70328 	/* Flags and attribs of the command. */
70329 	uint16_t	flags;
70330 	/* Driver supplied handle to associate the command and the response. */
70331 	uint16_t	cookie;
70332 	/* Size of the response buffer in 16-byte units. */
70333 	uint8_t	resp_size;
70334 	uint8_t	reserved8;
70335 	/* Host address of the response. */
70336 	uint64_t	resp_addr;
70337 	/* QP context id */
70338 	uint32_t	qp_cid;
70339 	uint32_t	unused_0;
70340 } cmdq_destroy_qp_t, *pcmdq_destroy_qp_t;
70341 
70342 /* creq_destroy_qp_resp (size:128b/16B) */
70343 
70344 typedef struct creq_destroy_qp_resp {
70345 	uint8_t	type;
70346 	/*
70347 	 * This field indicates the exact type of the completion.
70348 	 * By convention, the LSB identifies the length of the
70349 	 * record in 16B units. Even values indicate 16B
70350 	 * records. Odd values indicate 32B
70351 	 * records.
70352 	 */
70353 	#define CREQ_DESTROY_QP_RESP_TYPE_MASK	UINT32_C(0x3f)
70354 	#define CREQ_DESTROY_QP_RESP_TYPE_SFT	0
70355 	/* QP Async Notification */
70356 		#define CREQ_DESTROY_QP_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
70357 		#define CREQ_DESTROY_QP_RESP_TYPE_LAST	CREQ_DESTROY_QP_RESP_TYPE_QP_EVENT
70358 	/* Status of the response. */
70359 	uint8_t	status;
70360 	/* Driver supplied handle to associate the command and the response. */
70361 	uint16_t	cookie;
70362 	/* QP context id */
70363 	uint32_t	xid;
70364 	uint8_t	v;
70365 	/*
70366 	 * This value is written by the NIC such that it will be different
70367 	 * for each pass through the completion queue. The even passes
70368 	 * will write 1. The odd passes will write 0.
70369 	 */
70370 	#define CREQ_DESTROY_QP_RESP_V	UINT32_C(0x1)
70371 	/* Event or command opcode. */
70372 	uint8_t	event;
70373 	/* Destroy QP command response. */
70374 	#define CREQ_DESTROY_QP_RESP_EVENT_DESTROY_QP UINT32_C(0x2)
70375 	#define CREQ_DESTROY_QP_RESP_EVENT_LAST	CREQ_DESTROY_QP_RESP_EVENT_DESTROY_QP
70376 	uint8_t	reserved48[6];
70377 } creq_destroy_qp_resp_t, *pcreq_destroy_qp_resp_t;
70378 
70379 /*************
70380  * modify_qp *
70381  *************/
70382 
70383 
70384 /* cmdq_modify_qp (size:1152b/144B) */
70385 
70386 typedef struct cmdq_modify_qp {
70387 	/* Command opcode. */
70388 	uint8_t	opcode;
70389 	/*
70390 	 * Modify QP command changes QP states and other QP specific
70391 	 * parameters.
70392 	 */
70393 	#define CMDQ_MODIFY_QP_OPCODE_MODIFY_QP UINT32_C(0x3)
70394 	#define CMDQ_MODIFY_QP_OPCODE_LAST	CMDQ_MODIFY_QP_OPCODE_MODIFY_QP
70395 	/* Size of the command in 16-byte units. */
70396 	uint8_t	cmd_size;
70397 	/* Flags and attribs of the command. */
70398 	uint16_t	flags;
70399 	/*
70400 	 * This field, used by firmware for optimizing Modify QP operation,
70401 	 * must be set when the driver has indicated support for the
70402 	 * optimize_modify_qp_supported feature in cmdq_initialize_fw and
70403 	 * when QP Type RC is configured to use SRQ.
70404 	 */
70405 	#define CMDQ_MODIFY_QP_FLAGS_SRQ_USED	UINT32_C(0x1)
70406 	/* Driver supplied handle to associate the command and the response. */
70407 	uint16_t	cookie;
70408 	/* Size of the response buffer in 16-byte units. */
70409 	uint8_t	resp_size;
70410 	/*
70411 	 * This field, used by firmware for optimizing Modify QP operation,
70412 	 * must be set when the driver has indicated support for the
70413 	 * optimize_modify_qp_supported feature in cmdq_initialize_fw.
70414 	 */
70415 	uint8_t	qp_type;
70416 	/* Reliable Connection. */
70417 	#define CMDQ_MODIFY_QP_QP_TYPE_RC		UINT32_C(0x2)
70418 	/* Unreliable Datagram. */
70419 	#define CMDQ_MODIFY_QP_QP_TYPE_UD		UINT32_C(0x4)
70420 	/* Raw Ethertype. */
70421 	#define CMDQ_MODIFY_QP_QP_TYPE_RAW_ETHERTYPE UINT32_C(0x6)
70422 	/* General Services Interface on QP1 over UD. */
70423 	#define CMDQ_MODIFY_QP_QP_TYPE_GSI	UINT32_C(0x7)
70424 	#define CMDQ_MODIFY_QP_QP_TYPE_LAST	CMDQ_MODIFY_QP_QP_TYPE_GSI
70425 	/* Host address of the response. */
70426 	uint64_t	resp_addr;
70427 	/* Modify mask signifies the field that is requesting the change. */
70428 	uint32_t	modify_mask;
70429 	/* QP state change. */
70430 	#define CMDQ_MODIFY_QP_MODIFY_MASK_STATE		UINT32_C(0x1)
70431 	/* Enable SQ drain asynchronous notification change. */
70432 	#define CMDQ_MODIFY_QP_MODIFY_MASK_EN_SQD_ASYNC_NOTIFY	UINT32_C(0x2)
70433 	/* Access change. */
70434 	#define CMDQ_MODIFY_QP_MODIFY_MASK_ACCESS		UINT32_C(0x4)
70435 	/* P_KEY change. */
70436 	#define CMDQ_MODIFY_QP_MODIFY_MASK_PKEY			UINT32_C(0x8)
70437 	/* Q_KEY index change. */
70438 	#define CMDQ_MODIFY_QP_MODIFY_MASK_QKEY			UINT32_C(0x10)
70439 	/* Destination GID change. */
70440 	#define CMDQ_MODIFY_QP_MODIFY_MASK_DGID			UINT32_C(0x20)
70441 	/* Flow label change. */
70442 	#define CMDQ_MODIFY_QP_MODIFY_MASK_FLOW_LABEL		UINT32_C(0x40)
70443 	/* SGID change. */
70444 	#define CMDQ_MODIFY_QP_MODIFY_MASK_SGID_INDEX		UINT32_C(0x80)
70445 	/* Hop limit change. */
70446 	#define CMDQ_MODIFY_QP_MODIFY_MASK_HOP_LIMIT		UINT32_C(0x100)
70447 	/* Traffic class change. */
70448 	#define CMDQ_MODIFY_QP_MODIFY_MASK_TRAFFIC_CLASS	UINT32_C(0x200)
70449 	/* destination MAC change. */
70450 	#define CMDQ_MODIFY_QP_MODIFY_MASK_DEST_MAC		UINT32_C(0x400)
70451 	/* Ping pong push mode change. */
70452 	#define CMDQ_MODIFY_QP_MODIFY_MASK_PINGPONG_PUSH_MODE	UINT32_C(0x800)
70453 	/* Path MTU change. */
70454 	#define CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU		UINT32_C(0x1000)
70455 	/* Timeout change. */
70456 	#define CMDQ_MODIFY_QP_MODIFY_MASK_TIMEOUT		UINT32_C(0x2000)
70457 	/* Retry count change. */
70458 	#define CMDQ_MODIFY_QP_MODIFY_MASK_RETRY_CNT		UINT32_C(0x4000)
70459 	/* RNR Retry change. */
70460 	#define CMDQ_MODIFY_QP_MODIFY_MASK_RNR_RETRY		UINT32_C(0x8000)
70461 	/* RQ start packet sequence number change. */
70462 	#define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_PSN		UINT32_C(0x10000)
70463 	/* Max outstanding RDMA read atomic change. */
70464 	#define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_RD_ATOMIC	UINT32_C(0x20000)
70465 	/* RNR minimum timer change. */
70466 	#define CMDQ_MODIFY_QP_MODIFY_MASK_MIN_RNR_TIMER	UINT32_C(0x40000)
70467 	/* SQ start packet sequence number change. */
70468 	#define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_PSN		UINT32_C(0x80000)
70469 	/* Max destination outstanding RDMA read atomic change. */
70470 	#define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_DEST_RD_ATOMIC	UINT32_C(0x100000)
70471 	/* Max send WQE change. */
70472 	#define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_SIZE		UINT32_C(0x200000)
70473 	/* Max recv WQE change. */
70474 	#define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_SIZE		UINT32_C(0x400000)
70475 	/* Max recv SGEs per SWQE change. */
70476 	#define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_SGE		UINT32_C(0x800000)
70477 	/* Max send SGEs per RWQE change. */
70478 	#define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_SGE		UINT32_C(0x1000000)
70479 	/* Max inline data length change. */
70480 	#define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_INLINE_DATA	UINT32_C(0x2000000)
70481 	/* Destination QP id change. */
70482 	#define CMDQ_MODIFY_QP_MODIFY_MASK_DEST_QP_ID		UINT32_C(0x4000000)
70483 	/* Source MAC change. */
70484 	#define CMDQ_MODIFY_QP_MODIFY_MASK_SRC_MAC		UINT32_C(0x8000000)
70485 	/* Source VLAN id change. */
70486 	#define CMDQ_MODIFY_QP_MODIFY_MASK_VLAN_ID		UINT32_C(0x10000000)
70487 	/* Congestion control RoCE v2 change. */
70488 	#define CMDQ_MODIFY_QP_MODIFY_MASK_ENABLE_CC		UINT32_C(0x20000000)
70489 	/* IP TOS ECN change */
70490 	#define CMDQ_MODIFY_QP_MODIFY_MASK_TOS_ECN		UINT32_C(0x40000000)
70491 	/* IP TOS DSCP change */
70492 	#define CMDQ_MODIFY_QP_MODIFY_MASK_TOS_DSCP		UINT32_C(0x80000000)
70493 	/* QP context id */
70494 	uint32_t	qp_cid;
70495 	uint8_t	network_type_en_sqd_async_notify_new_state;
70496 	/* New QP state. */
70497 	#define CMDQ_MODIFY_QP_NEW_STATE_MASK	UINT32_C(0xf)
70498 	#define CMDQ_MODIFY_QP_NEW_STATE_SFT	0
70499 	/* Reset. */
70500 		#define CMDQ_MODIFY_QP_NEW_STATE_RESET	UINT32_C(0x0)
70501 	/* Init. */
70502 		#define CMDQ_MODIFY_QP_NEW_STATE_INIT		UINT32_C(0x1)
70503 	/* Ready To Receive. */
70504 		#define CMDQ_MODIFY_QP_NEW_STATE_RTR		UINT32_C(0x2)
70505 	/* Ready To Send. */
70506 		#define CMDQ_MODIFY_QP_NEW_STATE_RTS		UINT32_C(0x3)
70507 	/* SQ Drain. */
70508 		#define CMDQ_MODIFY_QP_NEW_STATE_SQD		UINT32_C(0x4)
70509 	/* SQ Error. */
70510 		#define CMDQ_MODIFY_QP_NEW_STATE_SQE		UINT32_C(0x5)
70511 	/* Error. */
70512 		#define CMDQ_MODIFY_QP_NEW_STATE_ERR		UINT32_C(0x6)
70513 		#define CMDQ_MODIFY_QP_NEW_STATE_LAST	CMDQ_MODIFY_QP_NEW_STATE_ERR
70514 	/* Enable SQ drain asynchronous notification. */
70515 	#define CMDQ_MODIFY_QP_EN_SQD_ASYNC_NOTIFY	UINT32_C(0x10)
70516 	/* unused1 is 1 b */
70517 	#define CMDQ_MODIFY_QP_UNUSED1		UINT32_C(0x20)
70518 	/* network type. */
70519 	#define CMDQ_MODIFY_QP_NETWORK_TYPE_MASK	UINT32_C(0xc0)
70520 	#define CMDQ_MODIFY_QP_NETWORK_TYPE_SFT	6
70521 	/* RoCEv1. */
70522 		#define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV1	(UINT32_C(0x0) << 6)
70523 	/* RoCEv2 IPv4. */
70524 		#define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV4  (UINT32_C(0x2) << 6)
70525 	/* RoCEv2 IPv6. */
70526 		#define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV6  (UINT32_C(0x3) << 6)
70527 		#define CMDQ_MODIFY_QP_NETWORK_TYPE_LAST	CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV6
70528 	/* Access flags. */
70529 	uint8_t	access;
70530 	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_MASK		UINT32_C(0xff)
70531 	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_SFT		0
70532 	/* Local write access. */
70533 	#define CMDQ_MODIFY_QP_ACCESS_LOCAL_WRITE							UINT32_C(0x1)
70534 	/* Remote write access. */
70535 	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_WRITE							UINT32_C(0x2)
70536 	/* Remote read access. */
70537 	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_READ							UINT32_C(0x4)
70538 	/*
70539 	 * Remote atomic access. Applicable to devices that support
70540 	 * Atomic operations.
70541 	 */
70542 	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_ATOMIC							UINT32_C(0x8)
70543 	/* P_KEY. */
70544 	uint16_t	pkey;
70545 	/* Q_KEY. */
70546 	uint32_t	qkey;
70547 	/* Destination GID. */
70548 	uint32_t	dgid[4];
70549 	/* Flow label. */
70550 	uint32_t	flow_label;
70551 	/* Source GID index. */
70552 	uint16_t	sgid_index;
70553 	/* Hop limit. */
70554 	uint8_t	hop_limit;
70555 	/* Traffic class. */
70556 	uint8_t	traffic_class;
70557 	/* Destination MAC address. */
70558 	uint16_t	dest_mac[3];
70559 	uint8_t	tos_dscp_tos_ecn;
70560 	/* IP TOS ECN. Valid values are 1 or 2 when ECN is enabled. */
70561 	#define CMDQ_MODIFY_QP_TOS_ECN_MASK UINT32_C(0x3)
70562 	#define CMDQ_MODIFY_QP_TOS_ECN_SFT  0
70563 	/* IP TOS DSCP. */
70564 	#define CMDQ_MODIFY_QP_TOS_DSCP_MASK UINT32_C(0xfc)
70565 	#define CMDQ_MODIFY_QP_TOS_DSCP_SFT 2
70566 	uint8_t	path_mtu_pingpong_push_enable;
70567 	/*
70568 	 * Driver requests for ping pong push mode to be enabled for this
70569 	 * QP. This request can be done only during modify from RST to INIT
70570 	 * state.
70571 	 */
70572 	#define CMDQ_MODIFY_QP_PINGPONG_PUSH_ENABLE	UINT32_C(0x1)
70573 	/* unused3 is 3 b */
70574 	#define CMDQ_MODIFY_QP_UNUSED3_MASK		UINT32_C(0xe)
70575 	#define CMDQ_MODIFY_QP_UNUSED3_SFT		1
70576 	/* Path MTU. */
70577 	#define CMDQ_MODIFY_QP_PATH_MTU_MASK		UINT32_C(0xf0)
70578 	#define CMDQ_MODIFY_QP_PATH_MTU_SFT		4
70579 	/* 256. */
70580 		#define CMDQ_MODIFY_QP_PATH_MTU_MTU_256	(UINT32_C(0x0) << 4)
70581 	/* 512. */
70582 		#define CMDQ_MODIFY_QP_PATH_MTU_MTU_512	(UINT32_C(0x1) << 4)
70583 	/* 1024. */
70584 		#define CMDQ_MODIFY_QP_PATH_MTU_MTU_1024	(UINT32_C(0x2) << 4)
70585 	/* 2048. */
70586 		#define CMDQ_MODIFY_QP_PATH_MTU_MTU_2048	(UINT32_C(0x3) << 4)
70587 	/* 4096. */
70588 		#define CMDQ_MODIFY_QP_PATH_MTU_MTU_4096	(UINT32_C(0x4) << 4)
70589 	/* 8192. */
70590 		#define CMDQ_MODIFY_QP_PATH_MTU_MTU_8192	(UINT32_C(0x5) << 4)
70591 		#define CMDQ_MODIFY_QP_PATH_MTU_LAST		CMDQ_MODIFY_QP_PATH_MTU_MTU_8192
70592 	/* Timeout value for SWQEs. */
70593 	uint8_t	timeout;
70594 	/* Max retry count for WQEs. */
70595 	uint8_t	retry_cnt;
70596 	/* Max RNR retry count for WQEs. */
70597 	uint8_t	rnr_retry;
70598 	/* Min RNR timer that the QP will report to the remote. */
70599 	uint8_t	min_rnr_timer;
70600 	/* RQ start packet sequence number. */
70601 	uint32_t	rq_psn;
70602 	/* SQ start packet sequence number. */
70603 	uint32_t	sq_psn;
70604 	/* Max outstanding RDMA read atomic. */
70605 	uint8_t	max_rd_atomic;
70606 	/* Max destination outstanding RDMA read atomic. */
70607 	uint8_t	max_dest_rd_atomic;
70608 	uint16_t	enable_cc;
70609 	/* Enable congestion control. */
70610 	#define CMDQ_MODIFY_QP_ENABLE_CC	UINT32_C(0x1)
70611 	/* unused15 is 15 b */
70612 	#define CMDQ_MODIFY_QP_UNUSED15_MASK UINT32_C(0xfffe)
70613 	#define CMDQ_MODIFY_QP_UNUSED15_SFT  1
70614 	/* Max send WQE. */
70615 	uint32_t	sq_size;
70616 	/* Max recv WQE. */
70617 	uint32_t	rq_size;
70618 	/* Max send SGEs per SWQE. */
70619 	uint16_t	sq_sge;
70620 	/* Max recv SGEs per RWQE. */
70621 	uint16_t	rq_sge;
70622 	/* Max inline data length (up to 120 bytes). */
70623 	uint32_t	max_inline_data;
70624 	/* Destination QP id. */
70625 	uint32_t	dest_qp_id;
70626 	/* This is the DPI RoCE driver allocated for ping pong push. */
70627 	uint32_t	pingpong_push_dpi;
70628 	/* Source MAC. (Unused. Comes from Source GID index) */
70629 	uint16_t	src_mac[3];
70630 	uint16_t	vlan_pcp_vlan_dei_vlan_id;
70631 	/* VLAN id. (Unused. Comes from Source GID index) */
70632 	#define CMDQ_MODIFY_QP_VLAN_ID_MASK UINT32_C(0xfff)
70633 	#define CMDQ_MODIFY_QP_VLAN_ID_SFT  0
70634 	/* VLAN DEI field - Drop Eligibility Indicator. */
70635 	#define CMDQ_MODIFY_QP_VLAN_DEI	UINT32_C(0x1000)
70636 	/* VLAN PCP field - Priority Code Point. */
70637 	#define CMDQ_MODIFY_QP_VLAN_PCP_MASK UINT32_C(0xe000)
70638 	#define CMDQ_MODIFY_QP_VLAN_PCP_SFT 13
70639 	/* IRRQ address. */
70640 	uint64_t	irrq_addr;
70641 	/* ORRQ address. */
70642 	uint64_t	orrq_addr;
70643 	/*
70644 	 * Extended Modify mask signifies the field that is requesting the
70645 	 * change.
70646 	 */
70647 	uint32_t	ext_modify_mask;
70648 	/* Extended RoCE statistics context id change */
70649 	#define CMDQ_MODIFY_QP_EXT_MODIFY_MASK_EXT_STATS_CTX	UINT32_C(0x1)
70650 	/* The schq_id field is valid */
70651 	#define CMDQ_MODIFY_QP_EXT_MODIFY_MASK_SCHQ_ID_VALID	UINT32_C(0x2)
70652 	/* Extended RoCE statistics context id. */
70653 	uint32_t	ext_stats_ctx_id;
70654 	/*
70655 	 * Identifies the new scheduling queue to associate to the RoCE QP.
70656 	 * A value of zero indicates that the QP is being modified to use
70657 	 * the default scheduling queue. Specified scheduling queue id is
70658 	 * allocated by firmware (via HWRM_SCHQ_ALLOC) when the device supports
70659 	 * the `scheduling queue` feature.
70660 	 */
70661 	uint16_t	schq_id;
70662 	/* unused_0 is 16 b */
70663 	uint16_t	unused_0;
70664 	/* reserved32 is 32 b */
70665 	uint32_t	reserved32;
70666 } cmdq_modify_qp_t, *pcmdq_modify_qp_t;
70667 
70668 /* creq_modify_qp_resp (size:128b/16B) */
70669 
70670 typedef struct creq_modify_qp_resp {
70671 	uint8_t	type;
70672 	/*
70673 	 * This field indicates the exact type of the completion.
70674 	 * By convention, the LSB identifies the length of the
70675 	 * record in 16B units. Even values indicate 16B
70676 	 * records. Odd values indicate 32B
70677 	 * records.
70678 	 */
70679 	#define CREQ_MODIFY_QP_RESP_TYPE_MASK	UINT32_C(0x3f)
70680 	#define CREQ_MODIFY_QP_RESP_TYPE_SFT	0
70681 	/* QP Async Notification */
70682 		#define CREQ_MODIFY_QP_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
70683 		#define CREQ_MODIFY_QP_RESP_TYPE_LAST	CREQ_MODIFY_QP_RESP_TYPE_QP_EVENT
70684 	/* Status of the response. */
70685 	uint8_t	status;
70686 	/* Driver supplied handle to associate the command and the response. */
70687 	uint16_t	cookie;
70688 	/* QP context id */
70689 	uint32_t	xid;
70690 	uint8_t	v;
70691 	/*
70692 	 * This value is written by the NIC such that it will be different
70693 	 * for each pass through the completion queue. The even passes
70694 	 * will write 1. The odd passes will write 0.
70695 	 */
70696 	#define CREQ_MODIFY_QP_RESP_V	UINT32_C(0x1)
70697 	/* Event or command opcode. */
70698 	uint8_t	event;
70699 	/* Modify QP command response. */
70700 	#define CREQ_MODIFY_QP_RESP_EVENT_MODIFY_QP UINT32_C(0x3)
70701 	#define CREQ_MODIFY_QP_RESP_EVENT_LAST	CREQ_MODIFY_QP_RESP_EVENT_MODIFY_QP
70702 	uint8_t	pingpong_push_state_index_enabled;
70703 	/*
70704 	 * When set it indicates that FW was able to successfully enable
70705 	 * ping pong push mode for this QP.
70706 	 */
70707 	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_ENABLED	UINT32_C(0x1)
70708 	/*
70709 	 * When ping pong push mode is enabled this field will give the
70710 	 * index into the push page where the QP has been mapped.
70711 	 */
70712 	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_INDEX_MASK  UINT32_C(0xe)
70713 	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_INDEX_SFT   1
70714 	/*
70715 	 * This bit will tell whether to use ping or pong buffer
70716 	 * for first push operation. 0 - ping buffer, 1 - pong buffer.
70717 	 */
70718 	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_STATE	UINT32_C(0x10)
70719 	uint8_t	reserved8;
70720 	/* Scrambled src mac needed to calculate UDP source port. */
70721 	uint32_t	lag_src_mac;
70722 } creq_modify_qp_resp_t, *pcreq_modify_qp_resp_t;
70723 
70724 /************
70725  * query_qp *
70726  ************/
70727 
70728 
70729 /* cmdq_query_qp (size:192b/24B) */
70730 
70731 typedef struct cmdq_query_qp {
70732 	/* Command opcode. */
70733 	uint8_t	opcode;
70734 	/* Query QP command retrieves info about the specified QP. */
70735 	#define CMDQ_QUERY_QP_OPCODE_QUERY_QP UINT32_C(0x4)
70736 	#define CMDQ_QUERY_QP_OPCODE_LAST	CMDQ_QUERY_QP_OPCODE_QUERY_QP
70737 	/* Size of the command in 16-byte units. */
70738 	uint8_t	cmd_size;
70739 	/* Flags and attribs of the command. */
70740 	uint16_t	flags;
70741 	/* Driver supplied handle to associate the command and the response. */
70742 	uint16_t	cookie;
70743 	/* Size of the response buffer in 16-byte units. */
70744 	uint8_t	resp_size;
70745 	uint8_t	reserved8;
70746 	/* Host address of the response. */
70747 	uint64_t	resp_addr;
70748 	/* QP context id */
70749 	uint32_t	qp_cid;
70750 	uint32_t	unused_0;
70751 } cmdq_query_qp_t, *pcmdq_query_qp_t;
70752 
70753 /* creq_query_qp_resp (size:128b/16B) */
70754 
70755 typedef struct creq_query_qp_resp {
70756 	uint8_t	type;
70757 	/*
70758 	 * This field indicates the exact type of the completion.
70759 	 * By convention, the LSB identifies the length of the
70760 	 * record in 16B units. Even values indicate 16B
70761 	 * records. Odd values indicate 32B
70762 	 * records.
70763 	 */
70764 	#define CREQ_QUERY_QP_RESP_TYPE_MASK	UINT32_C(0x3f)
70765 	#define CREQ_QUERY_QP_RESP_TYPE_SFT	0
70766 	/* QP Async Notification */
70767 		#define CREQ_QUERY_QP_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
70768 		#define CREQ_QUERY_QP_RESP_TYPE_LAST	CREQ_QUERY_QP_RESP_TYPE_QP_EVENT
70769 	/* Status of the response. */
70770 	uint8_t	status;
70771 	/* Driver supplied handle to associate the command and the response. */
70772 	uint16_t	cookie;
70773 	/* Side buffer size in 16-byte units */
70774 	uint32_t	size;
70775 	uint8_t	v;
70776 	/*
70777 	 * This value is written by the NIC such that it will be different
70778 	 * for each pass through the completion queue. The even passes
70779 	 * will write 1. The odd passes will write 0.
70780 	 */
70781 	#define CREQ_QUERY_QP_RESP_V	UINT32_C(0x1)
70782 	/* Event or command opcode. */
70783 	uint8_t	event;
70784 	/* Query QP command response. */
70785 	#define CREQ_QUERY_QP_RESP_EVENT_QUERY_QP UINT32_C(0x4)
70786 	#define CREQ_QUERY_QP_RESP_EVENT_LAST	CREQ_QUERY_QP_RESP_EVENT_QUERY_QP
70787 	uint8_t	reserved48[6];
70788 } creq_query_qp_resp_t, *pcreq_query_qp_resp_t;
70789 
70790 /* Query QP command response side buffer structure. */
70791 /* creq_query_qp_resp_sb (size:832b/104B) */
70792 
70793 typedef struct creq_query_qp_resp_sb {
70794 	/* Command opcode. */
70795 	uint8_t	opcode;
70796 	/* Query QP command response. */
70797 	#define CREQ_QUERY_QP_RESP_SB_OPCODE_QUERY_QP UINT32_C(0x4)
70798 	#define CREQ_QUERY_QP_RESP_SB_OPCODE_LAST	CREQ_QUERY_QP_RESP_SB_OPCODE_QUERY_QP
70799 	/* Status of the response. */
70800 	uint8_t	status;
70801 	/* Driver supplied handle to associate the command and the response. */
70802 	uint16_t	cookie;
70803 	/* Flags and attribs of the command. */
70804 	uint16_t	flags;
70805 	/* Size of the response buffer in 16-byte units. */
70806 	uint8_t	resp_size;
70807 	uint8_t	reserved8;
70808 	/* QP context id */
70809 	uint32_t	xid;
70810 	uint8_t	en_sqd_async_notify_state;
70811 	/* QP state */
70812 	#define CREQ_QUERY_QP_RESP_SB_STATE_MASK		UINT32_C(0xf)
70813 	#define CREQ_QUERY_QP_RESP_SB_STATE_SFT		0
70814 	/* Reset. */
70815 		#define CREQ_QUERY_QP_RESP_SB_STATE_RESET		UINT32_C(0x0)
70816 	/* Init. */
70817 		#define CREQ_QUERY_QP_RESP_SB_STATE_INIT		UINT32_C(0x1)
70818 	/* Ready To Receive. */
70819 		#define CREQ_QUERY_QP_RESP_SB_STATE_RTR		UINT32_C(0x2)
70820 	/* Ready To Send. */
70821 		#define CREQ_QUERY_QP_RESP_SB_STATE_RTS		UINT32_C(0x3)
70822 	/* SQ Drain. */
70823 		#define CREQ_QUERY_QP_RESP_SB_STATE_SQD		UINT32_C(0x4)
70824 	/* SQ Error. */
70825 		#define CREQ_QUERY_QP_RESP_SB_STATE_SQE		UINT32_C(0x5)
70826 	/* Error. */
70827 		#define CREQ_QUERY_QP_RESP_SB_STATE_ERR		UINT32_C(0x6)
70828 		#define CREQ_QUERY_QP_RESP_SB_STATE_LAST		CREQ_QUERY_QP_RESP_SB_STATE_ERR
70829 	/* SQ drain asynchronous notification. */
70830 	#define CREQ_QUERY_QP_RESP_SB_EN_SQD_ASYNC_NOTIFY	UINT32_C(0x10)
70831 	/* Enable congestion control. */
70832 	#define CREQ_QUERY_QP_RESP_SB_UNUSED3_MASK		UINT32_C(0xe0)
70833 	#define CREQ_QUERY_QP_RESP_SB_UNUSED3_SFT		5
70834 	/* Access flags. */
70835 	uint8_t	access;
70836 	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_MASK		UINT32_C(0xff)
70837 	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_SFT		0
70838 	/* Local write access. */
70839 	#define CREQ_QUERY_QP_RESP_SB_ACCESS_LOCAL_WRITE							UINT32_C(0x1)
70840 	/* Remote write access. */
70841 	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_WRITE							UINT32_C(0x2)
70842 	/* Remote read access. */
70843 	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_READ							UINT32_C(0x4)
70844 	/* Remote atomic access. */
70845 	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC							UINT32_C(0x8)
70846 	/* P_KEY index. */
70847 	uint16_t	pkey;
70848 	/* Q_KEY. */
70849 	uint32_t	qkey;
70850 	/*
70851 	 * UDP source port used in RoCEv2 packets. Valid only when
70852 	 * change_udp_src_port_wqe_supported feature is advertised.
70853 	 */
70854 	uint16_t	udp_src_port;
70855 	uint16_t	reserved16;
70856 	/* Destination GID. */
70857 	uint32_t	dgid[4];
70858 	/* Flow label. */
70859 	uint32_t	flow_label;
70860 	/* Source GID index. */
70861 	uint16_t	sgid_index;
70862 	/* Hop limit. */
70863 	uint8_t	hop_limit;
70864 	/* Traffic class. */
70865 	uint8_t	traffic_class;
70866 	/* Destination MAC address. */
70867 	uint16_t	dest_mac[3];
70868 	uint16_t	path_mtu_dest_vlan_id;
70869 	/* Destination VLAN ID. */
70870 	#define CREQ_QUERY_QP_RESP_SB_DEST_VLAN_ID_MASK UINT32_C(0xfff)
70871 	#define CREQ_QUERY_QP_RESP_SB_DEST_VLAN_ID_SFT 0
70872 	/* Path MTU. */
70873 	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MASK	UINT32_C(0xf000)
70874 	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_SFT	12
70875 	/* 256. */
70876 		#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_256   (UINT32_C(0x0) << 12)
70877 	/* 512. */
70878 		#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_512   (UINT32_C(0x1) << 12)
70879 	/* 1024. */
70880 		#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_1024  (UINT32_C(0x2) << 12)
70881 	/* 2048. */
70882 		#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_2048  (UINT32_C(0x3) << 12)
70883 	/* 4096. */
70884 		#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_4096  (UINT32_C(0x4) << 12)
70885 	/* 8192. */
70886 		#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_8192  (UINT32_C(0x5) << 12)
70887 		#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_LAST	CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_8192
70888 	/* Timeout value for SWQEs. */
70889 	uint8_t	timeout;
70890 	/* Max retry count for WQEs. */
70891 	uint8_t	retry_cnt;
70892 	/* Max RNR retry count for WQEs. */
70893 	uint8_t	rnr_retry;
70894 	/* Min RNR timer that the QP will report to the remote. */
70895 	uint8_t	min_rnr_timer;
70896 	/* RQ start packet sequence number. */
70897 	uint32_t	rq_psn;
70898 	/* SQ start packet sequence number. */
70899 	uint32_t	sq_psn;
70900 	/* Max outstanding RDMA read atomic. */
70901 	uint8_t	max_rd_atomic;
70902 	/* Max destination outstanding RDMA read atomic. */
70903 	uint8_t	max_dest_rd_atomic;
70904 	uint8_t	tos_dscp_tos_ecn;
70905 	/* IP TOS ECN. */
70906 	#define CREQ_QUERY_QP_RESP_SB_TOS_ECN_MASK UINT32_C(0x3)
70907 	#define CREQ_QUERY_QP_RESP_SB_TOS_ECN_SFT  0
70908 	/* IP TOS DSCP. */
70909 	#define CREQ_QUERY_QP_RESP_SB_TOS_DSCP_MASK UINT32_C(0xfc)
70910 	#define CREQ_QUERY_QP_RESP_SB_TOS_DSCP_SFT 2
70911 	uint8_t	enable_cc;
70912 	/* enable_cc is 1 b */
70913 	#define CREQ_QUERY_QP_RESP_SB_ENABLE_CC	UINT32_C(0x1)
70914 	/* Max send WQE. */
70915 	uint32_t	sq_size;
70916 	/* Max recv WQE. */
70917 	uint32_t	rq_size;
70918 	/* Max send SGEs per SWQE. */
70919 	uint16_t	sq_sge;
70920 	/* Max recv SGEs per RWQE (NOT SUPPORTED BY HARDWARE). */
70921 	uint16_t	rq_sge;
70922 	/* Max inline data length (up to 120 bytes). */
70923 	uint32_t	max_inline_data;
70924 	/* Destination QP id. */
70925 	uint32_t	dest_qp_id;
70926 	/* Port ID associated with the QP. */
70927 	uint16_t	port_id;
70928 	uint8_t	unused_0;
70929 	/* Statistic collection ID allocated for this QP. */
70930 	uint8_t	stat_collection_id;
70931 	/* Source MAC. */
70932 	uint16_t	src_mac[3];
70933 	uint16_t	vlan_pcp_vlan_dei_vlan_id;
70934 	/* Source VLAN id. */
70935 	#define CREQ_QUERY_QP_RESP_SB_VLAN_ID_MASK UINT32_C(0xfff)
70936 	#define CREQ_QUERY_QP_RESP_SB_VLAN_ID_SFT  0
70937 	/* VLAN DEI field - Drop Eligibility Indicator. */
70938 	#define CREQ_QUERY_QP_RESP_SB_VLAN_DEI	UINT32_C(0x1000)
70939 	/* VLAN PCP field - Priority Code Point. */
70940 	#define CREQ_QUERY_QP_RESP_SB_VLAN_PCP_MASK UINT32_C(0xe000)
70941 	#define CREQ_QUERY_QP_RESP_SB_VLAN_PCP_SFT 13
70942 } creq_query_qp_resp_sb_t, *pcreq_query_qp_resp_sb_t;
70943 
70944 /*******************
70945  * query_qp_extend *
70946  *******************/
70947 
70948 
70949 /* cmdq_query_qp_extend (size:192b/24B) */
70950 
70951 typedef struct cmdq_query_qp_extend {
70952 	/* Command opcode. */
70953 	uint8_t	opcode;
70954 	/*
70955 	 * Query QP extend command retrieves info about multiple QPs
70956 	 * associated with a specific PF.
70957 	 */
70958 	#define CMDQ_QUERY_QP_EXTEND_OPCODE_QUERY_QP_EXTEND UINT32_C(0x91)
70959 	#define CMDQ_QUERY_QP_EXTEND_OPCODE_LAST	CMDQ_QUERY_QP_EXTEND_OPCODE_QUERY_QP_EXTEND
70960 	/* Size of the command in 16-byte units. */
70961 	uint8_t	cmd_size;
70962 	/* Flags and attribs of the command. */
70963 	uint16_t	flags;
70964 	/* Driver supplied handle to associate the command and the response. */
70965 	uint16_t	cookie;
70966 	/* Size of the response buffer in 16-byte units. */
70967 	uint8_t	resp_size;
70968 	/*
70969 	 * Number of QPs for which FW needs to query and provide info back to
70970 	 * host.
70971 	 */
70972 	uint8_t	num_qps;
70973 	/* Host address of the response. */
70974 	uint64_t	resp_addr;
70975 	/* Unique identified for a function */
70976 	uint32_t	function_id;
70977 	/* PF number */
70978 	#define CMDQ_QUERY_QP_EXTEND_PF_NUM_MASK  UINT32_C(0xff)
70979 	#define CMDQ_QUERY_QP_EXTEND_PF_NUM_SFT   0
70980 	/* VF number */
70981 	#define CMDQ_QUERY_QP_EXTEND_VF_NUM_MASK  UINT32_C(0xffff00)
70982 	#define CMDQ_QUERY_QP_EXTEND_VF_NUM_SFT   8
70983 	/* When set the vf_num is valid. */
70984 	#define CMDQ_QUERY_QP_EXTEND_VF_VALID	UINT32_C(0x1000000)
70985 	/*
70986 	 * This is the current index where firmware left off for query qp.
70987 	 * Driver will pass this back in the next query_qp_extend command.
70988 	 */
70989 	uint32_t	current_index;
70990 } cmdq_query_qp_extend_t, *pcmdq_query_qp_extend_t;
70991 
70992 /* creq_query_qp_extend_resp (size:128b/16B) */
70993 
70994 typedef struct creq_query_qp_extend_resp {
70995 	uint8_t	type;
70996 	/*
70997 	 * This field indicates the exact type of the completion.
70998 	 * By convention, the LSB identifies the length of the
70999 	 * record in 16B units. Even values indicate 16B
71000 	 * records. Odd values indicate 32B
71001 	 * records.
71002 	 */
71003 	#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_MASK	UINT32_C(0x3f)
71004 	#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_SFT	0
71005 	/* QP Async Notification */
71006 		#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71007 		#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_LAST	CREQ_QUERY_QP_EXTEND_RESP_TYPE_QP_EVENT
71008 	/* Status of the response. */
71009 	uint8_t	status;
71010 	/* Driver supplied handle to associate the command and the response. */
71011 	uint16_t	cookie;
71012 	/* Side buffer size in 16-byte units */
71013 	uint32_t	size;
71014 	uint8_t	v;
71015 	/*
71016 	 * This value is written by the NIC such that it will be different
71017 	 * for each pass through the completion queue. The even passes
71018 	 * will write 1. The odd passes will write 0.
71019 	 */
71020 	#define CREQ_QUERY_QP_EXTEND_RESP_V	UINT32_C(0x1)
71021 	/* Event or command opcode. */
71022 	uint8_t	event;
71023 	/* Query QP extend command response. */
71024 	#define CREQ_QUERY_QP_EXTEND_RESP_EVENT_QUERY_QP_EXTEND UINT32_C(0x91)
71025 	#define CREQ_QUERY_QP_EXTEND_RESP_EVENT_LAST	CREQ_QUERY_QP_EXTEND_RESP_EVENT_QUERY_QP_EXTEND
71026 	uint16_t	reserved16;
71027 	/*
71028 	 * This is the current index where firmware left off for query qp.
71029 	 * Driver will pass this back in the next query_qp_extend command.
71030 	 */
71031 	uint32_t	current_index;
71032 } creq_query_qp_extend_resp_t, *pcreq_query_qp_extend_resp_t;
71033 
71034 /* Query QP extend command response side buffer structure. */
71035 /* creq_query_qp_extend_resp_sb (size:384b/48B) */
71036 
71037 typedef struct creq_query_qp_extend_resp_sb {
71038 	/* Command opcode. */
71039 	uint8_t	opcode;
71040 	/* Query QP command extend response. */
71041 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_OPCODE_QUERY_QP_EXTEND UINT32_C(0x91)
71042 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_OPCODE_LAST	CREQ_QUERY_QP_EXTEND_RESP_SB_OPCODE_QUERY_QP_EXTEND
71043 	/* Status of the response. */
71044 	uint8_t	status;
71045 	/* Driver supplied handle to associate the command and the response. */
71046 	uint16_t	cookie;
71047 	/* Flags and attribs of the command. */
71048 	uint16_t	flags;
71049 	/* Size of the response buffer in 16-byte units. */
71050 	uint8_t	resp_size;
71051 	uint8_t	reserved8;
71052 	/* QP context id */
71053 	uint32_t	xid;
71054 	uint8_t	state;
71055 	/* QP state */
71056 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_MASK  UINT32_C(0xf)
71057 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_SFT   0
71058 	/* Reset. */
71059 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_RESET   UINT32_C(0x0)
71060 	/* Init. */
71061 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_INIT	UINT32_C(0x1)
71062 	/* Ready To Receive. */
71063 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_RTR	UINT32_C(0x2)
71064 	/* Ready To Send. */
71065 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_RTS	UINT32_C(0x3)
71066 	/* SQ Drain. */
71067 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_SQD	UINT32_C(0x4)
71068 	/* SQ Error. */
71069 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_SQE	UINT32_C(0x5)
71070 	/* Error. */
71071 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_ERR	UINT32_C(0x6)
71072 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_LAST   CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_ERR
71073 	/*  */
71074 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_UNUSED4_MASK UINT32_C(0xf0)
71075 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_UNUSED4_SFT 4
71076 	uint8_t	reserved_8;
71077 	/* Port ID associated with the QP. */
71078 	uint16_t	port_id;
71079 	/* Q_KEY. */
71080 	uint32_t	qkey;
71081 	/* Source GID index. */
71082 	uint16_t	sgid_index;
71083 	/* Network type. */
71084 	uint8_t	network_type;
71085 	/* RoCEv1. */
71086 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV1	UINT32_C(0x0)
71087 	/* RoCEv2 IPv4. */
71088 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV2_IPV4 UINT32_C(0x2)
71089 	/* RoCEv2 IPv6. */
71090 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV2_IPV6 UINT32_C(0x3)
71091 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_LAST	CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV2_IPV6
71092 	uint8_t	unused_0;
71093 	/* Destination GID. */
71094 	uint32_t	dgid[4];
71095 	/* Destination QP id. */
71096 	uint32_t	dest_qp_id;
71097 	/* Statistic collection ID allocated for this QP. */
71098 	uint8_t	stat_collection_id;
71099 	uint8_t	reserved2_8;
71100 	uint16_t	reserved_16;
71101 } creq_query_qp_extend_resp_sb_t, *pcreq_query_qp_extend_resp_sb_t;
71102 
71103 /*
71104  * TLV encapsulated Query QP extend control command response
71105  * side buffer.
71106  */
71107 /* creq_query_qp_extend_resp_sb_tlv (size:512b/64B) */
71108 
71109 typedef struct creq_query_qp_extend_resp_sb_tlv {
71110 	/*
71111 	 * The command discriminator is used to differentiate between various
71112 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
71113 	 * command messages as well as newer TLV encapsulated HWRM commands.
71114 	 *
71115 	 * For TLV encapsulated messages this field must be 0x8000.
71116 	 */
71117 	uint16_t	cmd_discr;
71118 	uint8_t	reserved_8b;
71119 	uint8_t	tlv_flags;
71120 	/*
71121 	 * Indicates the presence of additional TLV encapsulated data
71122 	 * follows this TLV.
71123 	 */
71124 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_MORE	UINT32_C(0x1)
71125 	/* Last TLV in a sequence of TLVs. */
71126 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
71127 	/* More TLVs follow this TLV. */
71128 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
71129 	/*
71130 	 * When an HWRM receiver detects a TLV type that it does not
71131 	 * support with the TLV required flag set, the receiver must
71132 	 * reject the HWRM message with an error code indicating an
71133 	 * unsupported TLV type.
71134 	 */
71135 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED	UINT32_C(0x2)
71136 	/* No */
71137 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
71138 	/* Yes */
71139 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
71140 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_LAST CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES
71141 	/*
71142 	 * This field defines the TLV type value which is divided into
71143 	 * two ranges to differentiate between global and local TLV types.
71144 	 * Global TLV types must be unique across all defined TLV types.
71145 	 * Local TLV types are valid only for extensions to a given
71146 	 * HWRM message and may be repeated across different HWRM message
71147 	 * types. There is a direct correlation of each HWRM message type
71148 	 * to a single global TLV type value.
71149 	 *
71150 	 * Global TLV range: `0 - (63k-1)`
71151 	 *
71152 	 * Local TLV range: `63k - (64k-1)`
71153 	 */
71154 	uint16_t	tlv_type;
71155 	/*
71156 	 * Length of the message data encapsulated by this TLV in bytes.
71157 	 * This length does not include the size of the TLV header itself
71158 	 * and it must be an integer multiple of 8B.
71159 	 */
71160 	uint16_t	length;
71161 	/*
71162 	 * Size of the tlv encapsulated response,
71163 	 * including all tlvs and extension data in 16-byte units.
71164 	 */
71165 	uint8_t	total_size;
71166 	uint8_t	reserved56[7];
71167 	/* Command opcode. */
71168 	uint8_t	opcode;
71169 	/* Query QP command extend response. */
71170 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_OPCODE_QUERY_QP_EXTEND UINT32_C(0x91)
71171 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_OPCODE_LAST	CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_OPCODE_QUERY_QP_EXTEND
71172 	/* Status of the response. */
71173 	uint8_t	status;
71174 	/* Driver supplied handle to associate the command and the response. */
71175 	uint16_t	cookie;
71176 	/* Flags and attribs of the command. */
71177 	uint16_t	flags;
71178 	/* Size of the response buffer in 16-byte units. */
71179 	uint8_t	resp_size;
71180 	uint8_t	reserved8;
71181 	/* QP context id */
71182 	uint32_t	xid;
71183 	uint8_t	state;
71184 	/* QP state */
71185 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_MASK  UINT32_C(0xf)
71186 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_SFT   0
71187 	/* Reset. */
71188 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_RESET   UINT32_C(0x0)
71189 	/* Init. */
71190 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_INIT	UINT32_C(0x1)
71191 	/* Ready To Receive. */
71192 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_RTR	UINT32_C(0x2)
71193 	/* Ready To Send. */
71194 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_RTS	UINT32_C(0x3)
71195 	/* SQ Drain. */
71196 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_SQD	UINT32_C(0x4)
71197 	/* SQ Error. */
71198 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_SQE	UINT32_C(0x5)
71199 	/* Error. */
71200 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_ERR	UINT32_C(0x6)
71201 		#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_LAST   CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_ERR
71202 	/*  */
71203 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_UNUSED4_MASK UINT32_C(0xf0)
71204 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_UNUSED4_SFT 4
71205 	uint8_t	reserved_8;
71206 	/* Port ID associated with the QP. */
71207 	uint16_t	port_id;
71208 	/* Q_KEY. */
71209 	uint32_t	qkey;
71210 	/* Source GID index. */
71211 	uint16_t	sgid_index;
71212 	/* Network type. */
71213 	uint8_t	network_type;
71214 	/* RoCEv1. */
71215 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV1	UINT32_C(0x0)
71216 	/* RoCEv2 IPv4. */
71217 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV2_IPV4 UINT32_C(0x2)
71218 	/* RoCEv2 IPv6. */
71219 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV2_IPV6 UINT32_C(0x3)
71220 	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_LAST	CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV2_IPV6
71221 	uint8_t	unused_0;
71222 	/* Destination GID. */
71223 	uint32_t	dgid[4];
71224 	/* Destination QP id. */
71225 	uint32_t	dest_qp_id;
71226 	/* Statistic collection ID allocated for this QP. */
71227 	uint8_t	stat_collection_id;
71228 	uint8_t	reserved2_8;
71229 	uint16_t	reserved_16;
71230 } creq_query_qp_extend_resp_sb_tlv_t, *pcreq_query_qp_extend_resp_sb_tlv_t;
71231 
71232 /**************
71233  * create_srq *
71234  **************/
71235 
71236 
71237 /* cmdq_create_srq (size:512b/64B) */
71238 
71239 typedef struct cmdq_create_srq {
71240 	/* Command opcode. */
71241 	uint8_t	opcode;
71242 	/* Create SRQ command allocates a SRQ with the specified parameters. */
71243 	#define CMDQ_CREATE_SRQ_OPCODE_CREATE_SRQ UINT32_C(0x5)
71244 	#define CMDQ_CREATE_SRQ_OPCODE_LAST	CMDQ_CREATE_SRQ_OPCODE_CREATE_SRQ
71245 	/* Size of the command in 16-byte units. */
71246 	uint8_t	cmd_size;
71247 	/* Flags and attribs of the command. */
71248 	uint16_t	flags;
71249 	/* This SRQ uses the steering tag specified in the command. */
71250 	#define CMDQ_CREATE_SRQ_FLAGS_STEERING_TAG_VALID	UINT32_C(0x1)
71251 	/* Driver supplied handle to associate the command and the response. */
71252 	uint16_t	cookie;
71253 	/* Size of the response buffer in 16-byte units. */
71254 	uint8_t	resp_size;
71255 	uint8_t	reserved8;
71256 	/* Host address of the response. */
71257 	uint64_t	resp_addr;
71258 	/* SRQ handle. */
71259 	uint64_t	srq_handle;
71260 	uint16_t	pg_size_lvl;
71261 	/* SRQ PBL indirect levels. */
71262 	#define CMDQ_CREATE_SRQ_LVL_MASK	UINT32_C(0x3)
71263 	#define CMDQ_CREATE_SRQ_LVL_SFT	0
71264 	/* PBL pointer is physical start address. */
71265 		#define CMDQ_CREATE_SRQ_LVL_LVL_0	UINT32_C(0x0)
71266 	/* PBL pointer points to PTE table. */
71267 		#define CMDQ_CREATE_SRQ_LVL_LVL_1	UINT32_C(0x1)
71268 	/*
71269 	 * PBL pointer points to PDE table with each entry pointing to PTE
71270 	 * tables.
71271 	 */
71272 		#define CMDQ_CREATE_SRQ_LVL_LVL_2	UINT32_C(0x2)
71273 		#define CMDQ_CREATE_SRQ_LVL_LAST	CMDQ_CREATE_SRQ_LVL_LVL_2
71274 	/* page size. */
71275 	#define CMDQ_CREATE_SRQ_PG_SIZE_MASK  UINT32_C(0x1c)
71276 	#define CMDQ_CREATE_SRQ_PG_SIZE_SFT   2
71277 	/* 4KB. */
71278 		#define CMDQ_CREATE_SRQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 2)
71279 	/* 8KB. */
71280 		#define CMDQ_CREATE_SRQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 2)
71281 	/* 64KB. */
71282 		#define CMDQ_CREATE_SRQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 2)
71283 	/* 2MB. */
71284 		#define CMDQ_CREATE_SRQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 2)
71285 	/* 8MB. */
71286 		#define CMDQ_CREATE_SRQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 2)
71287 	/* 1GB. */
71288 		#define CMDQ_CREATE_SRQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 2)
71289 		#define CMDQ_CREATE_SRQ_PG_SIZE_LAST   CMDQ_CREATE_SRQ_PG_SIZE_PG_1G
71290 	/* unused11 is 11 b */
71291 	#define CMDQ_CREATE_SRQ_UNUSED11_MASK UINT32_C(0xffe0)
71292 	#define CMDQ_CREATE_SRQ_UNUSED11_SFT  5
71293 	uint16_t	eventq_id;
71294 	/* eventq_id is 12 b */
71295 	#define CMDQ_CREATE_SRQ_EVENTQ_ID_MASK UINT32_C(0xfff)
71296 	#define CMDQ_CREATE_SRQ_EVENTQ_ID_SFT 0
71297 	/* unused4 is 4 b */
71298 	#define CMDQ_CREATE_SRQ_UNUSED4_MASK  UINT32_C(0xf000)
71299 	#define CMDQ_CREATE_SRQ_UNUSED4_SFT   12
71300 	/* Max number of SRQ wqes. */
71301 	uint16_t	srq_size;
71302 	uint16_t	srq_fwo;
71303 	/* Offset of first WQE in the first page of SRQ, in 128 byte units */
71304 	#define CMDQ_CREATE_SRQ_SRQ_FWO_MASK UINT32_C(0xfff)
71305 	#define CMDQ_CREATE_SRQ_SRQ_FWO_SFT 0
71306 	/*
71307 	 * Max SGEs per SRQ WQE. This field is enabled if flag,
71308 	 * create_srq_sge_supported, is set in query_func response.
71309 	 */
71310 	#define CMDQ_CREATE_SRQ_SRQ_SGE_MASK UINT32_C(0xf000)
71311 	#define CMDQ_CREATE_SRQ_SRQ_SGE_SFT 12
71312 	/* Doorbell page index. */
71313 	uint32_t	dpi;
71314 	/* Protection domain id. */
71315 	uint32_t	pd_id;
71316 	/* RQ PBL physical address. */
71317 	uint64_t	pbl;
71318 	/* Steering tag to use for memory transactions. */
71319 	uint16_t	steering_tag;
71320 	uint8_t	reserved48[6];
71321 	/* reserved64 is 64 b */
71322 	uint64_t	reserved64;
71323 } cmdq_create_srq_t, *pcmdq_create_srq_t;
71324 
71325 /* creq_create_srq_resp (size:128b/16B) */
71326 
71327 typedef struct creq_create_srq_resp {
71328 	uint8_t	type;
71329 	/*
71330 	 * This field indicates the exact type of the completion.
71331 	 * By convention, the LSB identifies the length of the
71332 	 * record in 16B units. Even values indicate 16B
71333 	 * records. Odd values indicate 32B
71334 	 * records.
71335 	 */
71336 	#define CREQ_CREATE_SRQ_RESP_TYPE_MASK	UINT32_C(0x3f)
71337 	#define CREQ_CREATE_SRQ_RESP_TYPE_SFT	0
71338 	/* QP Async Notification */
71339 		#define CREQ_CREATE_SRQ_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71340 		#define CREQ_CREATE_SRQ_RESP_TYPE_LAST	CREQ_CREATE_SRQ_RESP_TYPE_QP_EVENT
71341 	/* Status of the response. */
71342 	uint8_t	status;
71343 	/* Driver supplied handle to associate the command and the response. */
71344 	uint16_t	cookie;
71345 	/* SRQ context id */
71346 	uint32_t	xid;
71347 	uint8_t	v;
71348 	/*
71349 	 * This value is written by the NIC such that it will be different
71350 	 * for each pass through the completion queue. The even passes
71351 	 * will write 1. The odd passes will write 0.
71352 	 */
71353 	#define CREQ_CREATE_SRQ_RESP_V	UINT32_C(0x1)
71354 	/* Event or command opcode. */
71355 	uint8_t	event;
71356 	/* Create SRQ command response. */
71357 	#define CREQ_CREATE_SRQ_RESP_EVENT_CREATE_SRQ UINT32_C(0x5)
71358 	#define CREQ_CREATE_SRQ_RESP_EVENT_LAST	CREQ_CREATE_SRQ_RESP_EVENT_CREATE_SRQ
71359 	uint8_t	reserved48[6];
71360 } creq_create_srq_resp_t, *pcreq_create_srq_resp_t;
71361 
71362 /***************
71363  * destroy_srq *
71364  ***************/
71365 
71366 
71367 /* cmdq_destroy_srq (size:192b/24B) */
71368 
71369 typedef struct cmdq_destroy_srq {
71370 	/* Command opcode. */
71371 	uint8_t	opcode;
71372 	/* Destroy SRQ command deletes and flushes the specified SRQ. */
71373 	#define CMDQ_DESTROY_SRQ_OPCODE_DESTROY_SRQ UINT32_C(0x6)
71374 	#define CMDQ_DESTROY_SRQ_OPCODE_LAST	CMDQ_DESTROY_SRQ_OPCODE_DESTROY_SRQ
71375 	/* Size of the command in 16-byte units. */
71376 	uint8_t	cmd_size;
71377 	/* Flags and attribs of the command. */
71378 	uint16_t	flags;
71379 	/* Driver supplied handle to associate the command and the response. */
71380 	uint16_t	cookie;
71381 	/* Size of the response buffer in 16-byte units. */
71382 	uint8_t	resp_size;
71383 	uint8_t	reserved8;
71384 	/* Host address of the response. */
71385 	uint64_t	resp_addr;
71386 	/* SRQ context id */
71387 	uint32_t	srq_cid;
71388 	uint32_t	unused_0;
71389 } cmdq_destroy_srq_t, *pcmdq_destroy_srq_t;
71390 
71391 /* creq_destroy_srq_resp (size:128b/16B) */
71392 
71393 typedef struct creq_destroy_srq_resp {
71394 	uint8_t	type;
71395 	/*
71396 	 * This field indicates the exact type of the completion.
71397 	 * By convention, the LSB identifies the length of the
71398 	 * record in 16B units. Even values indicate 16B
71399 	 * records. Odd values indicate 32B
71400 	 * records.
71401 	 */
71402 	#define CREQ_DESTROY_SRQ_RESP_TYPE_MASK	UINT32_C(0x3f)
71403 	#define CREQ_DESTROY_SRQ_RESP_TYPE_SFT	0
71404 	/* QP Async Notification */
71405 		#define CREQ_DESTROY_SRQ_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71406 		#define CREQ_DESTROY_SRQ_RESP_TYPE_LAST	CREQ_DESTROY_SRQ_RESP_TYPE_QP_EVENT
71407 	/* Status of the response. */
71408 	uint8_t	status;
71409 	/* Driver supplied handle to associate the command and the response. */
71410 	uint16_t	cookie;
71411 	/* SRQ context id */
71412 	uint32_t	xid;
71413 	uint8_t	v;
71414 	/*
71415 	 * This value is written by the NIC such that it will be different
71416 	 * for each pass through the completion queue. The even passes
71417 	 * will write 1. The odd passes will write 0.
71418 	 */
71419 	#define CREQ_DESTROY_SRQ_RESP_V	UINT32_C(0x1)
71420 	/* Event or command opcode. */
71421 	uint8_t	event;
71422 	/* Destroy SRQ command response. */
71423 	#define CREQ_DESTROY_SRQ_RESP_EVENT_DESTROY_SRQ UINT32_C(0x6)
71424 	#define CREQ_DESTROY_SRQ_RESP_EVENT_LAST	CREQ_DESTROY_SRQ_RESP_EVENT_DESTROY_SRQ
71425 	uint16_t	enable_for_arm[3];
71426 	#define CREQ_DESTROY_SRQ_RESP_UNUSED0_MASK	UINT32_C(0xffff)
71427 	#define CREQ_DESTROY_SRQ_RESP_UNUSED0_SFT	0
71428 	/*
71429 	 * Set to 1 if this SRQ is allowed to be armed for threshold async
71430 	 * event
71431 	 */
71432 	#define CREQ_DESTROY_SRQ_RESP_ENABLE_FOR_ARM_MASK UINT32_C(0x30000)
71433 	#define CREQ_DESTROY_SRQ_RESP_ENABLE_FOR_ARM_SFT 16
71434 } creq_destroy_srq_resp_t, *pcreq_destroy_srq_resp_t;
71435 
71436 /*************
71437  * query_srq *
71438  *************/
71439 
71440 
71441 /* cmdq_query_srq (size:192b/24B) */
71442 
71443 typedef struct cmdq_query_srq {
71444 	/* Command opcode. */
71445 	uint8_t	opcode;
71446 	/* Query SRP command retrieves info about the specified SRQ. */
71447 	#define CMDQ_QUERY_SRQ_OPCODE_QUERY_SRQ UINT32_C(0x8)
71448 	#define CMDQ_QUERY_SRQ_OPCODE_LAST	CMDQ_QUERY_SRQ_OPCODE_QUERY_SRQ
71449 	/* Size of the command in 16-byte units. */
71450 	uint8_t	cmd_size;
71451 	/* Flags and attribs of the command. */
71452 	uint16_t	flags;
71453 	/* Driver supplied handle to associate the command and the response. */
71454 	uint16_t	cookie;
71455 	/* Size of the response buffer in 16-byte units. */
71456 	uint8_t	resp_size;
71457 	uint8_t	reserved8;
71458 	/* Host address of the response. */
71459 	uint64_t	resp_addr;
71460 	/* SRQ context id */
71461 	uint32_t	srq_cid;
71462 	uint32_t	unused_0;
71463 } cmdq_query_srq_t, *pcmdq_query_srq_t;
71464 
71465 /* creq_query_srq_resp (size:128b/16B) */
71466 
71467 typedef struct creq_query_srq_resp {
71468 	uint8_t	type;
71469 	/*
71470 	 * This field indicates the exact type of the completion.
71471 	 * By convention, the LSB identifies the length of the
71472 	 * record in 16B units. Even values indicate 16B
71473 	 * records. Odd values indicate 32B
71474 	 * records.
71475 	 */
71476 	#define CREQ_QUERY_SRQ_RESP_TYPE_MASK	UINT32_C(0x3f)
71477 	#define CREQ_QUERY_SRQ_RESP_TYPE_SFT	0
71478 	/* QP Async Notification */
71479 		#define CREQ_QUERY_SRQ_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71480 		#define CREQ_QUERY_SRQ_RESP_TYPE_LAST	CREQ_QUERY_SRQ_RESP_TYPE_QP_EVENT
71481 	/* Status of the response. */
71482 	uint8_t	status;
71483 	/* Driver supplied handle to associate the command and the response. */
71484 	uint16_t	cookie;
71485 	/* Side buffer size in 16-byte units */
71486 	uint32_t	size;
71487 	uint8_t	v;
71488 	/*
71489 	 * This value is written by the NIC such that it will be different
71490 	 * for each pass through the completion queue. The even passes
71491 	 * will write 1. The odd passes will write 0.
71492 	 */
71493 	#define CREQ_QUERY_SRQ_RESP_V	UINT32_C(0x1)
71494 	/* Event or command opcode. */
71495 	uint8_t	event;
71496 	/* Query SRQ command response. */
71497 	#define CREQ_QUERY_SRQ_RESP_EVENT_QUERY_SRQ UINT32_C(0x8)
71498 	#define CREQ_QUERY_SRQ_RESP_EVENT_LAST	CREQ_QUERY_SRQ_RESP_EVENT_QUERY_SRQ
71499 	uint8_t	reserved48[6];
71500 } creq_query_srq_resp_t, *pcreq_query_srq_resp_t;
71501 
71502 /* Query SRQ command response side buffer structure. */
71503 /* creq_query_srq_resp_sb (size:256b/32B) */
71504 
71505 typedef struct creq_query_srq_resp_sb {
71506 	/* Command opcode. */
71507 	uint8_t	opcode;
71508 	/* Query SRQ command response. */
71509 	#define CREQ_QUERY_SRQ_RESP_SB_OPCODE_QUERY_SRQ UINT32_C(0x8)
71510 	#define CREQ_QUERY_SRQ_RESP_SB_OPCODE_LAST	CREQ_QUERY_SRQ_RESP_SB_OPCODE_QUERY_SRQ
71511 	/* Status of the response. */
71512 	uint8_t	status;
71513 	/* Driver supplied handle to associate the command and the response. */
71514 	uint16_t	cookie;
71515 	/* Flags and attribs of the command. */
71516 	uint16_t	flags;
71517 	/* Size of the response buffer in 16-byte units. */
71518 	uint8_t	resp_size;
71519 	uint8_t	reserved8;
71520 	/* SRQ context id */
71521 	uint32_t	xid;
71522 	/* Watermark value to generate a SRQ limit event. */
71523 	uint16_t	srq_limit;
71524 	uint16_t	reserved16;
71525 	/* data is 128 b */
71526 	uint32_t	data[4];
71527 } creq_query_srq_resp_sb_t, *pcreq_query_srq_resp_sb_t;
71528 
71529 /*************
71530  * create_cq *
71531  *************/
71532 
71533 
71534 /* cmdq_create_cq (size:512b/64B) */
71535 
71536 typedef struct cmdq_create_cq {
71537 	/* Command opcode. */
71538 	uint8_t	opcode;
71539 	/* Create CQ command allocates a CQ with the specified parameters. */
71540 	#define CMDQ_CREATE_CQ_OPCODE_CREATE_CQ UINT32_C(0x9)
71541 	#define CMDQ_CREATE_CQ_OPCODE_LAST	CMDQ_CREATE_CQ_OPCODE_CREATE_CQ
71542 	/* Size of the command in 16-byte units. */
71543 	uint8_t	cmd_size;
71544 	/* Flags and attribs of the command. */
71545 	uint16_t	flags;
71546 	/*
71547 	 * When the HW Doorbell Drop Recovery feature is enabled,
71548 	 * HW can flag false CQ overflow when CQ consumer index
71549 	 * doorbells are dropped when there really wasn't any overflow.
71550 	 * The CQE values could have already been processed by the driver,
71551 	 * but HW doesn't know about this because of the doorbell drop.
71552 	 * To avoid false detection of CQ overflow events,
71553 	 * it is recommended that CQ overflow detection is disabled
71554 	 * by the driver when HW based doorbell recovery is enabled.
71555 	 */
71556 	#define CMDQ_CREATE_CQ_FLAGS_DISABLE_CQ_OVERFLOW_DETECTION	UINT32_C(0x1)
71557 	/* This CQ uses the steering tag specified in the command. */
71558 	#define CMDQ_CREATE_CQ_FLAGS_STEERING_TAG_VALID		UINT32_C(0x2)
71559 	/*
71560 	 * This CQ uses the infinite CQ mode.
71561 	 * In the infinite CQ mode, all CQEs are written to the same
71562 	 * address. Note that this mode implies a HW client is
71563 	 * handling each entry instantly and avoiding overwrites.
71564 	 * The following limitations apply when this mode is enabled:
71565 	 * -cq_size field must be 1
71566 	 * -disable_cq_overflow_detection flag must be true.
71567 	 * -the CQ will never be armed.
71568 	 * -the consumer index of CQ will never be changed
71569 	 */
71570 	#define CMDQ_CREATE_CQ_FLAGS_INFINITE_CQ_MODE		UINT32_C(0x4)
71571 	/*
71572 	 * This CQ uses coalescing data specified in the command.
71573 	 * This feature is not supported if infinite_cq_mode is also enabled.
71574 	 */
71575 	#define CMDQ_CREATE_CQ_FLAGS_COALESCING_VALID		UINT32_C(0x8)
71576 	/* Driver supplied handle to associate the command and the response. */
71577 	uint16_t	cookie;
71578 	/* Size of the response buffer in 16-byte units. */
71579 	uint8_t	resp_size;
71580 	uint8_t	reserved8;
71581 	/* Host address of the response. */
71582 	uint64_t	resp_addr;
71583 	/* CQ handle. */
71584 	uint64_t	cq_handle;
71585 	uint32_t	pg_size_lvl;
71586 	/* PBL indirect levels. */
71587 	#define CMDQ_CREATE_CQ_LVL_MASK	UINT32_C(0x3)
71588 	#define CMDQ_CREATE_CQ_LVL_SFT	0
71589 	/* PBL pointer is physical start address. */
71590 		#define CMDQ_CREATE_CQ_LVL_LVL_0	UINT32_C(0x0)
71591 	/* PBL pointer points to PTE table. */
71592 		#define CMDQ_CREATE_CQ_LVL_LVL_1	UINT32_C(0x1)
71593 	/*
71594 	 * PBL pointer points to PDE table with each entry pointing to PTE
71595 	 * tables.
71596 	 */
71597 		#define CMDQ_CREATE_CQ_LVL_LVL_2	UINT32_C(0x2)
71598 		#define CMDQ_CREATE_CQ_LVL_LAST	CMDQ_CREATE_CQ_LVL_LVL_2
71599 	/* page size. */
71600 	#define CMDQ_CREATE_CQ_PG_SIZE_MASK  UINT32_C(0x1c)
71601 	#define CMDQ_CREATE_CQ_PG_SIZE_SFT   2
71602 	/* 4KB. */
71603 		#define CMDQ_CREATE_CQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 2)
71604 	/* 8KB. */
71605 		#define CMDQ_CREATE_CQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 2)
71606 	/* 64KB. */
71607 		#define CMDQ_CREATE_CQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 2)
71608 	/* 2MB. */
71609 		#define CMDQ_CREATE_CQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 2)
71610 	/* 8MB. */
71611 		#define CMDQ_CREATE_CQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 2)
71612 	/* 1GB. */
71613 		#define CMDQ_CREATE_CQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 2)
71614 		#define CMDQ_CREATE_CQ_PG_SIZE_LAST   CMDQ_CREATE_CQ_PG_SIZE_PG_1G
71615 	/* unused27 is 27 b */
71616 	#define CMDQ_CREATE_CQ_UNUSED27_MASK UINT32_C(0xffffffe0)
71617 	#define CMDQ_CREATE_CQ_UNUSED27_SFT  5
71618 	uint32_t	cq_fco_cnq_id;
71619 	/* cnq_id is 12 b */
71620 	#define CMDQ_CREATE_CQ_CNQ_ID_MASK UINT32_C(0xfff)
71621 	#define CMDQ_CREATE_CQ_CNQ_ID_SFT 0
71622 	/* Offset of first CQE in the first Page, in 32 byte units */
71623 	#define CMDQ_CREATE_CQ_CQ_FCO_MASK UINT32_C(0xfffff000)
71624 	#define CMDQ_CREATE_CQ_CQ_FCO_SFT 12
71625 	/* Doorbell page index. */
71626 	uint32_t	dpi;
71627 	/* Max number of CQ wqes. */
71628 	uint32_t	cq_size;
71629 	/* CQ PBL physical address. */
71630 	uint64_t	pbl;
71631 	/* Steering tag to use for memory transactions. */
71632 	uint16_t	steering_tag;
71633 	uint8_t	reserved16[2];
71634 	uint32_t	coalescing;
71635 	/*
71636 	 * Buffer Max time before flushing buffer (units of 1us). This
71637 	 * specifies the maximum time before completion buffers are
71638 	 * flushed out to host memory even if the number of coalesced
71639 	 * buffers is less than the threshold. buf_maxtime is 9 bits.
71640 	 */
71641 	#define CMDQ_CREATE_CQ_BUF_MAXTIME_MASK	UINT32_C(0x1ff)
71642 	#define CMDQ_CREATE_CQ_BUF_MAXTIME_SFT	0
71643 	/*
71644 	 * This specifies the number of buffers coalesced before sending
71645 	 * to memory during normal operation. Buffer unit is 16B
71646 	 * completions. normal_maxbuf is 5 bits.
71647 	 */
71648 	#define CMDQ_CREATE_CQ_NORMAL_MAXBUF_MASK	UINT32_C(0x3e00)
71649 	#define CMDQ_CREATE_CQ_NORMAL_MAXBUF_SFT	9
71650 	/*
71651 	 * This specifies the number of buffers coalesced before sending
71652 	 * to memory when the interrupt is masked. Buffer unit is 16B
71653 	 * completions. during_maxbuf is 5 bits.
71654 	 */
71655 	#define CMDQ_CREATE_CQ_DURING_MAXBUF_MASK	UINT32_C(0x7c000)
71656 	#define CMDQ_CREATE_CQ_DURING_MAXBUF_SFT	14
71657 	/*
71658 	 * This field is used to enable ring for global idle mode interrupt
71659 	 * generation. This mode will generate a notification (interrupt)
71660 	 * if armed when only one completion has been generated if the chip
71661 	 * is globally idle as determined by the device.
71662 	 * enable_ring_idle_mode is 1 bit.
71663 	 */
71664 	#define CMDQ_CREATE_CQ_ENABLE_RING_IDLE_MODE	UINT32_C(0x80000)
71665 	/* unused12 is 12 b */
71666 	#define CMDQ_CREATE_CQ_UNUSED12_MASK		UINT32_C(0xfff00000)
71667 	#define CMDQ_CREATE_CQ_UNUSED12_SFT		20
71668 	/* reserved64 is 64 b */
71669 	uint64_t	reserved64;
71670 } cmdq_create_cq_t, *pcmdq_create_cq_t;
71671 
71672 /* creq_create_cq_resp (size:128b/16B) */
71673 
71674 typedef struct creq_create_cq_resp {
71675 	uint8_t	type;
71676 	/*
71677 	 * This field indicates the exact type of the completion.
71678 	 * By convention, the LSB identifies the length of the
71679 	 * record in 16B units. Even values indicate 16B
71680 	 * records. Odd values indicate 32B
71681 	 * records.
71682 	 */
71683 	#define CREQ_CREATE_CQ_RESP_TYPE_MASK	UINT32_C(0x3f)
71684 	#define CREQ_CREATE_CQ_RESP_TYPE_SFT	0
71685 	/* QP Async Notification */
71686 		#define CREQ_CREATE_CQ_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71687 		#define CREQ_CREATE_CQ_RESP_TYPE_LAST	CREQ_CREATE_CQ_RESP_TYPE_QP_EVENT
71688 	/* Status of the response. */
71689 	uint8_t	status;
71690 	/* Driver supplied handle to associate the command and the response. */
71691 	uint16_t	cookie;
71692 	/* CQ context id */
71693 	uint32_t	xid;
71694 	uint8_t	v;
71695 	/*
71696 	 * This value is written by the NIC such that it will be different
71697 	 * for each pass through the completion queue. The even passes
71698 	 * will write 1. The odd passes will write 0.
71699 	 */
71700 	#define CREQ_CREATE_CQ_RESP_V	UINT32_C(0x1)
71701 	/* Event or command opcode. */
71702 	uint8_t	event;
71703 	/* Create CQ command response. */
71704 	#define CREQ_CREATE_CQ_RESP_EVENT_CREATE_CQ UINT32_C(0x9)
71705 	#define CREQ_CREATE_CQ_RESP_EVENT_LAST	CREQ_CREATE_CQ_RESP_EVENT_CREATE_CQ
71706 	uint8_t	reserved48[6];
71707 } creq_create_cq_resp_t, *pcreq_create_cq_resp_t;
71708 
71709 /**************
71710  * destroy_cq *
71711  **************/
71712 
71713 
71714 /* cmdq_destroy_cq (size:192b/24B) */
71715 
71716 typedef struct cmdq_destroy_cq {
71717 	/* Command opcode. */
71718 	uint8_t	opcode;
71719 	/* Destroy CQ command deletes and flushes the specified CQ. */
71720 	#define CMDQ_DESTROY_CQ_OPCODE_DESTROY_CQ UINT32_C(0xa)
71721 	#define CMDQ_DESTROY_CQ_OPCODE_LAST	CMDQ_DESTROY_CQ_OPCODE_DESTROY_CQ
71722 	/* Size of the command in 16-byte units. */
71723 	uint8_t	cmd_size;
71724 	/* Flags and attribs of the command. */
71725 	uint16_t	flags;
71726 	/* Driver supplied handle to associate the command and the response. */
71727 	uint16_t	cookie;
71728 	/* Size of the response buffer in 16-byte units. */
71729 	uint8_t	resp_size;
71730 	uint8_t	reserved8;
71731 	/* Host address of the response. */
71732 	uint64_t	resp_addr;
71733 	/* CQ context id */
71734 	uint32_t	cq_cid;
71735 	uint32_t	unused_0;
71736 } cmdq_destroy_cq_t, *pcmdq_destroy_cq_t;
71737 
71738 /* creq_destroy_cq_resp (size:128b/16B) */
71739 
71740 typedef struct creq_destroy_cq_resp {
71741 	uint8_t	type;
71742 	/*
71743 	 * This field indicates the exact type of the completion.
71744 	 * By convention, the LSB identifies the length of the
71745 	 * record in 16B units. Even values indicate 16B
71746 	 * records. Odd values indicate 32B
71747 	 * records.
71748 	 */
71749 	#define CREQ_DESTROY_CQ_RESP_TYPE_MASK	UINT32_C(0x3f)
71750 	#define CREQ_DESTROY_CQ_RESP_TYPE_SFT	0
71751 	/* QP Async Notification */
71752 		#define CREQ_DESTROY_CQ_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71753 		#define CREQ_DESTROY_CQ_RESP_TYPE_LAST	CREQ_DESTROY_CQ_RESP_TYPE_QP_EVENT
71754 	/* Status of the response. */
71755 	uint8_t	status;
71756 	/* Driver supplied handle to associate the command and the response. */
71757 	uint16_t	cookie;
71758 	/* CQ context id */
71759 	uint32_t	xid;
71760 	uint8_t	v;
71761 	/*
71762 	 * This value is written by the NIC such that it will be different
71763 	 * for each pass through the completion queue. The even passes
71764 	 * will write 1. The odd passes will write 0.
71765 	 */
71766 	#define CREQ_DESTROY_CQ_RESP_V	UINT32_C(0x1)
71767 	/* Event or command opcode. */
71768 	uint8_t	event;
71769 	/* Destroy CQ command response. */
71770 	#define CREQ_DESTROY_CQ_RESP_EVENT_DESTROY_CQ UINT32_C(0xa)
71771 	#define CREQ_DESTROY_CQ_RESP_EVENT_LAST	CREQ_DESTROY_CQ_RESP_EVENT_DESTROY_CQ
71772 	uint16_t	cq_arm_lvl;
71773 	/*
71774 	 * CQ ARM Level:
71775 	 * 0 ? Not Armed
71776 	 * 1 ? Arm SE Only, Generate CNQE only for incoming Solicited Events
71777 	 * 2 ? Arm all, Generate CNQE for Rx and Tx
71778 	 */
71779 	#define CREQ_DESTROY_CQ_RESP_CQ_ARM_LVL_MASK UINT32_C(0x3)
71780 	#define CREQ_DESTROY_CQ_RESP_CQ_ARM_LVL_SFT 0
71781 	/*
71782 	 * The total number of CNQ events for the CQ, incremented on each CNQ
71783 	 * event for the CQ (including firmware-generated CQ error
71784 	 * notification).
71785 	 */
71786 	uint16_t	total_cnq_events;
71787 	uint16_t	reserved16;
71788 } creq_destroy_cq_resp_t, *pcreq_destroy_cq_resp_t;
71789 
71790 /*************
71791  * resize_cq *
71792  *************/
71793 
71794 
71795 /* cmdq_resize_cq (size:320b/40B) */
71796 
71797 typedef struct cmdq_resize_cq {
71798 	/* Command opcode. */
71799 	uint8_t	opcode;
71800 	/* Resize CQ command resizes the specified CQ. */
71801 	#define CMDQ_RESIZE_CQ_OPCODE_RESIZE_CQ UINT32_C(0xc)
71802 	#define CMDQ_RESIZE_CQ_OPCODE_LAST	CMDQ_RESIZE_CQ_OPCODE_RESIZE_CQ
71803 	/* Size of the command in 16-byte units. */
71804 	uint8_t	cmd_size;
71805 	/* Flags and attribs of the command. */
71806 	uint16_t	flags;
71807 	/* Driver supplied handle to associate the command and the response. */
71808 	uint16_t	cookie;
71809 	/* Size of the response buffer in 16-byte units. */
71810 	uint8_t	resp_size;
71811 	uint8_t	reserved8;
71812 	/* Host address of the response. */
71813 	uint64_t	resp_addr;
71814 	/* CQ context id */
71815 	uint32_t	cq_cid;
71816 	uint32_t	new_cq_size_pg_size_lvl;
71817 	/* PBL indirect levels. */
71818 	#define CMDQ_RESIZE_CQ_LVL_MASK	UINT32_C(0x3)
71819 	#define CMDQ_RESIZE_CQ_LVL_SFT	0
71820 	/* PBL pointer is physical start address. */
71821 		#define CMDQ_RESIZE_CQ_LVL_LVL_0	UINT32_C(0x0)
71822 	/* PBL pointer points to PTE table. */
71823 		#define CMDQ_RESIZE_CQ_LVL_LVL_1	UINT32_C(0x1)
71824 	/*
71825 	 * PBL pointer points to PDE table with each entry pointing to PTE
71826 	 * tables.
71827 	 */
71828 		#define CMDQ_RESIZE_CQ_LVL_LVL_2	UINT32_C(0x2)
71829 		#define CMDQ_RESIZE_CQ_LVL_LAST	CMDQ_RESIZE_CQ_LVL_LVL_2
71830 	/* page size. */
71831 	#define CMDQ_RESIZE_CQ_PG_SIZE_MASK	UINT32_C(0x1c)
71832 	#define CMDQ_RESIZE_CQ_PG_SIZE_SFT	2
71833 	/* 4KB. */
71834 		#define CMDQ_RESIZE_CQ_PG_SIZE_PG_4K	(UINT32_C(0x0) << 2)
71835 	/* 8KB. */
71836 		#define CMDQ_RESIZE_CQ_PG_SIZE_PG_8K	(UINT32_C(0x1) << 2)
71837 	/* 64KB. */
71838 		#define CMDQ_RESIZE_CQ_PG_SIZE_PG_64K	(UINT32_C(0x2) << 2)
71839 	/* 2MB. */
71840 		#define CMDQ_RESIZE_CQ_PG_SIZE_PG_2M	(UINT32_C(0x3) << 2)
71841 	/* 8MB. */
71842 		#define CMDQ_RESIZE_CQ_PG_SIZE_PG_8M	(UINT32_C(0x4) << 2)
71843 	/* 1GB. */
71844 		#define CMDQ_RESIZE_CQ_PG_SIZE_PG_1G	(UINT32_C(0x5) << 2)
71845 		#define CMDQ_RESIZE_CQ_PG_SIZE_LAST	CMDQ_RESIZE_CQ_PG_SIZE_PG_1G
71846 	/* New max number of CQ wqes. */
71847 	#define CMDQ_RESIZE_CQ_NEW_CQ_SIZE_MASK UINT32_C(0x1fffffe0)
71848 	#define CMDQ_RESIZE_CQ_NEW_CQ_SIZE_SFT 5
71849 	/* CQ PBL physical address. */
71850 	uint64_t	new_pbl;
71851 	/* Offset of first CQE in the first Page, in 32 byte units */
71852 	uint32_t	new_cq_fco;
71853 	uint32_t	unused_0;
71854 } cmdq_resize_cq_t, *pcmdq_resize_cq_t;
71855 
71856 /* creq_resize_cq_resp (size:128b/16B) */
71857 
71858 typedef struct creq_resize_cq_resp {
71859 	uint8_t	type;
71860 	/*
71861 	 * This field indicates the exact type of the completion.
71862 	 * By convention, the LSB identifies the length of the
71863 	 * record in 16B units. Even values indicate 16B
71864 	 * records. Odd values indicate 32B
71865 	 * records.
71866 	 */
71867 	#define CREQ_RESIZE_CQ_RESP_TYPE_MASK	UINT32_C(0x3f)
71868 	#define CREQ_RESIZE_CQ_RESP_TYPE_SFT	0
71869 	/* QP Async Notification */
71870 		#define CREQ_RESIZE_CQ_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71871 		#define CREQ_RESIZE_CQ_RESP_TYPE_LAST	CREQ_RESIZE_CQ_RESP_TYPE_QP_EVENT
71872 	/* Status of the response. */
71873 	uint8_t	status;
71874 	/* Driver supplied handle to associate the command and the response. */
71875 	uint16_t	cookie;
71876 	/* CQ context id */
71877 	uint32_t	xid;
71878 	uint8_t	v;
71879 	/*
71880 	 * This value is written by the NIC such that it will be different
71881 	 * for each pass through the completion queue. The even passes
71882 	 * will write 1. The odd passes will write 0.
71883 	 */
71884 	#define CREQ_RESIZE_CQ_RESP_V	UINT32_C(0x1)
71885 	/* Event or command opcode. */
71886 	uint8_t	event;
71887 	/* Resize CQ command response. */
71888 	#define CREQ_RESIZE_CQ_RESP_EVENT_RESIZE_CQ UINT32_C(0xc)
71889 	#define CREQ_RESIZE_CQ_RESP_EVENT_LAST	CREQ_RESIZE_CQ_RESP_EVENT_RESIZE_CQ
71890 	uint8_t	reserved48[6];
71891 } creq_resize_cq_resp_t, *pcreq_resize_cq_resp_t;
71892 
71893 /*************
71894  * modify_cq *
71895  *************/
71896 
71897 
71898 /* cmdq_modify_cq (size:512b/64B) */
71899 
71900 typedef struct cmdq_modify_cq {
71901 	/* Command opcode. */
71902 	uint8_t	opcode;
71903 	/* Modify CQ updates specific params in the CQ context. */
71904 	#define CMDQ_MODIFY_CQ_OPCODE_MODIFY_CQ UINT32_C(0x90)
71905 	#define CMDQ_MODIFY_CQ_OPCODE_LAST	CMDQ_MODIFY_CQ_OPCODE_MODIFY_CQ
71906 	/* Size of the command in 16-byte units. */
71907 	uint8_t	cmd_size;
71908 	/* Flags and attribs of the command. */
71909 	uint16_t	flags;
71910 	/*
71911 	 * When the HW Doorbell Drop Recovery feature is enabled,
71912 	 * HW can flag false CQ overflow when CQ consumer index
71913 	 * doorbells are dropped when there really wasn't any overflow.
71914 	 * The CQE values could have already been processed by the driver,
71915 	 * but HW doesn't know about this because of the doorbell drop.
71916 	 * To avoid false detection of CQ overflow events,
71917 	 * it is recommended that CQ overflow detection is disabled
71918 	 * by the driver when HW based doorbell recovery is enabled.
71919 	 */
71920 	#define CMDQ_MODIFY_CQ_FLAGS_DISABLE_CQ_OVERFLOW_DETECTION	UINT32_C(0x1)
71921 	/* Driver supplied handle to associate the command and the response. */
71922 	uint16_t	cookie;
71923 	/* Size of the response buffer in 16-byte units. */
71924 	uint8_t	resp_size;
71925 	uint8_t	reserved8;
71926 	/* Host address of the response. */
71927 	uint64_t	resp_addr;
71928 	/* Modify mask signifies the field that is requesting the change. */
71929 	uint32_t	modify_mask;
71930 	/* Enable change. */
71931 	#define CMDQ_MODIFY_CQ_MODIFY_MASK_CQ_HANDLE	UINT32_C(0x1)
71932 	/* CNQ ID */
71933 	#define CMDQ_MODIFY_CQ_MODIFY_MASK_CNQ_ID	UINT32_C(0x2)
71934 	/* Offset of first CQE in the first page, in 32 byte units */
71935 	#define CMDQ_MODIFY_CQ_MODIFY_MASK_FCO	UINT32_C(0x4)
71936 	/* Doorbell page index */
71937 	#define CMDQ_MODIFY_CQ_MODIFY_MASK_DPI	UINT32_C(0x8)
71938 	/* Max number of CQ Wqes */
71939 	#define CMDQ_MODIFY_CQ_MODIFY_MASK_CQ_SIZE	UINT32_C(0x10)
71940 	/* CQ PBL physical address */
71941 	#define CMDQ_MODIFY_CQ_MODIFY_MASK_PBL	UINT32_C(0x20)
71942 	/* reserved32 is 32 b */
71943 	uint32_t	reserved32;
71944 	/* CQ handle. */
71945 	uint64_t	cq_handle;
71946 	uint32_t	cq_fco_cnq_id;
71947 	/* cnq_id is 12 b */
71948 	#define CMDQ_MODIFY_CQ_CNQ_ID_MASK UINT32_C(0xfff)
71949 	#define CMDQ_MODIFY_CQ_CNQ_ID_SFT 0
71950 	/* Offset of first CQE in the first Page, in 32 byte units */
71951 	#define CMDQ_MODIFY_CQ_CQ_FCO_MASK UINT32_C(0xfffff000)
71952 	#define CMDQ_MODIFY_CQ_CQ_FCO_SFT 12
71953 	/* Doorbell page index. */
71954 	uint32_t	dpi;
71955 	/* Max number of CQ wqes. */
71956 	uint32_t	cq_size;
71957 	/* reserved32_1 is 32 b */
71958 	uint32_t	reserved32_1;
71959 	/* CQ PBL physical address. */
71960 	uint64_t	pbl;
71961 	/* reserved64 is 64 b */
71962 	uint64_t	reserved64;
71963 } cmdq_modify_cq_t, *pcmdq_modify_cq_t;
71964 
71965 /* creq_modify_cq_resp (size:128b/16B) */
71966 
71967 typedef struct creq_modify_cq_resp {
71968 	uint8_t	type;
71969 	/*
71970 	 * This field indicates the exact type of the completion.
71971 	 * By convention, the LSB identifies the length of the
71972 	 * record in 16B units. Even values indicate 16B
71973 	 * records. Odd values indicate 32B
71974 	 * records.
71975 	 */
71976 	#define CREQ_MODIFY_CQ_RESP_TYPE_MASK	UINT32_C(0x3f)
71977 	#define CREQ_MODIFY_CQ_RESP_TYPE_SFT	0
71978 	/* QP Async Notification */
71979 		#define CREQ_MODIFY_CQ_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
71980 		#define CREQ_MODIFY_CQ_RESP_TYPE_LAST	CREQ_MODIFY_CQ_RESP_TYPE_QP_EVENT
71981 	/* Status of the response. */
71982 	uint8_t	status;
71983 	/* Driver supplied handle to associate the command and the response. */
71984 	uint16_t	cookie;
71985 	/* CQ context id */
71986 	uint32_t	xid;
71987 	uint8_t	v;
71988 	/*
71989 	 * This value is written by the NIC such that it will be different
71990 	 * for each pass through the completion queue. The even passes
71991 	 * will write 1. The odd passes will write 0.
71992 	 */
71993 	#define CREQ_MODIFY_CQ_RESP_V	UINT32_C(0x1)
71994 	/* Event or command opcode. */
71995 	uint8_t	event;
71996 	/* Modify CQ command response. */
71997 	#define CREQ_MODIFY_CQ_RESP_EVENT_MODIFY_CQ UINT32_C(0x9)
71998 	#define CREQ_MODIFY_CQ_RESP_EVENT_LAST	CREQ_MODIFY_CQ_RESP_EVENT_MODIFY_CQ
71999 	uint8_t	reserved48[6];
72000 } creq_modify_cq_resp_t, *pcreq_modify_cq_resp_t;
72001 
72002 /****************
72003  * allocate_mrw *
72004  ****************/
72005 
72006 
72007 /* cmdq_allocate_mrw (size:256b/32B) */
72008 
72009 typedef struct cmdq_allocate_mrw {
72010 	/* Command opcode. */
72011 	uint8_t	opcode;
72012 	/*
72013 	 * Allocate MRW command allocates a MR/MW with the specified
72014 	 * parameters and returns the region's L_KEY/R_KEY
72015 	 */
72016 	#define CMDQ_ALLOCATE_MRW_OPCODE_ALLOCATE_MRW UINT32_C(0xd)
72017 	#define CMDQ_ALLOCATE_MRW_OPCODE_LAST	CMDQ_ALLOCATE_MRW_OPCODE_ALLOCATE_MRW
72018 	/* Size of the command in 16-byte units. */
72019 	uint8_t	cmd_size;
72020 	/* Flags and attribs of the command. */
72021 	uint16_t	flags;
72022 	/* Driver supplied handle to associate the command and the response. */
72023 	uint16_t	cookie;
72024 	/* Size of the response buffer in 16-byte units. */
72025 	uint8_t	resp_size;
72026 	uint8_t	reserved8;
72027 	/* Host address of the response. */
72028 	uint64_t	resp_addr;
72029 	/* MRW handle. */
72030 	uint64_t	mrw_handle;
72031 	uint8_t	mrw_flags;
72032 	/* Allocate MRW flags. */
72033 	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MASK	UINT32_C(0xf)
72034 	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_SFT	0
72035 	/* Allocate Memory Region */
72036 		#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MR		UINT32_C(0x0)
72037 	/* Allocate Physical Memory Region */
72038 		#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR		UINT32_C(0x1)
72039 	/* Allocate Memory Window (type 1) */
72040 		#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1	UINT32_C(0x2)
72041 	/* Allocate Memory Window (type 2A) */
72042 		#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A	UINT32_C(0x3)
72043 	/* Allocate Memory Window (type 2B) */
72044 		#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B	UINT32_C(0x4)
72045 		#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_LAST	CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B
72046 	/*
72047 	 * This Memory Region / Memory Window uses the
72048 	 * steering tag specified in the command.
72049 	 */
72050 	#define CMDQ_ALLOCATE_MRW_STEERING_TAG_VALID	UINT32_C(0x10)
72051 	/* unused3 is 3 b */
72052 	#define CMDQ_ALLOCATE_MRW_UNUSED3_MASK	UINT32_C(0xe0)
72053 	#define CMDQ_ALLOCATE_MRW_UNUSED3_SFT		5
72054 	/* Access flags. */
72055 	uint8_t	access;
72056 	/* Consumer owns the key */
72057 	#define CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY	UINT32_C(0x20)
72058 	/* Steering tag to use for memory transactions. */
72059 	uint16_t	steering_tag;
72060 	/* Protection domain id. */
72061 	uint32_t	pd_id;
72062 } cmdq_allocate_mrw_t, *pcmdq_allocate_mrw_t;
72063 
72064 /* creq_allocate_mrw_resp (size:128b/16B) */
72065 
72066 typedef struct creq_allocate_mrw_resp {
72067 	uint8_t	type;
72068 	/*
72069 	 * This field indicates the exact type of the completion.
72070 	 * By convention, the LSB identifies the length of the
72071 	 * record in 16B units. Even values indicate 16B
72072 	 * records. Odd values indicate 32B
72073 	 * records.
72074 	 */
72075 	#define CREQ_ALLOCATE_MRW_RESP_TYPE_MASK	UINT32_C(0x3f)
72076 	#define CREQ_ALLOCATE_MRW_RESP_TYPE_SFT	0
72077 	/* QP Async Notification */
72078 		#define CREQ_ALLOCATE_MRW_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72079 		#define CREQ_ALLOCATE_MRW_RESP_TYPE_LAST	CREQ_ALLOCATE_MRW_RESP_TYPE_QP_EVENT
72080 	/* Status of the response. */
72081 	uint8_t	status;
72082 	/* Driver supplied handle to associate the command and the response. */
72083 	uint16_t	cookie;
72084 	/* L_KEY for MR, R_KEY for MW */
72085 	uint32_t	xid;
72086 	uint8_t	v;
72087 	/*
72088 	 * This value is written by the NIC such that it will be different
72089 	 * for each pass through the completion queue. The even passes
72090 	 * will write 1. The odd passes will write 0.
72091 	 */
72092 	#define CREQ_ALLOCATE_MRW_RESP_V	UINT32_C(0x1)
72093 	/* Event or command opcode. */
72094 	uint8_t	event;
72095 	/* Allocate MRW command response. */
72096 	#define CREQ_ALLOCATE_MRW_RESP_EVENT_ALLOCATE_MRW UINT32_C(0xd)
72097 	#define CREQ_ALLOCATE_MRW_RESP_EVENT_LAST	CREQ_ALLOCATE_MRW_RESP_EVENT_ALLOCATE_MRW
72098 	uint8_t	reserved48[6];
72099 } creq_allocate_mrw_resp_t, *pcreq_allocate_mrw_resp_t;
72100 
72101 /******************
72102  * deallocate_key *
72103  ******************/
72104 
72105 
72106 /* cmdq_deallocate_key (size:192b/24B) */
72107 
72108 typedef struct cmdq_deallocate_key {
72109 	/* Command opcode. */
72110 	uint8_t	opcode;
72111 	/*
72112 	 * De-allocate key command frees a MR/MW entry associated with the
72113 	 * specified key.
72114 	 */
72115 	#define CMDQ_DEALLOCATE_KEY_OPCODE_DEALLOCATE_KEY UINT32_C(0xe)
72116 	#define CMDQ_DEALLOCATE_KEY_OPCODE_LAST	CMDQ_DEALLOCATE_KEY_OPCODE_DEALLOCATE_KEY
72117 	/* Size of the command in 16-byte units. */
72118 	uint8_t	cmd_size;
72119 	/* Flags and attribs of the command. */
72120 	uint16_t	flags;
72121 	/* Driver supplied handle to associate the command and the response. */
72122 	uint16_t	cookie;
72123 	/* Size of the response buffer in 16-byte units. */
72124 	uint8_t	resp_size;
72125 	uint8_t	reserved8;
72126 	/* Host address of the response. */
72127 	uint64_t	resp_addr;
72128 	uint8_t	mrw_flags;
72129 	/* Deallocate MRW flags. */
72130 	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MASK	UINT32_C(0xf)
72131 	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_SFT	0
72132 	/* Deallocate Memory Region */
72133 		#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MR	UINT32_C(0x0)
72134 	/* Deallocate Physical Memory Region */
72135 		#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_PMR	UINT32_C(0x1)
72136 	/* Deallocate Memory Window (type 1) */
72137 		#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE1   UINT32_C(0x2)
72138 	/* Deallocate Memory Window (type 2A) */
72139 		#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2A  UINT32_C(0x3)
72140 	/* Deallocate Memory Window (type 2B) */
72141 		#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2B  UINT32_C(0x4)
72142 		#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_LAST	CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2B
72143 	/* unused4 is 4 b */
72144 	#define CMDQ_DEALLOCATE_KEY_UNUSED4_MASK	UINT32_C(0xf0)
72145 	#define CMDQ_DEALLOCATE_KEY_UNUSED4_SFT	4
72146 	/* unused24 is 24 b */
72147 	uint8_t	unused24[3];
72148 	/* key is 32 b */
72149 	uint32_t	key;
72150 } cmdq_deallocate_key_t, *pcmdq_deallocate_key_t;
72151 
72152 /* creq_deallocate_key_resp (size:128b/16B) */
72153 
72154 typedef struct creq_deallocate_key_resp {
72155 	uint8_t	type;
72156 	/*
72157 	 * This field indicates the exact type of the completion.
72158 	 * By convention, the LSB identifies the length of the
72159 	 * record in 16B units. Even values indicate 16B
72160 	 * records. Odd values indicate 32B
72161 	 * records.
72162 	 */
72163 	#define CREQ_DEALLOCATE_KEY_RESP_TYPE_MASK	UINT32_C(0x3f)
72164 	#define CREQ_DEALLOCATE_KEY_RESP_TYPE_SFT	0
72165 	/* QP Async Notification */
72166 		#define CREQ_DEALLOCATE_KEY_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72167 		#define CREQ_DEALLOCATE_KEY_RESP_TYPE_LAST	CREQ_DEALLOCATE_KEY_RESP_TYPE_QP_EVENT
72168 	/* Status of the response. */
72169 	uint8_t	status;
72170 	/* Driver supplied handle to associate the command and the response. */
72171 	uint16_t	cookie;
72172 	/* L_KEY for MR, R_KEY for MW */
72173 	uint32_t	xid;
72174 	uint8_t	v;
72175 	/*
72176 	 * This value is written by the NIC such that it will be different
72177 	 * for each pass through the completion queue. The even passes
72178 	 * will write 1. The odd passes will write 0.
72179 	 */
72180 	#define CREQ_DEALLOCATE_KEY_RESP_V	UINT32_C(0x1)
72181 	/* Event or command opcode. */
72182 	uint8_t	event;
72183 	/* De-allocate key command response. */
72184 	#define CREQ_DEALLOCATE_KEY_RESP_EVENT_DEALLOCATE_KEY UINT32_C(0xe)
72185 	#define CREQ_DEALLOCATE_KEY_RESP_EVENT_LAST	CREQ_DEALLOCATE_KEY_RESP_EVENT_DEALLOCATE_KEY
72186 	uint16_t	reserved16;
72187 	/*
72188 	 * This is advisory data to facilitate eventual destruction of
72189 	 * lingering memory regions in Windows. For memory window, it contains
72190 	 * non-zero HWID of a region this window was bound to (without the
72191 	 * 8-bit key portion). The host may check if the region is lingering in
72192 	 * destroyed state and try to destroy it now. For memory region, if
72193 	 * deallocation fails because there are windows bound to this region,
72194 	 * this field will contain approximate number of those windows. This
72195 	 * number is read from the context right before the deregistration is
72196 	 * attempted and can potentially be slightly different from the current
72197 	 * number.
72198 	 */
72199 	uint32_t	bound_window_info;
72200 } creq_deallocate_key_resp_t, *pcreq_deallocate_key_resp_t;
72201 
72202 /***************
72203  * register_mr *
72204  ***************/
72205 
72206 
72207 /* cmdq_register_mr (size:512b/64B) */
72208 
72209 typedef struct cmdq_register_mr {
72210 	/* Command opcode. */
72211 	uint8_t	opcode;
72212 	/* Register MR command registers memory to the specified MR. */
72213 	#define CMDQ_REGISTER_MR_OPCODE_REGISTER_MR UINT32_C(0xf)
72214 	#define CMDQ_REGISTER_MR_OPCODE_LAST	CMDQ_REGISTER_MR_OPCODE_REGISTER_MR
72215 	/* Size of the command in 16-byte units. */
72216 	uint8_t	cmd_size;
72217 	/* Flags and attribs of the command. */
72218 	uint16_t	flags;
72219 	/*
72220 	 * When set, a new MR will be allocated first and then registered
72221 	 * using the fields in this command. Note that for MR allocation
72222 	 * the `key` field doesn't hold a valid L_KEY and is instead
72223 	 * overloaded to hold the Protection Domain ID `pd_id`.
72224 	 */
72225 	#define CMDQ_REGISTER_MR_FLAGS_ALLOC_MR		UINT32_C(0x1)
72226 	/*
72227 	 * This MR uses the steering tag specified in the command.
72228 	 * This flag can only be enabled when the command is used
72229 	 * to allocate a new MR first.
72230 	 */
72231 	#define CMDQ_REGISTER_MR_FLAGS_STEERING_TAG_VALID	UINT32_C(0x2)
72232 	/* When set, enable per MR relaxed ordering support. */
72233 	#define CMDQ_REGISTER_MR_FLAGS_ENABLE_RO		UINT32_C(0x4)
72234 	/* Driver supplied handle to associate the command and the response. */
72235 	uint16_t	cookie;
72236 	/* Size of the response buffer in 16-byte units. */
72237 	uint8_t	resp_size;
72238 	uint8_t	reserved8;
72239 	/* Host address of the response. */
72240 	uint64_t	resp_addr;
72241 	uint8_t	log2_pg_size_lvl;
72242 	/* PBL indirect levels. */
72243 	#define CMDQ_REGISTER_MR_LVL_MASK		UINT32_C(0x3)
72244 	#define CMDQ_REGISTER_MR_LVL_SFT		0
72245 	/* PBL pointer is physical start address. */
72246 		#define CMDQ_REGISTER_MR_LVL_LVL_0		UINT32_C(0x0)
72247 	/* PBL pointer points to PTE table. */
72248 		#define CMDQ_REGISTER_MR_LVL_LVL_1		UINT32_C(0x1)
72249 	/*
72250 	 * PBL pointer points to PDE table with each entry pointing to PTE
72251 	 * tables.
72252 	 */
72253 		#define CMDQ_REGISTER_MR_LVL_LVL_2		UINT32_C(0x2)
72254 		#define CMDQ_REGISTER_MR_LVL_LAST		CMDQ_REGISTER_MR_LVL_LVL_2
72255 	/*
72256 	 * Log base 2 of page size; 12 is the minimum for 4KB. HW supported
72257 	 * values are enumerated below.
72258 	 */
72259 	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_MASK   UINT32_C(0x7c)
72260 	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_SFT	2
72261 	/* 4KB. */
72262 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_4K	(UINT32_C(0xc) << 2)
72263 	/* 8KB. */
72264 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_8K	(UINT32_C(0xd) << 2)
72265 	/* 64KB. */
72266 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_64K   (UINT32_C(0x10) << 2)
72267 	/* 256KB. */
72268 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_256K  (UINT32_C(0x12) << 2)
72269 	/* 1MB. */
72270 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1M	(UINT32_C(0x14) << 2)
72271 	/* 2MB. */
72272 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_2M	(UINT32_C(0x15) << 2)
72273 	/* 4MB. */
72274 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_4M	(UINT32_C(0x16) << 2)
72275 	/* 1GB. */
72276 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1G	(UINT32_C(0x1e) << 2)
72277 		#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_LAST	CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1G
72278 	/* unused1 is 1 b */
72279 	#define CMDQ_REGISTER_MR_UNUSED1		UINT32_C(0x80)
72280 	/* Access flags. */
72281 	uint8_t	access;
72282 	/* Local write access. */
72283 	#define CMDQ_REGISTER_MR_ACCESS_LOCAL_WRITE	UINT32_C(0x1)
72284 	/* Remote read access. */
72285 	#define CMDQ_REGISTER_MR_ACCESS_REMOTE_READ	UINT32_C(0x2)
72286 	/* Remote write access. */
72287 	#define CMDQ_REGISTER_MR_ACCESS_REMOTE_WRITE	UINT32_C(0x4)
72288 	/* Remote atomic access. */
72289 	#define CMDQ_REGISTER_MR_ACCESS_REMOTE_ATOMIC	UINT32_C(0x8)
72290 	/* Bind access allowed. */
72291 	#define CMDQ_REGISTER_MR_ACCESS_MW_BIND	UINT32_C(0x10)
72292 	/* Indicate Zero Based Virtual Address (ZBVA). */
72293 	#define CMDQ_REGISTER_MR_ACCESS_ZERO_BASED	UINT32_C(0x20)
72294 	uint16_t	log2_pbl_pg_size;
72295 	/*
72296 	 * Log base 2 of PBL page size; 12 is the minimum for 4KB. HW
72297 	 * supported values are enumerated below
72298 	 */
72299 	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_MASK   UINT32_C(0x1f)
72300 	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_SFT	0
72301 	/* 4KB. */
72302 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_4K	UINT32_C(0xc)
72303 	/* 8KB. */
72304 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_8K	UINT32_C(0xd)
72305 	/* 64KB. */
72306 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_64K   UINT32_C(0x10)
72307 	/* 256KB. */
72308 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_256K  UINT32_C(0x12)
72309 	/* 1MB. */
72310 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1M	UINT32_C(0x14)
72311 	/* 2MB. */
72312 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_2M	UINT32_C(0x15)
72313 	/* 4MB. */
72314 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_4M	UINT32_C(0x16)
72315 	/* 1GB. */
72316 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1G	UINT32_C(0x1e)
72317 		#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_LAST	CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1G
72318 	/* unused11 is 11 b */
72319 	#define CMDQ_REGISTER_MR_UNUSED11_MASK	UINT32_C(0xffe0)
72320 	#define CMDQ_REGISTER_MR_UNUSED11_SFT		5
72321 	/*
72322 	 * L_KEY of the previously allocated MR.
72323 	 *
72324 	 * If the `ALLOC_MR` flag is set then this field does not hold an
72325 	 * L_KEY and instead contains the Protection Domain ID `pd_id`.
72326 	 */
72327 	uint32_t	key;
72328 	/* Page table of the MR memory. */
72329 	uint64_t	pbl;
72330 	/* Virtual address of the MR. */
72331 	uint64_t	va;
72332 	/* Size of the MR. */
72333 	uint64_t	mr_size;
72334 	/* Steering tag to use for memory transactions. */
72335 	uint16_t	steering_tag;
72336 	uint8_t	reserved48[6];
72337 	/* reserved64 is 64 b */
72338 	uint64_t	reserved64;
72339 } cmdq_register_mr_t, *pcmdq_register_mr_t;
72340 
72341 /* creq_register_mr_resp (size:128b/16B) */
72342 
72343 typedef struct creq_register_mr_resp {
72344 	uint8_t	type;
72345 	/*
72346 	 * This field indicates the exact type of the completion.
72347 	 * By convention, the LSB identifies the length of the
72348 	 * record in 16B units. Even values indicate 16B
72349 	 * records. Odd values indicate 32B
72350 	 * records.
72351 	 */
72352 	#define CREQ_REGISTER_MR_RESP_TYPE_MASK	UINT32_C(0x3f)
72353 	#define CREQ_REGISTER_MR_RESP_TYPE_SFT	0
72354 	/* QP Async Notification */
72355 		#define CREQ_REGISTER_MR_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72356 		#define CREQ_REGISTER_MR_RESP_TYPE_LAST	CREQ_REGISTER_MR_RESP_TYPE_QP_EVENT
72357 	/* Status of the response. */
72358 	uint8_t	status;
72359 	/* Driver supplied handle to associate the command and the response. */
72360 	uint16_t	cookie;
72361 	/* L_KEY */
72362 	uint32_t	xid;
72363 	uint8_t	v;
72364 	/*
72365 	 * This value is written by the NIC such that it will be different
72366 	 * for each pass through the completion queue. The even passes
72367 	 * will write 1. The odd passes will write 0.
72368 	 */
72369 	#define CREQ_REGISTER_MR_RESP_V	UINT32_C(0x1)
72370 	/* Event or command opcode. */
72371 	uint8_t	event;
72372 	/* Register MR command response. */
72373 	#define CREQ_REGISTER_MR_RESP_EVENT_REGISTER_MR UINT32_C(0xf)
72374 	#define CREQ_REGISTER_MR_RESP_EVENT_LAST	CREQ_REGISTER_MR_RESP_EVENT_REGISTER_MR
72375 	uint8_t	reserved48[6];
72376 } creq_register_mr_resp_t, *pcreq_register_mr_resp_t;
72377 
72378 /*****************
72379  * deregister_mr *
72380  *****************/
72381 
72382 
72383 /* cmdq_deregister_mr (size:192b/24B) */
72384 
72385 typedef struct cmdq_deregister_mr {
72386 	/* Command opcode. */
72387 	uint8_t	opcode;
72388 	/* Deregister MR command de-registers memory from the specified MR. */
72389 	#define CMDQ_DEREGISTER_MR_OPCODE_DEREGISTER_MR UINT32_C(0x10)
72390 	#define CMDQ_DEREGISTER_MR_OPCODE_LAST	CMDQ_DEREGISTER_MR_OPCODE_DEREGISTER_MR
72391 	/* Size of the command in 16-byte units. */
72392 	uint8_t	cmd_size;
72393 	/* Flags and attribs of the command. */
72394 	uint16_t	flags;
72395 	/* Driver supplied handle to associate the command and the response. */
72396 	uint16_t	cookie;
72397 	/* Size of the response buffer in 16-byte units. */
72398 	uint8_t	resp_size;
72399 	uint8_t	reserved8;
72400 	/* Host address of the response. */
72401 	uint64_t	resp_addr;
72402 	/* L_KEY of the MR. */
72403 	uint32_t	lkey;
72404 	uint32_t	unused_0;
72405 } cmdq_deregister_mr_t, *pcmdq_deregister_mr_t;
72406 
72407 /* creq_deregister_mr_resp (size:128b/16B) */
72408 
72409 typedef struct creq_deregister_mr_resp {
72410 	uint8_t	type;
72411 	/*
72412 	 * This field indicates the exact type of the completion.
72413 	 * By convention, the LSB identifies the length of the
72414 	 * record in 16B units. Even values indicate 16B
72415 	 * records. Odd values indicate 32B
72416 	 * records.
72417 	 */
72418 	#define CREQ_DEREGISTER_MR_RESP_TYPE_MASK	UINT32_C(0x3f)
72419 	#define CREQ_DEREGISTER_MR_RESP_TYPE_SFT	0
72420 	/* QP Async Notification */
72421 		#define CREQ_DEREGISTER_MR_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72422 		#define CREQ_DEREGISTER_MR_RESP_TYPE_LAST	CREQ_DEREGISTER_MR_RESP_TYPE_QP_EVENT
72423 	/* Status of the response. */
72424 	uint8_t	status;
72425 	/* Driver supplied handle to associate the command and the response. */
72426 	uint16_t	cookie;
72427 	/* L_KEY */
72428 	uint32_t	xid;
72429 	uint8_t	v;
72430 	/*
72431 	 * This value is written by the NIC such that it will be different
72432 	 * for each pass through the completion queue. The even passes
72433 	 * will write 1. The odd passes will write 0.
72434 	 */
72435 	#define CREQ_DEREGISTER_MR_RESP_V	UINT32_C(0x1)
72436 	/* Event or command opcode. */
72437 	uint8_t	event;
72438 	/* Deregister MR command response. */
72439 	#define CREQ_DEREGISTER_MR_RESP_EVENT_DEREGISTER_MR UINT32_C(0x10)
72440 	#define CREQ_DEREGISTER_MR_RESP_EVENT_LAST	CREQ_DEREGISTER_MR_RESP_EVENT_DEREGISTER_MR
72441 	uint16_t	reserved16;
72442 	/*
72443 	 * If deregister fails because there are windows bound to this region,
72444 	 * this field will contain approximate number of those windows. This
72445 	 * number is read from the context right before the deregistration is
72446 	 * attempted and can potentially be slightly different from the current
72447 	 * number.
72448 	 */
72449 	uint32_t	bound_windows;
72450 } creq_deregister_mr_resp_t, *pcreq_deregister_mr_resp_t;
72451 
72452 /***********
72453  * add_gid *
72454  ***********/
72455 
72456 
72457 /* cmdq_add_gid (size:384b/48B) */
72458 
72459 typedef struct cmdq_add_gid {
72460 	/* Command opcode. */
72461 	uint8_t	opcode;
72462 	/* Add GID command adds a GID to the local address table. */
72463 	#define CMDQ_ADD_GID_OPCODE_ADD_GID UINT32_C(0x11)
72464 	#define CMDQ_ADD_GID_OPCODE_LAST   CMDQ_ADD_GID_OPCODE_ADD_GID
72465 	/* Size of the command in 16-byte units. */
72466 	uint8_t	cmd_size;
72467 	/* Flags and attribs of the command. */
72468 	uint16_t	flags;
72469 	/* Driver supplied handle to associate the command and the response. */
72470 	uint16_t	cookie;
72471 	/* Size of the response buffer in 16-byte units. */
72472 	uint8_t	resp_size;
72473 	uint8_t	reserved8;
72474 	/* Host address of the response. */
72475 	uint64_t	resp_addr;
72476 	/* GID, specified in LE format. */
72477 	uint32_t	gid[4];
72478 	/* Source MAC. */
72479 	uint16_t	src_mac[3];
72480 	/* flags. */
72481 	uint16_t	vlan;
72482 	#define CMDQ_ADD_GID_VLAN_VLAN_EN_TPID_VLAN_ID_MASK	UINT32_C(0xffff)
72483 	#define CMDQ_ADD_GID_VLAN_VLAN_EN_TPID_VLAN_ID_SFT	0
72484 	/* Source VLAN id. */
72485 	#define CMDQ_ADD_GID_VLAN_VLAN_ID_MASK			UINT32_C(0xfff)
72486 	#define CMDQ_ADD_GID_VLAN_VLAN_ID_SFT			0
72487 	/* This set of bits select the TPID of the VLAN Tag. */
72488 	#define CMDQ_ADD_GID_VLAN_TPID_MASK			UINT32_C(0x7000)
72489 	#define CMDQ_ADD_GID_VLAN_TPID_SFT			12
72490 	/* TPID = 0x88A8. */
72491 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_88A8			(UINT32_C(0x0) << 12)
72492 	/* TPID = 0x8100. */
72493 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_8100			(UINT32_C(0x1) << 12)
72494 	/* TPID = 0x9100. */
72495 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_9100			(UINT32_C(0x2) << 12)
72496 	/* TPID = 0x9200. */
72497 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_9200			(UINT32_C(0x3) << 12)
72498 	/* TPID = 0x9300. */
72499 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_9300			(UINT32_C(0x4) << 12)
72500 	/* TPID = Configurable 1. */
72501 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG1			(UINT32_C(0x5) << 12)
72502 	/* TPID = Configurable 2. */
72503 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG2			(UINT32_C(0x6) << 12)
72504 	/* TPID = Configurable 3. */
72505 		#define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG3			(UINT32_C(0x7) << 12)
72506 		#define CMDQ_ADD_GID_VLAN_TPID_LAST			CMDQ_ADD_GID_VLAN_TPID_TPID_CFG3
72507 	/*
72508 	 * Setting this bit to 1 enables insertion of a VLAN Tag to a RoCE
72509 	 * header.
72510 	 */
72511 	#define CMDQ_ADD_GID_VLAN_VLAN_EN				UINT32_C(0x8000)
72512 	/* Identifier field in the IP header. */
72513 	uint16_t	ipid;
72514 	/* Stats context ID to use with this SGID */
72515 	uint16_t	stats_ctx;
72516 	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_VALID_STATS_CTX_ID_MASK		UINT32_C(0xffff)
72517 	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_VALID_STATS_CTX_ID_SFT		0
72518 	/* stats_ctx_id is 15 b */
72519 	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_ID_MASK				UINT32_C(0x7fff)
72520 	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_ID_SFT				0
72521 	/*
72522 	 * Setting this bit to 1 enables use of own stats context ID
72523 	 * instead of per-function.
72524 	 */
72525 	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_VALID				UINT32_C(0x8000)
72526 	uint32_t	unused_0;
72527 } cmdq_add_gid_t, *pcmdq_add_gid_t;
72528 
72529 /* creq_add_gid_resp (size:128b/16B) */
72530 
72531 typedef struct creq_add_gid_resp {
72532 	uint8_t	type;
72533 	/*
72534 	 * This field indicates the exact type of the completion.
72535 	 * By convention, the LSB identifies the length of the
72536 	 * record in 16B units. Even values indicate 16B
72537 	 * records. Odd values indicate 32B
72538 	 * records.
72539 	 */
72540 	#define CREQ_ADD_GID_RESP_TYPE_MASK	UINT32_C(0x3f)
72541 	#define CREQ_ADD_GID_RESP_TYPE_SFT	0
72542 	/* QP Async Notification */
72543 		#define CREQ_ADD_GID_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72544 		#define CREQ_ADD_GID_RESP_TYPE_LAST	CREQ_ADD_GID_RESP_TYPE_QP_EVENT
72545 	/* Status of the response. */
72546 	uint8_t	status;
72547 	/* Driver supplied handle to associate the command and the response. */
72548 	uint16_t	cookie;
72549 	/* GID index */
72550 	uint32_t	xid;
72551 	uint8_t	v;
72552 	/*
72553 	 * This value is written by the NIC such that it will be different
72554 	 * for each pass through the completion queue. The even passes
72555 	 * will write 1. The odd passes will write 0.
72556 	 */
72557 	#define CREQ_ADD_GID_RESP_V	UINT32_C(0x1)
72558 	/* Event or command opcode. */
72559 	uint8_t	event;
72560 	/* Add GID command response. */
72561 	#define CREQ_ADD_GID_RESP_EVENT_ADD_GID UINT32_C(0x11)
72562 	#define CREQ_ADD_GID_RESP_EVENT_LAST   CREQ_ADD_GID_RESP_EVENT_ADD_GID
72563 	uint8_t	reserved48[6];
72564 } creq_add_gid_resp_t, *pcreq_add_gid_resp_t;
72565 
72566 /**************
72567  * delete_gid *
72568  **************/
72569 
72570 
72571 /* cmdq_delete_gid (size:192b/24B) */
72572 
72573 typedef struct cmdq_delete_gid {
72574 	/* Command opcode. */
72575 	uint8_t	opcode;
72576 	/* Delete GID command deletes a GID from the local address table. */
72577 	#define CMDQ_DELETE_GID_OPCODE_DELETE_GID UINT32_C(0x12)
72578 	#define CMDQ_DELETE_GID_OPCODE_LAST	CMDQ_DELETE_GID_OPCODE_DELETE_GID
72579 	/* Size of the command in 16-byte units. */
72580 	uint8_t	cmd_size;
72581 	/* Flags and attribs of the command. */
72582 	uint16_t	flags;
72583 	/* Driver supplied handle to associate the command and the response. */
72584 	uint16_t	cookie;
72585 	/* Size of the response buffer in 16-byte units. */
72586 	uint8_t	resp_size;
72587 	uint8_t	reserved8;
72588 	/* Host address of the response. */
72589 	uint64_t	resp_addr;
72590 	/* GID index */
72591 	uint16_t	gid_index;
72592 	uint8_t	unused_0[6];
72593 } cmdq_delete_gid_t, *pcmdq_delete_gid_t;
72594 
72595 /* creq_delete_gid_resp (size:128b/16B) */
72596 
72597 typedef struct creq_delete_gid_resp {
72598 	uint8_t	type;
72599 	/*
72600 	 * This field indicates the exact type of the completion.
72601 	 * By convention, the LSB identifies the length of the
72602 	 * record in 16B units. Even values indicate 16B
72603 	 * records. Odd values indicate 32B
72604 	 * records.
72605 	 */
72606 	#define CREQ_DELETE_GID_RESP_TYPE_MASK	UINT32_C(0x3f)
72607 	#define CREQ_DELETE_GID_RESP_TYPE_SFT	0
72608 	/* QP Async Notification */
72609 		#define CREQ_DELETE_GID_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72610 		#define CREQ_DELETE_GID_RESP_TYPE_LAST	CREQ_DELETE_GID_RESP_TYPE_QP_EVENT
72611 	/* Status of the response. */
72612 	uint8_t	status;
72613 	/* Driver supplied handle to associate the command and the response. */
72614 	uint16_t	cookie;
72615 	/* GID index */
72616 	uint32_t	xid;
72617 	uint8_t	v;
72618 	/*
72619 	 * This value is written by the NIC such that it will be different
72620 	 * for each pass through the completion queue. The even passes
72621 	 * will write 1. The odd passes will write 0.
72622 	 */
72623 	#define CREQ_DELETE_GID_RESP_V	UINT32_C(0x1)
72624 	/* Event or command opcode. */
72625 	uint8_t	event;
72626 	/* Delete GID command response. */
72627 	#define CREQ_DELETE_GID_RESP_EVENT_DELETE_GID UINT32_C(0x12)
72628 	#define CREQ_DELETE_GID_RESP_EVENT_LAST	CREQ_DELETE_GID_RESP_EVENT_DELETE_GID
72629 	uint8_t	reserved48[6];
72630 } creq_delete_gid_resp_t, *pcreq_delete_gid_resp_t;
72631 
72632 /**************
72633  * modify_gid *
72634  **************/
72635 
72636 
72637 /* cmdq_modify_gid (size:384b/48B) */
72638 
72639 typedef struct cmdq_modify_gid {
72640 	/* Command opcode. */
72641 	uint8_t	opcode;
72642 	/* Modify GID command modifies a GID in the local address table. */
72643 	#define CMDQ_MODIFY_GID_OPCODE_MODIFY_GID UINT32_C(0x17)
72644 	#define CMDQ_MODIFY_GID_OPCODE_LAST	CMDQ_MODIFY_GID_OPCODE_MODIFY_GID
72645 	/* Size of the command in 16-byte units. */
72646 	uint8_t	cmd_size;
72647 	/* Flags and attribs of the command. */
72648 	uint16_t	flags;
72649 	/* Driver supplied handle to associate the command and the response. */
72650 	uint16_t	cookie;
72651 	/* Size of the response buffer in 16-byte units. */
72652 	uint8_t	resp_size;
72653 	uint8_t	reserved8;
72654 	/* Host address of the response. */
72655 	uint64_t	resp_addr;
72656 	/* GID */
72657 	uint32_t	gid[4];
72658 	/* Source MAC. */
72659 	uint16_t	src_mac[3];
72660 	/* flags. */
72661 	uint16_t	vlan;
72662 	/* Source VLAN id. */
72663 	#define CMDQ_MODIFY_GID_VLAN_VLAN_ID_MASK  UINT32_C(0xfff)
72664 	#define CMDQ_MODIFY_GID_VLAN_VLAN_ID_SFT   0
72665 	/* This set of bits select the TPID of the VLAN Tag. */
72666 	#define CMDQ_MODIFY_GID_VLAN_TPID_MASK	UINT32_C(0x7000)
72667 	#define CMDQ_MODIFY_GID_VLAN_TPID_SFT	12
72668 	/* TPID = 0x88A8. */
72669 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_88A8  (UINT32_C(0x0) << 12)
72670 	/* TPID = 0x8100. */
72671 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_8100  (UINT32_C(0x1) << 12)
72672 	/* TPID = 0x9100. */
72673 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9100  (UINT32_C(0x2) << 12)
72674 	/* TPID = 0x9200. */
72675 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9200  (UINT32_C(0x3) << 12)
72676 	/* TPID = 0x9300. */
72677 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9300  (UINT32_C(0x4) << 12)
72678 	/* TPID = Configurable 1. */
72679 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG1  (UINT32_C(0x5) << 12)
72680 	/* TPID = Configurable 2. */
72681 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG2  (UINT32_C(0x6) << 12)
72682 	/* TPID = Configurable 3. */
72683 		#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG3  (UINT32_C(0x7) << 12)
72684 		#define CMDQ_MODIFY_GID_VLAN_TPID_LAST	CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG3
72685 	/*
72686 	 * Setting this bit to 1 enables insertion of a VLAN Tag to a RoCE
72687 	 * header.
72688 	 */
72689 	#define CMDQ_MODIFY_GID_VLAN_VLAN_EN	UINT32_C(0x8000)
72690 	/* Identifier field in the IP header. */
72691 	uint16_t	ipid;
72692 	/* GID index */
72693 	uint16_t	gid_index;
72694 	/* Stats context ID to use with this SGID */
72695 	uint16_t	stats_ctx;
72696 	/* stats_ctx_id is 15 b */
72697 	#define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_ID_MASK   UINT32_C(0x7fff)
72698 	#define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_ID_SFT	0
72699 	/*
72700 	 * Setting this bit to 1 enables use of own stats context ID
72701 	 * instead of per-function.
72702 	 */
72703 	#define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_VALID	UINT32_C(0x8000)
72704 	uint16_t	unused_0;
72705 } cmdq_modify_gid_t, *pcmdq_modify_gid_t;
72706 
72707 /* creq_modify_gid_resp (size:128b/16B) */
72708 
72709 typedef struct creq_modify_gid_resp {
72710 	uint8_t	type;
72711 	/*
72712 	 * This field indicates the exact type of the completion.
72713 	 * By convention, the LSB identifies the length of the
72714 	 * record in 16B units. Even values indicate 16B
72715 	 * records. Odd values indicate 32B
72716 	 * records.
72717 	 */
72718 	#define CREQ_MODIFY_GID_RESP_TYPE_MASK	UINT32_C(0x3f)
72719 	#define CREQ_MODIFY_GID_RESP_TYPE_SFT	0
72720 	/* QP Async Notification */
72721 		#define CREQ_MODIFY_GID_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72722 		#define CREQ_MODIFY_GID_RESP_TYPE_LAST	CREQ_MODIFY_GID_RESP_TYPE_QP_EVENT
72723 	/* Status of the response. */
72724 	uint8_t	status;
72725 	/* Driver supplied handle to associate the command and the response. */
72726 	uint16_t	cookie;
72727 	/* GID index */
72728 	uint32_t	xid;
72729 	uint8_t	v;
72730 	/*
72731 	 * This value is written by the NIC such that it will be different
72732 	 * for each pass through the completion queue. The even passes
72733 	 * will write 1. The odd passes will write 0.
72734 	 */
72735 	#define CREQ_MODIFY_GID_RESP_V	UINT32_C(0x1)
72736 	/* Event or command opcode. */
72737 	uint8_t	event;
72738 	/* Add GID command response. */
72739 	#define CREQ_MODIFY_GID_RESP_EVENT_ADD_GID UINT32_C(0x11)
72740 	#define CREQ_MODIFY_GID_RESP_EVENT_LAST   CREQ_MODIFY_GID_RESP_EVENT_ADD_GID
72741 	uint8_t	reserved48[6];
72742 } creq_modify_gid_resp_t, *pcreq_modify_gid_resp_t;
72743 
72744 /*************
72745  * query_gid *
72746  *************/
72747 
72748 
72749 /* cmdq_query_gid (size:192b/24B) */
72750 
72751 typedef struct cmdq_query_gid {
72752 	/* Command opcode. */
72753 	uint8_t	opcode;
72754 	/* Query GID command queries a GID in the local address table. */
72755 	#define CMDQ_QUERY_GID_OPCODE_QUERY_GID UINT32_C(0x18)
72756 	#define CMDQ_QUERY_GID_OPCODE_LAST	CMDQ_QUERY_GID_OPCODE_QUERY_GID
72757 	/* Size of the command in 16-byte units. */
72758 	uint8_t	cmd_size;
72759 	/* Flags and attribs of the command. */
72760 	uint16_t	flags;
72761 	/* Driver supplied handle to associate the command and the response. */
72762 	uint16_t	cookie;
72763 	/* Size of the response buffer in 16-byte units. */
72764 	uint8_t	resp_size;
72765 	uint8_t	reserved8;
72766 	/* Host address of the response. */
72767 	uint64_t	resp_addr;
72768 	/* GID index */
72769 	uint16_t	gid_index;
72770 	/* unused16 is 16 b */
72771 	uint8_t	unused16[6];
72772 } cmdq_query_gid_t, *pcmdq_query_gid_t;
72773 
72774 /* creq_query_gid_resp (size:128b/16B) */
72775 
72776 typedef struct creq_query_gid_resp {
72777 	uint8_t	type;
72778 	/*
72779 	 * This field indicates the exact type of the completion.
72780 	 * By convention, the LSB identifies the length of the
72781 	 * record in 16B units. Even values indicate 16B
72782 	 * records. Odd values indicate 32B
72783 	 * records.
72784 	 */
72785 	#define CREQ_QUERY_GID_RESP_TYPE_MASK	UINT32_C(0x3f)
72786 	#define CREQ_QUERY_GID_RESP_TYPE_SFT	0
72787 	/* QP Async Notification */
72788 		#define CREQ_QUERY_GID_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
72789 		#define CREQ_QUERY_GID_RESP_TYPE_LAST	CREQ_QUERY_GID_RESP_TYPE_QP_EVENT
72790 	/* Status of the response. */
72791 	uint8_t	status;
72792 	/* Driver supplied handle to associate the command and the response. */
72793 	uint16_t	cookie;
72794 	/* Side buffer size in 16-byte units */
72795 	uint32_t	size;
72796 	uint8_t	v;
72797 	/*
72798 	 * This value is written by the NIC such that it will be different
72799 	 * for each pass through the completion queue. The even passes
72800 	 * will write 1. The odd passes will write 0.
72801 	 */
72802 	#define CREQ_QUERY_GID_RESP_V	UINT32_C(0x1)
72803 	/* Event or command opcode. */
72804 	uint8_t	event;
72805 	/* Query GID command response. */
72806 	#define CREQ_QUERY_GID_RESP_EVENT_QUERY_GID UINT32_C(0x18)
72807 	#define CREQ_QUERY_GID_RESP_EVENT_LAST	CREQ_QUERY_GID_RESP_EVENT_QUERY_GID
72808 	uint8_t	reserved48[6];
72809 } creq_query_gid_resp_t, *pcreq_query_gid_resp_t;
72810 
72811 /* Query GID command response side buffer structure */
72812 /* creq_query_gid_resp_sb (size:320b/40B) */
72813 
72814 typedef struct creq_query_gid_resp_sb {
72815 	/* Command opcode. */
72816 	uint8_t	opcode;
72817 	/* Query GID command response. */
72818 	#define CREQ_QUERY_GID_RESP_SB_OPCODE_QUERY_GID UINT32_C(0x18)
72819 	#define CREQ_QUERY_GID_RESP_SB_OPCODE_LAST	CREQ_QUERY_GID_RESP_SB_OPCODE_QUERY_GID
72820 	/* Status of the response. */
72821 	uint8_t	status;
72822 	/* Driver supplied handle to associate the command and the response. */
72823 	uint16_t	cookie;
72824 	/* Flags and attribs of the command. */
72825 	uint16_t	flags;
72826 	/* Size of the response buffer in 16-byte units. */
72827 	uint8_t	resp_size;
72828 	uint8_t	reserved8;
72829 	/* GID */
72830 	uint32_t	gid[4];
72831 	/* Source MAC. */
72832 	uint16_t	src_mac[3];
72833 	/* flags. */
72834 	uint16_t	vlan;
72835 	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_EN_TPID_VLAN_ID_MASK	UINT32_C(0xffff)
72836 	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_EN_TPID_VLAN_ID_SFT	0
72837 	/* Source VLAN id. */
72838 	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_ID_MASK			UINT32_C(0xfff)
72839 	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_ID_SFT			0
72840 	/* This set of bits select the TPID of the VLAN Tag. */
72841 	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_MASK			UINT32_C(0x7000)
72842 	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_SFT			12
72843 	/* TPID = 0x88A8. */
72844 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_88A8			(UINT32_C(0x0) << 12)
72845 	/* TPID = 0x8100. */
72846 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_8100			(UINT32_C(0x1) << 12)
72847 	/* TPID = 0x9100. */
72848 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9100			(UINT32_C(0x2) << 12)
72849 	/* TPID = 0x9200. */
72850 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9200			(UINT32_C(0x3) << 12)
72851 	/* TPID = 0x9300. */
72852 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9300			(UINT32_C(0x4) << 12)
72853 	/* TPID = Configurable 1. */
72854 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG1			(UINT32_C(0x5) << 12)
72855 	/* TPID = Configurable 2. */
72856 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG2			(UINT32_C(0x6) << 12)
72857 	/* TPID = Configurable 3. */
72858 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG3			(UINT32_C(0x7) << 12)
72859 		#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_LAST			CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG3
72860 	/*
72861 	 * Setting this bit to 1 enables insertion of a VLAN Tag to a RoCE
72862 	 * header.
72863 	 */
72864 	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_EN				UINT32_C(0x8000)
72865 	/* Identifier field in the IP header. */
72866 	uint16_t	ipid;
72867 	/* GID index */
72868 	uint16_t	gid_index;
72869 	uint32_t	unused_0;
72870 } creq_query_gid_resp_sb_t, *pcreq_query_gid_resp_sb_t;
72871 
72872 /**************
72873  * create_qp1 *
72874  **************/
72875 
72876 
72877 /* cmdq_create_qp1 (size:640b/80B) */
72878 
72879 typedef struct cmdq_create_qp1 {
72880 	/* Command opcode. */
72881 	uint8_t	opcode;
72882 	/* Create QP1 command allocates a QP1 only. */
72883 	#define CMDQ_CREATE_QP1_OPCODE_CREATE_QP1 UINT32_C(0x13)
72884 	#define CMDQ_CREATE_QP1_OPCODE_LAST	CMDQ_CREATE_QP1_OPCODE_CREATE_QP1
72885 	/* Size of the command in 16-byte units. */
72886 	uint8_t	cmd_size;
72887 	/* Flags and attribs of the command. */
72888 	uint16_t	flags;
72889 	/* Driver supplied handle to associate the command and the response. */
72890 	uint16_t	cookie;
72891 	/* Size of the response buffer in 16-byte units. */
72892 	uint8_t	resp_size;
72893 	uint8_t	reserved8;
72894 	/* Host address of the response. */
72895 	uint64_t	resp_addr;
72896 	/* QP1 handle. */
72897 	uint64_t	qp_handle;
72898 	/* Create QP1 flags. */
72899 	uint32_t	qp_flags;
72900 	/* SRQ is used. */
72901 	#define CMDQ_CREATE_QP1_QP_FLAGS_SRQ_USED		UINT32_C(0x1)
72902 	/* post CQE for all SQ WQEs. */
72903 	#define CMDQ_CREATE_QP1_QP_FLAGS_FORCE_COMPLETION	UINT32_C(0x2)
72904 	/* This QP can use reserved L_Key */
72905 	#define CMDQ_CREATE_QP1_QP_FLAGS_RESERVED_LKEY_ENABLE UINT32_C(0x4)
72906 	#define CMDQ_CREATE_QP1_QP_FLAGS_LAST		CMDQ_CREATE_QP1_QP_FLAGS_RESERVED_LKEY_ENABLE
72907 	/* Supported QP1 types. */
72908 	uint8_t	type;
72909 	/* General Services Interface on QP 1. */
72910 	#define CMDQ_CREATE_QP1_TYPE_GSI UINT32_C(0x1)
72911 	#define CMDQ_CREATE_QP1_TYPE_LAST CMDQ_CREATE_QP1_TYPE_GSI
72912 	uint8_t	sq_pg_size_sq_lvl;
72913 	/* SQ PBL indirect levels. */
72914 	#define CMDQ_CREATE_QP1_SQ_LVL_MASK	UINT32_C(0xf)
72915 	#define CMDQ_CREATE_QP1_SQ_LVL_SFT	0
72916 	/* PBL pointer is physical start address. */
72917 		#define CMDQ_CREATE_QP1_SQ_LVL_LVL_0	UINT32_C(0x0)
72918 	/* PBL pointer points to PTE table. */
72919 		#define CMDQ_CREATE_QP1_SQ_LVL_LVL_1	UINT32_C(0x1)
72920 	/*
72921 	 * PBL pointer points to PDE table with each entry pointing to PTE
72922 	 * tables.
72923 	 */
72924 		#define CMDQ_CREATE_QP1_SQ_LVL_LVL_2	UINT32_C(0x2)
72925 		#define CMDQ_CREATE_QP1_SQ_LVL_LAST	CMDQ_CREATE_QP1_SQ_LVL_LVL_2
72926 	/* SQ page size. */
72927 	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_MASK  UINT32_C(0xf0)
72928 	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_SFT   4
72929 	/* 4KB. */
72930 		#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
72931 	/* 8KB. */
72932 		#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
72933 	/* 64KB. */
72934 		#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
72935 	/* 2MB. */
72936 		#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
72937 	/* 8MB. */
72938 		#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
72939 	/* 1GB. */
72940 		#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
72941 		#define CMDQ_CREATE_QP1_SQ_PG_SIZE_LAST   CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_1G
72942 	uint8_t	rq_pg_size_rq_lvl;
72943 	/* RQ PBL indirect levels. */
72944 	#define CMDQ_CREATE_QP1_RQ_LVL_MASK	UINT32_C(0xf)
72945 	#define CMDQ_CREATE_QP1_RQ_LVL_SFT	0
72946 	/* PBL pointer is physical start address. */
72947 		#define CMDQ_CREATE_QP1_RQ_LVL_LVL_0	UINT32_C(0x0)
72948 	/* PBL pointer points to PTE table. */
72949 		#define CMDQ_CREATE_QP1_RQ_LVL_LVL_1	UINT32_C(0x1)
72950 	/*
72951 	 * PBL pointer points to PDE table with each entry pointing to PTE
72952 	 * tables.
72953 	 */
72954 		#define CMDQ_CREATE_QP1_RQ_LVL_LVL_2	UINT32_C(0x2)
72955 		#define CMDQ_CREATE_QP1_RQ_LVL_LAST	CMDQ_CREATE_QP1_RQ_LVL_LVL_2
72956 	/* RQ page size. */
72957 	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_MASK  UINT32_C(0xf0)
72958 	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_SFT   4
72959 	/* 4KB. */
72960 		#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_4K   (UINT32_C(0x0) << 4)
72961 	/* 8KB. */
72962 		#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_8K   (UINT32_C(0x1) << 4)
72963 	/* 64KB. */
72964 		#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_64K  (UINT32_C(0x2) << 4)
72965 	/* 2MB. */
72966 		#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_2M   (UINT32_C(0x3) << 4)
72967 	/* 8MB. */
72968 		#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_8M   (UINT32_C(0x4) << 4)
72969 	/* 1GB. */
72970 		#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_1G   (UINT32_C(0x5) << 4)
72971 		#define CMDQ_CREATE_QP1_RQ_PG_SIZE_LAST   CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_1G
72972 	uint8_t	unused_0;
72973 	/* Doorbell page index. */
72974 	uint32_t	dpi;
72975 	/* Max number of SQ wqes. */
72976 	uint32_t	sq_size;
72977 	/* Max number of RQ wqes. */
72978 	uint32_t	rq_size;
72979 	uint16_t	sq_fwo_sq_sge;
72980 	/* Max send SGEs per SWQE. */
72981 	#define CMDQ_CREATE_QP1_SQ_SGE_MASK UINT32_C(0xf)
72982 	#define CMDQ_CREATE_QP1_SQ_SGE_SFT 0
72983 	/* Offset of First WQE in the first SQ page, in 128 byte units */
72984 	#define CMDQ_CREATE_QP1_SQ_FWO_MASK UINT32_C(0xfff0)
72985 	#define CMDQ_CREATE_QP1_SQ_FWO_SFT 4
72986 	uint16_t	rq_fwo_rq_sge;
72987 	/* Max recv SGEs per RWQE (NOT SUPPORTED BY HARDWARE). */
72988 	#define CMDQ_CREATE_QP1_RQ_SGE_MASK UINT32_C(0xf)
72989 	#define CMDQ_CREATE_QP1_RQ_SGE_SFT 0
72990 	/* Offset of First WQE in the first RQ page, in 128 byte units */
72991 	#define CMDQ_CREATE_QP1_RQ_FWO_MASK UINT32_C(0xfff0)
72992 	#define CMDQ_CREATE_QP1_RQ_FWO_SFT 4
72993 	/* Send CQ context id. */
72994 	uint32_t	scq_cid;
72995 	/* Receive CQ context id. */
72996 	uint32_t	rcq_cid;
72997 	/* SRQ CQ context id. */
72998 	uint32_t	srq_cid;
72999 	/* Protection domain id. */
73000 	uint32_t	pd_id;
73001 	/* SQ PBL physical address. */
73002 	uint64_t	sq_pbl;
73003 	/* RQ PBL physical address. */
73004 	uint64_t	rq_pbl;
73005 } cmdq_create_qp1_t, *pcmdq_create_qp1_t;
73006 
73007 /* creq_create_qp1_resp (size:128b/16B) */
73008 
73009 typedef struct creq_create_qp1_resp {
73010 	uint8_t	type;
73011 	/*
73012 	 * This field indicates the exact type of the completion.
73013 	 * By convention, the LSB identifies the length of the
73014 	 * record in 16B units. Even values indicate 16B
73015 	 * records. Odd values indicate 32B
73016 	 * records.
73017 	 */
73018 	#define CREQ_CREATE_QP1_RESP_TYPE_MASK	UINT32_C(0x3f)
73019 	#define CREQ_CREATE_QP1_RESP_TYPE_SFT	0
73020 	/* QP Async Notification */
73021 		#define CREQ_CREATE_QP1_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
73022 		#define CREQ_CREATE_QP1_RESP_TYPE_LAST	CREQ_CREATE_QP1_RESP_TYPE_QP_EVENT
73023 	/* Status of the response. */
73024 	uint8_t	status;
73025 	/* Driver supplied handle to associate the command and the response. */
73026 	uint16_t	cookie;
73027 	/* QP1 context id */
73028 	uint32_t	xid;
73029 	uint8_t	v;
73030 	/*
73031 	 * This value is written by the NIC such that it will be different
73032 	 * for each pass through the completion queue. The even passes
73033 	 * will write 1. The odd passes will write 0.
73034 	 */
73035 	#define CREQ_CREATE_QP1_RESP_V	UINT32_C(0x1)
73036 	/* Event or command opcode. */
73037 	uint8_t	event;
73038 	/* Create QP1 command response. */
73039 	#define CREQ_CREATE_QP1_RESP_EVENT_CREATE_QP1 UINT32_C(0x13)
73040 	#define CREQ_CREATE_QP1_RESP_EVENT_LAST	CREQ_CREATE_QP1_RESP_EVENT_CREATE_QP1
73041 	uint8_t	reserved48[6];
73042 } creq_create_qp1_resp_t, *pcreq_create_qp1_resp_t;
73043 
73044 /***************
73045  * destroy_qp1 *
73046  ***************/
73047 
73048 
73049 /* cmdq_destroy_qp1 (size:192b/24B) */
73050 
73051 typedef struct cmdq_destroy_qp1 {
73052 	/* Command opcode. */
73053 	uint8_t	opcode;
73054 	/* Destroy QP1 command deletes and flushes the specified QP1. */
73055 	#define CMDQ_DESTROY_QP1_OPCODE_DESTROY_QP1 UINT32_C(0x14)
73056 	#define CMDQ_DESTROY_QP1_OPCODE_LAST	CMDQ_DESTROY_QP1_OPCODE_DESTROY_QP1
73057 	/* Size of the command in 16-byte units. */
73058 	uint8_t	cmd_size;
73059 	/* Flags and attribs of the command. */
73060 	uint16_t	flags;
73061 	/* Driver supplied handle to associate the command and the response. */
73062 	uint16_t	cookie;
73063 	/* Size of the response buffer in 16-byte units. */
73064 	uint8_t	resp_size;
73065 	uint8_t	reserved8;
73066 	/* Host address of the response. */
73067 	uint64_t	resp_addr;
73068 	/* QP1 context id */
73069 	uint32_t	qp1_cid;
73070 	uint32_t	unused_0;
73071 } cmdq_destroy_qp1_t, *pcmdq_destroy_qp1_t;
73072 
73073 /* creq_destroy_qp1_resp (size:128b/16B) */
73074 
73075 typedef struct creq_destroy_qp1_resp {
73076 	uint8_t	type;
73077 	/*
73078 	 * This field indicates the exact type of the completion.
73079 	 * By convention, the LSB identifies the length of the
73080 	 * record in 16B units. Even values indicate 16B
73081 	 * records. Odd values indicate 32B
73082 	 * records.
73083 	 */
73084 	#define CREQ_DESTROY_QP1_RESP_TYPE_MASK	UINT32_C(0x3f)
73085 	#define CREQ_DESTROY_QP1_RESP_TYPE_SFT	0
73086 	/* QP Async Notification */
73087 		#define CREQ_DESTROY_QP1_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
73088 		#define CREQ_DESTROY_QP1_RESP_TYPE_LAST	CREQ_DESTROY_QP1_RESP_TYPE_QP_EVENT
73089 	/* Status of the response. */
73090 	uint8_t	status;
73091 	/* Driver supplied handle to associate the command and the response. */
73092 	uint16_t	cookie;
73093 	/* QP1 context id */
73094 	uint32_t	xid;
73095 	uint8_t	v;
73096 	/*
73097 	 * This value is written by the NIC such that it will be different
73098 	 * for each pass through the completion queue. The even passes
73099 	 * will write 1. The odd passes will write 0.
73100 	 */
73101 	#define CREQ_DESTROY_QP1_RESP_V	UINT32_C(0x1)
73102 	/* Event or command opcode. */
73103 	uint8_t	event;
73104 	/* Destroy QP1 command response. */
73105 	#define CREQ_DESTROY_QP1_RESP_EVENT_DESTROY_QP1 UINT32_C(0x14)
73106 	#define CREQ_DESTROY_QP1_RESP_EVENT_LAST	CREQ_DESTROY_QP1_RESP_EVENT_DESTROY_QP1
73107 	uint8_t	reserved48[6];
73108 } creq_destroy_qp1_resp_t, *pcreq_destroy_qp1_resp_t;
73109 
73110 /*************
73111  * create_ah *
73112  *************/
73113 
73114 
73115 /* cmdq_create_ah (size:512b/64B) */
73116 
73117 typedef struct cmdq_create_ah {
73118 	/* Command opcode. */
73119 	uint8_t	opcode;
73120 	/* Create AH command allocates an AH with the specified parameters. */
73121 	#define CMDQ_CREATE_AH_OPCODE_CREATE_AH UINT32_C(0x15)
73122 	#define CMDQ_CREATE_AH_OPCODE_LAST	CMDQ_CREATE_AH_OPCODE_CREATE_AH
73123 	/* Size of the command in 16-byte units. */
73124 	uint8_t	cmd_size;
73125 	/* Flags and attribs of the command. */
73126 	uint16_t	flags;
73127 	/* Driver supplied handle to associate the command and the response. */
73128 	uint16_t	cookie;
73129 	/* Size of the response buffer in 16-byte units. */
73130 	uint8_t	resp_size;
73131 	uint8_t	reserved8;
73132 	/* Host address of the response. */
73133 	uint64_t	resp_addr;
73134 	/* AH handle. */
73135 	uint64_t	ah_handle;
73136 	/* Destination GID, specified in BE format. */
73137 	uint32_t	dgid[4];
73138 	/* V1, V2IPv4 or V2IPv6. */
73139 	uint8_t	type;
73140 	/* V2IPv4. */
73141 	#define CMDQ_CREATE_AH_TYPE_V1	UINT32_C(0x0)
73142 	/* V2IPv4. */
73143 	#define CMDQ_CREATE_AH_TYPE_V2IPV4 UINT32_C(0x2)
73144 	/* V2IPv6. */
73145 	#define CMDQ_CREATE_AH_TYPE_V2IPV6 UINT32_C(0x3)
73146 	#define CMDQ_CREATE_AH_TYPE_LAST  CMDQ_CREATE_AH_TYPE_V2IPV6
73147 	/* IPv6 Hop limit. */
73148 	uint8_t	hop_limit;
73149 	/* SGID index. */
73150 	uint16_t	sgid_index;
73151 	uint32_t	dest_vlan_id_flow_label;
73152 	/* Flow label. */
73153 	#define CMDQ_CREATE_AH_FLOW_LABEL_MASK  UINT32_C(0xfffff)
73154 	#define CMDQ_CREATE_AH_FLOW_LABEL_SFT   0
73155 	/* Destination VLAN ID. */
73156 	#define CMDQ_CREATE_AH_DEST_VLAN_ID_MASK UINT32_C(0xfff00000)
73157 	#define CMDQ_CREATE_AH_DEST_VLAN_ID_SFT 20
73158 	/* Protection domain id. */
73159 	uint32_t	pd_id;
73160 	uint32_t	unused_0;
73161 	/* Destination MAC address. */
73162 	uint16_t	dest_mac[3];
73163 	/* Traffic class. */
73164 	uint8_t	traffic_class;
73165 	uint8_t	enable_cc;
73166 	/* Enable congestion control. */
73167 	#define CMDQ_CREATE_AH_ENABLE_CC	UINT32_C(0x1)
73168 } cmdq_create_ah_t, *pcmdq_create_ah_t;
73169 
73170 /* creq_create_ah_resp (size:128b/16B) */
73171 
73172 typedef struct creq_create_ah_resp {
73173 	uint8_t	type;
73174 	/*
73175 	 * This field indicates the exact type of the completion.
73176 	 * By convention, the LSB identifies the length of the
73177 	 * record in 16B units. Even values indicate 16B
73178 	 * records. Odd values indicate 32B
73179 	 * records.
73180 	 */
73181 	#define CREQ_CREATE_AH_RESP_TYPE_MASK	UINT32_C(0x3f)
73182 	#define CREQ_CREATE_AH_RESP_TYPE_SFT	0
73183 	/* QP Async Notification */
73184 		#define CREQ_CREATE_AH_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
73185 		#define CREQ_CREATE_AH_RESP_TYPE_LAST	CREQ_CREATE_AH_RESP_TYPE_QP_EVENT
73186 	/* Status of the response. */
73187 	uint8_t	status;
73188 	/* Driver supplied handle to associate the command and the response. */
73189 	uint16_t	cookie;
73190 	/* AH context id */
73191 	uint32_t	xid;
73192 	uint8_t	v;
73193 	/*
73194 	 * This value is written by the NIC such that it will be different
73195 	 * for each pass through the completion queue. The even passes
73196 	 * will write 1. The odd passes will write 0.
73197 	 */
73198 	#define CREQ_CREATE_AH_RESP_V	UINT32_C(0x1)
73199 	/* Event or command opcode. */
73200 	uint8_t	event;
73201 	/* Create AH command response. */
73202 	#define CREQ_CREATE_AH_RESP_EVENT_CREATE_AH UINT32_C(0x15)
73203 	#define CREQ_CREATE_AH_RESP_EVENT_LAST	CREQ_CREATE_AH_RESP_EVENT_CREATE_AH
73204 	uint8_t	reserved48[6];
73205 } creq_create_ah_resp_t, *pcreq_create_ah_resp_t;
73206 
73207 /**************
73208  * destroy_ah *
73209  **************/
73210 
73211 
73212 /* cmdq_destroy_ah (size:192b/24B) */
73213 
73214 typedef struct cmdq_destroy_ah {
73215 	/* Command opcode. */
73216 	uint8_t	opcode;
73217 	/* Destroy AH command deletes the specified AH. */
73218 	#define CMDQ_DESTROY_AH_OPCODE_DESTROY_AH UINT32_C(0x16)
73219 	#define CMDQ_DESTROY_AH_OPCODE_LAST	CMDQ_DESTROY_AH_OPCODE_DESTROY_AH
73220 	/* Size of the command in 16-byte units. */
73221 	uint8_t	cmd_size;
73222 	/* Flags and attribs of the command. */
73223 	uint16_t	flags;
73224 	/* Driver supplied handle to associate the command and the response. */
73225 	uint16_t	cookie;
73226 	/* Size of the response buffer in 16-byte units. */
73227 	uint8_t	resp_size;
73228 	uint8_t	reserved8;
73229 	/* Host address of the response. */
73230 	uint64_t	resp_addr;
73231 	/* AH context id */
73232 	uint32_t	ah_cid;
73233 	uint32_t	unused_0;
73234 } cmdq_destroy_ah_t, *pcmdq_destroy_ah_t;
73235 
73236 /* creq_destroy_ah_resp (size:128b/16B) */
73237 
73238 typedef struct creq_destroy_ah_resp {
73239 	uint8_t	type;
73240 	/*
73241 	 * This field indicates the exact type of the completion.
73242 	 * By convention, the LSB identifies the length of the
73243 	 * record in 16B units. Even values indicate 16B
73244 	 * records. Odd values indicate 32B
73245 	 * records.
73246 	 */
73247 	#define CREQ_DESTROY_AH_RESP_TYPE_MASK	UINT32_C(0x3f)
73248 	#define CREQ_DESTROY_AH_RESP_TYPE_SFT	0
73249 	/* QP Async Notification */
73250 		#define CREQ_DESTROY_AH_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
73251 		#define CREQ_DESTROY_AH_RESP_TYPE_LAST	CREQ_DESTROY_AH_RESP_TYPE_QP_EVENT
73252 	/* Status of the response. */
73253 	uint8_t	status;
73254 	/* Driver supplied handle to associate the command and the response. */
73255 	uint16_t	cookie;
73256 	/* AH context id */
73257 	uint32_t	xid;
73258 	uint8_t	v;
73259 	/*
73260 	 * This value is written by the NIC such that it will be different
73261 	 * for each pass through the completion queue. The even passes
73262 	 * will write 1. The odd passes will write 0.
73263 	 */
73264 	#define CREQ_DESTROY_AH_RESP_V	UINT32_C(0x1)
73265 	/* Event or command opcode. */
73266 	uint8_t	event;
73267 	/* Destroy AH command response. */
73268 	#define CREQ_DESTROY_AH_RESP_EVENT_DESTROY_AH UINT32_C(0x16)
73269 	#define CREQ_DESTROY_AH_RESP_EVENT_LAST	CREQ_DESTROY_AH_RESP_EVENT_DESTROY_AH
73270 	uint8_t	reserved48[6];
73271 } creq_destroy_ah_resp_t, *pcreq_destroy_ah_resp_t;
73272 
73273 /********************
73274  * query_roce_stats *
73275  ********************/
73276 
73277 
73278 /* cmdq_query_roce_stats (size:192b/24B) */
73279 
73280 typedef struct cmdq_query_roce_stats {
73281 	/* Command opcode. */
73282 	uint8_t	opcode;
73283 	/* Query RoCE statistics. */
73284 	#define CMDQ_QUERY_ROCE_STATS_OPCODE_QUERY_ROCE_STATS UINT32_C(0x8e)
73285 	#define CMDQ_QUERY_ROCE_STATS_OPCODE_LAST		CMDQ_QUERY_ROCE_STATS_OPCODE_QUERY_ROCE_STATS
73286 	/* Size of the command in 16-byte units. */
73287 	uint8_t	cmd_size;
73288 	/* Flags and attribs of the command. */
73289 	uint16_t	flags;
73290 	/*
73291 	 * When this bit is set FW will use the collection_id to extract
73292 	 * RoCE statistics. If function_id is also specified the FW will
73293 	 * return stats corresponding to the collection for the function_id
73294 	 * specified.
73295 	 */
73296 	#define CMDQ_QUERY_ROCE_STATS_FLAGS_COLLECTION_ID	UINT32_C(0x1)
73297 	/*
73298 	 * When this bit is set FW will use the function_id to extract RoCE
73299 	 * statistics. When collection is specified then FW will return the
73300 	 * specific collection stats and if the collection is not specified
73301 	 * then FW will return the default stats which will be for all QPs.
73302 	 */
73303 	#define CMDQ_QUERY_ROCE_STATS_FLAGS_FUNCTION_ID	UINT32_C(0x2)
73304 	/* Driver supplied handle to associate the command and the response. */
73305 	uint16_t	cookie;
73306 	/* Size of the response buffer in 16-byte units. */
73307 	uint8_t	resp_size;
73308 	/* The specific statistics group being queried. */
73309 	uint8_t	collection_id;
73310 	/* Host address of the response. */
73311 	uint64_t	resp_addr;
73312 	/* Unique identifier for a function */
73313 	uint32_t	function_id;
73314 	/* PF number */
73315 	#define CMDQ_QUERY_ROCE_STATS_PF_NUM_MASK  UINT32_C(0xff)
73316 	#define CMDQ_QUERY_ROCE_STATS_PF_NUM_SFT   0
73317 	/* VF number */
73318 	#define CMDQ_QUERY_ROCE_STATS_VF_NUM_MASK  UINT32_C(0xffff00)
73319 	#define CMDQ_QUERY_ROCE_STATS_VF_NUM_SFT   8
73320 	/* When set the vf_num is valid. */
73321 	#define CMDQ_QUERY_ROCE_STATS_VF_VALID	UINT32_C(0x1000000)
73322 	uint32_t	reserved32;
73323 } cmdq_query_roce_stats_t, *pcmdq_query_roce_stats_t;
73324 
73325 /* creq_query_roce_stats_resp (size:128b/16B) */
73326 
73327 typedef struct creq_query_roce_stats_resp {
73328 	uint8_t	type;
73329 	/*
73330 	 * This field indicates the exact type of the completion.
73331 	 * By convention, the LSB identifies the length of the
73332 	 * record in 16B units. Even values indicate 16B
73333 	 * records. Odd values indicate 32B
73334 	 * records.
73335 	 */
73336 	#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_MASK	UINT32_C(0x3f)
73337 	#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_SFT	0
73338 	/* QP Async Notification */
73339 		#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
73340 		#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_LAST	CREQ_QUERY_ROCE_STATS_RESP_TYPE_QP_EVENT
73341 	/* Status of the response. */
73342 	uint8_t	status;
73343 	/* Driver supplied handle to associate the command and the response. */
73344 	uint16_t	cookie;
73345 	/* Side buffer size in 16-byte units */
73346 	uint32_t	size;
73347 	uint8_t	v;
73348 	/*
73349 	 * This value is written by the NIC such that it will be different
73350 	 * for each pass through the completion queue. The even passes
73351 	 * will write 1. The odd passes will write 0.
73352 	 */
73353 	#define CREQ_QUERY_ROCE_STATS_RESP_V	UINT32_C(0x1)
73354 	/* Event or command opcode. */
73355 	uint8_t	event;
73356 	/* Query RoCE statistics. */
73357 	#define CREQ_QUERY_ROCE_STATS_RESP_EVENT_QUERY_ROCE_STATS UINT32_C(0x8e)
73358 	#define CREQ_QUERY_ROCE_STATS_RESP_EVENT_LAST		CREQ_QUERY_ROCE_STATS_RESP_EVENT_QUERY_ROCE_STATS
73359 	uint8_t	reserved48[6];
73360 } creq_query_roce_stats_resp_t, *pcreq_query_roce_stats_resp_t;
73361 
73362 /* Query RoCE Stats command response side buffer structure. */
73363 /* creq_query_roce_stats_resp_sb (size:3072b/384B) */
73364 
73365 typedef struct creq_query_roce_stats_resp_sb {
73366 	/* Command opcode. */
73367 	uint8_t	opcode;
73368 	/* Query RoCE statistics. */
73369 	#define CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_QUERY_ROCE_STATS UINT32_C(0x8e)
73370 	#define CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_LAST		CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_QUERY_ROCE_STATS
73371 	/* Status of the response. */
73372 	uint8_t	status;
73373 	/* Driver supplied handle to associate the command and the response. */
73374 	uint16_t	cookie;
73375 	/* Flags and attribs of the command. */
73376 	uint16_t	flags;
73377 	/* Size of the response buffer in 16-byte units. */
73378 	uint8_t	resp_size;
73379 	uint8_t	rsvd;
73380 	uint32_t	num_counters;
73381 	uint32_t	rsvd1;
73382 	uint64_t	to_retransmits;
73383 	/* seq_err_naks_rcvd is 64 b */
73384 	uint64_t	seq_err_naks_rcvd;
73385 	/* max_retry_exceeded is 64 b */
73386 	uint64_t	max_retry_exceeded;
73387 	/* rnr_naks_rcvd is 64 b */
73388 	uint64_t	rnr_naks_rcvd;
73389 	uint64_t	missing_resp;
73390 	/* unrecoverable_err is 64 b */
73391 	uint64_t	unrecoverable_err;
73392 	/* bad_resp_err is 64 b */
73393 	uint64_t	bad_resp_err;
73394 	/* local_qp_op_err is 64 b */
73395 	uint64_t	local_qp_op_err;
73396 	/* local_protection_err is 64 b */
73397 	uint64_t	local_protection_err;
73398 	/* mem_mgmt_op_err is 64 b */
73399 	uint64_t	mem_mgmt_op_err;
73400 	/* remote_invalid_req_err is 64 b */
73401 	uint64_t	remote_invalid_req_err;
73402 	/* remote_access_err is 64 b */
73403 	uint64_t	remote_access_err;
73404 	/* remote_op_err is 64 b */
73405 	uint64_t	remote_op_err;
73406 	/* dup_req is 64 b */
73407 	uint64_t	dup_req;
73408 	/* res_exceed_max is 64 b */
73409 	uint64_t	res_exceed_max;
73410 	/* res_length_mismatch is 64 b */
73411 	uint64_t	res_length_mismatch;
73412 	/* res_exceeds_wqe is 64 b */
73413 	uint64_t	res_exceeds_wqe;
73414 	/* res_opcode_err is 64 b */
73415 	uint64_t	res_opcode_err;
73416 	/* res_rx_invalid_rkey is 64 b */
73417 	uint64_t	res_rx_invalid_rkey;
73418 	/* res_rx_domain_err is 64 b */
73419 	uint64_t	res_rx_domain_err;
73420 	/* res_rx_no_perm is 64 b */
73421 	uint64_t	res_rx_no_perm;
73422 	/* res_rx_range_err is 64 b */
73423 	uint64_t	res_rx_range_err;
73424 	/* res_tx_invalid_rkey is 64 b */
73425 	uint64_t	res_tx_invalid_rkey;
73426 	/* res_tx_domain_err is 64 b */
73427 	uint64_t	res_tx_domain_err;
73428 	/* res_tx_no_perm is 64 b */
73429 	uint64_t	res_tx_no_perm;
73430 	/* res_tx_range_err is 64 b */
73431 	uint64_t	res_tx_range_err;
73432 	/* res_irrq_oflow is 64 b */
73433 	uint64_t	res_irrq_oflow;
73434 	/* res_unsup_opcode is 64 b */
73435 	uint64_t	res_unsup_opcode;
73436 	/* res_unaligned_atomic is 64 b */
73437 	uint64_t	res_unaligned_atomic;
73438 	/* res_rem_inv_err is 64 b */
73439 	uint64_t	res_rem_inv_err;
73440 	/* res_mem_error is 64 b */
73441 	uint64_t	res_mem_error;
73442 	/* res_srq_err is 64 b */
73443 	uint64_t	res_srq_err;
73444 	/* res_cmp_err is 64 b */
73445 	uint64_t	res_cmp_err;
73446 	/* res_invalid_dup_rkey is 64 b */
73447 	uint64_t	res_invalid_dup_rkey;
73448 	/* res_wqe_format_err is 64 b */
73449 	uint64_t	res_wqe_format_err;
73450 	/* res_cq_load_err is 64 b */
73451 	uint64_t	res_cq_load_err;
73452 	/* res_srq_load_err is 64 b */
73453 	uint64_t	res_srq_load_err;
73454 	/* res_tx_pci_err is 64 b */
73455 	uint64_t	res_tx_pci_err;
73456 	/* res_rx_pci_err is 64 b */
73457 	uint64_t	res_rx_pci_err;
73458 	/* res_oos_drop_count is 64 b */
73459 	uint64_t	res_oos_drop_count;
73460 	/* active_qp_count_p0 is 64 b */
73461 	uint64_t	active_qp_count_p0;
73462 	/* active_qp_count_p1 is 64 b */
73463 	uint64_t	active_qp_count_p1;
73464 	/* active_qp_count_p2 is 64 b */
73465 	uint64_t	active_qp_count_p2;
73466 	/* active_qp_count_p3 is 64 b */
73467 	uint64_t	active_qp_count_p3;
73468 	/* express mode SQ doorbell overflow error 64b counter. */
73469 	uint64_t	xp_sq_overflow_err;
73470 	/* express mode RQ doorbell overflow error 64b counter. */
73471 	uint64_t	xp_rq_overflow_error;
73472 } creq_query_roce_stats_resp_sb_t, *pcreq_query_roce_stats_resp_sb_t;
73473 
73474 /************************
73475  * query_roce_stats_ext *
73476  ************************/
73477 
73478 
73479 /* cmdq_query_roce_stats_ext (size:192b/24B) */
73480 
73481 typedef struct cmdq_query_roce_stats_ext {
73482 	/* Command opcode. */
73483 	uint8_t	opcode;
73484 	/* Query extended RoCE statistics. */
73485 	#define CMDQ_QUERY_ROCE_STATS_EXT_OPCODE_QUERY_ROCE_STATS UINT32_C(0x92)
73486 	#define CMDQ_QUERY_ROCE_STATS_EXT_OPCODE_LAST		CMDQ_QUERY_ROCE_STATS_EXT_OPCODE_QUERY_ROCE_STATS
73487 	/* Size of the command in 16-byte units. */
73488 	uint8_t	cmd_size;
73489 	/* Flags and attribs of the command. */
73490 	uint16_t	flags;
73491 	/*
73492 	 * When this bit is set FW will use the collection_id to extract
73493 	 * RoCE statistics. If function_id is also specified the FW will
73494 	 * return stats corresponding to the collection for the function_id
73495 	 * specified.
73496 	 */
73497 	#define CMDQ_QUERY_ROCE_STATS_EXT_FLAGS_COLLECTION_ID	UINT32_C(0x1)
73498 	/*
73499 	 * When this bit is set FW will use the function_id to extract RoCE
73500 	 * statistics. When collection is specified then FW will return the
73501 	 * specific collection stats and if the collection is not specified
73502 	 * then FW will return the default stats which will be for all QPs.
73503 	 */
73504 	#define CMDQ_QUERY_ROCE_STATS_EXT_FLAGS_FUNCTION_ID	UINT32_C(0x2)
73505 	/* Driver supplied handle to associate the command and the response. */
73506 	uint16_t	cookie;
73507 	/* Size of the response buffer in 16-byte units. */
73508 	uint8_t	resp_size;
73509 	/* The specific statistics group being queried. */
73510 	uint8_t	collection_id;
73511 	/* Host address of the response. */
73512 	uint64_t	resp_addr;
73513 	/* Unique identifier for a function */
73514 	uint32_t	function_id;
73515 	/* PF number */
73516 	#define CMDQ_QUERY_ROCE_STATS_EXT_PF_NUM_MASK  UINT32_C(0xff)
73517 	#define CMDQ_QUERY_ROCE_STATS_EXT_PF_NUM_SFT   0
73518 	/* VF number */
73519 	#define CMDQ_QUERY_ROCE_STATS_EXT_VF_NUM_MASK  UINT32_C(0xffff00)
73520 	#define CMDQ_QUERY_ROCE_STATS_EXT_VF_NUM_SFT   8
73521 	/* When set the vf_num is valid. */
73522 	#define CMDQ_QUERY_ROCE_STATS_EXT_VF_VALID	UINT32_C(0x1000000)
73523 	uint32_t	reserved32;
73524 } cmdq_query_roce_stats_ext_t, *pcmdq_query_roce_stats_ext_t;
73525 
73526 /* creq_query_roce_stats_ext_resp (size:128b/16B) */
73527 
73528 typedef struct creq_query_roce_stats_ext_resp {
73529 	uint8_t	type;
73530 	/*
73531 	 * This field indicates the exact type of the completion.
73532 	 * By convention, the LSB identifies the length of the
73533 	 * record in 16B units. Even values indicate 16B
73534 	 * records. Odd values indicate 32B
73535 	 * records.
73536 	 */
73537 	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_MASK	UINT32_C(0x3f)
73538 	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_SFT	0
73539 	/* QP Async Notification */
73540 		#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
73541 		#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_LAST	CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_QP_EVENT
73542 	/* Status of the response. */
73543 	uint8_t	status;
73544 	/* Driver supplied handle to associate the command and the response. */
73545 	uint16_t	cookie;
73546 	/* Side buffer size in 16-byte units */
73547 	uint32_t	size;
73548 	uint8_t	v;
73549 	/*
73550 	 * This value is written by the NIC such that it will be different
73551 	 * for each pass through the completion queue. The even passes
73552 	 * will write 1. The odd passes will write 0.
73553 	 */
73554 	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_V	UINT32_C(0x1)
73555 	/* Event or command opcode. */
73556 	uint8_t	event;
73557 	/* Query extended RoCE statistics. */
73558 	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_EVENT_QUERY_ROCE_STATS_EXT UINT32_C(0x92)
73559 	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_EVENT_LAST		CREQ_QUERY_ROCE_STATS_EXT_RESP_EVENT_QUERY_ROCE_STATS_EXT
73560 	uint8_t	reserved48[6];
73561 } creq_query_roce_stats_ext_resp_t, *pcreq_query_roce_stats_ext_resp_t;
73562 
73563 /* Query extended RoCE Stats command response side buffer structure. */
73564 /* creq_query_roce_stats_ext_resp_sb (size:2304b/288B) */
73565 
73566 typedef struct creq_query_roce_stats_ext_resp_sb {
73567 	/* Command opcode. */
73568 	uint8_t	opcode;
73569 	/* Query extended RoCE statistics. */
73570 	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_SB_OPCODE_QUERY_ROCE_STATS_EXT UINT32_C(0x92)
73571 	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_SB_OPCODE_LAST		CREQ_QUERY_ROCE_STATS_EXT_RESP_SB_OPCODE_QUERY_ROCE_STATS_EXT
73572 	/* Status of the response. */
73573 	uint8_t	status;
73574 	/* Driver supplied handle to associate the command and the response. */
73575 	uint16_t	cookie;
73576 	/* Flags and attribs of the command. */
73577 	uint16_t	flags;
73578 	/* Size of the response buffer in 16-byte units. */
73579 	uint8_t	resp_size;
73580 	uint8_t	rsvd;
73581 	/* Number of transmitted Atomic request packets. */
73582 	uint64_t	tx_atomic_req_pkts;
73583 	/* Number of transmitted Read request packets. */
73584 	uint64_t	tx_read_req_pkts;
73585 	/* Number of transmitted Read response packets. */
73586 	uint64_t	tx_read_res_pkts;
73587 	/* Number of transmitted Write request packets. */
73588 	uint64_t	tx_write_req_pkts;
73589 	/*
73590 	 * Number of transmitted Send request packets.
73591 	 * This is for RC QPs only.
73592 	 */
73593 	uint64_t	tx_send_req_pkts;
73594 	/*
73595 	 * Number of transmitted RoCE packets.
73596 	 * This includes RC, UD, RawEth, and QP1 packets
73597 	 */
73598 	uint64_t	tx_roce_pkts;
73599 	/*
73600 	 * Number of transmitted RoCE header and payload bytes.
73601 	 * This includes RC, UD, RawEth, and QP1 packets.
73602 	 */
73603 	uint64_t	tx_roce_bytes;
73604 	/* Number of received Atomic request packets. */
73605 	uint64_t	rx_atomic_req_pkts;
73606 	/* Number of received Read request packets. */
73607 	uint64_t	rx_read_req_pkts;
73608 	/* Number of received Read response packets. */
73609 	uint64_t	rx_read_res_pkts;
73610 	/* Number of received Write request packets. */
73611 	uint64_t	rx_write_req_pkts;
73612 	/*
73613 	 * Number of received Send request packets.
73614 	 * This is for RC QPs only.
73615 	 */
73616 	uint64_t	rx_send_req_pkts;
73617 	/*
73618 	 * Number of received RoCE packets including RoCE packets with errors.
73619 	 * This includes RC, UD, RawEth, and QP1 packets
73620 	 */
73621 	uint64_t	rx_roce_pkts;
73622 	/*
73623 	 * Number of received RoCE header and payload bytes including RoCE
73624 	 * packets with errors.
73625 	 * This includes RC, UD, RawEth, and QP1 packets.
73626 	 */
73627 	uint64_t	rx_roce_bytes;
73628 	/*
73629 	 * Number of received RoCE packets.
73630 	 * This includes RC, UD, RawEth, and QP1 packets
73631 	 */
73632 	uint64_t	rx_roce_good_pkts;
73633 	/*
73634 	 * Number of received RoCE header and payload bytes.
73635 	 * This includes RC, UD, RawEth, and QP1 packets.
73636 	 */
73637 	uint64_t	rx_roce_good_bytes;
73638 	/*
73639 	 * Number of drops that occurred to lack of buffers.
73640 	 * This is for RC QPs only.
73641 	 */
73642 	uint64_t	rx_out_of_buffer_pkts;
73643 	/* Number of packets that were received out of sequence. */
73644 	uint64_t	rx_out_of_sequence_pkts;
73645 	/* Number of transmitted CNP packets. The counter is per port. */
73646 	uint64_t	tx_cnp_pkts;
73647 	/* Number of received CNP packets. The counter is per port. */
73648 	uint64_t	rx_cnp_pkts;
73649 	/* Number of received ECN-marked RoCE packets. The counter is per port. */
73650 	uint64_t	rx_ecn_marked_pkts;
73651 	/* Number of transmitted CNP bytes. */
73652 	uint64_t	tx_cnp_bytes;
73653 	/* Number of received CNP bytes. */
73654 	uint64_t	rx_cnp_bytes;
73655 	/*
73656 	 * Number of sequence error NAKs received.
73657 	 * This counter is only applicable for devices that support
73658 	 * hardware based retransmission.
73659 	 */
73660 	uint64_t	seq_err_naks_rcvd;
73661 	/*
73662 	 * Number of RNR NAKs received.
73663 	 * This counter is only applicable for devices that support
73664 	 * hardware based retransmission.
73665 	 */
73666 	uint64_t	rnr_naks_rcvd;
73667 	/*
73668 	 * Number of missing response resulting in HW retransmission.
73669 	 * This counter is only applicable for devices that support
73670 	 * hardware based retransmission.
73671 	 */
73672 	uint64_t	missing_resp;
73673 	/*
73674 	 * Number of timeouts resulting in HW retransmission.
73675 	 * This counter is only applicable for devices that support
73676 	 * hardware based retransmission.
73677 	 */
73678 	uint64_t	to_retransmit;
73679 	/*
73680 	 * Number of duplicate read/atomic requests resulting in HW
73681 	 * retransmission.
73682 	 * This counter is only applicable for devices that support
73683 	 * hardware based retransmission.
73684 	 */
73685 	uint64_t	dup_req;
73686 	/*
73687 	 * Number of received DCN payload cut packets.
73688 	 * This counter is only applicable for devices that support
73689 	 * the DCN Payload Cut feature.
73690 	 */
73691 	uint64_t	rx_dcn_payload_cut;
73692 	/* Number of transmitted packets that bypassed the transmit engine. */
73693 	uint64_t	te_bypassed;
73694 	/*
73695 	 * Number of transmitted DCN CNP packets.
73696 	 * This counter is only applicable for devices that support
73697 	 * the DCN Payload Cut feature.
73698 	 */
73699 	uint64_t	tx_dcn_cnp;
73700 	/*
73701 	 * Number of received DCN CNP packets.
73702 	 * This counter is only applicable for devices that support
73703 	 * the DCN Payload Cut feature.
73704 	 */
73705 	uint64_t	rx_dcn_cnp;
73706 	/*
73707 	 * Number of received DCN payload cut packets.
73708 	 * This counter is only applicable for devices that support
73709 	 * the DCN Payload Cut feature.
73710 	 */
73711 	uint64_t	rx_payload_cut;
73712 	/*
73713 	 * Number of received DCN payload cut packets that are ignored
73714 	 * because they failed the PSN checks.
73715 	 * This counter is only applicable for devices that support
73716 	 * the DCN Payload Cut feature.
73717 	 */
73718 	uint64_t	rx_payload_cut_ignored;
73719 	/*
73720 	 * Number of received DCN CNP packets that are ignored either
73721 	 * because the ECN is not enabled on the QP or the ECN is enabled
73722 	 * but the CNP packets do not pass the packet validation checks.
73723 	 * This counter is only applicable for devices that support
73724 	 * the DCN Payload Cut feature.
73725 	 */
73726 	uint64_t	rx_dcn_cnp_ignored;
73727 } creq_query_roce_stats_ext_resp_sb_t, *pcreq_query_roce_stats_ext_resp_sb_t;
73728 
73729 /**************
73730  * query_func *
73731  **************/
73732 
73733 
73734 /* cmdq_query_func (size:128b/16B) */
73735 
73736 typedef struct cmdq_query_func {
73737 	/* Command opcode. */
73738 	uint8_t	opcode;
73739 	/* Query the HW capabilities for the function. */
73740 	#define CMDQ_QUERY_FUNC_OPCODE_QUERY_FUNC UINT32_C(0x83)
73741 	#define CMDQ_QUERY_FUNC_OPCODE_LAST	CMDQ_QUERY_FUNC_OPCODE_QUERY_FUNC
73742 	/* Size of the command in 16-byte units. */
73743 	uint8_t	cmd_size;
73744 	/* Flags and attribs of the command. */
73745 	uint16_t	flags;
73746 	/* Driver supplied handle to associate the command and the response. */
73747 	uint16_t	cookie;
73748 	/* Size of the response buffer in 16-byte units. */
73749 	uint8_t	resp_size;
73750 	uint8_t	reserved8;
73751 	/* Host address of the response. */
73752 	uint64_t	resp_addr;
73753 } cmdq_query_func_t, *pcmdq_query_func_t;
73754 
73755 /* creq_query_func_resp (size:128b/16B) */
73756 
73757 typedef struct creq_query_func_resp {
73758 	uint8_t	type;
73759 	/*
73760 	 * This field indicates the exact type of the completion.
73761 	 * By convention, the LSB identifies the length of the
73762 	 * record in 16B units. Even values indicate 16B
73763 	 * records. Odd values indicate 32B
73764 	 * records.
73765 	 */
73766 	#define CREQ_QUERY_FUNC_RESP_TYPE_MASK	UINT32_C(0x3f)
73767 	#define CREQ_QUERY_FUNC_RESP_TYPE_SFT	0
73768 	/* QP Async Notification */
73769 		#define CREQ_QUERY_FUNC_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
73770 		#define CREQ_QUERY_FUNC_RESP_TYPE_LAST	CREQ_QUERY_FUNC_RESP_TYPE_QP_EVENT
73771 	/* Status of the response. */
73772 	uint8_t	status;
73773 	/* Driver supplied handle to associate the command and the response. */
73774 	uint16_t	cookie;
73775 	/* Side buffer size in 16-byte units */
73776 	uint32_t	size;
73777 	uint8_t	v;
73778 	/*
73779 	 * This value is written by the NIC such that it will be different
73780 	 * for each pass through the completion queue. The even passes
73781 	 * will write 1. The odd passes will write 0.
73782 	 */
73783 	#define CREQ_QUERY_FUNC_RESP_V	UINT32_C(0x1)
73784 	/* Event or command opcode. */
73785 	uint8_t	event;
73786 	/* Query info PF command response. */
73787 	#define CREQ_QUERY_FUNC_RESP_EVENT_QUERY_FUNC UINT32_C(0x83)
73788 	#define CREQ_QUERY_FUNC_RESP_EVENT_LAST	CREQ_QUERY_FUNC_RESP_EVENT_QUERY_FUNC
73789 	uint8_t	reserved48[6];
73790 } creq_query_func_resp_t, *pcreq_query_func_resp_t;
73791 
73792 /* Query function command response side buffer structure. */
73793 /* creq_query_func_resp_sb (size:1280b/160B) */
73794 
73795 typedef struct creq_query_func_resp_sb {
73796 	/* Command opcode. */
73797 	uint8_t	opcode;
73798 	/* Query info PF command response. */
73799 	#define CREQ_QUERY_FUNC_RESP_SB_OPCODE_QUERY_FUNC UINT32_C(0x83)
73800 	#define CREQ_QUERY_FUNC_RESP_SB_OPCODE_LAST	CREQ_QUERY_FUNC_RESP_SB_OPCODE_QUERY_FUNC
73801 	/* Status of the response. */
73802 	uint8_t	status;
73803 	/* Driver supplied handle to associate the command and the response. */
73804 	uint16_t	cookie;
73805 	/* Flags and attribs of the command. */
73806 	uint16_t	flags;
73807 	/* Size of the response buffer in 16-byte units. */
73808 	uint8_t	resp_size;
73809 	uint8_t	reserved8;
73810 	/* Max MR size supported. */
73811 	uint64_t	max_mr_size;
73812 	/*
73813 	 * Max QP supported.
73814 	 * For devices that support the pseudo static allocation scheme,
73815 	 * this count:
73816 	 * -excludes the QP1 count.
73817 	 * -includes the count of QPs that can be migrated from the other PF
73818 	 *  Therefore, during normal operation when both PFs are active,
73819 	 *  the supported number of RoCE QPs for each of the PF is half
73820 	 *  of the advertised value.
73821 	 */
73822 	uint32_t	max_qp;
73823 	/* Max WQEs per QP. */
73824 	uint16_t	max_qp_wr;
73825 	/* Device capability flags. */
73826 	uint16_t	dev_cap_flags;
73827 	/* Allow QP resizing. */
73828 	#define CREQ_QUERY_FUNC_RESP_SB_RESIZE_QP				UINT32_C(0x1)
73829 	/* Specifies Congestion Control (CC) generation. */
73830 	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_MASK		UINT32_C(0xe)
73831 	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_SFT			1
73832 	/*
73833 	 * Includes support for DCTCP and TCP CC algorithms,
73834 	 * enabling operation in networks where PFC is enabled.
73835 	 */
73836 		#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN0		(UINT32_C(0x0) << 1)
73837 	/*
73838 	 * Enhances cc_gen0 support with probabilistic marking algorithm,
73839 	 * enabling fast ramp up and convergence,
73840 	 * as well as operation in networks where PFC is not enabled.
73841 	 * Includes a number of parameters that are different from cc_gen0
73842 	 * chips as well as new parameters. TCP CC algorithm is not
73843 	 * supported.
73844 	 */
73845 		#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN1		(UINT32_C(0x1) << 1)
73846 	/*
73847 	 * Enhances cc_gen1 support for additional CC parameters:
73848 	 * reduce_init_en, reduce_init_cong_free_rtts_th, random_no_red_en,
73849 	 * actual_cr_shift_correction_en, quota_period_adjust_en
73850 	 */
73851 		#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN1_EXT		(UINT32_C(0x2) << 1)
73852 	/*
73853 	 * Enhances cc_gen1_ext support, to include support for DCN/SARA.
73854 	 * Enables query and modification of Queue level table attributes,
73855 	 * which are used by the hardware to determine the QP's flow rate
73856 	 * based on congestion level and thereby reduce RoCE packet drop
73857 	 * due to network congestion.
73858 	 */
73859 		#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN2		(UINT32_C(0x3) << 1)
73860 		#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_LAST			CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN2
73861 	/*
73862 	 * Support for the extended RoCE statistics is available. These
73863 	 * statistics are queried via the `query_roce_stats_ext` command
73864 	 * and are enabled on a per-QP basis via `create_qp`.
73865 	 */
73866 	#define CREQ_QUERY_FUNC_RESP_SB_EXT_STATS				UINT32_C(0x10)
73867 	/*
73868 	 * Support for both allocating and registering a new MR via the
73869 	 * `register_mr` command is available. With this feature the
73870 	 * `allocate_mrw` command does not have to be called before
73871 	 * registering.
73872 	 */
73873 	#define CREQ_QUERY_FUNC_RESP_SB_MR_REGISTER_ALLOC			UINT32_C(0x20)
73874 	/*
73875 	 * Support for optimized transmit path to lower latency for WQEs
73876 	 * with inline data.
73877 	 */
73878 	#define CREQ_QUERY_FUNC_RESP_SB_OPTIMIZED_TRANSMIT_ENABLED	UINT32_C(0x40)
73879 	/*
73880 	 * The underlying HW uses the version 2 of the CQEs definitions for
73881 	 * the following CQE types:
73882 	 * RES_UD, RES_RAWETH_QP1, RES_UD_CFA
73883 	 */
73884 	#define CREQ_QUERY_FUNC_RESP_SB_CQE_V2				UINT32_C(0x80)
73885 	/* Support for ping pong push mode is available. */
73886 	#define CREQ_QUERY_FUNC_RESP_SB_PINGPONG_PUSH_MODE		UINT32_C(0x100)
73887 	/* Support for hardware requester retransmission is enabled. */
73888 	#define CREQ_QUERY_FUNC_RESP_SB_HW_REQUESTER_RETX_ENABLED		UINT32_C(0x200)
73889 	/* Support for hardware responder retransmission is enabled. */
73890 	#define CREQ_QUERY_FUNC_RESP_SB_HW_RESPONDER_RETX_ENABLED		UINT32_C(0x400)
73891 	/* Support for link aggregation is enabled. */
73892 	#define CREQ_QUERY_FUNC_RESP_SB_LINK_AGGR_SUPPORTED		UINT32_C(0x800)
73893 	/* link_aggr_supported is valid. */
73894 	#define CREQ_QUERY_FUNC_RESP_SB_LINK_AGGR_SUPPORTED_VALID		UINT32_C(0x1000)
73895 	/*
73896 	 * Support for pseudo static QP allocation is enabled.
73897 	 * This feature enables the following capabilities:
73898 	 * - QP context ID space is pseudo-static partitioned across PFs.
73899 	 * - An application can use a predetermined
73900 	 *   QP context ID assignment scheme for specific operations.
73901 	 * - For 2-port adapters, the application can migrate the QP context
73902 	 *   ID range across PFs, using the `orchestrate_qid_migration` HWRM,
73903 	 *   during network events such as Link Down.
73904 	 */
73905 	#define CREQ_QUERY_FUNC_RESP_SB_PSEUDO_STATIC_QP_ALLOC_SUPPORTED	UINT32_C(0x2000)
73906 	/*
73907 	 * Support for Express Mode is enabled.
73908 	 * For Express mode, the QP resources (SQ/RQ) are allocated in
73909 	 * on-chip queue memory. The host driver should not allocate memory
73910 	 * for these queue structures.
73911 	 */
73912 	#define CREQ_QUERY_FUNC_RESP_SB_EXPRESS_MODE_SUPPORTED		UINT32_C(0x4000)
73913 	/*
73914 	 * IRRQ/ORRQ and MSN Table structures are allocated in internal
73915 	 * queue memory.
73916 	 */
73917 	#define CREQ_QUERY_FUNC_RESP_SB_INTERNAL_QUEUE_MEMORY		UINT32_C(0x8000)
73918 	/* Max CQs supported. */
73919 	uint32_t	max_cq;
73920 	/* Max CQEs per CQ supported. */
73921 	uint32_t	max_cqe;
73922 	/* Max PDs supported. */
73923 	uint32_t	max_pd;
73924 	/*
73925 	 * Max SGEs per QP WQE supported. On chips with variable-size WQE
73926 	 * support, this field is applicable only for the backward compatible
73927 	 * mode.
73928 	 */
73929 	uint8_t	max_sge;
73930 	/* Max SGEs per SRQ WQE supported. */
73931 	uint8_t	max_srq_sge;
73932 	/* Max outstanding RDMA read & atomic supported. */
73933 	uint8_t	max_qp_rd_atom;
73934 	/*
73935 	 * Max outstanding RDMA read & atomic that can be sent from an
73936 	 * initiator.
73937 	 */
73938 	uint8_t	max_qp_init_rd_atom;
73939 	/* Max MRs supported. */
73940 	uint32_t	max_mr;
73941 	/* Max MWs supported. */
73942 	uint32_t	max_mw;
73943 	/* Max Raw Ethertype QPs supported. */
73944 	uint32_t	max_raw_eth_qp;
73945 	/* Max AHs supported. */
73946 	uint32_t	max_ah;
73947 	/* Max FMRs supported. */
73948 	uint32_t	max_fmr;
73949 	/* Max WQEs per SRQ supported. */
73950 	uint32_t	max_srq_wr;
73951 	/* Max PKEYs supported. */
73952 	uint32_t	max_pkeys;
73953 	/*
73954 	 * Max inline data supported. On chips with variable-size WQE support,
73955 	 * this field is applicable only for the backward compatible mode.
73956 	 */
73957 	uint32_t	max_inline_data;
73958 	/* Max mappings per FMR supported. */
73959 	uint8_t	max_map_per_fmr;
73960 	/* L2 DB space size in pages. */
73961 	uint8_t	l2_db_space_size;
73962 	/* Max SRQs supported. */
73963 	uint16_t	max_srq;
73964 	/* Max GIDs supported. */
73965 	uint32_t	max_gid;
73966 	/*
73967 	 * An array of 48 8-bit values to specify allocation multiplier for TQM
73968 	 * host buffer regions. Each region occupies 16 MB of TQM PBL address
73969 	 * space: 0x00000000, 0x01000000, 0x02000000, etc.
73970 	 * The host needs to allocate (<Number of QPs>*multiplier, rounded up
73971 	 * to page size) of physical memory for non-zero slots and map the
73972 	 * pages to the corresponding 16MB regions. Typically there are total
73973 	 * 3 non-zero values in this array, their values are 16, 16, 12.
73974 	 * Cu+ will only populate up to index 11. SR may populate up to
73975 	 * index 47.
73976 	 */
73977 	uint32_t	tqm_alloc_reqs[12];
73978 	/* Max Doorbell page indices supported. */
73979 	uint32_t	max_dpi;
73980 	/* Max SGEs per QP WQE supported in the variable-size WQE mode. */
73981 	uint8_t	max_sge_var_wqe;
73982 	/* Device capability extended flags. */
73983 	uint8_t	dev_cap_ext_flags;
73984 	/* RDMA Atomic operations are not supported. */
73985 	#define CREQ_QUERY_FUNC_RESP_SB_ATOMIC_OPS_NOT_SUPPORTED	UINT32_C(0x1)
73986 	/* Support driver version registration. */
73987 	#define CREQ_QUERY_FUNC_RESP_SB_DRV_VERSION_RGTR_SUPPORTED	UINT32_C(0x2)
73988 	/* Support for batch allocation of QPs is enabled. */
73989 	#define CREQ_QUERY_FUNC_RESP_SB_CREATE_QP_BATCH_SUPPORTED	UINT32_C(0x4)
73990 	/* Support for batch deletion of QPs is enabled. */
73991 	#define CREQ_QUERY_FUNC_RESP_SB_DESTROY_QP_BATCH_SUPPORTED	UINT32_C(0x8)
73992 	/*
73993 	 * Support for extended RoCE statistics context
73994 	 * with periodic DMA is enabled. The statistics contexts
73995 	 * are allocated via `allocate_roce_stats_ext_ctx`
73996 	 * and deallocated via `deallocate_roce_stats_ext_ctx`.
73997 	 * These contexts are assigned on a per-QP, per-group of QPs
73998 	 * or per-function basis via `create_qp`, `create_qp_batch`
73999 	 * or `modify_qp`command.
74000 	 * In addition to periodic DMA to a host address,
74001 	 * these statistics can be queried via `query_roce_stats_ext_v2`.
74002 	 */
74003 	#define CREQ_QUERY_FUNC_RESP_SB_ROCE_STATS_EXT_CTX_SUPPORTED	UINT32_C(0x10)
74004 	/*
74005 	 * Support for the srq_sge field in the create_srq command is
74006 	 * enabled.
74007 	 */
74008 	#define CREQ_QUERY_FUNC_RESP_SB_CREATE_SRQ_SGE_SUPPORTED	UINT32_C(0x20)
74009 	/* Support for fixed size SQ wqe (128B) is disabled. */
74010 	#define CREQ_QUERY_FUNC_RESP_SB_FIXED_SIZE_WQE_DISABLED	UINT32_C(0x40)
74011 	/* Support for DCN (Drop Congestion Notification) is enabled. */
74012 	#define CREQ_QUERY_FUNC_RESP_SB_DCN_SUPPORTED			UINT32_C(0x80)
74013 	/* Max inline data supported in the variable-size WQE mode. */
74014 	uint16_t	max_inline_data_var_wqe;
74015 	/*
74016 	 * starting xid of the predetermined assignment scheme supported
74017 	 * by the pseudo static allocation feature. Note that for a PF,
74018 	 * the start_qid is itself pseudo_static, and can change when the QP
74019 	 * context id range is migrated by the driver using the
74020 	 * cmdq_orchestrate_qid_migration. The supported QP count is
74021 	 * available in the `max_qp` field of `cmdq_query_func`.
74022 	 */
74023 	uint32_t	start_qid;
74024 	/*
74025 	 * Max number of MSN table entries supported for devices that support
74026 	 * the `internal_queue_memory` feature.
74027 	 */
74028 	uint8_t	max_msn_table_size;
74029 	/* reserved8_1 is 8 b */
74030 	uint8_t	reserved8_1;
74031 	/* Device capability extended flags_2 */
74032 	uint16_t	dev_cap_ext_flags_2;
74033 	/* Firmware support for optimizing Modify QP operation */
74034 	#define CREQ_QUERY_FUNC_RESP_SB_OPTIMIZE_MODIFY_QP_SUPPORTED		UINT32_C(0x1)
74035 	/*
74036 	 * Device supports changing UDP source port of RoCEv2 packets using
74037 	 * WQE.
74038 	 */
74039 	#define CREQ_QUERY_FUNC_RESP_SB_CHANGE_UDP_SRC_PORT_WQE_SUPPORTED	UINT32_C(0x2)
74040 	/* Device supports CQ Coalescing. */
74041 	#define CREQ_QUERY_FUNC_RESP_SB_CQ_COALESCING_SUPPORTED		UINT32_C(0x4)
74042 	/*
74043 	 * Device allows a memory region to be designated as
74044 	 * relaxed-ordering enabled or disabled.
74045 	 */
74046 	#define CREQ_QUERY_FUNC_RESP_SB_MEMORY_REGION_RO_SUPPORTED		UINT32_C(0x8)
74047 	/* The type of lookup table used for requester retransmission. */
74048 	#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_MASK	UINT32_C(0x30)
74049 	#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_SFT	4
74050 	/* Requester Retransmission uses a PSN table in host memory. */
74051 		#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_HOST_PSN_TABLE  (UINT32_C(0x0) << 4)
74052 	/* Requester Retransmission uses an MSN table in host memory. */
74053 		#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_HOST_MSN_TABLE  (UINT32_C(0x1) << 4)
74054 	/*
74055 	 * Requester Retransmission uses an MSN table in Device Internal
74056 	 * Queue Memory.
74057 	 */
74058 		#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_IQM_MSN_TABLE   (UINT32_C(0x2) << 4)
74059 		#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_LAST	CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_IQM_MSN_TABLE
74060 	/*
74061 	 * Max number of 16B IQM memory slots supported by SQ or RQ
74062 	 * when QP is in express mode.
74063 	 * This field is only valid for express mode QPs.
74064 	 */
74065 	uint16_t	max_xp_qp_size;
74066 	/*
74067 	 * Max number of QPs that can be created in one `create_qp_batch`
74068 	 * command.
74069 	 */
74070 	uint16_t	create_qp_batch_size;
74071 	/*
74072 	 * Max number of QPs that can be destroyed in one `destroy_qp_batch`
74073 	 * command.
74074 	 */
74075 	uint16_t	destroy_qp_batch_size;
74076 	uint16_t	reserved16;
74077 	uint64_t	reserved64;
74078 } creq_query_func_resp_sb_t, *pcreq_query_func_resp_sb_t;
74079 
74080 /**********************
74081  * set_func_resources *
74082  **********************/
74083 
74084 
74085 /* cmdq_set_func_resources (size:448b/56B) */
74086 
74087 typedef struct cmdq_set_func_resources {
74088 	/* Command opcode. */
74089 	uint8_t	opcode;
74090 	/*
74091 	 * Set the following resources for the function:
74092 	 * - Max QP, CQ, MR+MW, SRQ per PF
74093 	 * - Max QP, CQ, MR+MW, SRQ per VF
74094 	 */
74095 	#define CMDQ_SET_FUNC_RESOURCES_OPCODE_SET_FUNC_RESOURCES UINT32_C(0x84)
74096 	#define CMDQ_SET_FUNC_RESOURCES_OPCODE_LAST		CMDQ_SET_FUNC_RESOURCES_OPCODE_SET_FUNC_RESOURCES
74097 	/* Size of the command in 16-byte units. */
74098 	uint8_t	cmd_size;
74099 	/* Flags and attribs of the command. */
74100 	uint16_t	flags;
74101 	/*
74102 	 * When set, the 32b `max_mrw_per_vf` field is logically divided
74103 	 * into two 16b fields, `max_mr_per_vf` and `max_av_per_vf`.
74104 	 */
74105 	#define CMDQ_SET_FUNC_RESOURCES_FLAGS_MRAV_RESERVATION_SPLIT	UINT32_C(0x1)
74106 	/* Driver supplied handle to associate the command and the response. */
74107 	uint16_t	cookie;
74108 	/* Size of the response buffer in 16-byte units. */
74109 	uint8_t	resp_size;
74110 	uint8_t	reserved8;
74111 	/* Host address of the response. */
74112 	uint64_t	resp_addr;
74113 	/*
74114 	 * Number of QPs. It is the responsibility of the host to first extend
74115 	 * the existing PBL with new addresses to pages to handle the
74116 	 * adjustment. Must be greater or equal to current.
74117 	 */
74118 	uint32_t	number_of_qp;
74119 	/*
74120 	 * Number of MRWs. It is the responsibility of the host to first extend
74121 	 * the existing PBL with new addresses to pages to handle the
74122 	 * adjustment. Must be greater or equal to current.
74123 	 */
74124 	uint32_t	number_of_mrw;
74125 	/*
74126 	 * Number of SRQs. It is the responsibility of the host to first extend
74127 	 * the existing PBL with new addresses to pages to handle the
74128 	 * adjustment. Must be greater or equal to current.
74129 	 */
74130 	uint32_t	number_of_srq;
74131 	/*
74132 	 * Number of CQs. It is the responsibility of the host to first extend
74133 	 * the existing PBL with new addresses to pages to handle the
74134 	 * adjustment. Must be greater or equal to current.
74135 	 */
74136 	uint32_t	number_of_cq;
74137 	/*
74138 	 * Number of QPs per VF. This field must be set to zero when the flag,
74139 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
74140 	 */
74141 	uint32_t	max_qp_per_vf;
74142 	/*
74143 	 * If the MR/AV split reservation flag is not set, then this field
74144 	 * represents the total number of MR plus AV entries allowed per
74145 	 * VF. For versions of firmware that support the split reservation,
74146 	 * when it is not specified half of the entries will be reserved
74147 	 * for MRs and the other half for AVs.
74148 	 *
74149 	 * If the MR/AV split reservation flag is set, then this
74150 	 * field is logically divided into two 16b fields. Bits `[31:16]`
74151 	 * represents the `max_mr_per_vf` and bits `[15:0]` represents
74152 	 * `max_av_per_vf`. The granularity of these values is defined by
74153 	 * the `mrav_num_entries_unit` field returned by the
74154 	 * `backing_store_qcaps` command.
74155 	 *
74156 	 * This field must be set to zero when the flag, l2_vf_resource_mgmt,
74157 	 * is set and RoCE SRIOV is enabled.
74158 	 */
74159 	uint32_t	max_mrw_per_vf;
74160 	/*
74161 	 * Number of SRQs per VF. This field must be set to zero when the flag,
74162 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
74163 	 */
74164 	uint32_t	max_srq_per_vf;
74165 	/*
74166 	 * Number of CQs per VF. This field must be set to zero when the flag,
74167 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
74168 	 */
74169 	uint32_t	max_cq_per_vf;
74170 	/*
74171 	 * Number of GIDs per VF. This field must be set to zero when the flag,
74172 	 * l2_vf_resource_mgmt, is set and RoCE SRIOV is enabled.
74173 	 */
74174 	uint32_t	max_gid_per_vf;
74175 	/* Statistics context index for this function. */
74176 	uint32_t	stat_ctx_id;
74177 } cmdq_set_func_resources_t, *pcmdq_set_func_resources_t;
74178 
74179 /* creq_set_func_resources_resp (size:128b/16B) */
74180 
74181 typedef struct creq_set_func_resources_resp {
74182 	uint8_t	type;
74183 	/*
74184 	 * This field indicates the exact type of the completion.
74185 	 * By convention, the LSB identifies the length of the
74186 	 * record in 16B units. Even values indicate 16B
74187 	 * records. Odd values indicate 32B
74188 	 * records.
74189 	 */
74190 	#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_MASK	UINT32_C(0x3f)
74191 	#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_SFT	0
74192 	/* QP Async Notification */
74193 		#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
74194 		#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_LAST	CREQ_SET_FUNC_RESOURCES_RESP_TYPE_QP_EVENT
74195 	/* Status of the response. */
74196 	uint8_t	status;
74197 	/* Driver supplied handle to associate the command and the response. */
74198 	uint16_t	cookie;
74199 	uint32_t	reserved32;
74200 	uint8_t	v;
74201 	/*
74202 	 * This value is written by the NIC such that it will be different
74203 	 * for each pass through the completion queue. The even passes
74204 	 * will write 1. The odd passes will write 0.
74205 	 */
74206 	#define CREQ_SET_FUNC_RESOURCES_RESP_V	UINT32_C(0x1)
74207 	/* Event or command opcode. */
74208 	uint8_t	event;
74209 	/* Set function resources command response. */
74210 	#define CREQ_SET_FUNC_RESOURCES_RESP_EVENT_SET_FUNC_RESOURCES UINT32_C(0x84)
74211 	#define CREQ_SET_FUNC_RESOURCES_RESP_EVENT_LAST		CREQ_SET_FUNC_RESOURCES_RESP_EVENT_SET_FUNC_RESOURCES
74212 	uint8_t	reserved48[6];
74213 } creq_set_func_resources_resp_t, *pcreq_set_func_resources_resp_t;
74214 
74215 /*************
74216  * stop_func *
74217  *************/
74218 
74219 
74220 /* cmdq_stop_func (size:128b/16B) */
74221 
74222 typedef struct cmdq_stop_func {
74223 	/* Command opcode. */
74224 	uint8_t	opcode;
74225 	/* Stop the function */
74226 	#define CMDQ_STOP_FUNC_OPCODE_STOP_FUNC UINT32_C(0x82)
74227 	#define CMDQ_STOP_FUNC_OPCODE_LAST	CMDQ_STOP_FUNC_OPCODE_STOP_FUNC
74228 	/* Size of the command in 16-byte units. */
74229 	uint8_t	cmd_size;
74230 	/* Flags and attribs of the command. */
74231 	uint16_t	flags;
74232 	/* Driver supplied handle to associate the command and the response. */
74233 	uint16_t	cookie;
74234 	/* Size of the response buffer in 16-byte units. */
74235 	uint8_t	resp_size;
74236 	uint8_t	reserved8;
74237 	/* Host address of the response. */
74238 	uint64_t	resp_addr;
74239 } cmdq_stop_func_t, *pcmdq_stop_func_t;
74240 
74241 /* creq_stop_func_resp (size:128b/16B) */
74242 
74243 typedef struct creq_stop_func_resp {
74244 	uint8_t	type;
74245 	/*
74246 	 * This field indicates the exact type of the completion.
74247 	 * By convention, the LSB identifies the length of the
74248 	 * record in 16B units. Even values indicate 16B
74249 	 * records. Odd values indicate 32B
74250 	 * records.
74251 	 */
74252 	#define CREQ_STOP_FUNC_RESP_TYPE_MASK	UINT32_C(0x3f)
74253 	#define CREQ_STOP_FUNC_RESP_TYPE_SFT	0
74254 	/* QP Async Notification */
74255 		#define CREQ_STOP_FUNC_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
74256 		#define CREQ_STOP_FUNC_RESP_TYPE_LAST	CREQ_STOP_FUNC_RESP_TYPE_QP_EVENT
74257 	/* Status of the response. */
74258 	uint8_t	status;
74259 	/* Driver supplied handle to associate the command and the response. */
74260 	uint16_t	cookie;
74261 	uint32_t	reserved32;
74262 	uint8_t	v;
74263 	/*
74264 	 * This value is written by the NIC such that it will be different
74265 	 * for each pass through the completion queue. The even passes
74266 	 * will write 1. The odd passes will write 0.
74267 	 */
74268 	#define CREQ_STOP_FUNC_RESP_V	UINT32_C(0x1)
74269 	/* Event or command opcode. */
74270 	uint8_t	event;
74271 	/* Stop PF command response. */
74272 	#define CREQ_STOP_FUNC_RESP_EVENT_STOP_FUNC UINT32_C(0x82)
74273 	#define CREQ_STOP_FUNC_RESP_EVENT_LAST	CREQ_STOP_FUNC_RESP_EVENT_STOP_FUNC
74274 	uint8_t	reserved48[6];
74275 } creq_stop_func_resp_t, *pcreq_stop_func_resp_t;
74276 
74277 /****************
74278  * read_context *
74279  ****************/
74280 
74281 
74282 /* cmdq_read_context (size:192b/24B) */
74283 
74284 typedef struct cmdq_read_context {
74285 	/* Command opcode. */
74286 	uint8_t	opcode;
74287 	/*
74288 	 * Read the current state of any internal resource context. Can only
74289 	 * be issued from a PF.
74290 	 */
74291 	#define CMDQ_READ_CONTEXT_OPCODE_READ_CONTEXT UINT32_C(0x85)
74292 	#define CMDQ_READ_CONTEXT_OPCODE_LAST	CMDQ_READ_CONTEXT_OPCODE_READ_CONTEXT
74293 	/* Size of the command in 16-byte units. */
74294 	uint8_t	cmd_size;
74295 	/* Flags and attribs of the command. */
74296 	uint16_t	flags;
74297 	/* Driver supplied handle to associate the command and the response. */
74298 	uint16_t	cookie;
74299 	/* Size of the response buffer in 16-byte units. */
74300 	uint8_t	resp_size;
74301 	uint8_t	reserved8;
74302 	/* Host address of the response. */
74303 	uint64_t	resp_addr;
74304 	/* Context ID */
74305 	uint32_t	xid;
74306 	/* Context type */
74307 	uint8_t	type;
74308 	/*
74309 	 * Read QPC. The context (448 bytes) goes to resp_addr (as is,
74310 	 * without a header), and resp_size should be set to 28
74311 	 * (448/16).
74312 	 */
74313 	#define CMDQ_READ_CONTEXT_TYPE_QPC UINT32_C(0x0)
74314 	/*
74315 	 * Read CQ. The context (64 bytes) goes to resp_addr (as is,
74316 	 * without a header), and resp_size should be set to 4 (64/16)
74317 	 */
74318 	#define CMDQ_READ_CONTEXT_TYPE_CQ  UINT32_C(0x1)
74319 	/*
74320 	 * Read MRW. The context (128 bytes) goes to resp_addr (as is,
74321 	 * without a header), and resp_size should be set to 8 (128/16)
74322 	 */
74323 	#define CMDQ_READ_CONTEXT_TYPE_MRW UINT32_C(0x2)
74324 	/*
74325 	 * Read SRQ. The context (64 bytes) goes to resp_addr (as is,
74326 	 * without a header), and resp_size should be set to 4 (64/16)
74327 	 */
74328 	#define CMDQ_READ_CONTEXT_TYPE_SRQ UINT32_C(0x3)
74329 	#define CMDQ_READ_CONTEXT_TYPE_LAST CMDQ_READ_CONTEXT_TYPE_SRQ
74330 	uint8_t	unused_0[3];
74331 } cmdq_read_context_t, *pcmdq_read_context_t;
74332 
74333 /* creq_read_context (size:128b/16B) */
74334 
74335 typedef struct creq_read_context {
74336 	uint8_t	type;
74337 	/*
74338 	 * This field indicates the exact type of the completion.
74339 	 * By convention, the LSB identifies the length of the
74340 	 * record in 16B units. Even values indicate 16B
74341 	 * records. Odd values indicate 32B records.
74342 	 * records.
74343 	 */
74344 	#define CREQ_READ_CONTEXT_TYPE_MASK	UINT32_C(0x3f)
74345 	#define CREQ_READ_CONTEXT_TYPE_SFT	0
74346 	/* QP Async Notification */
74347 		#define CREQ_READ_CONTEXT_TYPE_QP_EVENT  UINT32_C(0x38)
74348 		#define CREQ_READ_CONTEXT_TYPE_LAST	CREQ_READ_CONTEXT_TYPE_QP_EVENT
74349 	/* Status of the response. */
74350 	uint8_t	status;
74351 	/* Driver supplied handle to associate the command and the response. */
74352 	uint16_t	cookie;
74353 	uint32_t	reserved32;
74354 	uint8_t	v;
74355 	/*
74356 	 * This value is written by the NIC such that it will be different
74357 	 * for each pass through the completion queue. The even passes
74358 	 * will write 1. The odd passes will write 0.
74359 	 */
74360 	#define CREQ_READ_CONTEXT_V	UINT32_C(0x1)
74361 	/* Event or command opcode. */
74362 	uint8_t	event;
74363 	/*
74364 	 * Read the current state of any internal resource context. Can only
74365 	 * be issued from a PF.
74366 	 */
74367 	#define CREQ_READ_CONTEXT_EVENT_READ_CONTEXT UINT32_C(0x85)
74368 	#define CREQ_READ_CONTEXT_EVENT_LAST	CREQ_READ_CONTEXT_EVENT_READ_CONTEXT
74369 	uint16_t	reserved16;
74370 	uint32_t	reserved_32;
74371 } creq_read_context_t, *pcreq_read_context_t;
74372 
74373 /*****************
74374  * map_tc_to_cos *
74375  *****************/
74376 
74377 
74378 /* cmdq_map_tc_to_cos (size:192b/24B) */
74379 
74380 typedef struct cmdq_map_tc_to_cos {
74381 	/* Command opcode. */
74382 	uint8_t	opcode;
74383 	/* Map TC to COS. Can only be issued from a PF. */
74384 	#define CMDQ_MAP_TC_TO_COS_OPCODE_MAP_TC_TO_COS UINT32_C(0x8a)
74385 	#define CMDQ_MAP_TC_TO_COS_OPCODE_LAST	CMDQ_MAP_TC_TO_COS_OPCODE_MAP_TC_TO_COS
74386 	/* Size of the command in 16-byte units. */
74387 	uint8_t	cmd_size;
74388 	/* Flags and attribs of the command. */
74389 	uint16_t	flags;
74390 	/* Driver supplied handle to associate the command and the response. */
74391 	uint16_t	cookie;
74392 	/* Size of the response buffer in 16-byte units. */
74393 	uint8_t	resp_size;
74394 	uint8_t	reserved8;
74395 	/* Host address of the response. */
74396 	uint64_t	resp_addr;
74397 	/* 1st COS index mapped to RoCE */
74398 	uint16_t	cos0;
74399 	/* Don't change this COS. */
74400 	#define CMDQ_MAP_TC_TO_COS_COS0_NO_CHANGE UINT32_C(0xffff)
74401 	#define CMDQ_MAP_TC_TO_COS_COS0_LAST	CMDQ_MAP_TC_TO_COS_COS0_NO_CHANGE
74402 	/* 2nd COS index mapped to RoCE */
74403 	uint16_t	cos1;
74404 	/* Disable this COS. */
74405 	#define CMDQ_MAP_TC_TO_COS_COS1_DISABLE   UINT32_C(0x8000)
74406 	/* Don't change this COS. */
74407 	#define CMDQ_MAP_TC_TO_COS_COS1_NO_CHANGE UINT32_C(0xffff)
74408 	#define CMDQ_MAP_TC_TO_COS_COS1_LAST	CMDQ_MAP_TC_TO_COS_COS1_NO_CHANGE
74409 	uint32_t	unused_0;
74410 } cmdq_map_tc_to_cos_t, *pcmdq_map_tc_to_cos_t;
74411 
74412 /* creq_map_tc_to_cos_resp (size:128b/16B) */
74413 
74414 typedef struct creq_map_tc_to_cos_resp {
74415 	uint8_t	type;
74416 	/*
74417 	 * This field indicates the exact type of the completion.
74418 	 * By convention, the LSB identifies the length of the
74419 	 * record in 16B units. Even values indicate 16B
74420 	 * records. Odd values indicate 32B
74421 	 * records.
74422 	 */
74423 	#define CREQ_MAP_TC_TO_COS_RESP_TYPE_MASK	UINT32_C(0x3f)
74424 	#define CREQ_MAP_TC_TO_COS_RESP_TYPE_SFT	0
74425 	/* QP Async Notification */
74426 		#define CREQ_MAP_TC_TO_COS_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
74427 		#define CREQ_MAP_TC_TO_COS_RESP_TYPE_LAST	CREQ_MAP_TC_TO_COS_RESP_TYPE_QP_EVENT
74428 	/* Status of the response. */
74429 	uint8_t	status;
74430 	/* Driver supplied handle to associate the command and the response. */
74431 	uint16_t	cookie;
74432 	uint32_t	reserved32;
74433 	uint8_t	v;
74434 	/*
74435 	 * This value is written by the NIC such that it will be different
74436 	 * for each pass through the completion queue. The even passes
74437 	 * will write 1. The odd passes will write 0.
74438 	 */
74439 	#define CREQ_MAP_TC_TO_COS_RESP_V	UINT32_C(0x1)
74440 	/* Event or command opcode. */
74441 	uint8_t	event;
74442 	/* Map TC to COS response. */
74443 	#define CREQ_MAP_TC_TO_COS_RESP_EVENT_MAP_TC_TO_COS UINT32_C(0x8a)
74444 	#define CREQ_MAP_TC_TO_COS_RESP_EVENT_LAST	CREQ_MAP_TC_TO_COS_RESP_EVENT_MAP_TC_TO_COS
74445 	uint8_t	reserved48[6];
74446 } creq_map_tc_to_cos_resp_t, *pcreq_map_tc_to_cos_resp_t;
74447 
74448 /*****************
74449  * query_roce_cc *
74450  *****************/
74451 
74452 
74453 /* cmdq_query_roce_cc (size:128b/16B) */
74454 
74455 typedef struct cmdq_query_roce_cc {
74456 	/* Command opcode. */
74457 	uint8_t	opcode;
74458 	/* Query congestion control. */
74459 	#define CMDQ_QUERY_ROCE_CC_OPCODE_QUERY_ROCE_CC UINT32_C(0x8d)
74460 	#define CMDQ_QUERY_ROCE_CC_OPCODE_LAST	CMDQ_QUERY_ROCE_CC_OPCODE_QUERY_ROCE_CC
74461 	/* Size of the command in 16-byte units. */
74462 	uint8_t	cmd_size;
74463 	/* Flags and attribs of the command. */
74464 	uint16_t	flags;
74465 	/* Driver supplied handle to associate the command and the response. */
74466 	uint16_t	cookie;
74467 	/* Size of the response buffer in 16-byte units. */
74468 	uint8_t	resp_size;
74469 	uint8_t	reserved8;
74470 	/* Host address of the response. */
74471 	uint64_t	resp_addr;
74472 } cmdq_query_roce_cc_t, *pcmdq_query_roce_cc_t;
74473 
74474 /* creq_query_roce_cc_resp (size:128b/16B) */
74475 
74476 typedef struct creq_query_roce_cc_resp {
74477 	uint8_t	type;
74478 	/*
74479 	 * This field indicates the exact type of the completion.
74480 	 * By convention, the LSB identifies the length of the
74481 	 * record in 16B units. Even values indicate 16B
74482 	 * records. Odd values indicate 32B
74483 	 * records.
74484 	 */
74485 	#define CREQ_QUERY_ROCE_CC_RESP_TYPE_MASK	UINT32_C(0x3f)
74486 	#define CREQ_QUERY_ROCE_CC_RESP_TYPE_SFT	0
74487 	/* QP Async Notification */
74488 		#define CREQ_QUERY_ROCE_CC_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
74489 		#define CREQ_QUERY_ROCE_CC_RESP_TYPE_LAST	CREQ_QUERY_ROCE_CC_RESP_TYPE_QP_EVENT
74490 	/* Status of the response. */
74491 	uint8_t	status;
74492 	/* Driver supplied handle to associate the command and the response. */
74493 	uint16_t	cookie;
74494 	/* Side buffer size in 16-byte units */
74495 	uint32_t	size;
74496 	uint8_t	v;
74497 	/*
74498 	 * This value is written by the NIC such that it will be different
74499 	 * for each pass through the completion queue. The even passes
74500 	 * will write 1. The odd passes will write 0.
74501 	 */
74502 	#define CREQ_QUERY_ROCE_CC_RESP_V	UINT32_C(0x1)
74503 	/* Event or command opcode. */
74504 	uint8_t	event;
74505 	/* Query congestion control response. */
74506 	#define CREQ_QUERY_ROCE_CC_RESP_EVENT_QUERY_ROCE_CC UINT32_C(0x8d)
74507 	#define CREQ_QUERY_ROCE_CC_RESP_EVENT_LAST	CREQ_QUERY_ROCE_CC_RESP_EVENT_QUERY_ROCE_CC
74508 	uint8_t	reserved48[6];
74509 } creq_query_roce_cc_resp_t, *pcreq_query_roce_cc_resp_t;
74510 
74511 /* Query congestion control command response side buffer structure. */
74512 /* creq_query_roce_cc_resp_sb (size:256b/32B) */
74513 
74514 typedef struct creq_query_roce_cc_resp_sb {
74515 	/* Command opcode. */
74516 	uint8_t	opcode;
74517 	/* Query congestion control response. */
74518 	#define CREQ_QUERY_ROCE_CC_RESP_SB_OPCODE_QUERY_ROCE_CC UINT32_C(0x8d)
74519 	#define CREQ_QUERY_ROCE_CC_RESP_SB_OPCODE_LAST	CREQ_QUERY_ROCE_CC_RESP_SB_OPCODE_QUERY_ROCE_CC
74520 	/* Status of the response. */
74521 	uint8_t	status;
74522 	/* Driver supplied handle to associate the command and the response. */
74523 	uint16_t	cookie;
74524 	/* Flags and attribs of the command. */
74525 	uint16_t	flags;
74526 	/* Size of the response buffer in 16-byte units. */
74527 	uint8_t	resp_size;
74528 	uint8_t	reserved8;
74529 	uint8_t	enable_cc;
74530 	/* Enable. */
74531 	#define CREQ_QUERY_ROCE_CC_RESP_SB_ENABLE_CC	UINT32_C(0x1)
74532 	/* unused7 is 7 b */
74533 	#define CREQ_QUERY_ROCE_CC_RESP_SB_UNUSED7_MASK  UINT32_C(0xfe)
74534 	#define CREQ_QUERY_ROCE_CC_RESP_SB_UNUSED7_SFT   1
74535 	uint8_t	tos_dscp_tos_ecn;
74536 	/* IP TOS ECN. */
74537 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_ECN_MASK UINT32_C(0x3)
74538 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_ECN_SFT  0
74539 	/* IP TOS DSCP. */
74540 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_DSCP_MASK UINT32_C(0xfc)
74541 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_DSCP_SFT 2
74542 	/* Congestion Probability averaging factor. */
74543 	uint8_t	g;
74544 	/* Number of phases in Fast Recovery and Active Increase. */
74545 	uint8_t	num_phases_per_state;
74546 	/* The starting value of rate. */
74547 	uint16_t	init_cr;
74548 	/* The starting value of target rate. */
74549 	uint16_t	init_tr;
74550 	uint8_t	alt_vlan_pcp;
74551 	/* Alternate vlan pcp value for CNP packets. */
74552 	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_VLAN_PCP_MASK UINT32_C(0x7)
74553 	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_VLAN_PCP_SFT 0
74554 	/* rsvd1 is 5 b */
74555 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD1_MASK	UINT32_C(0xf8)
74556 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD1_SFT	3
74557 	uint8_t	alt_tos_dscp;
74558 	/* Alternate IP TOS DSCP. */
74559 	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_TOS_DSCP_MASK UINT32_C(0x3f)
74560 	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_TOS_DSCP_SFT 0
74561 	/* rsvd4 is 2 b */
74562 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD4_MASK	UINT32_C(0xc0)
74563 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD4_SFT	6
74564 	uint8_t	cc_mode;
74565 	/* DCTCP CC algorithm. */
74566 	#define CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_DCTCP	UINT32_C(0x0)
74567 	/*
74568 	 * Probabilistic marking CC algorithm. On chips with CC Gen 0
74569 	 * support this will be TCP CC algorithm.
74570 	 */
74571 	#define CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_PROBABILISTIC UINT32_C(0x1)
74572 	#define CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_LAST	CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_PROBABILISTIC
74573 	/* Specifies the RoCE Tx Queue to use for sending CNP packets. */
74574 	uint8_t	tx_queue;
74575 	uint16_t	rtt;
74576 	/* Round trip time in units of usecs */
74577 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RTT_MASK  UINT32_C(0x3fff)
74578 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RTT_SFT   0
74579 	/* rsvd5 is 2 b */
74580 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD5_MASK UINT32_C(0xc000)
74581 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD5_SFT 14
74582 	uint16_t	tcp_cp;
74583 	/* The value used as CP when cc_mode is 1(TCP) */
74584 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TCP_CP_MASK UINT32_C(0x3ff)
74585 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TCP_CP_SFT 0
74586 	/* rsvd6 is 6 b */
74587 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD6_MASK UINT32_C(0xfc00)
74588 	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD6_SFT  10
74589 	/* Inactivity time after which QP CC parameters are initialized */
74590 	uint16_t	inactivity_th;
74591 	/* Number of packets per phase. Max is 255. */
74592 	uint8_t	pkts_per_phase;
74593 	/* Amount of time per phase in units of ms. Max is 15 */
74594 	uint8_t	time_per_phase;
74595 	uint32_t	reserved32;
74596 } creq_query_roce_cc_resp_sb_t, *pcreq_query_roce_cc_resp_sb_t;
74597 
74598 /*
74599  * TLV encapsulated Query congestion control command response
74600  * side buffer, with extended TLV record included for specifying
74601  * the extended configuration for CC level 1.
74602  */
74603 /* creq_query_roce_cc_resp_sb_tlv (size:384b/48B) */
74604 
74605 typedef struct creq_query_roce_cc_resp_sb_tlv {
74606 	/*
74607 	 * The command discriminator is used to differentiate between various
74608 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
74609 	 * command messages as well as newer TLV encapsulated HWRM commands.
74610 	 *
74611 	 * For TLV encapsulated messages this field must be 0x8000.
74612 	 */
74613 	uint16_t	cmd_discr;
74614 	uint8_t	reserved_8b;
74615 	uint8_t	tlv_flags;
74616 	/*
74617 	 * Indicates the presence of additional TLV encapsulated data
74618 	 * follows this TLV.
74619 	 */
74620 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_MORE	UINT32_C(0x1)
74621 	/* Last TLV in a sequence of TLVs. */
74622 		#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
74623 	/* More TLVs follow this TLV. */
74624 		#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
74625 	/*
74626 	 * When an HWRM receiver detects a TLV type that it does not
74627 	 * support with the TLV required flag set, the receiver must
74628 	 * reject the HWRM message with an error code indicating an
74629 	 * unsupported TLV type.
74630 	 */
74631 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED	UINT32_C(0x2)
74632 	/* No */
74633 		#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
74634 	/* Yes */
74635 		#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
74636 		#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_LAST CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES
74637 	/*
74638 	 * This field defines the TLV type value which is divided into
74639 	 * two ranges to differentiate between global and local TLV types.
74640 	 * Global TLV types must be unique across all defined TLV types.
74641 	 * Local TLV types are valid only for extensions to a given
74642 	 * HWRM message and may be repeated across different HWRM message
74643 	 * types. There is a direct correlation of each HWRM message type
74644 	 * to a single global TLV type value.
74645 	 *
74646 	 * Global TLV range: `0 - (63k-1)`
74647 	 *
74648 	 * Local TLV range: `63k - (64k-1)`
74649 	 */
74650 	uint16_t	tlv_type;
74651 	/*
74652 	 * Length of the message data encapsulated by this TLV in bytes.
74653 	 * This length does not include the size of the TLV header itself
74654 	 * and it must be an integer multiple of 8B.
74655 	 */
74656 	uint16_t	length;
74657 	/*
74658 	 * Size of the tlv encapsulated response,
74659 	 * including all tlvs and extension data in 16-byte units.
74660 	 */
74661 	uint8_t	total_size;
74662 	uint8_t	reserved56[7];
74663 	/* Command opcode. */
74664 	uint8_t	opcode;
74665 	/* Query congestion control response. */
74666 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_OPCODE_QUERY_ROCE_CC UINT32_C(0x8d)
74667 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_OPCODE_LAST	CREQ_QUERY_ROCE_CC_RESP_SB_TLV_OPCODE_QUERY_ROCE_CC
74668 	/* Status of the response. */
74669 	uint8_t	status;
74670 	/* Driver supplied handle to associate the command and the response. */
74671 	uint16_t	cookie;
74672 	/* Flags and attribs of the command. */
74673 	uint16_t	flags;
74674 	/* Size of the response buffer in 16-byte units. */
74675 	uint8_t	resp_size;
74676 	uint8_t	reserved8;
74677 	uint8_t	enable_cc;
74678 	/* Enable. */
74679 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ENABLE_CC	UINT32_C(0x1)
74680 	/* unused7 is 7 b */
74681 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_UNUSED7_MASK  UINT32_C(0xfe)
74682 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_UNUSED7_SFT   1
74683 	uint8_t	tos_dscp_tos_ecn;
74684 	/* IP TOS ECN. */
74685 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_ECN_MASK UINT32_C(0x3)
74686 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_ECN_SFT  0
74687 	/* IP TOS DSCP. */
74688 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_DSCP_MASK UINT32_C(0xfc)
74689 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_DSCP_SFT 2
74690 	/* Congestion Probability averaging factor. */
74691 	uint8_t	g;
74692 	/* Number of phases in Fast Recovery and Active Increase. */
74693 	uint8_t	num_phases_per_state;
74694 	/* The starting value of rate. */
74695 	uint16_t	init_cr;
74696 	/* The starting value of target rate. */
74697 	uint16_t	init_tr;
74698 	uint8_t	alt_vlan_pcp;
74699 	/* Alternate vlan pcp value for CNP packets. */
74700 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_VLAN_PCP_MASK UINT32_C(0x7)
74701 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_VLAN_PCP_SFT 0
74702 	/* rsvd1 is 5 b */
74703 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD1_MASK	UINT32_C(0xf8)
74704 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD1_SFT	3
74705 	uint8_t	alt_tos_dscp;
74706 	/* Alternate IP TOS DSCP. */
74707 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_TOS_DSCP_MASK UINT32_C(0x3f)
74708 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_TOS_DSCP_SFT 0
74709 	/* rsvd4 is 2 b */
74710 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD4_MASK	UINT32_C(0xc0)
74711 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD4_SFT	6
74712 	uint8_t	cc_mode;
74713 	/* DCTCP CC algorithm. */
74714 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_DCTCP	UINT32_C(0x0)
74715 	/*
74716 	 * Probabilistic marking CC algorithm. On chips with CC Gen 0
74717 	 * support this will be TCP CC algorithm.
74718 	 */
74719 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_PROBABILISTIC UINT32_C(0x1)
74720 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_LAST	CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_PROBABILISTIC
74721 	/* Specifies the RoCE Tx Queue to use for sending CNP packets. */
74722 	uint8_t	tx_queue;
74723 	uint16_t	rtt;
74724 	/* Round trip time in units of usecs */
74725 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RTT_MASK  UINT32_C(0x3fff)
74726 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RTT_SFT   0
74727 	/* rsvd5 is 2 b */
74728 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD5_MASK UINT32_C(0xc000)
74729 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD5_SFT 14
74730 	uint16_t	tcp_cp;
74731 	/* The value used as CP when cc_mode is 1(TCP) */
74732 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TCP_CP_MASK UINT32_C(0x3ff)
74733 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TCP_CP_SFT 0
74734 	/* rsvd6 is 6 b */
74735 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD6_MASK UINT32_C(0xfc00)
74736 	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD6_SFT  10
74737 	/* Inactivity time after which QP CC parameters are initialized */
74738 	uint16_t	inactivity_th;
74739 	/* Number of packets per phase. Max is 255. */
74740 	uint8_t	pkts_per_phase;
74741 	/* Amount of time per phase in units of ms. Max is 15 */
74742 	uint8_t	time_per_phase;
74743 	uint32_t	reserved32;
74744 } creq_query_roce_cc_resp_sb_tlv_t, *pcreq_query_roce_cc_resp_sb_tlv_t;
74745 
74746 /* creq_query_roce_cc_gen1_resp_sb_tlv (size:704b/88B) */
74747 
74748 typedef struct creq_query_roce_cc_gen1_resp_sb_tlv {
74749 	/*
74750 	 * The command discriminator is used to differentiate between various
74751 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
74752 	 * command messages as well as newer TLV encapsulated HWRM commands.
74753 	 *
74754 	 * For TLV encapsulated messages this field must be 0x8000.
74755 	 */
74756 	uint16_t	cmd_discr;
74757 	uint8_t	reserved_8b;
74758 	uint8_t	tlv_flags;
74759 	/*
74760 	 * Indicates the presence of additional TLV encapsulated data
74761 	 * follows this TLV.
74762 	 */
74763 	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_MORE	UINT32_C(0x1)
74764 	/* Last TLV in a sequence of TLVs. */
74765 		#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
74766 	/* More TLVs follow this TLV. */
74767 		#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
74768 	/*
74769 	 * When an HWRM receiver detects a TLV type that it does not
74770 	 * support with the TLV required flag set, the receiver must
74771 	 * reject the HWRM message with an error code indicating an
74772 	 * unsupported TLV type.
74773 	 */
74774 	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED	UINT32_C(0x2)
74775 	/* No */
74776 		#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
74777 	/* Yes */
74778 		#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
74779 		#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_LAST CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES
74780 	/*
74781 	 * This field defines the TLV type value which is divided into
74782 	 * two ranges to differentiate between global and local TLV types.
74783 	 * Global TLV types must be unique across all defined TLV types.
74784 	 * Local TLV types are valid only for extensions to a given
74785 	 * HWRM message and may be repeated across different HWRM message
74786 	 * types. There is a direct correlation of each HWRM message type
74787 	 * to a single global TLV type value.
74788 	 *
74789 	 * Global TLV range: `0 - (63k-1)`
74790 	 *
74791 	 * Local TLV range: `63k - (64k-1)`
74792 	 */
74793 	uint16_t	tlv_type;
74794 	/*
74795 	 * Length of the message data encapsulated by this TLV in bytes.
74796 	 * This length does not include the size of the TLV header itself
74797 	 * and it must be an integer multiple of 8B.
74798 	 */
74799 	uint16_t	length;
74800 	uint64_t	reserved64;
74801 	/* High order bits of inactivity threshold. */
74802 	uint16_t	inactivity_th_hi;
74803 	/*
74804 	 * The number of uS between generation of CNPs when cc_mode is
74805 	 * probabilistic marking.
74806 	 */
74807 	uint16_t	min_time_between_cnps;
74808 	/*
74809 	 * The starting value of congestion probability. Input range
74810 	 * is 0 - 1023.
74811 	 */
74812 	uint16_t	init_cp;
74813 	/*
74814 	 * In tr_update_mode 0, Target Rate (TR) is updated to
74815 	 * halfway between the Current Rate (CR) before and after reduction.
74816 	 * In tr_update_mode 1, TR is updated to CR's value before reduction.
74817 	 */
74818 	uint8_t	tr_update_mode;
74819 	/*
74820 	 * Determine for how many RTTs with CNPs in a row, TR is being updated.
74821 	 * 0: TR is updated when QPC. rtts_with_cnps == 0
74822 	 * 1-6: TR is updated if QPC. rtts_with_cnps <= tr_update_cycles
74823 	 * 7: TR is updated on all reductions.
74824 	 */
74825 	uint8_t	tr_update_cycles;
74826 	/* Number of RTTs in Fast Recovery stage. */
74827 	uint8_t	fr_num_rtts;
74828 	/* Time increment to increase TR in active increase phase. */
74829 	uint8_t	ai_rate_increase;
74830 	/*
74831 	 * Indicates for how many RTTs with CNPs after the first one
74832 	 * to not reduce rate even if CNPs are received.
74833 	 */
74834 	uint16_t	reduction_relax_rtts_th;
74835 	/*
74836 	 * For low rates, additional number of RTTS with CNPs
74837 	 * for which no rate reduction is made.
74838 	 * num_bits: 14
74839 	 */
74840 	uint16_t	additional_relax_cr_th;
74841 	/*
74842 	 * If CR is less than or equal to this value,
74843 	 * then the actual CR average is set to this value
74844 	 * (shifted by bw_avg_weight).
74845 	 */
74846 	uint16_t	cr_min_th;
74847 	/* Log based averaging weight for QPC variable actual_cr_avg. */
74848 	uint8_t	bw_avg_weight;
74849 	/*
74850 	 * Used to compare CR to this factor times QPC.actual_cr_average
74851 	 * as a reduction reference. Values between 0 and 6 represent factor of
74852 	 * 1.125, 1.25, 1.5, 1.75, 2, 2.25, 2.5 respectively.
74853 	 */
74854 	uint8_t	actual_cr_factor;
74855 	/* The level of CR above which CP is set to maximum level. */
74856 	uint16_t	max_cp_cr_th;
74857 	/*
74858 	 * Enable adding fraction of CR to CP.
74859 	 * 0 for disable, 1 for enable.
74860 	 */
74861 	uint8_t	cp_bias_en;
74862 	/* Log based fraction of cr to add to CP when cp_bias_en is 1. */
74863 	uint8_t	cp_bias;
74864 	/*
74865 	 * The value of ECN bits in a CNP packet generated by hardware.
74866 	 * ECN-Capable Transport (ECT) codepoints supported include:
74867 	 * 0 for not_ect, 1 for ect_0, 2 for ect_1
74868 	 */
74869 	uint8_t	cnp_ecn;
74870 	/* Not ECN capable Transport */
74871 	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_NOT_ECT UINT32_C(0x0)
74872 	/* ECN Capable Transport-1 */
74873 	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_ECT_1   UINT32_C(0x1)
74874 	/* ECN Capable Transport-0 */
74875 	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_ECT_0   UINT32_C(0x2)
74876 	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_LAST   CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_ECT_0
74877 	/* Enables jitter in RTT. */
74878 	uint8_t	rtt_jitter_en;
74879 	/*
74880 	 * Number of bytes per usec, dependent on port speed.
74881 	 * 200 Gbps: 25,000
74882 	 * 100 Gbps: 12,500
74883 	 * 50 Gbps: 6,250
74884 	 * 25 Gbps: 3125
74885 	 * 10 Gbps: 1250
74886 	 */
74887 	uint16_t	link_bytes_per_usec;
74888 	/*
74889 	 * If CR is greater than or equal to this threshold,
74890 	 * QPC's CC state is reset to its initial state.
74891 	 */
74892 	uint16_t	reset_cc_cr_th;
74893 	/*
74894 	 * The number of valid lsbits in CR and TR.
74895 	 * Supported values include 10 through 14 to support 2^cr_width rate.
74896 	 */
74897 	uint8_t	cr_width;
74898 	/* Lower end of random selection of quota_period. */
74899 	uint8_t	quota_period_min;
74900 	/* Upper end of random selection of quota_period. */
74901 	uint8_t	quota_period_max;
74902 	/*
74903 	 * The absolute maximum possible quota_period,
74904 	 * applicable when rate table for lower 24 levels is used.
74905 	 */
74906 	uint8_t	quota_period_abs_max;
74907 	/* TR never goes below this level. */
74908 	uint16_t	tr_lower_bound;
74909 	/* Factor on probability threshold for adding 0.5 to CR randomly. */
74910 	uint8_t	cr_prob_factor;
74911 	/* Factor on probability threshold for adding 0.5 to TR randomly. */
74912 	uint8_t	tr_prob_factor;
74913 	/*
74914 	 * Threshold to ensure fairness between requester and responder.
74915 	 * If CR is less than the fairness threshold and a quota period has
74916 	 * passed priority will be given to the path that did not last
74917 	 * transfer data.
74918 	 */
74919 	uint16_t	fairness_cr_th;
74920 	/* Log based rate reduction divider. */
74921 	uint8_t	red_div;
74922 	/* Threshold for rate reductions when CNPS received over last RTT. */
74923 	uint8_t	cnp_ratio_th;
74924 	/*
74925 	 * Extended number of RTTS to wait, when there is no congestion,
74926 	 * to start doubling the rate.
74927 	 */
74928 	uint16_t	exp_ai_rtts;
74929 	/* Log based CR to CP ratio used in exponential increase. */
74930 	uint8_t	exp_ai_cr_cp_ratio;
74931 	/* Enable use of lowest 24 rate levels rate_table. */
74932 	uint8_t	use_rate_table;
74933 	/*
74934 	 * Determines after how many congestion free RTTs to start
74935 	 * updating CP to track CR.
74936 	 */
74937 	uint16_t	cp_exp_update_th;
74938 	/*
74939 	 * The threshold on congestion free RTTs above which AI can increase
74940 	 * to 16.
74941 	 */
74942 	uint16_t	high_exp_ai_rtts_th1;
74943 	/*
74944 	 * The threshold on congestion free RTTs above which AI can increase
74945 	 * to 32.
74946 	 */
74947 	uint16_t	high_exp_ai_rtts_th2;
74948 	/*
74949 	 * The number of congestion free RTTs above which
74950 	 * reduction based on actual rate is enabled.
74951 	 */
74952 	uint16_t	actual_cr_cong_free_rtts_th;
74953 	/*
74954 	 * If rtts_with_cong is greater than 7 (severe congestion) and
74955 	 * CR level post reduction is above this threshold,
74956 	 * then TR is capped to 1.5 times CR..
74957 	 */
74958 	uint16_t	severe_cong_cr_th1;
74959 	/*
74960 	 * If rtts_with_cong is greater than 7 (severe congestion) and
74961 	 * CR level post reduction is above this threshold,
74962 	 * then TR is capped to 1.25 times CR..
74963 	 */
74964 	uint16_t	severe_cong_cr_th2;
74965 	/*
74966 	 * The maximum number of 64B that can be transmitted during RTT time,
74967 	 * including all headers and Inter Packet Gap.
74968 	 */
74969 	uint32_t	link64B_per_rtt;
74970 	/*
74971 	 * The number of bytes to subtract from QPC.cc_bucket
74972 	 * when an ack is scheduled.
74973 	 */
74974 	uint8_t	cc_ack_bytes;
74975 	/*
74976 	 * Enables reduction of CR, TR, and CP to init values when
74977 	 * congestion free RTTs is greater than reduce2_init_cong_free_rtts_th.
74978 	 */
74979 	uint8_t	reduce_init_en;
74980 	/*
74981 	 * Minimum threshold value for number of congestion free RTTs before
74982 	 * reducing to init values for CR, TR, and CP when reduce_init_en is
74983 	 * enabled.
74984 	 */
74985 	uint16_t	reduce_init_cong_free_rtts_th;
74986 	/* Enables random no reduction of CR. */
74987 	uint8_t	random_no_red_en;
74988 	/*
74989 	 * Enables coarse correction to actual CR when actual RTT is longer
74990 	 * than nominal.
74991 	 */
74992 	uint8_t	actual_cr_shift_correction_en;
74993 	/* Enables adjustment to refill quota. */
74994 	uint8_t	quota_period_adjust_en;
74995 	uint8_t	reserved[5];
74996 } creq_query_roce_cc_gen1_resp_sb_tlv_t, *pcreq_query_roce_cc_gen1_resp_sb_tlv_t;
74997 
74998 /* creq_query_roce_cc_gen2_resp_sb_tlv (size:512b/64B) */
74999 
75000 typedef struct creq_query_roce_cc_gen2_resp_sb_tlv {
75001 	/*
75002 	 * The command discriminator is used to differentiate between various
75003 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
75004 	 * command messages as well as newer TLV encapsulated HWRM commands.
75005 	 *
75006 	 * For TLV encapsulated messages this field must be 0x8000.
75007 	 */
75008 	uint16_t	cmd_discr;
75009 	uint8_t	reserved_8b;
75010 	uint8_t	tlv_flags;
75011 	/*
75012 	 * Indicates the presence of additional TLV encapsulated data
75013 	 * follows this TLV.
75014 	 */
75015 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_MORE	UINT32_C(0x1)
75016 	/* Last TLV in a sequence of TLVs. */
75017 		#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
75018 	/* More TLVs follow this TLV. */
75019 		#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
75020 	/*
75021 	 * When an HWRM receiver detects a TLV type that it does not
75022 	 * support with the TLV required flag set, the receiver must
75023 	 * reject the HWRM message with an error code indicating an
75024 	 * unsupported TLV type.
75025 	 */
75026 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_REQUIRED	UINT32_C(0x2)
75027 	/* No */
75028 		#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
75029 	/* Yes */
75030 		#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
75031 		#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_REQUIRED_LAST CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES
75032 	/*
75033 	 * This field defines the TLV type value which is divided into
75034 	 * two ranges to differentiate between global and local TLV types.
75035 	 * Global TLV types must be unique across all defined TLV types.
75036 	 * Local TLV types are valid only for extensions to a given
75037 	 * HWRM message and may be repeated across different HWRM message
75038 	 * types. There is a direct correlation of each HWRM message type
75039 	 * to a single global TLV type value.
75040 	 *
75041 	 * Global TLV range: `0 - (63k-1)`
75042 	 *
75043 	 * Local TLV range: `63k - (64k-1)`
75044 	 */
75045 	uint16_t	tlv_type;
75046 	/*
75047 	 * Length of the message data encapsulated by this TLV in bytes.
75048 	 * This length does not include the size of the TLV header itself
75049 	 * and it must be an integer multiple of 8B.
75050 	 */
75051 	uint16_t	length;
75052 	uint64_t	reserved64;
75053 	/*
75054 	 * DCN queue level threshold values associated with DCN queue
75055 	 * level table indices 0 to 7.
75056 	 */
75057 	uint16_t	dcn_qlevel_tbl_thr[8];
75058 	/*
75059 	 * DCN queue level table action values.
75060 	 * Returns CR, INC_CNP, UPD_IMM & TR fields associated with
75061 	 * DCN queue level table indices 0 to 7.
75062 	 */
75063 	uint32_t	dcn_qlevel_tbl_act[8];
75064 	/* DCN queue level current rate. */
75065 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_DCN_QLEVEL_TBL_ACT_CR_MASK	UINT32_C(0x3fff)
75066 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_DCN_QLEVEL_TBL_ACT_CR_SFT	0
75067 	/* DCN queue level increment CNP count. */
75068 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_DCN_QLEVEL_TBL_ACT_INC_CNP	UINT32_C(0x4000)
75069 	/* DCN queue level update CR and TR immediately. */
75070 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_DCN_QLEVEL_TBL_ACT_UPD_IMM	UINT32_C(0x8000)
75071 	/* DCN queue level target rate */
75072 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_DCN_QLEVEL_TBL_ACT_TR_MASK	UINT32_C(0x3fff0000)
75073 	#define CREQ_QUERY_ROCE_CC_GEN2_RESP_SB_TLV_DCN_QLEVEL_TBL_ACT_TR_SFT	16
75074 } creq_query_roce_cc_gen2_resp_sb_tlv_t, *pcreq_query_roce_cc_gen2_resp_sb_tlv_t;
75075 
75076 /***********************
75077  * cmdq_modify_roce_cc *
75078  ***********************/
75079 
75080 
75081 /* cmdq_modify_roce_cc (size:448b/56B) */
75082 
75083 typedef struct cmdq_modify_roce_cc {
75084 	/* Command opcode. */
75085 	uint8_t	opcode;
75086 	/* Modify congestion control. Can only be issued from a PF. */
75087 	#define CMDQ_MODIFY_ROCE_CC_OPCODE_MODIFY_ROCE_CC UINT32_C(0x8c)
75088 	#define CMDQ_MODIFY_ROCE_CC_OPCODE_LAST	CMDQ_MODIFY_ROCE_CC_OPCODE_MODIFY_ROCE_CC
75089 	/* Size of the command in 16-byte units. */
75090 	uint8_t	cmd_size;
75091 	/* Flags and attribs of the command. */
75092 	uint16_t	flags;
75093 	/* Driver supplied handle to associate the command and the response. */
75094 	uint16_t	cookie;
75095 	/* Size of the response buffer in 16-byte units. */
75096 	uint8_t	resp_size;
75097 	uint8_t	reserved8;
75098 	/* Host address of the response. */
75099 	uint64_t	resp_addr;
75100 	/* Modify mask signifies the field that is requesting the change. */
75101 	uint32_t	modify_mask;
75102 	/* Enable change. */
75103 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ENABLE_CC		UINT32_C(0x1)
75104 	/* Running average weight change. */
75105 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_G			UINT32_C(0x2)
75106 	/* Number of phases in Fast Recovery. */
75107 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_NUMPHASEPERSTATE	UINT32_C(0x4)
75108 	/* The starting value of rate change. */
75109 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INIT_CR		UINT32_C(0x8)
75110 	/* The starting value of target rate change. */
75111 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INIT_TR		UINT32_C(0x10)
75112 	/* IP TOS ECN change */
75113 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TOS_ECN		UINT32_C(0x20)
75114 	/* IP TOS DSCP change */
75115 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TOS_DSCP		UINT32_C(0x40)
75116 	/* Alternate IP TOS ECN change */
75117 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ALT_VLAN_PCP	UINT32_C(0x80)
75118 	/* Alternate IP TOS DSCP change */
75119 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ALT_TOS_DSCP	UINT32_C(0x100)
75120 	/* Round trip time in units of usecs */
75121 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_RTT		UINT32_C(0x200)
75122 	/* Congestion Control mode */
75123 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_CC_MODE		UINT32_C(0x400)
75124 	/* The value used as CP when cc_mode is 1(TCP) */
75125 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TCP_CP		UINT32_C(0x800)
75126 	/* Specifies the RoCE Tx Queue to use for sending CNP packets */
75127 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE		UINT32_C(0x1000)
75128 	/* Inactivity time after which QP CC parameters are initialized */
75129 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP	UINT32_C(0x2000)
75130 	/* Amount of time per phase in units of ms. Max is 15. */
75131 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TIME_PER_PHASE	UINT32_C(0x4000)
75132 	/* Number of packets per phase. Max is 255. */
75133 	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_PKTS_PER_PHASE	UINT32_C(0x8000)
75134 	uint8_t	enable_cc;
75135 	/* Enable. */
75136 	#define CMDQ_MODIFY_ROCE_CC_ENABLE_CC	UINT32_C(0x1)
75137 	/* rsvd1 is 7 b */
75138 	#define CMDQ_MODIFY_ROCE_CC_RSVD1_MASK	UINT32_C(0xfe)
75139 	#define CMDQ_MODIFY_ROCE_CC_RSVD1_SFT	1
75140 	/* Congestion Probability averaging factor. */
75141 	uint8_t	g;
75142 	/* Number of phases in Fast Recovery. */
75143 	uint8_t	num_phases_per_state;
75144 	/* Number of packets per phase. Max is 255. */
75145 	uint8_t	pkts_per_phase;
75146 	/*
75147 	 * The starting value of rate.
75148 	 * The max value supported for CC support level 1 is 1024.
75149 	 */
75150 	uint16_t	init_cr;
75151 	/*
75152 	 * The starting value of target rate.
75153 	 * The max value supported for CC support level 1 is 1024.
75154 	 */
75155 	uint16_t	init_tr;
75156 	uint8_t	tos_dscp_tos_ecn;
75157 	/* IP TOS ECN. Valid values are 1 or 2 when ECN is enabled. */
75158 	#define CMDQ_MODIFY_ROCE_CC_TOS_ECN_MASK UINT32_C(0x3)
75159 	#define CMDQ_MODIFY_ROCE_CC_TOS_ECN_SFT  0
75160 	/* IP TOS DSCP. */
75161 	#define CMDQ_MODIFY_ROCE_CC_TOS_DSCP_MASK UINT32_C(0xfc)
75162 	#define CMDQ_MODIFY_ROCE_CC_TOS_DSCP_SFT 2
75163 	uint8_t	alt_vlan_pcp;
75164 	/* Alternate vlan pcp value for CNP packets. */
75165 	#define CMDQ_MODIFY_ROCE_CC_ALT_VLAN_PCP_MASK UINT32_C(0x7)
75166 	#define CMDQ_MODIFY_ROCE_CC_ALT_VLAN_PCP_SFT 0
75167 	/* rsvd3 is 5 b */
75168 	#define CMDQ_MODIFY_ROCE_CC_RSVD3_MASK	UINT32_C(0xf8)
75169 	#define CMDQ_MODIFY_ROCE_CC_RSVD3_SFT	3
75170 	uint16_t	alt_tos_dscp;
75171 	/* Alternate IP TOS DSCP. */
75172 	#define CMDQ_MODIFY_ROCE_CC_ALT_TOS_DSCP_MASK UINT32_C(0x3f)
75173 	#define CMDQ_MODIFY_ROCE_CC_ALT_TOS_DSCP_SFT 0
75174 	/* rsvd4 is 10 b */
75175 	#define CMDQ_MODIFY_ROCE_CC_RSVD4_MASK	UINT32_C(0xffc0)
75176 	#define CMDQ_MODIFY_ROCE_CC_RSVD4_SFT	6
75177 	uint16_t	rtt;
75178 	/*
75179 	 * Round trip time in units of usecs.
75180 	 * The max value supported for CC support level 1 is 2047.
75181 	 */
75182 	#define CMDQ_MODIFY_ROCE_CC_RTT_MASK  UINT32_C(0x3fff)
75183 	#define CMDQ_MODIFY_ROCE_CC_RTT_SFT   0
75184 	/* rsvd5 is 2 b */
75185 	#define CMDQ_MODIFY_ROCE_CC_RSVD5_MASK UINT32_C(0xc000)
75186 	#define CMDQ_MODIFY_ROCE_CC_RSVD5_SFT 14
75187 	uint16_t	tcp_cp;
75188 	/* The value used as CP when cc_mode is 1(TCP) */
75189 	#define CMDQ_MODIFY_ROCE_CC_TCP_CP_MASK UINT32_C(0x3ff)
75190 	#define CMDQ_MODIFY_ROCE_CC_TCP_CP_SFT 0
75191 	/* rsvd6 is 6 b */
75192 	#define CMDQ_MODIFY_ROCE_CC_RSVD6_MASK UINT32_C(0xfc00)
75193 	#define CMDQ_MODIFY_ROCE_CC_RSVD6_SFT  10
75194 	uint8_t	cc_mode;
75195 	/* DCTCP */
75196 	#define CMDQ_MODIFY_ROCE_CC_CC_MODE_DCTCP_CC_MODE	UINT32_C(0x0)
75197 	/*
75198 	 * Probabilistic marking. On chips with CC Gen 0 support this
75199 	 * will be TCP CC algorithm.
75200 	 */
75201 	#define CMDQ_MODIFY_ROCE_CC_CC_MODE_PROBABILISTIC_CC_MODE UINT32_C(0x1)
75202 	#define CMDQ_MODIFY_ROCE_CC_CC_MODE_LAST		CMDQ_MODIFY_ROCE_CC_CC_MODE_PROBABILISTIC_CC_MODE
75203 	/*
75204 	 * Specifies the RoCE Tx Queue to use for sending CNP packets.
75205 	 * CC support level 0 support 0 to 3 Tx queues.
75206 	 * CC support level 1 supports 0 to 7 Tx queues.
75207 	 */
75208 	uint8_t	tx_queue;
75209 	/* Inactivity time after which QP CC parameters are initialized */
75210 	uint16_t	inactivity_th;
75211 	/* Amount of time per phase in units of ms. Max is 15 */
75212 	uint8_t	time_per_phase;
75213 	/* reserved8 is 8 b */
75214 	uint8_t	reserved8_1;
75215 	/* reserved16 is 16 b */
75216 	uint16_t	reserved16;
75217 	uint32_t	reserved32;
75218 	uint64_t	reserved64;
75219 } cmdq_modify_roce_cc_t, *pcmdq_modify_roce_cc_t;
75220 
75221 /*
75222  * TLV encapsulated modify CC command, with extended TLV record
75223  * included for specifying the extended configuration for CC level 1.
75224  */
75225 /* cmdq_modify_roce_cc_tlv (size:640b/80B) */
75226 
75227 typedef struct cmdq_modify_roce_cc_tlv {
75228 	/*
75229 	 * The command discriminator is used to differentiate between various
75230 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
75231 	 * command messages as well as newer TLV encapsulated HWRM commands.
75232 	 *
75233 	 * For TLV encapsulated messages this field must be 0x8000.
75234 	 */
75235 	uint16_t	cmd_discr;
75236 	uint8_t	reserved_8b;
75237 	uint8_t	tlv_flags;
75238 	/*
75239 	 * Indicates the presence of additional TLV encapsulated data
75240 	 * follows this TLV.
75241 	 */
75242 	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_MORE	UINT32_C(0x1)
75243 	/* Last TLV in a sequence of TLVs. */
75244 		#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
75245 	/* More TLVs follow this TLV. */
75246 		#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
75247 	/*
75248 	 * When an HWRM receiver detects a TLV type that it does not
75249 	 * support with the TLV required flag set, the receiver must
75250 	 * reject the HWRM message with an error code indicating an
75251 	 * unsupported TLV type.
75252 	 */
75253 	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED	UINT32_C(0x2)
75254 	/* No */
75255 		#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
75256 	/* Yes */
75257 		#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
75258 		#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_LAST CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_YES
75259 	/*
75260 	 * This field defines the TLV type value which is divided into
75261 	 * two ranges to differentiate between global and local TLV types.
75262 	 * Global TLV types must be unique across all defined TLV types.
75263 	 * Local TLV types are valid only for extensions to a given
75264 	 * HWRM message and may be repeated across different HWRM message
75265 	 * types. There is a direct correlation of each HWRM message type
75266 	 * to a single global TLV type value.
75267 	 *
75268 	 * Global TLV range: `0 - (63k-1)`
75269 	 *
75270 	 * Local TLV range: `63k - (64k-1)`
75271 	 */
75272 	uint16_t	tlv_type;
75273 	/*
75274 	 * Length of the message data encapsulated by this TLV in bytes.
75275 	 * This length does not include the size of the TLV header itself
75276 	 * and it must be an integer multiple of 8B.
75277 	 */
75278 	uint16_t	length;
75279 	/*
75280 	 * Size of the tlv encapsulated command, including all tlvs and
75281 	 * extension data in 16-byte units.
75282 	 */
75283 	uint8_t	total_size;
75284 	uint8_t	reserved56[7];
75285 	/* Command opcode. */
75286 	uint8_t	opcode;
75287 	/* Modify congestion control. Can only be issued from a PF. */
75288 	#define CMDQ_MODIFY_ROCE_CC_TLV_OPCODE_MODIFY_ROCE_CC UINT32_C(0x8c)
75289 	#define CMDQ_MODIFY_ROCE_CC_TLV_OPCODE_LAST	CMDQ_MODIFY_ROCE_CC_TLV_OPCODE_MODIFY_ROCE_CC
75290 	/* Size of the command in 16-byte units. */
75291 	uint8_t	cmd_size;
75292 	/* Flags and attribs of the command. */
75293 	uint16_t	flags;
75294 	/* Driver supplied handle to associate the command and the response. */
75295 	uint16_t	cookie;
75296 	/* Size of the response buffer in 16-byte units. */
75297 	uint8_t	resp_size;
75298 	uint8_t	reserved8;
75299 	/* Host address of the response. */
75300 	uint64_t	resp_addr;
75301 	/* Modify mask signifies the field that is requesting the change. */
75302 	uint32_t	modify_mask;
75303 	/* Enable change. */
75304 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_ENABLE_CC		UINT32_C(0x1)
75305 	/* Running average weight change. */
75306 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_G			UINT32_C(0x2)
75307 	/* Number of phases in Fast Recovery. */
75308 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_NUMPHASEPERSTATE	UINT32_C(0x4)
75309 	/* The starting value of rate change. */
75310 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_INIT_CR		UINT32_C(0x8)
75311 	/* The starting value of target rate change. */
75312 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_INIT_TR		UINT32_C(0x10)
75313 	/* IP TOS ECN change */
75314 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TOS_ECN		UINT32_C(0x20)
75315 	/* IP TOS DSCP change */
75316 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TOS_DSCP		UINT32_C(0x40)
75317 	/* Alternate IP TOS ECN change */
75318 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_ALT_VLAN_PCP	UINT32_C(0x80)
75319 	/* Alternate IP TOS DSCP change */
75320 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_ALT_TOS_DSCP	UINT32_C(0x100)
75321 	/* Round trip time in units of usecs */
75322 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_RTT		UINT32_C(0x200)
75323 	/* Congestion Control mode */
75324 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_CC_MODE		UINT32_C(0x400)
75325 	/* The value used as CP when cc_mode is 1(TCP) */
75326 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TCP_CP		UINT32_C(0x800)
75327 	/* Specifies the RoCE Tx Queue to use for sending CNP packets */
75328 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TX_QUEUE		UINT32_C(0x1000)
75329 	/* Inactivity time after which QP CC parameters are initialized */
75330 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_INACTIVITY_CP	UINT32_C(0x2000)
75331 	/* Amount of time per phase in units of ms. Max is 15. */
75332 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TIME_PER_PHASE	UINT32_C(0x4000)
75333 	/* Number of packets per phase. Max is 255. */
75334 	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_PKTS_PER_PHASE	UINT32_C(0x8000)
75335 	uint8_t	enable_cc;
75336 	/* Enable. */
75337 	#define CMDQ_MODIFY_ROCE_CC_TLV_ENABLE_CC	UINT32_C(0x1)
75338 	/* rsvd1 is 7 b */
75339 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD1_MASK	UINT32_C(0xfe)
75340 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD1_SFT	1
75341 	/* Congestion Probability averaging factor. */
75342 	uint8_t	g;
75343 	/* Number of phases in Fast Recovery. */
75344 	uint8_t	num_phases_per_state;
75345 	/* Number of packets per phase. Max is 255. */
75346 	uint8_t	pkts_per_phase;
75347 	/*
75348 	 * The starting value of rate.
75349 	 * The max value supported for CC support level 1 is 1024.
75350 	 */
75351 	uint16_t	init_cr;
75352 	/*
75353 	 * The starting value of target rate.
75354 	 * The max value supported for CC support level 1 is 1024.
75355 	 */
75356 	uint16_t	init_tr;
75357 	uint8_t	tos_dscp_tos_ecn;
75358 	/* IP TOS ECN. Valid values are 1 or 2 when ECN is enabled. */
75359 	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_ECN_MASK UINT32_C(0x3)
75360 	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_ECN_SFT  0
75361 	/* IP TOS DSCP. */
75362 	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_DSCP_MASK UINT32_C(0xfc)
75363 	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_DSCP_SFT 2
75364 	uint8_t	alt_vlan_pcp;
75365 	/* Alternate vlan pcp value for CNP packets. */
75366 	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_VLAN_PCP_MASK UINT32_C(0x7)
75367 	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_VLAN_PCP_SFT 0
75368 	/* rsvd3 is 5 b */
75369 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD3_MASK	UINT32_C(0xf8)
75370 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD3_SFT	3
75371 	uint16_t	alt_tos_dscp;
75372 	/* Alternate IP TOS DSCP. */
75373 	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_TOS_DSCP_MASK UINT32_C(0x3f)
75374 	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_TOS_DSCP_SFT 0
75375 	/* rsvd4 is 10 b */
75376 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD4_MASK	UINT32_C(0xffc0)
75377 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD4_SFT	6
75378 	uint16_t	rtt;
75379 	/*
75380 	 * Round trip time in units of usecs.
75381 	 * The max value supported for CC support level 1 is 2047.
75382 	 */
75383 	#define CMDQ_MODIFY_ROCE_CC_TLV_RTT_MASK  UINT32_C(0x3fff)
75384 	#define CMDQ_MODIFY_ROCE_CC_TLV_RTT_SFT   0
75385 	/* rsvd5 is 2 b */
75386 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD5_MASK UINT32_C(0xc000)
75387 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD5_SFT 14
75388 	uint16_t	tcp_cp;
75389 	/* The value used as CP when cc_mode is 1(TCP) */
75390 	#define CMDQ_MODIFY_ROCE_CC_TLV_TCP_CP_MASK UINT32_C(0x3ff)
75391 	#define CMDQ_MODIFY_ROCE_CC_TLV_TCP_CP_SFT 0
75392 	/* rsvd6 is 6 b */
75393 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD6_MASK UINT32_C(0xfc00)
75394 	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD6_SFT  10
75395 	uint8_t	cc_mode;
75396 	/* DCTCP */
75397 	#define CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_DCTCP_CC_MODE	UINT32_C(0x0)
75398 	/*
75399 	 * Probabilistic marking. On chips with CC Gen 0 support this
75400 	 * will be TCP CC algorithm.
75401 	 */
75402 	#define CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_PROBABILISTIC_CC_MODE UINT32_C(0x1)
75403 	#define CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_LAST		CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_PROBABILISTIC_CC_MODE
75404 	/*
75405 	 * Specifies the RoCE Tx Queue to use for sending CNP packets.
75406 	 * CC support level 0 support 0 to 3 Tx queues.
75407 	 * CC support level 1 supports 0 to 7 Tx queues.
75408 	 */
75409 	uint8_t	tx_queue;
75410 	/* Inactivity time after which QP CC parameters are initialized */
75411 	uint16_t	inactivity_th;
75412 	/* Amount of time per phase in units of ms. Max is 15 */
75413 	uint8_t	time_per_phase;
75414 	/* reserved8 is 8 b */
75415 	uint8_t	reserved8_1;
75416 	/* reserved16 is 16 b */
75417 	uint16_t	reserved16;
75418 	uint32_t	reserved32;
75419 	uint64_t	reserved64;
75420 	uint64_t	reservedtlvpad;
75421 } cmdq_modify_roce_cc_tlv_t, *pcmdq_modify_roce_cc_tlv_t;
75422 
75423 /* cmdq_modify_roce_cc_gen1_tlv (size:768b/96B) */
75424 
75425 typedef struct cmdq_modify_roce_cc_gen1_tlv {
75426 	/*
75427 	 * The command discriminator is used to differentiate between various
75428 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
75429 	 * command messages as well as newer TLV encapsulated HWRM commands.
75430 	 *
75431 	 * For TLV encapsulated messages this field must be 0x8000.
75432 	 */
75433 	uint16_t	cmd_discr;
75434 	uint8_t	reserved_8b;
75435 	uint8_t	tlv_flags;
75436 	/*
75437 	 * Indicates the presence of additional TLV encapsulated data
75438 	 * follows this TLV.
75439 	 */
75440 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_MORE	UINT32_C(0x1)
75441 	/* Last TLV in a sequence of TLVs. */
75442 		#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
75443 	/* More TLVs follow this TLV. */
75444 		#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
75445 	/*
75446 	 * When an HWRM receiver detects a TLV type that it does not
75447 	 * support with the TLV required flag set, the receiver must
75448 	 * reject the HWRM message with an error code indicating an
75449 	 * unsupported TLV type.
75450 	 */
75451 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED	UINT32_C(0x2)
75452 	/* No */
75453 		#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
75454 	/* Yes */
75455 		#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
75456 		#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_LAST CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_YES
75457 	/*
75458 	 * This field defines the TLV type value which is divided into
75459 	 * two ranges to differentiate between global and local TLV types.
75460 	 * Global TLV types must be unique across all defined TLV types.
75461 	 * Local TLV types are valid only for extensions to a given
75462 	 * HWRM message and may be repeated across different HWRM message
75463 	 * types. There is a direct correlation of each HWRM message type
75464 	 * to a single global TLV type value.
75465 	 *
75466 	 * Global TLV range: `0 - (63k-1)`
75467 	 *
75468 	 * Local TLV range: `63k - (64k-1)`
75469 	 */
75470 	uint16_t	tlv_type;
75471 	/*
75472 	 * Length of the message data encapsulated by this TLV in bytes.
75473 	 * This length does not include the size of the TLV header itself
75474 	 * and it must be an integer multiple of 8B.
75475 	 */
75476 	uint16_t	length;
75477 	uint64_t	reserved64;
75478 	/* Modify mask signifies the field that is requesting the change. */
75479 	uint64_t	modify_mask;
75480 	/*
75481 	 * Update the number of uS between generation of CNPs for
75482 	 * probabilistic marking mode.
75483 	 */
75484 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_MIN_TIME_BETWEEN_CNPS		UINT32_C(0x1)
75485 	/*
75486 	 * Update starting value of Congestion Probability (CP).
75487 	 * Maximum value supported is 1023.
75488 	 */
75489 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_INIT_CP			UINT32_C(0x2)
75490 	/* Update Target Rate (TR) Update Mode. */
75491 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_UPDATE_MODE			UINT32_C(0x4)
75492 	/* Update number of RTTs with CNPs in a row for TR update. */
75493 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_UPDATE_CYCLES		UINT32_C(0x8)
75494 	/* Update number of RTTs in Fast Recovery stage. */
75495 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_FR_NUM_RTTS			UINT32_C(0x10)
75496 	/* Update time increment to increase TR in active increase phase. */
75497 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_AI_RATE_INCREASE		UINT32_C(0x20)
75498 	/*
75499 	 * Update count of RTTs with CNPs, received after
75500 	 * the first one, to wait, before reducing rate.
75501 	 */
75502 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_REDUCTION_RELAX_RTTS_TH	UINT32_C(0x40)
75503 	/*
75504 	 * Update additional number of RTTS with CNPs, to wait,
75505 	 * before further rate reduction, for low rates.
75506 	 */
75507 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ADDITIONAL_RELAX_CR_TH		UINT32_C(0x80)
75508 	/* Update threshold for update to Actual Current Rate (CR) */
75509 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CR_MIN_TH			UINT32_C(0x100)
75510 	/* Update log based averaging weight for QPC variable actual_cr */
75511 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_BW_AVG_WEIGHT			UINT32_C(0x200)
75512 	/* Update factor used in the computation of rate reduction. */
75513 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ACTUAL_CR_FACTOR		UINT32_C(0x400)
75514 	/* Update the level of CR above which CP is set to maximum level. */
75515 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_MAX_CP_CR_TH			UINT32_C(0x800)
75516 	/* Enable adding fraction of CR to CP. */
75517 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CP_BIAS_EN			UINT32_C(0x1000)
75518 	/*
75519 	 * Update log based fraction of CR to add to CP
75520 	 * when cp_bias_en is 1.
75521 	 */
75522 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CP_BIAS			UINT32_C(0x2000)
75523 	/* Update ECN bits in a CNP packet generated by hardware. */
75524 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CNP_ECN			UINT32_C(0x4000)
75525 	/* Update enable of jitter in RTT. */
75526 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RTT_JITTER_EN			UINT32_C(0x8000)
75527 	/* Update number of bytes per usec. */
75528 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_LINK_BYTES_PER_USEC		UINT32_C(0x10000)
75529 	/*
75530 	 * Update threshold used to reset QPC CC state to its initial
75531 	 * state.
75532 	 */
75533 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RESET_CC_CR_TH			UINT32_C(0x20000)
75534 	/* Update number of valid lsbits in CR and TR */
75535 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CR_WIDTH			UINT32_C(0x40000)
75536 	/* Update lower end of random selection of quota_period. */
75537 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_MIN		UINT32_C(0x80000)
75538 	/* Update upper end of random selection of quota_period. */
75539 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_MAX		UINT32_C(0x100000)
75540 	/*
75541 	 * Update absolute maximum possible quota_period,
75542 	 * when rate table for lower 24 levels is used.
75543 	 */
75544 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_ABS_MAX		UINT32_C(0x200000)
75545 	/* Update lower bound of TR. */
75546 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_LOWER_BOUND			UINT32_C(0x400000)
75547 	/*
75548 	 * Update factor on probability threshold for adding
75549 	 * 0.5 to CR randomly.
75550 	 */
75551 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CR_PROB_FACTOR			UINT32_C(0x800000)
75552 	/*
75553 	 * Update factor on probability threshold for adding
75554 	 * 0.5 to TR randomly.
75555 	 */
75556 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_PROB_FACTOR			UINT32_C(0x1000000)
75557 	/*
75558 	 * Update threshold that ensures fairness between requester
75559 	 * and responder
75560 	 */
75561 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_FAIRNESS_CR_TH			UINT32_C(0x2000000)
75562 	/* Update log based rate reduction divider. */
75563 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RED_DIV			UINT32_C(0x4000000)
75564 	/*
75565 	 * Update threshold for rate reductions when CNPS received
75566 	 * over last RTT.
75567 	 */
75568 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CNP_RATIO_TH			UINT32_C(0x8000000)
75569 	/*
75570 	 * Update extended number of RTTS to wait,
75571 	 * when there is no congestion, to start doubling the rate.
75572 	 */
75573 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_EXP_AI_RTTS			UINT32_C(0x10000000)
75574 	/* Update log based CR to CP ratio used in exponential increase. */
75575 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_EXP_AI_CR_CP_RATIO		UINT32_C(0x20000000)
75576 	/*
75577 	 * Update threshold, in congestion free RTTs,
75578 	 * that triggers start of CP update to track CR.
75579 	 */
75580 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CP_EXP_UPDATE_TH		UINT32_C(0x40000000)
75581 	/*
75582 	 * Update threshold on congestion free RTTs above
75583 	 * which AI can increase to 16.
75584 	 */
75585 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_HIGH_EXP_AI_RTTS_TH1		UINT32_C(0x80000000)
75586 	/*
75587 	 * Update threshold on congestion free RTTs above
75588 	 * which AI can increase to 32.
75589 	 */
75590 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_HIGH_EXP_AI_RTTS_TH2		UINT32_C(0x100000000)L
75591 	/* Update use of lowest 24 rate levels rate_table. */
75592 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_USE_RATE_TABLE			UINT32_C(0x200000000)L
75593 	/*
75594 	 * Update the maximum number of 64B that can be transmitted
75595 	 * during RTT time.
75596 	 */
75597 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_LINK64B_PER_RTT		UINT32_C(0x400000000)L
75598 	/*
75599 	 * Update number of congestion free RTTs above which
75600 	 * reduction based on actual rate is enabled.
75601 	 */
75602 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ACTUAL_CR_CONG_FREE_RTTS_TH	UINT32_C(0x800000000)L
75603 	/*
75604 	 * Update threshold used in severe congestion for
75605 	 * limiting TR to 1.5 times CR.
75606 	 */
75607 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_SEVERE_CONG_CR_TH1		UINT32_C(0x1000000000)L
75608 	/*
75609 	 * Update threshold used in severe congestion for
75610 	 * limiting TR to 1.25 times CR.
75611 	 */
75612 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_SEVERE_CONG_CR_TH2		UINT32_C(0x2000000000)L
75613 	/*
75614 	 * Update number of bytes to subtract from QPC.cc_bucket
75615 	 * when an ack is scheduled.
75616 	 */
75617 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CC_ACK_BYTES			UINT32_C(0x4000000000)L
75618 	/* Update enable of reduction of CR, TR, and CP to init values. */
75619 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_REDUCE_INIT_EN			UINT32_C(0x8000000000)L
75620 	/*
75621 	 * Update threshold used for reduction of CR, TR, and CP to init
75622 	 * values.
75623 	 */
75624 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_REDUCE_INIT_CONG_FREE_RTTS_TH	UINT32_C(0x10000000000)L
75625 	/* Update enable of random no reduction of CR. */
75626 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RANDOM_NO_RED_EN		UINT32_C(0x20000000000)L
75627 	/* Update enable of coarse correction to actual CR. */
75628 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ACTUAL_CR_SHIFT_CORRECTION_EN	UINT32_C(0x40000000000)L
75629 	/* Update enable of adjustment to refill quota. */
75630 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_ADJUST_EN		UINT32_C(0x80000000000)L
75631 	/* High order bits of inactivity threshold. */
75632 	uint16_t	inactivity_th_hi;
75633 	/*
75634 	 * The number of uS between generation of CNPs when cc_mode is
75635 	 * probabilistic marking.
75636 	 */
75637 	uint16_t	min_time_between_cnps;
75638 	/*
75639 	 * The starting value of congestion probability. Input range
75640 	 * is 0 - 1023.
75641 	 */
75642 	uint16_t	init_cp;
75643 	/*
75644 	 * In tr_update_mode 0, Target Rate (TR) is updated to
75645 	 * halfway between the Current Rate (CR) before and after reduction.
75646 	 * In tr_update_mode 1, TR is updated to CR's value before reduction.
75647 	 */
75648 	uint8_t	tr_update_mode;
75649 	/*
75650 	 * Determine for how many RTTs with CNPs in a row, TR is being updated.
75651 	 * 0: TR is updated when QPC. rtts_with_cnps == 0
75652 	 * 1-6: TR is updated if QPC. rtts_with_cnps <= tr_update_cycles
75653 	 * 7: TR is updated on all reductions.
75654 	 */
75655 	uint8_t	tr_update_cycles;
75656 	/* Number of RTTs in Fast Recovery stage. */
75657 	uint8_t	fr_num_rtts;
75658 	/* Time increment to increase TR in active increase phase. */
75659 	uint8_t	ai_rate_increase;
75660 	/*
75661 	 * Indicates for how many RTTs with CNPs after the first one
75662 	 * to not reduce rate even if CNPs are received.
75663 	 */
75664 	uint16_t	reduction_relax_rtts_th;
75665 	/*
75666 	 * For low rates, additional number of RTTS with CNPs
75667 	 * for which no rate reduction is made.
75668 	 * num_bits: 14
75669 	 */
75670 	uint16_t	additional_relax_cr_th;
75671 	/*
75672 	 * If CR is less than or equal to this value,
75673 	 * then the actual CR average is set to this value
75674 	 * (shifted by bw_avg_weight).
75675 	 */
75676 	uint16_t	cr_min_th;
75677 	/* Log based averaging weight for QPC variable actual_cr_avg. */
75678 	uint8_t	bw_avg_weight;
75679 	/*
75680 	 * Used to compare CR to this factor times QPC.actual_cr_average
75681 	 * as a reduction reference. Values between 0 and 6 represent factor of
75682 	 * 1.125, 1.25, 1.5, 1.75, 2, 2.25, 2.5 respectively.
75683 	 */
75684 	uint8_t	actual_cr_factor;
75685 	/* The level of CR above which CP is set to maximum level. */
75686 	uint16_t	max_cp_cr_th;
75687 	/*
75688 	 * Enable adding fraction of CR to CP.
75689 	 * 0 for disable, 1 for enable.
75690 	 */
75691 	uint8_t	cp_bias_en;
75692 	/* Log based fraction of cr to add to CP when cp_bias_en is 1. */
75693 	uint8_t	cp_bias;
75694 	/*
75695 	 * The value of ECN bits in a CNP packet generated by hardware.
75696 	 * ECN-Capable Transport (ECT) codepoints supported include:
75697 	 * 0 for not_ect, 1 for ect_0, 2 for ect_1
75698 	 */
75699 	uint8_t	cnp_ecn;
75700 	/* Not ECN capable Transport */
75701 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_NOT_ECT UINT32_C(0x0)
75702 	/* ECN Capable Transport-1 */
75703 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_ECT_1   UINT32_C(0x1)
75704 	/* ECN Capable Transport-0 */
75705 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_ECT_0   UINT32_C(0x2)
75706 	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_LAST   CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_ECT_0
75707 	/* Enables jitter in RTT. */
75708 	uint8_t	rtt_jitter_en;
75709 	/*
75710 	 * Number of bytes per usec, dependent on port speed.
75711 	 * 200 Gbps: 25,000
75712 	 * 100 Gbps: 12,500
75713 	 * 50 Gbps: 6,250
75714 	 * 25 Gbps: 3125
75715 	 * 10 Gbps: 1250
75716 	 */
75717 	uint16_t	link_bytes_per_usec;
75718 	/*
75719 	 * If CR is greater than or equal to this threshold,
75720 	 * QPC's CC state is reset to its initial state.
75721 	 */
75722 	uint16_t	reset_cc_cr_th;
75723 	/*
75724 	 * The number of valid lsbits in CR and TR.
75725 	 * Supported values include 10 through 14 to support 2^cr_width rate.
75726 	 */
75727 	uint8_t	cr_width;
75728 	/* Lower end of random selection of quota_period. */
75729 	uint8_t	quota_period_min;
75730 	/* Upper end of random selection of quota_period. */
75731 	uint8_t	quota_period_max;
75732 	/*
75733 	 * The absolute maximum possible quota_period,
75734 	 * applicable when rate table for lower 24 levels is used.
75735 	 */
75736 	uint8_t	quota_period_abs_max;
75737 	/* TR never goes below this level. */
75738 	uint16_t	tr_lower_bound;
75739 	/* Factor on probability threshold for adding 0.5 to CR randomly. */
75740 	uint8_t	cr_prob_factor;
75741 	/* Factor on probability threshold for adding 0.5 to TR randomly. */
75742 	uint8_t	tr_prob_factor;
75743 	/*
75744 	 * Threshold to ensure fairness between requester and responder.
75745 	 * If CR is less than the fairness threshold and a quota period has
75746 	 * passed priority will be given to the path that did not last
75747 	 * transfer data.
75748 	 */
75749 	uint16_t	fairness_cr_th;
75750 	/* Log based rate reduction divider. */
75751 	uint8_t	red_div;
75752 	/* Threshold for rate reductions when CNPS received over last RTT. */
75753 	uint8_t	cnp_ratio_th;
75754 	/*
75755 	 * Extended number of RTTS to wait, when there is no congestion,
75756 	 * to start doubling the rate.
75757 	 */
75758 	uint16_t	exp_ai_rtts;
75759 	/* Log based CR to CP ratio used in exponential increase. */
75760 	uint8_t	exp_ai_cr_cp_ratio;
75761 	/* Enable use of lowest 24 rate levels rate_table. */
75762 	uint8_t	use_rate_table;
75763 	/*
75764 	 * Determines after how many congestion free RTTs to start
75765 	 * updating CP to track CR.
75766 	 */
75767 	uint16_t	cp_exp_update_th;
75768 	/*
75769 	 * The threshold on congestion free RTTs above which AI can increase
75770 	 * to 16.
75771 	 */
75772 	uint16_t	high_exp_ai_rtts_th1;
75773 	/*
75774 	 * The threshold on congestion free RTTs above which AI can increase
75775 	 * to 32.
75776 	 */
75777 	uint16_t	high_exp_ai_rtts_th2;
75778 	/*
75779 	 * The number of congestion free RTTs above which
75780 	 * reduction based on actual rate is enabled.
75781 	 */
75782 	uint16_t	actual_cr_cong_free_rtts_th;
75783 	/*
75784 	 * If rtts_with_cong is greater than 7 (severe congestion) and
75785 	 * CR level post reduction is above this threshold,
75786 	 * then TR is capped to 1.5 times CR..
75787 	 */
75788 	uint16_t	severe_cong_cr_th1;
75789 	/*
75790 	 * If rtts_with_cong is greater than 7 (severe congestion) and
75791 	 * CR level post reduction is above this threshold,
75792 	 * then TR is capped to 1.25 times CR..
75793 	 */
75794 	uint16_t	severe_cong_cr_th2;
75795 	/*
75796 	 * The maximum number of 64B that can be transmitted during RTT time,
75797 	 * including all headers and Inter Packet Gap.
75798 	 */
75799 	uint32_t	link64B_per_rtt;
75800 	/*
75801 	 * The number of bytes to subtract from QPC.cc_bucket
75802 	 * when an ack is scheduled.
75803 	 */
75804 	uint8_t	cc_ack_bytes;
75805 	/*
75806 	 * Enables reduction of CR, TR, and CP to init values when
75807 	 * congestion free RTTs is greater than reduce2_init_cong_free_rtts_th.
75808 	 */
75809 	uint8_t	reduce_init_en;
75810 	/*
75811 	 * Minimum threshold value for number of congestion free RTTs before
75812 	 * reducing to init values for CR, TR, and CP when reduce_init_en is
75813 	 * enabled.
75814 	 */
75815 	uint16_t	reduce_init_cong_free_rtts_th;
75816 	/* Enables random no reduction of CR. */
75817 	uint8_t	random_no_red_en;
75818 	/*
75819 	 * Enables coarse correction to actual CR when actual RTT is longer
75820 	 * than nominal.
75821 	 */
75822 	uint8_t	actual_cr_shift_correction_en;
75823 	/* Enables adjustment to refill quota. */
75824 	uint8_t	quota_period_adjust_en;
75825 	uint8_t	reserved[5];
75826 } cmdq_modify_roce_cc_gen1_tlv_t, *pcmdq_modify_roce_cc_gen1_tlv_t;
75827 
75828 /* cmdq_modify_roce_cc_gen2_tlv (size:256b/32B) */
75829 
75830 typedef struct cmdq_modify_roce_cc_gen2_tlv {
75831 	/*
75832 	 * The command discriminator is used to differentiate between various
75833 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
75834 	 * command messages as well as newer TLV encapsulated HWRM commands.
75835 	 *
75836 	 * For TLV encapsulated messages this field must be 0x8000.
75837 	 */
75838 	uint16_t	cmd_discr;
75839 	uint8_t	reserved_8b;
75840 	uint8_t	tlv_flags;
75841 	/*
75842 	 * Indicates the presence of additional TLV encapsulated data
75843 	 * follows this TLV.
75844 	 */
75845 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_MORE	UINT32_C(0x1)
75846 	/* Last TLV in a sequence of TLVs. */
75847 		#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_MORE_LAST	UINT32_C(0x0)
75848 	/* More TLVs follow this TLV. */
75849 		#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
75850 	/*
75851 	 * When an HWRM receiver detects a TLV type that it does not
75852 	 * support with the TLV required flag set, the receiver must
75853 	 * reject the HWRM message with an error code indicating an
75854 	 * unsupported TLV type.
75855 	 */
75856 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_REQUIRED	UINT32_C(0x2)
75857 	/* No */
75858 		#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_REQUIRED_NO	(UINT32_C(0x0) << 1)
75859 	/* Yes */
75860 		#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
75861 		#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_REQUIRED_LAST CMDQ_MODIFY_ROCE_CC_GEN2_TLV_TLV_FLAGS_REQUIRED_YES
75862 	/*
75863 	 * This field defines the TLV type value which is divided into
75864 	 * two ranges to differentiate between global and local TLV types.
75865 	 * Global TLV types must be unique across all defined TLV types.
75866 	 * Local TLV types are valid only for extensions to a given
75867 	 * HWRM message and may be repeated across different HWRM message
75868 	 * types. There is a direct correlation of each HWRM message type
75869 	 * to a single global TLV type value.
75870 	 *
75871 	 * Global TLV range: `0 - (63k-1)`
75872 	 *
75873 	 * Local TLV range: `63k - (64k-1)`
75874 	 */
75875 	uint16_t	tlv_type;
75876 	/*
75877 	 * Length of the message data encapsulated by this TLV in bytes.
75878 	 * This length does not include the size of the TLV header itself
75879 	 * and it must be an integer multiple of 8B.
75880 	 */
75881 	uint16_t	length;
75882 	uint64_t	reserved64;
75883 	/* Modify mask signifies the field that is requesting the change. */
75884 	uint64_t	modify_mask;
75885 	/*
75886 	 * Modify the specific DCN queue level table index data.
75887 	 * This must be set, to select the table index that needs an
75888 	 * update.
75889 	 */
75890 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_MODIFY_MASK_DCN_QLEVEL_TBL_IDX	UINT32_C(0x1)
75891 	/* Modify the DCN queue level threshold. */
75892 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_MODIFY_MASK_DCN_QLEVEL_TBL_THR	UINT32_C(0x2)
75893 	/* Modify DCN queue level current rate. */
75894 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_MODIFY_MASK_DCN_QLEVEL_TBL_CR	UINT32_C(0x4)
75895 	/* Modify DCN queue level increment CNP count. */
75896 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_MODIFY_MASK_DCN_QLEVEL_TBL_INC_CNP	UINT32_C(0x8)
75897 	/* Modify DCN queue level update current & target rate immediately. */
75898 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_MODIFY_MASK_DCN_QLEVEL_TBL_UPD_IMM	UINT32_C(0x10)
75899 	/* Modify DCN queue level target rate. */
75900 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_MODIFY_MASK_DCN_QLEVEL_TBL_TR	UINT32_C(0x20)
75901 	/* DCN queue level table index. Valid values are from 0 to 7. */
75902 	uint8_t	dcn_qlevel_tbl_idx;
75903 	uint8_t	reserved8;
75904 	/*
75905 	 * DCN queue level threshold value associated with a DCN queue
75906 	 * level table index.
75907 	 */
75908 	uint16_t	dcn_qlevel_tbl_thr;
75909 	/*
75910 	 * DCN queue level table action.
75911 	 * Updates CR, INC_CNP, UPD_IMM & TR fields associated with the
75912 	 * DCN queue level table index.
75913 	 */
75914 	uint32_t	dcn_qlevel_tbl_act;
75915 	/* DCN queue level current rate. */
75916 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_DCN_QLEVEL_TBL_ACT_CR_MASK	UINT32_C(0x3fff)
75917 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_DCN_QLEVEL_TBL_ACT_CR_SFT	0
75918 	/* DCN queue level increment CNP count. */
75919 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_DCN_QLEVEL_TBL_ACT_INC_CNP	UINT32_C(0x4000)
75920 	/* DCN queue level update CR and TR immediately. */
75921 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_DCN_QLEVEL_TBL_ACT_UPD_IMM	UINT32_C(0x8000)
75922 	/* DCN queue level target rate */
75923 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_DCN_QLEVEL_TBL_ACT_TR_MASK	UINT32_C(0x3fff0000)
75924 	#define CMDQ_MODIFY_ROCE_CC_GEN2_TLV_DCN_QLEVEL_TBL_ACT_TR_SFT	16
75925 } cmdq_modify_roce_cc_gen2_tlv_t, *pcmdq_modify_roce_cc_gen2_tlv_t;
75926 
75927 /* creq_modify_roce_cc_resp (size:128b/16B) */
75928 
75929 typedef struct creq_modify_roce_cc_resp {
75930 	uint8_t	type;
75931 	/*
75932 	 * This field indicates the exact type of the completion.
75933 	 * By convention, the LSB identifies the length of the
75934 	 * record in 16B units. Even values indicate 16B
75935 	 * records. Odd values indicate 32B
75936 	 * records.
75937 	 */
75938 	#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_MASK	UINT32_C(0x3f)
75939 	#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_SFT	0
75940 	/* QP Async Notification */
75941 		#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
75942 		#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_LAST	CREQ_MODIFY_ROCE_CC_RESP_TYPE_QP_EVENT
75943 	/* Status of the response. */
75944 	uint8_t	status;
75945 	/* Driver supplied handle to associate the command and the response. */
75946 	uint16_t	cookie;
75947 	uint32_t	reserved32;
75948 	uint8_t	v;
75949 	/*
75950 	 * This value is written by the NIC such that it will be different
75951 	 * for each pass through the completion queue. The even passes
75952 	 * will write 1. The odd passes will write 0.
75953 	 */
75954 	#define CREQ_MODIFY_ROCE_CC_RESP_V	UINT32_C(0x1)
75955 	/* Event or command opcode. */
75956 	uint8_t	event;
75957 	/* Modify congestion control response. */
75958 	#define CREQ_MODIFY_ROCE_CC_RESP_EVENT_MODIFY_ROCE_CC UINT32_C(0x8c)
75959 	#define CREQ_MODIFY_ROCE_CC_RESP_EVENT_LAST	CREQ_MODIFY_ROCE_CC_RESP_EVENT_MODIFY_ROCE_CC
75960 	uint8_t	reserved48[6];
75961 } creq_modify_roce_cc_resp_t, *pcreq_modify_roce_cc_resp_t;
75962 
75963 /******************************
75964  * cmdq_set_link_aggr_mode_cc *
75965  ******************************/
75966 
75967 
75968 /* cmdq_set_link_aggr_mode_cc (size:320b/40B) */
75969 
75970 typedef struct cmdq_set_link_aggr_mode_cc {
75971 	/* Command opcode. */
75972 	uint8_t	opcode;
75973 	/* Set LAG mode. */
75974 	#define CMDQ_SET_LINK_AGGR_MODE_OPCODE_SET_LINK_AGGR_MODE UINT32_C(0x8f)
75975 	#define CMDQ_SET_LINK_AGGR_MODE_OPCODE_LAST		CMDQ_SET_LINK_AGGR_MODE_OPCODE_SET_LINK_AGGR_MODE
75976 	/* Size of the command in 16-byte units. */
75977 	uint8_t	cmd_size;
75978 	/* Flags and attribs of the command. */
75979 	uint16_t	flags;
75980 	/* Driver supplied handle to associate the command and the response. */
75981 	uint16_t	cookie;
75982 	/* Size of the response buffer in 16-byte units. */
75983 	uint8_t	resp_size;
75984 	uint8_t	reserved8;
75985 	/* Host address of the response. */
75986 	uint64_t	resp_addr;
75987 	/* Modify mask signifies the field that is requesting the change. */
75988 	uint32_t	modify_mask;
75989 	/* Enable Link aggregation. */
75990 	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_AGGR_EN		UINT32_C(0x1)
75991 	/* Bitmap of ports that are eligible to transmit RoCE traffic. */
75992 	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_ACTIVE_PORT_MAP	UINT32_C(0x2)
75993 	/* Bitmap of ports that are members of the RoCE LAG. */
75994 	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_MEMBER_PORT_MAP	UINT32_C(0x4)
75995 	/* Link aggregation mode being used. */
75996 	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_AGGR_MODE	UINT32_C(0x8)
75997 	/* Stat context ID for all the ports. */
75998 	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_STAT_CTX_ID	UINT32_C(0x10)
75999 	uint8_t	aggr_enable;
76000 	/* Enable Link aggregation. */
76001 	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_ENABLE	UINT32_C(0x1)
76002 	/* rsvd1 is 7 b */
76003 	#define CMDQ_SET_LINK_AGGR_MODE_RSVD1_MASK	UINT32_C(0xfe)
76004 	#define CMDQ_SET_LINK_AGGR_MODE_RSVD1_SFT	1
76005 	uint8_t	active_port_map;
76006 	/* Bitmap of ports that are eligible to transmit RoCE traffic. */
76007 	#define CMDQ_SET_LINK_AGGR_MODE_ACTIVE_PORT_MAP_MASK UINT32_C(0xf)
76008 	#define CMDQ_SET_LINK_AGGR_MODE_ACTIVE_PORT_MAP_SFT 0
76009 	/* rsvd2 is 4 b */
76010 	#define CMDQ_SET_LINK_AGGR_MODE_RSVD2_MASK	UINT32_C(0xf0)
76011 	#define CMDQ_SET_LINK_AGGR_MODE_RSVD2_SFT	4
76012 	/* Bitmap of ports that are members of the RoCE LAG. */
76013 	uint8_t	member_port_map;
76014 	/* Link aggregation mode being used. */
76015 	uint8_t	link_aggr_mode;
76016 	/* active active mode. */
76017 	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_ACTIVE_ACTIVE UINT32_C(0x1)
76018 	/* active backup mode. */
76019 	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_ACTIVE_BACKUP UINT32_C(0x2)
76020 	/* Balance XOR mode. */
76021 	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_BALANCE_XOR   UINT32_C(0x3)
76022 	/* 802.3AD mode. */
76023 	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_802_3_AD	UINT32_C(0x4)
76024 	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_LAST	CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_802_3_AD
76025 	/* Stat context IDs for all 4 ports. */
76026 	uint16_t	stat_ctx_id[4];
76027 	uint64_t	rsvd1;
76028 } cmdq_set_link_aggr_mode_cc_t, *pcmdq_set_link_aggr_mode_cc_t;
76029 
76030 /* creq_set_link_aggr_mode_resources_resp (size:128b/16B) */
76031 
76032 typedef struct creq_set_link_aggr_mode_resources_resp {
76033 	uint8_t	type;
76034 	/*
76035 	 * This field indicates the exact type of the completion.
76036 	 * By convention, the LSB identifies the length of the
76037 	 * record in 16B units. Even values indicate 16B
76038 	 * records. Odd values indicate 32B
76039 	 * records.
76040 	 */
76041 	#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_MASK	UINT32_C(0x3f)
76042 	#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_SFT	0
76043 	/* QP Async Notification */
76044 		#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
76045 		#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_LAST	CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_QP_EVENT
76046 	/* Status of the response. */
76047 	uint8_t	status;
76048 	/* Driver supplied handle to associate the command and the response. */
76049 	uint16_t	cookie;
76050 	uint32_t	reserved32;
76051 	uint8_t	v;
76052 	/*
76053 	 * This value is written by the NIC such that it will be different
76054 	 * for each pass through the completion queue. The even passes
76055 	 * will write 1. The odd passes will write 0.
76056 	 */
76057 	#define CREQ_SET_LINK_AGGR_MODE_RESP_V	UINT32_C(0x1)
76058 	/* Event or command opcode. */
76059 	uint8_t	event;
76060 	/* Set LAG mode. */
76061 	#define CREQ_SET_LINK_AGGR_MODE_RESP_EVENT_SET_LINK_AGGR_MODE UINT32_C(0x8f)
76062 	#define CREQ_SET_LINK_AGGR_MODE_RESP_EVENT_LAST		CREQ_SET_LINK_AGGR_MODE_RESP_EVENT_SET_LINK_AGGR_MODE
76063 	uint8_t	reserved48[6];
76064 } creq_set_link_aggr_mode_resources_resp_t, *pcreq_set_link_aggr_mode_resources_resp_t;
76065 
76066 /* Send a request from VF to pass a command to the PF. VF HSI is suspended. */
76067 /* cmdq_vf_backchannel_request (size:256b/32B) */
76068 
76069 typedef struct cmdq_vf_backchannel_request {
76070 	/* Command opcode. */
76071 	uint8_t	opcode;
76072 	/*
76073 	 * Send a request from VF to pass a command to the PF. VF HSI is
76074 	 * suspended until the PF returns the response.
76075 	 */
76076 	#define CMDQ_VF_BACKCHANNEL_REQUEST_OPCODE_VF_BACKCHANNEL_REQUEST UINT32_C(0x86)
76077 	#define CMDQ_VF_BACKCHANNEL_REQUEST_OPCODE_LAST		CMDQ_VF_BACKCHANNEL_REQUEST_OPCODE_VF_BACKCHANNEL_REQUEST
76078 	/* Size of the command in 16-byte units. */
76079 	uint8_t	cmd_size;
76080 	/* Flags and attribs of the command. */
76081 	uint16_t	flags;
76082 	/* Driver supplied handle to associate the command and the response. */
76083 	uint16_t	cookie;
76084 	/* Size of the response buffer in 16-byte units. */
76085 	uint8_t	resp_size;
76086 	uint8_t	reserved8;
76087 	/* Host address of the response. */
76088 	uint64_t	resp_addr;
76089 	/* Address of command request structure in VF space */
76090 	uint64_t	command_addr;
76091 	/*
76092 	 * Command request length (up to 4K). An optional address of the extended
76093 	 * response buffer should be provided in the request.
76094 	 */
76095 	uint16_t	command_length;
76096 	uint8_t	unused_0[6];
76097 } cmdq_vf_backchannel_request_t, *pcmdq_vf_backchannel_request_t;
76098 
76099 /* Read VF memory (primarily to get the backchannel request blob). */
76100 /* cmdq_read_vf_memory (size:256b/32B) */
76101 
76102 typedef struct cmdq_read_vf_memory {
76103 	/* Command opcode. */
76104 	uint8_t	opcode;
76105 	/*
76106 	 * Read VF memory (primarily to get the backchannel request blob). Can
76107 	 * only be issued from a PF.
76108 	 */
76109 	#define CMDQ_READ_VF_MEMORY_OPCODE_READ_VF_MEMORY UINT32_C(0x87)
76110 	#define CMDQ_READ_VF_MEMORY_OPCODE_LAST	CMDQ_READ_VF_MEMORY_OPCODE_READ_VF_MEMORY
76111 	/* Size of the command in 16-byte units. */
76112 	uint8_t	cmd_size;
76113 	/* Flags and attribs of the command. */
76114 	uint16_t	flags;
76115 	/* Driver supplied handle to associate the command and the response. */
76116 	uint16_t	cookie;
76117 	/* Size of the response buffer in 16-byte units. */
76118 	uint8_t	resp_size;
76119 	uint8_t	reserved8;
76120 	/* Host address of the response. */
76121 	uint64_t	resp_addr;
76122 	/* Address of memory in VF space to read */
76123 	uint64_t	addr;
76124 	/* VF id, as provided in 0xC0 VF request notification */
76125 	uint16_t	vf_id;
76126 	/* Length to read, up to 4K */
76127 	uint16_t	length;
76128 	uint32_t	unused_0;
76129 } cmdq_read_vf_memory_t, *pcmdq_read_vf_memory_t;
76130 
76131 /* Write VF memory (primarily to put the backchannel response blob). */
76132 /* cmdq_complete_vf_request (size:320b/40B) */
76133 
76134 typedef struct cmdq_complete_vf_request {
76135 	/* Command opcode. */
76136 	uint8_t	opcode;
76137 	/*
76138 	 * Write VF memory (primarily to put the backchannel response blob),
76139 	 * and reenable VF HSI (post a CAG completion to it). Can only be
76140 	 * issued from a PF.
76141 	 */
76142 	#define CMDQ_COMPLETE_VF_REQUEST_OPCODE_COMPLETE_VF_REQUEST UINT32_C(0x88)
76143 	#define CMDQ_COMPLETE_VF_REQUEST_OPCODE_LAST		CMDQ_COMPLETE_VF_REQUEST_OPCODE_COMPLETE_VF_REQUEST
76144 	/* Size of the command in 16-byte units. */
76145 	uint8_t	cmd_size;
76146 	/* Flags and attribs of the command. */
76147 	uint16_t	flags;
76148 	/* Driver supplied handle to associate the command and the response. */
76149 	uint16_t	cookie;
76150 	/* Size of the response buffer in 16-byte units. */
76151 	uint8_t	resp_size;
76152 	uint8_t	reserved8;
76153 	/* Host address of the response. */
76154 	uint64_t	resp_addr;
76155 	/*
76156 	 * Optional address of extended response in VF space to write. Length is
76157 	 * in resp_size in 16 byte units.
76158 	 */
76159 	uint64_t	addr;
76160 	/* Completion misc field to VF CREQ */
76161 	uint32_t	vf_misc;
76162 	/* VF id, as provided in 0xC0 VF request notification */
76163 	uint16_t	vf_id;
76164 	/* Completion cookie for the VF command, goes to VF CREQ */
76165 	uint16_t	vf_cookie;
76166 	/* Completion status for the VF command, goes to VF CREQ */
76167 	uint8_t	vf_status;
76168 	uint8_t	unused_0[3];
76169 	uint32_t	unused_1;
76170 } cmdq_complete_vf_request_t, *pcmdq_complete_vf_request_t;
76171 
76172 /*****************************
76173  * orchestrate_qid_migration *
76174  *****************************/
76175 
76176 
76177 /* cmdq_orchestrate_qid_migration (size:256b/32B) */
76178 
76179 typedef struct cmdq_orchestrate_qid_migration {
76180 	/* Command opcode. */
76181 	uint8_t	opcode;
76182 	/*
76183 	 * This command updates the QP context id ranges on the PF,
76184 	 * to orchestrate QP context id range migration for devices that
76185 	 * support the pseudo-static QP allocation feature.
76186 	 */
76187 	#define CMDQ_ORCHESTRATE_QID_MIGRATION_OPCODE_ORCHESTRATE_QID_MIGRATION UINT32_C(0x93)
76188 	#define CMDQ_ORCHESTRATE_QID_MIGRATION_OPCODE_LAST			CMDQ_ORCHESTRATE_QID_MIGRATION_OPCODE_ORCHESTRATE_QID_MIGRATION
76189 	/* Size of the command in 16-byte units. */
76190 	uint8_t	cmd_size;
76191 	/* Flags and attribs of the command. */
76192 	uint16_t	flags;
76193 	/* Driver supplied handle to associate the command and the response. */
76194 	uint16_t	cookie;
76195 	/* Size of the response buffer in 16-byte units. */
76196 	uint8_t	resp_size;
76197 	uint8_t	reserved8;
76198 	/* Host address of the response. */
76199 	uint64_t	resp_addr;
76200 	uint8_t	qid_migration_flags;
76201 	/* Flags to orchestrate QP context ID range migration amongst PFs. */
76202 	#define CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_MASK			UINT32_C(0xf)
76203 	#define CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_SFT			0
76204 	/* Enable the PF's native QP context ID range. */
76205 		#define CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_ENABLE_NATIVE_QID_RANGE	UINT32_C(0x0)
76206 	/* Enable the PF's extended QP context ID range. */
76207 		#define CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_ENABLE_EXTENDED_QID_RANGE   UINT32_C(0x1)
76208 	/* Disable the PF's native QP context ID range. */
76209 		#define CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_DISABLE_NATIVE_QID_RANGE	UINT32_C(0x2)
76210 	/* Disable the PF's extended QP context ID range. */
76211 		#define CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_DISABLE_EXTENDED_QID_RANGE  UINT32_C(0x3)
76212 		#define CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_LAST			CMDQ_ORCHESTRATE_QID_MIGRATION_QID_MIGRATION_FLAGS_DISABLE_EXTENDED_QID_RANGE
76213 	/* unused4 is 4 b */
76214 	#define CMDQ_ORCHESTRATE_QID_MIGRATION_UNUSED4_MASK				UINT32_C(0xf0)
76215 	#define CMDQ_ORCHESTRATE_QID_MIGRATION_UNUSED4_SFT				4
76216 	uint8_t	reserved56[7];
76217 	/* reserved64 is 64 b */
76218 	uint64_t	reserved64;
76219 } cmdq_orchestrate_qid_migration_t, *pcmdq_orchestrate_qid_migration_t;
76220 
76221 /* creq_orchestrate_qid_migration_resp (size:128b/16B) */
76222 
76223 typedef struct creq_orchestrate_qid_migration_resp {
76224 	uint8_t	type;
76225 	/*
76226 	 * This field indicates the exact type of the completion.
76227 	 * By convention, the LSB identifies the length of the
76228 	 * record in 16B units. Even values indicate 16B
76229 	 * records. Odd values indicate 32B
76230 	 * records.
76231 	 */
76232 	#define CREQ_ORCHESTRATE_QID_MIGRATION_RESP_TYPE_MASK	UINT32_C(0x3f)
76233 	#define CREQ_ORCHESTRATE_QID_MIGRATION_RESP_TYPE_SFT	0
76234 	/* QP Async Notification */
76235 		#define CREQ_ORCHESTRATE_QID_MIGRATION_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
76236 		#define CREQ_ORCHESTRATE_QID_MIGRATION_RESP_TYPE_LAST	CREQ_ORCHESTRATE_QID_MIGRATION_RESP_TYPE_QP_EVENT
76237 	/* Status of the response. */
76238 	uint8_t	status;
76239 	/* Driver supplied handle to associate the command and the response. */
76240 	uint16_t	cookie;
76241 	uint32_t	reserved32;
76242 	uint8_t	v;
76243 	/*
76244 	 * This value is written by the NIC such that it will be different
76245 	 * for each pass through the completion queue. The even passes
76246 	 * will write 1. The odd passes will write 0.
76247 	 */
76248 	#define CREQ_ORCHESTRATE_QID_MIGRATION_RESP_V	UINT32_C(0x1)
76249 	/* Event or command opcode. */
76250 	uint8_t	event;
76251 	/* Orchestrate QPID migration command response. */
76252 	#define CREQ_ORCHESTRATE_QID_MIGRATION_RESP_EVENT_ORCHESTRATE_QID_MIGRATION UINT32_C(0x93)
76253 	#define CREQ_ORCHESTRATE_QID_MIGRATION_RESP_EVENT_LAST			CREQ_ORCHESTRATE_QID_MIGRATION_RESP_EVENT_ORCHESTRATE_QID_MIGRATION
76254 	uint8_t	reserved48[6];
76255 } creq_orchestrate_qid_migration_resp_t, *pcreq_orchestrate_qid_migration_resp_t;
76256 
76257 /*******************
76258  * create_qp_batch *
76259  *******************/
76260 
76261 
76262 /* cmdq_create_qp_batch (size:384b/48B) */
76263 
76264 typedef struct cmdq_create_qp_batch {
76265 	/* Command opcode. */
76266 	uint8_t	opcode;
76267 	/* This command allocates a batch of QPs in a sequential range. */
76268 	#define CMDQ_CREATE_QP_BATCH_OPCODE_CREATE_QP_BATCH UINT32_C(0x94)
76269 	#define CMDQ_CREATE_QP_BATCH_OPCODE_LAST	CMDQ_CREATE_QP_BATCH_OPCODE_CREATE_QP_BATCH
76270 	/* Size of the command in 16-byte units. */
76271 	uint8_t	cmd_size;
76272 	/* Flags and attribs of the command. */
76273 	uint16_t	flags;
76274 	/* Driver supplied handle to associate the command and the response. */
76275 	uint16_t	cookie;
76276 	/* Size of the response buffer in 16-byte units. */
76277 	uint8_t	resp_size;
76278 	uint8_t	reserved8;
76279 	/* Host address of the response. */
76280 	uint64_t	resp_addr;
76281 	/* Starting QP context id to be used for the sequential range. */
76282 	uint32_t	start_xid;
76283 	/* Count of QPs to be allocated */
76284 	uint32_t	count;
76285 	/* Size of an individual element of the qp_params_array. */
76286 	uint32_t	per_qp_param_size;
76287 	uint32_t	reserved32;
76288 	/*
76289 	 * Host DMA address of the array of per-QP parameters.
76290 	 * Per-QP parameters are identical to those of the
76291 	 * `create_qp` command and specified by the
76292 	 * `create_qp_batch_data` structure.
76293 	 */
76294 	uint64_t	qp_params_array;
76295 	/* reserved64 is 64 b */
76296 	uint64_t	reserved64;
76297 } cmdq_create_qp_batch_t, *pcmdq_create_qp_batch_t;
76298 
76299 /* creq_create_qp_batch_resp (size:128b/16B) */
76300 
76301 typedef struct creq_create_qp_batch_resp {
76302 	uint8_t	type;
76303 	/*
76304 	 * This field indicates the exact type of the completion.
76305 	 * By convention, the LSB identifies the length of the
76306 	 * record in 16B units. Even values indicate 16B
76307 	 * records. Odd values indicate 32B
76308 	 * records.
76309 	 */
76310 	#define CREQ_CREATE_QP_BATCH_RESP_TYPE_MASK	UINT32_C(0x3f)
76311 	#define CREQ_CREATE_QP_BATCH_RESP_TYPE_SFT	0
76312 	/* QP Async Notification */
76313 		#define CREQ_CREATE_QP_BATCH_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
76314 		#define CREQ_CREATE_QP_BATCH_RESP_TYPE_LAST	CREQ_CREATE_QP_BATCH_RESP_TYPE_QP_EVENT
76315 	/* Status of the response. */
76316 	uint8_t	status;
76317 	/* Driver supplied handle to associate the command and the response. */
76318 	uint16_t	cookie;
76319 	uint32_t	reserved32;
76320 	uint8_t	v;
76321 	/*
76322 	 * This value is written by the NIC such that it will be different
76323 	 * for each pass through the completion queue. The even passes
76324 	 * will write 1. The odd passes will write 0.
76325 	 */
76326 	#define CREQ_CREATE_QP_BATCH_RESP_V	UINT32_C(0x1)
76327 	/* Event or command opcode. */
76328 	uint8_t	event;
76329 	/* Create batch QPs command response. */
76330 	#define CREQ_CREATE_QP_BATCH_RESP_EVENT_CREATE_QP_BATCH UINT32_C(0x94)
76331 	#define CREQ_CREATE_QP_BATCH_RESP_EVENT_LAST	CREQ_CREATE_QP_BATCH_RESP_EVENT_CREATE_QP_BATCH
76332 	uint16_t	reserved16;
76333 	/* Count of QPs successfully created. */
76334 	uint32_t	count;
76335 } creq_create_qp_batch_resp_t, *pcreq_create_qp_batch_resp_t;
76336 
76337 /********************
76338  * destroy_qp_batch *
76339  ********************/
76340 
76341 
76342 /* cmdq_destroy_qp_batch (size:256b/32B) */
76343 
76344 typedef struct cmdq_destroy_qp_batch {
76345 	/* Command opcode. */
76346 	uint8_t	opcode;
76347 	/*
76348 	 * This command deletes the batch of requested count of QPs.
76349 	 * The starting QP ID can be specified to request a batch deletion
76350 	 * of a sequential range.
76351 	 */
76352 	#define CMDQ_DESTROY_QP_BATCH_OPCODE_DESTROY_QP_BATCH UINT32_C(0x95)
76353 	#define CMDQ_DESTROY_QP_BATCH_OPCODE_LAST		CMDQ_DESTROY_QP_BATCH_OPCODE_DESTROY_QP_BATCH
76354 	/* Size of the command in 16-byte units. */
76355 	uint8_t	cmd_size;
76356 	/* Flags and attribs of the command. */
76357 	uint16_t	flags;
76358 	/* Driver supplied handle to associate the command and the response. */
76359 	uint16_t	cookie;
76360 	/* Size of the response buffer in 16-byte units. */
76361 	uint8_t	resp_size;
76362 	uint8_t	reserved8;
76363 	/* Host address of the response. */
76364 	uint64_t	resp_addr;
76365 	/* Starting QP context id to be used for the sequential range. */
76366 	uint32_t	start_xid;
76367 	/*
76368 	 * Count of QPs to be deleted. A value of zero implies all QPs
76369 	 * are to be deleted.
76370 	 */
76371 	uint32_t	count;
76372 	/* reserved64 is 64 b */
76373 	uint64_t	reserved64;
76374 } cmdq_destroy_qp_batch_t, *pcmdq_destroy_qp_batch_t;
76375 
76376 /* creq_destroy_qp_batch_resp (size:128b/16B) */
76377 
76378 typedef struct creq_destroy_qp_batch_resp {
76379 	uint8_t	type;
76380 	/*
76381 	 * This field indicates the exact type of the completion.
76382 	 * By convention, the LSB identifies the length of the
76383 	 * record in 16B units. Even values indicate 16B
76384 	 * records. Odd values indicate 32B
76385 	 * records.
76386 	 */
76387 	#define CREQ_DESTROY_QP_BATCH_RESP_TYPE_MASK	UINT32_C(0x3f)
76388 	#define CREQ_DESTROY_QP_BATCH_RESP_TYPE_SFT	0
76389 	/* QP Async Notification */
76390 		#define CREQ_DESTROY_QP_BATCH_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
76391 		#define CREQ_DESTROY_QP_BATCH_RESP_TYPE_LAST	CREQ_DESTROY_QP_BATCH_RESP_TYPE_QP_EVENT
76392 	/* Status of the response. */
76393 	uint8_t	status;
76394 	/* Driver supplied handle to associate the command and the response. */
76395 	uint16_t	cookie;
76396 	uint32_t	reserved32;
76397 	uint8_t	v;
76398 	/*
76399 	 * This value is written by the NIC such that it will be different
76400 	 * for each pass through the completion queue. The even passes
76401 	 * will write 1. The odd passes will write 0.
76402 	 */
76403 	#define CREQ_DESTROY_QP_BATCH_RESP_V	UINT32_C(0x1)
76404 	/* Event or command opcode. */
76405 	uint8_t	event;
76406 	/* Destroy batch QPs command response. */
76407 	#define CREQ_DESTROY_QP_BATCH_RESP_EVENT_DESTROY_QP_BATCH UINT32_C(0x95)
76408 	#define CREQ_DESTROY_QP_BATCH_RESP_EVENT_LAST		CREQ_DESTROY_QP_BATCH_RESP_EVENT_DESTROY_QP_BATCH
76409 	uint16_t	reserved16;
76410 	/* Count of QPs successfully destroyed. */
76411 	uint32_t	count;
76412 } creq_destroy_qp_batch_resp_t, *pcreq_destroy_qp_batch_resp_t;
76413 
76414 /*******************************
76415  * allocate_roce_stats_ext_ctx *
76416  *******************************/
76417 
76418 
76419 /* cmdq_allocate_roce_stats_ext_ctx (size:256b/32B) */
76420 
76421 typedef struct cmdq_allocate_roce_stats_ext_ctx {
76422 	/* Command opcode. */
76423 	uint8_t	opcode;
76424 	/*
76425 	 * This command allocates an extended RoCE statistics context
76426 	 * that supports periodic DMA to a host address. The extended
76427 	 * statistics context id can be assigned by the driver,
76428 	 * via `create_qp`, `create_qp_batch` or `modify_qp` to a
76429 	 * specific QP, a subset of QPs or to all QPs of a specific function.
76430 	 * These statistics can be queried via `query_roce_stats_ext_v2`.
76431 	 */
76432 	#define CMDQ_ALLOCATE_ROCE_STATS_EXT_CTX_OPCODE_ALLOCATE_ROCE_STATS_EXT_CTX UINT32_C(0x96)
76433 	#define CMDQ_ALLOCATE_ROCE_STATS_EXT_CTX_OPCODE_LAST			CMDQ_ALLOCATE_ROCE_STATS_EXT_CTX_OPCODE_ALLOCATE_ROCE_STATS_EXT_CTX
76434 	/* Size of the command in 16-byte units. */
76435 	uint8_t	cmd_size;
76436 	/* Flags and attribs of the command. */
76437 	uint16_t	flags;
76438 	/* Driver supplied handle to associate the command and the response. */
76439 	uint16_t	cookie;
76440 	/* Size of the response buffer in 16-byte units. */
76441 	uint8_t	resp_size;
76442 	uint8_t	reserved8;
76443 	/* Host address of the response. */
76444 	uint64_t	resp_addr;
76445 	/*
76446 	 * This is the address to be programmed in the statistic block
76447 	 * by the firmware to support periodic DMA of the statistics.
76448 	 */
76449 	uint64_t	stats_dma_addr;
76450 	/*
76451 	 * The statistic block update period in ms.
76452 	 * e.g. 250ms, 500ms, 750ms, 1000ms.
76453 	 * If update_period_ms is 0, then the stats update
76454 	 * shall be never done and the DMA address shall not be used.
76455 	 * In this case, the statistics can only be read by
76456 	 * `query_roce_stats_ext_v2` command.
76457 	 */
76458 	uint32_t	update_period_ms;
76459 	/* Steering tag to use for memory transactions. */
76460 	uint16_t	steering_tag;
76461 	uint16_t	reserved16;
76462 } cmdq_allocate_roce_stats_ext_ctx_t, *pcmdq_allocate_roce_stats_ext_ctx_t;
76463 
76464 /* creq_allocate_roce_stats_ext_ctx_resp (size:128b/16B) */
76465 
76466 typedef struct creq_allocate_roce_stats_ext_ctx_resp {
76467 	uint8_t	type;
76468 	/*
76469 	 * This field indicates the exact type of the completion.
76470 	 * By convention, the LSB identifies the length of the
76471 	 * record in 16B units. Even values indicate 16B
76472 	 * records. Odd values indicate 32B
76473 	 * records.
76474 	 */
76475 	#define CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_MASK	UINT32_C(0x3f)
76476 	#define CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_SFT	0
76477 	/* QP Async Notification */
76478 		#define CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
76479 		#define CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_LAST	CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_QP_EVENT
76480 	/* Status of the response. */
76481 	uint8_t	status;
76482 	/* Driver supplied handle to associate the command and the response. */
76483 	uint16_t	cookie;
76484 	/* Extended RoCE statistics context id. */
76485 	uint32_t	roce_stats_ext_xid;
76486 	uint8_t	v;
76487 	/*
76488 	 * This value is written by the NIC such that it will be different
76489 	 * for each pass through the completion queue. The even passes
76490 	 * will write 1. The odd passes will write 0.
76491 	 */
76492 	#define CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_V	UINT32_C(0x1)
76493 	/* Event or command opcode. */
76494 	uint8_t	event;
76495 	/* Allocate extended RoCE statistics context command response. */
76496 	#define CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_EVENT_ALLOCATE_ROCE_STATS_EXT_CTX UINT32_C(0x96)
76497 	#define CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_EVENT_LAST			CREQ_ALLOCATE_ROCE_STATS_EXT_CTX_RESP_EVENT_ALLOCATE_ROCE_STATS_EXT_CTX
76498 	uint8_t	reserved48[6];
76499 } creq_allocate_roce_stats_ext_ctx_resp_t, *pcreq_allocate_roce_stats_ext_ctx_resp_t;
76500 
76501 /*********************************
76502  * deallocate_roce_stats_ext_ctx *
76503  *********************************/
76504 
76505 
76506 /* cmdq_deallocate_roce_stats_ext_ctx (size:256b/32B) */
76507 
76508 typedef struct cmdq_deallocate_roce_stats_ext_ctx {
76509 	/* Command opcode. */
76510 	uint8_t	opcode;
76511 	/* This command deallocates an extended RoCE statistics context. */
76512 	#define CMDQ_DEALLOCATE_ROCE_STATS_EXT_CTX_OPCODE_DEALLOCATE_ROCE_STATS_EXT_CTX UINT32_C(0x97)
76513 	#define CMDQ_DEALLOCATE_ROCE_STATS_EXT_CTX_OPCODE_LAST			CMDQ_DEALLOCATE_ROCE_STATS_EXT_CTX_OPCODE_DEALLOCATE_ROCE_STATS_EXT_CTX
76514 	/* Size of the command in 16-byte units. */
76515 	uint8_t	cmd_size;
76516 	/* Flags and attribs of the command. */
76517 	uint16_t	flags;
76518 	/* Driver supplied handle to associate the command and the response. */
76519 	uint16_t	cookie;
76520 	/* Size of the response buffer in 16-byte units. */
76521 	uint8_t	resp_size;
76522 	uint8_t	reserved8;
76523 	/* Host address of the response. */
76524 	uint64_t	resp_addr;
76525 	/* Extended RoCE statistics context id. */
76526 	uint32_t	roce_stats_ext_xid;
76527 	uint32_t	reserved32;
76528 	/* reserved64 is 64 b */
76529 	uint64_t	reserved64;
76530 } cmdq_deallocate_roce_stats_ext_ctx_t, *pcmdq_deallocate_roce_stats_ext_ctx_t;
76531 
76532 /* creq_deallocate_roce_stats_ext_ctx_resp (size:128b/16B) */
76533 
76534 typedef struct creq_deallocate_roce_stats_ext_ctx_resp {
76535 	uint8_t	type;
76536 	/*
76537 	 * This field indicates the exact type of the completion.
76538 	 * By convention, the LSB identifies the length of the
76539 	 * record in 16B units. Even values indicate 16B
76540 	 * records. Odd values indicate 32B
76541 	 * records.
76542 	 */
76543 	#define CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_MASK	UINT32_C(0x3f)
76544 	#define CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_SFT	0
76545 	/* QP Async Notification */
76546 		#define CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
76547 		#define CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_LAST	CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_TYPE_QP_EVENT
76548 	/* Status of the response. */
76549 	uint8_t	status;
76550 	/* Driver supplied handle to associate the command and the response. */
76551 	uint16_t	cookie;
76552 	/* Extended RoCE statistics context id. */
76553 	uint32_t	roce_stats_ext_xid;
76554 	uint8_t	v;
76555 	/*
76556 	 * This value is written by the NIC such that it will be different
76557 	 * for each pass through the completion queue. The even passes
76558 	 * will write 1. The odd passes will write 0.
76559 	 */
76560 	#define CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_V	UINT32_C(0x1)
76561 	/* Event or command opcode. */
76562 	uint8_t	event;
76563 	/* Deallocate extended RoCE statistics context command response. */
76564 	#define CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_EVENT_DEALLOCATE_ROCE_STATS_EXT_CTX UINT32_C(0x97)
76565 	#define CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_EVENT_LAST			CREQ_DEALLOCATE_ROCE_STATS_EXT_CTX_RESP_EVENT_DEALLOCATE_ROCE_STATS_EXT_CTX
76566 	uint8_t	reserved48[6];
76567 } creq_deallocate_roce_stats_ext_ctx_resp_t, *pcreq_deallocate_roce_stats_ext_ctx_resp_t;
76568 
76569 /***************************
76570  * query_roce_stats_ext_v2 *
76571  ***************************/
76572 
76573 
76574 /* cmdq_query_roce_stats_ext_v2 (size:256b/32B) */
76575 
76576 typedef struct cmdq_query_roce_stats_ext_v2 {
76577 	/* Command opcode. */
76578 	uint8_t	opcode;
76579 	/*
76580 	 * Query extended RoCE statistics for devices that support
76581 	 * `roce_stats_ext_ctx_supported` feature.
76582 	 */
76583 	#define CMDQ_QUERY_ROCE_STATS_EXT_V2_OPCODE_QUERY_ROCE_STATS_EXT_V2 UINT32_C(0x98)
76584 	#define CMDQ_QUERY_ROCE_STATS_EXT_V2_OPCODE_LAST		CMDQ_QUERY_ROCE_STATS_EXT_V2_OPCODE_QUERY_ROCE_STATS_EXT_V2
76585 	/* Size of the command in 16-byte units. */
76586 	uint8_t	cmd_size;
76587 	/* Flags and attribs of the command. */
76588 	uint16_t	flags;
76589 	/* Driver supplied handle to associate the command and the response. */
76590 	uint16_t	cookie;
76591 	/* Size of the response buffer in 16-byte units. */
76592 	uint8_t	resp_size;
76593 	uint8_t	reserved8;
76594 	/* Host address of the response. */
76595 	uint64_t	resp_addr;
76596 	/* Extended RoCE statistics context id. */
76597 	uint32_t	roce_stats_ext_xid;
76598 	uint32_t	reserved32;
76599 	/* reserved64 is 64 b */
76600 	uint64_t	reserved64;
76601 } cmdq_query_roce_stats_ext_v2_t, *pcmdq_query_roce_stats_ext_v2_t;
76602 
76603 /* creq_query_roce_stats_ext_v2_resp (size:128b/16B) */
76604 
76605 typedef struct creq_query_roce_stats_ext_v2_resp {
76606 	uint8_t	type;
76607 	/*
76608 	 * This field indicates the exact type of the completion.
76609 	 * By convention, the LSB identifies the length of the
76610 	 * record in 16B units. Even values indicate 16B
76611 	 * records. Odd values indicate 32B
76612 	 * records.
76613 	 */
76614 	#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_TYPE_MASK	UINT32_C(0x3f)
76615 	#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_TYPE_SFT	0
76616 	/* QP Async Notification */
76617 		#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_TYPE_QP_EVENT  UINT32_C(0x38)
76618 		#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_TYPE_LAST	CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_TYPE_QP_EVENT
76619 	/* Status of the response. */
76620 	uint8_t	status;
76621 	/* Driver supplied handle to associate the command and the response. */
76622 	uint16_t	cookie;
76623 	/* Side buffer size in 16-byte units */
76624 	uint32_t	size;
76625 	uint8_t	v;
76626 	/*
76627 	 * This value is written by the NIC such that it will be different
76628 	 * for each pass through the completion queue. The even passes
76629 	 * will write 1. The odd passes will write 0.
76630 	 */
76631 	#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_V	UINT32_C(0x1)
76632 	/* Event or command opcode. */
76633 	uint8_t	event;
76634 	/* Query extended RoCE statistics v2. */
76635 	#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_EVENT_QUERY_ROCE_STATS_EXT_V2 UINT32_C(0x98)
76636 	#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_EVENT_LAST		CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_EVENT_QUERY_ROCE_STATS_EXT_V2
76637 	uint8_t	reserved48[6];
76638 } creq_query_roce_stats_ext_v2_resp_t, *pcreq_query_roce_stats_ext_v2_resp_t;
76639 
76640 /* Query extended RoCE Stats command response side buffer structure. */
76641 /* creq_query_roce_stats_ext_v2_resp_sb (size:1920b/240B) */
76642 
76643 typedef struct creq_query_roce_stats_ext_v2_resp_sb {
76644 	/* Command opcode. */
76645 	uint8_t	opcode;
76646 	/* Query extended RoCE statistics v2. */
76647 	#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_SB_OPCODE_QUERY_ROCE_STATS_EXT_V2 UINT32_C(0x98)
76648 	#define CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_SB_OPCODE_LAST		CREQ_QUERY_ROCE_STATS_EXT_V2_RESP_SB_OPCODE_QUERY_ROCE_STATS_EXT_V2
76649 	/* Status of the response. */
76650 	uint8_t	status;
76651 	/* Driver supplied handle to associate the command and the response. */
76652 	uint16_t	cookie;
76653 	/* Flags and attribs of the command. */
76654 	uint16_t	flags;
76655 	/* Size of the response buffer in 16-byte units. */
76656 	uint8_t	resp_size;
76657 	uint8_t	rsvd;
76658 	/* Number of transmitted Atomic request packets without errors. */
76659 	uint64_t	tx_atomic_req_pkts;
76660 	/* Number of transmitted Read request packets without errors. */
76661 	uint64_t	tx_read_req_pkts;
76662 	/* Number of transmitted Read response packets without errors. */
76663 	uint64_t	tx_read_res_pkts;
76664 	/* Number of transmitted Write request packets without errors. */
76665 	uint64_t	tx_write_req_pkts;
76666 	/* Number of transmitted RC Send packets without errors. */
76667 	uint64_t	tx_rc_send_req_pkts;
76668 	/*
76669 	 * Number of transmitted UD Send (including QP1) packets
76670 	 * without errors.
76671 	 */
76672 	uint64_t	tx_ud_send_req_pkts;
76673 	/* Number of transmitted CNPs. Includes DCN_CNPs. */
76674 	uint64_t	tx_cnp_pkts;
76675 	/*
76676 	 * Number of transmitted RoCE packets.
76677 	 * This includes RC, UD, RawEth, and QP1 packets
76678 	 */
76679 	uint64_t	tx_roce_pkts;
76680 	/*
76681 	 * Number of transmitted RoCE header and payload bytes.
76682 	 * This includes RC, UD, RawEth, and QP1 packets.
76683 	 */
76684 	uint64_t	tx_roce_bytes;
76685 	/*
76686 	 * Number of drops that occurred to lack of buffers.
76687 	 * This count includes RC sends, RC writes with immediate,
76688 	 * UD sends, RawEth, and QP1 packets dropped due to lack of buffers.
76689 	 */
76690 	uint64_t	rx_out_of_buffer_pkts;
76691 	/* Number of packets that were received out of sequence. */
76692 	uint64_t	rx_out_of_sequence_pkts;
76693 	/*
76694 	 * Number of duplicate read/atomic requests resulting in responder
76695 	 * hardware retransmission.
76696 	 */
76697 	uint64_t	dup_req;
76698 	/*
76699 	 * Number of missing response packets resulting in hardware
76700 	 * retransmission.
76701 	 */
76702 	uint64_t	missing_resp;
76703 	/*
76704 	 * Number of sequence error NAKs received resulting in hardware
76705 	 * retransmission.
76706 	 */
76707 	uint64_t	seq_err_naks_rcvd;
76708 	/* Number of RNR NAKs received resulting in hardware retransmission. */
76709 	uint64_t	rnr_naks_rcvd;
76710 	/* Number of timeouts resulting in hardware retransmission. */
76711 	uint64_t	to_retransmits;
76712 	/* Number of received Atomic request packets without errors. */
76713 	uint64_t	rx_atomic_req_pkts;
76714 	/* Number of received Read request packets without errors. */
76715 	uint64_t	rx_read_req_pkts;
76716 	/* Number of received Read response packets without errors. */
76717 	uint64_t	rx_read_res_pkts;
76718 	/* Number of received Write request packets without errors. */
76719 	uint64_t	rx_write_req_pkts;
76720 	/* Number of received RC Send packets without errors. */
76721 	uint64_t	rx_rc_send_pkts;
76722 	/* Number of received UD Send packets without errors. */
76723 	uint64_t	rx_ud_send_pkts;
76724 	/* Number of received DCN payload cut packets. */
76725 	uint64_t	rx_dcn_payload_cut;
76726 	/* Number of received ECN-marked packets. */
76727 	uint64_t	rx_ecn_marked_pkts;
76728 	/* Number of received CNP packets. Includes DCN_CNPs. */
76729 	uint64_t	rx_cnp_pkts;
76730 	/*
76731 	 * Number of received RoCE packets including RoCE packets with errors.
76732 	 * This includes RC, UD, RawEth, and QP1 packets
76733 	 */
76734 	uint64_t	rx_roce_pkts;
76735 	/*
76736 	 * Number of received RoCE header and payload bytes including RoCE
76737 	 * packets with errors.
76738 	 * This includes RC, UD, RawEth, and QP1 packets.
76739 	 */
76740 	uint64_t	rx_roce_bytes;
76741 	/*
76742 	 * Number of received RoCE packets without errors.
76743 	 * This includes RC, UD, RawEth, and QP1 packets
76744 	 */
76745 	uint64_t	rx_roce_good_pkts;
76746 	/*
76747 	 * Number of received RoCE header and payload bytes without errors.
76748 	 * This includes RC, UD, RawEth, and QP1 packets.
76749 	 */
76750 	uint64_t	rx_roce_good_bytes;
76751 } creq_query_roce_stats_ext_v2_resp_sb_t, *pcreq_query_roce_stats_ext_v2_resp_sb_t;
76752 
76753 /* RoCE function async event notifications. */
76754 /* creq_func_event (size:128b/16B) */
76755 
76756 typedef struct creq_func_event {
76757 	uint8_t	type;
76758 	/*
76759 	 * This field indicates the exact type of the completion.
76760 	 * By convention, the LSB identifies the length of the
76761 	 * record in 16B units. Even values indicate 16B
76762 	 * records. Odd values indicate 32B
76763 	 * records.
76764 	 */
76765 	#define CREQ_FUNC_EVENT_TYPE_MASK	UINT32_C(0x3f)
76766 	#define CREQ_FUNC_EVENT_TYPE_SFT	0
76767 	/* Function Async Notification */
76768 		#define CREQ_FUNC_EVENT_TYPE_FUNC_EVENT  UINT32_C(0x3a)
76769 		#define CREQ_FUNC_EVENT_TYPE_LAST	CREQ_FUNC_EVENT_TYPE_FUNC_EVENT
76770 	uint8_t	reserved56[7];
76771 	uint8_t	v;
76772 	/*
76773 	 * This value is written by the NIC such that it will be different
76774 	 * for each pass through the completion queue. The even passes
76775 	 * will write 1. The odd passes will write 0.
76776 	 */
76777 	#define CREQ_FUNC_EVENT_V	UINT32_C(0x1)
76778 	/*
76779 	 * This value defines what type of async event has occurred
76780 	 * on the function.
76781 	 */
76782 	uint8_t	event;
76783 	/*
76784 	 * Invalid PBL or PCIE UR response occurred
76785 	 * in SQ WQE or IRRQ read access.
76786 	 */
76787 	#define CREQ_FUNC_EVENT_EVENT_TX_WQE_ERROR	UINT32_C(0x1)
76788 	/*
76789 	 * Invalid PBL or PCIE UR response occurred
76790 	 * during data read access.
76791 	 */
76792 	#define CREQ_FUNC_EVENT_EVENT_TX_DATA_ERROR	UINT32_C(0x2)
76793 	/*
76794 	 * Invalid PBL or PCIE UR response occurred
76795 	 * in RQ/SRQ WQE or ORRQ read access.
76796 	 */
76797 	#define CREQ_FUNC_EVENT_EVENT_RX_WQE_ERROR	UINT32_C(0x3)
76798 	/* Invalid PBL occurred during data write access. */
76799 	#define CREQ_FUNC_EVENT_EVENT_RX_DATA_ERROR	UINT32_C(0x4)
76800 	/* Invalid PBL occurred during CQ write access. */
76801 	#define CREQ_FUNC_EVENT_EVENT_CQ_ERROR	UINT32_C(0x5)
76802 	/*
76803 	 * Invalid PBL or PCIE UR response occurred in TQM
76804 	 * read access.
76805 	 */
76806 	#define CREQ_FUNC_EVENT_EVENT_TQM_ERROR	UINT32_C(0x6)
76807 	/* PCIE UR response occurred in CFC read access. */
76808 	#define CREQ_FUNC_EVENT_EVENT_CFCQ_ERROR	UINT32_C(0x7)
76809 	/* PCIE UR response occurred in CFC read access. */
76810 	#define CREQ_FUNC_EVENT_EVENT_CFCS_ERROR	UINT32_C(0x8)
76811 	/* PCIE UR response occurred in CFC read access. */
76812 	#define CREQ_FUNC_EVENT_EVENT_CFCC_ERROR	UINT32_C(0x9)
76813 	/* PCIE UR response occurred in CFC read access. */
76814 	#define CREQ_FUNC_EVENT_EVENT_CFCM_ERROR	UINT32_C(0xa)
76815 	/*
76816 	 * Invalid PBL or
76817 	 * PCIE UR response
76818 	 * occurred on timer read access.
76819 	 */
76820 	#define CREQ_FUNC_EVENT_EVENT_TIM_ERROR	UINT32_C(0xb)
76821 	/* A VF sent a backchannel command request */
76822 	#define CREQ_FUNC_EVENT_EVENT_VF_COMM_REQUEST	UINT32_C(0x80)
76823 	/*
76824 	 * Communication resource (QPC, CQ, SRQ, MRW) exhausted, and resource
76825 	 * array extension is enabled.
76826 	 */
76827 	#define CREQ_FUNC_EVENT_EVENT_RESOURCE_EXHAUSTED UINT32_C(0x81)
76828 	#define CREQ_FUNC_EVENT_EVENT_LAST		CREQ_FUNC_EVENT_EVENT_RESOURCE_EXHAUSTED
76829 	uint8_t	reserved48[6];
76830 } creq_func_event_t, *pcreq_func_event_t;
76831 
76832 /* RoCE slowpath command completion events. */
76833 /* creq_qp_event (size:128b/16B) */
76834 
76835 typedef struct creq_qp_event {
76836 	uint8_t	type;
76837 	/*
76838 	 * This field indicates the exact type of the completion.
76839 	 * By convention, the LSB identifies the length of the
76840 	 * record in 16B units. Even values indicate 16B
76841 	 * records. Odd values indicate 32B
76842 	 * records.
76843 	 */
76844 	#define CREQ_QP_EVENT_TYPE_MASK	UINT32_C(0x3f)
76845 	#define CREQ_QP_EVENT_TYPE_SFT	0
76846 	/* QP Async Notification */
76847 		#define CREQ_QP_EVENT_TYPE_QP_EVENT  UINT32_C(0x38)
76848 		#define CREQ_QP_EVENT_TYPE_LAST	CREQ_QP_EVENT_TYPE_QP_EVENT
76849 	/* Status of the response. */
76850 	uint8_t	status;
76851 	/* Success. */
76852 	#define CREQ_QP_EVENT_STATUS_SUCCESS	UINT32_C(0x0)
76853 	/* Fail. */
76854 	#define CREQ_QP_EVENT_STATUS_FAIL		UINT32_C(0x1)
76855 	/* Resources. */
76856 	#define CREQ_QP_EVENT_STATUS_RESOURCES	UINT32_C(0x2)
76857 	/* Invalid command. */
76858 	#define CREQ_QP_EVENT_STATUS_INVALID_CMD	UINT32_C(0x3)
76859 	/* Not implemented. */
76860 	#define CREQ_QP_EVENT_STATUS_NOT_IMPLEMENTED   UINT32_C(0x4)
76861 	/* Invalid parameter. */
76862 	#define CREQ_QP_EVENT_STATUS_INVALID_PARAMETER UINT32_C(0x5)
76863 	/* Hardware operation failed. */
76864 	#define CREQ_QP_EVENT_STATUS_HARDWARE_ERROR	UINT32_C(0x6)
76865 	/* Firmware operation failed due to internal error. */
76866 	#define CREQ_QP_EVENT_STATUS_INTERNAL_ERROR	UINT32_C(0x7)
76867 	#define CREQ_QP_EVENT_STATUS_LAST		CREQ_QP_EVENT_STATUS_INTERNAL_ERROR
76868 	/* Driver supplied handle to associate the command and the response. */
76869 	uint16_t	cookie;
76870 	uint32_t	reserved32;
76871 	uint8_t	v;
76872 	/*
76873 	 * This value is written by the NIC such that it will be different
76874 	 * for each pass through the completion queue. The even passes
76875 	 * will write 1. The odd passes will write 0.
76876 	 */
76877 	#define CREQ_QP_EVENT_V	UINT32_C(0x1)
76878 	/* Event or command opcode. */
76879 	uint8_t	event;
76880 	/* Create QP command response. */
76881 	#define CREQ_QP_EVENT_EVENT_CREATE_QP		UINT32_C(0x1)
76882 	/* Destroy QP command response. */
76883 	#define CREQ_QP_EVENT_EVENT_DESTROY_QP		UINT32_C(0x2)
76884 	/* Modify QP command response. */
76885 	#define CREQ_QP_EVENT_EVENT_MODIFY_QP		UINT32_C(0x3)
76886 	/* Query QP command response. */
76887 	#define CREQ_QP_EVENT_EVENT_QUERY_QP		UINT32_C(0x4)
76888 	/* Create SRQ command response. */
76889 	#define CREQ_QP_EVENT_EVENT_CREATE_SRQ		UINT32_C(0x5)
76890 	/* Destroy SRQ command response. */
76891 	#define CREQ_QP_EVENT_EVENT_DESTROY_SRQ	UINT32_C(0x6)
76892 	/* Query SRQ command response. */
76893 	#define CREQ_QP_EVENT_EVENT_QUERY_SRQ		UINT32_C(0x8)
76894 	/* Create CQ command response. */
76895 	#define CREQ_QP_EVENT_EVENT_CREATE_CQ		UINT32_C(0x9)
76896 	/* Destroy CQ command response. */
76897 	#define CREQ_QP_EVENT_EVENT_DESTROY_CQ		UINT32_C(0xa)
76898 	/* Resize CQ command response. */
76899 	#define CREQ_QP_EVENT_EVENT_RESIZE_CQ		UINT32_C(0xc)
76900 	/* Allocate MRW command response. */
76901 	#define CREQ_QP_EVENT_EVENT_ALLOCATE_MRW	UINT32_C(0xd)
76902 	/* De-allocate key command response. */
76903 	#define CREQ_QP_EVENT_EVENT_DEALLOCATE_KEY	UINT32_C(0xe)
76904 	/* Register MR command response. */
76905 	#define CREQ_QP_EVENT_EVENT_REGISTER_MR	UINT32_C(0xf)
76906 	/* Deregister MR command response. */
76907 	#define CREQ_QP_EVENT_EVENT_DEREGISTER_MR	UINT32_C(0x10)
76908 	/* Add GID command response. */
76909 	#define CREQ_QP_EVENT_EVENT_ADD_GID		UINT32_C(0x11)
76910 	/* Delete GID command response. */
76911 	#define CREQ_QP_EVENT_EVENT_DELETE_GID		UINT32_C(0x12)
76912 	/* Modify GID command response. */
76913 	#define CREQ_QP_EVENT_EVENT_MODIFY_GID		UINT32_C(0x17)
76914 	/* Query GID command response. */
76915 	#define CREQ_QP_EVENT_EVENT_QUERY_GID		UINT32_C(0x18)
76916 	/* Create QP1 command response. */
76917 	#define CREQ_QP_EVENT_EVENT_CREATE_QP1		UINT32_C(0x13)
76918 	/* Destroy QP1 command response. */
76919 	#define CREQ_QP_EVENT_EVENT_DESTROY_QP1	UINT32_C(0x14)
76920 	/* Create AH command response. */
76921 	#define CREQ_QP_EVENT_EVENT_CREATE_AH		UINT32_C(0x15)
76922 	/* Destroy AH command response. */
76923 	#define CREQ_QP_EVENT_EVENT_DESTROY_AH		UINT32_C(0x16)
76924 	/* Initialize firmware command response. */
76925 	#define CREQ_QP_EVENT_EVENT_INITIALIZE_FW	UINT32_C(0x80)
76926 	/* De-initialize firmware command response. */
76927 	#define CREQ_QP_EVENT_EVENT_DEINITIALIZE_FW	UINT32_C(0x81)
76928 	/* Stop PF command response. */
76929 	#define CREQ_QP_EVENT_EVENT_STOP_FUNC		UINT32_C(0x82)
76930 	/* Query info PF command response. */
76931 	#define CREQ_QP_EVENT_EVENT_QUERY_FUNC		UINT32_C(0x83)
76932 	/* Set function resources command response. */
76933 	#define CREQ_QP_EVENT_EVENT_SET_FUNC_RESOURCES	UINT32_C(0x84)
76934 	/*
76935 	 * Read the current state of any internal resource context. Can only be
76936 	 * issued from a PF.
76937 	 */
76938 	#define CREQ_QP_EVENT_EVENT_READ_CONTEXT	UINT32_C(0x85)
76939 	/* Map TC to COS response. */
76940 	#define CREQ_QP_EVENT_EVENT_MAP_TC_TO_COS	UINT32_C(0x8a)
76941 	/* Query firmware and interface version response. */
76942 	#define CREQ_QP_EVENT_EVENT_QUERY_VERSION	UINT32_C(0x8b)
76943 	/* Modify congestion control response. */
76944 	#define CREQ_QP_EVENT_EVENT_MODIFY_CC		UINT32_C(0x8c)
76945 	/* Query congestion control response. */
76946 	#define CREQ_QP_EVENT_EVENT_QUERY_CC		UINT32_C(0x8d)
76947 	/* Query RoCE statistics. */
76948 	#define CREQ_QP_EVENT_EVENT_QUERY_ROCE_STATS	UINT32_C(0x8e)
76949 	/* Set LAG mode. */
76950 	#define CREQ_QP_EVENT_EVENT_SET_LINK_AGGR_MODE	UINT32_C(0x8f)
76951 	/*
76952 	 * Query QP for a PF other than the requesting PF. Also can query for
76953 	 * more than one QP.
76954 	 */
76955 	#define CREQ_QP_EVENT_EVENT_QUERY_QP_EXTEND	UINT32_C(0x91)
76956 	/* QP error notification event. */
76957 	#define CREQ_QP_EVENT_EVENT_QP_ERROR_NOTIFICATION UINT32_C(0xc0)
76958 	/* CQ error notification event. */
76959 	#define CREQ_QP_EVENT_EVENT_CQ_ERROR_NOTIFICATION UINT32_C(0xc1)
76960 	#define CREQ_QP_EVENT_EVENT_LAST		CREQ_QP_EVENT_EVENT_CQ_ERROR_NOTIFICATION
76961 	uint8_t	reserved48[6];
76962 } creq_qp_event_t, *pcreq_qp_event_t;
76963 
76964 /* QP error notification event. */
76965 /* creq_qp_error_notification (size:128b/16B) */
76966 
76967 typedef struct creq_qp_error_notification {
76968 	uint8_t	type;
76969 	/*
76970 	 * This field indicates the exact type of the completion.
76971 	 * By convention, the LSB identifies the length of the
76972 	 * record in 16B units. Even values indicate 16B
76973 	 * records. Odd values indicate 32B
76974 	 * records.
76975 	 */
76976 	#define CREQ_QP_ERROR_NOTIFICATION_TYPE_MASK	UINT32_C(0x3f)
76977 	#define CREQ_QP_ERROR_NOTIFICATION_TYPE_SFT	0
76978 	/* QP Async Notification */
76979 		#define CREQ_QP_ERROR_NOTIFICATION_TYPE_QP_EVENT  UINT32_C(0x38)
76980 		#define CREQ_QP_ERROR_NOTIFICATION_TYPE_LAST	CREQ_QP_ERROR_NOTIFICATION_TYPE_QP_EVENT
76981 	/* Status of the response. */
76982 	uint8_t	status;
76983 	/* requestor slow path state */
76984 	uint8_t	req_slow_path_state;
76985 	/* requestor error reason */
76986 	uint8_t	req_err_state_reason;
76987 	/* No error. */
76988 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_NO_ERROR			UINT32_C(0x0)
76989 	/*
76990 	 * Requester detected opcode error.
76991 	 * * First, only, middle, last for incoming RDMA read
76992 	 *   responses are improperly ordered with respect to previous
76993 	 *   (PSN) packet.
76994 	 * * First or middle packet is not full MTU size.
76995 	 * This is an RX Detected Error.
76996 	 */
76997 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_OPCODE_ERROR		UINT32_C(0x1)
76998 	/*
76999 	 * Transport timeout retry limit exceeded.
77000 	 * The requestor retried the same unacked PSN request packet
77001 	 * too many times.
77002 	 * This is an RX Detected Error.
77003 	 */
77004 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_TIMEOUT_RETRY_LIMIT	UINT32_C(0x2)
77005 	/*
77006 	 * RNR NAK retry limit exceeded.
77007 	 * The requestor received an RNR NAK with the same NAK PSN
77008 	 * too many times.
77009 	 * This is an RX Detected Error.
77010 	 */
77011 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_RNR_TIMEOUT_RETRY_LIMIT UINT32_C(0x3)
77012 	/*
77013 	 * NAK arrival, When NAK code is 1, Invalid Request.
77014 	 * This is an RX Detected Error.
77015 	 */
77016 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_NAK_ARRIVAL_1	UINT32_C(0x4)
77017 	/*
77018 	 * NAK arrival, When NAK code is 2, Remote Access Error.
77019 	 * This is an RX Detected Error.
77020 	 */
77021 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_NAK_ARRIVAL_2	UINT32_C(0x5)
77022 	/*
77023 	 * NAK arrival, When NAK code is 3, Remote Operational Error.
77024 	 * This is an RX Detected Error.
77025 	 */
77026 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_NAK_ARRIVAL_3	UINT32_C(0x6)
77027 	/*
77028 	 * NAK arrival. When NAK code is 4, Invalid RD Request.
77029 	 * This is an RX Detected Error.
77030 	 */
77031 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_NAK_ARRIVAL_4	UINT32_C(0x7)
77032 	/*
77033 	 * Local memory error.
77034 	 * An SGE described an inaccessible memory.
77035 	 * This is an RX Detected Error.
77036 	 */
77037 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_RX_MEMORY_ERROR	UINT32_C(0x8)
77038 	/*
77039 	 * Local memory error.
77040 	 * An SGE described an inaccessible memory.
77041 	 * This is a TX Detected Error.
77042 	 */
77043 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_TX_MEMORY_ERROR	UINT32_C(0x9)
77044 	/*
77045 	 * Read response length error.
77046 	 * The read response payload size does not match the read
77047 	 * length of the request.
77048 	 * This is an RX Detected Error.
77049 	 */
77050 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_READ_RESP_LENGTH	UINT32_C(0xa)
77051 	/*
77052 	 * Invalid read response.
77053 	 * A read response arrived and had a PSN that was not in the
77054 	 * reply range of any outstanding read request on the ORRQ.
77055 	 * This is an RX Detected Error.
77056 	 */
77057 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_INVALID_READ_RESP	UINT32_C(0xb)
77058 	/*
77059 	 * Illegal bind.
77060 	 * * No MW with the specified R_Key exists.
77061 	 * * No MR with the specified L_Key exists.
77062 	 * * A bind request was performed on a window that was already
77063 	 *   bound.
77064 	 * * A bind request was performed for an underlying MR that
77065 	 *   is not registered.
77066 	 * * A bind request was performed for a memory area that exceeds
77067 	 *   the range of the underlying MR.
77068 	 * * A bind request was performed with a set of permissions
77069 	 *   that are looser than the permissions of the underlying MR.
77070 	 * * Domain error MW - When QP's PD does not match MW PD.
77071 	 * * Domain error MR - When QP's PD does not match parent MR's
77072 	 *   PD.
77073 	 * This is a TX Detected Error.
77074 	 */
77075 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_ILLEGAL_BIND		UINT32_C(0xc)
77076 	/*
77077 	 * Illegal fast register.
77078 	 * * No MR with the specified L_Key exists.
77079 	 * * A fast register request was performed on a non-
77080 	 *   physical MR.
77081 	 * * A fast register request was performed on a physical MR
77082 	 *   that is already registered.
77083 	 * * A fast register request was performed on a physical MR
77084 	 *   that does not have a page list allocated (has not been
77085 	 *   initialized).
77086 	 * * The number of pages being registered exceeds the capacity
77087 	 *   of the physical MR.
77088 	 * * The length of the registration is not possible with the
77089 	 *   actual number of pages provided.
77090 	 * * Domain error - when QP's PD does not match PMR PD.
77091 	 * This is a TX Detected Error.
77092 	 */
77093 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_ILLEGAL_FAST_REG	UINT32_C(0xd)
77094 	/*
77095 	 * Illegal invalidate.
77096 	 * * No MR with the specified L_Key exists.
77097 	 * * No MW with the specified R_Key exists.
77098 	 * * An invalidate was performed against a non-physical MR.
77099 	 * * An invalidate was performed against a physical MR that
77100 	 *   is not registered.
77101 	 * * An invalidate was performed against a MW that is not
77102 	 *   bound.
77103 	 * * The PD of the MR/MW being invalidated does not match the PD
77104 	 *   of the QP.
77105 	 * This is a TX Detected Error.
77106 	 */
77107 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_ILLEGAL_INVALIDATE	UINT32_C(0xe)
77108 	/*
77109 	 * Completion Error.
77110 	 * No CQE space available on queue, or CQ not in VALID state.
77111 	 * This is a Completion Detected Error.
77112 	 */
77113 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_CMP_ERROR		UINT32_C(0xf)
77114 	/*
77115 	 * Local memory error while retransmitting WQE.
77116 	 * An SQ SGE described an inaccessible memory.
77117 	 * This is a TX Detected Error.
77118 	 */
77119 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_RETRAN_LOCAL_ERROR	UINT32_C(0x10)
77120 	/*
77121 	 * Problem found in the format of a WQE in the SQ.
77122 	 * This is a TX Detected Error.
77123 	 */
77124 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_WQE_FORMAT_ERROR	UINT32_C(0x11)
77125 	/*
77126 	 * Problem was found in the format of an ORRQ entry.
77127 	 * This is a RX Detected Error.
77128 	 */
77129 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_ORRQ_FORMAT_ERROR	UINT32_C(0x12)
77130 	/*
77131 	 * A UD send attempted to use an invalid AVID.
77132 	 * This is a TX Detected Error.
77133 	 */
77134 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_INVALID_AVID_ERROR	UINT32_C(0x13)
77135 	/*
77136 	 * A UD send attempted to use an AVID that is outside of its
77137 	 * QP's protection domain.
77138 	 * This is a TX Detected Error.
77139 	 */
77140 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_AV_DOMAIN_ERROR	UINT32_C(0x14)
77141 	/*
77142 	 * A load error occurred on an attempt to load the CQ Context.
77143 	 * This is a Completion Detected Error.
77144 	 */
77145 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_CQ_LOAD_ERROR	UINT32_C(0x15)
77146 	/*
77147 	 * There was an attempt to process a WQE from the SQ that
77148 	 * corresponds to an operation that is unsupported for the
77149 	 * corresponding QP.
77150 	 * This is a TX Detected Error.
77151 	 */
77152 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_SERV_TYPE_ERROR	UINT32_C(0x16)
77153 	/*
77154 	 * There was an attempt to process a WQE from the SQ that
77155 	 * corresponds to an operation that is unsupported for the
77156 	 * corresponding QP, according to the supported_operations QPC
77157 	 * field.
77158 	 * This is a TX Detected Error.
77159 	 */
77160 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_INVALID_OP_ERROR	UINT32_C(0x17)
77161 	/*
77162 	 * A fatal error was detected on an attempt to read from
77163 	 * or write to PCIe on the transmit side. This error is
77164 	 * detected by the TX side (or CAGR), but has the priority
77165 	 * of a Completion Detected Error.
77166 	 */
77167 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_TX_PCI_ERROR		UINT32_C(0x18)
77168 	/*
77169 	 * A fatal error was detected on an attempt to read from
77170 	 * or write to PCIe on the receive side. This error is detected
77171 	 * by the RX side (or CAGR), but has the priority of a
77172 	 * Completion Detected Error.
77173 	 */
77174 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_RX_PCI_ERROR		UINT32_C(0x19)
77175 	/*
77176 	 * When processing a WQE from the SQ, TWE detected an error
77177 	 * such that the wqe_size given in the header is larger than
77178 	 * the delta between sq_work_idx and sq_prod_idx. This error
77179 	 * has priority over the non-error case that occurs when TWE
77180 	 * detects that it simply doesn't have enough slots fetched
77181 	 * to execute the WQE during the current residency.
77182 	 */
77183 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_PROD_WQE_MSMTCH_ERROR   UINT32_C(0x1a)
77184 	/*
77185 	 * When reading the MSN table to initiate HW retransmit, RWE
77186 	 * found that to_retransmit_psn was not within the range defined
77187 	 * by start_psn and next_psn in the corresponding MSN table
77188 	 * entry. To_retransmit_psn must be greater than or equal to
77189 	 * start_psn and less than next_psn in order for the range check
77190 	 * to succeed.
77191 	 * This is a RX Detected Error.
77192 	 */
77193 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_PSN_RANGE_CHECK_ERROR   UINT32_C(0x1b)
77194 	/*
77195 	 * While retransmitting, TWE detected one of several possible
77196 	 * error detection scenarios related to the improper setup of
77197 	 * retransmission. These include a category or errors known as
77198 	 * retx_end_error where the retransmission end does not line up
77199 	 * sequentially with the WQE index and PSN upon continuing on
77200 	 * with the regular transmission that follows the
77201 	 * retransmission. It also includes the error condition in which
77202 	 * the retransmission Work Request has gen_dup_read_request set
77203 	 * and the WQE fetched by TWE is not an RDMA Read or Atomic WQE.
77204 	 * Please see TWE requirements for a full list of the various
77205 	 * possible retransmit setup error cases. These error cases
77206 	 * apply to H/W and F/W retransmission, alike.
77207 	 * This is a TX Detected Error.
77208 	 */
77209 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_RETX_SETUP_ERROR	UINT32_C(0x1c)
77210 	/*
77211 	 * An express doorbell was posted that overflowed the SQ. The
77212 	 * doorbell is dropped, along with all subsequent doorbells for
77213 	 * this SQ. This is a TX Detected Error.
77214 	 */
77215 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_SQ_OVERFLOW		UINT32_C(0x1d)
77216 	#define CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_LAST			CREQ_QP_ERROR_NOTIFICATION_REQ_ERR_STATE_REASON_REQ_SQ_OVERFLOW
77217 	/* QP context id */
77218 	uint32_t	xid;
77219 	uint8_t	v;
77220 	/*
77221 	 * This value is written by the NIC such that it will be different
77222 	 * for each pass through the completion queue. The even passes
77223 	 * will write 1. The odd passes will write 0.
77224 	 */
77225 	#define CREQ_QP_ERROR_NOTIFICATION_V	UINT32_C(0x1)
77226 	/* Event or command opcode. */
77227 	uint8_t	event;
77228 	/* QP error notification event. */
77229 	#define CREQ_QP_ERROR_NOTIFICATION_EVENT_QP_ERROR_NOTIFICATION UINT32_C(0xc0)
77230 	#define CREQ_QP_ERROR_NOTIFICATION_EVENT_LAST		CREQ_QP_ERROR_NOTIFICATION_EVENT_QP_ERROR_NOTIFICATION
77231 	/* responder slow path state */
77232 	uint8_t	res_slow_path_state;
77233 	uint8_t	res_err_state_reason;
77234 	/* No error. */
77235 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_NO_ERROR			UINT32_C(0x0)
77236 	/*
77237 	 * Incoming Send, RDMA write, or RDMA read exceeds the maximum
77238 	 * transfer length. Detected on RX first and only packets for
77239 	 * write. Detected on RX request for read.
77240 	 * This is an RX Detected Error.
77241 	 */
77242 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_EXCEED_MAX		UINT32_C(0x1)
77243 	/*
77244 	 * RDMA write payload size does not match write length. Detected
77245 	 * when total write payload is not equal to the RDMA write
77246 	 * length that was given in the first or only packet of the
77247 	 * request.
77248 	 * This is an RX Detected Error.
77249 	 */
77250 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_PAYLOAD_LENGTH_MISMATCH   UINT32_C(0x2)
77251 	/*
77252 	 * Send payload exceeds RQ/SRQ WQE buffer capacity. The total
77253 	 * send payload that arrived is more than the size of the WQE
77254 	 * buffer that was fetched from the RQ/SRQ.
77255 	 * This is an RX Detected Error.
77256 	 */
77257 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_EXCEEDS_WQE		UINT32_C(0x3)
77258 	/*
77259 	 * Responder detected opcode error.
77260 	 * * First, only, middle, last or incoming requests are
77261 	 *   improperly ordered with respect to previous (PSN) packet.
77262 	 * * First or middle packet is not full MTU size.
77263 	 * This is an RX Detected Error.
77264 	 */
77265 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_OPCODE_ERROR		UINT32_C(0x4)
77266 	/*
77267 	 * PSN sequence error retry limit exceeded.
77268 	 * The responder encountered a PSN sequence error for the
77269 	 * same PSN too many times. This can occur via implicit or
77270 	 * explicit NAK.
77271 	 * This is an RX Detected Error.
77272 	 */
77273 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_PSN_SEQ_ERROR_RETRY_LIMIT UINT32_C(0x5)
77274 	/*
77275 	 * Invalid R_Key.
77276 	 * An incoming request contained an R_Key that did not reference
77277 	 * a valid MR/MW. This error may be detected by the RX engine
77278 	 * for RDMA write or by the TX engine for RDMA read
77279 	 * (detected while servicing IRRQ).
77280 	 * This is an RX Detected Error.
77281 	 */
77282 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_RX_INVALID_R_KEY	UINT32_C(0x6)
77283 	/*
77284 	 * Domain error.
77285 	 * An incoming request specified an R_Key which
77286 	 * referenced a MR/MW that was not in the same PD as the QP on
77287 	 * which the request arrived.
77288 	 * This is an RX Detected Error.
77289 	 */
77290 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_RX_DOMAIN_ERROR	UINT32_C(0x7)
77291 	/*
77292 	 * No permission.
77293 	 * An incoming request contained an R_Key that referenced a
77294 	 * MR/MW which did not have the access permission needed for
77295 	 * the operation.
77296 	 * This is an RX Detected Error.
77297 	 */
77298 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_RX_NO_PERMISSION	UINT32_C(0x8)
77299 	/*
77300 	 * Range error.
77301 	 * An incoming request had a combination of R_Key,VA, and
77302 	 * length that was out of bounds of the associated MR/MW.
77303 	 * This is an RX Detected Error.
77304 	 */
77305 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_RX_RANGE_ERROR		UINT32_C(0x9)
77306 	/*
77307 	 * Invalid R_Key.
77308 	 * An incoming request contained an R_Key that did not
77309 	 * reference a valid MR/MW. This error may be detected
77310 	 * by the RX engine for RDMA write or by the TX engine
77311 	 * for RDMA read (detected while servicing IRRQ).
77312 	 * This is a TX Detected Error.
77313 	 */
77314 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_TX_INVALID_R_KEY	UINT32_C(0xa)
77315 	/*
77316 	 * Domain error.
77317 	 * An incoming request specified an R_Key which referenced
77318 	 * a MR/MW that was not in the same PD as the QP on
77319 	 * which the request arrived.
77320 	 * This is a TX Detected Error.
77321 	 */
77322 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_TX_DOMAIN_ERROR	UINT32_C(0xb)
77323 	/*
77324 	 * No permission.
77325 	 * An incoming request contained an R_Key that referenced a
77326 	 * MR/MW which did not have the access permission needed for
77327 	 * the operation.
77328 	 * This is a TX Detected Error.
77329 	 */
77330 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_TX_NO_PERMISSION	UINT32_C(0xc)
77331 	/*
77332 	 * Range error.
77333 	 * An incoming request had a combination of R_Key, VA, and
77334 	 * length that was out of bounds of the associated MR/MW.
77335 	 * This is a TX Detected Error.
77336 	 */
77337 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_TX_RANGE_ERROR		UINT32_C(0xd)
77338 	/*
77339 	 * IRRQ overflow.
77340 	 * The peer sent us more RDMA read or atomic requests than
77341 	 * the negotiated maximum.
77342 	 * This is an RX Detected Error.
77343 	 */
77344 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_IRRQ_OFLOW		UINT32_C(0xe)
77345 	/*
77346 	 * Unsupported opcode.
77347 	 * The peer sent us a request with an opcode for a request
77348 	 * type that is not supported on this QP.
77349 	 * This is an RX Detected Error.
77350 	 */
77351 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_UNSUPPORTED_OPCODE	UINT32_C(0xf)
77352 	/*
77353 	 * Unaligned atomic operation. The VA of an atomic request
77354 	 * is on a memory boundary that prevents atomic execution.
77355 	 * This is an RX Detected Error.
77356 	 */
77357 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_UNALIGN_ATOMIC		UINT32_C(0x10)
77358 	/*
77359 	 * Remote invalidate error.
77360 	 * A send with invalidate request arrived in which the
77361 	 * R_Key to invalidate did not describe a MR/MW which could
77362 	 * be invalidated. RQ WQE completes with error status.
77363 	 * This error is only reported if the send operation did
77364 	 * not fail. If the send operation failed then the remote
77365 	 * invalidate error is not reported.
77366 	 * This is an RX Detected Error.
77367 	 */
77368 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_REM_INVALIDATE		UINT32_C(0x11)
77369 	/*
77370 	 * Local memory error. An RQ/SRQ SGE described an inaccessible
77371 	 * memory.
77372 	 * This is an RX Detected Error.
77373 	 */
77374 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_MEMORY_ERROR		UINT32_C(0x12)
77375 	/*
77376 	 * SRQ in error. The QP is moving to error state because it
77377 	 * found SRQ it uses in error.
77378 	 * This is an RX Detected Error.
77379 	 */
77380 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_SRQ_ERROR		UINT32_C(0x13)
77381 	/*
77382 	 * Completion error. No CQE space available on queue or CQ not
77383 	 * in VALID state.
77384 	 * This is a Completion Detected Error.
77385 	 */
77386 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_CMP_ERROR		UINT32_C(0x14)
77387 	/*
77388 	 * Invalid R_Key while resending responses to duplicate request.
77389 	 * This is a TX Detected Error.
77390 	 */
77391 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_INVALID_DUP_RKEY	UINT32_C(0x15)
77392 	/*
77393 	 * Problem was found in the format of a WQE in the RQ/SRQ.
77394 	 * This is an RX Detected Error.
77395 	 */
77396 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_WQE_FORMAT_ERROR	UINT32_C(0x16)
77397 	/*
77398 	 * Problem was found in the format of an IRRQ entry.
77399 	 * This is a TX Detected Error.
77400 	 */
77401 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_IRRQ_FORMAT_ERROR	UINT32_C(0x17)
77402 	/*
77403 	 * A load error occurred on an attempt to load the CQ Context.
77404 	 * This is a Completion Detected Error.
77405 	 */
77406 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_CQ_LOAD_ERROR		UINT32_C(0x18)
77407 	/*
77408 	 * A load error occurred on an attempt to load the SRQ Context.
77409 	 * This is an RX Detected Error.
77410 	 */
77411 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_SRQ_LOAD_ERROR		UINT32_C(0x19)
77412 	/*
77413 	 * A fatal error was detected on an attempt to read from or
77414 	 * write to PCIe on the transmit side. This error is detected
77415 	 * by the TX side, but has the priority of a Completion
77416 	 * Detected Error.
77417 	 */
77418 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_TX_PCI_ERROR		UINT32_C(0x1b)
77419 	/*
77420 	 * A fatal error was detected on an attempt to read from or
77421 	 * write to PCIe on the receive side. This error is detected
77422 	 * by the RX side (or CAGR), but has the priority of a Completion
77423 	 * Detected Error.
77424 	 */
77425 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_RX_PCI_ERROR		UINT32_C(0x1c)
77426 	/*
77427 	 * When searching the IRRQ to respond to a duplicate request,
77428 	 * RWE could not find the duplicate request in the entire IRRQ.
77429 	 * This is a RX Detected Error.
77430 	 */
77431 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_PSN_NOT_FOUND		UINT32_C(0x1d)
77432 	/*
77433 	 * An express doorbell was posted that overflowed the RQ. The
77434 	 * doorbell is dropped, along with all subsequent doorbells for
77435 	 * this RQ. This is an RX Detected Error.
77436 	 */
77437 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_RQ_OVERFLOW		UINT32_C(0x1e)
77438 	#define CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_LAST			CREQ_QP_ERROR_NOTIFICATION_RES_ERR_STATE_REASON_RES_RQ_OVERFLOW
77439 	/*
77440 	 * Final SQ Consumer Index value. Any additional SQ WQEs will
77441 	 * have to be completed by the user provider.
77442 	 */
77443 	uint16_t	sq_cons_idx;
77444 	/*
77445 	 * Final RQ Consumer Index value. Any additional RQ WQEs will
77446 	 * have to be completed by the user provider.
77447 	 */
77448 	uint16_t	rq_cons_idx;
77449 } creq_qp_error_notification_t, *pcreq_qp_error_notification_t;
77450 
77451 /* CQ error notification event. */
77452 /* creq_cq_error_notification (size:128b/16B) */
77453 
77454 typedef struct creq_cq_error_notification {
77455 	uint8_t	type;
77456 	/*
77457 	 * This field indicates the exact type of the completion.
77458 	 * By convention, the LSB identifies the length of the
77459 	 * record in 16B units. Even values indicate 16B
77460 	 * records. Odd values indicate 32B
77461 	 * records.
77462 	 */
77463 	#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_MASK	UINT32_C(0x3f)
77464 	#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_SFT	0
77465 	/* CQ Async Notification */
77466 		#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_CQ_EVENT  UINT32_C(0x38)
77467 		#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_LAST	CREQ_CQ_ERROR_NOTIFICATION_TYPE_CQ_EVENT
77468 	/* Status of the response. */
77469 	uint8_t	status;
77470 	/* CQ error reason code. */
77471 	uint8_t	cq_err_reason;
77472 	/* Requester completion error for invalid CQ state. */
77473 	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_REQ_CQ_INVALID_ERROR  UINT32_C(0x1)
77474 	/* Requester completion error for CQ overflow. */
77475 	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_REQ_CQ_OVERFLOW_ERROR UINT32_C(0x2)
77476 	/* Attempt to load CQ context resulted in error. */
77477 	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_REQ_CQ_LOAD_ERROR	UINT32_C(0x3)
77478 	/* Responder completion error for invalid CQ state. */
77479 	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_INVALID_ERROR  UINT32_C(0x4)
77480 	/* Responder completion error for CQ overflow. */
77481 	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_OVERFLOW_ERROR UINT32_C(0x5)
77482 	/* Attempt to load CQ context resulted in error. */
77483 	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_LOAD_ERROR	UINT32_C(0x6)
77484 	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_LAST		CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_LOAD_ERROR
77485 	uint8_t	reserved8;
77486 	/* CQ context id */
77487 	uint32_t	xid;
77488 	uint8_t	v;
77489 	/*
77490 	 * This value is written by the NIC such that it will be different
77491 	 * for each pass through the completion queue. The even passes
77492 	 * will write 1. The odd passes will write 0.
77493 	 */
77494 	#define CREQ_CQ_ERROR_NOTIFICATION_V	UINT32_C(0x1)
77495 	/* Event or command opcode. */
77496 	uint8_t	event;
77497 	/* CQ error notification event. */
77498 	#define CREQ_CQ_ERROR_NOTIFICATION_EVENT_CQ_ERROR_NOTIFICATION UINT32_C(0xc1)
77499 	#define CREQ_CQ_ERROR_NOTIFICATION_EVENT_LAST		CREQ_CQ_ERROR_NOTIFICATION_EVENT_CQ_ERROR_NOTIFICATION
77500 	uint8_t	reserved48[6];
77501 } creq_cq_error_notification_t, *pcreq_cq_error_notification_t;
77502 
77503 /* sq_base (size:64b/8B) */
77504 
77505 typedef struct sq_base {
77506 	/* This field defines the type of SQ WQE. */
77507 	uint8_t	wqe_type;
77508 	/* Send */
77509 	#define SQ_BASE_WQE_TYPE_SEND		UINT32_C(0x0)
77510 	/*
77511 	 * Send with Immediate
77512 	 *
77513 	 * Allowed only on reliable connection (RC) and
77514 	 * unreliable datagram (UD) SQs.
77515 	 */
77516 	#define SQ_BASE_WQE_TYPE_SEND_W_IMMEAD	UINT32_C(0x1)
77517 	/*
77518 	 * Send with Invalidate.
77519 	 *
77520 	 * Allowed only on reliable connection (RC) SQs.
77521 	 */
77522 	#define SQ_BASE_WQE_TYPE_SEND_W_INVALID	UINT32_C(0x2)
77523 	/*
77524 	 * RDMA Write.
77525 	 *
77526 	 * Allowed only on reliable connection (RC) SQs.
77527 	 */
77528 	#define SQ_BASE_WQE_TYPE_WRITE_WQE		UINT32_C(0x4)
77529 	/*
77530 	 * RDMA Write with Immediate.
77531 	 *
77532 	 * Allowed only on reliable connection (RC) SQs.
77533 	 */
77534 	#define SQ_BASE_WQE_TYPE_WRITE_W_IMMEAD	UINT32_C(0x5)
77535 	/*
77536 	 * RDMA Read.
77537 	 *
77538 	 * Allowed only on reliable connection (RC) SQs.
77539 	 */
77540 	#define SQ_BASE_WQE_TYPE_READ_WQE		UINT32_C(0x6)
77541 	/*
77542 	 * Atomic Compare/Swap.
77543 	 *
77544 	 * Allowed only on reliable connection (RC) SQs.
77545 	 */
77546 	#define SQ_BASE_WQE_TYPE_ATOMIC_CS		UINT32_C(0x8)
77547 	/*
77548 	 * Atomic Fetch/Add.
77549 	 *
77550 	 * Allowed only on reliable connection (RC) SQs.
77551 	 */
77552 	#define SQ_BASE_WQE_TYPE_ATOMIC_FA		UINT32_C(0xb)
77553 	/*
77554 	 * Local Invalidate.
77555 	 *
77556 	 * Allowed only on reliable connection (RC) SQs.
77557 	 */
77558 	#define SQ_BASE_WQE_TYPE_LOCAL_INVALID	UINT32_C(0xc)
77559 	/*
77560 	 * FR-PMR (Fast Register Physical Memory Region)
77561 	 *
77562 	 * Allowed only on reliable connection (RC) SQs.
77563 	 */
77564 	#define SQ_BASE_WQE_TYPE_FR_PMR		UINT32_C(0xd)
77565 	/*
77566 	 * Memory Bind
77567 	 *
77568 	 * Allowed only on reliable connection (RC) SQs.
77569 	 */
77570 	#define SQ_BASE_WQE_TYPE_BIND		UINT32_C(0xe)
77571 	/*
77572 	 * FR-PPMR (Fast Register Proxy Physical Memory Region)
77573 	 *
77574 	 * Allowed only on reliable connection (RC) SQs.
77575 	 */
77576 	#define SQ_BASE_WQE_TYPE_FR_PPMR		UINT32_C(0xf)
77577 	/* Send V3 */
77578 	#define SQ_BASE_WQE_TYPE_SEND_V3		UINT32_C(0x10)
77579 	/*
77580 	 * Send with Immediate V3
77581 	 *
77582 	 * Allowed only on reliable connection (RC) SQs.
77583 	 */
77584 	#define SQ_BASE_WQE_TYPE_SEND_W_IMMED_V3	UINT32_C(0x11)
77585 	/*
77586 	 * Send with Invalidate V3
77587 	 *
77588 	 * Allowed only on reliable connection (RC) SQs.
77589 	 */
77590 	#define SQ_BASE_WQE_TYPE_SEND_W_INVALID_V3	UINT32_C(0x12)
77591 	/*
77592 	 * UD Send V3
77593 	 *
77594 	 * Allowed only on unreliable datagram (UD) SQs.
77595 	 */
77596 	#define SQ_BASE_WQE_TYPE_UDSEND_V3		UINT32_C(0x13)
77597 	/*
77598 	 * UD Send with Immediate V3
77599 	 *
77600 	 * Allowed only on unreliable datagram (UD) SQs.
77601 	 */
77602 	#define SQ_BASE_WQE_TYPE_UDSEND_W_IMMED_V3	UINT32_C(0x14)
77603 	/*
77604 	 * RDMA Write V3
77605 	 *
77606 	 * Allowed only on reliable connection (RC) SQs.
77607 	 */
77608 	#define SQ_BASE_WQE_TYPE_WRITE_WQE_V3	UINT32_C(0x15)
77609 	/*
77610 	 * RDMA Write with Immediate V3
77611 	 *
77612 	 * Allowed only on reliable connection (RC) SQs.
77613 	 */
77614 	#define SQ_BASE_WQE_TYPE_WRITE_W_IMMED_V3	UINT32_C(0x16)
77615 	/*
77616 	 * RDMA Read V3
77617 	 *
77618 	 * Allowed only on reliable connection (RC) SQs.
77619 	 */
77620 	#define SQ_BASE_WQE_TYPE_READ_WQE_V3	UINT32_C(0x17)
77621 	/*
77622 	 * Atomic Compare/Swap V3
77623 	 *
77624 	 * Allowed only on reliable connection (RC) SQs.
77625 	 */
77626 	#define SQ_BASE_WQE_TYPE_ATOMIC_CS_V3	UINT32_C(0x18)
77627 	/*
77628 	 * Atomic Fetch/Add V3
77629 	 *
77630 	 * Allowed only on reliable connection (RC) SQs.
77631 	 */
77632 	#define SQ_BASE_WQE_TYPE_ATOMIC_FA_V3	UINT32_C(0x19)
77633 	/*
77634 	 * Local Invalidate V3
77635 	 *
77636 	 * Allowed only on reliable connection (RC) SQs.
77637 	 */
77638 	#define SQ_BASE_WQE_TYPE_LOCAL_INVALID_V3	UINT32_C(0x1a)
77639 	/*
77640 	 * FR-PMR (Fast Register Physical Memory Region) V3
77641 	 *
77642 	 * Allowed only on reliable connection (RC) SQs.
77643 	 */
77644 	#define SQ_BASE_WQE_TYPE_FR_PMR_V3		UINT32_C(0x1b)
77645 	/*
77646 	 * Memory Bind V3
77647 	 *
77648 	 * Allowed only on reliable connection (RC) SQs.
77649 	 */
77650 	#define SQ_BASE_WQE_TYPE_BIND_V3		UINT32_C(0x1c)
77651 	/* RawEth/QP1 Send V3 */
77652 	#define SQ_BASE_WQE_TYPE_RAWQP1SEND_V3	UINT32_C(0x1d)
77653 	/* Change UDP Source Port V3 */
77654 	#define SQ_BASE_WQE_TYPE_CHANGE_UDPSRCPORT_V3 UINT32_C(0x1e)
77655 	#define SQ_BASE_WQE_TYPE_LAST		SQ_BASE_WQE_TYPE_CHANGE_UDPSRCPORT_V3
77656 	uint8_t	unused_0[7];
77657 } sq_base_t, *psq_base_t;
77658 
77659 /*
77660  * Most SQ WQEs contain SGEs used to define the SGL used to map payload
77661  * data in host memory. The number of SGE structures is defined by the
77662  * wqe_size field. SGE structures are aligned to 16B boundaries.
77663  *
77664  * In backward-compatible modes there can be 2, 4 or 6 SGEs (based on
77665  * the mode). In variable-sized WQE mode there can be 0-30 SGE
77666  * structures.
77667  */
77668 /* sq_sge (size:128b/16B) */
77669 
77670 typedef struct sq_sge {
77671 	/*
77672 	 * The virtual address in local memory or a physical address
77673 	 * when l_key value is a reserved value of a physical address.
77674 	 * Driver configures this value in the chip and the chip compares
77675 	 * l_key in SGEs with that reserved value, if equal it access
77676 	 * the physical address specified. The chip however MUST verify
77677 	 * that the QP allows the use reserved key.
77678 	 */
77679 	uint64_t	va_or_pa;
77680 	/*
77681 	 * Local Key associated with this registered MR; The 24 msb of
77682 	 * the key used to index the MRW Table and the 8 lsb are compared
77683 	 * with the 8 bits key part stored in the MRWC. The PBL in the
77684 	 * MRW Context is used to translate the above VA to physical
77685 	 * address.
77686 	 */
77687 	uint32_t	l_key;
77688 	/*
77689 	 * Size of SGE in bytes; Based on page size of the system the
77690 	 * chip knows how many entries are in the PBL
77691 	 */
77692 	uint32_t	size;
77693 } sq_sge_t, *psq_sge_t;
77694 
77695 /* sq_psn_search (size:64b/8B) */
77696 
77697 typedef struct sq_psn_search {
77698 	/* Start PSN. */
77699 	uint32_t	opcode_start_psn;
77700 	/* Start PSN. */
77701 	#define SQ_PSN_SEARCH_START_PSN_MASK UINT32_C(0xffffff)
77702 	#define SQ_PSN_SEARCH_START_PSN_SFT 0
77703 	/* The opcodes are software defined. */
77704 	#define SQ_PSN_SEARCH_OPCODE_MASK   UINT32_C(0xff000000)
77705 	#define SQ_PSN_SEARCH_OPCODE_SFT	24
77706 	uint32_t	flags_next_psn;
77707 	/* Next PSN. Equal to the start PSN of the next WQE. */
77708 	#define SQ_PSN_SEARCH_NEXT_PSN_MASK UINT32_C(0xffffff)
77709 	#define SQ_PSN_SEARCH_NEXT_PSN_SFT 0
77710 	/* Opcode specific flags. */
77711 	#define SQ_PSN_SEARCH_FLAGS_MASK   UINT32_C(0xff000000)
77712 	#define SQ_PSN_SEARCH_FLAGS_SFT	24
77713 } sq_psn_search_t, *psq_psn_search_t;
77714 
77715 /* This PSN table structure is used only on devices where variable size WQEs are supported. */
77716 /* sq_psn_search_ext (size:128b/16B) */
77717 
77718 typedef struct sq_psn_search_ext {
77719 	/* Start PSN. */
77720 	uint32_t	opcode_start_psn;
77721 	/* Start PSN. */
77722 	#define SQ_PSN_SEARCH_EXT_START_PSN_MASK UINT32_C(0xffffff)
77723 	#define SQ_PSN_SEARCH_EXT_START_PSN_SFT 0
77724 	/* The opcodes are software defined. */
77725 	#define SQ_PSN_SEARCH_EXT_OPCODE_MASK   UINT32_C(0xff000000)
77726 	#define SQ_PSN_SEARCH_EXT_OPCODE_SFT	24
77727 	uint32_t	flags_next_psn;
77728 	/* Next PSN. Equal to the start PSN of the next WQE. */
77729 	#define SQ_PSN_SEARCH_EXT_NEXT_PSN_MASK UINT32_C(0xffffff)
77730 	#define SQ_PSN_SEARCH_EXT_NEXT_PSN_SFT 0
77731 	/* Opcode specific flags. */
77732 	#define SQ_PSN_SEARCH_EXT_FLAGS_MASK   UINT32_C(0xff000000)
77733 	#define SQ_PSN_SEARCH_EXT_FLAGS_SFT	24
77734 	/*
77735 	 * This field is used only when variable sized WQEs are being used.
77736 	 * This indicates the starting slot index of the corresponding WQE.
77737 	 */
77738 	uint16_t	start_slot_idx;
77739 	/* reserved16 is 16 b */
77740 	uint16_t	reserved16;
77741 	/* reserved32 is 32 b */
77742 	uint32_t	reserved32;
77743 } sq_psn_search_ext_t, *psq_psn_search_ext_t;
77744 
77745 /* This MSN table structure is used only on devices where Hardware based Requester retransmission is used. */
77746 /* sq_msn_search (size:64b/8B) */
77747 
77748 typedef struct sq_msn_search {
77749 	/* MSN search entry. */
77750 	uint64_t	start_idx_next_psn_start_psn;
77751 	/* Start PSN. */
77752 	#define SQ_MSN_SEARCH_START_PSN_MASK UINT32_C(0xffffff)
77753 	#define SQ_MSN_SEARCH_START_PSN_SFT 0
77754 	/* Next PSN. Equal to the start PSN of the next WQE. */
77755 	#define SQ_MSN_SEARCH_NEXT_PSN_MASK 0xffffff000000ULL
77756 	#define SQ_MSN_SEARCH_NEXT_PSN_SFT  24
77757 	/*
77758 	 * For variable-size WQEs, this field indicates the starting
77759 	 * slot index that corresponds to the WQE.
77760 	 * In backward-compatible mode, this is the starting WQE index.
77761 	 */
77762 	#define SQ_MSN_SEARCH_START_IDX_MASK 0xffff000000000000ULL
77763 	#define SQ_MSN_SEARCH_START_IDX_SFT 48
77764 } sq_msn_search_t, *psq_msn_search_t;
77765 
77766 /* Send SQ WQE */
77767 /* sq_send (size:1024b/128B) */
77768 
77769 typedef struct sq_send {
77770 	/* This field defines the type of SQ WQE. */
77771 	uint8_t	wqe_type;
77772 	/* Send */
77773 	#define SQ_SEND_WQE_TYPE_SEND	UINT32_C(0x0)
77774 	/*
77775 	 * Send with Immediate
77776 	 *
77777 	 * Allowed only on reliable connection (RC) and
77778 	 * unreliable datagram (UD) SQs.
77779 	 */
77780 	#define SQ_SEND_WQE_TYPE_SEND_W_IMMEAD  UINT32_C(0x1)
77781 	/*
77782 	 * Send with Invalidate.
77783 	 *
77784 	 * Allowed only on reliable connection (RC) SQs.
77785 	 */
77786 	#define SQ_SEND_WQE_TYPE_SEND_W_INVALID UINT32_C(0x2)
77787 	#define SQ_SEND_WQE_TYPE_LAST	SQ_SEND_WQE_TYPE_SEND_W_INVALID
77788 	uint8_t	flags;
77789 	#define SQ_SEND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
77790 	#define SQ_SEND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
77791 	/*
77792 	 * Set if completion signaling is requested. If this bit is
77793 	 * 0, and the SQ is configured to support Unsignaled completion
77794 	 * the controller should not generate a CQE unless there was
77795 	 * an error. This refers to the CQE on the sender side. (The se
77796 	 * flag refers to the receiver side).
77797 	 */
77798 	#define SQ_SEND_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
77799 	/*
77800 	 * Indication to complete all previous RDMA Read or Atomic WQEs
77801 	 * on the SQ before executing this WQE.
77802 	 *
77803 	 * This flag must be zero for a UD send.
77804 	 */
77805 	#define SQ_SEND_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
77806 	/*
77807 	 * For local invalidate request. Indication to complete all
77808 	 * previous SQ's WQEs before executing this WQE.
77809 	 *
77810 	 * This flag must be zero for a UD send.
77811 	 */
77812 	#define SQ_SEND_FLAGS_UC_FENCE								UINT32_C(0x4)
77813 	/*
77814 	 * Solicit event flag. Indication sent in BTH header to the
77815 	 * receiver to generate a Completion Event Notification, i.e.
77816 	 * CNQE. This bit should be set only in the last (or only) packet
77817 	 * of the message.
77818 	 */
77819 	#define SQ_SEND_FLAGS_SE									UINT32_C(0x8)
77820 	/*
77821 	 * Indicate that inline data is posted to the SQ in the data
77822 	 * area of this WQE.
77823 	 */
77824 	#define SQ_SEND_FLAGS_INLINE								UINT32_C(0x10)
77825 	/*
77826 	 * If set to 1, then the timestamp from the WQE is used. If
77827 	 * cleared to 0, then TWE provides the timestamp.
77828 	 */
77829 	#define SQ_SEND_FLAGS_WQE_TS_EN								UINT32_C(0x20)
77830 	/*
77831 	 * When set to '1', this operation will cause a trace capture in
77832 	 * each block it passes through.
77833 	 */
77834 	#define SQ_SEND_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
77835 	/*
77836 	 * The number of 16 bytes chunks of data including this first
77837 	 * word of the request that are a valid part of the request. The
77838 	 * valid 16 bytes units other than the WQE structure can be
77839 	 * SGEs (Scatter Gather Elements) OR inline data.
77840 	 *
77841 	 * While this field defines the valid WQE size. The actual
77842 	 * total WQE size is always 128B.
77843 	 */
77844 	uint8_t	wqe_size;
77845 	uint8_t	reserved8_1;
77846 	/*
77847 	 * Either invalidate key (R_Key of the remote host) that will
77848 	 * be send with IETH (Invalidate ETH) if wqe_type is of Send
77849 	 * with Invalidate, or immediate value that will be sent with
77850 	 * ImmDt header if wqe_type is Send with Immediate.
77851 	 */
77852 	uint32_t	inv_key_or_imm_data;
77853 	/* This field represents a 32-bit total data length, in bytes. */
77854 	uint32_t	length;
77855 	/*
77856 	 * When in the SQ of a UD QP, indicates the q_key to be used in
77857 	 * the transmitted packet. However, if the most significant bit
77858 	 * of this field is set, then the q_key will be taken from QP
77859 	 * context, rather than from this field.
77860 	 *
77861 	 * When in the SQ of a non-UD QP, this field is reserved and
77862 	 * should be filled with zeros.
77863 	 */
77864 	uint32_t	q_key;
77865 	/*
77866 	 * When in the SQ of a UD QP, indicates the destination QP to be
77867 	 * used in the transmitted packet.
77868 	 *
77869 	 * When in the SQ of a non-UD QP, this field is reserved and
77870 	 * should be filled with zeros.
77871 	 */
77872 	uint32_t	dst_qp;
77873 	#define SQ_SEND_DST_QP_MASK UINT32_C(0xffffff)
77874 	#define SQ_SEND_DST_QP_SFT 0
77875 	uint32_t	avid;
77876 	/*
77877 	 * If the serv_type is 'UD', then this field supplies the AVID
77878 	 * (Address Vector ID).
77879 	 */
77880 	#define SQ_SEND_AVID_MASK UINT32_C(0xfffff)
77881 	#define SQ_SEND_AVID_SFT 0
77882 	uint32_t	reserved32;
77883 	uint32_t	timestamp;
77884 	/*
77885 	 * This field specifies a 24-bit timestamp that can be passed
77886 	 * down the TX path and optionally logged in the TXP timestamp
77887 	 * histogram.
77888 	 */
77889 	#define SQ_SEND_TIMESTAMP_MASK UINT32_C(0xffffff)
77890 	#define SQ_SEND_TIMESTAMP_SFT 0
77891 	/*
77892 	 * When inline=0, then this area is filled with from 1 to 6
77893 	 * SGEs based on the wqe_size field.
77894 	 *
77895 	 * When inline=1, this area is filled with payload data for the
77896 	 * send based on the length_or_AVID field. Bits [7:0] of word 0
77897 	 * hold the first byte to go out on the wire.
77898 	 */
77899 	uint32_t	data[24];
77900 } sq_send_t, *psq_send_t;
77901 
77902 /* Send SQ WQE header. */
77903 /* sq_send_hdr (size:256b/32B) */
77904 
77905 typedef struct sq_send_hdr {
77906 	/* This field defines the type of SQ WQE. */
77907 	uint8_t	wqe_type;
77908 	/* Send */
77909 	#define SQ_SEND_HDR_WQE_TYPE_SEND	UINT32_C(0x0)
77910 	/*
77911 	 * Send with Immediate
77912 	 *
77913 	 * Allowed only on reliable connection (RC) and
77914 	 * unreliable datagram (UD) SQs.
77915 	 */
77916 	#define SQ_SEND_HDR_WQE_TYPE_SEND_W_IMMEAD  UINT32_C(0x1)
77917 	/*
77918 	 * Send with Invalidate.
77919 	 *
77920 	 * Allowed only on reliable connection (RC) SQs.
77921 	 */
77922 	#define SQ_SEND_HDR_WQE_TYPE_SEND_W_INVALID UINT32_C(0x2)
77923 	#define SQ_SEND_HDR_WQE_TYPE_LAST	SQ_SEND_HDR_WQE_TYPE_SEND_W_INVALID
77924 	uint8_t	flags;
77925 	#define SQ_SEND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
77926 	#define SQ_SEND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
77927 	/*
77928 	 * Set if completion signaling is requested. If this bit is
77929 	 * 0, and the SQ is configured to support Unsignaled completion
77930 	 * the controller should not generate a CQE unless there was
77931 	 * an error. This refers to the CQE on the sender side. (The se
77932 	 * flag refers to the receiver side).
77933 	 */
77934 	#define SQ_SEND_HDR_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
77935 	/*
77936 	 * Indication to complete all previous RDMA Read or Atomic WQEs
77937 	 * on the SQ before executing this WQE.
77938 	 *
77939 	 * This flag must be zero for a UD send.
77940 	 */
77941 	#define SQ_SEND_HDR_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
77942 	/*
77943 	 * For local invalidate request. Indication to complete all
77944 	 * previous SQ's WQEs before executing this WQE.
77945 	 *
77946 	 * This flag must be zero for a UD send.
77947 	 */
77948 	#define SQ_SEND_HDR_FLAGS_UC_FENCE								UINT32_C(0x4)
77949 	/*
77950 	 * Solicit event flag. Indication sent in BTH header to the
77951 	 * receiver to generate a Completion Event Notification, i.e.
77952 	 * CNQE. This bit should be set only in the last (or only) packet
77953 	 * of the message.
77954 	 */
77955 	#define SQ_SEND_HDR_FLAGS_SE									UINT32_C(0x8)
77956 	/*
77957 	 * Indicate that inline data is posted to the SQ in the data
77958 	 * area of this WQE.
77959 	 */
77960 	#define SQ_SEND_HDR_FLAGS_INLINE								UINT32_C(0x10)
77961 	/*
77962 	 * If set to 1, then the timestamp from the WQE is used. If
77963 	 * cleared to 0, then TWE provides the timestamp.
77964 	 */
77965 	#define SQ_SEND_HDR_FLAGS_WQE_TS_EN								UINT32_C(0x20)
77966 	/*
77967 	 * When set to '1', this operation will cause a trace capture in
77968 	 * each block it passes through.
77969 	 */
77970 	#define SQ_SEND_HDR_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
77971 	/*
77972 	 * The number of 16 bytes chunks of data including this first
77973 	 * word of the request that are a valid part of the request. The
77974 	 * valid 16 bytes units other than the WQE structure can be
77975 	 * SGEs (Scatter Gather Elements) OR inline data.
77976 	 *
77977 	 * While this field defines the valid WQE size. The actual
77978 	 * total WQE size is always 128B.
77979 	 */
77980 	uint8_t	wqe_size;
77981 	uint8_t	reserved8_1;
77982 	/*
77983 	 * Either invalidate key (R_Key of the remote host) that will
77984 	 * be send with IETH (Invalidate ETH) if wqe_type is of Send
77985 	 * with Invalidate, or immediate value that will be sent with
77986 	 * ImmDt header if wqe_type is Send with Immediate.
77987 	 */
77988 	uint32_t	inv_key_or_imm_data;
77989 	/* This field represents a 32-bit total data length, in bytes. */
77990 	uint32_t	length;
77991 	/*
77992 	 * When in the SQ of a UD QP, indicates the q_key to be used in
77993 	 * the transmitted packet. However, if the most significant bit
77994 	 * of this field is set, then the q_key will be taken from QP
77995 	 * context, rather than from this field.
77996 	 *
77997 	 * When in the SQ of a non-UD QP, this field is reserved and
77998 	 * should be filled with zeros.
77999 	 */
78000 	uint32_t	q_key;
78001 	/*
78002 	 * When in the SQ of a UD QP, indicates the destination QP to be
78003 	 * used in the transmitted packet.
78004 	 *
78005 	 * When in the SQ of a non-UD QP, this field is reserved and
78006 	 * should be filled with zeros.
78007 	 */
78008 	uint32_t	dst_qp;
78009 	#define SQ_SEND_HDR_DST_QP_MASK UINT32_C(0xffffff)
78010 	#define SQ_SEND_HDR_DST_QP_SFT 0
78011 	uint32_t	avid;
78012 	/*
78013 	 * If the serv_type is 'UD', then this field supplies the AVID
78014 	 * (Address Vector ID).
78015 	 */
78016 	#define SQ_SEND_HDR_AVID_MASK UINT32_C(0xfffff)
78017 	#define SQ_SEND_HDR_AVID_SFT 0
78018 	uint32_t	reserved32;
78019 	uint32_t	timestamp;
78020 	/*
78021 	 * This field specifies a 24-bit timestamp that can be passed
78022 	 * down the TX path and optionally logged in the TXP timestamp
78023 	 * histogram.
78024 	 */
78025 	#define SQ_SEND_HDR_TIMESTAMP_MASK UINT32_C(0xffffff)
78026 	#define SQ_SEND_HDR_TIMESTAMP_SFT 0
78027 } sq_send_hdr_t, *psq_send_hdr_t;
78028 
78029 /* Send Raw Ethernet and QP1 SQ WQE */
78030 /* sq_send_raweth_qp1 (size:1024b/128B) */
78031 
78032 typedef struct sq_send_raweth_qp1 {
78033 	/* This field defines the type of SQ WQE. */
78034 	uint8_t	wqe_type;
78035 	/* Send */
78036 	#define SQ_SEND_RAWETH_QP1_WQE_TYPE_SEND UINT32_C(0x0)
78037 	#define SQ_SEND_RAWETH_QP1_WQE_TYPE_LAST SQ_SEND_RAWETH_QP1_WQE_TYPE_SEND
78038 	uint8_t	flags;
78039 	#define SQ_SEND_RAWETH_QP1_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78040 	#define SQ_SEND_RAWETH_QP1_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78041 	/*
78042 	 * Set if completion signaling is requested. If this bit is
78043 	 * 0, and the SQ is configured to support Unsignaled completion
78044 	 * the controller should not generate a CQE unless there was
78045 	 * an error. This refers to the CQE on the sender side. (The se
78046 	 * flag refers to the receiver side).
78047 	 */
78048 	#define SQ_SEND_RAWETH_QP1_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78049 	/* This flag must be zero for a Raweth or QP1 send. */
78050 	#define SQ_SEND_RAWETH_QP1_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78051 	/* This flag must be zero for a Raweth or QP1 send. */
78052 	#define SQ_SEND_RAWETH_QP1_FLAGS_UC_FENCE								UINT32_C(0x4)
78053 	/* This flag must be zero for a Raweth or QP1 send. */
78054 	#define SQ_SEND_RAWETH_QP1_FLAGS_SE									UINT32_C(0x8)
78055 	/*
78056 	 * Indicate that inline data is posted to the SQ in the data
78057 	 * area of this WQE.
78058 	 */
78059 	#define SQ_SEND_RAWETH_QP1_FLAGS_INLINE								UINT32_C(0x10)
78060 	/*
78061 	 * If set to 1, then the timestamp from the WQE is used. If
78062 	 * cleared to 0, then TWE provides the timestamp.
78063 	 */
78064 	#define SQ_SEND_RAWETH_QP1_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78065 	/*
78066 	 * When set to '1', this operation will cause a trace capture in
78067 	 * each block it passes through.
78068 	 */
78069 	#define SQ_SEND_RAWETH_QP1_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78070 	/*
78071 	 * The number of 16 bytes chunks of data including this first
78072 	 * word of the request that are a valid part of the request. The
78073 	 * valid 16 bytes units other than the WQE structure can be
78074 	 * SGEs (Scatter Gather Elements) OR inline data.
78075 	 *
78076 	 * While this field defines the valid WQE size. The actual
78077 	 * total WQE size is always 128B.
78078 	 */
78079 	uint8_t	wqe_size;
78080 	uint8_t	reserved8;
78081 	/*
78082 	 * All bits in this field must be valid on the first BD of a packet.
78083 	 * Their value on other BDs of the packet will be ignored.
78084 	 */
78085 	uint16_t	lflags;
78086 	/*
78087 	 * If set to 1, the controller replaces the TCP/UPD checksum
78088 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
78089 	 * checksum field of the encapsulated TCP/UDP packets with the
78090 	 * hardware calculated TCP/UDP checksum for the packet associated
78091 	 * with this descriptor.
78092 	 *
78093 	 * This bit must be valid on the first BD of a packet.
78094 	 */
78095 	#define SQ_SEND_RAWETH_QP1_LFLAGS_TCP_UDP_CHKSUM	UINT32_C(0x1)
78096 	/*
78097 	 * If set to 1, the controller replaces the IP checksum of the
78098 	 * normal packets, or the inner IP checksum of the encapsulated
78099 	 * packets with the hardware calculated IP checksum for the
78100 	 * packet associated with this descriptor.
78101 	 *
78102 	 * This bit must be valid on the first BD of a packet.
78103 	 */
78104 	#define SQ_SEND_RAWETH_QP1_LFLAGS_IP_CHKSUM	UINT32_C(0x2)
78105 	/*
78106 	 * If set to 1, the controller will not append an Ethernet CRC
78107 	 * to the end of the frame.
78108 	 *
78109 	 * This bit must be valid on the first BD of a packet.
78110 	 *
78111 	 * Packet must be 64B or longer when this flag is set. It is not
78112 	 * useful to use this bit with any form of TX offload such as
78113 	 * CSO or LSO. The intent is that the packet from the host already
78114 	 * has a valid Ethernet CRC on the packet.
78115 	 */
78116 	#define SQ_SEND_RAWETH_QP1_LFLAGS_NOCRC		UINT32_C(0x4)
78117 	/*
78118 	 * If set to 1, the device will record the time at which the packet
78119 	 * was actually transmitted at the TX MAC.
78120 	 *
78121 	 * This bit must be valid on the first BD of a packet.
78122 	 */
78123 	#define SQ_SEND_RAWETH_QP1_LFLAGS_STAMP		UINT32_C(0x8)
78124 	/*
78125 	 * If set to 1, The controller replaces the tunnel IP checksum
78126 	 * field with hardware calculated IP checksum for the IP header
78127 	 * of the packet associated with this descriptor. In case of
78128 	 * VXLAN, the controller also replaces the outer header UDP
78129 	 * checksum with hardware calculated UDP checksum for the packet
78130 	 * associated with this descriptor.
78131 	 */
78132 	#define SQ_SEND_RAWETH_QP1_LFLAGS_T_IP_CHKSUM	UINT32_C(0x10)
78133 	/*
78134 	 * If set to '1', then the RoCE ICRC will be appended to the
78135 	 * packet. Packet must be a valid RoCE format packet.
78136 	 */
78137 	#define SQ_SEND_RAWETH_QP1_LFLAGS_ROCE_CRC	UINT32_C(0x100)
78138 	/*
78139 	 * If set to '1', then the FCoE CRC will be appended to the
78140 	 * packet. Packet must be a valid FCoE format packet.
78141 	 */
78142 	#define SQ_SEND_RAWETH_QP1_LFLAGS_FCOE_CRC	UINT32_C(0x200)
78143 	/*
78144 	 * This value selects a CFA action to perform on the packet.
78145 	 * Set this value to zero if no CFA action is desired.
78146 	 *
78147 	 * This value must be valid on the first BD of a packet.
78148 	 */
78149 	uint16_t	cfa_action;
78150 	/*
78151 	 * This field represents a 32-bit total data length, in bytes.
78152 	 * Note, however, that the length cannot exceed the MTU.
78153 	 */
78154 	uint32_t	length;
78155 	uint32_t	reserved32_1;
78156 	/*
78157 	 * This value is action meta-data that defines CFA edit operations
78158 	 * that are done in addition to any action editing.
78159 	 */
78160 	uint32_t	cfa_meta;
78161 	/* When key=1, This is the VLAN tag VID value. */
78162 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_VID_MASK	UINT32_C(0xfff)
78163 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_VID_SFT	0
78164 	/* When key=1, This is the VLAN tag DE value. */
78165 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_DE	UINT32_C(0x1000)
78166 	/* When key=1, This is the VLAN tag PRI value. */
78167 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_PRI_MASK	UINT32_C(0xe000)
78168 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_PRI_SFT	13
78169 	/* When key=1, This is the VLAN tag TPID select value. */
78170 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_MASK	UINT32_C(0x70000)
78171 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_SFT	16
78172 	/* 0x88a8 */
78173 		#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID88A8  (UINT32_C(0x0) << 16)
78174 	/* 0x8100 */
78175 		#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID8100  (UINT32_C(0x1) << 16)
78176 	/* 0x9100 */
78177 		#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9100  (UINT32_C(0x2) << 16)
78178 	/* 0x9200 */
78179 		#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9200  (UINT32_C(0x3) << 16)
78180 	/* 0x9300 */
78181 		#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9300  (UINT32_C(0x4) << 16)
78182 	/* Value programmed in CFA VLANTPID register. */
78183 		#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPIDCFG   (UINT32_C(0x5) << 16)
78184 		#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_LAST	SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPIDCFG
78185 	/* When key=1, This is the VLAN tag TPID select value. */
78186 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_RESERVED_MASK UINT32_C(0xff80000)
78187 	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_RESERVED_SFT 19
78188 	/*
78189 	 * This field identifies the type of edit to be performed
78190 	 * on the packet.
78191 	 *
78192 	 * This value must be valid on the first BD of a packet.
78193 	 */
78194 	#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_MASK	UINT32_C(0xf0000000)
78195 	#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_SFT	28
78196 	/* No editing */
78197 		#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_NONE		(UINT32_C(0x0) << 28)
78198 	/*
78199 	 * - meta[17:16] - TPID select value (0 = 0x8100).
78200 	 * - meta[15:12] - PRI/DE value.
78201 	 * - meta[11:0] - VID value.
78202 	 */
78203 		#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_VLAN_TAG	(UINT32_C(0x1) << 28)
78204 		#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_LAST	SQ_SEND_RAWETH_QP1_CFA_META_KEY_VLAN_TAG
78205 	uint32_t	reserved32_2;
78206 	uint32_t	reserved32_3;
78207 	uint32_t	timestamp;
78208 	/*
78209 	 * This field specifies a 24-bit timestamp that can be passed
78210 	 * down the TX path and optionally logged in the TXP timestamp
78211 	 * histogram.
78212 	 */
78213 	#define SQ_SEND_RAWETH_QP1_TIMESTAMP_MASK UINT32_C(0xffffff)
78214 	#define SQ_SEND_RAWETH_QP1_TIMESTAMP_SFT 0
78215 	/*
78216 	 * When inline=0, then this area is filled with from 1 to 6
78217 	 * SGEs based on the wqe_size field.
78218 	 *
78219 	 * When inline=1, this area is filled with payload data for the
78220 	 * send based on the length_or_AVID field. Bits [7:0] of word 0
78221 	 * hold the first byte to go out on the wire.
78222 	 */
78223 	uint32_t	data[24];
78224 } sq_send_raweth_qp1_t, *psq_send_raweth_qp1_t;
78225 
78226 /* Send Raw Ethernet and QP1 SQ WQE header. */
78227 /* sq_send_raweth_qp1_hdr (size:256b/32B) */
78228 
78229 typedef struct sq_send_raweth_qp1_hdr {
78230 	/* This field defines the type of SQ WQE. */
78231 	uint8_t	wqe_type;
78232 	/* Send */
78233 	#define SQ_SEND_RAWETH_QP1_HDR_WQE_TYPE_SEND UINT32_C(0x0)
78234 	#define SQ_SEND_RAWETH_QP1_HDR_WQE_TYPE_LAST SQ_SEND_RAWETH_QP1_HDR_WQE_TYPE_SEND
78235 	uint8_t	flags;
78236 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78237 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78238 	/*
78239 	 * Set if completion signaling is requested. If this bit is
78240 	 * 0, and the SQ is configured to support Unsignaled completion
78241 	 * the controller should not generate a CQE unless there was
78242 	 * an error. This refers to the CQE on the sender side. (The se
78243 	 * flag refers to the receiver side).
78244 	 */
78245 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78246 	/* This flag must be zero for a Raweth or QP1 send. */
78247 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78248 	/* This flag must be zero for a Raweth or QP1 send. */
78249 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_UC_FENCE								UINT32_C(0x4)
78250 	/* This flag must be zero for a Raweth or QP1 send. */
78251 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_SE									UINT32_C(0x8)
78252 	/*
78253 	 * Indicate that inline data is posted to the SQ in the data
78254 	 * area of this WQE.
78255 	 */
78256 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_INLINE								UINT32_C(0x10)
78257 	/*
78258 	 * If set to 1, then the timestamp from the WQE is used. If
78259 	 * cleared to 0, then TWE provides the timestamp.
78260 	 */
78261 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78262 	/*
78263 	 * When set to '1', this operation will cause a trace capture in
78264 	 * each block it passes through.
78265 	 */
78266 	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78267 	/*
78268 	 * The number of 16 bytes chunks of data including this first
78269 	 * word of the request that are a valid part of the request. The
78270 	 * valid 16 bytes units other than the WQE structure can be
78271 	 * SGEs (Scatter Gather Elements) OR inline data.
78272 	 *
78273 	 * While this field defines the valid WQE size. The actual
78274 	 * total WQE size is always 128B.
78275 	 */
78276 	uint8_t	wqe_size;
78277 	uint8_t	reserved8;
78278 	/*
78279 	 * All bits in this field must be valid on the first BD of a packet.
78280 	 * Their value on other BDs of the packet will be ignored.
78281 	 */
78282 	uint16_t	lflags;
78283 	/*
78284 	 * If set to 1, the controller replaces the TCP/UPD checksum
78285 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
78286 	 * checksum field of the encapsulated TCP/UDP packets with the
78287 	 * hardware calculated TCP/UDP checksum for the packet associated
78288 	 * with this descriptor.
78289 	 *
78290 	 * This bit must be valid on the first BD of a packet.
78291 	 */
78292 	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_TCP_UDP_CHKSUM	UINT32_C(0x1)
78293 	/*
78294 	 * If set to 1, the controller replaces the IP checksum of the
78295 	 * normal packets, or the inner IP checksum of the encapsulated
78296 	 * packets with the hardware calculated IP checksum for the
78297 	 * packet associated with this descriptor.
78298 	 *
78299 	 * This bit must be valid on the first BD of a packet.
78300 	 */
78301 	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_IP_CHKSUM	UINT32_C(0x2)
78302 	/*
78303 	 * If set to 1, the controller will not append an Ethernet CRC
78304 	 * to the end of the frame.
78305 	 *
78306 	 * This bit must be valid on the first BD of a packet.
78307 	 *
78308 	 * Packet must be 64B or longer when this flag is set. It is not
78309 	 * useful to use this bit with any form of TX offload such as
78310 	 * CSO or LSO. The intent is that the packet from the host already
78311 	 * has a valid Ethernet CRC on the packet.
78312 	 */
78313 	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_NOCRC		UINT32_C(0x4)
78314 	/*
78315 	 * If set to 1, the device will record the time at which the packet
78316 	 * was actually transmitted at the TX MAC.
78317 	 *
78318 	 * This bit must be valid on the first BD of a packet.
78319 	 */
78320 	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_STAMP		UINT32_C(0x8)
78321 	/*
78322 	 * If set to 1, The controller replaces the tunnel IP checksum
78323 	 * field with hardware calculated IP checksum for the IP header
78324 	 * of the packet associated with this descriptor. In case of
78325 	 * VXLAN, the controller also replaces the outer header UDP
78326 	 * checksum with hardware calculated UDP checksum for the packet
78327 	 * associated with this descriptor.
78328 	 */
78329 	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_T_IP_CHKSUM	UINT32_C(0x10)
78330 	/*
78331 	 * If set to '1', then the RoCE ICRC will be appended to the
78332 	 * packet. Packet must be a valid RoCE format packet.
78333 	 */
78334 	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_ROCE_CRC	UINT32_C(0x100)
78335 	/*
78336 	 * If set to '1', then the FCoE CRC will be appended to the
78337 	 * packet. Packet must be a valid FCoE format packet.
78338 	 */
78339 	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_FCOE_CRC	UINT32_C(0x200)
78340 	/*
78341 	 * This value selects a CFA action to perform on the packet.
78342 	 * Set this value to zero if no CFA action is desired.
78343 	 *
78344 	 * This value must be valid on the first BD of a packet.
78345 	 */
78346 	uint16_t	cfa_action;
78347 	/*
78348 	 * This field represents a 32-bit total data length, in bytes.
78349 	 * Note, however, that the length cannot exceed the MTU.
78350 	 */
78351 	uint32_t	length;
78352 	uint32_t	reserved32_1;
78353 	/*
78354 	 * This value is action meta-data that defines CFA edit operations
78355 	 * that are done in addition to any action editing.
78356 	 */
78357 	uint32_t	cfa_meta;
78358 	/* When key=1, This is the VLAN tag VID value. */
78359 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_VID_MASK	UINT32_C(0xfff)
78360 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_VID_SFT	0
78361 	/* When key=1, This is the VLAN tag DE value. */
78362 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_DE	UINT32_C(0x1000)
78363 	/* When key=1, This is the VLAN tag PRI value. */
78364 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_PRI_MASK	UINT32_C(0xe000)
78365 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_PRI_SFT	13
78366 	/* When key=1, This is the VLAN tag TPID select value. */
78367 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_MASK	UINT32_C(0x70000)
78368 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_SFT	16
78369 	/* 0x88a8 */
78370 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID88A8  (UINT32_C(0x0) << 16)
78371 	/* 0x8100 */
78372 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID8100  (UINT32_C(0x1) << 16)
78373 	/* 0x9100 */
78374 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID9100  (UINT32_C(0x2) << 16)
78375 	/* 0x9200 */
78376 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID9200  (UINT32_C(0x3) << 16)
78377 	/* 0x9300 */
78378 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID9300  (UINT32_C(0x4) << 16)
78379 	/* Value programmed in CFA VLANTPID register. */
78380 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPIDCFG   (UINT32_C(0x5) << 16)
78381 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_LAST	SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPIDCFG
78382 	/* When key=1, This is the VLAN tag TPID select value. */
78383 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_RESERVED_MASK UINT32_C(0xff80000)
78384 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_RESERVED_SFT 19
78385 	/*
78386 	 * This field identifies the type of edit to be performed
78387 	 * on the packet.
78388 	 *
78389 	 * This value must be valid on the first BD of a packet.
78390 	 */
78391 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_MASK	UINT32_C(0xf0000000)
78392 	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_SFT	28
78393 	/* No editing */
78394 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_NONE		(UINT32_C(0x0) << 28)
78395 	/*
78396 	 * - meta[17:16] - TPID select value (0 = 0x8100).
78397 	 * - meta[15:12] - PRI/DE value.
78398 	 * - meta[11:0] - VID value.
78399 	 */
78400 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_VLAN_TAG	(UINT32_C(0x1) << 28)
78401 		#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_LAST	SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_VLAN_TAG
78402 	uint32_t	reserved32_2;
78403 	uint32_t	reserved32_3;
78404 	uint32_t	timestamp;
78405 	/*
78406 	 * This field specifies a 24-bit timestamp that can be passed
78407 	 * down the TX path and optionally logged in the TXP timestamp
78408 	 * histogram.
78409 	 */
78410 	#define SQ_SEND_RAWETH_QP1_HDR_TIMESTAMP_MASK UINT32_C(0xffffff)
78411 	#define SQ_SEND_RAWETH_QP1_HDR_TIMESTAMP_SFT 0
78412 } sq_send_raweth_qp1_hdr_t, *psq_send_raweth_qp1_hdr_t;
78413 
78414 /* RDMA SQ WQE */
78415 /* sq_rdma (size:1024b/128B) */
78416 
78417 typedef struct sq_rdma {
78418 	/* This field defines the type of SQ WQE. */
78419 	uint8_t	wqe_type;
78420 	/*
78421 	 * RDMA Write.
78422 	 *
78423 	 * Allowed only on reliable connection (RC) SQs.
78424 	 */
78425 	#define SQ_RDMA_WQE_TYPE_WRITE_WQE	UINT32_C(0x4)
78426 	/*
78427 	 * RDMA Write with Immediate.
78428 	 *
78429 	 * Allowed only on reliable connection (RC) SQs.
78430 	 */
78431 	#define SQ_RDMA_WQE_TYPE_WRITE_W_IMMEAD UINT32_C(0x5)
78432 	/*
78433 	 * RDMA Read.
78434 	 *
78435 	 * Allowed only on reliable connection (RC) SQs.
78436 	 */
78437 	#define SQ_RDMA_WQE_TYPE_READ_WQE	UINT32_C(0x6)
78438 	#define SQ_RDMA_WQE_TYPE_LAST	SQ_RDMA_WQE_TYPE_READ_WQE
78439 	uint8_t	flags;
78440 	#define SQ_RDMA_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78441 	#define SQ_RDMA_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78442 	/*
78443 	 * Set if completion signaling is requested. If this bit is
78444 	 * 0, and the SQ is configured to support Unsignaled
78445 	 * completion the controller should not generate a CQE
78446 	 * unless there was an error. This refers to CQE on the
78447 	 * sender side (se_flag refers to the receiver side)
78448 	 */
78449 	#define SQ_RDMA_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78450 	/*
78451 	 * Indication to complete all previous RDMA Read or Atomic
78452 	 * WQEs on the SQ before executing this WQE
78453 	 */
78454 	#define SQ_RDMA_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78455 	/*
78456 	 * Unconditional fence. Indication to complete all previous
78457 	 * SQ's WQEs before executing this WQE.
78458 	 */
78459 	#define SQ_RDMA_FLAGS_UC_FENCE								UINT32_C(0x4)
78460 	/*
78461 	 * Solicit event. Indication sent in BTH header to the
78462 	 * receiver to generate a Completion Event Notification,
78463 	 * i.e. CNQE. This bit should be set only in the last (or
78464 	 * only) packet of the message.
78465 	 */
78466 	#define SQ_RDMA_FLAGS_SE									UINT32_C(0x8)
78467 	/*
78468 	 * Indicate that inline data is posted to the SQ following
78469 	 * this WQE. This bit may be 1 only for write operations.
78470 	 */
78471 	#define SQ_RDMA_FLAGS_INLINE								UINT32_C(0x10)
78472 	/*
78473 	 * If set to 1, then the timestamp from the WQE is used. If
78474 	 * cleared to 0, then TWE provides the timestamp.
78475 	 */
78476 	#define SQ_RDMA_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78477 	/*
78478 	 * When set to '1', this operation will cause a trace capture in
78479 	 * each block it passes through.
78480 	 */
78481 	#define SQ_RDMA_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78482 	/*
78483 	 * The number of 16 bytes chunks of data including this first
78484 	 * wqe of the request that are a valid part of the request. The
78485 	 * valid 16 bytes units other than the WQE structure can be
78486 	 * SGEs (Scatter Gather Elements) OR inline data.
78487 	 *
78488 	 * While this field defines the valid WQE size. The actual
78489 	 * total WQE size is always 128B.
78490 	 */
78491 	uint8_t	wqe_size;
78492 	uint8_t	reserved8;
78493 	/*
78494 	 * Immediate data - valid for RDMA Write with immediate and
78495 	 * causes the controller to add immDt header with this value
78496 	 */
78497 	uint32_t	imm_data;
78498 	/* Total data length in bytes */
78499 	uint32_t	length;
78500 	uint32_t	reserved32_1;
78501 	/* Remote VA sent to the destination QP */
78502 	uint64_t	remote_va;
78503 	/*
78504 	 * R_Key provided by remote node when the connection was
78505 	 * established and placed in the RETH header. It identify the
78506 	 * MRW on the remote host
78507 	 */
78508 	uint32_t	remote_key;
78509 	uint32_t	timestamp;
78510 	/*
78511 	 * This field specifies a 24-bit timestamp that can be passed
78512 	 * down the TX path and optionally logged in the TXP timestamp
78513 	 * histogram.
78514 	 */
78515 	#define SQ_RDMA_TIMESTAMP_MASK UINT32_C(0xffffff)
78516 	#define SQ_RDMA_TIMESTAMP_SFT 0
78517 	/*
78518 	 * When inline=0, then this area is filled with from 1 to 6
78519 	 * SGEs based on the wqe_size field.
78520 	 *
78521 	 * When inline=1, this area is filled with payload data for the
78522 	 * write based on the length field. Bits [7:0] of word 0
78523 	 * hold the first byte to go out on the wire.
78524 	 */
78525 	uint32_t	data[24];
78526 } sq_rdma_t, *psq_rdma_t;
78527 
78528 /* RDMA SQ WQE header. */
78529 /* sq_rdma_hdr (size:256b/32B) */
78530 
78531 typedef struct sq_rdma_hdr {
78532 	/* This field defines the type of SQ WQE. */
78533 	uint8_t	wqe_type;
78534 	/*
78535 	 * RDMA Write.
78536 	 *
78537 	 * Allowed only on reliable connection (RC) SQs.
78538 	 */
78539 	#define SQ_RDMA_HDR_WQE_TYPE_WRITE_WQE	UINT32_C(0x4)
78540 	/*
78541 	 * RDMA Write with Immediate.
78542 	 *
78543 	 * Allowed only on reliable connection (RC) SQs.
78544 	 */
78545 	#define SQ_RDMA_HDR_WQE_TYPE_WRITE_W_IMMEAD UINT32_C(0x5)
78546 	/*
78547 	 * RDMA Read.
78548 	 *
78549 	 * Allowed only on reliable connection (RC) SQs.
78550 	 */
78551 	#define SQ_RDMA_HDR_WQE_TYPE_READ_WQE	UINT32_C(0x6)
78552 	#define SQ_RDMA_HDR_WQE_TYPE_LAST	SQ_RDMA_HDR_WQE_TYPE_READ_WQE
78553 	uint8_t	flags;
78554 	#define SQ_RDMA_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78555 	#define SQ_RDMA_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78556 	/*
78557 	 * Set if completion signaling is requested. If this bit is
78558 	 * 0, and the SQ is configured to support Unsignaled
78559 	 * completion the controller should not generate a CQE
78560 	 * unless there was an error. This refers to CQE on the
78561 	 * sender side (se_flag refers to the receiver side)
78562 	 */
78563 	#define SQ_RDMA_HDR_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78564 	/*
78565 	 * Indication to complete all previous RDMA Read or Atomic
78566 	 * WQEs on the SQ before executing this WQE
78567 	 */
78568 	#define SQ_RDMA_HDR_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78569 	/*
78570 	 * Unconditional fence. Indication to complete all previous
78571 	 * SQ's WQEs before executing this WQE.
78572 	 */
78573 	#define SQ_RDMA_HDR_FLAGS_UC_FENCE								UINT32_C(0x4)
78574 	/*
78575 	 * Solicit event. Indication sent in BTH header to the
78576 	 * receiver to generate a Completion Event Notification,
78577 	 * i.e. CNQE. This bit should be set only in the last (or
78578 	 * only) packet of the message.
78579 	 */
78580 	#define SQ_RDMA_HDR_FLAGS_SE									UINT32_C(0x8)
78581 	/*
78582 	 * Indicate that inline data is posted to the SQ following
78583 	 * this WQE. This bit may be 1 only for write operations.
78584 	 */
78585 	#define SQ_RDMA_HDR_FLAGS_INLINE								UINT32_C(0x10)
78586 	/*
78587 	 * If set to 1, then the timestamp from the WQE is used. If
78588 	 * cleared to 0, then TWE provides the timestamp.
78589 	 */
78590 	#define SQ_RDMA_HDR_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78591 	/*
78592 	 * When set to '1', this operation will cause a trace capture in
78593 	 * each block it passes through.
78594 	 */
78595 	#define SQ_RDMA_HDR_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78596 	/*
78597 	 * The number of 16 bytes chunks of data including this first
78598 	 * wqe of the request that are a valid part of the request. The
78599 	 * valid 16 bytes units other than the WQE structure can be
78600 	 * SGEs (Scatter Gather Elements) OR inline data.
78601 	 *
78602 	 * While this field defines the valid WQE size. The actual
78603 	 * total WQE size is always 128B.
78604 	 */
78605 	uint8_t	wqe_size;
78606 	uint8_t	reserved8;
78607 	/*
78608 	 * Immediate data - valid for RDMA Write with immediate and
78609 	 * causes the controller to add immDt header with this value
78610 	 */
78611 	uint32_t	imm_data;
78612 	/* Total data length in bytes */
78613 	uint32_t	length;
78614 	uint32_t	reserved32_1;
78615 	/* Remote VA sent to the destination QP */
78616 	uint64_t	remote_va;
78617 	/*
78618 	 * R_Key provided by remote node when the connection was
78619 	 * established and placed in the RETH header. It identify the
78620 	 * MRW on the remote host
78621 	 */
78622 	uint32_t	remote_key;
78623 	uint32_t	timestamp;
78624 	/*
78625 	 * This field specifies a 24-bit timestamp that can be passed
78626 	 * down the TX path and optionally logged in the TXP timestamp
78627 	 * histogram.
78628 	 */
78629 	#define SQ_RDMA_HDR_TIMESTAMP_MASK UINT32_C(0xffffff)
78630 	#define SQ_RDMA_HDR_TIMESTAMP_SFT 0
78631 } sq_rdma_hdr_t, *psq_rdma_hdr_t;
78632 
78633 /* Atomic SQ WQE */
78634 /* sq_atomic (size:1024b/128B) */
78635 
78636 typedef struct sq_atomic {
78637 	/* This field defines the type of SQ WQE. */
78638 	uint8_t	wqe_type;
78639 	/*
78640 	 * Atomic Compare/Swap.
78641 	 *
78642 	 * Allowed only on reliable connection (RC) SQs.
78643 	 */
78644 	#define SQ_ATOMIC_WQE_TYPE_ATOMIC_CS UINT32_C(0x8)
78645 	/*
78646 	 * Atomic Fetch/Add.
78647 	 *
78648 	 * Allowed only on reliable connection (RC) SQs.
78649 	 */
78650 	#define SQ_ATOMIC_WQE_TYPE_ATOMIC_FA UINT32_C(0xb)
78651 	#define SQ_ATOMIC_WQE_TYPE_LAST	SQ_ATOMIC_WQE_TYPE_ATOMIC_FA
78652 	uint8_t	flags;
78653 	#define SQ_ATOMIC_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78654 	#define SQ_ATOMIC_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78655 	/*
78656 	 * Set if completion signaling is requested. If this bit is
78657 	 * 0, and the SQ is configured to support Unsignaled
78658 	 * completion the controller should not generate a CQE
78659 	 * unless there was an error. This refers to CQE on the
78660 	 * sender side (se_flag refers to the receiver side)
78661 	 */
78662 	#define SQ_ATOMIC_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78663 	/*
78664 	 * Indication to complete all previous RDMA Read or Atomic
78665 	 * WQEs on the SQ before executing this WQE
78666 	 */
78667 	#define SQ_ATOMIC_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78668 	/*
78669 	 * Unconditional fence. Indication to complete all previous
78670 	 * SQ's WQEs before executing this WQE.
78671 	 */
78672 	#define SQ_ATOMIC_FLAGS_UC_FENCE								UINT32_C(0x4)
78673 	/*
78674 	 * Solicit event. Indication sent in BTH header to the
78675 	 * receiver to generate a Completion Event Notification,
78676 	 * i.e. CNQE. This bit should be set only in the last (or
78677 	 * only) packet of the message.
78678 	 */
78679 	#define SQ_ATOMIC_FLAGS_SE									UINT32_C(0x8)
78680 	/* NA for this WQE */
78681 	#define SQ_ATOMIC_FLAGS_INLINE								UINT32_C(0x10)
78682 	/*
78683 	 * The atomic WQE does not have a timestamp field, so this field is
78684 	 * ignored and should be zero.
78685 	 */
78686 	#define SQ_ATOMIC_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78687 	/*
78688 	 * When set to '1', this operation will cause a trace capture in
78689 	 * each block it passes through.
78690 	 */
78691 	#define SQ_ATOMIC_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78692 	uint16_t	reserved16;
78693 	/*
78694 	 * R_Key provided by remote node when the connection was
78695 	 * established and placed in the AETH header. It identify the
78696 	 * MRW on the remote host
78697 	 */
78698 	uint32_t	remote_key;
78699 	/* Remote VA sent to the destination QP */
78700 	uint64_t	remote_va;
78701 	/* Data value to be placed in remote host specified address */
78702 	uint64_t	swap_data;
78703 	/*
78704 	 * Data value to be compared with the value in the remote host
78705 	 * specified address
78706 	 */
78707 	uint64_t	cmp_data;
78708 	/*
78709 	 * The first 16B of the data field must be filled with a single
78710 	 * SGE. This will be used to store the return value from the
78711 	 * Atomic Ack response. The size of the single SGE must be 8B.
78712 	 */
78713 	uint32_t	data[24];
78714 } sq_atomic_t, *psq_atomic_t;
78715 
78716 /* Atomic SQ WQE header. */
78717 /* sq_atomic_hdr (size:256b/32B) */
78718 
78719 typedef struct sq_atomic_hdr {
78720 	/* This field defines the type of SQ WQE. */
78721 	uint8_t	wqe_type;
78722 	/*
78723 	 * Atomic Compare/Swap.
78724 	 *
78725 	 * Allowed only on reliable connection (RC) SQs.
78726 	 */
78727 	#define SQ_ATOMIC_HDR_WQE_TYPE_ATOMIC_CS UINT32_C(0x8)
78728 	/*
78729 	 * Atomic Fetch/Add.
78730 	 *
78731 	 * Allowed only on reliable connection (RC) SQs.
78732 	 */
78733 	#define SQ_ATOMIC_HDR_WQE_TYPE_ATOMIC_FA UINT32_C(0xb)
78734 	#define SQ_ATOMIC_HDR_WQE_TYPE_LAST	SQ_ATOMIC_HDR_WQE_TYPE_ATOMIC_FA
78735 	uint8_t	flags;
78736 	#define SQ_ATOMIC_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78737 	#define SQ_ATOMIC_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78738 	/*
78739 	 * Set if completion signaling is requested. If this bit is
78740 	 * 0, and the SQ is configured to support Unsignaled
78741 	 * completion the controller should not generate a CQE
78742 	 * unless there was an error. This refers to CQE on the
78743 	 * sender side (se_flag refers to the receiver side)
78744 	 */
78745 	#define SQ_ATOMIC_HDR_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78746 	/*
78747 	 * Indication to complete all previous RDMA Read or Atomic
78748 	 * WQEs on the SQ before executing this WQE
78749 	 */
78750 	#define SQ_ATOMIC_HDR_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78751 	/*
78752 	 * Unconditional fence. Indication to complete all previous
78753 	 * SQ's WQEs before executing this WQE.
78754 	 */
78755 	#define SQ_ATOMIC_HDR_FLAGS_UC_FENCE								UINT32_C(0x4)
78756 	/*
78757 	 * Solicit event. Indication sent in BTH header to the
78758 	 * receiver to generate a Completion Event Notification,
78759 	 * i.e. CNQE. This bit should be set only in the last (or
78760 	 * only) packet of the message.
78761 	 */
78762 	#define SQ_ATOMIC_HDR_FLAGS_SE									UINT32_C(0x8)
78763 	/* NA for this WQE */
78764 	#define SQ_ATOMIC_HDR_FLAGS_INLINE								UINT32_C(0x10)
78765 	/*
78766 	 * The atomic WQE does not have a timestamp field, so this field is
78767 	 * ignored and should be zero.
78768 	 */
78769 	#define SQ_ATOMIC_HDR_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78770 	/*
78771 	 * When set to '1', this operation will cause a trace capture in
78772 	 * each block it passes through.
78773 	 */
78774 	#define SQ_ATOMIC_HDR_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78775 	uint16_t	reserved16;
78776 	/*
78777 	 * R_Key provided by remote node when the connection was
78778 	 * established and placed in the AETH header. It identify the
78779 	 * MRW on the remote host
78780 	 */
78781 	uint32_t	remote_key;
78782 	/* Remote VA sent to the destination QP */
78783 	uint64_t	remote_va;
78784 	/* Data value to be placed in remote host specified address */
78785 	uint64_t	swap_data;
78786 	/*
78787 	 * Data value to be compared with the value in the remote host
78788 	 * specified address
78789 	 */
78790 	uint64_t	cmp_data;
78791 } sq_atomic_hdr_t, *psq_atomic_hdr_t;
78792 
78793 /* Local Invalidate SQ WQE */
78794 /* sq_localinvalidate (size:1024b/128B) */
78795 
78796 typedef struct sq_localinvalidate {
78797 	/* This field defines the type of SQ WQE. */
78798 	uint8_t	wqe_type;
78799 	/*
78800 	 * Local Invalidate.
78801 	 *
78802 	 * Allowed only on reliable connection (RC) SQs.
78803 	 */
78804 	#define SQ_LOCALINVALIDATE_WQE_TYPE_LOCAL_INVALID UINT32_C(0xc)
78805 	#define SQ_LOCALINVALIDATE_WQE_TYPE_LAST	SQ_LOCALINVALIDATE_WQE_TYPE_LOCAL_INVALID
78806 	uint8_t	flags;
78807 	#define SQ_LOCALINVALIDATE_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78808 	#define SQ_LOCALINVALIDATE_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78809 	/*
78810 	 * Set if completion signaling is requested. If this bit is
78811 	 * 0, and the SQ is configured to support Unsignaled
78812 	 * completion the controller should not generate a CQE
78813 	 * unless there was an error. This refers to CQE on the
78814 	 * sender side (se_flag refers to the receiver side)
78815 	 */
78816 	#define SQ_LOCALINVALIDATE_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78817 	/*
78818 	 * Indication to complete all previous RDMA Read or Atomic
78819 	 * WQEs on the SQ before executing this WQE
78820 	 */
78821 	#define SQ_LOCALINVALIDATE_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78822 	/*
78823 	 * Unconditional fence. Indication to complete all previous
78824 	 * SQ's WQEs before executing this WQE.
78825 	 */
78826 	#define SQ_LOCALINVALIDATE_FLAGS_UC_FENCE								UINT32_C(0x4)
78827 	/*
78828 	 * Solicit event. Indication sent in BTH header to the
78829 	 * receiver to generate a Completion Event Notification,
78830 	 * i.e. CNQE. This bit should be set only in the last (or
78831 	 * only) packet of the message.
78832 	 */
78833 	#define SQ_LOCALINVALIDATE_FLAGS_SE									UINT32_C(0x8)
78834 	/* NA for this WQE */
78835 	#define SQ_LOCALINVALIDATE_FLAGS_INLINE								UINT32_C(0x10)
78836 	/*
78837 	 * This flag is not applicable and should be 0 for a local memory
78838 	 * operation WQE.
78839 	 */
78840 	#define SQ_LOCALINVALIDATE_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78841 	/*
78842 	 * When set to '1', this operation will cause a trace capture in
78843 	 * each block it passes through.
78844 	 */
78845 	#define SQ_LOCALINVALIDATE_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78846 	uint16_t	reserved16;
78847 	/*
78848 	 * The local key for the MR/W to invalidate; 24 msb of the key
78849 	 * are used to index the MRW table, 8 lsb are compared with the
78850 	 * 8 bit key in the MRWC
78851 	 */
78852 	uint32_t	inv_l_key;
78853 	uint64_t	reserved64;
78854 	uint8_t	reserved128[16];
78855 	/* The data field for local invalidate is not used. */
78856 	uint32_t	data[24];
78857 } sq_localinvalidate_t, *psq_localinvalidate_t;
78858 
78859 /* Local Invalidate SQ WQE header. */
78860 /* sq_localinvalidate_hdr (size:256b/32B) */
78861 
78862 typedef struct sq_localinvalidate_hdr {
78863 	/* This field defines the type of SQ WQE. */
78864 	uint8_t	wqe_type;
78865 	/*
78866 	 * Local Invalidate.
78867 	 *
78868 	 * Allowed only on reliable connection (RC) SQs.
78869 	 */
78870 	#define SQ_LOCALINVALIDATE_HDR_WQE_TYPE_LOCAL_INVALID UINT32_C(0xc)
78871 	#define SQ_LOCALINVALIDATE_HDR_WQE_TYPE_LAST	SQ_LOCALINVALIDATE_HDR_WQE_TYPE_LOCAL_INVALID
78872 	uint8_t	flags;
78873 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
78874 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
78875 	/*
78876 	 * Set if completion signaling is requested. If this bit is
78877 	 * 0, and the SQ is configured to support Unsignaled
78878 	 * completion the controller should not generate a CQE
78879 	 * unless there was an error. This refers to CQE on the
78880 	 * sender side (se_flag refers to the receiver side)
78881 	 */
78882 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
78883 	/*
78884 	 * Indication to complete all previous RDMA Read or Atomic
78885 	 * WQEs on the SQ before executing this WQE
78886 	 */
78887 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
78888 	/*
78889 	 * Unconditional fence. Indication to complete all previous
78890 	 * SQ's WQEs before executing this WQE.
78891 	 */
78892 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_UC_FENCE								UINT32_C(0x4)
78893 	/*
78894 	 * Solicit event. Indication sent in BTH header to the
78895 	 * receiver to generate a Completion Event Notification,
78896 	 * i.e. CNQE. This bit should be set only in the last (or
78897 	 * only) packet of the message.
78898 	 */
78899 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_SE									UINT32_C(0x8)
78900 	/* NA for this WQE */
78901 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_INLINE								UINT32_C(0x10)
78902 	/*
78903 	 * This flag is not applicable and should be 0 for a local memory
78904 	 * operation WQE.
78905 	 */
78906 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_WQE_TS_EN								UINT32_C(0x20)
78907 	/*
78908 	 * When set to '1', this operation will cause a trace capture in
78909 	 * each block it passes through.
78910 	 */
78911 	#define SQ_LOCALINVALIDATE_HDR_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
78912 	uint16_t	reserved16;
78913 	/*
78914 	 * The local key for the MR/W to invalidate; 24 msb of the key
78915 	 * are used to index the MRW table, 8 lsb are compared with the
78916 	 * 8 bit key in the MRWC
78917 	 */
78918 	uint32_t	inv_l_key;
78919 	uint64_t	reserved64;
78920 	uint8_t	reserved128[16];
78921 } sq_localinvalidate_hdr_t, *psq_localinvalidate_hdr_t;
78922 
78923 /* FR-PMR SQ WQE */
78924 /* sq_fr_pmr (size:1024b/128B) */
78925 
78926 typedef struct sq_fr_pmr {
78927 	/* This field defines the type of SQ WQE. */
78928 	uint8_t	wqe_type;
78929 	/*
78930 	 * FR-PMR (Fast Register Physical Memory Region)
78931 	 *
78932 	 * Allowed only on reliable connection (RC) SQs.
78933 	 */
78934 	#define SQ_FR_PMR_WQE_TYPE_FR_PMR UINT32_C(0xd)
78935 	#define SQ_FR_PMR_WQE_TYPE_LAST  SQ_FR_PMR_WQE_TYPE_FR_PMR
78936 	uint8_t	flags;
78937 	/*
78938 	 * Set if completion signaling is requested. If this bit is
78939 	 * 0, and the SQ is configured to support Unsignaled
78940 	 * completion the controller should not generate a CQE
78941 	 * unless there was an error. This refers to CQE on the
78942 	 * sender side (se_flag refers to the receiver side)
78943 	 */
78944 	#define SQ_FR_PMR_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
78945 	/*
78946 	 * Indication to complete all previous RDMA Read or Atomic
78947 	 * WQEs on the SQ before executing this WQE
78948 	 */
78949 	#define SQ_FR_PMR_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
78950 	/*
78951 	 * Unconditional fence. Indication to complete all previous
78952 	 * SQ's WQEs before executing this WQE.
78953 	 */
78954 	#define SQ_FR_PMR_FLAGS_UC_FENCE		UINT32_C(0x4)
78955 	/* Not Applicable for FR_PMR. Nothing is sent */
78956 	#define SQ_FR_PMR_FLAGS_SE			UINT32_C(0x8)
78957 	/* NA */
78958 	#define SQ_FR_PMR_FLAGS_INLINE		UINT32_C(0x10)
78959 	/*
78960 	 * This flag is not applicable and should be 0 for a local memory
78961 	 * operation WQE.
78962 	 */
78963 	#define SQ_FR_PMR_FLAGS_WQE_TS_EN		UINT32_C(0x20)
78964 	/*
78965 	 * When set to '1', this operation will cause a trace capture in
78966 	 * each block it passes through.
78967 	 */
78968 	#define SQ_FR_PMR_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
78969 	/*
78970 	 * This is the new access control for the MR. '1' means
78971 	 * the operation is allowed. '0' means operation is
78972 	 * not allowed.
78973 	 */
78974 	uint8_t	access_cntl;
78975 	/* Local Write Access */
78976 	#define SQ_FR_PMR_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
78977 	/* Remote Read Access */
78978 	#define SQ_FR_PMR_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
78979 	/* Remote Write Access */
78980 	#define SQ_FR_PMR_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
78981 	/* Remote Atomic Access */
78982 	#define SQ_FR_PMR_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
78983 	/* Window Binding Allowed */
78984 	#define SQ_FR_PMR_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
78985 	uint8_t	zero_based_page_size_log;
78986 	/* Page size. 0 for 4KB page size, ... to 8TB. */
78987 	#define SQ_FR_PMR_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
78988 	#define SQ_FR_PMR_PAGE_SIZE_LOG_SFT	0
78989 	/* Page size is 4KB. */
78990 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
78991 	/* Page size is 8KB. */
78992 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
78993 	/* Page size is 16KB. */
78994 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
78995 	/* Page size is 32KB. */
78996 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
78997 	/* Page size is 64KB. */
78998 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
78999 	/* Page size is 128KB. */
79000 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79001 	/* Page size is 256KB. */
79002 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79003 	/* Page size is 512KB. */
79004 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79005 	/* Page size is 1MB. */
79006 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79007 	/* Page size is 2MB. */
79008 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79009 	/* Page size is 4MB. */
79010 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79011 	/* Page size is 8MB. */
79012 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79013 	/* Page size is 16MB. */
79014 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79015 	/* Page size is 32MB. */
79016 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79017 	/* Page size is 64MB. */
79018 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79019 	/* Page size is 128MB. */
79020 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79021 	/* Page size is 256MB. */
79022 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79023 	/* Page size is 512MB. */
79024 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79025 	/* Page size is 1GB. */
79026 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79027 	/* Page size is 2GB. */
79028 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79029 	/* Page size is 4GB. */
79030 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79031 	/* Page size is 8GB. */
79032 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79033 	/* Page size is 16GB. */
79034 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79035 	/* Page size is 32GB. */
79036 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79037 	/* Page size is 64GB. */
79038 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79039 	/* Page size is 128GB. */
79040 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79041 	/* Page size is 256GB. */
79042 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79043 	/* Page size is 512GB. */
79044 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79045 	/* Page size is 1TB. */
79046 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79047 	/* Page size is 2TB. */
79048 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79049 	/* Page size is 4TB. */
79050 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79051 	/* Page size is 8TB. */
79052 		#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79053 		#define SQ_FR_PMR_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8T
79054 	/* Indicate the MR is ZBVA (Zero Base VA) */
79055 	#define SQ_FR_PMR_ZERO_BASED		UINT32_C(0x20)
79056 	/*
79057 	 * Local Key; 24 msb of the key are used to index the MRW
79058 	 * table, 8 lsb are assigned to the 8 bit key_lsb field in
79059 	 * the MRWC.
79060 	 */
79061 	uint32_t	l_key;
79062 	/* Length in bytes of registered MR */
79063 	uint8_t	length[5];
79064 	uint8_t	reserved8_1;
79065 	uint8_t	reserved8_2;
79066 	uint8_t	numlevels_pbl_page_size_log;
79067 	/* PBL page size. 0 for 4KB page size, ... to 8TB. */
79068 	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
79069 	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_SFT	0
79070 	/* Page size is 4KB. */
79071 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
79072 	/* Page size is 8KB. */
79073 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
79074 	/* Page size is 16KB. */
79075 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
79076 	/* Page size is 32KB. */
79077 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
79078 	/* Page size is 64KB. */
79079 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
79080 	/* Page size is 128KB. */
79081 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79082 	/* Page size is 256KB. */
79083 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79084 	/* Page size is 512KB. */
79085 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79086 	/* Page size is 1MB. */
79087 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79088 	/* Page size is 2MB. */
79089 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79090 	/* Page size is 4MB. */
79091 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79092 	/* Page size is 8MB. */
79093 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79094 	/* Page size is 16MB. */
79095 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79096 	/* Page size is 32MB. */
79097 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79098 	/* Page size is 64MB. */
79099 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79100 	/* Page size is 128MB. */
79101 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79102 	/* Page size is 256MB. */
79103 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79104 	/* Page size is 512MB. */
79105 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79106 	/* Page size is 1GB. */
79107 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79108 	/* Page size is 2GB. */
79109 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79110 	/* Page size is 4GB. */
79111 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79112 	/* Page size is 8GB. */
79113 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79114 	/* Page size is 16GB. */
79115 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79116 	/* Page size is 32GB. */
79117 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79118 	/* Page size is 64GB. */
79119 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79120 	/* Page size is 128GB. */
79121 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79122 	/* Page size is 256GB. */
79123 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79124 	/* Page size is 512GB. */
79125 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79126 	/* Page size is 1TB. */
79127 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79128 	/* Page size is 2TB. */
79129 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79130 	/* Page size is 4TB. */
79131 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79132 	/* Page size is 8TB. */
79133 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79134 		#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8T
79135 	/* Number of levels of PBL for translation */
79136 	#define SQ_FR_PMR_NUMLEVELS_MASK		UINT32_C(0xc0)
79137 	#define SQ_FR_PMR_NUMLEVELS_SFT		6
79138 	/*
79139 	 * A zero level PBL means that the VA is the physical address used
79140 	 * for the operation. No translation is done by the PTU.
79141 	 */
79142 		#define SQ_FR_PMR_NUMLEVELS_PHYSICAL	(UINT32_C(0x0) << 6)
79143 	/*
79144 	 * A one layer translation is provided between the logical and
79145 	 * physical address. The PBL points to a physical page that
79146 	 * contains PBE values that point to actual pg_size physical pages.
79147 	 */
79148 		#define SQ_FR_PMR_NUMLEVELS_LAYER1		(UINT32_C(0x1) << 6)
79149 	/*
79150 	 * A two layer translation is provided between the logical and
79151 	 * physical address. The PBL points to a physical page that
79152 	 * contains PDE values that in turn point to pbl_pg_size physical
79153 	 * pages that contain PBE values that point to actual physical
79154 	 * pages.
79155 	 */
79156 		#define SQ_FR_PMR_NUMLEVELS_LAYER2		(UINT32_C(0x2) << 6)
79157 		#define SQ_FR_PMR_NUMLEVELS_LAST		SQ_FR_PMR_NUMLEVELS_LAYER2
79158 	/* Pointer to the PBL, or PDL depending on number of levels */
79159 	uint64_t	pblptr;
79160 	/* Local Virtual Address */
79161 	uint64_t	va;
79162 	/* The data field for FR-PMR is not used. */
79163 	uint32_t	data[24];
79164 } sq_fr_pmr_t, *psq_fr_pmr_t;
79165 
79166 /* FR-PMR SQ WQE header. */
79167 /* sq_fr_pmr_hdr (size:256b/32B) */
79168 
79169 typedef struct sq_fr_pmr_hdr {
79170 	/* This field defines the type of SQ WQE. */
79171 	uint8_t	wqe_type;
79172 	/*
79173 	 * FR-PMR (Fast Register Physical Memory Region)
79174 	 *
79175 	 * Allowed only on reliable connection (RC) SQs.
79176 	 */
79177 	#define SQ_FR_PMR_HDR_WQE_TYPE_FR_PMR UINT32_C(0xd)
79178 	#define SQ_FR_PMR_HDR_WQE_TYPE_LAST  SQ_FR_PMR_HDR_WQE_TYPE_FR_PMR
79179 	uint8_t	flags;
79180 	/*
79181 	 * Set if completion signaling is requested. If this bit is
79182 	 * 0, and the SQ is configured to support Unsignaled
79183 	 * completion the controller should not generate a CQE
79184 	 * unless there was an error. This refers to CQE on the
79185 	 * sender side (se_flag refers to the receiver side)
79186 	 */
79187 	#define SQ_FR_PMR_HDR_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
79188 	/*
79189 	 * Indication to complete all previous RDMA Read or Atomic
79190 	 * WQEs on the SQ before executing this WQE
79191 	 */
79192 	#define SQ_FR_PMR_HDR_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
79193 	/*
79194 	 * Unconditional fence. Indication to complete all previous
79195 	 * SQ's WQEs before executing this WQE.
79196 	 */
79197 	#define SQ_FR_PMR_HDR_FLAGS_UC_FENCE		UINT32_C(0x4)
79198 	/* Not Applicable for FR_PMR. Nothing is sent */
79199 	#define SQ_FR_PMR_HDR_FLAGS_SE			UINT32_C(0x8)
79200 	/* NA */
79201 	#define SQ_FR_PMR_HDR_FLAGS_INLINE		UINT32_C(0x10)
79202 	/*
79203 	 * This flag is not applicable and should be 0 for a local memory
79204 	 * operation WQE.
79205 	 */
79206 	#define SQ_FR_PMR_HDR_FLAGS_WQE_TS_EN		UINT32_C(0x20)
79207 	/*
79208 	 * When set to '1', this operation will cause a trace capture in
79209 	 * each block it passes through.
79210 	 */
79211 	#define SQ_FR_PMR_HDR_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
79212 	/*
79213 	 * This is the new access control for the MR. '1' means
79214 	 * the operation is allowed. '0' means operation is
79215 	 * not allowed.
79216 	 */
79217 	uint8_t	access_cntl;
79218 	/* Local Write Access */
79219 	#define SQ_FR_PMR_HDR_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
79220 	/* Remote Read Access */
79221 	#define SQ_FR_PMR_HDR_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
79222 	/* Remote Write Access */
79223 	#define SQ_FR_PMR_HDR_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
79224 	/* Remote Atomic Access */
79225 	#define SQ_FR_PMR_HDR_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
79226 	/* Window Binding Allowed */
79227 	#define SQ_FR_PMR_HDR_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
79228 	uint8_t	zero_based_page_size_log;
79229 	/* Page size. 0 for 4KB page size, ... to 8TB. */
79230 	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
79231 	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_SFT	0
79232 	/* Page size is 4KB. */
79233 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
79234 	/* Page size is 8KB. */
79235 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
79236 	/* Page size is 16KB. */
79237 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
79238 	/* Page size is 32KB. */
79239 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
79240 	/* Page size is 64KB. */
79241 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
79242 	/* Page size is 128KB. */
79243 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79244 	/* Page size is 256KB. */
79245 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79246 	/* Page size is 512KB. */
79247 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79248 	/* Page size is 1MB. */
79249 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79250 	/* Page size is 2MB. */
79251 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79252 	/* Page size is 4MB. */
79253 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79254 	/* Page size is 8MB. */
79255 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79256 	/* Page size is 16MB. */
79257 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79258 	/* Page size is 32MB. */
79259 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79260 	/* Page size is 64MB. */
79261 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79262 	/* Page size is 128MB. */
79263 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79264 	/* Page size is 256MB. */
79265 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79266 	/* Page size is 512MB. */
79267 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79268 	/* Page size is 1GB. */
79269 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79270 	/* Page size is 2GB. */
79271 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79272 	/* Page size is 4GB. */
79273 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79274 	/* Page size is 8GB. */
79275 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79276 	/* Page size is 16GB. */
79277 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79278 	/* Page size is 32GB. */
79279 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79280 	/* Page size is 64GB. */
79281 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79282 	/* Page size is 128GB. */
79283 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79284 	/* Page size is 256GB. */
79285 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79286 	/* Page size is 512GB. */
79287 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79288 	/* Page size is 1TB. */
79289 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79290 	/* Page size is 2TB. */
79291 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79292 	/* Page size is 4TB. */
79293 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79294 	/* Page size is 8TB. */
79295 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79296 		#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8T
79297 	/* Indicate the MR is ZBVA (Zero Base VA) */
79298 	#define SQ_FR_PMR_HDR_ZERO_BASED		UINT32_C(0x20)
79299 	/*
79300 	 * Local Key; 24 msb of the key are used to index the MRW
79301 	 * table, 8 lsb are assigned to the 8 bit key_lsb field in
79302 	 * the MRWC.
79303 	 */
79304 	uint32_t	l_key;
79305 	/* Length in bytes of registered MR */
79306 	uint8_t	length[5];
79307 	uint8_t	reserved8_1;
79308 	uint8_t	reserved8_2;
79309 	uint8_t	numlevels_pbl_page_size_log;
79310 	/* PBL page size. 0 for 4KB page size, ... to 8TB. */
79311 	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
79312 	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_SFT	0
79313 	/* Page size is 4KB. */
79314 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
79315 	/* Page size is 8KB. */
79316 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
79317 	/* Page size is 16KB. */
79318 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
79319 	/* Page size is 32KB. */
79320 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
79321 	/* Page size is 64KB. */
79322 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
79323 	/* Page size is 128KB. */
79324 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79325 	/* Page size is 256KB. */
79326 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79327 	/* Page size is 512KB. */
79328 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79329 	/* Page size is 1MB. */
79330 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79331 	/* Page size is 2MB. */
79332 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79333 	/* Page size is 4MB. */
79334 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79335 	/* Page size is 8MB. */
79336 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79337 	/* Page size is 16MB. */
79338 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79339 	/* Page size is 32MB. */
79340 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79341 	/* Page size is 64MB. */
79342 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79343 	/* Page size is 128MB. */
79344 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79345 	/* Page size is 256MB. */
79346 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79347 	/* Page size is 512MB. */
79348 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79349 	/* Page size is 1GB. */
79350 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79351 	/* Page size is 2GB. */
79352 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79353 	/* Page size is 4GB. */
79354 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79355 	/* Page size is 8GB. */
79356 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79357 	/* Page size is 16GB. */
79358 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79359 	/* Page size is 32GB. */
79360 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79361 	/* Page size is 64GB. */
79362 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79363 	/* Page size is 128GB. */
79364 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79365 	/* Page size is 256GB. */
79366 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79367 	/* Page size is 512GB. */
79368 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79369 	/* Page size is 1TB. */
79370 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79371 	/* Page size is 2TB. */
79372 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79373 	/* Page size is 4TB. */
79374 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79375 	/* Page size is 8TB. */
79376 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79377 		#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8T
79378 	/* Number of levels of PBL for translation */
79379 	#define SQ_FR_PMR_HDR_NUMLEVELS_MASK		UINT32_C(0xc0)
79380 	#define SQ_FR_PMR_HDR_NUMLEVELS_SFT		6
79381 	/*
79382 	 * A zero level PBL means that the VA is the physical address used
79383 	 * for the operation. No translation is done by the PTU.
79384 	 */
79385 		#define SQ_FR_PMR_HDR_NUMLEVELS_PHYSICAL	(UINT32_C(0x0) << 6)
79386 	/*
79387 	 * A one layer translation is provided between the logical and
79388 	 * physical address. The PBL points to a physical page that
79389 	 * contains PBE values that point to actual pg_size physical pages.
79390 	 */
79391 		#define SQ_FR_PMR_HDR_NUMLEVELS_LAYER1		(UINT32_C(0x1) << 6)
79392 	/*
79393 	 * A two layer translation is provided between the logical and
79394 	 * physical address. The PBL points to a physical page that
79395 	 * contains PDE values that in turn point to pbl_pg_size physical
79396 	 * pages that contain PBE values that point to actual physical
79397 	 * pages.
79398 	 */
79399 		#define SQ_FR_PMR_HDR_NUMLEVELS_LAYER2		(UINT32_C(0x2) << 6)
79400 		#define SQ_FR_PMR_HDR_NUMLEVELS_LAST		SQ_FR_PMR_HDR_NUMLEVELS_LAYER2
79401 	/* Pointer to the PBL, or PDL depending on number of levels */
79402 	uint64_t	pblptr;
79403 	/* Local Virtual Address */
79404 	uint64_t	va;
79405 } sq_fr_pmr_hdr_t, *psq_fr_pmr_hdr_t;
79406 
79407 /* FR-PPMR SQ WQE */
79408 /* sq_fr_ppmr (size:1024b/128B) */
79409 
79410 typedef struct sq_fr_ppmr {
79411 	/* This field defines the type of SQ WQE. */
79412 	uint8_t	wqe_type;
79413 	/*
79414 	 * FR-PPMR (Fast Register Proxy Physical Memory Region)
79415 	 *
79416 	 * Allowed only on reliable connection (RC) SQs.
79417 	 */
79418 	#define SQ_FR_PPMR_WQE_TYPE_FR_PPMR UINT32_C(0xf)
79419 	#define SQ_FR_PPMR_WQE_TYPE_LAST   SQ_FR_PPMR_WQE_TYPE_FR_PPMR
79420 	uint8_t	flags;
79421 	/*
79422 	 * Set if completion signaling is requested. If this bit is
79423 	 * 0, and the SQ is configured to support Unsignaled
79424 	 * completion the controller should not generate a CQE
79425 	 * unless there was an error. This refers to CQE on the
79426 	 * sender side (se_flag refers to the receiver side)
79427 	 */
79428 	#define SQ_FR_PPMR_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
79429 	/*
79430 	 * Indication to complete all previous RDMA Read or Atomic
79431 	 * WQEs on the SQ before executing this WQE
79432 	 */
79433 	#define SQ_FR_PPMR_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
79434 	/*
79435 	 * Unconditional fence. Indication to complete all previous
79436 	 * SQ's WQEs before executing this WQE.
79437 	 */
79438 	#define SQ_FR_PPMR_FLAGS_UC_FENCE		UINT32_C(0x4)
79439 	/* Not Applicable for FR_PPMR. Nothing is sent */
79440 	#define SQ_FR_PPMR_FLAGS_SE			UINT32_C(0x8)
79441 	/* NA */
79442 	#define SQ_FR_PPMR_FLAGS_INLINE		UINT32_C(0x10)
79443 	/*
79444 	 * This flag is not applicable and should be 0 for a local memory
79445 	 * operation WQE.
79446 	 */
79447 	#define SQ_FR_PPMR_FLAGS_WQE_TS_EN		UINT32_C(0x20)
79448 	/*
79449 	 * When set to '1', this operation will cause a trace capture in
79450 	 * each block it passes through.
79451 	 */
79452 	#define SQ_FR_PPMR_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
79453 	/*
79454 	 * This is the new access control for the MR. '1' means
79455 	 * the operation is allowed. '0' means operation is
79456 	 * not allowed.
79457 	 */
79458 	uint8_t	access_cntl;
79459 	/* Local Write Access */
79460 	#define SQ_FR_PPMR_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
79461 	/* Remote Read Access */
79462 	#define SQ_FR_PPMR_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
79463 	/* Remote Write Access */
79464 	#define SQ_FR_PPMR_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
79465 	/* Remote Atomic Access */
79466 	#define SQ_FR_PPMR_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
79467 	/* Window Binding Allowed */
79468 	#define SQ_FR_PPMR_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
79469 	uint8_t	zero_based_page_size_log;
79470 	/* Page size. 0 for 4KB page size, ... to 8TB. */
79471 	#define SQ_FR_PPMR_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
79472 	#define SQ_FR_PPMR_PAGE_SIZE_LOG_SFT	0
79473 	/* Page size is 4KB. */
79474 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
79475 	/* Page size is 8KB. */
79476 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
79477 	/* Page size is 16KB. */
79478 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
79479 	/* Page size is 32KB. */
79480 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
79481 	/* Page size is 64KB. */
79482 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
79483 	/* Page size is 128KB. */
79484 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79485 	/* Page size is 256KB. */
79486 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79487 	/* Page size is 512KB. */
79488 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79489 	/* Page size is 1MB. */
79490 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79491 	/* Page size is 2MB. */
79492 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79493 	/* Page size is 4MB. */
79494 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79495 	/* Page size is 8MB. */
79496 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79497 	/* Page size is 16MB. */
79498 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79499 	/* Page size is 32MB. */
79500 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79501 	/* Page size is 64MB. */
79502 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79503 	/* Page size is 128MB. */
79504 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79505 	/* Page size is 256MB. */
79506 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79507 	/* Page size is 512MB. */
79508 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79509 	/* Page size is 1GB. */
79510 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79511 	/* Page size is 2GB. */
79512 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79513 	/* Page size is 4GB. */
79514 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79515 	/* Page size is 8GB. */
79516 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79517 	/* Page size is 16GB. */
79518 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79519 	/* Page size is 32GB. */
79520 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79521 	/* Page size is 64GB. */
79522 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79523 	/* Page size is 128GB. */
79524 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79525 	/* Page size is 256GB. */
79526 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79527 	/* Page size is 512GB. */
79528 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79529 	/* Page size is 1TB. */
79530 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79531 	/* Page size is 2TB. */
79532 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79533 	/* Page size is 4TB. */
79534 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79535 	/* Page size is 8TB. */
79536 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79537 		#define SQ_FR_PPMR_PAGE_SIZE_LOG_LAST	SQ_FR_PPMR_PAGE_SIZE_LOG_PGSZ_8T
79538 	/* Indicate the MR is ZBVA (Zero Base VA) */
79539 	#define SQ_FR_PPMR_ZERO_BASED		UINT32_C(0x20)
79540 	/*
79541 	 * Local Key; 24 msb of the key are used to index the MRW
79542 	 * table, 8 lsb are assigned to the 8 bit key_lsb field in
79543 	 * the MRWC.
79544 	 */
79545 	uint32_t	l_key;
79546 	/* Length in bytes of registered MR */
79547 	uint32_t	length;
79548 	/* Sets the proxy_vfid field of the physical memory region. */
79549 	uint16_t	proxy_vfid;
79550 	/* Sets the proxy_pfid field of the physical memory region. */
79551 	uint8_t	proxy_pfid;
79552 	uint8_t	numlevels_pbl_page_size_log;
79553 	/* PBL page size. 0 for 4KB page size, ... to 8TB. */
79554 	#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
79555 	#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_SFT	0
79556 	/* Page size is 4KB. */
79557 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
79558 	/* Page size is 8KB. */
79559 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
79560 	/* Page size is 16KB. */
79561 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
79562 	/* Page size is 32KB. */
79563 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
79564 	/* Page size is 64KB. */
79565 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
79566 	/* Page size is 128KB. */
79567 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79568 	/* Page size is 256KB. */
79569 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79570 	/* Page size is 512KB. */
79571 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79572 	/* Page size is 1MB. */
79573 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79574 	/* Page size is 2MB. */
79575 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79576 	/* Page size is 4MB. */
79577 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79578 	/* Page size is 8MB. */
79579 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79580 	/* Page size is 16MB. */
79581 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79582 	/* Page size is 32MB. */
79583 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79584 	/* Page size is 64MB. */
79585 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79586 	/* Page size is 128MB. */
79587 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79588 	/* Page size is 256MB. */
79589 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79590 	/* Page size is 512MB. */
79591 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79592 	/* Page size is 1GB. */
79593 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79594 	/* Page size is 2GB. */
79595 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79596 	/* Page size is 4GB. */
79597 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79598 	/* Page size is 8GB. */
79599 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79600 	/* Page size is 16GB. */
79601 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79602 	/* Page size is 32GB. */
79603 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79604 	/* Page size is 64GB. */
79605 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79606 	/* Page size is 128GB. */
79607 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79608 	/* Page size is 256GB. */
79609 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79610 	/* Page size is 512GB. */
79611 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79612 	/* Page size is 1TB. */
79613 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79614 	/* Page size is 2TB. */
79615 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79616 	/* Page size is 4TB. */
79617 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79618 	/* Page size is 8TB. */
79619 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79620 		#define SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_LAST	SQ_FR_PPMR_PBL_PAGE_SIZE_LOG_PGSZ_8T
79621 	/* Sets the proxy_vf_valid field of the physical memory region. */
79622 	#define SQ_FR_PPMR_PROXY_VF_VALID		UINT32_C(0x20)
79623 	/* Number of levels of PBL for translation */
79624 	#define SQ_FR_PPMR_NUMLEVELS_MASK		UINT32_C(0xc0)
79625 	#define SQ_FR_PPMR_NUMLEVELS_SFT		6
79626 	/*
79627 	 * A zero level PBL means that the VA is the physical address used
79628 	 * for the operation. No translation is done by the PTU.
79629 	 */
79630 		#define SQ_FR_PPMR_NUMLEVELS_PHYSICAL	(UINT32_C(0x0) << 6)
79631 	/*
79632 	 * A one layer translation is provided between the logical and
79633 	 * physical address. The PBL points to a physical page that
79634 	 * contains PBE values that point to actual pg_size physical pages.
79635 	 */
79636 		#define SQ_FR_PPMR_NUMLEVELS_LAYER1		(UINT32_C(0x1) << 6)
79637 	/*
79638 	 * A two layer translation is provided between the logical and
79639 	 * physical address. The PBL points to a physical page that
79640 	 * contains PDE values that in turn point to pbl_pg_size physical
79641 	 * pages that contain PBE values that point to actual physical
79642 	 * pages.
79643 	 */
79644 		#define SQ_FR_PPMR_NUMLEVELS_LAYER2		(UINT32_C(0x2) << 6)
79645 		#define SQ_FR_PPMR_NUMLEVELS_LAST		SQ_FR_PPMR_NUMLEVELS_LAYER2
79646 	/* Pointer to the PBL, or PDL depending on number of levels */
79647 	uint64_t	pblptr;
79648 	/* Local Virtual Address */
79649 	uint64_t	va;
79650 	/* The data field for FR-PPMR is not used. */
79651 	uint32_t	data[24];
79652 } sq_fr_ppmr_t, *psq_fr_ppmr_t;
79653 
79654 /* FR-PPMR SQ WQE header. */
79655 /* sq_fr_ppmr_hdr (size:256b/32B) */
79656 
79657 typedef struct sq_fr_ppmr_hdr {
79658 	/* This field defines the type of SQ WQE. */
79659 	uint8_t	wqe_type;
79660 	/*
79661 	 * FR-PPMR (Fast Register Proxy Physical Memory Region)
79662 	 *
79663 	 * Allowed only on reliable connection (RC) SQs.
79664 	 */
79665 	#define SQ_FR_PPMR_HDR_WQE_TYPE_FR_PPMR UINT32_C(0xf)
79666 	#define SQ_FR_PPMR_HDR_WQE_TYPE_LAST   SQ_FR_PPMR_HDR_WQE_TYPE_FR_PPMR
79667 	uint8_t	flags;
79668 	/*
79669 	 * Set if completion signaling is requested. If this bit is
79670 	 * 0, and the SQ is configured to support Unsignaled
79671 	 * completion the controller should not generate a CQE
79672 	 * unless there was an error. This refers to CQE on the
79673 	 * sender side (se_flag refers to the receiver side)
79674 	 */
79675 	#define SQ_FR_PPMR_HDR_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
79676 	/*
79677 	 * Indication to complete all previous RDMA Read or Atomic
79678 	 * WQEs on the SQ before executing this WQE
79679 	 */
79680 	#define SQ_FR_PPMR_HDR_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
79681 	/*
79682 	 * Unconditional fence. Indication to complete all previous
79683 	 * SQ's WQEs before executing this WQE.
79684 	 */
79685 	#define SQ_FR_PPMR_HDR_FLAGS_UC_FENCE		UINT32_C(0x4)
79686 	/* Not Applicable for FR_PPMR. Nothing is sent */
79687 	#define SQ_FR_PPMR_HDR_FLAGS_SE			UINT32_C(0x8)
79688 	/* NA */
79689 	#define SQ_FR_PPMR_HDR_FLAGS_INLINE		UINT32_C(0x10)
79690 	/*
79691 	 * This flag is not applicable and should be 0 for a local memory
79692 	 * operation WQE.
79693 	 */
79694 	#define SQ_FR_PPMR_HDR_FLAGS_WQE_TS_EN		UINT32_C(0x20)
79695 	/*
79696 	 * When set to '1', this operation will cause a trace capture in
79697 	 * each block it passes through.
79698 	 */
79699 	#define SQ_FR_PPMR_HDR_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
79700 	/*
79701 	 * This is the new access control for the MR. '1' means
79702 	 * the operation is allowed. '0' means operation is
79703 	 * not allowed.
79704 	 */
79705 	uint8_t	access_cntl;
79706 	/* Local Write Access */
79707 	#define SQ_FR_PPMR_HDR_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
79708 	/* Remote Read Access */
79709 	#define SQ_FR_PPMR_HDR_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
79710 	/* Remote Write Access */
79711 	#define SQ_FR_PPMR_HDR_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
79712 	/* Remote Atomic Access */
79713 	#define SQ_FR_PPMR_HDR_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
79714 	/* Window Binding Allowed */
79715 	#define SQ_FR_PPMR_HDR_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
79716 	uint8_t	zero_based_page_size_log;
79717 	/* Page size. 0 for 4KB page size, ... to 8TB. */
79718 	#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
79719 	#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_SFT	0
79720 	/* Page size is 4KB. */
79721 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
79722 	/* Page size is 8KB. */
79723 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
79724 	/* Page size is 16KB. */
79725 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
79726 	/* Page size is 32KB. */
79727 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
79728 	/* Page size is 64KB. */
79729 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
79730 	/* Page size is 128KB. */
79731 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79732 	/* Page size is 256KB. */
79733 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79734 	/* Page size is 512KB. */
79735 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79736 	/* Page size is 1MB. */
79737 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79738 	/* Page size is 2MB. */
79739 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79740 	/* Page size is 4MB. */
79741 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79742 	/* Page size is 8MB. */
79743 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79744 	/* Page size is 16MB. */
79745 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79746 	/* Page size is 32MB. */
79747 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79748 	/* Page size is 64MB. */
79749 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79750 	/* Page size is 128MB. */
79751 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79752 	/* Page size is 256MB. */
79753 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79754 	/* Page size is 512MB. */
79755 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79756 	/* Page size is 1GB. */
79757 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79758 	/* Page size is 2GB. */
79759 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79760 	/* Page size is 4GB. */
79761 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79762 	/* Page size is 8GB. */
79763 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79764 	/* Page size is 16GB. */
79765 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79766 	/* Page size is 32GB. */
79767 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79768 	/* Page size is 64GB. */
79769 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79770 	/* Page size is 128GB. */
79771 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79772 	/* Page size is 256GB. */
79773 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79774 	/* Page size is 512GB. */
79775 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79776 	/* Page size is 1TB. */
79777 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79778 	/* Page size is 2TB. */
79779 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79780 	/* Page size is 4TB. */
79781 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79782 	/* Page size is 8TB. */
79783 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79784 		#define SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_LAST	SQ_FR_PPMR_HDR_PAGE_SIZE_LOG_PGSZ_8T
79785 	/* Indicate the MR is ZBVA (Zero Base VA) */
79786 	#define SQ_FR_PPMR_HDR_ZERO_BASED		UINT32_C(0x20)
79787 	/*
79788 	 * Local Key; 24 msb of the key are used to index the MRW
79789 	 * table, 8 lsb are assigned to the 8 bit key_lsb field in
79790 	 * the MRWC.
79791 	 */
79792 	uint32_t	l_key;
79793 	/* Length in bytes of registered MR */
79794 	uint32_t	length;
79795 	/* Sets the proxy_vfid field of the physical memory region. */
79796 	uint16_t	proxy_vfid;
79797 	/* Sets the proxy_pfid field of the physical memory region. */
79798 	uint8_t	proxy_pfid;
79799 	uint8_t	numlevels_pbl_page_size_log;
79800 	/* PBL page size. 0 for 4KB page size, ... to 8TB. */
79801 	#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
79802 	#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_SFT	0
79803 	/* Page size is 4KB. */
79804 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
79805 	/* Page size is 8KB. */
79806 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
79807 	/* Page size is 16KB. */
79808 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16K   UINT32_C(0x2)
79809 	/* Page size is 32KB. */
79810 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32K   UINT32_C(0x3)
79811 	/* Page size is 64KB. */
79812 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64K   UINT32_C(0x4)
79813 	/* Page size is 128KB. */
79814 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128K  UINT32_C(0x5)
79815 	/* Page size is 256KB. */
79816 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256K  UINT32_C(0x6)
79817 	/* Page size is 512KB. */
79818 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512K  UINT32_C(0x7)
79819 	/* Page size is 1MB. */
79820 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
79821 	/* Page size is 2MB. */
79822 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
79823 	/* Page size is 4MB. */
79824 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
79825 	/* Page size is 8MB. */
79826 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
79827 	/* Page size is 16MB. */
79828 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16M   UINT32_C(0xc)
79829 	/* Page size is 32MB. */
79830 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32M   UINT32_C(0xd)
79831 	/* Page size is 64MB. */
79832 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64M   UINT32_C(0xe)
79833 	/* Page size is 128MB. */
79834 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128M  UINT32_C(0xf)
79835 	/* Page size is 256MB. */
79836 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256M  UINT32_C(0x10)
79837 	/* Page size is 512MB. */
79838 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512M  UINT32_C(0x11)
79839 	/* Page size is 1GB. */
79840 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
79841 	/* Page size is 2GB. */
79842 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
79843 	/* Page size is 4GB. */
79844 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
79845 	/* Page size is 8GB. */
79846 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
79847 	/* Page size is 16GB. */
79848 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16G   UINT32_C(0x16)
79849 	/* Page size is 32GB. */
79850 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32G   UINT32_C(0x17)
79851 	/* Page size is 64GB. */
79852 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64G   UINT32_C(0x18)
79853 	/* Page size is 128GB. */
79854 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128G  UINT32_C(0x19)
79855 	/* Page size is 256GB. */
79856 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256G  UINT32_C(0x1a)
79857 	/* Page size is 512GB. */
79858 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512G  UINT32_C(0x1b)
79859 	/* Page size is 1TB. */
79860 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
79861 	/* Page size is 2TB. */
79862 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
79863 	/* Page size is 4TB. */
79864 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
79865 	/* Page size is 8TB. */
79866 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
79867 		#define SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_LAST	SQ_FR_PPMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8T
79868 	/* Sets the proxy_vf_valid field of the physical memory region. */
79869 	#define SQ_FR_PPMR_HDR_PROXY_VF_VALID		UINT32_C(0x20)
79870 	/* Number of levels of PBL for translation */
79871 	#define SQ_FR_PPMR_HDR_NUMLEVELS_MASK		UINT32_C(0xc0)
79872 	#define SQ_FR_PPMR_HDR_NUMLEVELS_SFT		6
79873 	/*
79874 	 * A zero level PBL means that the VA is the physical address used
79875 	 * for the operation. No translation is done by the PTU.
79876 	 */
79877 		#define SQ_FR_PPMR_HDR_NUMLEVELS_PHYSICAL	(UINT32_C(0x0) << 6)
79878 	/*
79879 	 * A one layer translation is provided between the logical and
79880 	 * physical address. The PBL points to a physical page that
79881 	 * contains PBE values that point to actual pg_size physical pages.
79882 	 */
79883 		#define SQ_FR_PPMR_HDR_NUMLEVELS_LAYER1		(UINT32_C(0x1) << 6)
79884 	/*
79885 	 * A two layer translation is provided between the logical and
79886 	 * physical address. The PBL points to a physical page that
79887 	 * contains PDE values that in turn point to pbl_pg_size physical
79888 	 * pages that contain PBE values that point to actual physical
79889 	 * pages.
79890 	 */
79891 		#define SQ_FR_PPMR_HDR_NUMLEVELS_LAYER2		(UINT32_C(0x2) << 6)
79892 		#define SQ_FR_PPMR_HDR_NUMLEVELS_LAST		SQ_FR_PPMR_HDR_NUMLEVELS_LAYER2
79893 	/* Pointer to the PBL, or PDL depending on number of levels */
79894 	uint64_t	pblptr;
79895 	/* Local Virtual Address */
79896 	uint64_t	va;
79897 } sq_fr_ppmr_hdr_t, *psq_fr_ppmr_hdr_t;
79898 
79899 /*
79900  * Bind SQ WQE. This WQE can perform either:
79901  * * type1 "bind memory window", if mw_type==Type1
79902  * * type2 "post send bind memory window", if mw_type==Type2
79903  */
79904 /* sq_bind (size:1024b/128B) */
79905 
79906 typedef struct sq_bind {
79907 	/* This field defines the type of SQ WQE. */
79908 	uint8_t	wqe_type;
79909 	/*
79910 	 * Memory Bind
79911 	 *
79912 	 * Allowed only on reliable connection (RC) SQs.
79913 	 */
79914 	#define SQ_BIND_WQE_TYPE_BIND UINT32_C(0xe)
79915 	#define SQ_BIND_WQE_TYPE_LAST SQ_BIND_WQE_TYPE_BIND
79916 	uint8_t	flags;
79917 	#define SQ_BIND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
79918 	#define SQ_BIND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
79919 	/*
79920 	 * Set if completion signaling is requested. If this bit is
79921 	 * 0, and the SQ is configured to support Unsignaled
79922 	 * completion the controller should not generate a CQE
79923 	 * unless there was an error. This refers to CQE on the
79924 	 * sender side (se_flag refers to the receiver side)
79925 	 */
79926 	#define SQ_BIND_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
79927 	/*
79928 	 * Indication to complete all previous RDMA Read or Atomic
79929 	 * WQEs on the SQ before executing this WQE
79930 	 */
79931 	#define SQ_BIND_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
79932 	/*
79933 	 * Unconditional fence. Indication to complete all previous
79934 	 * SQ's WQEs before executing this WQE.
79935 	 */
79936 	#define SQ_BIND_FLAGS_UC_FENCE								UINT32_C(0x4)
79937 	/* NA, nothing is sent. */
79938 	#define SQ_BIND_FLAGS_SE									UINT32_C(0x8)
79939 	/* NA */
79940 	#define SQ_BIND_FLAGS_INLINE								UINT32_C(0x10)
79941 	/*
79942 	 * This flag is not applicable and should be 0 for a local memory
79943 	 * operation WQE.
79944 	 */
79945 	#define SQ_BIND_FLAGS_WQE_TS_EN								UINT32_C(0x20)
79946 	/*
79947 	 * When set to '1', this operation will cause a trace capture in
79948 	 * each block it passes through.
79949 	 */
79950 	#define SQ_BIND_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
79951 	/*
79952 	 * This is the new access control for the MR. '1' means
79953 	 * the operation is allowed. '0' means operation is
79954 	 * not allowed.
79955 	 */
79956 	uint8_t	access_cntl;
79957 	#define SQ_BIND_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_MASK		UINT32_C(0xff)
79958 	#define SQ_BIND_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_SFT		0
79959 	/*
79960 	 * Local Write Access.
79961 	 *
79962 	 * Local accesses are never allowed for memory windows, so this
79963 	 * bit must always be zero in a bind WQE. If this bit is ever
79964 	 * set, the bind will fail with an errored completion.
79965 	 */
79966 	#define SQ_BIND_ACCESS_CNTL_LOCAL_WRITE									UINT32_C(0x1)
79967 	/* Remote Read Access */
79968 	#define SQ_BIND_ACCESS_CNTL_REMOTE_READ									UINT32_C(0x2)
79969 	/*
79970 	 * Remote Write Access.
79971 	 *
79972 	 * Note that, if this bit is set, then the parent region to which
79973 	 * the window is being bound must allow local writes. If this is
79974 	 * not the case, then the bind will fail with an errored
79975 	 * completion.
79976 	 */
79977 	#define SQ_BIND_ACCESS_CNTL_REMOTE_WRITE									UINT32_C(0x4)
79978 	/*
79979 	 * Remote Atomic Access.
79980 	 *
79981 	 * Note that, if this bit is set, then the parent region to which
79982 	 * the window is being bound must allow local writes. If this is
79983 	 * not the case, then the bind will fail with an errored
79984 	 * completion.
79985 	 */
79986 	#define SQ_BIND_ACCESS_CNTL_REMOTE_ATOMIC									UINT32_C(0x8)
79987 	/*
79988 	 * Window Binding Allowed.
79989 	 *
79990 	 * It is never allowed to bind windows to windows, so this bit
79991 	 * must always be zero in a bind WQE. If this bit is ever set,
79992 	 * the bind will fail with an errored completion.
79993 	 */
79994 	#define SQ_BIND_ACCESS_CNTL_WINDOW_BIND									UINT32_C(0x10)
79995 	/* reserved8_1 is 8 b */
79996 	uint8_t	reserved8_1;
79997 	uint8_t	mw_type_zero_based;
79998 	/*
79999 	 * If this bit is set, then the newly-bound memory window will be
80000 	 * zero-based. If clear, then the newly-bound memory window will be
80001 	 * non-zero-based.
80002 	 */
80003 	#define SQ_BIND_ZERO_BASED	UINT32_C(0x1)
80004 	/*
80005 	 * If type1 is specified, then this WQE performs a "bind memory
80006 	 * window" operation on a type1 window. If type2 is specified, then
80007 	 * this WQE performs a "post send bind memory window" operation on a
80008 	 * type2 window.
80009 	 *
80010 	 * Note that the bind WQE cannot change the type of the memory
80011 	 * window.
80012 	 *
80013 	 * If a "bind memory window" operation is attempted on a memory
80014 	 * window that was allocated as type2, then the bind will fail with
80015 	 * an errored completion, as "bind memory window" is allowed only on
80016 	 * type1 memory windows.
80017 	 *
80018 	 * Similarly, if a "post send bind memory window" operation is
80019 	 * attempted on a memory window that was allocated as type1, then the
80020 	 * bind will fail with an errored completions, as "post send bind
80021 	 * memory window" is allowed only on type2 memory windows.
80022 	 */
80023 	#define SQ_BIND_MW_TYPE	UINT32_C(0x2)
80024 	/* Type 1 Bind Memory Window */
80025 		#define SQ_BIND_MW_TYPE_TYPE1	(UINT32_C(0x0) << 1)
80026 	/* Type 2 Post Send Bind Memory Window */
80027 		#define SQ_BIND_MW_TYPE_TYPE2	(UINT32_C(0x1) << 1)
80028 		#define SQ_BIND_MW_TYPE_LAST	SQ_BIND_MW_TYPE_TYPE2
80029 	uint8_t	reserved8_2;
80030 	uint16_t	reserved16;
80031 	/*
80032 	 * The L_Key of the parent MR; 24 msb of the key are used to
80033 	 * index the MRW table, 8 lsb are compared with the 8 bit key
80034 	 * in the MRWC.
80035 	 */
80036 	uint32_t	parent_l_key;
80037 	/*
80038 	 * Local Key; 24 msb of the key are used to index the memory
80039 	 * window being bound in the MRW table, 8 lsb are assign to the
80040 	 * 8 bit key_lsb field in the MRWC.
80041 	 */
80042 	uint32_t	l_key;
80043 	/* Local Virtual Address */
80044 	uint64_t	va;
80045 	/*
80046 	 * Length in bytes of registered MW; 40 bits as this is the max
80047 	 * size of an MR/W
80048 	 */
80049 	uint8_t	length[5];
80050 	uint8_t	reserved24[3];
80051 	/* The data field for Bind is not used. */
80052 	uint32_t	data[24];
80053 } sq_bind_t, *psq_bind_t;
80054 
80055 /*
80056  * Bind SQ WQE header. This WQE can perform either:
80057  * * type1 "bind memory window", if mw_type==Type1
80058  * * type2 "post send bind memory window", if mw_type==Type2
80059  */
80060 /* sq_bind_hdr (size:256b/32B) */
80061 
80062 typedef struct sq_bind_hdr {
80063 	/* This field defines the type of SQ WQE. */
80064 	uint8_t	wqe_type;
80065 	/*
80066 	 * Memory Bind
80067 	 *
80068 	 * Allowed only on reliable connection (RC) SQs.
80069 	 */
80070 	#define SQ_BIND_HDR_WQE_TYPE_BIND UINT32_C(0xe)
80071 	#define SQ_BIND_HDR_WQE_TYPE_LAST SQ_BIND_HDR_WQE_TYPE_BIND
80072 	uint8_t	flags;
80073 	#define SQ_BIND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK		UINT32_C(0xff)
80074 	#define SQ_BIND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT			0
80075 	/*
80076 	 * Set if completion signaling is requested. If this bit is
80077 	 * 0, and the SQ is configured to support Unsignaled
80078 	 * completion the controller should not generate a CQE
80079 	 * unless there was an error. This refers to CQE on the
80080 	 * sender side (se_flag refers to the receiver side)
80081 	 */
80082 	#define SQ_BIND_HDR_FLAGS_SIGNAL_COMP								UINT32_C(0x1)
80083 	/*
80084 	 * Indication to complete all previous RDMA Read or Atomic
80085 	 * WQEs on the SQ before executing this WQE
80086 	 */
80087 	#define SQ_BIND_HDR_FLAGS_RD_OR_ATOMIC_FENCE							UINT32_C(0x2)
80088 	/*
80089 	 * Unconditional fence. Indication to complete all previous
80090 	 * SQ's WQEs before executing this WQE.
80091 	 */
80092 	#define SQ_BIND_HDR_FLAGS_UC_FENCE								UINT32_C(0x4)
80093 	/* NA, nothing is sent. */
80094 	#define SQ_BIND_HDR_FLAGS_SE									UINT32_C(0x8)
80095 	/* NA */
80096 	#define SQ_BIND_HDR_FLAGS_INLINE								UINT32_C(0x10)
80097 	/*
80098 	 * This flag is not applicable and should be 0 for a local memory
80099 	 * operation WQE.
80100 	 */
80101 	#define SQ_BIND_HDR_FLAGS_WQE_TS_EN								UINT32_C(0x20)
80102 	/*
80103 	 * When set to '1', this operation will cause a trace capture in
80104 	 * each block it passes through.
80105 	 */
80106 	#define SQ_BIND_HDR_FLAGS_DEBUG_TRACE								UINT32_C(0x40)
80107 	/*
80108 	 * This is the new access control for the MR. '1' means
80109 	 * the operation is allowed. '0' means operation is
80110 	 * not allowed.
80111 	 */
80112 	uint8_t	access_cntl;
80113 	#define SQ_BIND_HDR_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_MASK		UINT32_C(0xff)
80114 	#define SQ_BIND_HDR_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_SFT		0
80115 	/*
80116 	 * Local Write Access.
80117 	 *
80118 	 * Local accesses are never allowed for memory windows, so this
80119 	 * bit must always be zero in a bind WQE. If this bit is ever
80120 	 * set, the bind will fail with an errored completion.
80121 	 */
80122 	#define SQ_BIND_HDR_ACCESS_CNTL_LOCAL_WRITE									UINT32_C(0x1)
80123 	/* Remote Read Access */
80124 	#define SQ_BIND_HDR_ACCESS_CNTL_REMOTE_READ									UINT32_C(0x2)
80125 	/*
80126 	 * Remote Write Access.
80127 	 *
80128 	 * Note that, if this bit is set, then the parent region to which
80129 	 * the window is being bound must allow local writes. If this is
80130 	 * not the case, then the bind will fail with an errored
80131 	 * completion.
80132 	 */
80133 	#define SQ_BIND_HDR_ACCESS_CNTL_REMOTE_WRITE									UINT32_C(0x4)
80134 	/*
80135 	 * Remote Atomic Access.
80136 	 *
80137 	 * Note that, if this bit is set, then the parent region to which
80138 	 * the window is being bound must allow local writes. If this is
80139 	 * not the case, then the bind will fail with an errored
80140 	 * completion.
80141 	 */
80142 	#define SQ_BIND_HDR_ACCESS_CNTL_REMOTE_ATOMIC									UINT32_C(0x8)
80143 	/*
80144 	 * Window Binding Allowed.
80145 	 *
80146 	 * It is never allowed to bind windows to windows, so this bit
80147 	 * must always be zero in a bind WQE. If this bit is ever set,
80148 	 * the bind will fail with an errored completion.
80149 	 */
80150 	#define SQ_BIND_HDR_ACCESS_CNTL_WINDOW_BIND									UINT32_C(0x10)
80151 	/* reserved8_1 is 8 b */
80152 	uint8_t	reserved8_1;
80153 	uint8_t	mw_type_zero_based;
80154 	/*
80155 	 * If this bit is set, then the newly-bound memory window will be
80156 	 * zero-based. If clear, then the newly-bound memory window will be
80157 	 * non-zero-based.
80158 	 */
80159 	#define SQ_BIND_HDR_ZERO_BASED	UINT32_C(0x1)
80160 	/*
80161 	 * If type1 is specified, then this WQE performs a "bind memory
80162 	 * window" operation on a type1 window. If type2 is specified, then
80163 	 * this WQE performs a "post send bind memory window" operation on a
80164 	 * type2 window.
80165 	 *
80166 	 * Note that the bind WQE cannot change the type of the memory
80167 	 * window.
80168 	 *
80169 	 * If a "bind memory window" operation is attempted on a memory
80170 	 * window that was allocated as type2, then the bind will fail with
80171 	 * an errored completion, as "bind memory window" is allowed only on
80172 	 * type1 memory windows.
80173 	 *
80174 	 * Similarly, if a "post send bind memory window" operation is
80175 	 * attempted on a memory window that was allocated as type1, then the
80176 	 * bind will fail with an errored completions, as "post send bind
80177 	 * memory window" is allowed only on type2 memory windows.
80178 	 */
80179 	#define SQ_BIND_HDR_MW_TYPE	UINT32_C(0x2)
80180 	/* Type 1 Bind Memory Window */
80181 		#define SQ_BIND_HDR_MW_TYPE_TYPE1	(UINT32_C(0x0) << 1)
80182 	/* Type 2 Post Send Bind Memory Window */
80183 		#define SQ_BIND_HDR_MW_TYPE_TYPE2	(UINT32_C(0x1) << 1)
80184 		#define SQ_BIND_HDR_MW_TYPE_LAST	SQ_BIND_HDR_MW_TYPE_TYPE2
80185 	uint8_t	reserved8_2;
80186 	uint16_t	reserved16;
80187 	/*
80188 	 * The L_Key of the parent MR; 24 msb of the key are used to
80189 	 * index the MRW table, 8 lsb are compared with the 8 bit key
80190 	 * in the MRWC.
80191 	 */
80192 	uint32_t	parent_l_key;
80193 	/*
80194 	 * Local Key; 24 msb of the key are used to index the memory
80195 	 * window being bound in the MRW table, 8 lsb are assign to the
80196 	 * 8 bit key_lsb field in the MRWC.
80197 	 */
80198 	uint32_t	l_key;
80199 	/* Local Virtual Address */
80200 	uint64_t	va;
80201 	/*
80202 	 * Length in bytes of registered MW; 40 bits as this is the max
80203 	 * size of an MR/W
80204 	 */
80205 	uint8_t	length[5];
80206 	uint8_t	reserved24[3];
80207 } sq_bind_hdr_t, *psq_bind_hdr_t;
80208 
80209 /*
80210  * This V3 version of structure is not accessible from host software, but is documented here (in the SW section) anyway.
80211  * This is the MSN Table (located in IQM). The table is written by the RoCE transmitter when sending wire operation WQEs. It is used to provide the RoCE receiver with information about the SQ WQEs in order to make requester completions and to perform requester HW retransmission. The number of entries in the table is configured in the QPC and must be equal to the maximum number of WQEs that can be present in the SQ at one time, rounded up to the nearest power of two.
80212  */
80213 /* sq_msn_search_v3 (size:128b/16B) */
80214 
80215 typedef struct sq_msn_search_v3 {
80216 	uint64_t	idx_psn;
80217 	/* Start PSN of the WQE. */
80218 	#define SQ_MSN_SEARCH_V3_START_PSN_MASK UINT32_C(0xffffff)
80219 	#define SQ_MSN_SEARCH_V3_START_PSN_SFT 0
80220 	/* Next PSN. Equal to the start PSN of the next WQE. */
80221 	#define SQ_MSN_SEARCH_V3_NEXT_PSN_MASK UINT32_C(0xffffff000000)L
80222 	#define SQ_MSN_SEARCH_V3_NEXT_PSN_SFT  24
80223 	/*
80224 	 * Start index. For variable-size WQEs, this field indicates the
80225 	 * starting slot index that corresponds to the WQE. In
80226 	 * backward-compatible mode, this is the starting WQE index.
80227 	 */
80228 	#define SQ_MSN_SEARCH_V3_START_IDX_MASK UINT32_C(0xffff000000000000)L
80229 	#define SQ_MSN_SEARCH_V3_START_IDX_SFT 48
80230 	/*
80231 	 * This value will be returned in the completion if the completion
80232 	 * is signaled.
80233 	 */
80234 	uint32_t	wqe_opaque;
80235 	/* The size of the WQE in units of 16B chunks. */
80236 	uint8_t	wqe_size;
80237 	uint8_t	signal;
80238 	/* Set if completion signaling is requested. */
80239 	#define SQ_MSN_SEARCH_V3_SGNLD			UINT32_C(0x1)
80240 	/*
80241 	 * Set if at least one signaled local memory operation WQE is
80242 	 * present in the SQ between the previous wire-operation WQE
80243 	 * and this WQE.
80244 	 */
80245 	#define SQ_MSN_SEARCH_V3_PREV_SGNLD_LOCAL_MEM_WQE	UINT32_C(0x2)
80246 	uint16_t	reserved;
80247 } sq_msn_search_v3_t, *psq_msn_search_v3_t;
80248 
80249 /* SQ Send WQE V3 for RC SQs. */
80250 /* sq_send_v3 (size:1024b/128B) */
80251 
80252 typedef struct sq_send_v3 {
80253 	/* This field defines the type of SQ WQE. */
80254 	uint8_t	wqe_type;
80255 	/* Send V3 */
80256 	#define SQ_SEND_V3_WQE_TYPE_SEND_V3	UINT32_C(0x10)
80257 	/*
80258 	 * Send with Immediate V3
80259 	 *
80260 	 * Allowed only on reliable connection (RC) SQs.
80261 	 */
80262 	#define SQ_SEND_V3_WQE_TYPE_SEND_W_IMMED_V3   UINT32_C(0x11)
80263 	/*
80264 	 * Send with Invalidate V3
80265 	 *
80266 	 * Allowed only on reliable connection (RC) SQs.
80267 	 */
80268 	#define SQ_SEND_V3_WQE_TYPE_SEND_W_INVALID_V3 UINT32_C(0x12)
80269 	#define SQ_SEND_V3_WQE_TYPE_LAST		SQ_SEND_V3_WQE_TYPE_SEND_W_INVALID_V3
80270 	uint8_t	flags;
80271 	/*
80272 	 * Set if completion signaling is requested. If this bit is
80273 	 * 0, and the SQ is configured to support Unsignaled completion
80274 	 * the controller should not generate a CQE unless there was
80275 	 * an error. This refers to the CQE on the sender side. (The se
80276 	 * flag refers to the receiver side).
80277 	 */
80278 	#define SQ_SEND_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
80279 	/*
80280 	 * Indication to complete all previous RDMA Read or Atomic WQEs
80281 	 * on the SQ before executing this WQE.
80282 	 *
80283 	 * This flag must be zero for a UD send.
80284 	 */
80285 	#define SQ_SEND_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
80286 	/*
80287 	 * Unconditional fence. Indication to complete all
80288 	 * previous SQ's WQEs before executing this WQE.
80289 	 *
80290 	 * This flag must be zero for a UD send.
80291 	 */
80292 	#define SQ_SEND_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
80293 	/*
80294 	 * Solicit event flag. Indication sent in BTH header to the
80295 	 * receiver to generate a Completion Event Notification, i.e.
80296 	 * CNQE.
80297 	 */
80298 	#define SQ_SEND_V3_FLAGS_SE			UINT32_C(0x8)
80299 	/*
80300 	 * Indicate that inline data is posted to the SQ in the data
80301 	 * area of this WQE.
80302 	 */
80303 	#define SQ_SEND_V3_FLAGS_INLINE		UINT32_C(0x10)
80304 	/*
80305 	 * If set to 1, then the timestamp from the WQE is used. If
80306 	 * cleared to 0, then TWE provides the timestamp.
80307 	 */
80308 	#define SQ_SEND_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
80309 	/*
80310 	 * When set to '1', this operation will cause a trace capture in
80311 	 * each block it passes through.
80312 	 */
80313 	#define SQ_SEND_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
80314 	/*  */
80315 	uint8_t	wqe_size;
80316 	/*
80317 	 * The number of 16 bytes chunks of data including this first
80318 	 * word of the request that are a valid part of the request. The
80319 	 * valid 16 bytes units other than the WQE structure can be
80320 	 * SGEs (Scatter Gather Elements) OR inline data.
80321 	 *
80322 	 * Note: Since the WQE header consumes only one slot (16 bytes)
80323 	 * for this type of WQE, and the maximum number of SGEs supported
80324 	 * by the device is 30, this field must never exceed 31.
80325 	 */
80326 	#define SQ_SEND_V3_WQE_SIZE_MASK UINT32_C(0x3f)
80327 	#define SQ_SEND_V3_WQE_SIZE_SFT 0
80328 	uint8_t	inline_length;
80329 	/*
80330 	 * When inline flag is '1', this field determines the number of
80331 	 * bytes that are valid in the last 16B unit of the inline WQE.
80332 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
80333 	 * the last 16B unit are valid. This means the total size of the
80334 	 * inline data is determined by a combination of the wqe_size field
80335 	 * and this inline_length field.
80336 	 *
80337 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
80338 	 * ((inline_length == 0 ) ? 16 : inline_length)
80339 	 *
80340 	 * Where data_offset_in_bytes is the offset within the WQE where
80341 	 * the data field starts.
80342 	 *
80343 	 * Note that this field is not applicable for zero-length inline
80344 	 * WQEs.
80345 	 */
80346 	#define SQ_SEND_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
80347 	#define SQ_SEND_V3_INLINE_LENGTH_SFT 0
80348 	/*
80349 	 * This value will be returned in the completion if the completion is
80350 	 * signaled.
80351 	 */
80352 	uint32_t	opaque;
80353 	/*
80354 	 * Either invalidate key (R_Key of the remote host) that will
80355 	 * be send with IETH (Invalidate ETH) if wqe_type is of Send
80356 	 * with Invalidate, or immediate value that will be sent with
80357 	 * ImmDt header if wqe_type is Send with Immediate.
80358 	 */
80359 	uint32_t	inv_key_or_imm_data;
80360 	uint32_t	timestamp;
80361 	/*
80362 	 * This field specifies a 24-bit timestamp that can be passed
80363 	 * down the TX path and optionally logged in the TXP timestamp
80364 	 * histogram.
80365 	 */
80366 	#define SQ_SEND_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
80367 	#define SQ_SEND_V3_TIMESTAMP_SFT 0
80368 	/*
80369 	 * When inline=0, then this area is filled with from 1 to 30 SGEs
80370 	 * based on the wqe_size field.
80371 	 *
80372 	 * When inline=1, this area is filled with payload data for the
80373 	 * send. Length of data is described in the inline_length field.
80374 	 * Bits [7:0] of word 0 hold the first byte to go out on the wire.
80375 	 */
80376 	uint32_t	data[28];
80377 } sq_send_v3_t, *psq_send_v3_t;
80378 
80379 /* Send SQ WQE V3 header. */
80380 /* sq_send_hdr_v3 (size:128b/16B) */
80381 
80382 typedef struct sq_send_hdr_v3 {
80383 	/* This field defines the type of SQ WQE. */
80384 	uint8_t	wqe_type;
80385 	/* Send V3 */
80386 	#define SQ_SEND_HDR_V3_WQE_TYPE_SEND_V3	UINT32_C(0x10)
80387 	/*
80388 	 * Send with Immediate V3
80389 	 *
80390 	 * Allowed only on reliable connection (RC) SQs.
80391 	 */
80392 	#define SQ_SEND_HDR_V3_WQE_TYPE_SEND_W_IMMED_V3   UINT32_C(0x11)
80393 	/*
80394 	 * Send with Invalidate V3
80395 	 *
80396 	 * Allowed only on reliable connection (RC) SQs.
80397 	 */
80398 	#define SQ_SEND_HDR_V3_WQE_TYPE_SEND_W_INVALID_V3 UINT32_C(0x12)
80399 	#define SQ_SEND_HDR_V3_WQE_TYPE_LAST		SQ_SEND_HDR_V3_WQE_TYPE_SEND_W_INVALID_V3
80400 	uint8_t	flags;
80401 	/*
80402 	 * Set if completion signaling is requested. If this bit is
80403 	 * 0, and the SQ is configured to support Unsignaled completion
80404 	 * the controller should not generate a CQE unless there was
80405 	 * an error. This refers to the CQE on the sender side. (The se
80406 	 * flag refers to the receiver side).
80407 	 */
80408 	#define SQ_SEND_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
80409 	/*
80410 	 * Indication to complete all previous RDMA Read or Atomic WQEs
80411 	 * on the SQ before executing this WQE.
80412 	 *
80413 	 * This flag must be zero for a UD send.
80414 	 */
80415 	#define SQ_SEND_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
80416 	/*
80417 	 * Unconditional fence. Indication to complete all
80418 	 * previous SQ's WQEs before executing this WQE.
80419 	 *
80420 	 * This flag must be zero for a UD send.
80421 	 */
80422 	#define SQ_SEND_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
80423 	/*
80424 	 * Solicit event flag. Indication sent in BTH header to the
80425 	 * receiver to generate a Completion Event Notification, i.e.
80426 	 * CNQE.
80427 	 */
80428 	#define SQ_SEND_HDR_V3_FLAGS_SE			UINT32_C(0x8)
80429 	/*
80430 	 * Indicate that inline data is posted to the SQ in the data
80431 	 * area of this WQE.
80432 	 */
80433 	#define SQ_SEND_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
80434 	/*
80435 	 * If set to 1, then the timestamp from the WQE is used. If
80436 	 * cleared to 0, then TWE provides the timestamp.
80437 	 */
80438 	#define SQ_SEND_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
80439 	/*
80440 	 * When set to '1', this operation will cause a trace capture in
80441 	 * each block it passes through.
80442 	 */
80443 	#define SQ_SEND_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
80444 	/*  */
80445 	uint8_t	wqe_size;
80446 	/*
80447 	 * The number of 16 bytes chunks of data including this first
80448 	 * word of the request that are a valid part of the request. The
80449 	 * valid 16 bytes units other than the WQE structure can be
80450 	 * SGEs (Scatter Gather Elements) OR inline data.
80451 	 *
80452 	 * Note: Since the WQE header consumes only one slot (16 bytes)
80453 	 * for this type of WQE, and the maximum number of SGEs supported
80454 	 * by the device is 30, this field must never exceed 31.
80455 	 */
80456 	#define SQ_SEND_HDR_V3_WQE_SIZE_MASK UINT32_C(0x3f)
80457 	#define SQ_SEND_HDR_V3_WQE_SIZE_SFT 0
80458 	uint8_t	inline_length;
80459 	/*
80460 	 * When inline flag is '1', this field determines the number of
80461 	 * bytes that are valid in the last 16B unit of the inline WQE.
80462 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
80463 	 * the last 16B unit are valid. This means the total size of the
80464 	 * inline data is determined by a combination of the wqe_size field
80465 	 * and this inline_length field.
80466 	 *
80467 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
80468 	 * ((inline_length == 0 ) ? 16 : inline_length)
80469 	 *
80470 	 * Where data_offset_in_bytes is the offset within the WQE where
80471 	 * the data field starts.
80472 	 *
80473 	 * Note that this field is not applicable for zero-length inline
80474 	 * WQEs.
80475 	 */
80476 	#define SQ_SEND_HDR_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
80477 	#define SQ_SEND_HDR_V3_INLINE_LENGTH_SFT 0
80478 	/*
80479 	 * This value will be returned in the completion if the completion is
80480 	 * signaled.
80481 	 */
80482 	uint32_t	opaque;
80483 	/*
80484 	 * Either invalidate key (R_Key of the remote host) that will
80485 	 * be send with IETH (Invalidate ETH) if wqe_type is of Send
80486 	 * with Invalidate, or immediate value that will be sent with
80487 	 * ImmDt header if wqe_type is Send with Immediate.
80488 	 */
80489 	uint32_t	inv_key_or_imm_data;
80490 	uint32_t	timestamp;
80491 	/*
80492 	 * This field specifies a 24-bit timestamp that can be passed
80493 	 * down the TX path and optionally logged in the TXP timestamp
80494 	 * histogram.
80495 	 */
80496 	#define SQ_SEND_HDR_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
80497 	#define SQ_SEND_HDR_V3_TIMESTAMP_SFT 0
80498 } sq_send_hdr_v3_t, *psq_send_hdr_v3_t;
80499 
80500 /* SQ WQE V3 for Raw Ethernet and QP1 */
80501 /* sq_rawqp1send_v3 (size:1024b/128B) */
80502 
80503 typedef struct sq_rawqp1send_v3 {
80504 	/* This field defines the type of SQ WQE. */
80505 	uint8_t	wqe_type;
80506 	/* RawEth/QP1 Send V3 */
80507 	#define SQ_RAWQP1SEND_V3_WQE_TYPE_RAWQP1SEND_V3 UINT32_C(0x1d)
80508 	#define SQ_RAWQP1SEND_V3_WQE_TYPE_LAST	SQ_RAWQP1SEND_V3_WQE_TYPE_RAWQP1SEND_V3
80509 	uint8_t	flags;
80510 	/*
80511 	 * Set if completion signaling is requested. If this bit is
80512 	 * 0, and the SQ is configured to support Unsignaled completion
80513 	 * the controller should not generate a CQE unless there was
80514 	 * an error. This refers to the CQE on the sender side. (The se
80515 	 * flag refers to the receiver side).
80516 	 */
80517 	#define SQ_RAWQP1SEND_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
80518 	/*
80519 	 * Indication to complete all previous RDMA Read or Atomic WQEs
80520 	 * on the SQ before executing this WQE.
80521 	 *
80522 	 * This flag must be zero for a QP1 send.
80523 	 */
80524 	#define SQ_RAWQP1SEND_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
80525 	/*
80526 	 * Unconditional fence. Indication to complete all
80527 	 * previous SQ's WQEs before executing this WQE.
80528 	 *
80529 	 * This flag must be zero for a QP1 send.
80530 	 */
80531 	#define SQ_RAWQP1SEND_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
80532 	/*
80533 	 * Solicit event flag. Indication sent in BTH header to the
80534 	 * receiver to generate a Completion Event Notification, i.e.
80535 	 * CNQE.
80536 	 *
80537 	 * This flag must be zero for a QP1 send.
80538 	 */
80539 	#define SQ_RAWQP1SEND_V3_FLAGS_SE			UINT32_C(0x8)
80540 	/*
80541 	 * Indicate that inline data is posted to the SQ in the data
80542 	 * area of this WQE.
80543 	 */
80544 	#define SQ_RAWQP1SEND_V3_FLAGS_INLINE		UINT32_C(0x10)
80545 	/*
80546 	 * If set to 1, then the timestamp from the WQE is used. If
80547 	 * cleared to 0, then TWE provides the timestamp.
80548 	 */
80549 	#define SQ_RAWQP1SEND_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
80550 	/*
80551 	 * When set to '1', this operation will cause a trace capture in
80552 	 * each block it passes through.
80553 	 */
80554 	#define SQ_RAWQP1SEND_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
80555 	/*  */
80556 	uint8_t	wqe_size;
80557 	/*
80558 	 * The number of 16 bytes chunks of data including this first
80559 	 * word of the request that are a valid part of the request. The
80560 	 * valid 16 bytes units other than the WQE structure can be
80561 	 * SGEs (Scatter Gather Elements) OR inline data.
80562 	 *
80563 	 * This field shall never exceed 32 for WQEs of this type.
80564 	 */
80565 	#define SQ_RAWQP1SEND_V3_WQE_SIZE_MASK UINT32_C(0x3f)
80566 	#define SQ_RAWQP1SEND_V3_WQE_SIZE_SFT 0
80567 	uint8_t	inline_length;
80568 	/*
80569 	 * When inline flag is '1', this field determines the number of
80570 	 * bytes that are valid in the last 16B unit of the inline WQE.
80571 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
80572 	 * the last 16B unit are valid. This means the total size of the
80573 	 * inline data is determined by a combination of the wqe_size field
80574 	 * and this inline_length field.
80575 	 *
80576 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
80577 	 * ((inline_length == 0 ) ? 16 : inline_length)
80578 	 *
80579 	 * Where data_offset_in_bytes is the offset within the WQE where
80580 	 * the data field starts.
80581 	 *
80582 	 * Note that this field is not applicable for zero-length inline
80583 	 * WQEs.
80584 	 */
80585 	#define SQ_RAWQP1SEND_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
80586 	#define SQ_RAWQP1SEND_V3_INLINE_LENGTH_SFT 0
80587 	/*
80588 	 * This value will be returned in the completion if the completion is
80589 	 * signaled.
80590 	 */
80591 	uint32_t	opaque;
80592 	/*
80593 	 * All bits in this field must be valid on the first BD of a packet.
80594 	 * Their value on other BDs of the packet will be ignored.
80595 	 */
80596 	uint16_t	lflags;
80597 	/*
80598 	 * If set to 1, the controller replaces the TCP/UPD checksum
80599 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
80600 	 * checksum field of the encapsulated TCP/UDP packets with the
80601 	 * hardware calculated TCP/UDP checksum for the packet associated
80602 	 * with this descriptor.
80603 	 *
80604 	 * This bit must be valid on the first BD of a packet.
80605 	 */
80606 	#define SQ_RAWQP1SEND_V3_LFLAGS_TCP_UDP_CHKSUM	UINT32_C(0x1)
80607 	/*
80608 	 * If set to 1, the controller replaces the IP checksum of the
80609 	 * normal packets, or the inner IP checksum of the encapsulated
80610 	 * packets with the hardware calculated IP checksum for the
80611 	 * packet associated with this descriptor.
80612 	 *
80613 	 * This bit must be valid on the first BD of a packet.
80614 	 */
80615 	#define SQ_RAWQP1SEND_V3_LFLAGS_IP_CHKSUM	UINT32_C(0x2)
80616 	/*
80617 	 * If set to 1, the controller will not append an Ethernet CRC
80618 	 * to the end of the frame.
80619 	 *
80620 	 * This bit must be valid on the first BD of a packet.
80621 	 *
80622 	 * Packet must be 64B or longer when this flag is set. It is not
80623 	 * useful to use this bit with any form of TX offload such as
80624 	 * CSO or LSO. The intent is that the packet from the host already
80625 	 * has a valid Ethernet CRC on the packet.
80626 	 */
80627 	#define SQ_RAWQP1SEND_V3_LFLAGS_NOCRC		UINT32_C(0x4)
80628 	/*
80629 	 * If set to 1, The controller replaces the tunnel IP checksum
80630 	 * field with hardware calculated IP checksum for the IP header
80631 	 * of the packet associated with this descriptor. In case of
80632 	 * VXLAN, the controller also replaces the outer header UDP
80633 	 * checksum with hardware calculated UDP checksum for the packet
80634 	 * associated with this descriptor.
80635 	 */
80636 	#define SQ_RAWQP1SEND_V3_LFLAGS_T_IP_CHKSUM	UINT32_C(0x10)
80637 	/*
80638 	 * If set to 1, The controller replaces the Outer-tunnel IP
80639 	 * checksum field with hardware calculated IP checksum for the IP
80640 	 * header of the packet associated with this descriptor.
80641 	 *
80642 	 * For outer UDP checksum, it will be the following behavior for
80643 	 * all cases independent of settings of inner LSO and checksum
80644 	 * offload BD flags:
80645 	 *
80646 	 * - If outer UDP checksum is 0, then do not update it.
80647 	 * - If outer UDP checksum is non zero, then the hardware should
80648 	 *   compute and update it.
80649 	 */
80650 	#define SQ_RAWQP1SEND_V3_LFLAGS_OT_IP_CHKSUM	UINT32_C(0x20)
80651 	/*
80652 	 * If set to '1', then the RoCE ICRC will be appended to the
80653 	 * packet. Packet must be a valid RoCE format packet.
80654 	 */
80655 	#define SQ_RAWQP1SEND_V3_LFLAGS_ROCE_CRC	UINT32_C(0x100)
80656 	/*
80657 	 * If set to '1', then the FCoE CRC will be appended to the
80658 	 * packet. Packet must be a valid FCoE format packet.
80659 	 */
80660 	#define SQ_RAWQP1SEND_V3_LFLAGS_FCOE_CRC	UINT32_C(0x200)
80661 	/*
80662 	 * This value selects a CFA action to perform on the packet.
80663 	 * Set this value to zero if no CFA action is desired.
80664 	 *
80665 	 * This value must be valid on the first BD of a packet.
80666 	 */
80667 	uint16_t	cfa_action;
80668 	/*
80669 	 * This value selects a CFA action to perform on the packet.
80670 	 * Set this value to zero if no CFA action is desired.
80671 	 *
80672 	 * This value must be valid on the first BD of a packet.
80673 	 */
80674 	uint16_t	cfa_action_high;
80675 	/*
80676 	 * This value selects bits 25:16 of the CFA action to perform on
80677 	 * the packet. See the cfa_action field for more information.
80678 	 */
80679 	#define SQ_RAWQP1SEND_V3_CFA_ACTION_HIGH_MASK UINT32_C(0x3ff)
80680 	#define SQ_RAWQP1SEND_V3_CFA_ACTION_HIGH_SFT 0
80681 	uint16_t	reserved_2;
80682 	/*
80683 	 * This value is action meta-data that defines CFA edit operations
80684 	 * that are done in addition to any action editing.
80685 	 */
80686 	uint32_t	cfa_meta;
80687 	/* When key=1, This is the VLAN tag VID value. */
80688 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_VID_MASK	UINT32_C(0xfff)
80689 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_VID_SFT	0
80690 	/* When key=1, This is the VLAN tag DE value. */
80691 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_DE	UINT32_C(0x1000)
80692 	/* When key=1, This is the VLAN tag PRI value. */
80693 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_PRI_MASK	UINT32_C(0xe000)
80694 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_PRI_SFT	13
80695 	/* When key=1, This is the VLAN tag TPID select value. */
80696 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_MASK	UINT32_C(0x70000)
80697 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_SFT	16
80698 	/* 0x88a8 */
80699 		#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_TPID88A8  (UINT32_C(0x0) << 16)
80700 	/* 0x8100 */
80701 		#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_TPID8100  (UINT32_C(0x1) << 16)
80702 	/* 0x9100 */
80703 		#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_TPID9100  (UINT32_C(0x2) << 16)
80704 	/* 0x9200 */
80705 		#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_TPID9200  (UINT32_C(0x3) << 16)
80706 	/* 0x9300 */
80707 		#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_TPID9300  (UINT32_C(0x4) << 16)
80708 	/* Value programmed in CFA VLANTPID register. */
80709 		#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_TPIDCFG   (UINT32_C(0x5) << 16)
80710 		#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_LAST	SQ_RAWQP1SEND_V3_CFA_META_VLAN_TPID_TPIDCFG
80711 	/* When key=1, This is the VLAN tag TPID select value. */
80712 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_RESERVED_MASK UINT32_C(0xff80000)
80713 	#define SQ_RAWQP1SEND_V3_CFA_META_VLAN_RESERVED_SFT 19
80714 	/*
80715 	 * This field identifies the type of edit to be performed
80716 	 * on the packet.
80717 	 *
80718 	 * This value must be valid on the first BD of a packet.
80719 	 */
80720 	#define SQ_RAWQP1SEND_V3_CFA_META_KEY_MASK	UINT32_C(0xf0000000)
80721 	#define SQ_RAWQP1SEND_V3_CFA_META_KEY_SFT	28
80722 	/* No editing */
80723 		#define SQ_RAWQP1SEND_V3_CFA_META_KEY_NONE		(UINT32_C(0x0) << 28)
80724 	/*
80725 	 * - meta[17:16] - TPID select value (0 = 0x8100).
80726 	 * - meta[15:12] - PRI/DE value.
80727 	 * - meta[11:0] - VID value.
80728 	 */
80729 		#define SQ_RAWQP1SEND_V3_CFA_META_KEY_VLAN_TAG	(UINT32_C(0x1) << 28)
80730 		#define SQ_RAWQP1SEND_V3_CFA_META_KEY_LAST	SQ_RAWQP1SEND_V3_CFA_META_KEY_VLAN_TAG
80731 	uint32_t	timestamp;
80732 	/*
80733 	 * This field specifies a 24-bit timestamp that can be passed
80734 	 * down the TX path and optionally logged in the TXP timestamp
80735 	 * histogram.
80736 	 */
80737 	#define SQ_RAWQP1SEND_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
80738 	#define SQ_RAWQP1SEND_V3_TIMESTAMP_SFT 0
80739 	uint64_t	reserved_3;
80740 	/*
80741 	 * When inline=0, then this area is filled with from 1 to 6 SGEs
80742 	 * based on the wqe_size field.
80743 	 *
80744 	 * When inline=1, this area is filled with payload data for the
80745 	 * send. Length of data is described in the inline_length field.
80746 	 * Bits [7:0] of word 0 hold the first byte to go out on the wire.
80747 	 */
80748 	uint32_t	data[24];
80749 } sq_rawqp1send_v3_t, *psq_rawqp1send_v3_t;
80750 
80751 /* SQ WQE V3 structure for Raw Ethernet and QP1 SQs. */
80752 /* sq_rawqp1send_hdr_v3 (size:256b/32B) */
80753 
80754 typedef struct sq_rawqp1send_hdr_v3 {
80755 	/* This field defines the type of SQ WQE. */
80756 	uint8_t	wqe_type;
80757 	/* RawEth/QP1 Send V3 */
80758 	#define SQ_RAWQP1SEND_HDR_V3_WQE_TYPE_RAWQP1SEND_V3 UINT32_C(0x1d)
80759 	#define SQ_RAWQP1SEND_HDR_V3_WQE_TYPE_LAST	SQ_RAWQP1SEND_HDR_V3_WQE_TYPE_RAWQP1SEND_V3
80760 	uint8_t	flags;
80761 	/*
80762 	 * Set if completion signaling is requested. If this bit is
80763 	 * 0, and the SQ is configured to support Unsignaled completion
80764 	 * the controller should not generate a CQE unless there was
80765 	 * an error. This refers to the CQE on the sender side. (The se
80766 	 * flag refers to the receiver side).
80767 	 */
80768 	#define SQ_RAWQP1SEND_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
80769 	/*
80770 	 * Indication to complete all previous RDMA Read or Atomic WQEs
80771 	 * on the SQ before executing this WQE.
80772 	 *
80773 	 * This flag must be zero for a QP1 send.
80774 	 */
80775 	#define SQ_RAWQP1SEND_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
80776 	/*
80777 	 * Unconditional fence. Indication to complete all
80778 	 * previous SQ's WQEs before executing this WQE.
80779 	 *
80780 	 * This flag must be zero for a QP1 send.
80781 	 */
80782 	#define SQ_RAWQP1SEND_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
80783 	/*
80784 	 * Solicit event flag. Indication sent in BTH header to the
80785 	 * receiver to generate a Completion Event Notification, i.e.
80786 	 * CNQE.
80787 	 *
80788 	 * This flag must be zero for a QP1 send.
80789 	 */
80790 	#define SQ_RAWQP1SEND_HDR_V3_FLAGS_SE			UINT32_C(0x8)
80791 	/*
80792 	 * Indicate that inline data is posted to the SQ in the data
80793 	 * area of this WQE.
80794 	 */
80795 	#define SQ_RAWQP1SEND_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
80796 	/*
80797 	 * If set to 1, then the timestamp from the WQE is used. If
80798 	 * cleared to 0, then TWE provides the timestamp.
80799 	 */
80800 	#define SQ_RAWQP1SEND_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
80801 	/*
80802 	 * When set to '1', this operation will cause a trace capture in
80803 	 * each block it passes through.
80804 	 */
80805 	#define SQ_RAWQP1SEND_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
80806 	/*  */
80807 	uint8_t	wqe_size;
80808 	/*
80809 	 * The number of 16 bytes chunks of data including this first
80810 	 * word of the request that are a valid part of the request. The
80811 	 * valid 16 bytes units other than the WQE structure can be
80812 	 * SGEs (Scatter Gather Elements) OR inline data.
80813 	 *
80814 	 * This field shall never exceed 32 for WQEs of this type.
80815 	 */
80816 	#define SQ_RAWQP1SEND_HDR_V3_WQE_SIZE_MASK UINT32_C(0x3f)
80817 	#define SQ_RAWQP1SEND_HDR_V3_WQE_SIZE_SFT 0
80818 	uint8_t	inline_length;
80819 	/*
80820 	 * When inline flag is '1', this field determines the number of
80821 	 * bytes that are valid in the last 16B unit of the inline WQE.
80822 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
80823 	 * the last 16B unit are valid. This means the total size of the
80824 	 * inline data is determined by a combination of the wqe_size field
80825 	 * and this inline_length field.
80826 	 *
80827 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
80828 	 * ((inline_length == 0 ) ? 16 : inline_length)
80829 	 *
80830 	 * Where data_offset_in_bytes is the offset within the WQE where
80831 	 * the data field starts.
80832 	 *
80833 	 * Note that this field is not applicable for zero-length inline
80834 	 * WQEs.
80835 	 */
80836 	#define SQ_RAWQP1SEND_HDR_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
80837 	#define SQ_RAWQP1SEND_HDR_V3_INLINE_LENGTH_SFT 0
80838 	/*
80839 	 * This value will be returned in the completion if the completion is
80840 	 * signaled.
80841 	 */
80842 	uint32_t	opaque;
80843 	/*
80844 	 * All bits in this field must be valid on the first BD of a packet.
80845 	 * Their value on other BDs of the packet will be ignored.
80846 	 */
80847 	uint16_t	lflags;
80848 	/*
80849 	 * If set to 1, the controller replaces the TCP/UPD checksum
80850 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
80851 	 * checksum field of the encapsulated TCP/UDP packets with the
80852 	 * hardware calculated TCP/UDP checksum for the packet associated
80853 	 * with this descriptor.
80854 	 *
80855 	 * This bit must be valid on the first BD of a packet.
80856 	 */
80857 	#define SQ_RAWQP1SEND_HDR_V3_LFLAGS_TCP_UDP_CHKSUM	UINT32_C(0x1)
80858 	/*
80859 	 * If set to 1, the controller replaces the IP checksum of the
80860 	 * normal packets, or the inner IP checksum of the encapsulated
80861 	 * packets with the hardware calculated IP checksum for the
80862 	 * packet associated with this descriptor.
80863 	 *
80864 	 * This bit must be valid on the first BD of a packet.
80865 	 */
80866 	#define SQ_RAWQP1SEND_HDR_V3_LFLAGS_IP_CHKSUM	UINT32_C(0x2)
80867 	/*
80868 	 * If set to 1, the controller will not append an Ethernet CRC
80869 	 * to the end of the frame.
80870 	 *
80871 	 * This bit must be valid on the first BD of a packet.
80872 	 *
80873 	 * Packet must be 64B or longer when this flag is set. It is not
80874 	 * useful to use this bit with any form of TX offload such as
80875 	 * CSO or LSO. The intent is that the packet from the host already
80876 	 * has a valid Ethernet CRC on the packet.
80877 	 */
80878 	#define SQ_RAWQP1SEND_HDR_V3_LFLAGS_NOCRC		UINT32_C(0x4)
80879 	/*
80880 	 * If set to 1, The controller replaces the tunnel IP checksum
80881 	 * field with hardware calculated IP checksum for the IP header
80882 	 * of the packet associated with this descriptor. In case of
80883 	 * VXLAN, the controller also replaces the outer header UDP
80884 	 * checksum with hardware calculated UDP checksum for the packet
80885 	 * associated with this descriptor.
80886 	 */
80887 	#define SQ_RAWQP1SEND_HDR_V3_LFLAGS_T_IP_CHKSUM	UINT32_C(0x10)
80888 	/*
80889 	 * If set to 1, The controller replaces the Outer-tunnel IP
80890 	 * checksum field with hardware calculated IP checksum for the IP
80891 	 * header of the packet associated with this descriptor.
80892 	 *
80893 	 * For outer UDP checksum, it will be the following behavior for
80894 	 * all cases independent of settings of inner LSO and checksum
80895 	 * offload BD flags:
80896 	 *
80897 	 * - If outer UDP checksum is 0, then do not update it.
80898 	 * - If outer UDP checksum is non zero, then the hardware should
80899 	 *   compute and update it.
80900 	 */
80901 	#define SQ_RAWQP1SEND_HDR_V3_LFLAGS_OT_IP_CHKSUM	UINT32_C(0x20)
80902 	/*
80903 	 * If set to '1', then the RoCE ICRC will be appended to the
80904 	 * packet. Packet must be a valid RoCE format packet.
80905 	 */
80906 	#define SQ_RAWQP1SEND_HDR_V3_LFLAGS_ROCE_CRC	UINT32_C(0x100)
80907 	/*
80908 	 * If set to '1', then the FCoE CRC will be appended to the
80909 	 * packet. Packet must be a valid FCoE format packet.
80910 	 */
80911 	#define SQ_RAWQP1SEND_HDR_V3_LFLAGS_FCOE_CRC	UINT32_C(0x200)
80912 	/*
80913 	 * This value selects a CFA action to perform on the packet.
80914 	 * Set this value to zero if no CFA action is desired.
80915 	 *
80916 	 * This value must be valid on the first BD of a packet.
80917 	 */
80918 	uint16_t	cfa_action;
80919 	/*
80920 	 * This value selects a CFA action to perform on the packet.
80921 	 * Set this value to zero if no CFA action is desired.
80922 	 *
80923 	 * This value must be valid on the first BD of a packet.
80924 	 */
80925 	uint16_t	cfa_action_high;
80926 	/*
80927 	 * This value selects bits 25:16 of the CFA action to perform on
80928 	 * the packet. See the cfa_action field for more information.
80929 	 */
80930 	#define SQ_RAWQP1SEND_HDR_V3_CFA_ACTION_HIGH_MASK UINT32_C(0x3ff)
80931 	#define SQ_RAWQP1SEND_HDR_V3_CFA_ACTION_HIGH_SFT 0
80932 	uint16_t	reserved_2;
80933 	/*
80934 	 * This value is action meta-data that defines CFA edit operations
80935 	 * that are done in addition to any action editing.
80936 	 */
80937 	uint32_t	cfa_meta;
80938 	/* When key=1, This is the VLAN tag VID value. */
80939 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_VID_MASK	UINT32_C(0xfff)
80940 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_VID_SFT	0
80941 	/* When key=1, This is the VLAN tag DE value. */
80942 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_DE	UINT32_C(0x1000)
80943 	/* When key=1, This is the VLAN tag PRI value. */
80944 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_PRI_MASK	UINT32_C(0xe000)
80945 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_PRI_SFT	13
80946 	/* When key=1, This is the VLAN tag TPID select value. */
80947 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_MASK	UINT32_C(0x70000)
80948 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_SFT	16
80949 	/* 0x88a8 */
80950 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_TPID88A8  (UINT32_C(0x0) << 16)
80951 	/* 0x8100 */
80952 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_TPID8100  (UINT32_C(0x1) << 16)
80953 	/* 0x9100 */
80954 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_TPID9100  (UINT32_C(0x2) << 16)
80955 	/* 0x9200 */
80956 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_TPID9200  (UINT32_C(0x3) << 16)
80957 	/* 0x9300 */
80958 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_TPID9300  (UINT32_C(0x4) << 16)
80959 	/* Value programmed in CFA VLANTPID register. */
80960 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_TPIDCFG   (UINT32_C(0x5) << 16)
80961 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_LAST	SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_TPID_TPIDCFG
80962 	/* When key=1, This is the VLAN tag TPID select value. */
80963 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_RESERVED_MASK UINT32_C(0xff80000)
80964 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_VLAN_RESERVED_SFT 19
80965 	/*
80966 	 * This field identifies the type of edit to be performed
80967 	 * on the packet.
80968 	 *
80969 	 * This value must be valid on the first BD of a packet.
80970 	 */
80971 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_KEY_MASK	UINT32_C(0xf0000000)
80972 	#define SQ_RAWQP1SEND_HDR_V3_CFA_META_KEY_SFT	28
80973 	/* No editing */
80974 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_KEY_NONE		(UINT32_C(0x0) << 28)
80975 	/*
80976 	 * - meta[17:16] - TPID select value (0 = 0x8100).
80977 	 * - meta[15:12] - PRI/DE value.
80978 	 * - meta[11:0] - VID value.
80979 	 */
80980 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_KEY_VLAN_TAG	(UINT32_C(0x1) << 28)
80981 		#define SQ_RAWQP1SEND_HDR_V3_CFA_META_KEY_LAST	SQ_RAWQP1SEND_HDR_V3_CFA_META_KEY_VLAN_TAG
80982 	uint32_t	timestamp;
80983 	/*
80984 	 * This field specifies a 24-bit timestamp that can be passed
80985 	 * down the TX path and optionally logged in the TXP timestamp
80986 	 * histogram.
80987 	 */
80988 	#define SQ_RAWQP1SEND_HDR_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
80989 	#define SQ_RAWQP1SEND_HDR_V3_TIMESTAMP_SFT 0
80990 	uint64_t	reserved_3;
80991 } sq_rawqp1send_hdr_v3_t, *psq_rawqp1send_hdr_v3_t;
80992 
80993 /* SQ Send WQE V3 for UD SQs. */
80994 /* sq_udsend_v3 (size:1024b/128B) */
80995 
80996 typedef struct sq_udsend_v3 {
80997 	/* This field defines the type of SQ WQE. */
80998 	uint8_t	wqe_type;
80999 	/*
81000 	 * UD Send V3
81001 	 *
81002 	 * Allowed only on unreliable datagram (UD) SQs.
81003 	 */
81004 	#define SQ_UDSEND_V3_WQE_TYPE_UDSEND_V3	UINT32_C(0x13)
81005 	/*
81006 	 * UD Send with Immediate V3
81007 	 *
81008 	 * Allowed only on unreliable datagram (UD) SQs.
81009 	 */
81010 	#define SQ_UDSEND_V3_WQE_TYPE_UDSEND_W_IMMED_V3 UINT32_C(0x14)
81011 	#define SQ_UDSEND_V3_WQE_TYPE_LAST		SQ_UDSEND_V3_WQE_TYPE_UDSEND_W_IMMED_V3
81012 	uint8_t	flags;
81013 	/*
81014 	 * Set if completion signaling is requested. If this bit is
81015 	 * 0, and the SQ is configured to support Unsignaled completion
81016 	 * the controller should not generate a CQE unless there was
81017 	 * an error. This refers to the CQE on the sender side. (The se
81018 	 * flag refers to the receiver side).
81019 	 */
81020 	#define SQ_UDSEND_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81021 	/*
81022 	 * Indication to complete all previous RDMA Read or Atomic WQEs
81023 	 * on the SQ before executing this WQE.
81024 	 *
81025 	 * This flag must be zero for a UD send.
81026 	 */
81027 	#define SQ_UDSEND_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81028 	/*
81029 	 * Unconditional fence. Indication to complete all
81030 	 * previous SQ's WQEs before executing this WQE.
81031 	 *
81032 	 * This flag must be zero for a UD send.
81033 	 */
81034 	#define SQ_UDSEND_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81035 	/*
81036 	 * Solicit event flag. Indication sent in BTH header to the
81037 	 * receiver to generate a Completion Event Notification, i.e.
81038 	 * CNQE.
81039 	 */
81040 	#define SQ_UDSEND_V3_FLAGS_SE			UINT32_C(0x8)
81041 	/*
81042 	 * Indicate that inline data is posted to the SQ in the data
81043 	 * area of this WQE.
81044 	 */
81045 	#define SQ_UDSEND_V3_FLAGS_INLINE		UINT32_C(0x10)
81046 	/*
81047 	 * If set to 1, then the timestamp from the WQE is used. If
81048 	 * cleared to 0, then TWE provides the timestamp.
81049 	 */
81050 	#define SQ_UDSEND_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81051 	/*
81052 	 * When set to '1', this operation will cause a trace capture in
81053 	 * each block it passes through.
81054 	 */
81055 	#define SQ_UDSEND_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81056 	/*  */
81057 	uint8_t	wqe_size;
81058 	/*
81059 	 * The number of 16 bytes chunks of data including this first
81060 	 * word of the request that are a valid part of the request. The
81061 	 * valid 16 bytes units other than the WQE structure can be
81062 	 * SGEs (Scatter Gather Elements) OR inline data.
81063 	 *
81064 	 * This field shall never exceed 32 for WQEs of this type.
81065 	 */
81066 	#define SQ_UDSEND_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81067 	#define SQ_UDSEND_V3_WQE_SIZE_SFT 0
81068 	uint8_t	inline_length;
81069 	/*
81070 	 * When inline flag is '1', this field determines the number of
81071 	 * bytes that are valid in the last 16B unit of the inline WQE.
81072 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
81073 	 * the last 16B unit are valid. This means the total size of the
81074 	 * inline data is determined by a combination of the wqe_size field
81075 	 * and this inline_length field.
81076 	 *
81077 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
81078 	 * ((inline_length == 0 ) ? 16 : inline_length)
81079 	 *
81080 	 * Where data_offset_in_bytes is the offset within the WQE where
81081 	 * the data field starts.
81082 	 *
81083 	 * Note that this field is not applicable for zero-length inline
81084 	 * WQEs.
81085 	 */
81086 	#define SQ_UDSEND_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
81087 	#define SQ_UDSEND_V3_INLINE_LENGTH_SFT 0
81088 	/*
81089 	 * This value will be returned in the completion if the completion is
81090 	 * signaled.
81091 	 */
81092 	uint32_t	opaque;
81093 	/*
81094 	 * Immediate value that will be sent with ImmDt header if wqe_type is
81095 	 * UD Send with Immediate.
81096 	 */
81097 	uint32_t	imm_data;
81098 	/*
81099 	 * When in the SQ of a UD QP, indicates the q_key to be used in
81100 	 * the transmitted packet. However, if the most significant bit
81101 	 * of this field is set, then the q_key will be taken from QP
81102 	 * context, rather than from this field.
81103 	 *
81104 	 * When in the SQ of a non-UD QP, this field is reserved and
81105 	 * should be filled with zeros.
81106 	 */
81107 	uint32_t	q_key;
81108 	/*
81109 	 * When in the SQ of a UD QP, indicates the destination QP to be
81110 	 * used in the transmitted packet.
81111 	 *
81112 	 * When in the SQ of a non-UD QP, this field is reserved and
81113 	 * should be filled with zeros.
81114 	 */
81115 	uint32_t	dst_qp;
81116 	#define SQ_UDSEND_V3_DST_QP_MASK UINT32_C(0xffffff)
81117 	#define SQ_UDSEND_V3_DST_QP_SFT 0
81118 	uint32_t	avid;
81119 	/*
81120 	 * If the serv_type is 'UD', then this field supplies the AVID
81121 	 * (Address Vector ID).
81122 	 */
81123 	#define SQ_UDSEND_V3_AVID_MASK UINT32_C(0x3ff)
81124 	#define SQ_UDSEND_V3_AVID_SFT 0
81125 	uint32_t	reserved2;
81126 	uint32_t	timestamp;
81127 	/*
81128 	 * This field specifies a 24-bit timestamp that can be passed
81129 	 * down the TX path and optionally logged in the TXP timestamp
81130 	 * histogram.
81131 	 */
81132 	#define SQ_UDSEND_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
81133 	#define SQ_UDSEND_V3_TIMESTAMP_SFT 0
81134 	/*
81135 	 * When inline=0, then this area is filled with from 1 to 30 SGEs
81136 	 * based on the wqe_size field.
81137 	 *
81138 	 * When inline=1, this area is filled with payload data for the
81139 	 * send. Length of data is described in the inline_length field.
81140 	 * Bits [7:0] of word 0 hold the first byte to go out on the wire.
81141 	 */
81142 	uint32_t	data[24];
81143 } sq_udsend_v3_t, *psq_udsend_v3_t;
81144 
81145 /* SQ WQE V3 header for UD SQs. */
81146 /* sq_udsend_hdr_v3 (size:256b/32B) */
81147 
81148 typedef struct sq_udsend_hdr_v3 {
81149 	/* This field defines the type of SQ WQE. */
81150 	uint8_t	wqe_type;
81151 	/*
81152 	 * UD Send V3
81153 	 *
81154 	 * Allowed only on unreliable datagram (UD) SQs.
81155 	 */
81156 	#define SQ_UDSEND_HDR_V3_WQE_TYPE_UDSEND_V3	UINT32_C(0x13)
81157 	/*
81158 	 * UD Send with Immediate V3
81159 	 *
81160 	 * Allowed only on unreliable datagram (UD) SQs.
81161 	 */
81162 	#define SQ_UDSEND_HDR_V3_WQE_TYPE_UDSEND_W_IMMED_V3 UINT32_C(0x14)
81163 	#define SQ_UDSEND_HDR_V3_WQE_TYPE_LAST		SQ_UDSEND_HDR_V3_WQE_TYPE_UDSEND_W_IMMED_V3
81164 	uint8_t	flags;
81165 	/*
81166 	 * Set if completion signaling is requested. If this bit is
81167 	 * 0, and the SQ is configured to support Unsignaled completion
81168 	 * the controller should not generate a CQE unless there was
81169 	 * an error. This refers to the CQE on the sender side. (The se
81170 	 * flag refers to the receiver side).
81171 	 */
81172 	#define SQ_UDSEND_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81173 	/*
81174 	 * Indication to complete all previous RDMA Read or Atomic WQEs
81175 	 * on the SQ before executing this WQE.
81176 	 *
81177 	 * This flag must be zero for a UD send.
81178 	 */
81179 	#define SQ_UDSEND_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81180 	/*
81181 	 * Unconditional fence. Indication to complete all
81182 	 * previous SQ's WQEs before executing this WQE.
81183 	 *
81184 	 * This flag must be zero for a UD send.
81185 	 */
81186 	#define SQ_UDSEND_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81187 	/*
81188 	 * Solicit event flag. Indication sent in BTH header to the
81189 	 * receiver to generate a Completion Event Notification, i.e.
81190 	 * CNQE.
81191 	 */
81192 	#define SQ_UDSEND_HDR_V3_FLAGS_SE			UINT32_C(0x8)
81193 	/*
81194 	 * Indicate that inline data is posted to the SQ in the data
81195 	 * area of this WQE.
81196 	 */
81197 	#define SQ_UDSEND_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
81198 	/*
81199 	 * If set to 1, then the timestamp from the WQE is used. If
81200 	 * cleared to 0, then TWE provides the timestamp.
81201 	 */
81202 	#define SQ_UDSEND_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81203 	/*
81204 	 * When set to '1', this operation will cause a trace capture in
81205 	 * each block it passes through.
81206 	 */
81207 	#define SQ_UDSEND_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81208 	/*  */
81209 	uint8_t	wqe_size;
81210 	/*
81211 	 * The number of 16 bytes chunks of data including this first
81212 	 * word of the request that are a valid part of the request. The
81213 	 * valid 16 bytes units other than the WQE structure can be
81214 	 * SGEs (Scatter Gather Elements) OR inline data.
81215 	 *
81216 	 * This field shall never exceed 32 for WQEs of this type.
81217 	 */
81218 	#define SQ_UDSEND_HDR_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81219 	#define SQ_UDSEND_HDR_V3_WQE_SIZE_SFT 0
81220 	uint8_t	inline_length;
81221 	/*
81222 	 * When inline flag is '1', this field determines the number of
81223 	 * bytes that are valid in the last 16B unit of the inline WQE.
81224 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
81225 	 * the last 16B unit are valid. This means the total size of the
81226 	 * inline data is determined by a combination of the wqe_size field
81227 	 * and this inline_length field.
81228 	 *
81229 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
81230 	 * ((inline_length == 0 ) ? 16 : inline_length)
81231 	 *
81232 	 * Where data_offset_in_bytes is the offset within the WQE where
81233 	 * the data field starts.
81234 	 *
81235 	 * Note that this field is not applicable for zero-length inline
81236 	 * WQEs.
81237 	 */
81238 	#define SQ_UDSEND_HDR_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
81239 	#define SQ_UDSEND_HDR_V3_INLINE_LENGTH_SFT 0
81240 	/*
81241 	 * This value will be returned in the completion if the completion is
81242 	 * signaled.
81243 	 */
81244 	uint32_t	opaque;
81245 	/*
81246 	 * Immediate value that will be sent with ImmDt header if wqe_type is
81247 	 * UD Send with Immediate.
81248 	 */
81249 	uint32_t	imm_data;
81250 	/*
81251 	 * When in the SQ of a UD QP, indicates the q_key to be used in
81252 	 * the transmitted packet. However, if the most significant bit
81253 	 * of this field is set, then the q_key will be taken from QP
81254 	 * context, rather than from this field.
81255 	 *
81256 	 * When in the SQ of a non-UD QP, this field is reserved and
81257 	 * should be filled with zeros.
81258 	 */
81259 	uint32_t	q_key;
81260 	/*
81261 	 * When in the SQ of a UD QP, indicates the destination QP to be
81262 	 * used in the transmitted packet.
81263 	 *
81264 	 * When in the SQ of a non-UD QP, this field is reserved and
81265 	 * should be filled with zeros.
81266 	 */
81267 	uint32_t	dst_qp;
81268 	#define SQ_UDSEND_HDR_V3_DST_QP_MASK UINT32_C(0xffffff)
81269 	#define SQ_UDSEND_HDR_V3_DST_QP_SFT 0
81270 	uint32_t	avid;
81271 	/*
81272 	 * If the serv_type is 'UD', then this field supplies the AVID
81273 	 * (Address Vector ID).
81274 	 */
81275 	#define SQ_UDSEND_HDR_V3_AVID_MASK UINT32_C(0x3ff)
81276 	#define SQ_UDSEND_HDR_V3_AVID_SFT 0
81277 	uint32_t	reserved2;
81278 	uint32_t	timestamp;
81279 	/*
81280 	 * This field specifies a 24-bit timestamp that can be passed
81281 	 * down the TX path and optionally logged in the TXP timestamp
81282 	 * histogram.
81283 	 */
81284 	#define SQ_UDSEND_HDR_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
81285 	#define SQ_UDSEND_HDR_V3_TIMESTAMP_SFT 0
81286 } sq_udsend_hdr_v3_t, *psq_udsend_hdr_v3_t;
81287 
81288 /* SQ RDMA WQE V3 for RC SQs. */
81289 /* sq_rdma_v3 (size:1024b/128B) */
81290 
81291 typedef struct sq_rdma_v3 {
81292 	/* This field defines the type of SQ WQE. */
81293 	uint8_t	wqe_type;
81294 	/*
81295 	 * RDMA Write V3
81296 	 *
81297 	 * Allowed only on reliable connection (RC) SQs.
81298 	 */
81299 	#define SQ_RDMA_V3_WQE_TYPE_WRITE_WQE_V3	UINT32_C(0x15)
81300 	/*
81301 	 * RDMA Write with Immediate V3
81302 	 *
81303 	 * Allowed only on reliable connection (RC) SQs.
81304 	 */
81305 	#define SQ_RDMA_V3_WQE_TYPE_WRITE_W_IMMED_V3 UINT32_C(0x16)
81306 	/*
81307 	 * RDMA Read V3
81308 	 *
81309 	 * Allowed only on reliable connection (RC) SQs.
81310 	 */
81311 	#define SQ_RDMA_V3_WQE_TYPE_READ_WQE_V3	UINT32_C(0x17)
81312 	#define SQ_RDMA_V3_WQE_TYPE_LAST		SQ_RDMA_V3_WQE_TYPE_READ_WQE_V3
81313 	uint8_t	flags;
81314 	/*
81315 	 * Set if completion signaling is requested. If this bit is
81316 	 * 0, and the SQ is configured to support Unsignaled
81317 	 * completion the controller should not generate a CQE
81318 	 * unless there was an error. This refers to CQE on the
81319 	 * sender side (The se flag refers to the receiver side).
81320 	 */
81321 	#define SQ_RDMA_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81322 	/*
81323 	 * Indication to complete all previous RDMA Read or Atomic
81324 	 * WQEs on the SQ before executing this WQE
81325 	 */
81326 	#define SQ_RDMA_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81327 	/*
81328 	 * Unconditional fence. Indication to complete all previous
81329 	 * SQ's WQEs before executing this WQE.
81330 	 */
81331 	#define SQ_RDMA_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81332 	/*
81333 	 * Solicit event. Indication sent in BTH header to the
81334 	 * receiver to generate a Completion Event Notification,
81335 	 * i.e. CNQE.
81336 	 */
81337 	#define SQ_RDMA_V3_FLAGS_SE			UINT32_C(0x8)
81338 	/*
81339 	 * Indicate that inline data is posted to the SQ following
81340 	 * this WQE. This bit may be 1 only for write operations.
81341 	 */
81342 	#define SQ_RDMA_V3_FLAGS_INLINE		UINT32_C(0x10)
81343 	/*
81344 	 * If set to 1, then the timestamp from the WQE is used. If
81345 	 * cleared to 0, then TWE provides the timestamp.
81346 	 */
81347 	#define SQ_RDMA_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81348 	/*
81349 	 * When set to '1', this operation will cause a trace capture in
81350 	 * each block it passes through.
81351 	 */
81352 	#define SQ_RDMA_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81353 	/*  */
81354 	uint8_t	wqe_size;
81355 	/*
81356 	 * The number of 16 bytes chunks of data including this first
81357 	 * word of the request that are a valid part of the request. The
81358 	 * valid 16 bytes units other than the WQE structure can be
81359 	 * SGEs (Scatter Gather Elements) OR inline data.
81360 	 *
81361 	 * This field shall never exceed 32 for WQEs of this type.
81362 	 */
81363 	#define SQ_RDMA_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81364 	#define SQ_RDMA_V3_WQE_SIZE_SFT 0
81365 	uint8_t	inline_length;
81366 	/*
81367 	 * When inline flag is '1', this field determines the number of
81368 	 * bytes that are valid in the last 16B unit of the inline WQE.
81369 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
81370 	 * the last 16B unit are valid. This means the total size of the
81371 	 * inline data is determined by a combination of the wqe_size field
81372 	 * and this inline_length field.
81373 	 *
81374 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
81375 	 * ((inline_length == 0 ) ? 16 : inline_length)
81376 	 *
81377 	 * Where data_offset_in_bytes is the offset within the WQE where
81378 	 * the data field starts.
81379 	 *
81380 	 * Note that this field is not applicable for zero-length inline
81381 	 * WQEs.
81382 	 */
81383 	#define SQ_RDMA_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
81384 	#define SQ_RDMA_V3_INLINE_LENGTH_SFT 0
81385 	/*
81386 	 * This value will be returned in the completion if the completion is
81387 	 * signaled.
81388 	 */
81389 	uint32_t	opaque;
81390 	/*
81391 	 * Immediate data - valid for RDMA Write with immediate and
81392 	 * causes the controller to add immDt header with this value
81393 	 */
81394 	uint32_t	imm_data;
81395 	uint32_t	reserved2;
81396 	/* Remote VA sent to the destination QP */
81397 	uint64_t	remote_va;
81398 	/*
81399 	 * R_Key provided by remote node when the connection was
81400 	 * established and placed in the RETH header. It identify the
81401 	 * MRW on the remote host
81402 	 */
81403 	uint32_t	remote_key;
81404 	uint32_t	timestamp;
81405 	/*
81406 	 * This field specifies a 24-bit timestamp that can be passed
81407 	 * down the TX path and optionally logged in the TXP timestamp
81408 	 * histogram.
81409 	 */
81410 	#define SQ_RDMA_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
81411 	#define SQ_RDMA_V3_TIMESTAMP_SFT 0
81412 	/*
81413 	 * When inline=0, then this area is filled with from 1 to 30 SGEs
81414 	 * based on the wqe_size field.
81415 	 *
81416 	 * When inline=1, this area is filled with payload data for the send.
81417 	 * Length of data is described in the inline_length field. Bits [7:0]
81418 	 * of word 0 hold the first byte to go out on the wire.
81419 	 */
81420 	uint32_t	data[24];
81421 } sq_rdma_v3_t, *psq_rdma_v3_t;
81422 
81423 /* SQ RDMA WQE V3 header for RC SQs. */
81424 /* sq_rdma_hdr_v3 (size:256b/32B) */
81425 
81426 typedef struct sq_rdma_hdr_v3 {
81427 	/* This field defines the type of SQ WQE. */
81428 	uint8_t	wqe_type;
81429 	/*
81430 	 * RDMA Write V3
81431 	 *
81432 	 * Allowed only on reliable connection (RC) SQs.
81433 	 */
81434 	#define SQ_RDMA_HDR_V3_WQE_TYPE_WRITE_WQE_V3	UINT32_C(0x15)
81435 	/*
81436 	 * RDMA Write with Immediate V3
81437 	 *
81438 	 * Allowed only on reliable connection (RC) SQs.
81439 	 */
81440 	#define SQ_RDMA_HDR_V3_WQE_TYPE_WRITE_W_IMMED_V3 UINT32_C(0x16)
81441 	/*
81442 	 * RDMA Read V3
81443 	 *
81444 	 * Allowed only on reliable connection (RC) SQs.
81445 	 */
81446 	#define SQ_RDMA_HDR_V3_WQE_TYPE_READ_WQE_V3	UINT32_C(0x17)
81447 	#define SQ_RDMA_HDR_V3_WQE_TYPE_LAST		SQ_RDMA_HDR_V3_WQE_TYPE_READ_WQE_V3
81448 	uint8_t	flags;
81449 	/*
81450 	 * Set if completion signaling is requested. If this bit is
81451 	 * 0, and the SQ is configured to support Unsignaled
81452 	 * completion the controller should not generate a CQE
81453 	 * unless there was an error. This refers to CQE on the
81454 	 * sender side (The se flag refers to the receiver side).
81455 	 */
81456 	#define SQ_RDMA_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81457 	/*
81458 	 * Indication to complete all previous RDMA Read or Atomic
81459 	 * WQEs on the SQ before executing this WQE
81460 	 */
81461 	#define SQ_RDMA_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81462 	/*
81463 	 * Unconditional fence. Indication to complete all previous
81464 	 * SQ's WQEs before executing this WQE.
81465 	 */
81466 	#define SQ_RDMA_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81467 	/*
81468 	 * Solicit event. Indication sent in BTH header to the
81469 	 * receiver to generate a Completion Event Notification,
81470 	 * i.e. CNQE.
81471 	 */
81472 	#define SQ_RDMA_HDR_V3_FLAGS_SE			UINT32_C(0x8)
81473 	/*
81474 	 * Indicate that inline data is posted to the SQ following
81475 	 * this WQE. This bit may be 1 only for write operations.
81476 	 */
81477 	#define SQ_RDMA_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
81478 	/*
81479 	 * If set to 1, then the timestamp from the WQE is used. If
81480 	 * cleared to 0, then TWE provides the timestamp.
81481 	 */
81482 	#define SQ_RDMA_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81483 	/*
81484 	 * When set to '1', this operation will cause a trace capture in
81485 	 * each block it passes through.
81486 	 */
81487 	#define SQ_RDMA_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81488 	/*  */
81489 	uint8_t	wqe_size;
81490 	/*
81491 	 * The number of 16 bytes chunks of data including this first
81492 	 * word of the request that are a valid part of the request. The
81493 	 * valid 16 bytes units other than the WQE structure can be
81494 	 * SGEs (Scatter Gather Elements) OR inline data.
81495 	 *
81496 	 * This field shall never exceed 32 for WQEs of this type.
81497 	 */
81498 	#define SQ_RDMA_HDR_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81499 	#define SQ_RDMA_HDR_V3_WQE_SIZE_SFT 0
81500 	uint8_t	inline_length;
81501 	/*
81502 	 * When inline flag is '1', this field determines the number of
81503 	 * bytes that are valid in the last 16B unit of the inline WQE.
81504 	 * Zero means all 16 bytes are valid. One means only bits 7:0 of
81505 	 * the last 16B unit are valid. This means the total size of the
81506 	 * inline data is determined by a combination of the wqe_size field
81507 	 * and this inline_length field.
81508 	 *
81509 	 * `inline_size = ((wqe_size - 1) * 16) - data_offset_in_bytes +
81510 	 * ((inline_length == 0 ) ? 16 : inline_length)
81511 	 *
81512 	 * Where data_offset_in_bytes is the offset within the WQE where
81513 	 * the data field starts.
81514 	 *
81515 	 * Note that this field is not applicable for zero-length inline
81516 	 * WQEs.
81517 	 */
81518 	#define SQ_RDMA_HDR_V3_INLINE_LENGTH_MASK UINT32_C(0xf)
81519 	#define SQ_RDMA_HDR_V3_INLINE_LENGTH_SFT 0
81520 	/*
81521 	 * This value will be returned in the completion if the completion is
81522 	 * signaled.
81523 	 */
81524 	uint32_t	opaque;
81525 	/*
81526 	 * Immediate data - valid for RDMA Write with immediate and
81527 	 * causes the controller to add immDt header with this value
81528 	 */
81529 	uint32_t	imm_data;
81530 	uint32_t	reserved2;
81531 	/* Remote VA sent to the destination QP */
81532 	uint64_t	remote_va;
81533 	/*
81534 	 * R_Key provided by remote node when the connection was
81535 	 * established and placed in the RETH header. It identify the
81536 	 * MRW on the remote host
81537 	 */
81538 	uint32_t	remote_key;
81539 	uint32_t	timestamp;
81540 	/*
81541 	 * This field specifies a 24-bit timestamp that can be passed
81542 	 * down the TX path and optionally logged in the TXP timestamp
81543 	 * histogram.
81544 	 */
81545 	#define SQ_RDMA_HDR_V3_TIMESTAMP_MASK UINT32_C(0xffffff)
81546 	#define SQ_RDMA_HDR_V3_TIMESTAMP_SFT 0
81547 } sq_rdma_hdr_v3_t, *psq_rdma_hdr_v3_t;
81548 
81549 /* SQ Atomic V3 WQE for RC SQs. */
81550 /* sq_atomic_v3 (size:448b/56B) */
81551 
81552 typedef struct sq_atomic_v3 {
81553 	/* This field defines the type of SQ WQE. */
81554 	uint8_t	wqe_type;
81555 	/*
81556 	 * Atomic Compare/Swap V3
81557 	 *
81558 	 * Allowed only on reliable connection (RC) SQs.
81559 	 */
81560 	#define SQ_ATOMIC_V3_WQE_TYPE_ATOMIC_CS_V3 UINT32_C(0x18)
81561 	/*
81562 	 * Atomic Fetch/Add V3
81563 	 *
81564 	 * Allowed only on reliable connection (RC) SQs.
81565 	 */
81566 	#define SQ_ATOMIC_V3_WQE_TYPE_ATOMIC_FA_V3 UINT32_C(0x19)
81567 	#define SQ_ATOMIC_V3_WQE_TYPE_LAST	SQ_ATOMIC_V3_WQE_TYPE_ATOMIC_FA_V3
81568 	uint8_t	flags;
81569 	/*
81570 	 * Set if completion signaling is requested. If this bit is
81571 	 * 0, and the SQ is configured to support Unsignaled
81572 	 * completion the controller should not generate a CQE
81573 	 * unless there was an error. This refers to CQE on the
81574 	 * sender side (The se flag refers to the receiver side).
81575 	 */
81576 	#define SQ_ATOMIC_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81577 	/*
81578 	 * Indication to complete all previous RDMA Read or Atomic
81579 	 * WQEs on the SQ before executing this WQE
81580 	 */
81581 	#define SQ_ATOMIC_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81582 	/*
81583 	 * Unconditional fence. Indication to complete all previous
81584 	 * SQ's WQEs before executing this WQE.
81585 	 */
81586 	#define SQ_ATOMIC_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81587 	/*
81588 	 * Solicit event. Indication sent in BTH header to the
81589 	 * receiver to generate a Completion Event Notification,
81590 	 * i.e. CNQE.
81591 	 */
81592 	#define SQ_ATOMIC_V3_FLAGS_SE			UINT32_C(0x8)
81593 	/* NA for this WQE */
81594 	#define SQ_ATOMIC_V3_FLAGS_INLINE		UINT32_C(0x10)
81595 	/*
81596 	 * The atomic WQE does not have a timestamp field, so this field is
81597 	 * ignored and should be zero.
81598 	 */
81599 	#define SQ_ATOMIC_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81600 	/*
81601 	 * When set to '1', this operation will cause a trace capture in
81602 	 * each block it passes through.
81603 	 */
81604 	#define SQ_ATOMIC_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81605 	/*  */
81606 	uint8_t	wqe_size;
81607 	/*
81608 	 * The size of the WQE in units of 16B chunks.
81609 	 *
81610 	 * For the Atomic WQE, this field will always have a value of 4.
81611 	 */
81612 	#define SQ_ATOMIC_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81613 	#define SQ_ATOMIC_V3_WQE_SIZE_SFT 0
81614 	uint8_t	reserved1;
81615 	/*
81616 	 * This value will be returned in the completion if the completion is
81617 	 * signaled.
81618 	 */
81619 	uint32_t	opaque;
81620 	/*
81621 	 * R_Key provided by remote node when the connection was
81622 	 * established and placed in the AETH header. It identifies the
81623 	 * MRW on the remote host.
81624 	 */
81625 	uint32_t	remote_key;
81626 	uint32_t	reserved2;
81627 	/* Remote VA sent to the destination QP */
81628 	uint64_t	remote_va;
81629 	/*
81630 	 * For compare/swap, this is the data value to be placed in the
81631 	 * remote host at the specified remote_VA if the comparison succeeds.
81632 	 *
81633 	 * For fetch/add, this is the value to be added to the data in the
81634 	 * remote host at the specified remote_VA.
81635 	 */
81636 	uint64_t	swap_data;
81637 	/*
81638 	 * For compare/swap, this is the data value to be compared with the
81639 	 * value in the remote host at the specified remote_VA.
81640 	 *
81641 	 * This field is not used for fetch/add.
81642 	 */
81643 	uint64_t	cmp_data;
81644 	/*
81645 	 * The virtual address in local memory or a physical address when
81646 	 * l_key value is a reserved value of a physical address. Driver
81647 	 * configures this value in the chip and the chip compares l_key in
81648 	 * SGEs with that reserved value, if equal it access the physical
81649 	 * address specified. The chip however MUST verify that the QP allows
81650 	 * the use reserved key.
81651 	 */
81652 	uint64_t	va_or_pa;
81653 	/*
81654 	 * Local Key associated with this registered MR; The 24 msb of the
81655 	 * key used to index the MRW Table and the 8 lsb are compared with
81656 	 * the 8 bits key part stored in the MRWC. The PBL in the MRW Context
81657 	 * is used to translate the above VA to physical address.
81658 	 */
81659 	uint32_t	l_key;
81660 	/*
81661 	 * Size of SGE in bytes; Based on page size of the system the chip
81662 	 * knows how many entries are in the PBL
81663 	 *
81664 	 * This field must have a value of 8 for an Atomic WQE.
81665 	 */
81666 	uint32_t	size;
81667 } sq_atomic_v3_t, *psq_atomic_v3_t;
81668 
81669 /* SQ Atomic WQE V3 header for RC SQs. */
81670 /* sq_atomic_hdr_v3 (size:320b/40B) */
81671 
81672 typedef struct sq_atomic_hdr_v3 {
81673 	/* This field defines the type of SQ WQE. */
81674 	uint8_t	wqe_type;
81675 	/*
81676 	 * Atomic Compare/Swap V3
81677 	 *
81678 	 * Allowed only on reliable connection (RC) SQs.
81679 	 */
81680 	#define SQ_ATOMIC_HDR_V3_WQE_TYPE_ATOMIC_CS_V3 UINT32_C(0x18)
81681 	/*
81682 	 * Atomic Fetch/Add V3
81683 	 *
81684 	 * Allowed only on reliable connection (RC) SQs.
81685 	 */
81686 	#define SQ_ATOMIC_HDR_V3_WQE_TYPE_ATOMIC_FA_V3 UINT32_C(0x19)
81687 	#define SQ_ATOMIC_HDR_V3_WQE_TYPE_LAST	SQ_ATOMIC_HDR_V3_WQE_TYPE_ATOMIC_FA_V3
81688 	uint8_t	flags;
81689 	/*
81690 	 * Set if completion signaling is requested. If this bit is
81691 	 * 0, and the SQ is configured to support Unsignaled
81692 	 * completion the controller should not generate a CQE
81693 	 * unless there was an error. This refers to CQE on the
81694 	 * sender side (The se flag refers to the receiver side).
81695 	 */
81696 	#define SQ_ATOMIC_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81697 	/*
81698 	 * Indication to complete all previous RDMA Read or Atomic
81699 	 * WQEs on the SQ before executing this WQE
81700 	 */
81701 	#define SQ_ATOMIC_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81702 	/*
81703 	 * Unconditional fence. Indication to complete all previous
81704 	 * SQ's WQEs before executing this WQE.
81705 	 */
81706 	#define SQ_ATOMIC_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81707 	/*
81708 	 * Solicit event. Indication sent in BTH header to the
81709 	 * receiver to generate a Completion Event Notification,
81710 	 * i.e. CNQE.
81711 	 */
81712 	#define SQ_ATOMIC_HDR_V3_FLAGS_SE			UINT32_C(0x8)
81713 	/* NA for this WQE */
81714 	#define SQ_ATOMIC_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
81715 	/*
81716 	 * The atomic WQE does not have a timestamp field, so this field is
81717 	 * ignored and should be zero.
81718 	 */
81719 	#define SQ_ATOMIC_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81720 	/*
81721 	 * When set to '1', this operation will cause a trace capture in
81722 	 * each block it passes through.
81723 	 */
81724 	#define SQ_ATOMIC_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81725 	/*  */
81726 	uint8_t	wqe_size;
81727 	/*
81728 	 * The size of the WQE in units of 16B chunks.
81729 	 *
81730 	 * For the Atomic WQE, this field will always have a value of 4.
81731 	 */
81732 	#define SQ_ATOMIC_HDR_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81733 	#define SQ_ATOMIC_HDR_V3_WQE_SIZE_SFT 0
81734 	uint8_t	reserved1;
81735 	/*
81736 	 * This value will be returned in the completion if the completion is
81737 	 * signaled.
81738 	 */
81739 	uint32_t	opaque;
81740 	/*
81741 	 * R_Key provided by remote node when the connection was
81742 	 * established and placed in the AETH header. It identifies the
81743 	 * MRW on the remote host.
81744 	 */
81745 	uint32_t	remote_key;
81746 	uint32_t	reserved2;
81747 	/* Remote VA sent to the destination QP */
81748 	uint64_t	remote_va;
81749 	/*
81750 	 * For compare/swap, this is the data value to be placed in the
81751 	 * remote host at the specified remote_VA if the comparison succeeds.
81752 	 *
81753 	 * For fetch/add, this is the value to be added to the data in the
81754 	 * remote host at the specified remote_VA.
81755 	 */
81756 	uint64_t	swap_data;
81757 	/*
81758 	 * For compare/swap, this is the data value to be compared with the
81759 	 * value in the remote host at the specified remote_VA.
81760 	 *
81761 	 * This field is not used for fetch/add.
81762 	 */
81763 	uint64_t	cmp_data;
81764 } sq_atomic_hdr_v3_t, *psq_atomic_hdr_v3_t;
81765 
81766 /* SQ Local Invalidate WQE V3 for RC SQs. */
81767 /* sq_localinvalidate_v3 (size:128b/16B) */
81768 
81769 typedef struct sq_localinvalidate_v3 {
81770 	/* This field defines the type of SQ WQE. */
81771 	uint8_t	wqe_type;
81772 	/*
81773 	 * Local Invalidate V3
81774 	 *
81775 	 * Allowed only on reliable connection (RC) SQs.
81776 	 */
81777 	#define SQ_LOCALINVALIDATE_V3_WQE_TYPE_LOCAL_INVALID_V3 UINT32_C(0x1a)
81778 	#define SQ_LOCALINVALIDATE_V3_WQE_TYPE_LAST		SQ_LOCALINVALIDATE_V3_WQE_TYPE_LOCAL_INVALID_V3
81779 	uint8_t	flags;
81780 	/*
81781 	 * Set if completion signaling is requested. If this bit is
81782 	 * 0, and the SQ is configured to support Unsignaled
81783 	 * completion the controller should not generate a CQE
81784 	 * unless there was an error. This refers to CQE on the
81785 	 * sender side (The se flag refers to the receiver side).
81786 	 */
81787 	#define SQ_LOCALINVALIDATE_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81788 	/*
81789 	 * Indication to complete all previous RDMA Read or Atomic
81790 	 * WQEs on the SQ before executing this WQE
81791 	 */
81792 	#define SQ_LOCALINVALIDATE_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81793 	/*
81794 	 * Unconditional fence. Indication to complete all previous
81795 	 * SQ's WQEs before executing this WQE.
81796 	 */
81797 	#define SQ_LOCALINVALIDATE_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81798 	/*
81799 	 * This flag is not applicable and should be 0 for a local memory
81800 	 * operation WQE.
81801 	 */
81802 	#define SQ_LOCALINVALIDATE_V3_FLAGS_SE			UINT32_C(0x8)
81803 	/*
81804 	 * This flag is not applicable and should be 0 for a local memory
81805 	 * operation WQE.
81806 	 */
81807 	#define SQ_LOCALINVALIDATE_V3_FLAGS_INLINE		UINT32_C(0x10)
81808 	/*
81809 	 * This flag is not applicable and should be 0 for a local memory
81810 	 * operation WQE.
81811 	 */
81812 	#define SQ_LOCALINVALIDATE_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81813 	/*
81814 	 * When set to '1', this operation will cause a trace capture in
81815 	 * each block it passes through.
81816 	 */
81817 	#define SQ_LOCALINVALIDATE_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81818 	/*  */
81819 	uint8_t	wqe_size;
81820 	/*
81821 	 * The size of the WQE in units of 16B chunks.
81822 	 *
81823 	 * For the Local Invalidate WQE, this field will always have
81824 	 * a value of 1.
81825 	 */
81826 	#define SQ_LOCALINVALIDATE_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81827 	#define SQ_LOCALINVALIDATE_V3_WQE_SIZE_SFT 0
81828 	uint8_t	reserved1;
81829 	/*
81830 	 * This value will be returned in the completion if the completion is
81831 	 * signaled.
81832 	 */
81833 	uint32_t	opaque;
81834 	/*
81835 	 * The local key for the MR/W to invalidate; 24 msb of the key
81836 	 * are used to index the MRW table, 8 lsb are compared with the
81837 	 * 8 bit key in the MRWC
81838 	 */
81839 	uint32_t	inv_l_key;
81840 	uint32_t	reserved2;
81841 } sq_localinvalidate_v3_t, *psq_localinvalidate_v3_t;
81842 
81843 /* SQ Local Invalidate WQE V3 header for RC SQs. */
81844 /* sq_localinvalidate_hdr_v3 (size:128b/16B) */
81845 
81846 typedef struct sq_localinvalidate_hdr_v3 {
81847 	/* This field defines the type of SQ WQE. */
81848 	uint8_t	wqe_type;
81849 	/*
81850 	 * Local Invalidate V3
81851 	 *
81852 	 * Allowed only on reliable connection (RC) SQs.
81853 	 */
81854 	#define SQ_LOCALINVALIDATE_HDR_V3_WQE_TYPE_LOCAL_INVALID_V3 UINT32_C(0x1a)
81855 	#define SQ_LOCALINVALIDATE_HDR_V3_WQE_TYPE_LAST		SQ_LOCALINVALIDATE_HDR_V3_WQE_TYPE_LOCAL_INVALID_V3
81856 	uint8_t	flags;
81857 	/*
81858 	 * Set if completion signaling is requested. If this bit is
81859 	 * 0, and the SQ is configured to support Unsignaled
81860 	 * completion the controller should not generate a CQE
81861 	 * unless there was an error. This refers to CQE on the
81862 	 * sender side (The se flag refers to the receiver side).
81863 	 */
81864 	#define SQ_LOCALINVALIDATE_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81865 	/*
81866 	 * Indication to complete all previous RDMA Read or Atomic
81867 	 * WQEs on the SQ before executing this WQE
81868 	 */
81869 	#define SQ_LOCALINVALIDATE_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81870 	/*
81871 	 * Unconditional fence. Indication to complete all previous
81872 	 * SQ's WQEs before executing this WQE.
81873 	 */
81874 	#define SQ_LOCALINVALIDATE_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81875 	/*
81876 	 * This flag is not applicable and should be 0 for a local memory
81877 	 * operation WQE.
81878 	 */
81879 	#define SQ_LOCALINVALIDATE_HDR_V3_FLAGS_SE			UINT32_C(0x8)
81880 	/*
81881 	 * This flag is not applicable and should be 0 for a local memory
81882 	 * operation WQE.
81883 	 */
81884 	#define SQ_LOCALINVALIDATE_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
81885 	/*
81886 	 * This flag is not applicable and should be 0 for a local memory
81887 	 * operation WQE.
81888 	 */
81889 	#define SQ_LOCALINVALIDATE_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81890 	/*
81891 	 * When set to '1', this operation will cause a trace capture in
81892 	 * each block it passes through.
81893 	 */
81894 	#define SQ_LOCALINVALIDATE_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81895 	/*  */
81896 	uint8_t	wqe_size;
81897 	/*
81898 	 * The size of the WQE in units of 16B chunks.
81899 	 *
81900 	 * For the Local Invalidate WQE, this field will always have
81901 	 * a value of 1.
81902 	 */
81903 	#define SQ_LOCALINVALIDATE_HDR_V3_WQE_SIZE_MASK UINT32_C(0x3f)
81904 	#define SQ_LOCALINVALIDATE_HDR_V3_WQE_SIZE_SFT 0
81905 	uint8_t	reserved1;
81906 	/*
81907 	 * This value will be returned in the completion if the completion is
81908 	 * signaled.
81909 	 */
81910 	uint32_t	opaque;
81911 	/*
81912 	 * The local key for the MR/W to invalidate; 24 msb of the key
81913 	 * are used to index the MRW table, 8 lsb are compared with the
81914 	 * 8 bit key in the MRWC
81915 	 */
81916 	uint32_t	inv_l_key;
81917 	uint32_t	reserved2;
81918 } sq_localinvalidate_hdr_v3_t, *psq_localinvalidate_hdr_v3_t;
81919 
81920 /*
81921  * SQ FR-PMR WQE V3 for RC SQs.
81922  *
81923  * The FR-PMR WQE must be padded to 3 slots (48 bytes) in the SQ, even
81924  * though the final 8 bytes are not shown here.
81925  */
81926 /* sq_fr_pmr_v3 (size:320b/40B) */
81927 
81928 typedef struct sq_fr_pmr_v3 {
81929 	/* This field defines the type of SQ WQE. */
81930 	uint8_t	wqe_type;
81931 	/*
81932 	 * FR-PMR (Fast Register Physical Memory Region) V3
81933 	 *
81934 	 * Allowed only on reliable connection (RC) SQs.
81935 	 */
81936 	#define SQ_FR_PMR_V3_WQE_TYPE_FR_PMR_V3 UINT32_C(0x1b)
81937 	#define SQ_FR_PMR_V3_WQE_TYPE_LAST	SQ_FR_PMR_V3_WQE_TYPE_FR_PMR_V3
81938 	uint8_t	flags;
81939 	/*
81940 	 * Set if completion signaling is requested. If this bit is
81941 	 * 0, and the SQ is configured to support Unsignaled
81942 	 * completion the controller should not generate a CQE
81943 	 * unless there was an error. This refers to CQE on the
81944 	 * sender side (The se flag refers to the receiver side).
81945 	 */
81946 	#define SQ_FR_PMR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
81947 	/*
81948 	 * Indication to complete all previous RDMA Read or Atomic
81949 	 * WQEs on the SQ before executing this WQE
81950 	 */
81951 	#define SQ_FR_PMR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
81952 	/*
81953 	 * Unconditional fence. Indication to complete all previous
81954 	 * SQ's WQEs before executing this WQE.
81955 	 */
81956 	#define SQ_FR_PMR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
81957 	/*
81958 	 * This flag is not applicable and should be 0 for a local memory
81959 	 * operation WQE.
81960 	 */
81961 	#define SQ_FR_PMR_V3_FLAGS_SE			UINT32_C(0x8)
81962 	/*
81963 	 * This flag is not applicable and should be 0 for a local memory
81964 	 * operation WQE.
81965 	 */
81966 	#define SQ_FR_PMR_V3_FLAGS_INLINE		UINT32_C(0x10)
81967 	/*
81968 	 * This flag is not applicable and should be 0 for a local memory
81969 	 * operation WQE.
81970 	 */
81971 	#define SQ_FR_PMR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
81972 	/*
81973 	 * When set to '1', this operation will cause a trace capture in
81974 	 * each block it passes through.
81975 	 */
81976 	#define SQ_FR_PMR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
81977 	/*  */
81978 	uint8_t	wqe_size_zero_based;
81979 	/*
81980 	 * The size of the WQE in units of 16B chunks.
81981 	 *
81982 	 * For the FR-PMR WQE, this field will always have a value of 3.
81983 	 */
81984 	#define SQ_FR_PMR_V3_WQE_SIZE_MASK  UINT32_C(0x3f)
81985 	#define SQ_FR_PMR_V3_WQE_SIZE_SFT   0
81986 	/*
81987 	 * If this is set, the PMR will be zero-based. If clear, the PMR
81988 	 * will be non-zero-based.
81989 	 */
81990 	#define SQ_FR_PMR_V3_ZERO_BASED	UINT32_C(0x40)
81991 	/*
81992 	 * This is the new access control for the MR. '1' means
81993 	 * the operation is allowed. '0' means operation is
81994 	 * not allowed.
81995 	 */
81996 	uint8_t	access_cntl;
81997 	/* Local Write Access */
81998 	#define SQ_FR_PMR_V3_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
81999 	/* Remote Read Access */
82000 	#define SQ_FR_PMR_V3_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
82001 	/* Remote Write Access */
82002 	#define SQ_FR_PMR_V3_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
82003 	/* Remote Atomic Access */
82004 	#define SQ_FR_PMR_V3_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
82005 	/* Window Binding Allowed */
82006 	#define SQ_FR_PMR_V3_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
82007 	/*
82008 	 * This value will be returned in the completion if the completion is
82009 	 * signaled.
82010 	 */
82011 	uint32_t	opaque;
82012 	/*
82013 	 * Local Key; 24 msb of the key are used to index the MRW
82014 	 * table, 8 lsb are assigned to the 8 bit key_lsb field in
82015 	 * the MRWC.
82016 	 */
82017 	uint32_t	l_key;
82018 	uint16_t	page_size_log;
82019 	/*
82020 	 * This value controls the page size for leaf memory pages in
82021 	 * a PBL. While many page sizes are supported only the following
82022 	 * should be tested - 4k, 8k, 64k, 256k, 1m, 2m, 4m, 1g
82023 	 */
82024 	#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
82025 	#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_SFT	0
82026 	/* Page size is 4KB. */
82027 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
82028 	/* Page size is 8KB. */
82029 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
82030 	/* Page size is 16KB. */
82031 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_16K	UINT32_C(0x2)
82032 	/* Page size is 32KB. */
82033 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_32K	UINT32_C(0x3)
82034 	/* Page size is 64KB. */
82035 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_64K	UINT32_C(0x4)
82036 	/* Page size is 128KB. */
82037 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_128K	UINT32_C(0x5)
82038 	/* Page size is 256KB. */
82039 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_256K	UINT32_C(0x6)
82040 	/* Page size is 512KB. */
82041 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_512K	UINT32_C(0x7)
82042 	/* Page size is 1MB. */
82043 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
82044 	/* Page size is 2MB. */
82045 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
82046 	/* Page size is 4MB. */
82047 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
82048 	/* Page size is 8MB. */
82049 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
82050 	/* Page size is 16MB. */
82051 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_16M	UINT32_C(0xc)
82052 	/* Page size is 32MB. */
82053 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_32M	UINT32_C(0xd)
82054 	/* Page size is 64MB. */
82055 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_64M	UINT32_C(0xe)
82056 	/* Page size is 128MB. */
82057 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_128M	UINT32_C(0xf)
82058 	/* Page size is 256MB. */
82059 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_256M	UINT32_C(0x10)
82060 	/* Page size is 512MB. */
82061 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_512M	UINT32_C(0x11)
82062 	/* Page size is 1GB. */
82063 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
82064 	/* Page size is 2GB. */
82065 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
82066 	/* Page size is 4GB. */
82067 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
82068 	/* Page size is 8GB. */
82069 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
82070 	/* Page size is 16GB. */
82071 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_16G	UINT32_C(0x16)
82072 	/* Page size is 32GB. */
82073 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_32G	UINT32_C(0x17)
82074 	/* Page size is 64GB. */
82075 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_64G	UINT32_C(0x18)
82076 	/* Page size is 128GB. */
82077 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_128G	UINT32_C(0x19)
82078 	/* Page size is 256GB. */
82079 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_256G	UINT32_C(0x1a)
82080 	/* Page size is 512GB. */
82081 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_512G	UINT32_C(0x1b)
82082 	/* Page size is 1TB. */
82083 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
82084 	/* Page size is 2TB. */
82085 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
82086 	/* Page size is 4TB. */
82087 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
82088 	/* Page size is 8TB. */
82089 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
82090 		#define SQ_FR_PMR_V3_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_V3_PAGE_SIZE_LOG_PGSZ_8T
82091 	/*
82092 	 * This value controls the page size for page table elements
82093 	 * within a PBL. While many page sizes are supported only the
82094 	 * following should be tested - 4k, 8k, 64k, 256k, 1m, 2m, 4m, 1g
82095 	 */
82096 	#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_MASK	UINT32_C(0x3e0)
82097 	#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_SFT	5
82098 	/* Page size is 4KB. */
82099 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4K	(UINT32_C(0x0) << 5)
82100 	/* Page size is 8KB. */
82101 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8K	(UINT32_C(0x1) << 5)
82102 	/* Page size is 16KB. */
82103 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_16K   (UINT32_C(0x2) << 5)
82104 	/* Page size is 32KB. */
82105 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_32K   (UINT32_C(0x3) << 5)
82106 	/* Page size is 64KB. */
82107 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_64K   (UINT32_C(0x4) << 5)
82108 	/* Page size is 128KB. */
82109 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_128K  (UINT32_C(0x5) << 5)
82110 	/* Page size is 256KB. */
82111 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_256K  (UINT32_C(0x6) << 5)
82112 	/* Page size is 512KB. */
82113 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_512K  (UINT32_C(0x7) << 5)
82114 	/* Page size is 1MB. */
82115 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_1M	(UINT32_C(0x8) << 5)
82116 	/* Page size is 2MB. */
82117 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_2M	(UINT32_C(0x9) << 5)
82118 	/* Page size is 4MB. */
82119 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4M	(UINT32_C(0xa) << 5)
82120 	/* Page size is 8MB. */
82121 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8M	(UINT32_C(0xb) << 5)
82122 	/* Page size is 16MB. */
82123 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_16M   (UINT32_C(0xc) << 5)
82124 	/* Page size is 32MB. */
82125 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_32M   (UINT32_C(0xd) << 5)
82126 	/* Page size is 64MB. */
82127 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_64M   (UINT32_C(0xe) << 5)
82128 	/* Page size is 128MB. */
82129 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_128M  (UINT32_C(0xf) << 5)
82130 	/* Page size is 256MB. */
82131 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_256M  (UINT32_C(0x10) << 5)
82132 	/* Page size is 512MB. */
82133 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_512M  (UINT32_C(0x11) << 5)
82134 	/* Page size is 1GB. */
82135 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_1G	(UINT32_C(0x12) << 5)
82136 	/* Page size is 2GB. */
82137 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_2G	(UINT32_C(0x13) << 5)
82138 	/* Page size is 4GB. */
82139 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4G	(UINT32_C(0x14) << 5)
82140 	/* Page size is 8GB. */
82141 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8G	(UINT32_C(0x15) << 5)
82142 	/* Page size is 16GB. */
82143 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_16G   (UINT32_C(0x16) << 5)
82144 	/* Page size is 32GB. */
82145 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_32G   (UINT32_C(0x17) << 5)
82146 	/* Page size is 64GB. */
82147 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_64G   (UINT32_C(0x18) << 5)
82148 	/* Page size is 128GB. */
82149 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_128G  (UINT32_C(0x19) << 5)
82150 	/* Page size is 256GB. */
82151 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_256G  (UINT32_C(0x1a) << 5)
82152 	/* Page size is 512GB. */
82153 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_512G  (UINT32_C(0x1b) << 5)
82154 	/* Page size is 1TB. */
82155 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_1T	(UINT32_C(0x1c) << 5)
82156 	/* Page size is 2TB. */
82157 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_2T	(UINT32_C(0x1d) << 5)
82158 	/* Page size is 4TB. */
82159 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4T	(UINT32_C(0x1e) << 5)
82160 	/* Page size is 8TB. */
82161 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8T	(UINT32_C(0x1f) << 5)
82162 		#define SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8T
82163 	/* Number of levels of PBL for translation */
82164 	#define SQ_FR_PMR_V3_NUMLEVELS_MASK		UINT32_C(0xc00)
82165 	#define SQ_FR_PMR_V3_NUMLEVELS_SFT		10
82166 	/*
82167 	 * A zero level PBL means that the VA is the physical address
82168 	 * used for the operation. No translation is done by the PTU.
82169 	 */
82170 		#define SQ_FR_PMR_V3_NUMLEVELS_PHYSICAL	(UINT32_C(0x0) << 10)
82171 	/*
82172 	 * A one layer translation is provided between the logical and
82173 	 * physical address. The PBL points to a physical page that
82174 	 * contains PBE values that point to actual pg_size physical
82175 	 * pages.
82176 	 */
82177 		#define SQ_FR_PMR_V3_NUMLEVELS_LAYER1		(UINT32_C(0x1) << 10)
82178 	/*
82179 	 * A two layer translation is provided between the logical and
82180 	 * physical address. The PBL points to a physical page that
82181 	 * contains PDE values that in turn point to pbl_pg_size
82182 	 * physical pages that contain PBE values that point to actual
82183 	 * physical pages.
82184 	 */
82185 		#define SQ_FR_PMR_V3_NUMLEVELS_LAYER2		(UINT32_C(0x2) << 10)
82186 		#define SQ_FR_PMR_V3_NUMLEVELS_LAST		SQ_FR_PMR_V3_NUMLEVELS_LAYER2
82187 	uint16_t	reserved;
82188 	/* Local Virtual Address */
82189 	uint64_t	va;
82190 	/* Length in bytes of registered MR */
82191 	uint64_t	length;
82192 	/* Pointer to the PBL, or PDL depending on number of levels */
82193 	uint64_t	pbl_ptr;
82194 } sq_fr_pmr_v3_t, *psq_fr_pmr_v3_t;
82195 
82196 /* SQ FR-PMR WQE V3 header for RC SQs. */
82197 /* sq_fr_pmr_hdr_v3 (size:320b/40B) */
82198 
82199 typedef struct sq_fr_pmr_hdr_v3 {
82200 	/* This field defines the type of SQ WQE. */
82201 	uint8_t	wqe_type;
82202 	/*
82203 	 * FR-PMR (Fast Register Physical Memory Region) V3
82204 	 *
82205 	 * Allowed only on reliable connection (RC) SQs.
82206 	 */
82207 	#define SQ_FR_PMR_HDR_V3_WQE_TYPE_FR_PMR_V3 UINT32_C(0x1b)
82208 	#define SQ_FR_PMR_HDR_V3_WQE_TYPE_LAST	SQ_FR_PMR_HDR_V3_WQE_TYPE_FR_PMR_V3
82209 	uint8_t	flags;
82210 	/*
82211 	 * Set if completion signaling is requested. If this bit is
82212 	 * 0, and the SQ is configured to support Unsignaled
82213 	 * completion the controller should not generate a CQE
82214 	 * unless there was an error. This refers to CQE on the
82215 	 * sender side (The se flag refers to the receiver side).
82216 	 */
82217 	#define SQ_FR_PMR_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
82218 	/*
82219 	 * Indication to complete all previous RDMA Read or Atomic
82220 	 * WQEs on the SQ before executing this WQE
82221 	 */
82222 	#define SQ_FR_PMR_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
82223 	/*
82224 	 * Unconditional fence. Indication to complete all previous
82225 	 * SQ's WQEs before executing this WQE.
82226 	 */
82227 	#define SQ_FR_PMR_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
82228 	/*
82229 	 * This flag is not applicable and should be 0 for a local memory
82230 	 * operation WQE.
82231 	 */
82232 	#define SQ_FR_PMR_HDR_V3_FLAGS_SE			UINT32_C(0x8)
82233 	/*
82234 	 * This flag is not applicable and should be 0 for a local memory
82235 	 * operation WQE.
82236 	 */
82237 	#define SQ_FR_PMR_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
82238 	/*
82239 	 * This flag is not applicable and should be 0 for a local memory
82240 	 * operation WQE.
82241 	 */
82242 	#define SQ_FR_PMR_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
82243 	/*
82244 	 * When set to '1', this operation will cause a trace capture in
82245 	 * each block it passes through.
82246 	 */
82247 	#define SQ_FR_PMR_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
82248 	/*  */
82249 	uint8_t	wqe_size_zero_based;
82250 	/*
82251 	 * The size of the WQE in units of 16B chunks.
82252 	 *
82253 	 * For the FR-PMR WQE, this field will always have a value of 3.
82254 	 */
82255 	#define SQ_FR_PMR_HDR_V3_WQE_SIZE_MASK  UINT32_C(0x3f)
82256 	#define SQ_FR_PMR_HDR_V3_WQE_SIZE_SFT   0
82257 	/*
82258 	 * If this is set, the PMR will be zero-based. If clear, the PMR
82259 	 * will be non-zero-based.
82260 	 */
82261 	#define SQ_FR_PMR_HDR_V3_ZERO_BASED	UINT32_C(0x40)
82262 	/*
82263 	 * This is the new access control for the MR. '1' means
82264 	 * the operation is allowed. '0' means operation is
82265 	 * not allowed.
82266 	 */
82267 	uint8_t	access_cntl;
82268 	/* Local Write Access */
82269 	#define SQ_FR_PMR_HDR_V3_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
82270 	/* Remote Read Access */
82271 	#define SQ_FR_PMR_HDR_V3_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
82272 	/* Remote Write Access */
82273 	#define SQ_FR_PMR_HDR_V3_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
82274 	/* Remote Atomic Access */
82275 	#define SQ_FR_PMR_HDR_V3_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
82276 	/* Window Binding Allowed */
82277 	#define SQ_FR_PMR_HDR_V3_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
82278 	/*
82279 	 * This value will be returned in the completion if the completion is
82280 	 * signaled.
82281 	 */
82282 	uint32_t	opaque;
82283 	/*
82284 	 * Local Key; 24 msb of the key are used to index the MRW
82285 	 * table, 8 lsb are assigned to the 8 bit key_lsb field in
82286 	 * the MRWC.
82287 	 */
82288 	uint32_t	l_key;
82289 	uint16_t	page_size_log;
82290 	/*
82291 	 * This value controls the page size for leaf memory pages in
82292 	 * a PBL. While many page sizes are supported only the following
82293 	 * should be tested - 4k, 8k, 64k, 256k, 1m, 2m, 4m, 1g
82294 	 */
82295 	#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_MASK	UINT32_C(0x1f)
82296 	#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_SFT	0
82297 	/* Page size is 4KB. */
82298 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_4K	UINT32_C(0x0)
82299 	/* Page size is 8KB. */
82300 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_8K	UINT32_C(0x1)
82301 	/* Page size is 16KB. */
82302 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_16K	UINT32_C(0x2)
82303 	/* Page size is 32KB. */
82304 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_32K	UINT32_C(0x3)
82305 	/* Page size is 64KB. */
82306 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_64K	UINT32_C(0x4)
82307 	/* Page size is 128KB. */
82308 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_128K	UINT32_C(0x5)
82309 	/* Page size is 256KB. */
82310 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_256K	UINT32_C(0x6)
82311 	/* Page size is 512KB. */
82312 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_512K	UINT32_C(0x7)
82313 	/* Page size is 1MB. */
82314 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_1M	UINT32_C(0x8)
82315 	/* Page size is 2MB. */
82316 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_2M	UINT32_C(0x9)
82317 	/* Page size is 4MB. */
82318 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_4M	UINT32_C(0xa)
82319 	/* Page size is 8MB. */
82320 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_8M	UINT32_C(0xb)
82321 	/* Page size is 16MB. */
82322 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_16M	UINT32_C(0xc)
82323 	/* Page size is 32MB. */
82324 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_32M	UINT32_C(0xd)
82325 	/* Page size is 64MB. */
82326 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_64M	UINT32_C(0xe)
82327 	/* Page size is 128MB. */
82328 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_128M	UINT32_C(0xf)
82329 	/* Page size is 256MB. */
82330 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_256M	UINT32_C(0x10)
82331 	/* Page size is 512MB. */
82332 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_512M	UINT32_C(0x11)
82333 	/* Page size is 1GB. */
82334 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_1G	UINT32_C(0x12)
82335 	/* Page size is 2GB. */
82336 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_2G	UINT32_C(0x13)
82337 	/* Page size is 4GB. */
82338 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_4G	UINT32_C(0x14)
82339 	/* Page size is 8GB. */
82340 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_8G	UINT32_C(0x15)
82341 	/* Page size is 16GB. */
82342 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_16G	UINT32_C(0x16)
82343 	/* Page size is 32GB. */
82344 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_32G	UINT32_C(0x17)
82345 	/* Page size is 64GB. */
82346 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_64G	UINT32_C(0x18)
82347 	/* Page size is 128GB. */
82348 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_128G	UINT32_C(0x19)
82349 	/* Page size is 256GB. */
82350 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_256G	UINT32_C(0x1a)
82351 	/* Page size is 512GB. */
82352 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_512G	UINT32_C(0x1b)
82353 	/* Page size is 1TB. */
82354 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_1T	UINT32_C(0x1c)
82355 	/* Page size is 2TB. */
82356 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_2T	UINT32_C(0x1d)
82357 	/* Page size is 4TB. */
82358 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_4T	UINT32_C(0x1e)
82359 	/* Page size is 8TB. */
82360 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_8T	UINT32_C(0x1f)
82361 		#define SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_HDR_V3_PAGE_SIZE_LOG_PGSZ_8T
82362 	/*
82363 	 * This value controls the page size for page table elements
82364 	 * within a PBL. While many page sizes are supported only the
82365 	 * following should be tested - 4k, 8k, 64k, 256k, 1m, 2m, 4m, 1g
82366 	 */
82367 	#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_MASK	UINT32_C(0x3e0)
82368 	#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_SFT	5
82369 	/* Page size is 4KB. */
82370 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4K	(UINT32_C(0x0) << 5)
82371 	/* Page size is 8KB. */
82372 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8K	(UINT32_C(0x1) << 5)
82373 	/* Page size is 16KB. */
82374 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_16K   (UINT32_C(0x2) << 5)
82375 	/* Page size is 32KB. */
82376 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_32K   (UINT32_C(0x3) << 5)
82377 	/* Page size is 64KB. */
82378 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_64K   (UINT32_C(0x4) << 5)
82379 	/* Page size is 128KB. */
82380 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_128K  (UINT32_C(0x5) << 5)
82381 	/* Page size is 256KB. */
82382 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_256K  (UINT32_C(0x6) << 5)
82383 	/* Page size is 512KB. */
82384 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_512K  (UINT32_C(0x7) << 5)
82385 	/* Page size is 1MB. */
82386 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_1M	(UINT32_C(0x8) << 5)
82387 	/* Page size is 2MB. */
82388 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_2M	(UINT32_C(0x9) << 5)
82389 	/* Page size is 4MB. */
82390 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4M	(UINT32_C(0xa) << 5)
82391 	/* Page size is 8MB. */
82392 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8M	(UINT32_C(0xb) << 5)
82393 	/* Page size is 16MB. */
82394 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_16M   (UINT32_C(0xc) << 5)
82395 	/* Page size is 32MB. */
82396 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_32M   (UINT32_C(0xd) << 5)
82397 	/* Page size is 64MB. */
82398 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_64M   (UINT32_C(0xe) << 5)
82399 	/* Page size is 128MB. */
82400 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_128M  (UINT32_C(0xf) << 5)
82401 	/* Page size is 256MB. */
82402 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_256M  (UINT32_C(0x10) << 5)
82403 	/* Page size is 512MB. */
82404 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_512M  (UINT32_C(0x11) << 5)
82405 	/* Page size is 1GB. */
82406 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_1G	(UINT32_C(0x12) << 5)
82407 	/* Page size is 2GB. */
82408 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_2G	(UINT32_C(0x13) << 5)
82409 	/* Page size is 4GB. */
82410 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4G	(UINT32_C(0x14) << 5)
82411 	/* Page size is 8GB. */
82412 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8G	(UINT32_C(0x15) << 5)
82413 	/* Page size is 16GB. */
82414 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_16G   (UINT32_C(0x16) << 5)
82415 	/* Page size is 32GB. */
82416 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_32G   (UINT32_C(0x17) << 5)
82417 	/* Page size is 64GB. */
82418 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_64G   (UINT32_C(0x18) << 5)
82419 	/* Page size is 128GB. */
82420 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_128G  (UINT32_C(0x19) << 5)
82421 	/* Page size is 256GB. */
82422 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_256G  (UINT32_C(0x1a) << 5)
82423 	/* Page size is 512GB. */
82424 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_512G  (UINT32_C(0x1b) << 5)
82425 	/* Page size is 1TB. */
82426 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_1T	(UINT32_C(0x1c) << 5)
82427 	/* Page size is 2TB. */
82428 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_2T	(UINT32_C(0x1d) << 5)
82429 	/* Page size is 4TB. */
82430 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_4T	(UINT32_C(0x1e) << 5)
82431 	/* Page size is 8TB. */
82432 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8T	(UINT32_C(0x1f) << 5)
82433 		#define SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_LAST	SQ_FR_PMR_HDR_V3_PBL_PAGE_SIZE_LOG_PGSZ_8T
82434 	/* Number of levels of PBL for translation */
82435 	#define SQ_FR_PMR_HDR_V3_NUMLEVELS_MASK		UINT32_C(0xc00)
82436 	#define SQ_FR_PMR_HDR_V3_NUMLEVELS_SFT		10
82437 	/*
82438 	 * A zero level PBL means that the VA is the physical address
82439 	 * used for the operation. No translation is done by the PTU.
82440 	 */
82441 		#define SQ_FR_PMR_HDR_V3_NUMLEVELS_PHYSICAL	(UINT32_C(0x0) << 10)
82442 	/*
82443 	 * A one layer translation is provided between the logical and
82444 	 * physical address. The PBL points to a physical page that
82445 	 * contains PBE values that point to actual pg_size physical
82446 	 * pages.
82447 	 */
82448 		#define SQ_FR_PMR_HDR_V3_NUMLEVELS_LAYER1		(UINT32_C(0x1) << 10)
82449 	/*
82450 	 * A two layer translation is provided between the logical and
82451 	 * physical address. The PBL points to a physical page that
82452 	 * contains PDE values that in turn point to pbl_pg_size
82453 	 * physical pages that contain PBE values that point to actual
82454 	 * physical pages.
82455 	 */
82456 		#define SQ_FR_PMR_HDR_V3_NUMLEVELS_LAYER2		(UINT32_C(0x2) << 10)
82457 		#define SQ_FR_PMR_HDR_V3_NUMLEVELS_LAST		SQ_FR_PMR_HDR_V3_NUMLEVELS_LAYER2
82458 	uint16_t	reserved;
82459 	/* Local Virtual Address */
82460 	uint64_t	va;
82461 	/* Length in bytes of registered MR */
82462 	uint64_t	length;
82463 	/* Pointer to the PBL, or PDL depending on number of levels */
82464 	uint64_t	pbl_ptr;
82465 } sq_fr_pmr_hdr_v3_t, *psq_fr_pmr_hdr_v3_t;
82466 
82467 /*
82468  * SQ Bind WQE V3. This WQE can perform either:
82469  * * type1 "bind memory window", if mw_type==Type1
82470  * * type2 "post send bind memory window", if mw_type==Type2
82471  */
82472 /* sq_bind_v3 (size:256b/32B) */
82473 
82474 typedef struct sq_bind_v3 {
82475 	/* This field defines the type of SQ WQE. */
82476 	uint8_t	wqe_type;
82477 	/*
82478 	 * Memory Bind V3
82479 	 *
82480 	 * Allowed only on reliable connection (RC) SQs.
82481 	 */
82482 	#define SQ_BIND_V3_WQE_TYPE_BIND_V3 UINT32_C(0x1c)
82483 	#define SQ_BIND_V3_WQE_TYPE_LAST   SQ_BIND_V3_WQE_TYPE_BIND_V3
82484 	uint8_t	flags;
82485 	/*
82486 	 * Set if completion signaling is requested. If this bit is
82487 	 * 0, and the SQ is configured to support Unsignaled
82488 	 * completion the controller should not generate a CQE
82489 	 * unless there was an error. This refers to CQE on the
82490 	 * sender side (The se flag refers to the receiver side).
82491 	 */
82492 	#define SQ_BIND_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
82493 	/*
82494 	 * Indication to complete all previous RDMA Read or Atomic
82495 	 * WQEs on the SQ before executing this WQE
82496 	 */
82497 	#define SQ_BIND_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
82498 	/*
82499 	 * Unconditional fence. Indication to complete all previous
82500 	 * SQ's WQEs before executing this WQE.
82501 	 */
82502 	#define SQ_BIND_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
82503 	/*
82504 	 * This flag is not applicable and should be 0 for a local memory
82505 	 * operation WQE.
82506 	 */
82507 	#define SQ_BIND_V3_FLAGS_SE			UINT32_C(0x8)
82508 	/*
82509 	 * This flag is not applicable and should be 0 for a local memory
82510 	 * operation WQE.
82511 	 */
82512 	#define SQ_BIND_V3_FLAGS_INLINE		UINT32_C(0x10)
82513 	/*
82514 	 * This flag is not applicable and should be 0 for a local memory
82515 	 * operation WQE.
82516 	 */
82517 	#define SQ_BIND_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
82518 	/*
82519 	 * When set to '1', this operation will cause a trace capture in
82520 	 * each block it passes through.
82521 	 */
82522 	#define SQ_BIND_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
82523 	uint8_t	wqe_size_zero_based_mw_type;
82524 	/*
82525 	 * The size of the WQE in units of 16B chunks.
82526 	 *
82527 	 * For the Bind WQE, this field will always have a value of 2.
82528 	 */
82529 	#define SQ_BIND_V3_WQE_SIZE_MASK  UINT32_C(0x3f)
82530 	#define SQ_BIND_V3_WQE_SIZE_SFT   0
82531 	/*
82532 	 * If this bit is set, then the newly-bound memory window will be
82533 	 * zero-based. If clear, then the newly-bound memory window will be
82534 	 * non-zero-based.
82535 	 */
82536 	#define SQ_BIND_V3_ZERO_BASED	UINT32_C(0x40)
82537 	/*
82538 	 * If type1 is specified, then this WQE performs a "bind memory
82539 	 * window" operation on a type1 window. If type2 is specified, then
82540 	 * this WQE performs a "post send bind memory window" operation on a
82541 	 * type2 window.
82542 	 *
82543 	 * Note that the bind WQE cannot change the type of the memory
82544 	 * window.
82545 	 *
82546 	 * If a "bind memory window" operation is attempted on a memory
82547 	 * window that was allocated as type2, then the bind will fail with
82548 	 * an errored completion, as "bind memory window" is allowed only on
82549 	 * type1 memory windows.
82550 	 *
82551 	 * Similarly, if a "post send bind memory window" operation is
82552 	 * attempted on a memory window that was allocated as type1, then the
82553 	 * bind will fail with an errored completions, as "post send bind
82554 	 * memory window" is allowed only on type2 memory windows.
82555 	 */
82556 	#define SQ_BIND_V3_MW_TYPE	UINT32_C(0x80)
82557 	/* Type 1 Bind Memory Window */
82558 		#define SQ_BIND_V3__TYPE1	(UINT32_C(0x0) << 7)
82559 	/* Type 2 Post Send Bind Memory Window */
82560 		#define SQ_BIND_V3__TYPE2	(UINT32_C(0x1) << 7)
82561 		#define SQ_BIND_V3__LAST	SQ_BIND_V3__TYPE2
82562 	/*
82563 	 * This is the new access control for the MR. '1' means
82564 	 * the operation is allowed. '0' means operation is
82565 	 * not allowed.
82566 	 */
82567 	uint8_t	access_cntl;
82568 	/*
82569 	 * Local Write Access.
82570 	 *
82571 	 * Local accesses are never allowed for memory windows, so this
82572 	 * bit must always be zero in a bind WQE. If this bit is ever
82573 	 * set, the bind will fail with an errored completion.
82574 	 */
82575 	#define SQ_BIND_V3_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
82576 	/* Remote Read Access */
82577 	#define SQ_BIND_V3_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
82578 	/*
82579 	 * Remote Write Access.
82580 	 *
82581 	 * Note that, if this bit is set, then the parent region to which
82582 	 * the window is being bound must allow local writes. If this is not
82583 	 * the case, then the bind will fail with an errored completion.
82584 	 */
82585 	#define SQ_BIND_V3_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
82586 	/*
82587 	 * Remote Atomic Access.
82588 	 *
82589 	 * Note that, if this bit is set, then the parent region to which
82590 	 * the window is being bound must allow local writes. If this is not
82591 	 * the case, then the bind will fail with an errored completion.
82592 	 */
82593 	#define SQ_BIND_V3_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
82594 	/*
82595 	 * Window Binding Allowed.
82596 	 *
82597 	 * It is never allowed to bind windows to windows, so this bit
82598 	 * must always be zero in a bind WQE. If this bit is ever set,
82599 	 * the bind will fail with an errored completion.
82600 	 */
82601 	#define SQ_BIND_V3_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
82602 	/*
82603 	 * This value will be returned in the completion if the completion is
82604 	 * signaled.
82605 	 */
82606 	uint32_t	opaque;
82607 	/*
82608 	 * The L_Key of the parent MR; 24 msb of the key are used to
82609 	 * index the MRW table, 8 lsb are compared with the 8 bit key
82610 	 * in the MRWC.
82611 	 */
82612 	uint32_t	parent_l_key;
82613 	/*
82614 	 * Local Key; 24 msb of the key are used to index the memory
82615 	 * window being bound in the MRW table, 8 lsb are assign to the
82616 	 * 8 bit key_lsb field in the MRWC.
82617 	 */
82618 	uint32_t	l_key;
82619 	/* Local Virtual Address */
82620 	uint64_t	va;
82621 	/*
82622 	 * Length in bytes of registered MW; 40 bits as this is the max
82623 	 * size of an MR/W
82624 	 */
82625 	uint64_t	length;
82626 } sq_bind_v3_t, *psq_bind_v3_t;
82627 
82628 /*
82629  * SQ Bind WQE V3 header. This WQE can perform either:
82630  * * type1 "bind memory window", if mw_type==Type1
82631  * * type2 "post send bind memory window", if mw_type==Type2
82632  */
82633 /* sq_bind_hdr_v3 (size:256b/32B) */
82634 
82635 typedef struct sq_bind_hdr_v3 {
82636 	/* This field defines the type of SQ WQE. */
82637 	uint8_t	wqe_type;
82638 	/*
82639 	 * Memory Bind V3
82640 	 *
82641 	 * Allowed only on reliable connection (RC) SQs.
82642 	 */
82643 	#define SQ_BIND_HDR_V3_WQE_TYPE_BIND_V3 UINT32_C(0x1c)
82644 	#define SQ_BIND_HDR_V3_WQE_TYPE_LAST   SQ_BIND_HDR_V3_WQE_TYPE_BIND_V3
82645 	uint8_t	flags;
82646 	/*
82647 	 * Set if completion signaling is requested. If this bit is
82648 	 * 0, and the SQ is configured to support Unsignaled
82649 	 * completion the controller should not generate a CQE
82650 	 * unless there was an error. This refers to CQE on the
82651 	 * sender side (The se flag refers to the receiver side).
82652 	 */
82653 	#define SQ_BIND_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
82654 	/*
82655 	 * Indication to complete all previous RDMA Read or Atomic
82656 	 * WQEs on the SQ before executing this WQE
82657 	 */
82658 	#define SQ_BIND_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
82659 	/*
82660 	 * Unconditional fence. Indication to complete all previous
82661 	 * SQ's WQEs before executing this WQE.
82662 	 */
82663 	#define SQ_BIND_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
82664 	/*
82665 	 * This flag is not applicable and should be 0 for a local memory
82666 	 * operation WQE.
82667 	 */
82668 	#define SQ_BIND_HDR_V3_FLAGS_SE			UINT32_C(0x8)
82669 	/*
82670 	 * This flag is not applicable and should be 0 for a local memory
82671 	 * operation WQE.
82672 	 */
82673 	#define SQ_BIND_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
82674 	/*
82675 	 * This flag is not applicable and should be 0 for a local memory
82676 	 * operation WQE.
82677 	 */
82678 	#define SQ_BIND_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
82679 	/*
82680 	 * When set to '1', this operation will cause a trace capture in
82681 	 * each block it passes through.
82682 	 */
82683 	#define SQ_BIND_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
82684 	uint8_t	wqe_size_zero_based_mw_type;
82685 	/*
82686 	 * The size of the WQE in units of 16B chunks.
82687 	 *
82688 	 * For the Bind WQE, this field will always have a value of 2.
82689 	 */
82690 	#define SQ_BIND_HDR_V3_WQE_SIZE_MASK  UINT32_C(0x3f)
82691 	#define SQ_BIND_HDR_V3_WQE_SIZE_SFT   0
82692 	/*
82693 	 * If this bit is set, then the newly-bound memory window will be
82694 	 * zero-based. If clear, then the newly-bound memory window will be
82695 	 * non-zero-based.
82696 	 */
82697 	#define SQ_BIND_HDR_V3_ZERO_BASED	UINT32_C(0x40)
82698 	/*
82699 	 * If type1 is specified, then this WQE performs a "bind memory
82700 	 * window" operation on a type1 window. If type2 is specified, then
82701 	 * this WQE performs a "post send bind memory window" operation on a
82702 	 * type2 window.
82703 	 *
82704 	 * Note that the bind WQE cannot change the type of the memory
82705 	 * window.
82706 	 *
82707 	 * If a "bind memory window" operation is attempted on a memory
82708 	 * window that was allocated as type2, then the bind will fail with
82709 	 * an errored completion, as "bind memory window" is allowed only on
82710 	 * type1 memory windows.
82711 	 *
82712 	 * Similarly, if a "post send bind memory window" operation is
82713 	 * attempted on a memory window that was allocated as type1, then the
82714 	 * bind will fail with an errored completions, as "post send bind
82715 	 * memory window" is allowed only on type2 memory windows.
82716 	 */
82717 	#define SQ_BIND_HDR_V3_MW_TYPE	UINT32_C(0x80)
82718 	/* Type 1 Bind Memory Window */
82719 		#define SQ_BIND_HDR_V3__TYPE1	(UINT32_C(0x0) << 7)
82720 	/* Type 2 Post Send Bind Memory Window */
82721 		#define SQ_BIND_HDR_V3__TYPE2	(UINT32_C(0x1) << 7)
82722 		#define SQ_BIND_HDR_V3__LAST	SQ_BIND_HDR_V3__TYPE2
82723 	/*
82724 	 * This is the new access control for the MR. '1' means
82725 	 * the operation is allowed. '0' means operation is
82726 	 * not allowed.
82727 	 */
82728 	uint8_t	access_cntl;
82729 	/*
82730 	 * Local Write Access.
82731 	 *
82732 	 * Local accesses are never allowed for memory windows, so this
82733 	 * bit must always be zero in a bind WQE. If this bit is ever
82734 	 * set, the bind will fail with an errored completion.
82735 	 */
82736 	#define SQ_BIND_HDR_V3_ACCESS_CNTL_LOCAL_WRITE	UINT32_C(0x1)
82737 	/* Remote Read Access */
82738 	#define SQ_BIND_HDR_V3_ACCESS_CNTL_REMOTE_READ	UINT32_C(0x2)
82739 	/*
82740 	 * Remote Write Access.
82741 	 *
82742 	 * Note that, if this bit is set, then the parent region to which
82743 	 * the window is being bound must allow local writes. If this is not
82744 	 * the case, then the bind will fail with an errored completion.
82745 	 */
82746 	#define SQ_BIND_HDR_V3_ACCESS_CNTL_REMOTE_WRITE	UINT32_C(0x4)
82747 	/*
82748 	 * Remote Atomic Access.
82749 	 *
82750 	 * Note that, if this bit is set, then the parent region to which
82751 	 * the window is being bound must allow local writes. If this is not
82752 	 * the case, then the bind will fail with an errored completion.
82753 	 */
82754 	#define SQ_BIND_HDR_V3_ACCESS_CNTL_REMOTE_ATOMIC	UINT32_C(0x8)
82755 	/*
82756 	 * Window Binding Allowed.
82757 	 *
82758 	 * It is never allowed to bind windows to windows, so this bit
82759 	 * must always be zero in a bind WQE. If this bit is ever set,
82760 	 * the bind will fail with an errored completion.
82761 	 */
82762 	#define SQ_BIND_HDR_V3_ACCESS_CNTL_WINDOW_BIND	UINT32_C(0x10)
82763 	/*
82764 	 * This value will be returned in the completion if the completion is
82765 	 * signaled.
82766 	 */
82767 	uint32_t	opaque;
82768 	/*
82769 	 * The L_Key of the parent MR; 24 msb of the key are used to
82770 	 * index the MRW table, 8 lsb are compared with the 8 bit key
82771 	 * in the MRWC.
82772 	 */
82773 	uint32_t	parent_l_key;
82774 	/*
82775 	 * Local Key; 24 msb of the key are used to index the memory
82776 	 * window being bound in the MRW table, 8 lsb are assign to the
82777 	 * 8 bit key_lsb field in the MRWC.
82778 	 */
82779 	uint32_t	l_key;
82780 	/* Local Virtual Address */
82781 	uint64_t	va;
82782 	/*
82783 	 * Length in bytes of registered MW; 40 bits as this is the max
82784 	 * size of an MR/W
82785 	 */
82786 	uint64_t	length;
82787 } sq_bind_hdr_v3_t, *psq_bind_hdr_v3_t;
82788 
82789 /*
82790  * This is the Change UDP Source Port WQE V3 structure. It is supported
82791  * for both RC and UD QP's.
82792  *
82793  * It is recommended to set the uc_fence flag for this WQE, so that the
82794  * source port does not change while there are unacknowledged packets.
82795  */
82796 /* sq_change_udpsrcport_v3 (size:128b/16B) */
82797 
82798 typedef struct sq_change_udpsrcport_v3 {
82799 	/* This field defines the type of SQ WQE. */
82800 	uint8_t	wqe_type;
82801 	/* Change UDP Source Port V3 */
82802 	#define SQ_CHANGE_UDPSRCPORT_V3_WQE_TYPE_CHANGE_UDPSRCPORT_V3 UINT32_C(0x1e)
82803 	#define SQ_CHANGE_UDPSRCPORT_V3_WQE_TYPE_LAST		SQ_CHANGE_UDPSRCPORT_V3_WQE_TYPE_CHANGE_UDPSRCPORT_V3
82804 	uint8_t	flags;
82805 	/*
82806 	 * Set if completion signaling is requested. If this bit is
82807 	 * 0, and the SQ is configured to support Unsignaled
82808 	 * completion the controller should not generate a CQE
82809 	 * unless there was an error. This refers to CQE on the
82810 	 * sender side (The se flag refers to the receiver side).
82811 	 */
82812 	#define SQ_CHANGE_UDPSRCPORT_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
82813 	/*
82814 	 * Indication to complete all previous RDMA Read or Atomic
82815 	 * WQEs on the SQ before executing this WQE
82816 	 */
82817 	#define SQ_CHANGE_UDPSRCPORT_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
82818 	/*
82819 	 * Unconditional fence. Indication to complete all previous
82820 	 * SQ's WQEs before executing this WQE.
82821 	 *
82822 	 * It is recommended to set this flag for Change UDP Source Port
82823 	 * WQE's.
82824 	 */
82825 	#define SQ_CHANGE_UDPSRCPORT_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
82826 	/*
82827 	 * This flag is not applicable and should be 0 for a local memory
82828 	 * operation WQE.
82829 	 */
82830 	#define SQ_CHANGE_UDPSRCPORT_V3_FLAGS_SE			UINT32_C(0x8)
82831 	/*
82832 	 * This flag is not applicable and should be 0 for a local memory
82833 	 * operation WQE.
82834 	 */
82835 	#define SQ_CHANGE_UDPSRCPORT_V3_FLAGS_INLINE		UINT32_C(0x10)
82836 	/*
82837 	 * This flag is not applicable and should be 0 for a local memory
82838 	 * operation WQE.
82839 	 */
82840 	#define SQ_CHANGE_UDPSRCPORT_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
82841 	/*
82842 	 * When set to '1', this operation will cause a trace capture in
82843 	 * each block it passes through.
82844 	 */
82845 	#define SQ_CHANGE_UDPSRCPORT_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
82846 	uint8_t	wqe_size;
82847 	/*
82848 	 * The size of the WQE in units of 16B chunks.
82849 	 *
82850 	 * For the Change UDP Source Port WQE, this field will always have
82851 	 * a value of 1.
82852 	 */
82853 	#define SQ_CHANGE_UDPSRCPORT_V3_WQE_SIZE_MASK UINT32_C(0x3f)
82854 	#define SQ_CHANGE_UDPSRCPORT_V3_WQE_SIZE_SFT 0
82855 	uint8_t	reserved_1;
82856 	/*
82857 	 * This value will be returned in the completion if the completion is
82858 	 * signaled.
82859 	 */
82860 	uint32_t	opaque;
82861 	/* The new value for the QP's UDP source port. */
82862 	uint16_t	udp_src_port;
82863 	uint16_t	reserved_2;
82864 	uint32_t	reserved_3;
82865 } sq_change_udpsrcport_v3_t, *psq_change_udpsrcport_v3_t;
82866 
82867 /* SQ Change UDP Source Port WQE V3 header */
82868 /* sq_change_udpsrcport_hdr_v3 (size:128b/16B) */
82869 
82870 typedef struct sq_change_udpsrcport_hdr_v3 {
82871 	/* This field defines the type of SQ WQE. */
82872 	uint8_t	wqe_type;
82873 	/* Change UDP Source Port V3 */
82874 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_WQE_TYPE_CHANGE_UDPSRCPORT_V3 UINT32_C(0x1e)
82875 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_WQE_TYPE_LAST		SQ_CHANGE_UDPSRCPORT_HDR_V3_WQE_TYPE_CHANGE_UDPSRCPORT_V3
82876 	uint8_t	flags;
82877 	/*
82878 	 * Set if completion signaling is requested. If this bit is
82879 	 * 0, and the SQ is configured to support Unsignaled
82880 	 * completion the controller should not generate a CQE
82881 	 * unless there was an error. This refers to CQE on the
82882 	 * sender side (The se flag refers to the receiver side).
82883 	 */
82884 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_FLAGS_SIGNAL_COMP		UINT32_C(0x1)
82885 	/*
82886 	 * Indication to complete all previous RDMA Read or Atomic
82887 	 * WQEs on the SQ before executing this WQE
82888 	 */
82889 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_FLAGS_RD_OR_ATOMIC_FENCE	UINT32_C(0x2)
82890 	/*
82891 	 * Unconditional fence. Indication to complete all previous
82892 	 * SQ's WQEs before executing this WQE.
82893 	 *
82894 	 * It is recommended to set this flag for Change UDP Source Port
82895 	 * WQE's.
82896 	 */
82897 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_FLAGS_UC_FENCE		UINT32_C(0x4)
82898 	/*
82899 	 * This flag is not applicable and should be 0 for a local memory
82900 	 * operation WQE.
82901 	 */
82902 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_FLAGS_SE			UINT32_C(0x8)
82903 	/*
82904 	 * This flag is not applicable and should be 0 for a local memory
82905 	 * operation WQE.
82906 	 */
82907 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_FLAGS_INLINE		UINT32_C(0x10)
82908 	/*
82909 	 * This flag is not applicable and should be 0 for a local memory
82910 	 * operation WQE.
82911 	 */
82912 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_FLAGS_WQE_TS_EN		UINT32_C(0x20)
82913 	/*
82914 	 * When set to '1', this operation will cause a trace capture in
82915 	 * each block it passes through.
82916 	 */
82917 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_FLAGS_DEBUG_TRACE		UINT32_C(0x40)
82918 	uint8_t	wqe_size;
82919 	/*
82920 	 * The size of the WQE in units of 16B chunks.
82921 	 *
82922 	 * For the Change UDP Source Port WQE, this field will always have
82923 	 * a value of 1.
82924 	 */
82925 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_WQE_SIZE_MASK UINT32_C(0x3f)
82926 	#define SQ_CHANGE_UDPSRCPORT_HDR_V3_WQE_SIZE_SFT 0
82927 	uint8_t	reserved_1;
82928 	/*
82929 	 * This value will be returned in the completion if the completion is
82930 	 * signaled.
82931 	 */
82932 	uint32_t	opaque;
82933 	/* The new value for the QP's UDP source port. */
82934 	uint16_t	udp_src_port;
82935 	uint16_t	reserved_2;
82936 	uint32_t	reserved_3;
82937 } sq_change_udpsrcport_hdr_v3_t, *psq_change_udpsrcport_hdr_v3_t;
82938 
82939 /* RQ/SRQ WQE */
82940 /* rq_wqe (size:1024b/128B) */
82941 
82942 typedef struct rq_wqe {
82943 	/* wqe_type is 8 b */
82944 	uint8_t	wqe_type;
82945 	/*
82946 	 * RQ/SRQ WQE. This WQE is used for posting buffers on
82947 	 * an RQ or SRQ.
82948 	 */
82949 	#define RQ_WQE_WQE_TYPE_RCV UINT32_C(0x80)
82950 	#define RQ_WQE_WQE_TYPE_LAST RQ_WQE_WQE_TYPE_RCV
82951 	/* No flags supported for this WQE type. */
82952 	uint8_t	flags;
82953 	/*
82954 	 * Specify the total number 16B chunks that make up the valid
82955 	 * portion of the WQE. This includes the first chunk that is the
82956 	 * WQE structure and up to 6 SGE structures.
82957 	 *
82958 	 * While the valid area is defined by the wqe_size field, the
82959 	 * actual WQE size is fixed at 128B.
82960 	 */
82961 	uint8_t	wqe_size;
82962 	uint8_t	reserved8;
82963 	uint32_t	reserved32;
82964 	uint64_t	wr_id;
82965 	/*
82966 	 * Opaque value used by upper layer SW to identify the id of the
82967 	 * WR which generated the WQE. Used in CQE. Valid in the first
82968 	 * SGE of an SRQ WQE.
82969 	 */
82970 	#define RQ_WQE_WR_ID_MASK UINT32_C(0xfffff)
82971 	#define RQ_WQE_WR_ID_SFT 0
82972 	uint8_t	reserved128[16];
82973 	/*
82974 	 * The data field for RQ WQE is filled with from 1 to 6 SGE
82975 	 * structures as defined by the wqe_size field.
82976 	 */
82977 	uint32_t	data[24];
82978 } rq_wqe_t, *prq_wqe_t;
82979 
82980 /* RQ/SRQ WQE header. */
82981 /* rq_wqe_hdr (size:256b/32B) */
82982 
82983 typedef struct rq_wqe_hdr {
82984 	/* wqe_type is 8 b */
82985 	uint8_t	wqe_type;
82986 	/*
82987 	 * RQ/SRQ WQE. This WQE is used for posting buffers on
82988 	 * an RQ or SRQ.
82989 	 */
82990 	#define RQ_WQE_HDR_WQE_TYPE_RCV UINT32_C(0x80)
82991 	#define RQ_WQE_HDR_WQE_TYPE_LAST RQ_WQE_HDR_WQE_TYPE_RCV
82992 	/* No flags supported for this WQE type. */
82993 	uint8_t	flags;
82994 	/*
82995 	 * Specify the total number 16B chunks that make up the valid
82996 	 * portion of the WQE. This includes the first chunk that is the
82997 	 * WQE structure and up to 6 SGE structures.
82998 	 *
82999 	 * While the valid area is defined by the wqe_size field, the
83000 	 * actual WQE size is fixed at 128B.
83001 	 */
83002 	uint8_t	wqe_size;
83003 	uint8_t	reserved8;
83004 	uint32_t	reserved32;
83005 	uint64_t	wr_id;
83006 	/*
83007 	 * Opaque value used by upper layer SW to identify the id of the
83008 	 * WR which generated the WQE. Used in CQE. Valid in the first
83009 	 * SGE of an SRQ WQE.
83010 	 */
83011 	#define RQ_WQE_HDR_WR_ID_MASK UINT32_C(0xfffff)
83012 	#define RQ_WQE_HDR_WR_ID_SFT 0
83013 	uint8_t	reserved128[16];
83014 } rq_wqe_hdr_t, *prq_wqe_hdr_t;
83015 
83016 /* RQ/SRQ WQE V3 */
83017 /* rq_wqe_v3 (size:4096b/512B) */
83018 
83019 typedef struct rq_wqe_v3 {
83020 	/* wqe_type is 8 b */
83021 	uint8_t	wqe_type;
83022 	/*
83023 	 * RQ/SRQ WQE V3. This WQE is used for posting buffers on
83024 	 * an RQ or SRQ.
83025 	 */
83026 	#define RQ_WQE_V3_WQE_TYPE_RCV_V3 UINT32_C(0x90)
83027 	#define RQ_WQE_V3_WQE_TYPE_LAST  RQ_WQE_V3_WQE_TYPE_RCV_V3
83028 	/* No flags supported for this WQE type. */
83029 	uint8_t	flags;
83030 	/*
83031 	 * Specify the total number 16B chunks that make up the valid portion
83032 	 * of the WQE. This includes the first chunk that is the WQE
83033 	 * structure and up to 30 SGE structures. The maximum value for this
83034 	 * field is 32, representing a maximum-sized WQE of 512B.
83035 	 */
83036 	uint8_t	wqe_size;
83037 	uint8_t	reserved1;
83038 	/* This value will be returned in the completion. */
83039 	uint32_t	opaque;
83040 	uint64_t	reserved2;
83041 	/*
83042 	 * The data field for RQ WQE is filled with from 1 to 30 SGE
83043 	 * structures as defined by the wqe_size field.
83044 	 */
83045 	uint32_t	data[124];
83046 } rq_wqe_v3_t, *prq_wqe_v3_t;
83047 
83048 /* RQ/SRQ WQE V3 header. */
83049 /* rq_wqe_hdr_v3 (size:128b/16B) */
83050 
83051 typedef struct rq_wqe_hdr_v3 {
83052 	/* wqe_type is 8 b */
83053 	uint8_t	wqe_type;
83054 	/*
83055 	 * RQ/SRQ WQE V3. This WQE is used for posting buffers on
83056 	 * an RQ or SRQ.
83057 	 */
83058 	#define RQ_WQE_HDR_V3_WQE_TYPE_RCV_V3 UINT32_C(0x90)
83059 	#define RQ_WQE_HDR_V3_WQE_TYPE_LAST  RQ_WQE_HDR_V3_WQE_TYPE_RCV_V3
83060 	/* No flags supported for this WQE type. */
83061 	uint8_t	flags;
83062 	/*
83063 	 * Specify the total number 16B chunks that make up the valid portion
83064 	 * of the WQE. This includes the first chunk that is the WQE
83065 	 * structure and up to 30 SGE structures. The maximum value for this
83066 	 * field is 32, representing a maximum-sized WQE of 512B.
83067 	 */
83068 	uint8_t	wqe_size;
83069 	uint8_t	reserved1;
83070 	/* This value will be returned in the completion. */
83071 	uint32_t	opaque;
83072 	uint64_t	reserved2;
83073 } rq_wqe_hdr_v3_t, *prq_wqe_hdr_v3_t;
83074 
83075 /* cq_base (size:256b/32B) */
83076 
83077 typedef struct cq_base {
83078 	uint64_t	reserved64_1;
83079 	uint64_t	reserved64_2;
83080 	uint64_t	reserved64_3;
83081 	uint8_t	cqe_type_toggle;
83082 	/*
83083 	 * Indicate valid completion - written by the chip. The NIC
83084 	 * toggle this bit each time it finished consuming all PBL
83085 	 * entries.
83086 	 */
83087 	#define CQ_BASE_TOGGLE			UINT32_C(0x1)
83088 	/* This field defines the type of CQE. */
83089 	#define CQ_BASE_CQE_TYPE_MASK		UINT32_C(0x1e)
83090 	#define CQ_BASE_CQE_TYPE_SFT		1
83091 	/*
83092 	 * Requester completion - This is used for both RC and UD SQ
83093 	 * completions.
83094 	 */
83095 		#define CQ_BASE_CQE_TYPE_REQ		(UINT32_C(0x0) << 1)
83096 	/*
83097 	 * Responder RC Completion - This is used for both RQ and SRQ
83098 	 * completions for RC service QPs.
83099 	 */
83100 		#define CQ_BASE_CQE_TYPE_RES_RC		(UINT32_C(0x1) << 1)
83101 	/*
83102 	 * Responder UD Completion - This is used for both RQ and SRQ
83103 	 * completion for UD service QPs.
83104 	 */
83105 		#define CQ_BASE_CQE_TYPE_RES_UD		(UINT32_C(0x2) << 1)
83106 	/*
83107 	 * Responder RawEth and QP1 Completion - This is used for RQ
83108 	 * completion for RawEth service and QP1 service QPs.
83109 	 */
83110 		#define CQ_BASE_CQE_TYPE_RES_RAWETH_QP1	(UINT32_C(0x3) << 1)
83111 	/*
83112 	 * Responder UD completion with CFA. This is used for both RQ
83113 	 * and SQ completion for UD service QPs. It includes cfa fields
83114 	 * (some of which carry VLAN information), in place of QP handle.
83115 	 */
83116 		#define CQ_BASE_CQE_TYPE_RES_UD_CFA	(UINT32_C(0x4) << 1)
83117 	/*
83118 	 * Requester completion V3 - This is used for both RC and UD SQ
83119 	 * completions.
83120 	 */
83121 		#define CQ_BASE_CQE_TYPE_REQ_V3		(UINT32_C(0x8) << 1)
83122 	/*
83123 	 * Responder RC Completion V3 - This is used for both RQ and SRQ
83124 	 * completions for RC service QPs.
83125 	 */
83126 		#define CQ_BASE_CQE_TYPE_RES_RC_V3	(UINT32_C(0x9) << 1)
83127 	/*
83128 	 * Responder UD Completion V3 - This is used for both RQ and SRQ
83129 	 * completion for UD service QPs. It is also used for QP1 QPs
83130 	 * that are treated as UD.
83131 	 */
83132 		#define CQ_BASE_CQE_TYPE_RES_UD_V3	(UINT32_C(0xa) << 1)
83133 	/*
83134 	 * Responder RawEth and QP1 Completion V3 - This is used for RQ and
83135 	 * SRQ completion for RawEth service. It is also used for QP1 QPs
83136 	 * that are treated as RawEth.
83137 	 */
83138 		#define CQ_BASE_CQE_TYPE_RES_RAWETH_QP1_V3  (UINT32_C(0xb) << 1)
83139 	/*
83140 	 * Responder UD Completion with CFA V3 - This is used for both RQ
83141 	 * and SRQ completion for UD service QPs. It includes CFA fields
83142 	 * (some of which carry VLAN information), in place of the QP
83143 	 * handle. It is also used for QP1 QPs that are treated as UD.
83144 	 */
83145 		#define CQ_BASE_CQE_TYPE_RES_UD_CFA_V3	(UINT32_C(0xc) << 1)
83146 	/*
83147 	 * NO_OP completion - This is used to indicate that no
83148 	 * operation completed.
83149 	 */
83150 		#define CQ_BASE_CQE_TYPE_NO_OP		(UINT32_C(0xd) << 1)
83151 	/*
83152 	 * Terminal completion - This is used to indicate that no
83153 	 * further completions will be made for this QP on this CQ.
83154 	 */
83155 		#define CQ_BASE_CQE_TYPE_TERMINAL	(UINT32_C(0xe) << 1)
83156 	/*
83157 	 * Cut off CQE; for CQ resize. This CQE is written to the "old"
83158 	 * CQ as the last CQE written. SW may use this to know when the
83159 	 * "old" CQ can be destroyed.
83160 	 */
83161 		#define CQ_BASE_CQE_TYPE_CUT_OFF		(UINT32_C(0xf) << 1)
83162 		#define CQ_BASE_CQE_TYPE_LAST		CQ_BASE_CQE_TYPE_CUT_OFF
83163 	/* This field indicates the status for the CQE. */
83164 	uint8_t	status;
83165 	/* The operation completed successfully. */
83166 	#define CQ_BASE_STATUS_OK			UINT32_C(0x0)
83167 	/*
83168 	 * An unexpected BTH opcode or a First/Middle packet that is not
83169 	 * the full MTU size was returned by the responder.
83170 	 *
83171 	 * This is a fatal error detected by the requester Rx.
83172 	 */
83173 	#define CQ_BASE_STATUS_BAD_RESPONSE_ERR	UINT32_C(0x1)
83174 	/*
83175 	 * Generated for a WQE posted to the local SQ when the sum of the
83176 	 * lengths of the SGEs in the WQE exceeds the maximum message
83177 	 * length of 2^31 bytes.
83178 	 *
83179 	 * Generated for a WQE posted to the local RQ/SRQ when the sum of
83180 	 * the lengths of the SGEs in the WQE is too small to receive the
83181 	 * (valid) incoming message or the length of the incoming message
83182 	 * is greater than the maximum message size supported.
83183 	 *
83184 	 * This is a fatal error detected by the requester Tx or responder
83185 	 * Rx. For responder CQEs, only the opaque field is valid.
83186 	 */
83187 	#define CQ_BASE_STATUS_LOCAL_LENGTH_ERR	UINT32_C(0x2)
83188 	/*
83189 	 * This indicates that the packet was too long for the WQE provided
83190 	 * on the SRQ/RQ.
83191 	 *
83192 	 * This is not a fatal error. All the fields in the CQE are valid.
83193 	 */
83194 	#define CQ_BASE_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x3)
83195 	/*
83196 	 * An internal QP consistency error was detected while processing
83197 	 * this Work Request. For requester, this could be an SQ WQE format
83198 	 * error or an operation specified in the WQE that is not supported
83199 	 * for the QP. For responder, this is an RQ/SRQ WQE format error.
83200 	 *
83201 	 * This is a fatal error detected by the requester Tx or responder
83202 	 * Rx. For responder CQEs, only the opaque field is valid.
83203 	 */
83204 	#define CQ_BASE_STATUS_LOCAL_QP_OPERATION_ERR	UINT32_C(0x4)
83205 	/*
83206 	 * An SGE in the locally posted WQE does not reference a Memory
83207 	 * Region that is valid for the requested operation. If this error
83208 	 * is generated for an SGE using the reserved l_key, this means
83209 	 * that the reserved l_key is not enabled.
83210 	 *
83211 	 * This is a fatal error detected by the requester Tx or responder
83212 	 * Rx. For responder CQEs, only the opaque field is valid.
83213 	 */
83214 	#define CQ_BASE_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x5)
83215 	/*
83216 	 * A protection error occurred on a local data buffer during the
83217 	 * processing of a RDMA Write with Immediate Data operation sent
83218 	 * from the remote node.
83219 	 *
83220 	 * This is a fatal error detected by the responder Rx. Only the
83221 	 * opaque field in the CQE is valid.
83222 	 */
83223 	#define CQ_BASE_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x6)
83224 	/*
83225 	 * The SSC detected an error on a local memory operation from the
83226 	 * SQ (fast-register, local invalidate, or bind).
83227 	 *
83228 	 * This is a fatal error detected by the requester Tx.
83229 	 */
83230 	#define CQ_BASE_STATUS_MEMORY_MGT_OPERATION_ERR   UINT32_C(0x7)
83231 	/*
83232 	 * An invalid message was received by the responder. This could be
83233 	 * an operation that is not supported by this QP, an IRRQ overflow
83234 	 * error, or the length in an RDMA operation is greater than the
83235 	 * maximum message size (2^31 bytes).
83236 	 *
83237 	 * This is a fatal error detected by the responder and communicated
83238 	 * back to the requester using a NAK-Invalid Request. For responder
83239 	 * CQEs, only the opaque field is valid.
83240 	 */
83241 	#define CQ_BASE_STATUS_REMOTE_INVALID_REQUEST_ERR UINT32_C(0x8)
83242 	/*
83243 	 * A protection error occurred on a remote data buffer to be read
83244 	 * by an RDMA Read, written by an RDMA Write or accessed by an
83245 	 * atomic operation. This error is reported only on RDMA operations
83246 	 * or atomic operations.
83247 	 *
83248 	 * This is a fatal error detected by the responder and communicated
83249 	 * back to the requester using a NAK-Remote Access Violation.
83250 	 */
83251 	#define CQ_BASE_STATUS_REMOTE_ACCESS_ERR	UINT32_C(0x9)
83252 	/*
83253 	 * The operation could not be completed successfully by the
83254 	 * responder. Possible causes include an RQ/SRQ WQE format error,
83255 	 * an SSC error when validating an SGE from an RQ/SRQ WQE, or the
83256 	 * message received was too long for the RQ/SRQ WQE.
83257 	 *
83258 	 * This is a fatal error detected by the responder and communicated
83259 	 * back to the requester using a NAK-Remote Operation Error.
83260 	 */
83261 	#define CQ_BASE_STATUS_REMOTE_OPERATION_ERR	UINT32_C(0xa)
83262 	/*
83263 	 * The RNR NAK retry count was exceeded while trying to send this
83264 	 * message.
83265 	 *
83266 	 * This is a fatal error detected by the requester.
83267 	 */
83268 	#define CQ_BASE_STATUS_RNR_NAK_RETRY_CNT_ERR	UINT32_C(0xb)
83269 	/*
83270 	 * The local transport timeout retry counter was exceeded while
83271 	 * trying to send this message.
83272 	 *
83273 	 * This is a fatal error detected by the requester.
83274 	 */
83275 	#define CQ_BASE_STATUS_TRANSPORT_RETRY_CNT_ERR	UINT32_C(0xc)
83276 	/*
83277 	 * A WQE was in process or outstanding when the QP transitioned
83278 	 * into the Error State.
83279 	 */
83280 	#define CQ_BASE_STATUS_WORK_REQUEST_FLUSHED_ERR   UINT32_C(0xd)
83281 	/*
83282 	 * A WQE had already been taken off the RQ/SRQ when a fatal error
83283 	 * was detected on responder Rx. Only the opaque field in the CQE
83284 	 * is valid.
83285 	 */
83286 	#define CQ_BASE_STATUS_HW_FLUSH_ERR		UINT32_C(0xe)
83287 	/*
83288 	 * A WQE was posted to the SQ/RQ that caused it to overflow. For
83289 	 * requester CQEs, it was the SQ that overflowed. For responder
83290 	 * CQEs, it was the RQ that overflowed.
83291 	 */
83292 	#define CQ_BASE_STATUS_OVERFLOW_ERR		UINT32_C(0xf)
83293 	#define CQ_BASE_STATUS_LAST			CQ_BASE_STATUS_OVERFLOW_ERR
83294 	uint16_t	reserved16;
83295 	/*
83296 	 * This value is from the WQE that is being completed. This field is
83297 	 * only applicable to V3 version of CQEs.
83298 	 */
83299 	uint32_t	opaque;
83300 } cq_base_t, *pcq_base_t;
83301 
83302 /* Requester CQ CQE */
83303 /* cq_req (size:256b/32B) */
83304 
83305 typedef struct cq_req {
83306 	/*
83307 	 * This is an application level ID used to identify the
83308 	 * QP and its SQ and RQ.
83309 	 */
83310 	uint64_t	qp_handle;
83311 	/*
83312 	 * SQ Consumer Index - points to the entry just past the last WQE
83313 	 * that has been completed by the chip. Wraps around at
83314 	 * QPC.sq_size (i.e. the valid range of the SQ Consumer Index is 0
83315 	 * to (QPC.sq_size - 1)).
83316 	 */
83317 	uint16_t	sq_cons_idx;
83318 	uint16_t	reserved16_1;
83319 	uint32_t	reserved32_2;
83320 	uint64_t	reserved64;
83321 	uint8_t	cqe_type_toggle;
83322 	/*
83323 	 * Indicate valid completion - written by the chip. Cumulus
83324 	 * toggle this bit each time it finished consuming all PBL
83325 	 * entries
83326 	 */
83327 	#define CQ_REQ_TOGGLE	UINT32_C(0x1)
83328 	/* This field defines the type of CQE. */
83329 	#define CQ_REQ_CQE_TYPE_MASK UINT32_C(0x1e)
83330 	#define CQ_REQ_CQE_TYPE_SFT 1
83331 	/*
83332 	 * Requester completion - This is used for both RC and UD SQ
83333 	 * completions.
83334 	 */
83335 		#define CQ_REQ_CQE_TYPE_REQ   (UINT32_C(0x0) << 1)
83336 		#define CQ_REQ_CQE_TYPE_LAST CQ_REQ_CQE_TYPE_REQ
83337 	/*
83338 	 * When this bit is '1', it indicates that the packet completed
83339 	 * was transmitted using the push accelerated data provided by
83340 	 * the driver. When this bit is '0', it indicates that the packet
83341 	 * had not push acceleration data written or was executed as a
83342 	 * normal packet even though push data was provided.
83343 	 * This field is intended to be used for driver-generated push
83344 	 * statistics. It is not applicable for RC since not all RC packets
83345 	 * return a CQE.
83346 	 */
83347 	#define CQ_REQ_PUSH	UINT32_C(0x20)
83348 	/* This field indicates the status for the CQE. */
83349 	uint8_t	status;
83350 	/* OK is 0 */
83351 	#define CQ_REQ_STATUS_OK			UINT32_C(0x0)
83352 	/* BAD_RESPONSE_ERR is 1 */
83353 	#define CQ_REQ_STATUS_BAD_RESPONSE_ERR	UINT32_C(0x1)
83354 	/* LOCAL_LENGTH_ERR is 2 */
83355 	#define CQ_REQ_STATUS_LOCAL_LENGTH_ERR	UINT32_C(0x2)
83356 	/* LOCAL_QP_OPERATION_ERR is 3 */
83357 	#define CQ_REQ_STATUS_LOCAL_QP_OPERATION_ERR	UINT32_C(0x3)
83358 	/* LOCAL_PROTECTION_ERR is 4 */
83359 	#define CQ_REQ_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x4)
83360 	/* MEMORY_MGT_OPERATION_ERR is 5 */
83361 	#define CQ_REQ_STATUS_MEMORY_MGT_OPERATION_ERR   UINT32_C(0x5)
83362 	/* REMOTE_INVALID_REQUEST_ERR is 6 */
83363 	#define CQ_REQ_STATUS_REMOTE_INVALID_REQUEST_ERR UINT32_C(0x6)
83364 	/* REMOTE_ACCESS_ERR is 7 */
83365 	#define CQ_REQ_STATUS_REMOTE_ACCESS_ERR	UINT32_C(0x7)
83366 	/* REMOTE_OPERATION_ERR is 8 */
83367 	#define CQ_REQ_STATUS_REMOTE_OPERATION_ERR	UINT32_C(0x8)
83368 	/* RNR_NAK_RETRY_CNT_ERR is 9 */
83369 	#define CQ_REQ_STATUS_RNR_NAK_RETRY_CNT_ERR	UINT32_C(0x9)
83370 	/* TRANSPORT_RETRY_CNT_ERR is 10 */
83371 	#define CQ_REQ_STATUS_TRANSPORT_RETRY_CNT_ERR	UINT32_C(0xa)
83372 	/* WORK_REQUEST_FLUSHED_ERR is 11 */
83373 	#define CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR   UINT32_C(0xb)
83374 	#define CQ_REQ_STATUS_LAST			CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR
83375 	uint16_t	reserved16_2;
83376 	uint32_t	reserved32_1;
83377 } cq_req_t, *pcq_req_t;
83378 
83379 /* Responder RC CQE */
83380 /* cq_res_rc (size:256b/32B) */
83381 
83382 typedef struct cq_res_rc {
83383 	/*
83384 	 * The length of the message's payload in bytes, stored in
83385 	 * the SGEs
83386 	 */
83387 	uint32_t	length;
83388 	/*
83389 	 * Immediate data in case the imm_flag set, R_Key to be
83390 	 * invalidated in case inv_flag is set.
83391 	 */
83392 	uint32_t	imm_data_or_inv_r_key;
83393 	/*
83394 	 * This is an application level ID used to identify the
83395 	 * QP and its SQ and RQ.
83396 	 */
83397 	uint64_t	qp_handle;
83398 	/*
83399 	 * Opaque value - valid when inv_flag is set. Used by driver
83400 	 * to reference the buffer used to store PBL when the MR was
83401 	 * fast registered. The driver can reclaim this buffer after
83402 	 * an MR was remotely invalidated. The controller take that
83403 	 * value from the MR referenced by R_Key
83404 	 */
83405 	uint64_t	mr_handle;
83406 	uint8_t	cqe_type_toggle;
83407 	/*
83408 	 * Indicate valid completion - written by the chip. Cumulus
83409 	 * toggle this bit each time it finished consuming all PBL
83410 	 * entries
83411 	 */
83412 	#define CQ_RES_RC_TOGGLE	UINT32_C(0x1)
83413 	/* This field defines the type of CQE. */
83414 	#define CQ_RES_RC_CQE_TYPE_MASK  UINT32_C(0x1e)
83415 	#define CQ_RES_RC_CQE_TYPE_SFT   1
83416 	/*
83417 	 * Responder RC Completion - This is used for both RQ and SRQ
83418 	 * completions for RC service QPs.
83419 	 */
83420 		#define CQ_RES_RC_CQE_TYPE_RES_RC  (UINT32_C(0x1) << 1)
83421 		#define CQ_RES_RC_CQE_TYPE_LAST   CQ_RES_RC_CQE_TYPE_RES_RC
83422 	/* This field indicates the status for the CQE. */
83423 	uint8_t	status;
83424 	/* OK is 0 */
83425 	#define CQ_RES_RC_STATUS_OK			UINT32_C(0x0)
83426 	/* LOCAL_ACCESS_ERROR is 1 */
83427 	#define CQ_RES_RC_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x1)
83428 	/* LOCAL_LENGTH_ERR is 2 */
83429 	#define CQ_RES_RC_STATUS_LOCAL_LENGTH_ERR	UINT32_C(0x2)
83430 	/* LOCAL_PROTECTION_ERR is 3 */
83431 	#define CQ_RES_RC_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x3)
83432 	/* LOCAL_QP_OPERATION_ERR is 4 */
83433 	#define CQ_RES_RC_STATUS_LOCAL_QP_OPERATION_ERR	UINT32_C(0x4)
83434 	/* MEMORY_MGT_OPERATION_ERR is 5 */
83435 	#define CQ_RES_RC_STATUS_MEMORY_MGT_OPERATION_ERR   UINT32_C(0x5)
83436 	/* REMOTE_INVALID_REQUEST_ERR is 6 */
83437 	#define CQ_RES_RC_STATUS_REMOTE_INVALID_REQUEST_ERR UINT32_C(0x6)
83438 	/* WORK_REQUEST_FLUSHED_ERR is 7 */
83439 	#define CQ_RES_RC_STATUS_WORK_REQUEST_FLUSHED_ERR   UINT32_C(0x7)
83440 	/* HW_FLUSH_ERR is 8 */
83441 	#define CQ_RES_RC_STATUS_HW_FLUSH_ERR		UINT32_C(0x8)
83442 	#define CQ_RES_RC_STATUS_LAST			CQ_RES_RC_STATUS_HW_FLUSH_ERR
83443 	uint16_t	flags;
83444 	/*
83445 	 * This flag indicates that the completion is for a SRQ entry
83446 	 * rather than for an RQ entry.
83447 	 */
83448 	#define CQ_RES_RC_FLAGS_SRQ		UINT32_C(0x1)
83449 	/* CQE relates to RQ WQE. */
83450 		#define CQ_RES_RC_FLAGS_SRQ_RQ	UINT32_C(0x0)
83451 	/* CQE relates to SRQ WQE. */
83452 		#define CQ_RES_RC_FLAGS_SRQ_SRQ	UINT32_C(0x1)
83453 		#define CQ_RES_RC_FLAGS_SRQ_LAST	CQ_RES_RC_FLAGS_SRQ_SRQ
83454 	/* Immediate data indicator */
83455 	#define CQ_RES_RC_FLAGS_IMM		UINT32_C(0x2)
83456 	/* R_Key invalidate indicator */
83457 	#define CQ_RES_RC_FLAGS_INV		UINT32_C(0x4)
83458 	#define CQ_RES_RC_FLAGS_RDMA	UINT32_C(0x8)
83459 	/* CQE relates to an incoming Send request */
83460 		#define CQ_RES_RC_FLAGS_RDMA_SEND	(UINT32_C(0x0) << 3)
83461 	/* CQE relates to incoming RDMA Write request */
83462 		#define CQ_RES_RC_FLAGS_RDMA_RDMA_WRITE  (UINT32_C(0x1) << 3)
83463 		#define CQ_RES_RC_FLAGS_RDMA_LAST	CQ_RES_RC_FLAGS_RDMA_RDMA_WRITE
83464 	uint32_t	srq_or_rq_wr_id;
83465 	/*
83466 	 * Opaque value from RQ or SRQ WQE. Used by driver/lib to
83467 	 * reference the WQE in order to claim the received data
83468 	 * and reuse the WQE space
83469 	 */
83470 	#define CQ_RES_RC_SRQ_OR_RQ_WR_ID_MASK UINT32_C(0xfffff)
83471 	#define CQ_RES_RC_SRQ_OR_RQ_WR_ID_SFT 0
83472 } cq_res_rc_t, *pcq_res_rc_t;
83473 
83474 /* Responder UD CQE */
83475 /* cq_res_ud (size:256b/32B) */
83476 
83477 typedef struct cq_res_ud {
83478 	uint16_t	length;
83479 	/*
83480 	 * The length of the message's payload in bytes, stored in
83481 	 * the SGEs
83482 	 */
83483 	#define CQ_RES_UD_LENGTH_MASK UINT32_C(0x3fff)
83484 	#define CQ_RES_UD_LENGTH_SFT 0
83485 	/*
83486 	 * This is data from the CFA or VNIC block as indicated by the
83487 	 * ext_meta_format and meta_format fields.
83488 	 */
83489 	uint16_t	cfa_metadata;
83490 	/* When meta_format=1, this value is the VLAN VID. */
83491 	#define CQ_RES_UD_CFA_METADATA_VID_MASK UINT32_C(0xfff)
83492 	#define CQ_RES_UD_CFA_METADATA_VID_SFT 0
83493 	/* When meta_format=1, this value is the VLAN DE. */
83494 	#define CQ_RES_UD_CFA_METADATA_DE	UINT32_C(0x1000)
83495 	/* When meta_format=1, this value is the VLAN PRI. */
83496 	#define CQ_RES_UD_CFA_METADATA_PRI_MASK UINT32_C(0xe000)
83497 	#define CQ_RES_UD_CFA_METADATA_PRI_SFT 13
83498 	/* Immediate data in case the imm_flag set. */
83499 	uint32_t	imm_data;
83500 	/*
83501 	 * This is an application level ID used to identify the
83502 	 * QP and its SQ and RQ.
83503 	 */
83504 	uint64_t	qp_handle;
83505 	/*
83506 	 * Source MAC address for the UD message placed in the WQE
83507 	 * that is completed by this CQE.
83508 	 */
83509 	uint16_t	src_mac[3];
83510 	/* Lower 16b of the Source QP value from the DETH header. */
83511 	uint16_t	src_qp_low;
83512 	uint8_t	cqe_type_toggle;
83513 	/*
83514 	 * Indicate valid completion - written by the chip. Cumulus
83515 	 * toggle this bit each time it finished consuming all PBL
83516 	 * entries
83517 	 */
83518 	#define CQ_RES_UD_TOGGLE	UINT32_C(0x1)
83519 	/* This field defines the type of CQE. */
83520 	#define CQ_RES_UD_CQE_TYPE_MASK  UINT32_C(0x1e)
83521 	#define CQ_RES_UD_CQE_TYPE_SFT   1
83522 	/*
83523 	 * Responder UD Completion - This is used for both RQ and SRQ
83524 	 * completion for UD service QPs.
83525 	 */
83526 		#define CQ_RES_UD_CQE_TYPE_RES_UD  (UINT32_C(0x2) << 1)
83527 		#define CQ_RES_UD_CQE_TYPE_LAST   CQ_RES_UD_CQE_TYPE_RES_UD
83528 	/* This field indicates the status for the CQE. */
83529 	uint8_t	status;
83530 	/*
83531 	 * This indicates that the completion is without error.
83532 	 * All fields are valid.
83533 	 */
83534 	#define CQ_RES_UD_STATUS_OK			UINT32_C(0x0)
83535 	/*
83536 	 * This indicates that write access was not allowed for
83537 	 * at least one of the SGEs in the WQE.
83538 	 *
83539 	 * This is a fatal error. Only the srq_or_rq_wr_id is field
83540 	 * is valid.
83541 	 */
83542 	#define CQ_RES_UD_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x1)
83543 	/*
83544 	 * This indicates that the packet was too long for the WQE
83545 	 * provided on the SRQ/RQ.
83546 	 *
83547 	 * This is not a fatal error. All the fields are valid.
83548 	 */
83549 	#define CQ_RES_UD_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x2)
83550 	/* LOCAL_PROTECTION_ERR is 3 */
83551 	#define CQ_RES_UD_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x3)
83552 	/* LOCAL_QP_OPERATION_ERR is 4 */
83553 	#define CQ_RES_UD_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
83554 	/* MEMORY_MGT_OPERATION_ERR is 5 */
83555 	#define CQ_RES_UD_STATUS_MEMORY_MGT_OPERATION_ERR UINT32_C(0x5)
83556 	/* WORK_REQUEST_FLUSHED_ERR is 7 */
83557 	#define CQ_RES_UD_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0x7)
83558 	/* HW_FLUSH_ERR is 8 */
83559 	#define CQ_RES_UD_STATUS_HW_FLUSH_ERR		UINT32_C(0x8)
83560 	#define CQ_RES_UD_STATUS_LAST			CQ_RES_UD_STATUS_HW_FLUSH_ERR
83561 	uint16_t	flags;
83562 	/*
83563 	 * This flag indicates that the completion is for a SRQ entry
83564 	 * rather than for an RQ entry.
83565 	 */
83566 	#define CQ_RES_UD_FLAGS_SRQ		UINT32_C(0x1)
83567 	/* CQE relates to RQ WQE. */
83568 		#define CQ_RES_UD_FLAGS_SRQ_RQ		UINT32_C(0x0)
83569 	/* CQE relates to SRQ WQE. */
83570 		#define CQ_RES_UD_FLAGS_SRQ_SRQ		UINT32_C(0x1)
83571 		#define CQ_RES_UD_FLAGS_SRQ_LAST		CQ_RES_UD_FLAGS_SRQ_SRQ
83572 	/* Immediate data indicator */
83573 	#define CQ_RES_UD_FLAGS_IMM		UINT32_C(0x2)
83574 	#define CQ_RES_UD_FLAGS_UNUSED_MASK	UINT32_C(0xc)
83575 	#define CQ_RES_UD_FLAGS_UNUSED_SFT		2
83576 	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_MASK	UINT32_C(0x30)
83577 	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_SFT	4
83578 	/* RoCEv1 Message */
83579 		#define CQ_RES_UD_FLAGS_ROCE_IP_VER_V1	(UINT32_C(0x0) << 4)
83580 	/* RoCEv2 IPv4 Message */
83581 		#define CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV4	(UINT32_C(0x2) << 4)
83582 	/* RoCEv2 IPv6 Message */
83583 		#define CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV6	(UINT32_C(0x3) << 4)
83584 		#define CQ_RES_UD_FLAGS_ROCE_IP_VER_LAST	CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV6
83585 	/*
83586 	 * The combination of this value and ext_meta_format indicates
83587 	 * what format the metadata field is.
83588 	 */
83589 	#define CQ_RES_UD_FLAGS_META_FORMAT_MASK	UINT32_C(0x3c0)
83590 	#define CQ_RES_UD_FLAGS_META_FORMAT_SFT	6
83591 	/* No metadata information. Value is zero. */
83592 		#define CQ_RES_UD_FLAGS_META_FORMAT_NONE	(UINT32_C(0x0) << 6)
83593 	/*
83594 	 * The metadata field contains the VLAN tag and TPID value.
83595 	 * - metadata[11:0] contains the vlan VID value.
83596 	 * - metadata[12] contains the vlan DE value.
83597 	 * - metadata[15:13] contains the vlan PRI value.
83598 	 */
83599 		#define CQ_RES_UD_FLAGS_META_FORMAT_VLAN	(UINT32_C(0x1) << 6)
83600 	/*
83601 	 * If ext_meta_format is equal to 1, the metadata field
83602 	 * contains the lower 16b of the tunnel ID value, justified
83603 	 * to LSB
83604 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
83605 	 * - Geneve (NGE) = VNI[23:0] -> Virtual Network Identifier.
83606 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
83607 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K = 0
83608 	 * - IPV4 = 0 (not populated)
83609 	 * - IPV6 = Flow Label[19:0]
83610 	 * - PPPoE = sessionID[15:0]
83611 	 * - MPLs = Outer label[19:0]
83612 	 * - UPAR = Selected[31:0] with bit mask
83613 	 */
83614 		#define CQ_RES_UD_FLAGS_META_FORMAT_TUNNEL_ID   (UINT32_C(0x2) << 6)
83615 	/*
83616 	 * if ext_meta_format is equal to 1, metadata field contains
83617 	 * 16b metadata from the prepended header (chdr_data).
83618 	 */
83619 		#define CQ_RES_UD_FLAGS_META_FORMAT_CHDR_DATA   (UINT32_C(0x3) << 6)
83620 	/*
83621 	 * If ext_meta_format is equal to 1, the metadata field contains
83622 	 * the outer_l3_offset and lower 7 bits of the inner_l2_offset,
83623 	 * - metadata[8:0] contains the outer_l3_offset.
83624 	 * - metadata[15:9] contains the inner_l2_offset[6:0]
83625 	 */
83626 		#define CQ_RES_UD_FLAGS_META_FORMAT_HDR_OFFSET  (UINT32_C(0x4) << 6)
83627 		#define CQ_RES_UD_FLAGS_META_FORMAT_LAST	CQ_RES_UD_FLAGS_META_FORMAT_HDR_OFFSET
83628 	/*
83629 	 * The combination of this value and meta_format indicates what
83630 	 * format the metadata field is
83631 	 */
83632 	#define CQ_RES_UD_FLAGS_EXT_META_FORMAT_MASK  UINT32_C(0xc00)
83633 	#define CQ_RES_UD_FLAGS_EXT_META_FORMAT_SFT   10
83634 	uint32_t	src_qp_high_srq_or_rq_wr_id;
83635 	/*
83636 	 * Opaque value from RQ or SRQ WQE. Used by driver/lib to
83637 	 * reference the WQE in order to claim the received data
83638 	 * and reuse the WQE space
83639 	 */
83640 	#define CQ_RES_UD_SRQ_OR_RQ_WR_ID_MASK UINT32_C(0xfffff)
83641 	#define CQ_RES_UD_SRQ_OR_RQ_WR_ID_SFT 0
83642 	/* Upper 8b of the Source QP value from the DETH header. */
83643 	#define CQ_RES_UD_SRC_QP_HIGH_MASK	UINT32_C(0xff000000)
83644 	#define CQ_RES_UD_SRC_QP_HIGH_SFT	24
83645 } cq_res_ud_t, *pcq_res_ud_t;
83646 
83647 /* Responder UD CQE version 2 */
83648 /* cq_res_ud_v2 (size:256b/32B) */
83649 
83650 typedef struct cq_res_ud_v2 {
83651 	uint16_t	length;
83652 	/*
83653 	 * The length of the message's payload in bytes, stored in
83654 	 * the SGEs
83655 	 */
83656 	#define CQ_RES_UD_V2_LENGTH_MASK UINT32_C(0x3fff)
83657 	#define CQ_RES_UD_V2_LENGTH_SFT 0
83658 	/* This is data from the CFA as indicated by the meta_format field. */
83659 	uint16_t	cfa_metadata0;
83660 	/* When meta_format=1, this value is the VLAN VID. */
83661 	#define CQ_RES_UD_V2_CFA_METADATA0_VID_MASK UINT32_C(0xfff)
83662 	#define CQ_RES_UD_V2_CFA_METADATA0_VID_SFT 0
83663 	/* When meta_format=1, this value is the VLAN DE. */
83664 	#define CQ_RES_UD_V2_CFA_METADATA0_DE	UINT32_C(0x1000)
83665 	/* When meta_format=1, this value is the VLAN PRI. */
83666 	#define CQ_RES_UD_V2_CFA_METADATA0_PRI_MASK UINT32_C(0xe000)
83667 	#define CQ_RES_UD_V2_CFA_METADATA0_PRI_SFT 13
83668 	/* Immediate data in case the imm_flag set. */
83669 	uint32_t	imm_data;
83670 	/*
83671 	 * This is an application level ID used to identify the
83672 	 * QP and its SQ and RQ.
83673 	 */
83674 	uint64_t	qp_handle;
83675 	/*
83676 	 * Source MAC address for the UD message placed in the WQE
83677 	 * that is completed by this CQE.
83678 	 */
83679 	uint16_t	src_mac[3];
83680 	/* Lower 16b of the Source QP value from the DETH header. */
83681 	uint16_t	src_qp_low;
83682 	uint8_t	cqe_type_toggle;
83683 	/*
83684 	 * Indicate valid completion - written by the chip. Cumulus
83685 	 * toggle this bit each time it finished consuming all PBL
83686 	 * entries
83687 	 */
83688 	#define CQ_RES_UD_V2_TOGGLE	UINT32_C(0x1)
83689 	/* This field defines the type of CQE. */
83690 	#define CQ_RES_UD_V2_CQE_TYPE_MASK  UINT32_C(0x1e)
83691 	#define CQ_RES_UD_V2_CQE_TYPE_SFT   1
83692 	/*
83693 	 * Responder UD Completion - This is used for both RQ and SRQ
83694 	 * completion for UD service QPs.
83695 	 */
83696 		#define CQ_RES_UD_V2_CQE_TYPE_RES_UD  (UINT32_C(0x2) << 1)
83697 		#define CQ_RES_UD_V2_CQE_TYPE_LAST   CQ_RES_UD_V2_CQE_TYPE_RES_UD
83698 	/* This field indicates the status for the CQE. */
83699 	uint8_t	status;
83700 	/*
83701 	 * This indicates that the completion is without error.
83702 	 * All fields are valid.
83703 	 */
83704 	#define CQ_RES_UD_V2_STATUS_OK			UINT32_C(0x0)
83705 	/*
83706 	 * This indicates that write access was not allowed for
83707 	 * at least one of the SGEs in the WQE.
83708 	 *
83709 	 * This is a fatal error. Only the srq_or_rq_wr_id is field
83710 	 * is valid.
83711 	 */
83712 	#define CQ_RES_UD_V2_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x1)
83713 	/*
83714 	 * This indicates that the packet was too long for the WQE
83715 	 * provided on the SRQ/RQ.
83716 	 *
83717 	 * This is not a fatal error. All the fields are valid.
83718 	 */
83719 	#define CQ_RES_UD_V2_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x2)
83720 	/* LOCAL_PROTECTION_ERR is 3 */
83721 	#define CQ_RES_UD_V2_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x3)
83722 	/* LOCAL_QP_OPERATION_ERR is 4 */
83723 	#define CQ_RES_UD_V2_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
83724 	/* MEMORY_MGT_OPERATION_ERR is 5 */
83725 	#define CQ_RES_UD_V2_STATUS_MEMORY_MGT_OPERATION_ERR UINT32_C(0x5)
83726 	/* WORK_REQUEST_FLUSHED_ERR is 7 */
83727 	#define CQ_RES_UD_V2_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0x7)
83728 	/* HW_FLUSH_ERR is 8 */
83729 	#define CQ_RES_UD_V2_STATUS_HW_FLUSH_ERR		UINT32_C(0x8)
83730 	#define CQ_RES_UD_V2_STATUS_LAST			CQ_RES_UD_V2_STATUS_HW_FLUSH_ERR
83731 	uint16_t	flags;
83732 	/*
83733 	 * This flag indicates that the completion is for a SRQ entry
83734 	 * rather than for an RQ entry.
83735 	 */
83736 	#define CQ_RES_UD_V2_FLAGS_SRQ			UINT32_C(0x1)
83737 	/* CQE relates to RQ WQE. */
83738 		#define CQ_RES_UD_V2_FLAGS_SRQ_RQ		UINT32_C(0x0)
83739 	/* CQE relates to SRQ WQE. */
83740 		#define CQ_RES_UD_V2_FLAGS_SRQ_SRQ		UINT32_C(0x1)
83741 		#define CQ_RES_UD_V2_FLAGS_SRQ_LAST		CQ_RES_UD_V2_FLAGS_SRQ_SRQ
83742 	/* Immediate data indicator */
83743 	#define CQ_RES_UD_V2_FLAGS_IMM			UINT32_C(0x2)
83744 	#define CQ_RES_UD_V2_FLAGS_UNUSED_MASK		UINT32_C(0xc)
83745 	#define CQ_RES_UD_V2_FLAGS_UNUSED_SFT		2
83746 	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_MASK	UINT32_C(0x30)
83747 	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_SFT	4
83748 	/* RoCEv1 Message */
83749 		#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V1	(UINT32_C(0x0) << 4)
83750 	/* RoCEv2 IPv4 Message */
83751 		#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V2IPV4	(UINT32_C(0x2) << 4)
83752 	/* RoCEv2 IPv6 Message */
83753 		#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V2IPV6	(UINT32_C(0x3) << 4)
83754 		#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_LAST	CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V2IPV6
83755 	/* The field indicates what format the metadata field is. */
83756 	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_MASK	UINT32_C(0x3c0)
83757 	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_SFT	6
83758 	/* No metadata information. Value is zero. */
83759 		#define CQ_RES_UD_V2_FLAGS_META_FORMAT_NONE	(UINT32_C(0x0) << 6)
83760 	/*
83761 	 * The {metadata1, metadata0} fields contain the vtag
83762 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
83763 	 * de, vid[11:0]} The metadata2 field contains the table scope
83764 	 * and action record pointer. - metadata2[25:0] contains the
83765 	 * action record pointer. - metadata2[31:26] contains the table
83766 	 * scope.
83767 	 */
83768 		#define CQ_RES_UD_V2_FLAGS_META_FORMAT_ACT_REC_PTR  (UINT32_C(0x1) << 6)
83769 	/*
83770 	 * The {metadata1, metadata0} fields contain the vtag
83771 	 * information:
83772 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
83773 	 * The metadata2 field contains the Tunnel ID
83774 	 * value, justified to LSB. i
83775 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
83776 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
83777 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
83778 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
83779 	 * - IPv4 = 0 (not populated)
83780 	 * - IPv6 = Flow Label[19:0]
83781 	 * - PPPoE = sessionID[15:0]
83782 	 * - MPLs = Outer label[19:0]
83783 	 * - UPAR = Selected[31:0] with bit mask
83784 	 */
83785 		#define CQ_RES_UD_V2_FLAGS_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 6)
83786 	/*
83787 	 * The {metadata1, metadata0} fields contain the vtag
83788 	 * information:
83789 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
83790 	 * The metadata2 field contains the 32b metadata from the
83791 	 * prepended header (chdr_data).
83792 	 */
83793 		#define CQ_RES_UD_V2_FLAGS_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 6)
83794 	/*
83795 	 * If ext_meta_format is equal to 1, the metadata field contains
83796 	 * the outer_l3_offset and lower 7 bits of the inner_l2_offset,
83797 	 * - metadata[8:0] contains the outer_l3_offset.
83798 	 * - metadata[15:9] contains the inner_l2_offset[6:0]
83799 	 */
83800 		#define CQ_RES_UD_V2_FLAGS_META_FORMAT_HDR_OFFSET   (UINT32_C(0x4) << 6)
83801 		#define CQ_RES_UD_V2_FLAGS_META_FORMAT_LAST	CQ_RES_UD_V2_FLAGS_META_FORMAT_HDR_OFFSET
83802 	uint32_t	src_qp_high_srq_or_rq_wr_id;
83803 	/*
83804 	 * Opaque value from RQ or SRQ WQE. Used by driver/lib to
83805 	 * reference the WQE in order to claim the received data
83806 	 * and reuse the WQE space
83807 	 */
83808 	#define CQ_RES_UD_V2_SRQ_OR_RQ_WR_ID_MASK	UINT32_C(0xfffff)
83809 	#define CQ_RES_UD_V2_SRQ_OR_RQ_WR_ID_SFT		0
83810 	#define CQ_RES_UD_V2_CFA_METADATA1_MASK		UINT32_C(0xf00000)
83811 	#define CQ_RES_UD_V2_CFA_METADATA1_SFT		20
83812 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
83813 	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_MASK	UINT32_C(0x700000)
83814 	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_SFT	20
83815 	/* 0x88a8 */
83816 		#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID88A8   (UINT32_C(0x0) << 20)
83817 	/* 0x8100 */
83818 		#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID8100   (UINT32_C(0x1) << 20)
83819 	/* 0x9100 */
83820 		#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID9100   (UINT32_C(0x2) << 20)
83821 	/* 0x9200 */
83822 		#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID9200   (UINT32_C(0x3) << 20)
83823 	/* 0x9300 */
83824 		#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID9300   (UINT32_C(0x4) << 20)
83825 	/* Value programmed in CFA VLANTPID register. */
83826 		#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 20)
83827 		#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_LAST	CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPIDCFG
83828 	/* When meta_format != 0, this value is the VLAN valid. */
83829 	#define CQ_RES_UD_V2_CFA_METADATA1_VALID		UINT32_C(0x800000)
83830 	/* Upper 8b of the Source QP value from the DETH header. */
83831 	#define CQ_RES_UD_V2_SRC_QP_HIGH_MASK		UINT32_C(0xff000000)
83832 	#define CQ_RES_UD_V2_SRC_QP_HIGH_SFT		24
83833 } cq_res_ud_v2_t, *pcq_res_ud_v2_t;
83834 
83835 /* Responder UD with CFA CQE */
83836 /* cq_res_ud_cfa (size:256b/32B) */
83837 
83838 typedef struct cq_res_ud_cfa {
83839 	uint16_t	length;
83840 	/*
83841 	 * The length of the message's payload in bytes, stored in
83842 	 * the SGEs
83843 	 */
83844 	#define CQ_RES_UD_CFA_LENGTH_MASK UINT32_C(0x3fff)
83845 	#define CQ_RES_UD_CFA_LENGTH_SFT 0
83846 	/*
83847 	 * This field identifies the CFA action rule that was used
83848 	 * for this packet.
83849 	 */
83850 	uint16_t	cfa_code;
83851 	/* Immediate data in case the imm_flag set. */
83852 	uint32_t	imm_data;
83853 	uint32_t	qid;
83854 	/*
83855 	 * This value indicates the QPID associated with this operation.
83856 	 * The driver will use the qid from this CQE to map a QP handle
83857 	 * in the completion record returned to the application.
83858 	 */
83859 	#define CQ_RES_UD_CFA_QID_MASK UINT32_C(0xfffff)
83860 	#define CQ_RES_UD_CFA_QID_SFT 0
83861 	/*
83862 	 * This is data from the CFA or VNIC block as indicated by the
83863 	 * ext_meta_format and meta_format fields.
83864 	 */
83865 	uint32_t	cfa_metadata;
83866 	/* When meta_format=1, this value is the VLAN VID. */
83867 	#define CQ_RES_UD_CFA_CFA_METADATA_VID_MASK UINT32_C(0xfff)
83868 	#define CQ_RES_UD_CFA_CFA_METADATA_VID_SFT  0
83869 	/* When meta_format=1, this value is the VLAN DE. */
83870 	#define CQ_RES_UD_CFA_CFA_METADATA_DE	UINT32_C(0x1000)
83871 	/* When meta_format=1, this value is the VLAN PRI. */
83872 	#define CQ_RES_UD_CFA_CFA_METADATA_PRI_MASK UINT32_C(0xe000)
83873 	#define CQ_RES_UD_CFA_CFA_METADATA_PRI_SFT  13
83874 	/* When meta_format=1, this value is the VLAN TPID. */
83875 	#define CQ_RES_UD_CFA_CFA_METADATA_TPID_MASK UINT32_C(0xffff0000)
83876 	#define CQ_RES_UD_CFA_CFA_METADATA_TPID_SFT 16
83877 	/*
83878 	 * Source MAC address for the UD message placed in the WQE
83879 	 * that is completed by this CQE.
83880 	 */
83881 	uint16_t	src_mac[3];
83882 	/* Lower 16b of the Source QP value from the DETH header. */
83883 	uint16_t	src_qp_low;
83884 	uint8_t	cqe_type_toggle;
83885 	/*
83886 	 * Indicate valid completion - written by the chip. Cumulus
83887 	 * toggle this bit each time it finished consuming all PBL
83888 	 * entries
83889 	 */
83890 	#define CQ_RES_UD_CFA_TOGGLE		UINT32_C(0x1)
83891 	/* This field defines the type of CQE. */
83892 	#define CQ_RES_UD_CFA_CQE_TYPE_MASK	UINT32_C(0x1e)
83893 	#define CQ_RES_UD_CFA_CQE_TYPE_SFT	1
83894 	/*
83895 	 * Responder UD Completion with CFA - This is used for both RQ
83896 	 * and SRQ completion for UD service QPs. It includes cfa fields
83897 	 * (some of which carry VLAN information), in place of the QP
83898 	 * handle. It is also used for QP1 QPs that are treated as UD.
83899 	 */
83900 		#define CQ_RES_UD_CFA_CQE_TYPE_RES_UD_CFA  (UINT32_C(0x4) << 1)
83901 		#define CQ_RES_UD_CFA_CQE_TYPE_LAST	CQ_RES_UD_CFA_CQE_TYPE_RES_UD_CFA
83902 	/* This field indicates the status for the CQE. */
83903 	uint8_t	status;
83904 	/*
83905 	 * This indicates that the completion is without error.
83906 	 * All fields are valid.
83907 	 */
83908 	#define CQ_RES_UD_CFA_STATUS_OK			UINT32_C(0x0)
83909 	/*
83910 	 * This indicates that write access was not allowed for
83911 	 * at least one of the SGEs in the WQE.
83912 	 *
83913 	 * This is a fatal error. Only the srq_or_rq_wr_id is field
83914 	 * is valid.
83915 	 */
83916 	#define CQ_RES_UD_CFA_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x1)
83917 	/*
83918 	 * This indicates that the packet was too long for the WQE
83919 	 * provided on the SRQ/RQ.
83920 	 *
83921 	 * This is not a fatal error. All the fields are valid.
83922 	 */
83923 	#define CQ_RES_UD_CFA_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x2)
83924 	/* LOCAL_PROTECTION_ERR is 3 */
83925 	#define CQ_RES_UD_CFA_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x3)
83926 	/* LOCAL_QP_OPERATION_ERR is 4 */
83927 	#define CQ_RES_UD_CFA_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
83928 	/* MEMORY_MGT_OPERATION_ERR is 5 */
83929 	#define CQ_RES_UD_CFA_STATUS_MEMORY_MGT_OPERATION_ERR UINT32_C(0x5)
83930 	/* WORK_REQUEST_FLUSHED_ERR is 7 */
83931 	#define CQ_RES_UD_CFA_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0x7)
83932 	/* HW_FLUSH_ERR is 8 */
83933 	#define CQ_RES_UD_CFA_STATUS_HW_FLUSH_ERR		UINT32_C(0x8)
83934 	#define CQ_RES_UD_CFA_STATUS_LAST			CQ_RES_UD_CFA_STATUS_HW_FLUSH_ERR
83935 	uint16_t	flags;
83936 	/*
83937 	 * This flag indicates that the completion is for a SRQ entry
83938 	 * rather than for an RQ entry.
83939 	 */
83940 	#define CQ_RES_UD_CFA_FLAGS_SRQ		UINT32_C(0x1)
83941 	/* CQE relates to RQ WQE. */
83942 		#define CQ_RES_UD_CFA_FLAGS_SRQ_RQ		UINT32_C(0x0)
83943 	/* CQE relates to SRQ WQE. */
83944 		#define CQ_RES_UD_CFA_FLAGS_SRQ_SRQ		UINT32_C(0x1)
83945 		#define CQ_RES_UD_CFA_FLAGS_SRQ_LAST		CQ_RES_UD_CFA_FLAGS_SRQ_SRQ
83946 	/* Immediate data indicator */
83947 	#define CQ_RES_UD_CFA_FLAGS_IMM		UINT32_C(0x2)
83948 	#define CQ_RES_UD_CFA_FLAGS_UNUSED_MASK	UINT32_C(0xc)
83949 	#define CQ_RES_UD_CFA_FLAGS_UNUSED_SFT		2
83950 	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_MASK	UINT32_C(0x30)
83951 	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_SFT	4
83952 	/* RoCEv1 Message */
83953 		#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V1	(UINT32_C(0x0) << 4)
83954 	/* RoCEv2 IPv4 Message */
83955 		#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V2IPV4	(UINT32_C(0x2) << 4)
83956 	/* RoCEv2 IPv6 Message */
83957 		#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V2IPV6	(UINT32_C(0x3) << 4)
83958 		#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_LAST	CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V2IPV6
83959 	/*
83960 	 * The combination of this value and ext_meta_format indicates
83961 	 * what format the metadata field is.
83962 	 */
83963 	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_MASK	UINT32_C(0x3c0)
83964 	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_SFT	6
83965 	/*
83966 	 * If ext_meta_format is equal to 0, there is no metadata
83967 	 * information. Value is zero.
83968 	 */
83969 		#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_NONE	(UINT32_C(0x0) << 6)
83970 	/*
83971 	 * If ext_meta_format is equal to 0, the metadata field contains
83972 	 * the VLAN tag and TPID value.
83973 	 * - metadata[11:0] contains the vlan VID value.
83974 	 * - metadata[12] contains the vlan DE value.
83975 	 * - metadata[15:13] contains the vlan PRI value.
83976 	 * - metadata[31:16] contains the vlan TPID value.
83977 	 */
83978 		#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_VLAN	(UINT32_C(0x1) << 6)
83979 	/*
83980 	 * If ext_meta_format is equal to 1, the metadata field contains
83981 	 * the Tunnel ID value, justified to LSB.
83982 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
83983 	 * - Geneve (NGE) = VNI[23:0] -> Virtual Network Identifier
83984 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
83985 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K = 0
83986 	 * - IPV4 = 0 (not populated)
83987 	 * - IPV6 = Flow Label[19:0]
83988 	 * - PPPoE = sessionID[15:0]
83989 	 * - MPLs = Outer label[19:0]
83990 	 * - UPAR = Selected[31:0] with bit mask
83991 	 */
83992 		#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_TUNNEL_ID   (UINT32_C(0x2) << 6)
83993 	/*
83994 	 * if ext_meta_format is equal to 1, metadata field contains
83995 	 * 16b metadata from the prepended header (chdr_data).
83996 	 */
83997 		#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_CHDR_DATA   (UINT32_C(0x3) << 6)
83998 	/*
83999 	 * If ext_meta_format is equal to 1, the metadata field contains
84000 	 * the outer_l3_offset, inner_l2_offset, inner_l3_offset, and
84001 	 * inner_l4_size.
84002 	 * - metadata[8:0] contains the outer_l3_offset.
84003 	 * - metadata[17:9] contains the inner_l2_offset.
84004 	 * - metadata[26:18] contains the inner_l3_offset.
84005 	 * - metadata[31:27] contains the inner_l4_size.
84006 	 */
84007 		#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_HDR_OFFSET  (UINT32_C(0x4) << 6)
84008 		#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_LAST	CQ_RES_UD_CFA_FLAGS_META_FORMAT_HDR_OFFSET
84009 	/*
84010 	 * The combination of this value and meta_format indicates what
84011 	 * format the metadata field is
84012 	 */
84013 	#define CQ_RES_UD_CFA_FLAGS_EXT_META_FORMAT_MASK  UINT32_C(0xc00)
84014 	#define CQ_RES_UD_CFA_FLAGS_EXT_META_FORMAT_SFT   10
84015 	uint32_t	src_qp_high_srq_or_rq_wr_id;
84016 	/*
84017 	 * Opaque value from RQ or SRQ WQE. Used by driver/lib to
84018 	 * reference the WQE in order to claim the received data
84019 	 * and reuse the WQE space
84020 	 */
84021 	#define CQ_RES_UD_CFA_SRQ_OR_RQ_WR_ID_MASK UINT32_C(0xfffff)
84022 	#define CQ_RES_UD_CFA_SRQ_OR_RQ_WR_ID_SFT 0
84023 	/* Upper 8b of the Source QP value from the DETH header. */
84024 	#define CQ_RES_UD_CFA_SRC_QP_HIGH_MASK	UINT32_C(0xff000000)
84025 	#define CQ_RES_UD_CFA_SRC_QP_HIGH_SFT	24
84026 } cq_res_ud_cfa_t, *pcq_res_ud_cfa_t;
84027 
84028 /* Responder UD with CFA CQE version 2 */
84029 /* cq_res_ud_cfa_v2 (size:256b/32B) */
84030 
84031 typedef struct cq_res_ud_cfa_v2 {
84032 	uint16_t	length;
84033 	/*
84034 	 * The length of the message's payload in bytes, stored in
84035 	 * the SGEs
84036 	 */
84037 	#define CQ_RES_UD_CFA_V2_LENGTH_MASK UINT32_C(0x3fff)
84038 	#define CQ_RES_UD_CFA_V2_LENGTH_SFT 0
84039 	/* This is data from the CFA as indicated by the meta_format field. */
84040 	uint16_t	cfa_metadata0;
84041 	/* When meta_format=1, this value is the VLAN VID. */
84042 	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_VID_MASK UINT32_C(0xfff)
84043 	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_VID_SFT 0
84044 	/* When meta_format=1, this value is the VLAN DE. */
84045 	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_DE	UINT32_C(0x1000)
84046 	/* When meta_format=1, this value is the VLAN PRI. */
84047 	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_PRI_MASK UINT32_C(0xe000)
84048 	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_PRI_SFT 13
84049 	/* Immediate data in case the imm_flag set. */
84050 	uint32_t	imm_data;
84051 	uint32_t	qid;
84052 	/*
84053 	 * This value indicates the QPID associated with this operation.
84054 	 * The driver will use the qid from this CQE to map a QP handle
84055 	 * in the completion record returned to the application.
84056 	 */
84057 	#define CQ_RES_UD_CFA_V2_QID_MASK UINT32_C(0xfffff)
84058 	#define CQ_RES_UD_CFA_V2_QID_SFT 0
84059 	/*
84060 	 * This is data from the CFA block as indicated by the meta_format
84061 	 * field.
84062 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
84063 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
84064 	 *   act_rec_ptr[25:0]}
84065 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
84066 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
84067 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
84068 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
84069 	 * of the host address from the first BD used to place the packet.
84070 	 */
84071 	uint32_t	cfa_metadata2;
84072 	/*
84073 	 * Source MAC address for the UD message placed in the WQE
84074 	 * that is completed by this CQE.
84075 	 */
84076 	uint16_t	src_mac[3];
84077 	/* Lower 16b of the Source QP value from the DETH header. */
84078 	uint16_t	src_qp_low;
84079 	uint8_t	cqe_type_toggle;
84080 	/*
84081 	 * Indicate valid completion - written by the chip. Cumulus
84082 	 * toggle this bit each time it finished consuming all PBL
84083 	 * entries
84084 	 */
84085 	#define CQ_RES_UD_CFA_V2_TOGGLE		UINT32_C(0x1)
84086 	/* This field defines the type of CQE. */
84087 	#define CQ_RES_UD_CFA_V2_CQE_TYPE_MASK	UINT32_C(0x1e)
84088 	#define CQ_RES_UD_CFA_V2_CQE_TYPE_SFT	1
84089 	/*
84090 	 * Responder UD Completion with CFA - This is used for both RQ
84091 	 * and SRQ completion for UD service QPs. It includes cfa fields
84092 	 * (some of which carry VLAN information), in place of the QP
84093 	 * handle. It is also used for QP1 QPs that are treated as UD.
84094 	 */
84095 		#define CQ_RES_UD_CFA_V2_CQE_TYPE_RES_UD_CFA  (UINT32_C(0x4) << 1)
84096 		#define CQ_RES_UD_CFA_V2_CQE_TYPE_LAST	CQ_RES_UD_CFA_V2_CQE_TYPE_RES_UD_CFA
84097 	/* This field indicates the status for the CQE. */
84098 	uint8_t	status;
84099 	/*
84100 	 * This indicates that the completion is without error.
84101 	 * All fields are valid.
84102 	 */
84103 	#define CQ_RES_UD_CFA_V2_STATUS_OK			UINT32_C(0x0)
84104 	/*
84105 	 * This indicates that write access was not allowed for
84106 	 * at least one of the SGEs in the WQE.
84107 	 *
84108 	 * This is a fatal error. Only the srq_or_rq_wr_id is field
84109 	 * is valid.
84110 	 */
84111 	#define CQ_RES_UD_CFA_V2_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x1)
84112 	/*
84113 	 * This indicates that the packet was too long for the WQE
84114 	 * provided on the SRQ/RQ.
84115 	 *
84116 	 * This is not a fatal error. All the fields are valid.
84117 	 */
84118 	#define CQ_RES_UD_CFA_V2_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x2)
84119 	/* LOCAL_PROTECTION_ERR is 3 */
84120 	#define CQ_RES_UD_CFA_V2_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x3)
84121 	/* LOCAL_QP_OPERATION_ERR is 4 */
84122 	#define CQ_RES_UD_CFA_V2_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
84123 	/* MEMORY_MGT_OPERATION_ERR is 5 */
84124 	#define CQ_RES_UD_CFA_V2_STATUS_MEMORY_MGT_OPERATION_ERR UINT32_C(0x5)
84125 	/* WORK_REQUEST_FLUSHED_ERR is 7 */
84126 	#define CQ_RES_UD_CFA_V2_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0x7)
84127 	/* HW_FLUSH_ERR is 8 */
84128 	#define CQ_RES_UD_CFA_V2_STATUS_HW_FLUSH_ERR		UINT32_C(0x8)
84129 	#define CQ_RES_UD_CFA_V2_STATUS_LAST			CQ_RES_UD_CFA_V2_STATUS_HW_FLUSH_ERR
84130 	uint16_t	flags;
84131 	/*
84132 	 * This flag indicates that the completion is for a SRQ entry
84133 	 * rather than for an RQ entry.
84134 	 */
84135 	#define CQ_RES_UD_CFA_V2_FLAGS_SRQ			UINT32_C(0x1)
84136 	/* CQE relates to RQ WQE. */
84137 		#define CQ_RES_UD_CFA_V2_FLAGS_SRQ_RQ		UINT32_C(0x0)
84138 	/* CQE relates to SRQ WQE. */
84139 		#define CQ_RES_UD_CFA_V2_FLAGS_SRQ_SRQ		UINT32_C(0x1)
84140 		#define CQ_RES_UD_CFA_V2_FLAGS_SRQ_LAST		CQ_RES_UD_CFA_V2_FLAGS_SRQ_SRQ
84141 	/* Immediate data indicator */
84142 	#define CQ_RES_UD_CFA_V2_FLAGS_IMM			UINT32_C(0x2)
84143 	#define CQ_RES_UD_CFA_V2_FLAGS_UNUSED_MASK		UINT32_C(0xc)
84144 	#define CQ_RES_UD_CFA_V2_FLAGS_UNUSED_SFT		2
84145 	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_MASK	UINT32_C(0x30)
84146 	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_SFT	4
84147 	/* RoCEv1 Message */
84148 		#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V1	(UINT32_C(0x0) << 4)
84149 	/* RoCEv2 IPv4 Message */
84150 		#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V2IPV4	(UINT32_C(0x2) << 4)
84151 	/* RoCEv2 IPv6 Message */
84152 		#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V2IPV6	(UINT32_C(0x3) << 4)
84153 		#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_LAST	CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V2IPV6
84154 	/* The field indicates what format the metadata field is. */
84155 	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_MASK	UINT32_C(0x3c0)
84156 	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_SFT	6
84157 	/* No metadata information. Value is zero. */
84158 		#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_NONE	(UINT32_C(0x0) << 6)
84159 	/*
84160 	 * The {metadata1, metadata0} fields contain the vtag
84161 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
84162 	 * de, vid[11:0]} The metadata2 field contains the table scope
84163 	 * and action record pointer. - metadata2[25:0] contains the
84164 	 * action record pointer. - metadata2[31:26] contains the table
84165 	 * scope.
84166 	 */
84167 		#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_ACT_REC_PTR  (UINT32_C(0x1) << 6)
84168 	/*
84169 	 * The {metadata1, metadata0} fields contain the vtag
84170 	 * information:
84171 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
84172 	 * The metadata2 field contains the Tunnel ID
84173 	 * value, justified to LSB. i
84174 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
84175 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
84176 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
84177 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
84178 	 * - IPv4 = 0 (not populated)
84179 	 * - IPv6 = Flow Label[19:0]
84180 	 * - PPPoE = sessionID[15:0]
84181 	 * - MPLs = Outer label[19:0]
84182 	 * - UPAR = Selected[31:0] with bit mask
84183 	 */
84184 		#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 6)
84185 	/*
84186 	 * The {metadata1, metadata0} fields contain the vtag
84187 	 * information:
84188 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
84189 	 * The metadata2 field contains the 32b metadata from the
84190 	 * prepended header (chdr_data).
84191 	 */
84192 		#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 6)
84193 	/*
84194 	 * If ext_meta_format is equal to 1, the metadata field contains
84195 	 * the outer_l3_offset and lower 7 bits of the inner_l2_offset,
84196 	 * - metadata[8:0] contains the outer_l3_offset.
84197 	 * - metadata[15:9] contains the inner_l2_offset[6:0]
84198 	 */
84199 		#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_HDR_OFFSET   (UINT32_C(0x4) << 6)
84200 		#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_LAST	CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_HDR_OFFSET
84201 	uint32_t	src_qp_high_srq_or_rq_wr_id;
84202 	/*
84203 	 * Opaque value from RQ or SRQ WQE. Used by driver/lib to
84204 	 * reference the WQE in order to claim the received data
84205 	 * and reuse the WQE space
84206 	 */
84207 	#define CQ_RES_UD_CFA_V2_SRQ_OR_RQ_WR_ID_MASK	UINT32_C(0xfffff)
84208 	#define CQ_RES_UD_CFA_V2_SRQ_OR_RQ_WR_ID_SFT		0
84209 	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_MASK		UINT32_C(0xf00000)
84210 	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_SFT		20
84211 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
84212 	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_MASK	UINT32_C(0x700000)
84213 	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_SFT	20
84214 	/* 0x88a8 */
84215 		#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID88A8   (UINT32_C(0x0) << 20)
84216 	/* 0x8100 */
84217 		#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID8100   (UINT32_C(0x1) << 20)
84218 	/* 0x9100 */
84219 		#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID9100   (UINT32_C(0x2) << 20)
84220 	/* 0x9200 */
84221 		#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID9200   (UINT32_C(0x3) << 20)
84222 	/* 0x9300 */
84223 		#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID9300   (UINT32_C(0x4) << 20)
84224 	/* Value programmed in CFA VLANTPID register. */
84225 		#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 20)
84226 		#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_LAST	CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPIDCFG
84227 	/* When meta_format != 0, this value is the VLAN valid. */
84228 	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_VALID		UINT32_C(0x800000)
84229 	/* Upper 8b of the Source QP value from the DETH header. */
84230 	#define CQ_RES_UD_CFA_V2_SRC_QP_HIGH_MASK		UINT32_C(0xff000000)
84231 	#define CQ_RES_UD_CFA_V2_SRC_QP_HIGH_SFT		24
84232 } cq_res_ud_cfa_v2_t, *pcq_res_ud_cfa_v2_t;
84233 
84234 /* Responder RawEth and QP1 CQE */
84235 /* cq_res_raweth_qp1 (size:256b/32B) */
84236 
84237 typedef struct cq_res_raweth_qp1 {
84238 	uint16_t	length;
84239 	/*
84240 	 * The length of the message's payload in bytes, stored in
84241 	 * the SGEs
84242 	 */
84243 	#define CQ_RES_RAWETH_QP1_LENGTH_MASK UINT32_C(0x3fff)
84244 	#define CQ_RES_RAWETH_QP1_LENGTH_SFT 0
84245 	uint16_t	raweth_qp1_flags;
84246 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_MASK		UINT32_C(0x3ff)
84247 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_SFT		0
84248 	/*
84249 	 * When this bit is '1', it indicates a packet that has an
84250 	 * error of some type. Type of error is indicated in
84251 	 * raweth_qp1_errors.
84252 	 */
84253 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ERROR		UINT32_C(0x1)
84254 	/*
84255 	 * This value indicates what the inner packet determined for the
84256 	 * packet was.
84257 	 */
84258 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_MASK		UINT32_C(0x3c0)
84259 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_SFT		6
84260 	/*
84261 	 * Not Known:
84262 	 * Indicates that the packet type was not known.
84263 	 */
84264 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_NOT_KNOWN	(UINT32_C(0x0) << 6)
84265 	/*
84266 	 * IP Packet:
84267 	 * Indicates that the packet was an IP packet, but further
84268 	 * classification was not possible.
84269 	 */
84270 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_IP		(UINT32_C(0x1) << 6)
84271 	/*
84272 	 * TCP Packet:
84273 	 * Indicates that the packet was IP and TCP.
84274 	 * This indicates that the raweth_qp1_payload_offset field is
84275 	 * valid.
84276 	 */
84277 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 6)
84278 	/*
84279 	 * UDP Packet:
84280 	 * Indicates that the packet was IP and UDP.
84281 	 * This indicates that the raweth_qp1_payload_offset field is
84282 	 * valid.
84283 	 */
84284 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_UDP		(UINT32_C(0x3) << 6)
84285 	/*
84286 	 * FCoE Packet:
84287 	 * Indicates that the packet was recognized as a FCoE.
84288 	 * This also indicates that the raweth_qp1_payload_offset field
84289 	 * is valid.
84290 	 */
84291 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_FCOE		(UINT32_C(0x4) << 6)
84292 	/*
84293 	 * RoCE Packet:
84294 	 * Indicates that the packet was recognized as a RoCE.
84295 	 * This also indicates that the raweth_qp1_payload_offset field
84296 	 * is valid.
84297 	 */
84298 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ROCE		(UINT32_C(0x5) << 6)
84299 	/*
84300 	 * ICMP Packet:
84301 	 * Indicates that the packet was recognized as ICMP.
84302 	 * This indicates that the raweth_qp1_payload_offset field is
84303 	 * valid.
84304 	 */
84305 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ICMP		(UINT32_C(0x7) << 6)
84306 	/*
84307 	 * PtP packet wo/timestamp:
84308 	 * Indicates that the packet was recognized as a PtP
84309 	 * packet.
84310 	 */
84311 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_WO_TIMESTAMP   (UINT32_C(0x8) << 6)
84312 	/*
84313 	 * PtP packet w/timestamp:
84314 	 * Indicates that the packet was recognized as a PtP
84315 	 * packet and that a timestamp was taken for the packet.
84316 	 */
84317 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP	(UINT32_C(0x9) << 6)
84318 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_LAST		CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP
84319 	uint16_t	raweth_qp1_errors;
84320 	/*
84321 	 * This indicates that there was an error in the IP header
84322 	 * checksum.
84323 	 */
84324 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_IP_CS_ERROR			UINT32_C(0x10)
84325 	/*
84326 	 * This indicates that there was an error in the TCP, UDP
84327 	 * or ICMP checksum.
84328 	 */
84329 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_L4_CS_ERROR			UINT32_C(0x20)
84330 	/*
84331 	 * This indicates that there was an error in the tunnel
84332 	 * IP header checksum.
84333 	 */
84334 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_IP_CS_ERROR			UINT32_C(0x40)
84335 	/*
84336 	 * This indicates that there was an error in the tunnel
84337 	 * UDP checksum.
84338 	 */
84339 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_L4_CS_ERROR			UINT32_C(0x80)
84340 	/*
84341 	 * This indicates that there was a CRC error on either an FCoE
84342 	 * or RoCE packet. The itype indicates the packet type.
84343 	 */
84344 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_CRC_ERROR			UINT32_C(0x100)
84345 	/*
84346 	 * This indicates that there was an error in the tunnel
84347 	 * portion of the packet when this
84348 	 * field is non-zero.
84349 	 */
84350 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_MASK		UINT32_C(0xe00)
84351 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_SFT		9
84352 	/*
84353 	 * No additional error occurred on the tunnel portion
84354 	 * of the packet of the packet does not have a tunnel.
84355 	 */
84356 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 9)
84357 	/*
84358 	 * Indicates that IP header version does not match
84359 	 * expectation from L2 Ethertype for IPv4 and IPv6
84360 	 * in the tunnel header.
84361 	 */
84362 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION	(UINT32_C(0x1) << 9)
84363 	/*
84364 	 * Indicates that header length is out of range in the
84365 	 * tunnel header. Valid for
84366 	 * IPv4.
84367 	 */
84368 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 9)
84369 	/*
84370 	 * Indicates that the physical packet is shorter than that
84371 	 * claimed by the PPPoE header length for a tunnel PPPoE
84372 	 * packet.
84373 	 */
84374 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR	(UINT32_C(0x3) << 9)
84375 	/*
84376 	 * Indicates that physical packet is shorter than that claimed
84377 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6
84378 	 * tunnel packet packets.
84379 	 */
84380 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR	(UINT32_C(0x4) << 9)
84381 	/*
84382 	 * Indicates that the physical packet is shorter than that
84383 	 * claimed by the tunnel UDP header length for a tunnel
84384 	 * UDP packet that is not fragmented.
84385 	 */
84386 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR	(UINT32_C(0x5) << 9)
84387 	/*
84388 	 * indicates that the IPv4 TTL or IPv6 hop limit check
84389 	 * have failed (e.g. TTL = 0) in the tunnel header. Valid
84390 	 * for IPv4, and IPv6.
84391 	 */
84392 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL		(UINT32_C(0x6) << 9)
84393 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_LAST		CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL
84394 	/*
84395 	 * This indicates that there was an error in the inner
84396 	 * portion of the packet when this
84397 	 * field is non-zero.
84398 	 */
84399 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_MASK			UINT32_C(0xf000)
84400 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_SFT			12
84401 	/*
84402 	 * No additional error occurred on the tunnel portion
84403 	 * of the packet of the packet does not have a tunnel.
84404 	 */
84405 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 12)
84406 	/*
84407 	 * Indicates that IP header version does not match
84408 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
84409 	 * option other than VFT was parsed on
84410 	 * FCoE packet.
84411 	 */
84412 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_VERSION		(UINT32_C(0x1) << 12)
84413 	/*
84414 	 * indicates that header length is out of range. Valid for
84415 	 * IPv4 and RoCE
84416 	 */
84417 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN		(UINT32_C(0x2) << 12)
84418 	/*
84419 	 * indicates that the IPv4 TTL or IPv6 hop limit check
84420 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
84421 	 */
84422 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_TTL		(UINT32_C(0x3) << 12)
84423 	/*
84424 	 * Indicates that physical packet is shorter than that
84425 	 * claimed by the l3 header length. Valid for IPv4,
84426 	 * IPv6 packet or RoCE packets.
84427 	 */
84428 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_IP_TOTAL_ERROR		(UINT32_C(0x4) << 12)
84429 	/*
84430 	 * Indicates that the physical packet is shorter than that
84431 	 * claimed by the UDP header length for a UDP packet that is
84432 	 * not fragmented.
84433 	 */
84434 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR	(UINT32_C(0x5) << 12)
84435 	/*
84436 	 * Indicates that TCP header length > IP payload. Valid for
84437 	 * TCP packets only.
84438 	 */
84439 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN		(UINT32_C(0x6) << 12)
84440 	/* Indicates that TCP header length < 5. Valid for TCP. */
84441 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL  (UINT32_C(0x7) << 12)
84442 	/*
84443 	 * Indicates that TCP option headers result in a TCP header
84444 	 * size that does not match data offset in TCP header. Valid
84445 	 * for TCP.
84446 	 */
84447 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN		(UINT32_C(0x8) << 12)
84448 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_LAST			CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
84449 	/*
84450 	 * This field identifies the CFA action rule that was used for this
84451 	 * packet.
84452 	 */
84453 	uint16_t	raweth_qp1_cfa_code;
84454 	/*
84455 	 * This is an application level ID used to identify the
84456 	 * QP and its SQ and RQ.
84457 	 */
84458 	uint64_t	qp_handle;
84459 	uint32_t	raweth_qp1_flags2;
84460 	/*
84461 	 * This indicates that the ip checksum was calculated for the
84462 	 * inner packet and that the ip_cs_error field indicates if there
84463 	 * was an error.
84464 	 */
84465 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_CS_CALC		UINT32_C(0x1)
84466 	/*
84467 	 * This indicates that the TCP, UDP or ICMP checksum was
84468 	 * calculated for the inner packet and that the l4_cs_error field
84469 	 * indicates if there was an error.
84470 	 */
84471 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_L4_CS_CALC		UINT32_C(0x2)
84472 	/*
84473 	 * This indicates that the ip checksum was calculated for the
84474 	 * tunnel header and that the t_ip_cs_error field indicates if
84475 	 * there was an error.
84476 	 */
84477 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_T_IP_CS_CALC		UINT32_C(0x4)
84478 	/*
84479 	 * This indicates that the UDP checksum was
84480 	 * calculated for the tunnel packet and that the t_l4_cs_error
84481 	 * field indicates if there was an error.
84482 	 */
84483 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_T_L4_CS_CALC		UINT32_C(0x8)
84484 	/*
84485 	 * This value indicates what format the raweth_qp1_metadata field
84486 	 * is.
84487 	 */
84488 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
84489 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_SFT		4
84490 	/* No metadata information. Value is zero. */
84491 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
84492 	/*
84493 	 * The raweth_qp1_metadata field contains the VLAN tag and TPID
84494 	 * value.
84495 	 * - raweth_qp1_metadata[11:0] contains the vlan VID value.
84496 	 * - raweth_qp1_metadata[12] contains the vlan DE value.
84497 	 * - raweth_qp1_metadata[15:13] contains the vlan PRI value.
84498 	 * - raweth_qp1_metadata[31:16] contains the vlan TPID value.
84499 	 */
84500 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_VLAN		(UINT32_C(0x1) << 4)
84501 	/*
84502 	 * If ext_meta_format is equal to 1, the metadata field
84503 	 * contains the lower 16b of the tunnel ID value, justified
84504 	 * to LSB
84505 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
84506 	 * - Geneve (NGE) = VNI[23:0] -> Virtual Network Identifier.
84507 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
84508 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K = 0
84509 	 * - IPV4 = 0 (not populated)
84510 	 * - IPV6 = Flow Label[19:0]
84511 	 * - PPPoE = sessionID[15:0]
84512 	 * - MPLs = Outer label[19:0]
84513 	 * - UPAR = Selected[31:0] with bit mask
84514 	 */
84515 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
84516 	/*
84517 	 * if ext_meta_format is equal to 1, metadata field contains
84518 	 * 16b metadata from the prepended header (chdr_data).
84519 	 */
84520 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
84521 	/*
84522 	 * If ext_meta_format is equal to 1, the metadata field contains
84523 	 * the outer_l3_offset and lower 7 bits of the inner_l2_offset,
84524 	 * - metadata[8:0] contains the outer_l3_offset.
84525 	 * - metadata[15:9] contains the inner_l2_offset[6:0]
84526 	 */
84527 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
84528 		#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_LAST		CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET
84529 	/*
84530 	 * This field indicates the IP type for the inner-most IP header.
84531 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
84532 	 * This value is only valid if itype indicates a packet
84533 	 * with an IP header.
84534 	 */
84535 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_TYPE			UINT32_C(0x100)
84536 	/*
84537 	 * This indicates that the complete 1's complement checksum was
84538 	 * calculated for the packet.
84539 	 */
84540 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
84541 	/*
84542 	 * The combination of this value and meta_format indicated what
84543 	 * format the metadata field is.
84544 	 */
84545 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_EXT_META_FORMAT_MASK	UINT32_C(0xc00)
84546 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_EXT_META_FORMAT_SFT	10
84547 	/*
84548 	 * This value is the complete 1's complement checksum calculated
84549 	 * from the start of the outer L3 header to the end of the packet
84550 	 * (not including the ethernet crc). It is valid when the
84551 	 * 'complete_checksum_calc' flag is set.
84552 	 */
84553 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
84554 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_SFT	16
84555 	/*
84556 	 * This is data from the CFA block as indicated by the meta_format
84557 	 * field.
84558 	 */
84559 	uint32_t	raweth_qp1_metadata;
84560 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_DE_VID_MASK	UINT32_C(0xffff)
84561 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_DE_VID_SFT	0
84562 	/* When meta_format=1, this value is the VLAN VID. */
84563 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_VID_MASK	UINT32_C(0xfff)
84564 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_VID_SFT		0
84565 	/* When meta_format=1, this value is the VLAN DE. */
84566 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_DE		UINT32_C(0x1000)
84567 	/* When meta_format=1, this value is the VLAN PRI. */
84568 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_MASK	UINT32_C(0xe000)
84569 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_SFT		13
84570 	/* When meta_format=1, this value is the VLAN TPID. */
84571 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_TPID_MASK	UINT32_C(0xffff0000)
84572 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_TPID_SFT	16
84573 	uint8_t	cqe_type_toggle;
84574 	/*
84575 	 * Indicate valid completion - written by the chip. Cumulus
84576 	 * toggle this bit each time it finished consuming all PBL
84577 	 * entries
84578 	 */
84579 	#define CQ_RES_RAWETH_QP1_TOGGLE		UINT32_C(0x1)
84580 	/* This field defines the type of CQE. */
84581 	#define CQ_RES_RAWETH_QP1_CQE_TYPE_MASK	UINT32_C(0x1e)
84582 	#define CQ_RES_RAWETH_QP1_CQE_TYPE_SFT	1
84583 	/*
84584 	 * Responder RawEth and QP1 Completion - This is used for RQ
84585 	 * completion for RawEth service and QP1 service QPs.
84586 	 */
84587 		#define CQ_RES_RAWETH_QP1_CQE_TYPE_RES_RAWETH_QP1  (UINT32_C(0x3) << 1)
84588 		#define CQ_RES_RAWETH_QP1_CQE_TYPE_LAST	CQ_RES_RAWETH_QP1_CQE_TYPE_RES_RAWETH_QP1
84589 	/* This field indicates the status for the CQE. */
84590 	uint8_t	status;
84591 	/*
84592 	 * This indicates that the completion is without error.
84593 	 * All fields are valid.
84594 	 */
84595 	#define CQ_RES_RAWETH_QP1_STATUS_OK			UINT32_C(0x0)
84596 	/*
84597 	 * This indicates that write access was not allowed for
84598 	 * at least one of the SGEs in the WQE.
84599 	 *
84600 	 * This is a fatal error. Only the srq_or_rq_wr_id is field
84601 	 * is valid.
84602 	 */
84603 	#define CQ_RES_RAWETH_QP1_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x1)
84604 	/*
84605 	 * This indicates that the packet was too long for the WQE
84606 	 * provided on the RQ.
84607 	 *
84608 	 * This is not a fatal error. All the fields are valid.
84609 	 */
84610 	#define CQ_RES_RAWETH_QP1_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x2)
84611 	/* LOCAL_PROTECTION_ERR is 3 */
84612 	#define CQ_RES_RAWETH_QP1_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x3)
84613 	/* LOCAL_QP_OPERATION_ERR is 4 */
84614 	#define CQ_RES_RAWETH_QP1_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
84615 	/* MEMORY_MGT_OPERATION_ERR is 5 */
84616 	#define CQ_RES_RAWETH_QP1_STATUS_MEMORY_MGT_OPERATION_ERR UINT32_C(0x5)
84617 	/* WORK_REQUEST_FLUSHED_ERR is 7 */
84618 	#define CQ_RES_RAWETH_QP1_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0x7)
84619 	/* HW_FLUSH_ERR is 8 */
84620 	#define CQ_RES_RAWETH_QP1_STATUS_HW_FLUSH_ERR		UINT32_C(0x8)
84621 	#define CQ_RES_RAWETH_QP1_STATUS_LAST			CQ_RES_RAWETH_QP1_STATUS_HW_FLUSH_ERR
84622 	uint16_t	flags;
84623 	/*
84624 	 * This flag indicates that the completion is for a SRQ entry
84625 	 * rather than for an RQ entry.
84626 	 */
84627 	#define CQ_RES_RAWETH_QP1_FLAGS_SRQ	UINT32_C(0x1)
84628 	/* CQE relates to RQ WQE. */
84629 		#define CQ_RES_RAWETH_QP1_FLAGS_SRQ_RQ	UINT32_C(0x0)
84630 	/* CQE relates to SRQ WQE. */
84631 		#define CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ   UINT32_C(0x1)
84632 		#define CQ_RES_RAWETH_QP1_FLAGS_SRQ_LAST CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ
84633 	uint32_t	raweth_qp1_payload_offset_srq_or_rq_wr_id;
84634 	/*
84635 	 * Opaque value from RQ or SRQ WQE. Used by driver/lib to
84636 	 * reference the WQE in order to claim the received data
84637 	 * and reuse the WQE space
84638 	 */
84639 	#define CQ_RES_RAWETH_QP1_SRQ_OR_RQ_WR_ID_MASK	UINT32_C(0xfffff)
84640 	#define CQ_RES_RAWETH_QP1_SRQ_OR_RQ_WR_ID_SFT	0
84641 	/*
84642 	 * This value indicates the offset in bytes from the beginning of the
84643 	 * packet where the inner payload starts. This value is valid for
84644 	 * TCP, UDP, FCoE, and RoCE packets.
84645 	 * A value of zero indicates an offset of 256 bytes.
84646 	 */
84647 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_PAYLOAD_OFFSET_MASK UINT32_C(0xff000000)
84648 	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_PAYLOAD_OFFSET_SFT 24
84649 } cq_res_raweth_qp1_t, *pcq_res_raweth_qp1_t;
84650 
84651 /* Responder RawEth and QP1 CQE version 2 */
84652 /* cq_res_raweth_qp1_v2 (size:256b/32B) */
84653 
84654 typedef struct cq_res_raweth_qp1_v2 {
84655 	uint16_t	length;
84656 	/*
84657 	 * The length of the message's payload in bytes, stored in
84658 	 * the SGEs
84659 	 */
84660 	#define CQ_RES_RAWETH_QP1_V2_LENGTH_MASK UINT32_C(0x3fff)
84661 	#define CQ_RES_RAWETH_QP1_V2_LENGTH_SFT 0
84662 	uint16_t	raweth_qp1_flags;
84663 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_MASK		UINT32_C(0x3ff)
84664 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_SFT		0
84665 	/*
84666 	 * When this bit is '1', it indicates a packet that has an
84667 	 * error of some type. Type of error is indicated in
84668 	 * raweth_qp1_errors.
84669 	 */
84670 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ERROR		UINT32_C(0x1)
84671 	/*
84672 	 * This value indicates what the inner packet determined for the
84673 	 * packet was.
84674 	 */
84675 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_MASK		UINT32_C(0x3c0)
84676 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_SFT		6
84677 	/*
84678 	 * Not Known:
84679 	 * Indicates that the packet type was not known.
84680 	 */
84681 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_NOT_KNOWN	(UINT32_C(0x0) << 6)
84682 	/*
84683 	 * IP Packet:
84684 	 * Indicates that the packet was an IP packet, but further
84685 	 * classification was not possible.
84686 	 */
84687 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_IP		(UINT32_C(0x1) << 6)
84688 	/*
84689 	 * TCP Packet:
84690 	 * Indicates that the packet was IP and TCP.
84691 	 * This indicates that the raweth_qp1_payload_offset field is
84692 	 * valid.
84693 	 */
84694 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_TCP		(UINT32_C(0x2) << 6)
84695 	/*
84696 	 * UDP Packet:
84697 	 * Indicates that the packet was IP and UDP.
84698 	 * This indicates that the raweth_qp1_payload_offset field is
84699 	 * valid.
84700 	 */
84701 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_UDP		(UINT32_C(0x3) << 6)
84702 	/*
84703 	 * FCoE Packet:
84704 	 * Indicates that the packet was recognized as a FCoE.
84705 	 * This also indicates that the raweth_qp1_payload_offset field
84706 	 * is valid.
84707 	 */
84708 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_FCOE		(UINT32_C(0x4) << 6)
84709 	/*
84710 	 * RoCE Packet:
84711 	 * Indicates that the packet was recognized as a RoCE.
84712 	 * This also indicates that the raweth_qp1_payload_offset field
84713 	 * is valid.
84714 	 */
84715 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_ROCE		(UINT32_C(0x5) << 6)
84716 	/*
84717 	 * ICMP Packet:
84718 	 * Indicates that the packet was recognized as ICMP.
84719 	 * This indicates that the raweth_qp1_payload_offset field is
84720 	 * valid.
84721 	 */
84722 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_ICMP		(UINT32_C(0x7) << 6)
84723 	/*
84724 	 * PtP packet wo/timestamp:
84725 	 * Indicates that the packet was recognized as a PtP
84726 	 * packet.
84727 	 */
84728 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_PTP_WO_TIMESTAMP   (UINT32_C(0x8) << 6)
84729 	/*
84730 	 * PtP packet w/timestamp:
84731 	 * Indicates that the packet was recognized as a PtP
84732 	 * packet and that a timestamp was taken for the packet.
84733 	 */
84734 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP	(UINT32_C(0x9) << 6)
84735 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_LAST		CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP
84736 	uint16_t	raweth_qp1_errors;
84737 	/*
84738 	 * This indicates that there was an error in the IP header
84739 	 * checksum.
84740 	 */
84741 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_IP_CS_ERROR			UINT32_C(0x10)
84742 	/*
84743 	 * This indicates that there was an error in the TCP, UDP
84744 	 * or ICMP checksum.
84745 	 */
84746 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_L4_CS_ERROR			UINT32_C(0x20)
84747 	/*
84748 	 * This indicates that there was an error in the tunnel
84749 	 * IP header checksum.
84750 	 */
84751 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_IP_CS_ERROR			UINT32_C(0x40)
84752 	/*
84753 	 * This indicates that there was an error in the tunnel
84754 	 * UDP checksum.
84755 	 */
84756 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_L4_CS_ERROR			UINT32_C(0x80)
84757 	/*
84758 	 * This indicates that there was a CRC error on either an FCoE
84759 	 * or RoCE packet. The itype indicates the packet type.
84760 	 */
84761 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_CRC_ERROR			UINT32_C(0x100)
84762 	/*
84763 	 * This indicates that there was an error in the tunnel
84764 	 * portion of the packet when this
84765 	 * field is non-zero.
84766 	 */
84767 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_MASK		UINT32_C(0xe00)
84768 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_SFT		9
84769 	/*
84770 	 * No additional error occurred on the tunnel portion
84771 	 * of the packet of the packet does not have a tunnel.
84772 	 */
84773 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 9)
84774 	/*
84775 	 * Indicates that IP header version does not match
84776 	 * expectation from L2 Ethertype for IPv4 and IPv6
84777 	 * in the tunnel header.
84778 	 */
84779 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION	(UINT32_C(0x1) << 9)
84780 	/*
84781 	 * Indicates that header length is out of range in the
84782 	 * tunnel header. Valid for
84783 	 * IPv4.
84784 	 */
84785 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 9)
84786 	/*
84787 	 * Indicates that the physical packet is shorter than that
84788 	 * claimed by the PPPoE header length for a tunnel PPPoE
84789 	 * packet.
84790 	 */
84791 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR	(UINT32_C(0x3) << 9)
84792 	/*
84793 	 * Indicates that physical packet is shorter than that claimed
84794 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6
84795 	 * tunnel packet packets.
84796 	 */
84797 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR	(UINT32_C(0x4) << 9)
84798 	/*
84799 	 * Indicates that the physical packet is shorter than that
84800 	 * claimed by the tunnel UDP header length for a tunnel
84801 	 * UDP packet that is not fragmented.
84802 	 */
84803 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR	(UINT32_C(0x5) << 9)
84804 	/*
84805 	 * indicates that the IPv4 TTL or IPv6 hop limit check
84806 	 * have failed (e.g. TTL = 0) in the tunnel header. Valid
84807 	 * for IPv4, and IPv6.
84808 	 */
84809 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL		(UINT32_C(0x6) << 9)
84810 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_LAST		CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL
84811 	/*
84812 	 * This indicates that there was an error in the inner
84813 	 * portion of the packet when this
84814 	 * field is non-zero.
84815 	 */
84816 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_MASK			UINT32_C(0xf000)
84817 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_SFT			12
84818 	/*
84819 	 * No additional error occurred on the tunnel portion
84820 	 * of the packet of the packet does not have a tunnel.
84821 	 */
84822 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 12)
84823 	/*
84824 	 * Indicates that IP header version does not match
84825 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
84826 	 * option other than VFT was parsed on
84827 	 * FCoE packet.
84828 	 */
84829 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_VERSION		(UINT32_C(0x1) << 12)
84830 	/*
84831 	 * indicates that header length is out of range. Valid for
84832 	 * IPv4 and RoCE
84833 	 */
84834 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN		(UINT32_C(0x2) << 12)
84835 	/*
84836 	 * indicates that the IPv4 TTL or IPv6 hop limit check
84837 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
84838 	 */
84839 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_TTL		(UINT32_C(0x3) << 12)
84840 	/*
84841 	 * Indicates that physical packet is shorter than that
84842 	 * claimed by the l3 header length. Valid for IPv4,
84843 	 * IPv6 packet or RoCE packets.
84844 	 */
84845 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_IP_TOTAL_ERROR		(UINT32_C(0x4) << 12)
84846 	/*
84847 	 * Indicates that the physical packet is shorter than that
84848 	 * claimed by the UDP header length for a UDP packet that is
84849 	 * not fragmented.
84850 	 */
84851 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR	(UINT32_C(0x5) << 12)
84852 	/*
84853 	 * Indicates that TCP header length > IP payload. Valid for
84854 	 * TCP packets only.
84855 	 */
84856 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN		(UINT32_C(0x6) << 12)
84857 	/* Indicates that TCP header length < 5. Valid for TCP. */
84858 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL  (UINT32_C(0x7) << 12)
84859 	/*
84860 	 * Indicates that TCP option headers result in a TCP header
84861 	 * size that does not match data offset in TCP header. Valid
84862 	 * for TCP.
84863 	 */
84864 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN		(UINT32_C(0x8) << 12)
84865 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_LAST			CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
84866 	/* This is data from the CFA as indicated by the meta_format field. */
84867 	uint16_t	cfa_metadata0;
84868 	/* When meta_format=1, this value is the VLAN VID. */
84869 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_VID_MASK UINT32_C(0xfff)
84870 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_VID_SFT 0
84871 	/* When meta_format=1, this value is the VLAN DE. */
84872 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_DE	UINT32_C(0x1000)
84873 	/* When meta_format=1, this value is the VLAN PRI. */
84874 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_PRI_MASK UINT32_C(0xe000)
84875 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_PRI_SFT 13
84876 	/*
84877 	 * This is an application level ID used to identify the
84878 	 * QP and its SQ and RQ.
84879 	 */
84880 	uint64_t	qp_handle;
84881 	uint32_t	raweth_qp1_flags2;
84882 	/*
84883 	 * When this bit is '0', the cs_ok field has the following
84884 	 * definition:- ip_cs_ok[2:0] = The number of header groups with a
84885 	 * valid IP checksum in the delivered packet, counted from the
84886 	 * outer-most header group to the inner-most header group, stopping
84887 	 * at the first error. - l4_cs_ok[5:3] = The number of header groups
84888 	 * with a valid L4 checksum in the delivered packet, counted from
84889 	 * the outer-most header group to the inner-most header group,
84890 	 * stopping at the first error. When this bit is '1', the cs_ok
84891 	 * field has the following definition: - hdr_cnt[2:0] = The number of
84892 	 * header groups that were parsed by the chip and passed in the
84893 	 * delivered packet. - ip_cs_all_ok[3] =This bit will be '1' if all
84894 	 * the parsed header groups with an IP checksum are valid.
84895 	 * - l4_cs_all_ok[4] = This bit will be '1' if all the parsed header
84896 	 * groups with an L4 checksum are valid.
84897 	 */
84898 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_CS_ALL_OK_MODE		UINT32_C(0x8)
84899 	/* This value indicates what format the metadata field is. */
84900 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
84901 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_SFT		4
84902 	/* There is no metadata information. Values are zero. */
84903 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
84904 	/*
84905 	 * The {metadata1, metadata0} fields contain the vtag
84906 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
84907 	 * de, vid[11:0]} The metadata2 field contains the table scope
84908 	 * and action record pointer. - metadata2[25:0] contains the
84909 	 * action record pointer. - metadata2[31:26] contains the table
84910 	 * scope.
84911 	 */
84912 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_ACT_REC_PTR	(UINT32_C(0x1) << 4)
84913 	/*
84914 	 * The {metadata1, metadata0} fields contain the vtag
84915 	 * information:
84916 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
84917 	 * The metadata2 field contains the Tunnel ID
84918 	 * value, justified to LSB. i
84919 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
84920 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
84921 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
84922 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
84923 	 * - IPv4 = 0 (not populated)
84924 	 * - IPv6 = Flow Label[19:0]
84925 	 * - PPPoE = sessionID[15:0]
84926 	 * - MPLs = Outer label[19:0]
84927 	 * - UPAR = Selected[31:0] with bit mask
84928 	 */
84929 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
84930 	/*
84931 	 * The {metadata1, metadata0} fields contain the vtag
84932 	 * information:
84933 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
84934 	 * The metadata2 field contains the 32b metadata from the prepended
84935 	 * header (chdr_data).
84936 	 */
84937 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
84938 	/*
84939 	 * The {metadata1, metadata0} fields contain the vtag
84940 	 * information:
84941 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
84942 	 * The metadata2 field contains the outer_l3_offset,
84943 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
84944 	 * - metadata2[8:0] contains the outer_l3_offset.
84945 	 * - metadata2[17:9] contains the inner_l2_offset.
84946 	 * - metadata2[26:18] contains the inner_l3_offset.
84947 	 * - metadata2[31:27] contains the inner_l4_size.
84948 	 */
84949 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
84950 		#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_LAST		CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET
84951 	/*
84952 	 * This field indicates the IP type for the inner-most IP header.
84953 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
84954 	 * This value is only valid if itype indicates a packet
84955 	 * with an IP header.
84956 	 */
84957 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_IP_TYPE			UINT32_C(0x100)
84958 	/*
84959 	 * This indicates that the complete 1's complement checksum was
84960 	 * calculated for the packet.
84961 	 */
84962 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
84963 	/*
84964 	 * This field indicates the status of IP and L4 CS calculations done
84965 	 * by the chip. The format of this field is indicated by the
84966 	 * cs_all_ok_mode bit.
84967 	 */
84968 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_CS_OK_MASK		UINT32_C(0xfc00)
84969 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_CS_OK_SFT		10
84970 	/*
84971 	 * This value is the complete 1's complement checksum calculated from
84972 	 * the start of the outer L3 header to the end of the packet (not
84973 	 * including the ethernet crc). It is valid when the
84974 	 * 'complete_checksum_calc' flag is set.
84975 	 */
84976 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
84977 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_SFT	16
84978 	/*
84979 	 * This is data from the CFA block as indicated by the meta_format
84980 	 * field.
84981 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
84982 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
84983 	 *   act_rec_ptr[25:0]}
84984 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
84985 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
84986 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
84987 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
84988 	 * of the host address from the first BD used to place the packet.
84989 	 */
84990 	uint32_t	cfa_metadata2;
84991 	uint8_t	cqe_type_toggle;
84992 	/*
84993 	 * Indicate valid completion - written by the chip. Cumulus
84994 	 * toggle this bit each time it finished consuming all PBL
84995 	 * entries
84996 	 */
84997 	#define CQ_RES_RAWETH_QP1_V2_TOGGLE		UINT32_C(0x1)
84998 	/* This field defines the type of CQE. */
84999 	#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_MASK	UINT32_C(0x1e)
85000 	#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_SFT	1
85001 	/*
85002 	 * Responder RawEth and QP1 Completion - This is used for RQ
85003 	 * completion for RawEth service and QP1 service QPs.
85004 	 */
85005 		#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_RES_RAWETH_QP1  (UINT32_C(0x3) << 1)
85006 		#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_LAST	CQ_RES_RAWETH_QP1_V2_CQE_TYPE_RES_RAWETH_QP1
85007 	/* This field indicates the status for the CQE. */
85008 	uint8_t	status;
85009 	/*
85010 	 * This indicates that the completion is without error.
85011 	 * All fields are valid.
85012 	 */
85013 	#define CQ_RES_RAWETH_QP1_V2_STATUS_OK			UINT32_C(0x0)
85014 	/*
85015 	 * This indicates that write access was not allowed for
85016 	 * at least one of the SGEs in the WQE.
85017 	 *
85018 	 * This is a fatal error. Only the srq_or_rq_wr_id is field
85019 	 * is valid.
85020 	 */
85021 	#define CQ_RES_RAWETH_QP1_V2_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x1)
85022 	/*
85023 	 * This indicates that the packet was too long for the WQE
85024 	 * provided on the RQ.
85025 	 *
85026 	 * This is not a fatal error. All the fields are valid.
85027 	 */
85028 	#define CQ_RES_RAWETH_QP1_V2_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x2)
85029 	/* LOCAL_PROTECTION_ERR is 3 */
85030 	#define CQ_RES_RAWETH_QP1_V2_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x3)
85031 	/* LOCAL_QP_OPERATION_ERR is 4 */
85032 	#define CQ_RES_RAWETH_QP1_V2_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
85033 	/* MEMORY_MGT_OPERATION_ERR is 5 */
85034 	#define CQ_RES_RAWETH_QP1_V2_STATUS_MEMORY_MGT_OPERATION_ERR UINT32_C(0x5)
85035 	/* WORK_REQUEST_FLUSHED_ERR is 7 */
85036 	#define CQ_RES_RAWETH_QP1_V2_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0x7)
85037 	/* HW_FLUSH_ERR is 8 */
85038 	#define CQ_RES_RAWETH_QP1_V2_STATUS_HW_FLUSH_ERR		UINT32_C(0x8)
85039 	#define CQ_RES_RAWETH_QP1_V2_STATUS_LAST			CQ_RES_RAWETH_QP1_V2_STATUS_HW_FLUSH_ERR
85040 	uint16_t	flags;
85041 	/*
85042 	 * This flag indicates that the completion is for a SRQ entry
85043 	 * rather than for an RQ entry.
85044 	 */
85045 	#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ	UINT32_C(0x1)
85046 	/* CQE relates to RQ WQE. */
85047 		#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_RQ	UINT32_C(0x0)
85048 	/* CQE relates to SRQ WQE. */
85049 		#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_SRQ   UINT32_C(0x1)
85050 		#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_LAST CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_SRQ
85051 	uint32_t	raweth_qp1_payload_offset_srq_or_rq_wr_id;
85052 	/*
85053 	 * Opaque value from RQ or SRQ WQE. Used by driver/lib to
85054 	 * reference the WQE in order to claim the received data
85055 	 * and reuse the WQE space
85056 	 */
85057 	#define CQ_RES_RAWETH_QP1_V2_SRQ_OR_RQ_WR_ID_MASK	UINT32_C(0xfffff)
85058 	#define CQ_RES_RAWETH_QP1_V2_SRQ_OR_RQ_WR_ID_SFT		0
85059 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_MASK		UINT32_C(0xf00000)
85060 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_SFT		20
85061 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
85062 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_MASK	UINT32_C(0x700000)
85063 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_SFT	20
85064 	/* 0x88a8 */
85065 		#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID88A8   (UINT32_C(0x0) << 20)
85066 	/* 0x8100 */
85067 		#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID8100   (UINT32_C(0x1) << 20)
85068 	/* 0x9100 */
85069 		#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID9100   (UINT32_C(0x2) << 20)
85070 	/* 0x9200 */
85071 		#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID9200   (UINT32_C(0x3) << 20)
85072 	/* 0x9300 */
85073 		#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID9300   (UINT32_C(0x4) << 20)
85074 	/* Value programmed in CFA VLANTPID register. */
85075 		#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPIDCFG	(UINT32_C(0x5) << 20)
85076 		#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_LAST	CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPIDCFG
85077 	/* When meta_format != 0, this value is the VLAN valid. */
85078 	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_VALID		UINT32_C(0x800000)
85079 	/*
85080 	 * This value indicates the offset in bytes from the beginning of
85081 	 * the packet where the inner payload starts. This value is valid
85082 	 * for TCP, UDP, FCoE, and RoCE packets.
85083 	 *
85084 	 * A value of zero indicates an offset of 256 bytes.
85085 	 */
85086 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_PAYLOAD_OFFSET_MASK UINT32_C(0xff000000)
85087 	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_PAYLOAD_OFFSET_SFT  24
85088 } cq_res_raweth_qp1_v2_t, *pcq_res_raweth_qp1_v2_t;
85089 
85090 /*
85091  * This is the terminal CQE structure. This CQE is generated to
85092  * indicate that no further completions will be generated for this QP.
85093  */
85094 /* cq_terminal (size:256b/32B) */
85095 
85096 typedef struct cq_terminal {
85097 	/*
85098 	 * This is an application level ID used to identify the
85099 	 * QP and its SQ and RQ.
85100 	 */
85101 	uint64_t	qp_handle;
85102 	/*
85103 	 * Final SQ Consumer Index value. Any additional SQ WQEs will
85104 	 * have to be completed by the user provider.
85105 	 */
85106 	uint16_t	sq_cons_idx;
85107 	/*
85108 	 * Final RQ Consumer Index value. Any additional RQ WQEs will
85109 	 * have to be completed by the user provider.
85110 	 */
85111 	uint16_t	rq_cons_idx;
85112 	uint32_t	reserved32_1;
85113 	uint64_t	reserved64_3;
85114 	uint8_t	cqe_type_toggle;
85115 	/*
85116 	 * Indicate valid completion - written by the chip. Cumulus
85117 	 * toggle this bit each time it finished consuming all PBL
85118 	 * entries
85119 	 */
85120 	#define CQ_TERMINAL_TOGGLE	UINT32_C(0x1)
85121 	/* This field defines the type of CQE. */
85122 	#define CQ_TERMINAL_CQE_TYPE_MASK	UINT32_C(0x1e)
85123 	#define CQ_TERMINAL_CQE_TYPE_SFT	1
85124 	/*
85125 	 * Terminal completion - This is used to indicate that no
85126 	 * further completions will be made for this QP on this CQ.
85127 	 */
85128 		#define CQ_TERMINAL_CQE_TYPE_TERMINAL  (UINT32_C(0xe) << 1)
85129 		#define CQ_TERMINAL_CQE_TYPE_LAST	CQ_TERMINAL_CQE_TYPE_TERMINAL
85130 	/* This field indicates the status for the CQE. */
85131 	uint8_t	status;
85132 	/* The operation completed successfully. */
85133 	#define CQ_TERMINAL_STATUS_OK UINT32_C(0x0)
85134 	#define CQ_TERMINAL_STATUS_LAST CQ_TERMINAL_STATUS_OK
85135 	uint16_t	reserved16;
85136 	uint32_t	reserved32_2;
85137 } cq_terminal_t, *pcq_terminal_t;
85138 
85139 /* Cutoff CQE */
85140 /* cq_cutoff (size:256b/32B) */
85141 
85142 typedef struct cq_cutoff {
85143 	uint64_t	reserved64_1;
85144 	uint64_t	reserved64_2;
85145 	uint64_t	reserved64_3;
85146 	uint8_t	cqe_type_toggle;
85147 	/*
85148 	 * Indicate valid completion - written by the chip. The NIC
85149 	 * toggles this bit each time it finished consuming all PBL
85150 	 * entries
85151 	 */
85152 	#define CQ_CUTOFF_TOGGLE		UINT32_C(0x1)
85153 	/* This field defines the type of CQE. */
85154 	#define CQ_CUTOFF_CQE_TYPE_MASK	UINT32_C(0x1e)
85155 	#define CQ_CUTOFF_CQE_TYPE_SFT	1
85156 	/* Cut off CQE; for CQ resize see CQ and SRQ Resize */
85157 		#define CQ_CUTOFF_CQE_TYPE_CUT_OFF	(UINT32_C(0xf) << 1)
85158 		#define CQ_CUTOFF_CQE_TYPE_LAST	CQ_CUTOFF_CQE_TYPE_CUT_OFF
85159 	/*
85160 	 * This field carries the toggle value that must be used to
85161 	 * acknowledge this CQ resize operation. When this CQE is
85162 	 * processed, the driver should send a CQ_CUTOFF_ACK doorbell
85163 	 * to the chip to let the chip know that the resize operation
85164 	 * is complete.
85165 	 *
85166 	 * This value is used by HW to detect old and
85167 	 * stale CQ_CUTOFF_ACK doorbells that are caused by having
85168 	 * a backup doorbell location or by PCI or other reordering
85169 	 * problems. Only doorbells with the latest value will be honored.
85170 	 * This field is needed only for devices that use the hardware
85171 	 * based doorbell drop recovery feature.
85172 	 */
85173 	#define CQ_CUTOFF_RESIZE_TOGGLE_MASK UINT32_C(0x60)
85174 	#define CQ_CUTOFF_RESIZE_TOGGLE_SFT 5
85175 	/* This field indicates the status for the CQE. */
85176 	uint8_t	status;
85177 	/* The operation completed successfully. */
85178 	#define CQ_CUTOFF_STATUS_OK UINT32_C(0x0)
85179 	#define CQ_CUTOFF_STATUS_LAST CQ_CUTOFF_STATUS_OK
85180 	uint16_t	reserved16;
85181 	uint32_t	reserved32;
85182 } cq_cutoff_t, *pcq_cutoff_t;
85183 
85184 /* No-Op CQE */
85185 /* cq_no_op (size:256b/32B) */
85186 
85187 typedef struct cq_no_op {
85188 	uint64_t	reserved64_1;
85189 	uint64_t	reserved64_2;
85190 	uint64_t	reserved64_3;
85191 	uint8_t	cqe_type_toggle;
85192 	/*
85193 	 * Indicate valid completion - written by the chip. The NIC
85194 	 * toggles this bit each time it finished consuming all PBL
85195 	 * entries.
85196 	 */
85197 	#define CQ_NO_OP_TOGGLE	UINT32_C(0x1)
85198 	/* This field defines the type of CQE. */
85199 	#define CQ_NO_OP_CQE_TYPE_MASK UINT32_C(0x1e)
85200 	#define CQ_NO_OP_CQE_TYPE_SFT  1
85201 	/*
85202 	 * NO-OP completion - This is used to indicate that no operation
85203 	 * completed.
85204 	 */
85205 		#define CQ_NO_OP_CQE_TYPE_NO_OP  (UINT32_C(0xd) << 1)
85206 		#define CQ_NO_OP_CQE_TYPE_LAST  CQ_NO_OP_CQE_TYPE_NO_OP
85207 	/* This field indicates the status for the CQE. */
85208 	uint8_t	status;
85209 	/* The operation completed successfully. */
85210 	#define CQ_NO_OP_STATUS_OK UINT32_C(0x0)
85211 	#define CQ_NO_OP_STATUS_LAST CQ_NO_OP_STATUS_OK
85212 	uint16_t	reserved16;
85213 	uint32_t	reserved32;
85214 } cq_no_op_t, *pcq_no_op_t;
85215 
85216 /*
85217  * This is the Requester CQE V3 structure. This is used to complete each
85218  * signaled SQ WQE. The sq_cons_idx and opaque is used to indicate
85219  * which WQE has been completed. When a WQE is completed, it indicates
85220  * that all WQEs before it in the SQ are also completed without error.
85221  * Space freed by completed WQEs can be used for new WQEs.
85222  */
85223 /* cq_req_v3 (size:256b/32B) */
85224 
85225 typedef struct cq_req_v3 {
85226 	/*
85227 	 * This is an application level ID used to identify the
85228 	 * QP and its SQ and RQ.
85229 	 */
85230 	uint64_t	qp_handle;
85231 	/*
85232 	 * SQ Consumer Index - points to the entry just past the last WQE
85233 	 * that has been completed by the chip. Wraps around at QPC.sq_size
85234 	 * (i.e. the valid range of the SQ Consumer Index is 0 to
85235 	 * (QPC.sq_size - 1)). The sq_cons_idx is in 16B units (as is
85236 	 * QPC.sq_size).
85237 	 *
85238 	 * User can determine available space in the SQ by comparing
85239 	 * sq_cons_idx to a sq_prod_idx maintained by the user. When the two
85240 	 * values are equal, the SQ is empty. When
85241 	 * (sq_prod_idx+1)%QPC.sq_size==sq_cons_idx, the queue is full.
85242 	 */
85243 	uint16_t	sq_cons_idx;
85244 	uint16_t	reserved1;
85245 	uint32_t	reserved2;
85246 	uint64_t	reserved3;
85247 	uint8_t	cqe_type_toggle;
85248 	/*
85249 	 * Indicate valid completion - written by the chip. The NIC
85250 	 * toggles this bit each time it finished consuming all PBL
85251 	 * entries.
85252 	 */
85253 	#define CQ_REQ_V3_TOGGLE	UINT32_C(0x1)
85254 	/* This field defines the type of CQE. */
85255 	#define CQ_REQ_V3_CQE_TYPE_MASK  UINT32_C(0x1e)
85256 	#define CQ_REQ_V3_CQE_TYPE_SFT   1
85257 	/*
85258 	 * Requester completion V3 - This is used for both RC and UD SQ
85259 	 * completions.
85260 	 */
85261 		#define CQ_REQ_V3_CQE_TYPE_REQ_V3  (UINT32_C(0x8) << 1)
85262 		#define CQ_REQ_V3_CQE_TYPE_LAST   CQ_REQ_V3_CQE_TYPE_REQ_V3
85263 	/*
85264 	 * When this bit is '1', it indicates that the packet completed
85265 	 * was transmitted using the push accelerated data provided by
85266 	 * the driver. When this bit is '0', it indicates that the packet
85267 	 * had not push acceleration data written or was executed as a
85268 	 * normal packet even though push data was provided.
85269 	 *
85270 	 * Note: This field is intended to be used for driver-generated push
85271 	 * statistics. As such, It is not applicable for RC since not all
85272 	 * RC packets return a CQE.
85273 	 */
85274 	#define CQ_REQ_V3_PUSH	UINT32_C(0x20)
85275 	/* This field indicates the status for the CQE. */
85276 	uint8_t	status;
85277 	/* The operation completed successfully. */
85278 	#define CQ_REQ_V3_STATUS_OK			UINT32_C(0x0)
85279 	/*
85280 	 * An unexpected BTH opcode or a First/Middle packet that is not
85281 	 * the full MTU size was returned by the responder.
85282 	 *
85283 	 * This is a fatal error detected by the requester Rx.
85284 	 */
85285 	#define CQ_REQ_V3_STATUS_BAD_RESPONSE_ERR	UINT32_C(0x1)
85286 	/*
85287 	 * Generated for a WQE posted to the local SQ when the sum of the
85288 	 * lengths of the SGEs in the WQE exceeds the maximum message
85289 	 * length of 2^31 bytes.
85290 	 *
85291 	 * Generated for a WQE posted to the local RQ/SRQ when the sum of
85292 	 * the lengths of the SGEs in the WQE is too small to receive the
85293 	 * (valid) incoming message or the length of the incoming message
85294 	 * is greater than the maximum message size supported.
85295 	 *
85296 	 * This is a fatal error detected by the requester Tx or responder
85297 	 * Rx. For responder CQEs, only the opaque field is valid.
85298 	 */
85299 	#define CQ_REQ_V3_STATUS_LOCAL_LENGTH_ERR	UINT32_C(0x2)
85300 	/*
85301 	 * An internal QP consistency error was detected while processing
85302 	 * this Work Request. For requester, this could be an SQ WQE format
85303 	 * error or an operation specified in the WQE that is not supported
85304 	 * for the QP. For responder, this is an RQ/SRQ WQE format error.
85305 	 *
85306 	 * This is a fatal error detected by the requester Tx or responder
85307 	 * Rx. For responder CQEs, only the opaque field is valid.
85308 	 */
85309 	#define CQ_REQ_V3_STATUS_LOCAL_QP_OPERATION_ERR	UINT32_C(0x4)
85310 	/*
85311 	 * An SGE in the locally posted WQE does not reference a Memory
85312 	 * Region that is valid for the requested operation. If this error
85313 	 * is generated for an SGE using the reserved l_key, this means
85314 	 * that the reserved l_key is not enabled.
85315 	 *
85316 	 * This is a fatal error detected by the requester Tx or responder
85317 	 * Rx. For responder CQEs, only the opaque field is valid.
85318 	 */
85319 	#define CQ_REQ_V3_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x5)
85320 	/*
85321 	 * The SSC detected an error on a local memory operation from the
85322 	 * SQ (fast-register, local invalidate, or bind).
85323 	 *
85324 	 * This is a fatal error detected by the requester Tx.
85325 	 */
85326 	#define CQ_REQ_V3_STATUS_MEMORY_MGT_OPERATION_ERR   UINT32_C(0x7)
85327 	/*
85328 	 * An invalid message was received by the responder. This could be
85329 	 * an operation that is not supported by this QP, an IRRQ overflow
85330 	 * error, or the length in an RDMA operation is greater than the
85331 	 * maximum message size (2^31 bytes).
85332 	 *
85333 	 * This is a fatal error detected by the responder and communicated
85334 	 * back to the requester using a NAK-Invalid Request. For responder
85335 	 * CQEs, only the opaque field is valid.
85336 	 */
85337 	#define CQ_REQ_V3_STATUS_REMOTE_INVALID_REQUEST_ERR UINT32_C(0x8)
85338 	/*
85339 	 * A protection error occurred on a remote data buffer to be read
85340 	 * by an RDMA Read, written by an RDMA Write or accessed by an
85341 	 * atomic operation. This error is reported only on RDMA operations
85342 	 * or atomic operations.
85343 	 *
85344 	 * This is a fatal error detected by the responder and communicated
85345 	 * back to the requester using a NAK-Remote Access Violation.
85346 	 */
85347 	#define CQ_REQ_V3_STATUS_REMOTE_ACCESS_ERR	UINT32_C(0x9)
85348 	/*
85349 	 * The operation could not be completed successfully by the
85350 	 * responder. Possible causes include an RQ/SRQ WQE format error,
85351 	 * an SSC error when validating an SGE from an RQ/SRQ WQE, or the
85352 	 * message received was too long for the RQ/SRQ WQE.
85353 	 *
85354 	 * This is a fatal error detected by the responder and communicated
85355 	 * back to the requester using a NAK-Remote Operation Error.
85356 	 */
85357 	#define CQ_REQ_V3_STATUS_REMOTE_OPERATION_ERR	UINT32_C(0xa)
85358 	/*
85359 	 * The RNR NAK retry count was exceeded while trying to send this
85360 	 * message.
85361 	 *
85362 	 * This is a fatal error detected by the requester.
85363 	 */
85364 	#define CQ_REQ_V3_STATUS_RNR_NAK_RETRY_CNT_ERR	UINT32_C(0xb)
85365 	/*
85366 	 * The local transport timeout retry counter was exceeded while
85367 	 * trying to send this message.
85368 	 *
85369 	 * This is a fatal error detected by the requester.
85370 	 */
85371 	#define CQ_REQ_V3_STATUS_TRANSPORT_RETRY_CNT_ERR	UINT32_C(0xc)
85372 	/*
85373 	 * A WQE was in process or outstanding when the QP transitioned
85374 	 * into the Error State.
85375 	 */
85376 	#define CQ_REQ_V3_STATUS_WORK_REQUEST_FLUSHED_ERR   UINT32_C(0xd)
85377 	/*
85378 	 * A WQE was posted to the SQ/RQ that caused it to overflow. For
85379 	 * requester CQEs, it was the SQ that overflowed. For responder
85380 	 * CQEs, it was the RQ that overflowed.
85381 	 */
85382 	#define CQ_REQ_V3_STATUS_OVERFLOW_ERR		UINT32_C(0xf)
85383 	#define CQ_REQ_V3_STATUS_LAST			CQ_REQ_V3_STATUS_OVERFLOW_ERR
85384 	uint16_t	reserved4;
85385 	/* This value is from the WQE that is being completed. */
85386 	uint32_t	opaque;
85387 } cq_req_v3_t, *pcq_req_v3_t;
85388 
85389 /*
85390  * This is the Responder RQ/SRQ CQE V3 structure for RC QPs. This is
85391  * used to complete each RQ/SRQ WQE. When the WQE is completed, it
85392  * indicates that there is room for one more WQE on the corresponding
85393  * RQ/SRQ.
85394  *
85395  * User can determine available space in the RQ/SRQ by comparing
85396  * a rq_cons_idx to a rq_prod_idx, both maintained by the user. The
85397  * range for rq_prod/cons_idx is from 0 to QPC.rq_size-1. The
85398  * rq_prod_idx value increments by one for each WQE that is added to
85399  * the RQ/SRQ by the user. Value must be wrapped at rq_size. The
85400  * rq_cons_idx value increments by one for each WQE that is completed
85401  * from that particular RQ/SRQ. The qp_handle can be used by the user
85402  * to determine what RQ/SRQ to increment. Value must also be wrapped at
85403  * rq_size. When the two values are equal, the RQ/SRQ is empty. When
85404  * (rq_prod_idx+1)%QPC.rq_size==rq_cons_idx, the queue is full.
85405  */
85406 /* cq_res_rc_v3 (size:256b/32B) */
85407 
85408 typedef struct cq_res_rc_v3 {
85409 	/*
85410 	 * The length of the message's payload in bytes, stored in
85411 	 * the SGEs
85412 	 */
85413 	uint32_t	length;
85414 	/*
85415 	 * Immediate data in case the imm_flag set, R_Key to be
85416 	 * invalidated in case inv_flag is set.
85417 	 */
85418 	uint32_t	imm_data_or_inv_r_key;
85419 	/*
85420 	 * This is an application level ID used to identify the
85421 	 * QP and its SQ and RQ.
85422 	 */
85423 	uint64_t	qp_handle;
85424 	/*
85425 	 * Opaque value - valid when inv_flag is set. Used by driver
85426 	 * to reference the buffer used to store PBL when the MR was
85427 	 * fast registered. The driver can reclaim this buffer after
85428 	 * an MR was remotely invalidated. The controller take that
85429 	 * value from the MR referenced by R_Key
85430 	 */
85431 	uint64_t	mr_handle;
85432 	uint8_t	cqe_type_toggle;
85433 	/*
85434 	 * Indicate valid completion - written by the chip. The NIC
85435 	 * toggles this bit each time it finished consuming all PBL
85436 	 * entries.
85437 	 */
85438 	#define CQ_RES_RC_V3_TOGGLE		UINT32_C(0x1)
85439 	/* This field defines the type of CQE. */
85440 	#define CQ_RES_RC_V3_CQE_TYPE_MASK	UINT32_C(0x1e)
85441 	#define CQ_RES_RC_V3_CQE_TYPE_SFT	1
85442 	/*
85443 	 * Responder RC Completion - This is used for both RQ and SRQ
85444 	 * completions for RC service QPs.
85445 	 */
85446 		#define CQ_RES_RC_V3_CQE_TYPE_RES_RC_V3  (UINT32_C(0x9) << 1)
85447 		#define CQ_RES_RC_V3_CQE_TYPE_LAST	CQ_RES_RC_V3_CQE_TYPE_RES_RC_V3
85448 	/* This field indicates the status for the CQE. */
85449 	uint8_t	status;
85450 	/* The operation completed successfully. */
85451 	#define CQ_RES_RC_V3_STATUS_OK			UINT32_C(0x0)
85452 	/*
85453 	 * Generated for a WQE posted to the local SQ when the sum of the
85454 	 * lengths of the SGEs in the WQE exceeds the maximum message
85455 	 * length of 2^31 bytes.
85456 	 *
85457 	 * Generated for a WQE posted to the local RQ/SRQ when the sum of
85458 	 * the lengths of the SGEs in the WQE is too small to receive the
85459 	 * (valid) incoming message or the length of the incoming message
85460 	 * is greater than the maximum message size supported.
85461 	 *
85462 	 * This is a fatal error detected by the requester Tx or responder
85463 	 * Rx. For responder CQEs, only the opaque field is valid.
85464 	 */
85465 	#define CQ_RES_RC_V3_STATUS_LOCAL_LENGTH_ERR	UINT32_C(0x2)
85466 	/*
85467 	 * An internal QP consistency error was detected while processing
85468 	 * this Work Request. For requester, this could be an SQ WQE format
85469 	 * error or an operation specified in the WQE that is not supported
85470 	 * for the QP. For responder, this is an RQ/SRQ WQE format error.
85471 	 *
85472 	 * This is a fatal error detected by the requester Tx or responder
85473 	 * Rx. For responder CQEs, only the opaque field is valid.
85474 	 */
85475 	#define CQ_RES_RC_V3_STATUS_LOCAL_QP_OPERATION_ERR	UINT32_C(0x4)
85476 	/*
85477 	 * An SGE in the locally posted WQE does not reference a Memory
85478 	 * Region that is valid for the requested operation. If this error
85479 	 * is generated for an SGE using the reserved l_key, this means
85480 	 * that the reserved l_key is not enabled.
85481 	 *
85482 	 * This is a fatal error detected by the requester Tx or responder
85483 	 * Rx. For responder CQEs, only the opaque field is valid.
85484 	 */
85485 	#define CQ_RES_RC_V3_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x5)
85486 	/*
85487 	 * A protection error occurred on a local data buffer during the
85488 	 * processing of a RDMA Write with Immediate Data operation sent
85489 	 * from the remote node.
85490 	 *
85491 	 * This is a fatal error detected by the responder Rx. Only the
85492 	 * opaque field in the CQE is valid.
85493 	 */
85494 	#define CQ_RES_RC_V3_STATUS_LOCAL_ACCESS_ERROR	UINT32_C(0x6)
85495 	/*
85496 	 * An invalid message was received by the responder. This could be
85497 	 * an operation that is not supported by this QP, an IRRQ overflow
85498 	 * error, or the length in an RDMA operation is greater than the
85499 	 * maximum message size (2^31 bytes).
85500 	 *
85501 	 * This is a fatal error detected by the responder and communicated
85502 	 * back to the requester using a NAK-Invalid Request. For responder
85503 	 * CQEs, only the opaque field is valid.
85504 	 */
85505 	#define CQ_RES_RC_V3_STATUS_REMOTE_INVALID_REQUEST_ERR UINT32_C(0x8)
85506 	/*
85507 	 * A WQE was in process or outstanding when the QP transitioned
85508 	 * into the Error State.
85509 	 */
85510 	#define CQ_RES_RC_V3_STATUS_WORK_REQUEST_FLUSHED_ERR   UINT32_C(0xd)
85511 	/*
85512 	 * A WQE had already been taken off the RQ/SRQ when a fatal error
85513 	 * was detected on responder Rx. Only the opaque field in the CQE
85514 	 * is valid.
85515 	 */
85516 	#define CQ_RES_RC_V3_STATUS_HW_FLUSH_ERR		UINT32_C(0xe)
85517 	/*
85518 	 * A WQE was posted to the SQ/RQ that caused it to overflow. For
85519 	 * requester CQEs, it was the SQ that overflowed. For responder
85520 	 * CQEs, it was the RQ that overflowed.
85521 	 */
85522 	#define CQ_RES_RC_V3_STATUS_OVERFLOW_ERR		UINT32_C(0xf)
85523 	#define CQ_RES_RC_V3_STATUS_LAST			CQ_RES_RC_V3_STATUS_OVERFLOW_ERR
85524 	uint16_t	flags;
85525 	/*
85526 	 * This flag indicates that the completion is for a SRQ entry
85527 	 * rather than for an RQ entry.
85528 	 */
85529 	#define CQ_RES_RC_V3_FLAGS_SRQ		UINT32_C(0x1)
85530 	/* CQE relates to RQ WQE. */
85531 		#define CQ_RES_RC_V3_FLAGS_SRQ_RQ	UINT32_C(0x0)
85532 	/* CQE relates to SRQ WQE. */
85533 		#define CQ_RES_RC_V3_FLAGS_SRQ_SRQ	UINT32_C(0x1)
85534 		#define CQ_RES_RC_V3_FLAGS_SRQ_LAST	CQ_RES_RC_V3_FLAGS_SRQ_SRQ
85535 	/* Immediate data indicator */
85536 	#define CQ_RES_RC_V3_FLAGS_IMM		UINT32_C(0x2)
85537 	/* R_Key invalidate indicator */
85538 	#define CQ_RES_RC_V3_FLAGS_INV		UINT32_C(0x4)
85539 	#define CQ_RES_RC_V3_FLAGS_RDMA	UINT32_C(0x8)
85540 	/* CQE relates to an incoming Send request */
85541 		#define CQ_RES_RC_V3_FLAGS_RDMA_SEND	(UINT32_C(0x0) << 3)
85542 	/* CQE relates to incoming RDMA Write request */
85543 		#define CQ_RES_RC_V3_FLAGS_RDMA_RDMA_WRITE  (UINT32_C(0x1) << 3)
85544 		#define CQ_RES_RC_V3_FLAGS_RDMA_LAST	CQ_RES_RC_V3_FLAGS_RDMA_RDMA_WRITE
85545 	/* This value is from the WQE that is being completed. */
85546 	uint32_t	opaque;
85547 } cq_res_rc_v3_t, *pcq_res_rc_v3_t;
85548 
85549 /*
85550  * This is the Responder RQ/SRQ CQE V3 structure for UD QPs and QP1 QPs
85551  * that are treated as UD. This is used to complete RQ/SRQ WQE's. When
85552  * the WQE is completed, it indicates that there is room for one more
85553  * WQE on the corresponding RQ/SRQ.
85554  *
85555  * User can determine available space in the RQ/SRQ by comparing
85556  * a rq_cons_idx to a rq_prod_idx, both maintained by the user. The
85557  * range for rq_prod/cons_idx is from 0 to QPC.rq_size-1. The
85558  * rq_prod_idx value increments by one for each WQE that is added to
85559  * the RQ/SRQ by the user. Value must be wrapped at rq_size. The
85560  * rq_cons_idx value increments by one for each WQE that is completed
85561  * from that particular RQ/SRQ. The qp_handle can be used by the user
85562  * to determine what RQ/SRQ to increment. Value must also be wrapped at
85563  * rq_size. When the two values are equal, the RQ/SRQ is empty. When
85564  * (rq_prod_idx+1)%QPC.rq_size==rq_cons_idx, the queue is full.
85565  */
85566 /* cq_res_ud_v3 (size:256b/32B) */
85567 
85568 typedef struct cq_res_ud_v3 {
85569 	uint16_t	length;
85570 	/*
85571 	 * The length of the message's payload in bytes, stored in
85572 	 * the SGEs
85573 	 */
85574 	#define CQ_RES_UD_V3_LENGTH_MASK UINT32_C(0x3fff)
85575 	#define CQ_RES_UD_V3_LENGTH_SFT 0
85576 	uint8_t	reserved1;
85577 	/* Upper 8b of the Source QP value from the DETH header. */
85578 	uint8_t	src_qp_high;
85579 	/* Immediate data in case the imm_flag set. */
85580 	uint32_t	imm_data;
85581 	/*
85582 	 * This is an application level ID used to identify the
85583 	 * QP and its SQ and RQ.
85584 	 */
85585 	uint64_t	qp_handle;
85586 	/*
85587 	 * Source MAC address for the UD message placed in the WQE
85588 	 * that is completed by this CQE.
85589 	 */
85590 	uint16_t	src_mac[3];
85591 	/* Lower 16b of the Source QP value from the DETH header. */
85592 	uint16_t	src_qp_low;
85593 	uint8_t	cqe_type_toggle;
85594 	/*
85595 	 * Indicate valid completion - written by the chip. The NIC
85596 	 * toggles this bit each time it finished consuming all PBL
85597 	 * entries.
85598 	 */
85599 	#define CQ_RES_UD_V3_TOGGLE		UINT32_C(0x1)
85600 	/* This field defines the type of CQE. */
85601 	#define CQ_RES_UD_V3_CQE_TYPE_MASK	UINT32_C(0x1e)
85602 	#define CQ_RES_UD_V3_CQE_TYPE_SFT	1
85603 	/*
85604 	 * Responder UD Completion - This is used for both RQ and SRQ
85605 	 * completion for UD service QPs. It is also used for QP1 QPs
85606 	 * that are treated as UD.
85607 	 */
85608 		#define CQ_RES_UD_V3_CQE_TYPE_RES_UD_V3  (UINT32_C(0xa) << 1)
85609 		#define CQ_RES_UD_V3_CQE_TYPE_LAST	CQ_RES_UD_V3_CQE_TYPE_RES_UD_V3
85610 	/* This field indicates the status for the CQE. */
85611 	uint8_t	status;
85612 	/* The operation completed successfully. */
85613 	#define CQ_RES_UD_V3_STATUS_OK			UINT32_C(0x0)
85614 	/*
85615 	 * This indicates that the packet was too long for the WQE provided
85616 	 * on the SRQ/RQ.
85617 	 *
85618 	 * This is not a fatal error. All the fields in the CQE are valid.
85619 	 */
85620 	#define CQ_RES_UD_V3_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x3)
85621 	/*
85622 	 * An internal QP consistency error was detected while processing
85623 	 * this Work Request. For requester, this could be an SQ WQE format
85624 	 * error or an operation specified in the WQE that is not supported
85625 	 * for the QP. For responder, this is an RQ/SRQ WQE format error.
85626 	 *
85627 	 * This is a fatal error detected by the requester Tx or responder
85628 	 * Rx. For responder CQEs, only the opaque field is valid.
85629 	 */
85630 	#define CQ_RES_UD_V3_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
85631 	/*
85632 	 * An SGE in the locally posted WQE does not reference a Memory
85633 	 * Region that is valid for the requested operation. If this error
85634 	 * is generated for an SGE using the reserved l_key, this means
85635 	 * that the reserved l_key is not enabled.
85636 	 *
85637 	 * This is a fatal error detected by the requester Tx or responder
85638 	 * Rx. For responder CQEs, only the opaque field is valid.
85639 	 */
85640 	#define CQ_RES_UD_V3_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x5)
85641 	/*
85642 	 * A WQE was in process or outstanding when the QP transitioned
85643 	 * into the Error State.
85644 	 */
85645 	#define CQ_RES_UD_V3_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0xd)
85646 	/*
85647 	 * A WQE had already been taken off the RQ/SRQ when a fatal error
85648 	 * was detected on responder Rx. Only the opaque field in the CQE
85649 	 * is valid.
85650 	 */
85651 	#define CQ_RES_UD_V3_STATUS_HW_FLUSH_ERR		UINT32_C(0xe)
85652 	/*
85653 	 * A WQE was posted to the SQ/RQ that caused it to overflow. For
85654 	 * requester CQEs, it was the SQ that overflowed. For responder
85655 	 * CQEs, it was the RQ that overflowed.
85656 	 */
85657 	#define CQ_RES_UD_V3_STATUS_OVERFLOW_ERR		UINT32_C(0xf)
85658 	#define CQ_RES_UD_V3_STATUS_LAST			CQ_RES_UD_V3_STATUS_OVERFLOW_ERR
85659 	uint16_t	flags;
85660 	/*
85661 	 * This flag indicates that the completion is for a SRQ entry
85662 	 * rather than for an RQ entry.
85663 	 */
85664 	#define CQ_RES_UD_V3_FLAGS_SRQ		UINT32_C(0x1)
85665 	/* CQE relates to RQ WQE. */
85666 		#define CQ_RES_UD_V3_FLAGS_SRQ_RQ		UINT32_C(0x0)
85667 	/* CQE relates to SRQ WQE. */
85668 		#define CQ_RES_UD_V3_FLAGS_SRQ_SRQ		UINT32_C(0x1)
85669 		#define CQ_RES_UD_V3_FLAGS_SRQ_LAST	CQ_RES_UD_V3_FLAGS_SRQ_SRQ
85670 	/* Immediate data indicator */
85671 	#define CQ_RES_UD_V3_FLAGS_IMM		UINT32_C(0x2)
85672 	#define CQ_RES_UD_V3_FLAGS_UNUSED_MASK	UINT32_C(0xc)
85673 	#define CQ_RES_UD_V3_FLAGS_UNUSED_SFT	2
85674 	#define CQ_RES_UD_V3_FLAGS_ROCE_IP_VER_MASK  UINT32_C(0x30)
85675 	#define CQ_RES_UD_V3_FLAGS_ROCE_IP_VER_SFT   4
85676 	/* RoCEv1 Message */
85677 		#define CQ_RES_UD_V3_FLAGS_ROCE_IP_VER_V1	(UINT32_C(0x0) << 4)
85678 	/* RoCEv2 IPv4 Message */
85679 		#define CQ_RES_UD_V3_FLAGS_ROCE_IP_VER_V2IPV4  (UINT32_C(0x2) << 4)
85680 	/* RoCEv2 IPv6 Message */
85681 		#define CQ_RES_UD_V3_FLAGS_ROCE_IP_VER_V2IPV6  (UINT32_C(0x3) << 4)
85682 		#define CQ_RES_UD_V3_FLAGS_ROCE_IP_VER_LAST   CQ_RES_UD_V3_FLAGS_ROCE_IP_VER_V2IPV6
85683 	/* This value is from the WQE that is being completed. */
85684 	uint32_t	opaque;
85685 } cq_res_ud_v3_t, *pcq_res_ud_v3_t;
85686 
85687 /*
85688  * This is the Responder RQ/SRQ CQE V3 structure for RawEth. This is
85689  * used to complete RQ/SRQ WQE's. When the WQE is completed, it
85690  * indicates that there is room for one more WQE on the corresponding
85691  * RQ/SRQ.
85692  *
85693  * User can determine available space in the RQ/SRQ by comparing
85694  * a rq_cons_idx to a rq_prod_idx, both maintained by the user. The
85695  * range for rq_prod/cons_idx is from 0 to QPC.rq_size-1. The
85696  * rq_prod_idx value increments by one for each WQE that is added to
85697  * the RQ/SRQ by the user. Value must be wrapped at rq_size. The
85698  * rq_cons_idx value increments by one for each WQE that is completed
85699  * from that particular RQ/SRQ. The qp_handle can be used by the user
85700  * to determine what RQ/SRQ to increment. Value must also be wrapped at
85701  * rq_size. When the two values are equal, the RQ/SRQ is empty. When
85702  * (rq_prod_idx+1)%QPC.rq_size==rq_cons_idx, the queue is full.
85703  */
85704 /* cq_res_raweth_qp1_v3 (size:256b/32B) */
85705 
85706 typedef struct cq_res_raweth_qp1_v3 {
85707 	uint16_t	length;
85708 	/*
85709 	 * The length of the message's payload in bytes, stored in
85710 	 * the SGEs
85711 	 */
85712 	#define CQ_RES_RAWETH_QP1_V3_LENGTH_MASK UINT32_C(0x3fff)
85713 	#define CQ_RES_RAWETH_QP1_V3_LENGTH_SFT 0
85714 	uint16_t	raweth_qp1_flags_cfa_metadata1;
85715 	/*
85716 	 * When this bit is '1', it indicates a packet that has an
85717 	 * error of some type. Type of error is indicated in
85718 	 * raweth_qp1_errors.
85719 	 */
85720 	#define CQ_RES_RAWETH_QP1_V3_ERROR			UINT32_C(0x1)
85721 	/*
85722 	 * This value indicates what the inner packet determined for the
85723 	 * packet was.
85724 	 */
85725 	#define CQ_RES_RAWETH_QP1_V3_ITYPE_MASK		UINT32_C(0x3c0)
85726 	#define CQ_RES_RAWETH_QP1_V3_ITYPE_SFT		6
85727 	/*
85728 	 * Not Known:
85729 	 * Indicates that the packet type was not known.
85730 	 */
85731 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_NOT_KNOWN		(UINT32_C(0x0) << 6)
85732 	/*
85733 	 * IP Packet:
85734 	 * Indicates that the packet was an IP packet, but further
85735 	 * classification was not possible.
85736 	 */
85737 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_IP			(UINT32_C(0x1) << 6)
85738 	/*
85739 	 * TCP Packet:
85740 	 * Indicates that the packet was IP and TCP.
85741 	 * This indicates that the raweth_qp1_payload_offset field is
85742 	 * valid.
85743 	 */
85744 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_TCP			(UINT32_C(0x2) << 6)
85745 	/*
85746 	 * UDP Packet:
85747 	 * Indicates that the packet was IP and UDP.
85748 	 * This indicates that the raweth_qp1_payload_offset field is
85749 	 * valid.
85750 	 */
85751 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_UDP			(UINT32_C(0x3) << 6)
85752 	/*
85753 	 * FCoE Packet:
85754 	 * Indicates that the packet was recognized as a FCoE.
85755 	 * This also indicates that the raweth_qp1_payload_offset field is
85756 	 * valid.
85757 	 */
85758 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_FCOE		(UINT32_C(0x4) << 6)
85759 	/*
85760 	 * RoCE Packet:
85761 	 * Indicates that the packet was recognized as a RoCE.
85762 	 * This also indicates that the raweth_qp1_payload_offset field is
85763 	 * valid.
85764 	 */
85765 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_ROCE		(UINT32_C(0x5) << 6)
85766 	/*
85767 	 * ICMP Packet:
85768 	 * Indicates that the packet was recognized as ICMP.
85769 	 * This indicates that the raweth_qp1_payload_offset field is
85770 	 * valid.
85771 	 */
85772 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_ICMP		(UINT32_C(0x7) << 6)
85773 	/*
85774 	 * PtP packet wo/timestamp:
85775 	 * Indicates that the packet was recognized as a PtP
85776 	 * packet.
85777 	 */
85778 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_PTP_WO_TIMESTAMP	(UINT32_C(0x8) << 6)
85779 	/*
85780 	 * PtP packet w/timestamp:
85781 	 * Indicates that the packet was recognized as a PtP
85782 	 * packet and that a timestamp was taken for the packet.
85783 	 */
85784 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_PTP_W_TIMESTAMP	(UINT32_C(0x9) << 6)
85785 		#define CQ_RES_RAWETH_QP1_V3_ITYPE_LAST		CQ_RES_RAWETH_QP1_V3_ITYPE_PTP_W_TIMESTAMP
85786 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA1_MASK	UINT32_C(0xf000)
85787 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA1_SFT	12
85788 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
85789 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA1_TPID_SEL_MASK UINT32_C(0x7000)
85790 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA1_TPID_SEL_SFT  12
85791 	/* When meta_format != 0, this value is the VLAN valid. */
85792 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA1_VALID	UINT32_C(0x8000)
85793 	uint16_t	raweth_qp1_errors;
85794 	/*
85795 	 * This indicates that there was an error in the IP header
85796 	 * checksum.
85797 	 */
85798 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_IP_CS_ERROR			UINT32_C(0x10)
85799 	/*
85800 	 * This indicates that there was an error in the TCP, UDP
85801 	 * or ICMP checksum.
85802 	 */
85803 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_L4_CS_ERROR			UINT32_C(0x20)
85804 	/*
85805 	 * This indicates that there was an error in the tunnel
85806 	 * IP header checksum.
85807 	 */
85808 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_IP_CS_ERROR			UINT32_C(0x40)
85809 	/*
85810 	 * This indicates that there was an error in the tunnel
85811 	 * UDP checksum.
85812 	 */
85813 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_L4_CS_ERROR			UINT32_C(0x80)
85814 	/*
85815 	 * This indicates that there was a CRC error on either an FCoE
85816 	 * or RoCE packet. The itype indicates the packet type.
85817 	 */
85818 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_CRC_ERROR			UINT32_C(0x100)
85819 	/*
85820 	 * This indicates that there was an error in the tunnel
85821 	 * portion of the packet when this
85822 	 * field is non-zero.
85823 	 */
85824 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_MASK		UINT32_C(0xe00)
85825 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_SFT		9
85826 	/*
85827 	 * No additional error occurred on the tunnel portion
85828 	 * of the packet of the packet does not have a tunnel.
85829 	 */
85830 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 9)
85831 	/*
85832 	 * Indicates that IP header version does not match
85833 	 * expectation from L2 Ethertype for IPv4 and IPv6
85834 	 * in the tunnel header.
85835 	 */
85836 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION	(UINT32_C(0x1) << 9)
85837 	/*
85838 	 * Indicates that header length is out of range in the
85839 	 * tunnel header. Valid for
85840 	 * IPv4.
85841 	 */
85842 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN	(UINT32_C(0x2) << 9)
85843 	/*
85844 	 * Indicates that physical packet is shorter than that claimed
85845 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6
85846 	 * tunnel packet packets.
85847 	 */
85848 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR	(UINT32_C(0x3) << 9)
85849 	/*
85850 	 * Indicates that the physical packet is shorter than that
85851 	 * claimed by the tunnel UDP header length for a tunnel
85852 	 * UDP packet that is not fragmented.
85853 	 */
85854 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR	(UINT32_C(0x4) << 9)
85855 	/*
85856 	 * indicates that the IPv4 TTL or IPv6 hop limit check
85857 	 * have failed (e.g. TTL = 0) in the tunnel header. Valid
85858 	 * for IPv4, and IPv6.
85859 	 */
85860 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL		(UINT32_C(0x5) << 9)
85861 	/*
85862 	 * Indicates that the physical packet is shorter than that
85863 	 * claimed by the tunnel header length. Valid for GTPv1-U
85864 	 * packets.
85865 	 */
85866 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_TOTAL_ERROR	(UINT32_C(0x6) << 9)
85867 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_LAST		CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_TOTAL_ERROR
85868 	/*
85869 	 * This indicates that there was an error in the inner
85870 	 * portion of the packet when this
85871 	 * field is non-zero.
85872 	 */
85873 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_MASK			UINT32_C(0xf000)
85874 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_SFT			12
85875 	/*
85876 	 * No additional error occurred on the tunnel portion
85877 	 * of the packet of the packet does not have a tunnel.
85878 	 */
85879 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_NO_ERROR		(UINT32_C(0x0) << 12)
85880 	/*
85881 	 * Indicates that IP header version does not match
85882 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
85883 	 * option other than VFT was parsed on
85884 	 * FCoE packet.
85885 	 */
85886 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_VERSION		(UINT32_C(0x1) << 12)
85887 	/*
85888 	 * indicates that header length is out of range. Valid for
85889 	 * IPv4 and RoCE
85890 	 */
85891 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN		(UINT32_C(0x2) << 12)
85892 	/*
85893 	 * indicates that the IPv4 TTL or IPv6 hop limit check
85894 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
85895 	 */
85896 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_TTL		(UINT32_C(0x3) << 12)
85897 	/*
85898 	 * Indicates that physical packet is shorter than that
85899 	 * claimed by the l3 header length. Valid for IPv4,
85900 	 * IPv6 packet or RoCE packets.
85901 	 */
85902 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_IP_TOTAL_ERROR		(UINT32_C(0x4) << 12)
85903 	/*
85904 	 * Indicates that the physical packet is shorter than that
85905 	 * claimed by the UDP header length for a UDP packet that is
85906 	 * not fragmented.
85907 	 */
85908 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR	(UINT32_C(0x5) << 12)
85909 	/*
85910 	 * Indicates that TCP header length > IP payload. Valid for
85911 	 * TCP packets only.
85912 	 */
85913 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN		(UINT32_C(0x6) << 12)
85914 	/* Indicates that TCP header length < 5. Valid for TCP. */
85915 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL  (UINT32_C(0x7) << 12)
85916 	/*
85917 	 * Indicates that TCP option headers result in a TCP header
85918 	 * size that does not match data offset in TCP header. Valid
85919 	 * for TCP.
85920 	 */
85921 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN		(UINT32_C(0x8) << 12)
85922 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_LAST			CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
85923 	/* This is data from the CFA as indicated by the meta_format field. */
85924 	uint16_t	cfa_metadata0;
85925 	/* When meta_format=1, this value is the VLAN VID. */
85926 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA0_VID_MASK UINT32_C(0xfff)
85927 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA0_VID_SFT 0
85928 	/* When meta_format=1, this value is the VLAN DE. */
85929 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA0_DE	UINT32_C(0x1000)
85930 	/* When meta_format=1, this value is the VLAN PRI. */
85931 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA0_PRI_MASK UINT32_C(0xe000)
85932 	#define CQ_RES_RAWETH_QP1_V3_CFA_METADATA0_PRI_SFT 13
85933 	/*
85934 	 * This is an application level ID used to identify the
85935 	 * QP and its SQ and RQ.
85936 	 */
85937 	uint64_t	qp_handle;
85938 	uint32_t	raweth_qp1_flags2;
85939 	/*
85940 	 * This indicates that the ip checksum was calculated for the
85941 	 * inner packet and that the ip_cs_error field indicates if there
85942 	 * was an error.
85943 	 */
85944 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_IP_CS_CALC		UINT32_C(0x1)
85945 	/*
85946 	 * This indicates that the TCP, UDP or ICMP checksum was
85947 	 * calculated for the inner packet and that the l4_cs_error field
85948 	 * indicates if there was an error.
85949 	 */
85950 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_L4_CS_CALC		UINT32_C(0x2)
85951 	/*
85952 	 * This indicates that the ip checksum was calculated for the
85953 	 * tunnel header and that the t_ip_cs_error field indicates if
85954 	 * there was an error.
85955 	 */
85956 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_T_IP_CS_CALC		UINT32_C(0x4)
85957 	/*
85958 	 * This indicates that the UDP checksum was
85959 	 * calculated for the tunnel packet and that the t_l4_cs_error
85960 	 * field indicates if there was an error.
85961 	 */
85962 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_T_L4_CS_CALC		UINT32_C(0x8)
85963 	/* The field indicates what format the metadata field is. */
85964 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_MASK	UINT32_C(0xf0)
85965 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_SFT		4
85966 	/* No metadata information. Values are zero. */
85967 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_NONE		(UINT32_C(0x0) << 4)
85968 	/*
85969 	 * The {metadata1, metadata0} fields contain the vtag
85970 	 * information:
85971 	 *
85972 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
85973 	 *
85974 	 * The metadata2 field contains the table scope
85975 	 * and action record pointer.
85976 	 *
85977 	 * - metadata2[25:0] contains the action record pointer.
85978 	 * - metadata2[31:26] contains the table scope.
85979 	 */
85980 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_ACT_REC_PTR	(UINT32_C(0x1) << 4)
85981 	/*
85982 	 * The {metadata1, metadata0} fields contain the vtag
85983 	 * information:
85984 	 *
85985 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
85986 	 *
85987 	 * The metadata2 field contains the Tunnel ID value, justified
85988 	 * to LSB.
85989 	 *
85990 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
85991 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
85992 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
85993 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
85994 	 * - IPv4 = 0 (not populated)
85995 	 * - IPv6 = Flow Label[19:0]
85996 	 * - PPPoE = sessionID[15:0]
85997 	 * - MPLs = Outer label[19:0]
85998 	 * - UPAR = Selected[31:0] with bit mask
85999 	 */
86000 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 4)
86001 	/*
86002 	 * The {metadata1, metadata0} fields contain the vtag
86003 	 * information:
86004 	 *
86005 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
86006 	 *
86007 	 * The metadata2 field contains the 32b metadata from the
86008 	 * prepended header (chdr_data).
86009 	 */
86010 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 4)
86011 	/*
86012 	 * The {metadata1, metadata0} fields contain the vtag
86013 	 * information:
86014 	 *
86015 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
86016 	 *
86017 	 * The metadata2 field contains the outer_l3_offset,
86018 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
86019 	 *
86020 	 * - metadata2[8:0] contains the outer_l3_offset.
86021 	 * - metadata2[17:9] contains the inner_l2_offset.
86022 	 * - metadata2[26:18] contains the inner_l3_offset.
86023 	 * - metadata2[31:27] contains the inner_l4_size.
86024 	 */
86025 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET	(UINT32_C(0x4) << 4)
86026 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_LAST		CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET
86027 	/*
86028 	 * This field indicates the IP type for the inner-most IP header.
86029 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
86030 	 * This value is only valid if itype indicates a packet
86031 	 * with an IP header.
86032 	 */
86033 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_IP_TYPE			UINT32_C(0x100)
86034 	/*
86035 	 * This indicates that the complete 1's complement checksum was
86036 	 * calculated for the packet.
86037 	 */
86038 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_CALC	UINT32_C(0x200)
86039 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_T_IP_TYPE		UINT32_C(0x400)
86040 	/* Indicates that the Tunnel IP type was IPv4. */
86041 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_T_IP_TYPE_IPV4		(UINT32_C(0x0) << 10)
86042 	/* Indicates that the Tunnel IP type was IPv6. */
86043 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_T_IP_TYPE_IPV6		(UINT32_C(0x1) << 10)
86044 		#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_T_IP_TYPE_LAST		CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_T_IP_TYPE_IPV6
86045 	/*
86046 	 * This value is the complete 1's complement checksum calculated
86047 	 * from the start of the outer L3 header to the end of the packet
86048 	 * (not including the ethernet crc). It is valid when the
86049 	 * 'complete_checksum_calc' flag is set.
86050 	 */
86051 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_MASK	UINT32_C(0xffff0000)
86052 	#define CQ_RES_RAWETH_QP1_V3_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_SFT	16
86053 	/*
86054 	 * This is data from the CFA block as indicated by the meta_format
86055 	 * field.
86056 	 *
86057 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
86058 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
86059 	 *   act_rec_ptr[25:0]}
86060 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
86061 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
86062 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
86063 	 */
86064 	uint32_t	cfa_metadata2;
86065 	uint8_t	cqe_type_toggle;
86066 	/*
86067 	 * Indicate valid completion - written by the chip. The NIC
86068 	 * toggles this bit each time it finished consuming all PBL
86069 	 * entries.
86070 	 */
86071 	#define CQ_RES_RAWETH_QP1_V3_TOGGLE			UINT32_C(0x1)
86072 	/* This field defines the type of CQE. */
86073 	#define CQ_RES_RAWETH_QP1_V3_CQE_TYPE_MASK		UINT32_C(0x1e)
86074 	#define CQ_RES_RAWETH_QP1_V3_CQE_TYPE_SFT		1
86075 	/*
86076 	 * Responder RawEth and QP1 Completion - This is used for RQ and
86077 	 * SRQ completion for RawEth service. It is also used for QP1 QPs
86078 	 * that are treated as RawEth.
86079 	 */
86080 		#define CQ_RES_RAWETH_QP1_V3_CQE_TYPE_RES_RAWETH_QP1_V3  (UINT32_C(0xb) << 1)
86081 		#define CQ_RES_RAWETH_QP1_V3_CQE_TYPE_LAST		CQ_RES_RAWETH_QP1_V3_CQE_TYPE_RES_RAWETH_QP1_V3
86082 	/* This field indicates the status for the CQE. */
86083 	uint8_t	status;
86084 	/* The operation completed successfully. */
86085 	#define CQ_RES_RAWETH_QP1_V3_STATUS_OK			UINT32_C(0x0)
86086 	/*
86087 	 * This indicates that the packet was too long for the WQE provided
86088 	 * on the SRQ/RQ.
86089 	 *
86090 	 * This is not a fatal error. All the fields in the CQE are valid.
86091 	 */
86092 	#define CQ_RES_RAWETH_QP1_V3_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x3)
86093 	/*
86094 	 * An internal QP consistency error was detected while processing
86095 	 * this Work Request. For requester, this could be an SQ WQE format
86096 	 * error or an operation specified in the WQE that is not supported
86097 	 * for the QP. For responder, this is an RQ/SRQ WQE format error.
86098 	 *
86099 	 * This is a fatal error detected by the requester Tx or responder
86100 	 * Rx. For responder CQEs, only the opaque field is valid.
86101 	 */
86102 	#define CQ_RES_RAWETH_QP1_V3_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
86103 	/*
86104 	 * An SGE in the locally posted WQE does not reference a Memory
86105 	 * Region that is valid for the requested operation. If this error
86106 	 * is generated for an SGE using the reserved l_key, this means
86107 	 * that the reserved l_key is not enabled.
86108 	 *
86109 	 * This is a fatal error detected by the requester Tx or responder
86110 	 * Rx. For responder CQEs, only the opaque field is valid.
86111 	 */
86112 	#define CQ_RES_RAWETH_QP1_V3_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x5)
86113 	/*
86114 	 * A WQE was in process or outstanding when the QP transitioned
86115 	 * into the Error State.
86116 	 */
86117 	#define CQ_RES_RAWETH_QP1_V3_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0xd)
86118 	/*
86119 	 * A WQE had already been taken off the RQ/SRQ when a fatal error
86120 	 * was detected on responder Rx. Only the opaque field in the CQE
86121 	 * is valid.
86122 	 */
86123 	#define CQ_RES_RAWETH_QP1_V3_STATUS_HW_FLUSH_ERR		UINT32_C(0xe)
86124 	/*
86125 	 * A WQE was posted to the SQ/RQ that caused it to overflow. For
86126 	 * requester CQEs, it was the SQ that overflowed. For responder
86127 	 * CQEs, it was the RQ that overflowed.
86128 	 */
86129 	#define CQ_RES_RAWETH_QP1_V3_STATUS_OVERFLOW_ERR		UINT32_C(0xf)
86130 	#define CQ_RES_RAWETH_QP1_V3_STATUS_LAST			CQ_RES_RAWETH_QP1_V3_STATUS_OVERFLOW_ERR
86131 	uint8_t	flags;
86132 	/*
86133 	 * This flag indicates that the completion is for a SRQ entry
86134 	 * rather than for an RQ entry.
86135 	 */
86136 	#define CQ_RES_RAWETH_QP1_V3_FLAGS_SRQ	UINT32_C(0x1)
86137 	/* CQE relates to RQ WQE. */
86138 		#define CQ_RES_RAWETH_QP1_V3_FLAGS_SRQ_RQ	UINT32_C(0x0)
86139 	/* CQE relates to SRQ WQE. */
86140 		#define CQ_RES_RAWETH_QP1_V3_FLAGS_SRQ_SRQ   UINT32_C(0x1)
86141 		#define CQ_RES_RAWETH_QP1_V3_FLAGS_SRQ_LAST CQ_RES_RAWETH_QP1_V3_FLAGS_SRQ_SRQ
86142 	/*
86143 	 * This value indicates the offset in bytes from the beginning of the
86144 	 * packet where the inner payload starts. This value is valid for
86145 	 * TCP, UDP, FCoE, and RoCE packets.
86146 	 *
86147 	 * A value of zero indicates an offset of 256 bytes.
86148 	 */
86149 	uint8_t	raweth_qp1_payload_offset;
86150 	/* This value is from the WQE that is being completed. */
86151 	uint32_t	opaque;
86152 } cq_res_raweth_qp1_v3_t, *pcq_res_raweth_qp1_v3_t;
86153 
86154 /*
86155  * This is the Responder RQ/SRQ CQE V3 structure for UD QPs and QP1 QPs
86156  * treated as UD. This is used to complete RQ/SRQ WQE's. It differs
86157  * from the Res_UD CQE in that it carries additional CFA fields, in
86158  * place of the QP handle. (Instead of the QP handle, this CQE carries
86159  * the QID. It is up to the user to map the QID back to a QP handle.)
86160  * When the WQE is completed, it indicates that there is room for one
86161  * more WQE on the corresponding RQ/SRQ.
86162  *
86163  * User can determine available space in the RQ/SRQ by comparing
86164  * a rq_cons_idx to a rq_prod_idx, both maintained by the user. The
86165  * range for rq_prod/cons_idx is from 0 to QPC.rq_size-1. The
86166  * rq_prod_idx value increments by one for each WQE that is added to
86167  * the RQ/SRQ by the user. Value must be wrapped at rq_size. The
86168  * rq_cons_idx value increments by one for each WQE that is completed
86169  * from that particular RQ/SRQ. The qp_handle can be used by the user
86170  * to determine what RQ/SRQ to increment. Value must also be wrapped at
86171  * rq_size. When the two values are equal, the RQ/SRQ is empty. When
86172  * (rq_prod_idx+1)%QPC.rq_size==rq_cons_idx, the queue is full.
86173  */
86174 /* cq_res_ud_cfa_v3 (size:256b/32B) */
86175 
86176 typedef struct cq_res_ud_cfa_v3 {
86177 	uint16_t	length;
86178 	/*
86179 	 * The length of the message's payload in bytes, stored in
86180 	 * the SGEs
86181 	 */
86182 	#define CQ_RES_UD_CFA_V3_LENGTH_MASK UINT32_C(0x3fff)
86183 	#define CQ_RES_UD_CFA_V3_LENGTH_SFT 0
86184 	/* This is data from the CFA as indicated by the meta_format field. */
86185 	uint16_t	cfa_metadata0;
86186 	/* When meta_format=1, this value is the VLAN VID. */
86187 	#define CQ_RES_UD_CFA_V3_CFA_METADATA0_VID_MASK UINT32_C(0xfff)
86188 	#define CQ_RES_UD_CFA_V3_CFA_METADATA0_VID_SFT 0
86189 	/* When meta_format=1, this value is the VLAN DE. */
86190 	#define CQ_RES_UD_CFA_V3_CFA_METADATA0_DE	UINT32_C(0x1000)
86191 	/* When meta_format=1, this value is the VLAN PRI. */
86192 	#define CQ_RES_UD_CFA_V3_CFA_METADATA0_PRI_MASK UINT32_C(0xe000)
86193 	#define CQ_RES_UD_CFA_V3_CFA_METADATA0_PRI_SFT 13
86194 	/* Immediate data in case the imm_flag set. */
86195 	uint32_t	imm_data;
86196 	uint32_t	qid_cfa_metadata1_src_qp_high;
86197 	/*
86198 	 * This value indicates the QPID associated with this operation.
86199 	 *
86200 	 * The driver will use the qid from this CQE to map a QP handle
86201 	 * in the completion record returned to the application.
86202 	 */
86203 	#define CQ_RES_UD_CFA_V3_QID_MASK		UINT32_C(0x7ff)
86204 	#define CQ_RES_UD_CFA_V3_QID_SFT			0
86205 	#define CQ_RES_UD_CFA_V3_UNUSED_MASK		UINT32_C(0xff800)
86206 	#define CQ_RES_UD_CFA_V3_UNUSED_SFT		11
86207 	#define CQ_RES_UD_CFA_V3_CFA_METADATA1_MASK	UINT32_C(0xf00000)
86208 	#define CQ_RES_UD_CFA_V3_CFA_METADATA1_SFT	20
86209 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
86210 	#define CQ_RES_UD_CFA_V3_CFA_METADATA1_TPID_SEL_MASK UINT32_C(0x700000)
86211 	#define CQ_RES_UD_CFA_V3_CFA_METADATA1_TPID_SEL_SFT  20
86212 	/* When meta_format != 0, this value is the VLAN valid. */
86213 	#define CQ_RES_UD_CFA_V3_CFA_METADATA1_VALID	UINT32_C(0x800000)
86214 	/* Upper 8b of the Source QP value from the DETH header. */
86215 	#define CQ_RES_UD_CFA_V3_SRC_QP_HIGH_MASK	UINT32_C(0xff000000)
86216 	#define CQ_RES_UD_CFA_V3_SRC_QP_HIGH_SFT		24
86217 	/*
86218 	 * This is data from the CFA block as indicated by the meta_format
86219 	 * field.
86220 	 *
86221 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
86222 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
86223 	 *   act_rec_ptr[25:0]}
86224 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
86225 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
86226 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
86227 	 */
86228 	uint32_t	cfa_metadata2;
86229 	/*
86230 	 * Source MAC address for the UD message placed in the WQE
86231 	 * that is completed by this CQE.
86232 	 */
86233 	uint16_t	src_mac[3];
86234 	/* Lower 16b of the Source QP value from the DETH header. */
86235 	uint16_t	src_qp_low;
86236 	uint8_t	cqe_type_toggle;
86237 	/*
86238 	 * Indicate valid completion - written by the chip. The NIC
86239 	 * toggles this bit each time it finished consuming all PBL
86240 	 * entries
86241 	 */
86242 	#define CQ_RES_UD_CFA_V3_TOGGLE		UINT32_C(0x1)
86243 	/* This field defines the type of CQE. */
86244 	#define CQ_RES_UD_CFA_V3_CQE_TYPE_MASK	UINT32_C(0x1e)
86245 	#define CQ_RES_UD_CFA_V3_CQE_TYPE_SFT	1
86246 	/*
86247 	 * Responder UD Completion with CFA - This is used for both RQ
86248 	 * and SRQ completion for UD service QPs. It includes cfa fields
86249 	 * (some of which carry VLAN information), in place of the QP
86250 	 * handle. It is also used for QP1 QPs that are treated as UD.
86251 	 */
86252 		#define CQ_RES_UD_CFA_V3_CQE_TYPE_RES_UD_CFA_V3  (UINT32_C(0xc) << 1)
86253 		#define CQ_RES_UD_CFA_V3_CQE_TYPE_LAST	CQ_RES_UD_CFA_V3_CQE_TYPE_RES_UD_CFA_V3
86254 	/* This field indicates the status for the CQE. */
86255 	uint8_t	status;
86256 	/* The operation completed successfully. */
86257 	#define CQ_RES_UD_CFA_V3_STATUS_OK			UINT32_C(0x0)
86258 	/*
86259 	 * This indicates that the packet was too long for the WQE provided
86260 	 * on the SRQ/RQ.
86261 	 *
86262 	 * This is not a fatal error. All the fields in the CQE are valid.
86263 	 */
86264 	#define CQ_RES_UD_CFA_V3_STATUS_HW_LOCAL_LENGTH_ERR	UINT32_C(0x3)
86265 	/*
86266 	 * An internal QP consistency error was detected while processing
86267 	 * this Work Request. For requester, this could be an SQ WQE format
86268 	 * error or an operation specified in the WQE that is not supported
86269 	 * for the QP. For responder, this is an RQ/SRQ WQE format error.
86270 	 *
86271 	 * This is a fatal error detected by the requester Tx or responder
86272 	 * Rx. For responder CQEs, only the opaque field is valid.
86273 	 */
86274 	#define CQ_RES_UD_CFA_V3_STATUS_LOCAL_QP_OPERATION_ERR   UINT32_C(0x4)
86275 	/*
86276 	 * An SGE in the locally posted WQE does not reference a Memory
86277 	 * Region that is valid for the requested operation. If this error
86278 	 * is generated for an SGE using the reserved l_key, this means
86279 	 * that the reserved l_key is not enabled.
86280 	 *
86281 	 * This is a fatal error detected by the requester Tx or responder
86282 	 * Rx. For responder CQEs, only the opaque field is valid.
86283 	 */
86284 	#define CQ_RES_UD_CFA_V3_STATUS_LOCAL_PROTECTION_ERR	UINT32_C(0x5)
86285 	/*
86286 	 * A WQE was in process or outstanding when the QP transitioned
86287 	 * into the Error State.
86288 	 */
86289 	#define CQ_RES_UD_CFA_V3_STATUS_WORK_REQUEST_FLUSHED_ERR UINT32_C(0xd)
86290 	/*
86291 	 * A WQE had already been taken off the RQ/SRQ when a fatal error
86292 	 * was detected on responder Rx. Only the opaque field in the CQE
86293 	 * is valid.
86294 	 */
86295 	#define CQ_RES_UD_CFA_V3_STATUS_HW_FLUSH_ERR		UINT32_C(0xe)
86296 	/*
86297 	 * A WQE was posted to the SQ/RQ that caused it to overflow. For
86298 	 * requester CQEs, it was the SQ that overflowed. For responder
86299 	 * CQEs, it was the RQ that overflowed.
86300 	 */
86301 	#define CQ_RES_UD_CFA_V3_STATUS_OVERFLOW_ERR		UINT32_C(0xf)
86302 	#define CQ_RES_UD_CFA_V3_STATUS_LAST			CQ_RES_UD_CFA_V3_STATUS_OVERFLOW_ERR
86303 	uint16_t	flags;
86304 	/*
86305 	 * This flag indicates that the completion is for a SRQ entry
86306 	 * rather than for an RQ entry.
86307 	 */
86308 	#define CQ_RES_UD_CFA_V3_FLAGS_SRQ			UINT32_C(0x1)
86309 	/* CQE relates to RQ WQE. */
86310 		#define CQ_RES_UD_CFA_V3_FLAGS_SRQ_RQ		UINT32_C(0x0)
86311 	/* CQE relates to SRQ WQE. */
86312 		#define CQ_RES_UD_CFA_V3_FLAGS_SRQ_SRQ		UINT32_C(0x1)
86313 		#define CQ_RES_UD_CFA_V3_FLAGS_SRQ_LAST		CQ_RES_UD_CFA_V3_FLAGS_SRQ_SRQ
86314 	/* Immediate data indicator */
86315 	#define CQ_RES_UD_CFA_V3_FLAGS_IMM			UINT32_C(0x2)
86316 	#define CQ_RES_UD_CFA_V3_FLAGS_UNUSED_MASK		UINT32_C(0xc)
86317 	#define CQ_RES_UD_CFA_V3_FLAGS_UNUSED_SFT		2
86318 	#define CQ_RES_UD_CFA_V3_FLAGS_ROCE_IP_VER_MASK	UINT32_C(0x30)
86319 	#define CQ_RES_UD_CFA_V3_FLAGS_ROCE_IP_VER_SFT	4
86320 	/* RoCEv1 Message */
86321 		#define CQ_RES_UD_CFA_V3_FLAGS_ROCE_IP_VER_V1	(UINT32_C(0x0) << 4)
86322 	/* RoCEv2 IPv4 Message */
86323 		#define CQ_RES_UD_CFA_V3_FLAGS_ROCE_IP_VER_V2IPV4	(UINT32_C(0x2) << 4)
86324 	/* RoCEv2 IPv6 Message */
86325 		#define CQ_RES_UD_CFA_V3_FLAGS_ROCE_IP_VER_V2IPV6	(UINT32_C(0x3) << 4)
86326 		#define CQ_RES_UD_CFA_V3_FLAGS_ROCE_IP_VER_LAST	CQ_RES_UD_CFA_V3_FLAGS_ROCE_IP_VER_V2IPV6
86327 	/* The field indicates what format the metadata field is. */
86328 	#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_MASK	UINT32_C(0x3c0)
86329 	#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_SFT	6
86330 	/* No metadata information. Value is zero. */
86331 		#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_NONE	(UINT32_C(0x0) << 6)
86332 	/*
86333 	 * The {metadata1, metadata0} fields contain the vtag
86334 	 * information:
86335 	 *
86336 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
86337 	 *
86338 	 * The metadata2 field contains the table scope
86339 	 * and action record pointer.
86340 	 *
86341 	 * - metadata2[25:0] contains the action record pointer.
86342 	 * - metadata2[31:26] contains the table scope.
86343 	 */
86344 		#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_ACT_REC_PTR  (UINT32_C(0x1) << 6)
86345 	/*
86346 	 * The {metadata1, metadata0} fields contain the vtag
86347 	 * information:
86348 	 *
86349 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
86350 	 *
86351 	 * The metadata2 field contains the Tunnel ID
86352 	 * value, justified to LSB.
86353 	 *
86354 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
86355 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
86356 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
86357 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
86358 	 * - IPv4 = 0 (not populated)
86359 	 * - IPv6 = Flow Label[19:0]
86360 	 * - PPPoE = sessionID[15:0]
86361 	 * - MPLs = Outer label[19:0]
86362 	 * - UPAR = Selected[31:0] with bit mask
86363 	 */
86364 		#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_TUNNEL_ID	(UINT32_C(0x2) << 6)
86365 	/*
86366 	 * The {metadata1, metadata0} fields contain the vtag
86367 	 * information:
86368 	 *
86369 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
86370 	 *
86371 	 * The metadata2 field contains the 32b metadata from the
86372 	 * prepended header (chdr_data).
86373 	 */
86374 		#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_CHDR_DATA	(UINT32_C(0x3) << 6)
86375 	/*
86376 	 * The {metadata1, metadata0} fields contain the vtag
86377 	 * information:
86378 	 *
86379 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
86380 	 *
86381 	 * The metadata2 field contains the outer_l3_offset,
86382 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
86383 	 *
86384 	 * - metadata2[8:0] contains the outer_l3_offset.
86385 	 * - metadata2[17:9] contains the inner_l2_offset.
86386 	 * - metadata2[26:18] contains the inner_l3_offset.
86387 	 * - metadata2[31:27] contains the inner_l4_size.
86388 	 */
86389 		#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_HDR_OFFSET   (UINT32_C(0x4) << 6)
86390 		#define CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_LAST	CQ_RES_UD_CFA_V3_FLAGS_META_FORMAT_HDR_OFFSET
86391 	/*
86392 	 * This value will be returned in the completion if the completion is
86393 	 * signaled.
86394 	 */
86395 	uint32_t	opaque;
86396 } cq_res_ud_cfa_v3_t, *pcq_res_ud_cfa_v3_t;
86397 
86398 /* nq_base (size:128b/16B) */
86399 
86400 typedef struct nq_base {
86401 	uint16_t	info10_type;
86402 	/*
86403 	 * This field indicates the exact type of the completion.
86404 	 * By convention, the LSB identifies the length of the
86405 	 * record in 16B units. Even values indicate 16B
86406 	 * records. Odd values indicate 32B
86407 	 * records.
86408 	 */
86409 	#define NQ_BASE_TYPE_MASK	UINT32_C(0x3f)
86410 	#define NQ_BASE_TYPE_SFT		0
86411 	/* CQ Notification */
86412 		#define NQ_BASE_TYPE_CQ_NOTIFICATION  UINT32_C(0x30)
86413 	/* SRQ Threshold Event */
86414 		#define NQ_BASE_TYPE_SRQ_EVENT	UINT32_C(0x32)
86415 	/* DBQ Threshold Event */
86416 		#define NQ_BASE_TYPE_DBQ_EVENT	UINT32_C(0x34)
86417 	/* QP Async Notification */
86418 		#define NQ_BASE_TYPE_QP_EVENT	UINT32_C(0x38)
86419 	/* Function Async Notification */
86420 		#define NQ_BASE_TYPE_FUNC_EVENT	UINT32_C(0x3a)
86421 	/* NQ Reassign Notification */
86422 		#define NQ_BASE_TYPE_NQ_REASSIGN	UINT32_C(0x3c)
86423 		#define NQ_BASE_TYPE_LAST		NQ_BASE_TYPE_NQ_REASSIGN
86424 	/* info10 is 10 b */
86425 	#define NQ_BASE_INFO10_MASK	UINT32_C(0xffc0)
86426 	#define NQ_BASE_INFO10_SFT	6
86427 	/* info16 is 16 b */
86428 	uint16_t	info16;
86429 	/* info32 is 32 b */
86430 	uint32_t	info32;
86431 	/* info32 is 32 b */
86432 	uint64_t	info63_v;
86433 	/*
86434 	 * This value is written by the NIC such that it will be different
86435 	 * for each pass through the completion queue. The even passes
86436 	 * will write 1. The odd passes will write 0.
86437 	 */
86438 	#define NQ_BASE_V	UINT32_C(0x1)
86439 	/* info63 is 63 b */
86440 	#define NQ_BASE_INFO63_MASK UINT32_C(0xfffffffe)
86441 	#define NQ_BASE_INFO63_SFT 1
86442 } nq_base_t, *pnq_base_t;
86443 
86444 /* Completion Queue Notification */
86445 /* nq_cn (size:128b/16B) */
86446 
86447 typedef struct nq_cn {
86448 	uint16_t	type;
86449 	/*
86450 	 * This field indicates the exact type of the completion.
86451 	 * By convention, the LSB identifies the length of the
86452 	 * record in 16B units. Even values indicate 16B
86453 	 * records. Odd values indicate 32B
86454 	 * records.
86455 	 */
86456 	#define NQ_CN_TYPE_MASK	UINT32_C(0x3f)
86457 	#define NQ_CN_TYPE_SFT		0
86458 	/* CQ Notification */
86459 		#define NQ_CN_TYPE_CQ_NOTIFICATION  UINT32_C(0x30)
86460 		#define NQ_CN_TYPE_LAST		NQ_CN_TYPE_CQ_NOTIFICATION
86461 	/*
86462 	 * This field carries the toggle value that must be used to
86463 	 * re-arm this CQ. The toggle value should be copied into the
86464 	 * doorbell used to CQ_ARMENA, CQ_ARMALL or CQ_ARMSE doorbells.
86465 	 *
86466 	 * This value is used by HW to detect old and stale CQ_ARMENA,
86467 	 * CQ_ARMALL, or CQ_ARMSE doorbells that are caused by having
86468 	 * a backup doorbell location or by PCI or other reordering
86469 	 * problems. Only the doorbells that match the latest value of
86470 	 * toggle will be honored.
86471 	 */
86472 	#define NQ_CN_TOGGLE_MASK	UINT32_C(0xc0)
86473 	#define NQ_CN_TOGGLE_SFT	6
86474 	uint16_t	reserved16;
86475 	/*
86476 	 * This is an application level ID used to identify the
86477 	 * CQ. This field carries the lower 32b of the value.
86478 	 */
86479 	uint32_t	cq_handle_low;
86480 	uint32_t	v;
86481 	/*
86482 	 * This value is written by the NIC such that it will be different
86483 	 * for each pass through the completion queue. The even passes
86484 	 * will write 1. The odd passes will write 0.
86485 	 */
86486 	#define NQ_CN_V	UINT32_C(0x1)
86487 	/*
86488 	 * This is an application level ID used to identify the
86489 	 * CQ. This field carries the upper 32b of the value.
86490 	 */
86491 	uint32_t	cq_handle_high;
86492 } nq_cn_t, *pnq_cn_t;
86493 
86494 /* SRQ Event Notification */
86495 /* nq_srq_event (size:128b/16B) */
86496 
86497 typedef struct nq_srq_event {
86498 	uint8_t	type;
86499 	/*
86500 	 * This field indicates the exact type of the completion.
86501 	 * By convention, the LSB identifies the length of the
86502 	 * record in 16B units. Even values indicate 16B
86503 	 * records. Odd values indicate 32B records.
86504 	 */
86505 	#define NQ_SRQ_EVENT_TYPE_MASK	UINT32_C(0x3f)
86506 	#define NQ_SRQ_EVENT_TYPE_SFT	0
86507 	/* SRQ Threshold Event */
86508 		#define NQ_SRQ_EVENT_TYPE_SRQ_EVENT  UINT32_C(0x32)
86509 		#define NQ_SRQ_EVENT_TYPE_LAST	NQ_SRQ_EVENT_TYPE_SRQ_EVENT
86510 	/*
86511 	 * This field carries the toggle value that must be used
86512 	 * to re-arm this SRQ. The toggle value should be copied
86513 	 * into the doorbell used to SRQ_ARMENA or SRQ_ARM doorbells.
86514 	 */
86515 	#define NQ_SRQ_EVENT_TOGGLE_MASK   UINT32_C(0xc0)
86516 	#define NQ_SRQ_EVENT_TOGGLE_SFT	6
86517 	/*
86518 	 * This value define what type of async event has occurred
86519 	 * on the SRQ.
86520 	 */
86521 	uint8_t	event;
86522 	/* The threshold event has occurred on the specified SRQ. */
86523 	#define NQ_SRQ_EVENT_EVENT_SRQ_THRESHOLD_EVENT UINT32_C(0x1)
86524 	#define NQ_SRQ_EVENT_EVENT_LAST		NQ_SRQ_EVENT_EVENT_SRQ_THRESHOLD_EVENT
86525 	uint16_t	reserved16;
86526 	/*
86527 	 * This is the SRQ handle value for the queue that has
86528 	 * reached it's event threshold. This field carries the
86529 	 * lower 32b of the value.
86530 	 */
86531 	uint32_t	srq_handle_low;
86532 	uint32_t	v;
86533 	/*
86534 	 * This value is written by the NIC such that it will be different
86535 	 * for each pass through the completion queue. The even passes
86536 	 * will write 1. The odd passes will write 0.
86537 	 */
86538 	#define NQ_SRQ_EVENT_V	UINT32_C(0x1)
86539 	/*
86540 	 * This is the SRQ handle value for the queue that has
86541 	 * reached it's event threshold. This field carries the
86542 	 * upper 32b of the value.
86543 	 */
86544 	uint32_t	srq_handle_high;
86545 } nq_srq_event_t, *pnq_srq_event_t;
86546 
86547 /* DBQ Async Event Notification */
86548 /* nq_dbq_event (size:128b/16B) */
86549 
86550 typedef struct nq_dbq_event {
86551 	uint8_t	type;
86552 	/*
86553 	 * This field indicates the exact type of the completion.
86554 	 * By convention, the LSB identifies the length of the
86555 	 * record in 16B units. Even values indicate 16B
86556 	 * records. Odd values indicate 32B
86557 	 * records.
86558 	 */
86559 	#define NQ_DBQ_EVENT_TYPE_MASK	UINT32_C(0x3f)
86560 	#define NQ_DBQ_EVENT_TYPE_SFT	0
86561 	/* DBQ Threshold Event */
86562 		#define NQ_DBQ_EVENT_TYPE_DBQ_EVENT  UINT32_C(0x34)
86563 		#define NQ_DBQ_EVENT_TYPE_LAST	NQ_DBQ_EVENT_TYPE_DBQ_EVENT
86564 	/* This value define what type of action the driver should take. */
86565 	uint8_t	event;
86566 	/*
86567 	 * The driver should start writing dummy values to the
86568 	 * the doorbell in an attempt to consume all the PCIE
86569 	 * posted write resources and prevent doorbell overflow.
86570 	 */
86571 	#define NQ_DBQ_EVENT_EVENT_DBQ_THRESHOLD_EVENT UINT32_C(0x1)
86572 	#define NQ_DBQ_EVENT_EVENT_LAST		NQ_DBQ_EVENT_EVENT_DBQ_THRESHOLD_EVENT
86573 	uint16_t	db_pfid;
86574 	/*
86575 	 * This is the PFID of function that wrote the doorbell that
86576 	 * crossed the async event threshold.
86577 	 */
86578 	#define NQ_DBQ_EVENT_DB_PFID_MASK UINT32_C(0xf)
86579 	#define NQ_DBQ_EVENT_DB_PFID_SFT 0
86580 	uint32_t	db_dpi;
86581 	/*
86582 	 * This is the DPI of the doorbell write that crossed
86583 	 * the async event threshold.
86584 	 */
86585 	#define NQ_DBQ_EVENT_DB_DPI_MASK UINT32_C(0xfffff)
86586 	#define NQ_DBQ_EVENT_DB_DPI_SFT 0
86587 	uint32_t	v;
86588 	/*
86589 	 * This value is written by the NIC such that it will be different
86590 	 * for each pass through the completion queue. The even passes
86591 	 * will write 1. The odd passes will write 0.
86592 	 */
86593 	#define NQ_DBQ_EVENT_V	UINT32_C(0x1)
86594 	uint32_t	db_type_db_xid;
86595 	/*
86596 	 * DB 'XID' field from doorbell that crossed the async event
86597 	 * threshold. This is a QPID, SID, or CID, depending on
86598 	 * the db_type field.
86599 	 */
86600 	#define NQ_DBQ_EVENT_DB_XID_MASK UINT32_C(0xfffff)
86601 	#define NQ_DBQ_EVENT_DB_XID_SFT  0
86602 	/*
86603 	 * DB 'type' field from doorbell that crossed the async event
86604 	 * threshold.
86605 	 */
86606 	#define NQ_DBQ_EVENT_DB_TYPE_MASK UINT32_C(0xf0000000)
86607 	#define NQ_DBQ_EVENT_DB_TYPE_SFT 28
86608 } nq_dbq_event_t, *pnq_dbq_event_t;
86609 
86610 /*
86611  * This completion indicates that the NQ Reassign doorbell has been
86612  * executed by the CQ processing block and no further NQE will arrive
86613  * for this CQ on this NQ.
86614  */
86615 /* nq_reassign (size:128b/16B) */
86616 
86617 typedef struct nq_reassign {
86618 	uint16_t	type;
86619 	/*
86620 	 * This field indicates the exact type of the completion.
86621 	 * By convention, the LSB identifies the length of the
86622 	 * record in 16B units. Even values indicate 16B
86623 	 * records. Odd values indicate 32B records.
86624 	 */
86625 	#define NQ_REASSIGN_TYPE_MASK	UINT32_C(0x3f)
86626 	#define NQ_REASSIGN_TYPE_SFT	0
86627 	/* NQ Reassign Notification */
86628 		#define NQ_REASSIGN_TYPE_NQ_REASSIGN  UINT32_C(0x3c)
86629 		#define NQ_REASSIGN_TYPE_LAST	NQ_REASSIGN_TYPE_NQ_REASSIGN
86630 	uint16_t	reserved16;
86631 	/*
86632 	 * This is an application level ID used to identify the
86633 	 * CQ. This field carries the lower 32b of the value.
86634 	 */
86635 	uint32_t	cq_handle_low;
86636 	uint32_t	v;
86637 	/*
86638 	 * This value is written by the NIC such that it will be different
86639 	 * for each pass through the completion queue. The even passes
86640 	 * will write 1. The odd passes will write 0.
86641 	 */
86642 	#define NQ_REASSIGN_V	UINT32_C(0x1)
86643 	/*
86644 	 * This is an application level ID used to identify the
86645 	 * CQ. This field carries the upper 32b of the value.
86646 	 */
86647 	uint32_t	cq_handle_high;
86648 } nq_reassign_t, *pnq_reassign_t;
86649 
86650 /* Input Read Request Queue (IRRQ) Message */
86651 /* xrrq_irrq (size:256b/32B) */
86652 
86653 typedef struct xrrq_irrq {
86654 	uint16_t	credits_type;
86655 	/* Type indication */
86656 	#define XRRQ_IRRQ_TYPE	UINT32_C(0x1)
86657 	/* RDMA Read */
86658 		#define XRRQ_IRRQ_TYPE_READ_REQ	UINT32_C(0x0)
86659 	/* Atomic */
86660 		#define XRRQ_IRRQ_TYPE_ATOMIC_REQ  UINT32_C(0x1)
86661 		#define XRRQ_IRRQ_TYPE_LAST	XRRQ_IRRQ_TYPE_ATOMIC_REQ
86662 	/*
86663 	 * The credit code calculated by Rx path when receiving the
86664 	 * request. It will be placed in the syndrome credit code with
86665 	 * the acks on first and last response.
86666 	 */
86667 	#define XRRQ_IRRQ_CREDITS_MASK   UINT32_C(0xf800)
86668 	#define XRRQ_IRRQ_CREDITS_SFT	11
86669 	uint16_t	reserved16;
86670 	uint32_t	reserved32;
86671 	uint32_t	psn;
86672 	/* The PSN of the outstanding incoming request */
86673 	#define XRRQ_IRRQ_PSN_MASK UINT32_C(0xffffff)
86674 	#define XRRQ_IRRQ_PSN_SFT 0
86675 	uint32_t	msn;
86676 	/*
86677 	 * The value of QPC.pending_ack_msn after it is incremented as a
86678 	 * result of receiving the read/atomic request. IRRQ.msn-1 will
86679 	 * be placed in the MSN field of the first response and IRRQ.msn
86680 	 * will placed in the MSN field of the last or only response.
86681 	 */
86682 	#define XRRQ_IRRQ_MSN_MASK UINT32_C(0xffffff)
86683 	#define XRRQ_IRRQ_MSN_SFT 0
86684 	/*
86685 	 * Virtual address on local host for RDMA READ
86686 	 *
86687 	 * In case of duplicate Atomic, the VA is not required to
86688 	 * be validated, only the PSN is, thus this field is used
86689 	 * to store the value returned in the Ack to the atomic
86690 	 * request, and if duplicate arrives, this value is used
86691 	 * again for resending the ack.
86692 	 */
86693 	uint64_t	va_or_atomic_result;
86694 	/* The key to the MR/W in the request */
86695 	uint32_t	rdma_r_key;
86696 	/*
86697 	 * Length in bytes of the data requested. Length must be 8 if type is
86698 	 * atomic.
86699 	 */
86700 	uint32_t	length;
86701 } xrrq_irrq_t, *pxrrq_irrq_t;
86702 
86703 /* Output Read Request Queue (ORRQ) Message */
86704 /* xrrq_orrq (size:256b/32B) */
86705 
86706 typedef struct xrrq_orrq {
86707 	uint16_t	num_sges_type;
86708 	/* Type indication */
86709 	#define XRRQ_ORRQ_TYPE	UINT32_C(0x1)
86710 	/* RDMA Read */
86711 		#define XRRQ_ORRQ_TYPE_READ_REQ	UINT32_C(0x0)
86712 	/* Atomic */
86713 		#define XRRQ_ORRQ_TYPE_ATOMIC_REQ  UINT32_C(0x1)
86714 		#define XRRQ_ORRQ_TYPE_LAST	XRRQ_ORRQ_TYPE_ATOMIC_REQ
86715 	/*
86716 	 * Up to 6 SGEs. This value is 1 if type is atomic as one
86717 	 * SGE is required to store Atomic response result field. 2
86718 	 * more bits allocated for future growth.
86719 	 *
86720 	 * Note that, if num_sges is 1 for an RDMA Read request, then
86721 	 * the first_sge_phy_or_sing_sge_va, single_sge_l_key, and
86722 	 * single_sge_size fields will be populated from the single
86723 	 * SGE.
86724 	 *
86725 	 * If num_sges is 2 or more for an RDMA Read request, then
86726 	 * the first_sge_phy_or_sing_sge_va field carries the
86727 	 * physical address in host memory where the first sge is
86728 	 * stored. The single_sge_l_key and single_sge_size fields
86729 	 * are unused in this case.
86730 	 *
86731 	 * A special case is a zero-length, zero-sge RDMA read request
86732 	 * WQE. In this situation, num_sges will be 1. However,
86733 	 * first_sge_phy_or_sing_sge_va, single_sge_l_key, and
86734 	 * single_sge_size will all be populated with zeros.
86735 	 */
86736 	#define XRRQ_ORRQ_NUM_SGES_MASK  UINT32_C(0xf800)
86737 	#define XRRQ_ORRQ_NUM_SGES_SFT   11
86738 	uint16_t	reserved16;
86739 	/*
86740 	 * Length in bytes of the data requested. Length must be 8 if type is
86741 	 * atomic.
86742 	 */
86743 	uint32_t	length;
86744 	uint32_t	psn;
86745 	/* The PSN of the outstanding outgoing request */
86746 	#define XRRQ_ORRQ_PSN_MASK UINT32_C(0xffffff)
86747 	#define XRRQ_ORRQ_PSN_SFT 0
86748 	uint32_t	end_psn;
86749 	/*
86750 	 * The expected last PSN on a response to this request where
86751 	 * an ack with response, rather than just response, should
86752 	 * arrive. If ack arrive with smaller PSN than end_psn then it
86753 	 * is considered a NAK.
86754 	 */
86755 	#define XRRQ_ORRQ_END_PSN_MASK UINT32_C(0xffffff)
86756 	#define XRRQ_ORRQ_END_PSN_SFT 0
86757 	/*
86758 	 * If num_sges == 1 this is the va of that SGE. Otherwise,
86759 	 * physical address to the first SGE specified by the WQE.
86760 	 * Points to the first SGE in the Request's WQE in the SQ.
86761 	 * It is assumed that WQE does not cross page boundaries!
86762 	 * Driver is responsible to enforce that. SGEs are 16B
86763 	 * aligned 0b0000 lsb added to get 64 bit address.
86764 	 */
86765 	uint64_t	first_sge_phy_or_sing_sge_va;
86766 	/* The L_Key of a single SGE if used */
86767 	uint32_t	single_sge_l_key;
86768 	/* The size in bytes of the single SGE if used */
86769 	uint32_t	single_sge_size;
86770 } xrrq_orrq_t, *pxrrq_orrq_t;
86771 
86772 /* Page Table Entry (PTE) */
86773 /* ptu_pte (size:64b/8B) */
86774 
86775 typedef struct ptu_pte {
86776 	uint64_t	page_next_to_last_last_valid;
86777 	/*
86778 	 * This field indicates if the PTE is valid. A value of '0'
86779 	 * indicates that the page is not valid. A value of '1'
86780 	 * indicates that the page is valid. A reference to an
86781 	 * invalid page will return a PTU error.
86782 	 */
86783 	#define PTU_PTE_VALID		UINT32_C(0x1)
86784 	/*
86785 	 * This field is used only for "ring" PBLs that are used for
86786 	 * SQ, RQ, SRQ, or CQ structures. For all other PBL structures,
86787 	 * this bit should be zero. When this bit is '1', it indicates
86788 	 * that the page pointed to by this PTE is the last page in the
86789 	 * ring. A prefetch for the ring should use the first PTE in
86790 	 * the PBL.
86791 	 */
86792 	#define PTU_PTE_LAST		UINT32_C(0x2)
86793 	/*
86794 	 * This field is used only for "ring" PBLs that are used for
86795 	 * SQ, RQ, SRQ, or CQ structures. For all other PBL structures,
86796 	 * this bit should be zero. When this bit is '1', it indicates
86797 	 * that this is the next-to-last page of the PBL.
86798 	 */
86799 	#define PTU_PTE_NEXT_TO_LAST	UINT32_C(0x4)
86800 	/* These bits should be programmed to zero. */
86801 	#define PTU_PTE_UNUSED_MASK	UINT32_C(0xff8)
86802 	#define PTU_PTE_UNUSED_SFT	3
86803 	/*
86804 	 * This is the upper bits of the physical page controlled by
86805 	 * this PTE. If the page is larger than 4KB, then the unused
86806 	 * lower bits of the page address should be zero.
86807 	 */
86808 	#define PTU_PTE_PAGE_MASK	UINT32_C(0xfffffffffffff000)L
86809 	#define PTU_PTE_PAGE_SFT	12
86810 } ptu_pte_t, *pptu_pte_t;
86811 
86812 /* Page Directory Entry (PDE) */
86813 /* ptu_pde (size:64b/8B) */
86814 
86815 typedef struct ptu_pde {
86816 	uint64_t	page_valid;
86817 	/*
86818 	 * This field indicates if the PTE is valid. A value of '0'
86819 	 * indicates that the page is not valid. A value of '1'
86820 	 * indicates that the page is valid. A reference to an
86821 	 * invalid page will return a PTU error.
86822 	 */
86823 	#define PTU_PDE_VALID	UINT32_C(0x1)
86824 	/* These bits should be programmed to zero. */
86825 	#define PTU_PDE_UNUSED_MASK UINT32_C(0xffe)
86826 	#define PTU_PDE_UNUSED_SFT 1
86827 	/*
86828 	 * This is the upper bits of the physical page controlled by
86829 	 * this PTE. If the page is larger than 4KB, then the unused
86830 	 * lower bits of the page address should be zero.
86831 	 */
86832 	#define PTU_PDE_PAGE_MASK  UINT32_C(0xfffffffffffff000)L
86833 	#define PTU_PDE_PAGE_SFT   12
86834 } ptu_pde_t, *pptu_pde_t;
86835 
86836 /*
86837  * This is the 64b doorbell format. The host writes this message
86838  * format directly to byte offset 0 of the appropriate doorbell page.
86839  */
86840 /* dbc_dbc (size:64b/8B) */
86841 
86842 typedef struct dbc_dbc {
86843 	uint32_t	index;
86844 	/*
86845 	 * This value is the index being written.
86846 	 *
86847 	 * For SQ, RQ, and SRQ, this is the producer index and the unit is
86848 	 * 16B of queue space for L2 path and for the Engine path. For RoCE
86849 	 * path there is a legacy mode with 128B unit size and a variable
86850 	 * size WQE mode with 16B unit size of queue space. This mode is
86851 	 * configured in the QP.
86852 	 *
86853 	 * For CQ this is the consumer index and the unit is 32B of queue
86854 	 * space for the RoCE/Engine path and the CQ index unit is 16B of
86855 	 * queue space for the L2 path.
86856 	 *
86857 	 * For NQ this is the consumer index and the unit is always 16B of
86858 	 * queue space.
86859 	 *
86860 	 * The index size is 24b for L2 and engine paths and 16b for the
86861 	 * RoCE path. Unused bits should be written as zero.
86862 	 */
86863 	#define DBC_DBC_INDEX_MASK UINT32_C(0xffffff)
86864 	#define DBC_DBC_INDEX_SFT  0
86865 	/*
86866 	 * The epoch bit provides a frame of reference for the queue index.
86867 	 * S/W will toggle this bit in the doorbell each time index range is
86868 	 * wrapped. This allows the receiving HW block to more efficiently
86869 	 * detect out-of-order doorbells and to ignore the older doorbells.
86870 	 * Out-of-order doorbells occur normally during dropped doorbell
86871 	 * recovery.
86872 	 */
86873 	#define DBC_DBC_EPOCH	UINT32_C(0x1000000)
86874 	/*
86875 	 * The toggle value is used in CQ_ARMENA, CQ_ARMSE, CQ_ARMALL,
86876 	 * SRQ_ARMENA, SRQ_ARM, and CQ_CUTOFF_ACK doorbells to qualify the
86877 	 * doorbell as valid. This value should be taken from the latest
86878 	 * NQE or cutoff completion.
86879 	 *
86880 	 * Doorbells of the above types with the wrong toggle value will
86881 	 * be ignored. This is how old values in of backup doorbells
86882 	 * are ignored.
86883 	 */
86884 	#define DBC_DBC_TOGGLE_MASK UINT32_C(0x6000000)
86885 	#define DBC_DBC_TOGGLE_SFT 25
86886 	uint32_t	type_path_xid;
86887 	/*
86888 	 * This value identifies the resource that the doorbell is intended
86889 	 * to notify.
86890 	 *
86891 	 * For SQ and RQ, this is the QPID. For SRQ, this is the SID. For
86892 	 * CQ, this is the CID. For NQ, this is the NID.
86893 	 *
86894 	 * Bits [19:16] of this values must be zero for a SID value.
86895 	 */
86896 	#define DBC_DBC_XID_MASK	UINT32_C(0xfffff)
86897 	#define DBC_DBC_XID_SFT	0
86898 	/*
86899 	 * This value defines the intended doorbell path between RoCE and
86900 	 * L2.
86901 	 */
86902 	#define DBC_DBC_PATH_MASK	UINT32_C(0x3000000)
86903 	#define DBC_DBC_PATH_SFT	24
86904 	/* This is a RoCE doorbell message. */
86905 		#define DBC_DBC_PATH_ROCE	(UINT32_C(0x0) << 24)
86906 	/* This is a L2 doorbell message. */
86907 		#define DBC_DBC_PATH_L2		(UINT32_C(0x1) << 24)
86908 	/* Engine path doorbell. */
86909 		#define DBC_DBC_PATH_ENGINE	(UINT32_C(0x2) << 24)
86910 		#define DBC_DBC_PATH_LAST	DBC_DBC_PATH_ENGINE
86911 	/*
86912 	 * This indicates it is valid doorbell update. It should be set for
86913 	 * each doorbell written to the chip and set when doorbell message is
86914 	 * written to the backup doorbell location. The bit should be cleared
86915 	 * in the backup doorbell location at time zero to indicate that the
86916 	 * backup doorbell has not yet been written.
86917 	 */
86918 	#define DBC_DBC_VALID		UINT32_C(0x4000000)
86919 	/*
86920 	 * When this bit is set to one, the chip will capture debug
86921 	 * information for the doorbell ring. This is intended to only be
86922 	 * used on SQ doorbell rings.
86923 	 */
86924 	#define DBC_DBC_DEBUG_TRACE	UINT32_C(0x8000000)
86925 	/* This value identifies the type of doorbell being written. */
86926 	#define DBC_DBC_TYPE_MASK	UINT32_C(0xf0000000)
86927 	#define DBC_DBC_TYPE_SFT	28
86928 	/*
86929 	 * This is a SQ producer index update. It indicates one or more
86930 	 * new entries have been written to the SQ for the QPID indicated
86931 	 * on the xID field. This type is valid for L2, RoCE and Engine
86932 	 * path.
86933 	 */
86934 		#define DBC_DBC_TYPE_SQ		(UINT32_C(0x0) << 28)
86935 	/*
86936 	 * This is a RQ producer index update. It indicates one or more
86937 	 * new entries have been written to the RQ for the QPID indicated
86938 	 * on the xID field. This type is valid for RoCE path.
86939 	 */
86940 		#define DBC_DBC_TYPE_RQ		(UINT32_C(0x1) << 28)
86941 	/*
86942 	 * This is a SRQ producer index update. It indicates one or more
86943 	 * new entries have been written to the SRQ for the SID indicated
86944 	 * on the xID field. This type is valid for L2 and RoCE path.
86945 	 */
86946 		#define DBC_DBC_TYPE_SRQ		(UINT32_C(0x2) << 28)
86947 	/*
86948 	 * This doorbell command arms the SRQ async event.
86949 	 * The xID field must identify the SID that is begin armed.
86950 	 * The index field is will set the arm threshold such that
86951 	 * a notification will be generated if less than that number
86952 	 * or SRQ entries are posted. This type is valid for RoCE path.
86953 	 */
86954 		#define DBC_DBC_TYPE_SRQ_ARM	(UINT32_C(0x3) << 28)
86955 	/*
86956 	 * This is a CQ consumer index update. It indicates one or more
86957 	 * entries have been processed off the CQ indicated on the xID
86958 	 * field.This type is valid for L2, RoCE and Engine path.
86959 	 */
86960 		#define DBC_DBC_TYPE_CQ		(UINT32_C(0x4) << 28)
86961 	/*
86962 	 * this is a CQ consumer index update that also arms the CQ for
86963 	 * solicited events. This type is valid for RoCE path.
86964 	 */
86965 		#define DBC_DBC_TYPE_CQ_ARMSE	(UINT32_C(0x5) << 28)
86966 	/*
86967 	 * This is a CQ consumer index update that also arms the CQ
86968 	 * for any new CQE. This type is valid for L2, RoCE and Engine
86969 	 * path.
86970 	 */
86971 		#define DBC_DBC_TYPE_CQ_ARMALL	(UINT32_C(0x6) << 28)
86972 	/*
86973 	 * This is a CQ arm enable message. This message must be sent
86974 	 * from the privileged driver before a new CQ_ARMSE or CQ_ARMALL
86975 	 * message will be accepted.
86976 	 *
86977 	 * This doorbell can only be sent from the privileged (first)
86978 	 * doorbell page of a function.
86979 	 */
86980 		#define DBC_DBC_TYPE_CQ_ARMENA	(UINT32_C(0x7) << 28)
86981 	/*
86982 	 * This doorbell command enables the SRQ async event
86983 	 * to be armed. This message must be sent from the privileged
86984 	 * driver before a new SRQ_ARM message will be accepted.
86985 	 * The xID field must identify the SID that is begin enabled
86986 	 * for arm.
86987 	 *
86988 	 * This doorbell can only be sent from the privileged (first)
86989 	 * doorbell page of a function.
86990 	 */
86991 		#define DBC_DBC_TYPE_SRQ_ARMENA	(UINT32_C(0x8) << 28)
86992 	/*
86993 	 * This doorbell command indicates that the cutoff CQE has
86994 	 * been processed and the driver is now processing completions
86995 	 * from the new CQ.
86996 	 *
86997 	 * The index field for this doorbell type must be zero.
86998 	 */
86999 		#define DBC_DBC_TYPE_CQ_CUTOFF_ACK  (UINT32_C(0x9) << 28)
87000 	/*
87001 	 * This is a NQ consumer index update. It indicates one or more
87002 	 * entries have been processed off the NQ indicated on the xID
87003 	 * field. This type is valid for L2, RoCE and Engine path.
87004 	 */
87005 		#define DBC_DBC_TYPE_NQ		(UINT32_C(0xa) << 28)
87006 	/*
87007 	 * This is a NQ consumer index update that also arms the NQ for
87008 	 * any new NQE. This type is valid for L2, RoCE and Engine path.
87009 	 */
87010 		#define DBC_DBC_TYPE_NQ_ARM	(UINT32_C(0xb) << 28)
87011 	/*
87012 	 * This is a NQ consumer index update that also arms the NQ for
87013 	 * any new NQE. It is used for the legacy INT mask. This type
87014 	 * is valid for L2, RoCE and Engine path.
87015 	 */
87016 		#define DBC_DBC_TYPE_NQ_MASK	(UINT32_C(0xe) << 28)
87017 	/*
87018 	 * This doorbell command is used during doorbell moderation
87019 	 * to consume system BW and help prevent doorbell FIFO
87020 	 * overflow.
87021 	 *
87022 	 * All other fields should be zero for NULL doorbell.
87023 	 * For doorbell recovery, NULL doorbell type in the Application
87024 	 * table indicates that it is the last QP entry for the function.
87025 	 * This type is valid for L2, RoCE and Engine path.
87026 	 */
87027 		#define DBC_DBC_TYPE_NULL	(UINT32_C(0xf) << 28)
87028 		#define DBC_DBC_TYPE_LAST	DBC_DBC_TYPE_NULL
87029 } dbc_dbc_t, *pdbc_dbc_t;
87030 
87031 /*
87032  * This is the 32b doorbell format. The host writes this message
87033  * format directly to byte offset 8 of the appropriate doorbell page.
87034  */
87035 /* dbc_dbc32 (size:32b/4B) */
87036 
87037 typedef struct dbc_dbc32 {
87038 	uint32_t	type_abs_incr_xid;
87039 	/*
87040 	 * This value identifies the resource that the doorbell is intended
87041 	 * to notify.
87042 	 *
87043 	 * For SQ and RQ, this is the QPID. For SRQ, this is the SID. For
87044 	 * CQ, this is the CID.
87045 	 *
87046 	 * Bits [19:16] of this values must be zero for a SID value.
87047 	 */
87048 	#define DBC_DBC32_XID_MASK UINT32_C(0xfffff)
87049 	#define DBC_DBC32_XID_SFT  0
87050 	/*
87051 	 * This value defines the intended doorbell path between RoCE and
87052 	 * L2.
87053 	 */
87054 	#define DBC_DBC32_PATH_MASK UINT32_C(0xc00000)
87055 	#define DBC_DBC32_PATH_SFT 22
87056 	/* This is a RoCE doorbell message. */
87057 		#define DBC_DBC32_PATH_ROCE  (UINT32_C(0x0) << 22)
87058 	/* This is a L2 doorbell message. */
87059 		#define DBC_DBC32_PATH_L2	(UINT32_C(0x1) << 22)
87060 		#define DBC_DBC32_PATH_LAST DBC_DBC32_PATH_L2
87061 	/*
87062 	 * When abs=0, this value is the value to add to the appropriate
87063 	 * index value.
87064 	 *
87065 	 * When abs=1, this value is the new value for the index. Absolute
87066 	 * value is used when the queue is being wrapped. When abs=1,
87067 	 * the incr value follows the same rules as the index value
87068 	 * in the 64b doorbell.
87069 	 */
87070 	#define DBC_DBC32_INCR_MASK UINT32_C(0xf000000)
87071 	#define DBC_DBC32_INCR_SFT 24
87072 	/* This value defines how the incr value will be interpreted. */
87073 	#define DBC_DBC32_ABS	UINT32_C(0x10000000)
87074 	/* This value identifies the type of doorbell being written. */
87075 	#define DBC_DBC32_TYPE_MASK UINT32_C(0xe0000000)
87076 	#define DBC_DBC32_TYPE_SFT 29
87077 	/*
87078 	 * This is a SQ producer index update. It indicates one or more
87079 	 * new entries have been written to the SQ for the QPID
87080 	 * indicated on the xID field.
87081 	 */
87082 		#define DBC_DBC32_TYPE_SQ	(UINT32_C(0x0) << 29)
87083 		#define DBC_DBC32_TYPE_LAST DBC_DBC32_TYPE_SQ
87084 } dbc_dbc32_t, *pdbc_dbc32_t;
87085 
87086 /*
87087  * This is the 64b Push Start doorbell format. The host writes this
87088  * message format directly to offset of each push associated WCB (write
87089  * combine buffer) within doorbell page. WCB#0 = offset 16, WCB#1 =
87090  * offset 24, WCB#2 = offset 32, ... The start doorbell is followed by
87091  * write combining data to the WCB and then that is followed by a end
87092  * doorbell.
87093  */
87094 /* db_push_start (size:64b/8B) */
87095 
87096 typedef struct db_push_start {
87097 	uint64_t	db;
87098 	/*
87099 	 * This is the push index and should be the SQ slot index,
87100 	 * aligned to the start of the corresponding push WQE/packet in
87101 	 * the Send Queue.
87102 	 *
87103 	 * The index size is 16b for RoCE path and 24b for L2 and Engine
87104 	 * paths. Any unused bits should be written as zero.
87105 	 *
87106 	 * The index unit is 16B for L2 path. For RoCE there is a legacy
87107 	 * mode with 128B unit size and a variable size mode with 16B
87108 	 * unit size. For Engine mode, the unit size is 16B, where RQEs
87109 	 * are always 128B - so it always increments by eight 16B slots
87110 	 * per RQE.
87111 	 *
87112 	 * > This field is not used by the older versions of the chip,
87113 	 * > but is used in this and future revisions of the chip. In
87114 	 * > older versions of the chip, the driver is required to
87115 	 * > complete the push doorbell operation by following it with a
87116 	 * > regular doorbell which will be used to properly increment
87117 	 * > the producer index. This extra doorbell write is not needed
87118 	 * > on this and future versions of the chip.
87119 	 */
87120 	#define DB_PUSH_START_DB_INDEX_MASK	UINT32_C(0xffffff)
87121 	#define DB_PUSH_START_DB_INDEX_SFT	0
87122 	/*
87123 	 * This value is the PI index (lower 8bits) within 4K DPI
87124 	 * associated with push write. It is the doorbell page that
87125 	 * contains the WCB that will be used.
87126 	 */
87127 	#define DB_PUSH_START_DB_PI_LO_MASK	UINT32_C(0xff000000)
87128 	#define DB_PUSH_START_DB_PI_LO_SFT	24
87129 	/*
87130 	 * This value identifies the resource that the doorbell is
87131 	 * intended to notify.
87132 	 *
87133 	 * This is the QPID.
87134 	 */
87135 	#define DB_PUSH_START_DB_XID_MASK	UINT32_C(0xfffff00000000)L
87136 	#define DB_PUSH_START_DB_XID_SFT	32
87137 	/*
87138 	 * This value is the PI index (upper 4bits) within 4K DPI
87139 	 * associated with push write. It is the doorbell page that
87140 	 * contains the WCB that will be used.
87141 	 */
87142 	#define DB_PUSH_START_DB_PI_HI_MASK	UINT32_C(0xf0000000000000)L
87143 	#define DB_PUSH_START_DB_PI_HI_SFT	52
87144 	/* This value identifies the type of doorbell being written. */
87145 	#define DB_PUSH_START_DB_TYPE_MASK	UINT32_C(0xf000000000000000)L
87146 	#define DB_PUSH_START_DB_TYPE_SFT	60
87147 	/*
87148 	 * This is a SQ producer index update for Push. It indicates
87149 	 * one or more new entries have been written to the SQ for
87150 	 * the QPID indicated on the `xid` field.
87151 	 */
87152 		#define DB_PUSH_START_DB_TYPE_PUSH_START  (UINT32_C(0xc)L << 60)
87153 	/*
87154 	 * This is a SQ producer index update for Push. It indicates
87155 	 * one or more new entries have been written to the SQ for
87156 	 * the QPID indicated on the `xid` field.
87157 	 */
87158 		#define DB_PUSH_START_DB_TYPE_PUSH_END	(UINT32_C(0xd)L << 60)
87159 		#define DB_PUSH_START_DB_TYPE_LAST	DB_PUSH_START_DB_TYPE_PUSH_END
87160 } db_push_start_t, *pdb_push_start_t;
87161 
87162 /*
87163  * This is the 64b Push End doorbell format. The host writes this message
87164  * format directly to offset of each push associated WCB (write combine
87165  * buffer) within doorbell page. WCB#0 = offset 16, WCB#1 = offset 24,
87166  * WCB#2 = offset 32, ... The start doorbell is followed by write
87167  * combining data to the WCB and then that is followed by a end doorbell.
87168  */
87169 /* db_push_end (size:64b/8B) */
87170 
87171 typedef struct db_push_end {
87172 	uint64_t	db;
87173 	/*
87174 	 * This is the producer index and should be the queue index of
87175 	 * the last WQE written plus the length field contained in that
87176 	 * WQE. For example, if the length is 8 index units and the WQE
87177 	 * was written to the first location in the queue (zero), this
87178 	 * index should be written to 8. The index should point to the
87179 	 * start of the first location that has not been filled in with
87180 	 * WQE data.
87181 	 *
87182 	 * For L2 and Engine SQ, the index unit is 16B. For RoCE there
87183 	 * are two modes. For Legacy fixed size RQE mode, the unit is
87184 	 * 128B. For variable size RQE mode, the unit is 16B.
87185 	 *
87186 	 * The index size is 24b for L2 and engine paths and 16b for the
87187 	 * RoCE path. Unused bits should be written as zero.
87188 	 *
87189 	 * > In past revisions of this chip, this field was the push
87190 	 * > index rather than the producer index. For this version of
87191 	 * > the chip and future versions of the chip, this field must be
87192 	 * > the producer index, as described above.
87193 	 * >
87194 	 * > Also, in past revisions of this chip, an additional
87195 	 * > doorbell write was needed to communicate the producer index.
87196 	 * > In this and future versions of the chip, this extra doorbell
87197 	 * > write is no longer needed.
87198 	 */
87199 	#define DB_PUSH_END_DB_INDEX_MASK	UINT32_C(0xffffff)
87200 	#define DB_PUSH_END_DB_INDEX_SFT	0
87201 	/*
87202 	 * This value is the PI index (lower 8bits) within 4K DPI
87203 	 * associated with push write. It is the doorbell page that
87204 	 * contains the WCB that will be used.
87205 	 */
87206 	#define DB_PUSH_END_DB_PI_LO_MASK	UINT32_C(0xff000000)
87207 	#define DB_PUSH_END_DB_PI_LO_SFT	24
87208 	/*
87209 	 * This value identifies the resource that the doorbell is
87210 	 * intended to notify.
87211 	 *
87212 	 * This is the QPID.
87213 	 */
87214 	#define DB_PUSH_END_DB_XID_MASK	UINT32_C(0xfffff00000000)L
87215 	#define DB_PUSH_END_DB_XID_SFT	32
87216 	/*
87217 	 * This value is the PI index (upper 4bits) within 4K DPI
87218 	 * associated with push write. It is the doorbell page that
87219 	 * contains the WCB that will be used.
87220 	 */
87221 	#define DB_PUSH_END_DB_PI_HI_MASK	UINT32_C(0xf0000000000000)L
87222 	#define DB_PUSH_END_DB_PI_HI_SFT	52
87223 	/*
87224 	 * This value defines the intended doorbell path between RoCE and
87225 	 * L2.
87226 	 */
87227 	#define DB_PUSH_END_DB_PATH_MASK	UINT32_C(0x300000000000000)L
87228 	#define DB_PUSH_END_DB_PATH_SFT	56
87229 	/* This is a RoCE doorbell message. */
87230 		#define DB_PUSH_END_DB_PATH_ROCE	(UINT32_C(0x0)L << 56)
87231 	/* This is a L2 doorbell message. */
87232 		#define DB_PUSH_END_DB_PATH_L2	(UINT32_C(0x1)L << 56)
87233 	/* Engine path doorbell. */
87234 		#define DB_PUSH_END_DB_PATH_ENGINE	(UINT32_C(0x2)L << 56)
87235 		#define DB_PUSH_END_DB_PATH_LAST	DB_PUSH_END_DB_PATH_ENGINE
87236 	/*
87237 	 * When this bit is set to one, the chip will capture debug
87238 	 * information for the doorbell ring. This is intended to only be
87239 	 * used on SQ doorbell rings.
87240 	 */
87241 	#define DB_PUSH_END_DB_DEBUG_TRACE	UINT32_C(0x800000000000000)L
87242 	/* This value identifies the type of doorbell being written. */
87243 	#define DB_PUSH_END_DB_TYPE_MASK	UINT32_C(0xf000000000000000)L
87244 	#define DB_PUSH_END_DB_TYPE_SFT	60
87245 	/*
87246 	 * This is a SQ producer index update for Push. It indicates
87247 	 * one or more new entries have been written to the SQ for
87248 	 * the QPID indicated on the `xid` field.
87249 	 */
87250 		#define DB_PUSH_END_DB_TYPE_PUSH_START   (UINT32_C(0xc)L << 60)
87251 	/*
87252 	 * This is a SQ producer index update for Push. It indicates
87253 	 * one or more new entries have been written to the SQ for
87254 	 * the QPID indicated on the `xid` field.
87255 	 */
87256 		#define DB_PUSH_END_DB_TYPE_PUSH_END	(UINT32_C(0xd)L << 60)
87257 		#define DB_PUSH_END_DB_TYPE_LAST	DB_PUSH_END_DB_TYPE_PUSH_END
87258 } db_push_end_t, *pdb_push_end_t;
87259 
87260 /*
87261  * This is the Push information that is the second 8B of the Push
87262  * Doorbell.
87263  */
87264 /* db_push_info (size:64b/8B) */
87265 
87266 typedef struct db_push_info {
87267 	uint32_t	push_size_push_index;
87268 	/*
87269 	 * This value is the index for the push being started. For
87270 	 * example, if the push_size is 8 index units and the WQE was
87271 	 * written to the first location in the queue (zero), this
87272 	 * push_index should be written to 0. The push_index should point
87273 	 * to the start of the first location that the push is started.
87274 	 *
87275 	 * The push_index unit is 16B, except in RoCE legacy WQE mode, in
87276 	 * which case the unit is 128B.
87277 	 *
87278 	 * The push_index size is 24b for L2 and 16b for the RoCE path.
87279 	 * Unused bits should be written as zero.
87280 	 */
87281 	#define DB_PUSH_INFO_PUSH_INDEX_MASK UINT32_C(0xffffff)
87282 	#define DB_PUSH_INFO_PUSH_INDEX_SFT 0
87283 	/*
87284 	 * This value defines the size of push. The unit is 8B. The value
87285 	 * 0 means 256B size of push. The push write is done in 8B units
87286 	 * by the SW.
87287 	 *
87288 	 * Note: For packet rate performance reasons, it is recommended
87289 	 * that SW aligns push requests with a granularity of 16B.
87290 	 */
87291 	#define DB_PUSH_INFO_PUSH_SIZE_MASK UINT32_C(0x1f000000)
87292 	#define DB_PUSH_INFO_PUSH_SIZE_SFT  24
87293 	uint32_t	reserved32;
87294 } db_push_info_t, *pdb_push_info_t;
87295 
87296 /*
87297  * This is the "Absolute" 32b Doorbell format. The host writes this
87298  * message format directly to byte offset 0xC of the appropriate
87299  * doorbell page.
87300  *
87301  * Absolute doorbells are supported for only a limited number of
87302  * functions and for a limited number of xID values within each
87303  * function.
87304  *
87305  * Doorbell recovery can be supported for absolute 32b doorbells.
87306  */
87307 /* dbc_absolute_db_32 (size:32b/4B) */
87308 
87309 typedef struct dbc_absolute_db_32 {
87310 	uint32_t	index;
87311 	/*
87312 	 * This value is the index being written. For SQ, RQ, SRQ, this is
87313 	 * the producer index and should be the queue index of the last WQE
87314 	 * or BD written plus the length field contained in that WQE/BD.
87315 	 * For example, if the length is 8 index units and the WQE was
87316 	 * written to the first location in the queue (zero), this index
87317 	 * should be written to 8. The index should point to the start of
87318 	 * the first location that has not been filled in with WQE/BD data.
87319 	 *
87320 	 * For CQ, this is the consumer index and should be the starting
87321 	 * queue index of the last CQE processed plus the size of the last
87322 	 * processed CQE in index units. The index should point to the start
87323 	 * of the first CQE in the queue that has not been processed.
87324 	 *
87325 	 * For NQ, this is the consumer index and should be the starting
87326 	 * queue index of the last NQE processed plus the size of the last
87327 	 * processed NQE in index units. The index should point to the start
87328 	 * of the first NQE in the queue that has not been processed.
87329 	 *
87330 	 * For L2 and Engine SQ, the index unit is 16B. For RoCE there are
87331 	 * two modes. For Legacy fixed size RQE mode, the unit is 128B. For
87332 	 * variable size RQE mode, the unit is 16B. For RoCE and engine CQs,
87333 	 * the index unit is 32B. For L2 CQs, the index unit is 16B.
87334 	 *
87335 	 * For NQ this is the consumer index and the unit is always 16B of
87336 	 * queue space.
87337 	 *
87338 	 * The index size is 16b for all queue types. This limits the size
87339 	 * of some queues when absolute doorbells are in use. Unused bits
87340 	 * should be written as zero.
87341 	 */
87342 	#define DBC_ABSOLUTE_DB_32_INDEX_MASK	UINT32_C(0xffff)
87343 	#define DBC_ABSOLUTE_DB_32_INDEX_SFT	0
87344 	/*
87345 	 * The epoch bit provides a frame of reference for the queue index.
87346 	 * S/W will toggle this bit in the doorbell each time index range is
87347 	 * wrapped. This allows the receiving HW block to more efficiently
87348 	 * detect out-of-order doorbells and to ignore the older doorbells.
87349 	 * Out-of-order doorbells occur normally during dropped doorbell
87350 	 * recovery.
87351 	 */
87352 	#define DBC_ABSOLUTE_DB_32_EPOCH	UINT32_C(0x10000)
87353 	/*
87354 	 * The toggle value is used in CQ_ARMENA, CQ_ARMSE, CQ_ARMALL,
87355 	 * SRQ_ARMENA, SRQ_ARM, and CQ_CUTOFF_ACK doorbells to qualify the
87356 	 * doorbell as valid. This value should be taken from the latest NQE
87357 	 * or cutoff completion.
87358 	 *
87359 	 * Doorbells of the above types with the wrong toggle value will be
87360 	 * ignored. This is how old values in of backup doorbells are
87361 	 * ignored.
87362 	 */
87363 	#define DBC_ABSOLUTE_DB_32_TOGGLE_MASK	UINT32_C(0x60000)
87364 	#define DBC_ABSOLUTE_DB_32_TOGGLE_SFT	17
87365 	/*
87366 	 * This value identifies the resource that the doorbell is intended
87367 	 * to notify.
87368 	 *
87369 	 * This is a "modified" xID value. The DBR block will convert this
87370 	 * value into the full xID value by looking up the base xID for this
87371 	 * particular function and adding the mxID value to that base value.
87372 	 */
87373 	#define DBC_ABSOLUTE_DB_32_MXID_MASK	UINT32_C(0x1f80000)
87374 	#define DBC_ABSOLUTE_DB_32_MXID_SFT	19
87375 	/*
87376 	 * This value defines the intended doorbell path between RoCE and
87377 	 * L2.
87378 	 */
87379 	#define DBC_ABSOLUTE_DB_32_PATH_MASK	UINT32_C(0x6000000)
87380 	#define DBC_ABSOLUTE_DB_32_PATH_SFT	25
87381 	/* This is a RoCE doorbell message. */
87382 		#define DBC_ABSOLUTE_DB_32_PATH_ROCE	(UINT32_C(0x0) << 25)
87383 	/* This is a L2 doorbell message. */
87384 		#define DBC_ABSOLUTE_DB_32_PATH_L2	(UINT32_C(0x1) << 25)
87385 		#define DBC_ABSOLUTE_DB_32_PATH_LAST	DBC_ABSOLUTE_DB_32_PATH_L2
87386 	/*
87387 	 * This indicates it is valid doorbell update. It should be set for
87388 	 * each doorbell written to the chip and set when doorbell message is
87389 	 * written to the backup doorbell location. The bit should be cleared
87390 	 * in the backup doorbell location at time zero to indicate that the
87391 	 * backup doorbell has not yet been written.
87392 	 */
87393 	#define DBC_ABSOLUTE_DB_32_VALID	UINT32_C(0x8000000)
87394 	/* This value identifies the type of doorbell being written. */
87395 	#define DBC_ABSOLUTE_DB_32_TYPE_MASK	UINT32_C(0xf0000000)
87396 	#define DBC_ABSOLUTE_DB_32_TYPE_SFT	28
87397 	/*
87398 	 * This is a SQ producer index update. It indicates one or more
87399 	 * new entries have been written to the SQ for the QPID indicated
87400 	 * on the xID field. This type is valid for L2, RoCE and Engine
87401 	 * path.
87402 	 */
87403 		#define DBC_ABSOLUTE_DB_32_TYPE_SQ	(UINT32_C(0x0) << 28)
87404 	/*
87405 	 * This is a RQ producer index update. It indicates one or more
87406 	 * new entries have been written to the RQ for the QPID indicated
87407 	 * on the xID field. This type is valid for RoCE path.
87408 	 */
87409 		#define DBC_ABSOLUTE_DB_32_TYPE_RQ	(UINT32_C(0x1) << 28)
87410 	/*
87411 	 * This is a SRQ producer index update. It indicates one or more
87412 	 * new entries have been written to the SRQ for the SID indicated
87413 	 * on the xID field. This type is valid for L2 and RoCE path.
87414 	 */
87415 		#define DBC_ABSOLUTE_DB_32_TYPE_SRQ	(UINT32_C(0x2) << 28)
87416 	/*
87417 	 * This doorbell command arms the SRQ async event.
87418 	 * The xID field must identify the SID that is begin armed.
87419 	 * The index field is will set the arm threshold such that
87420 	 * a notification will be generated if less than that number
87421 	 * or SRQ entries are posted. This type is valid for RoCE path.
87422 	 */
87423 		#define DBC_ABSOLUTE_DB_32_TYPE_SRQ_ARM	(UINT32_C(0x3) << 28)
87424 	/*
87425 	 * This is a CQ consumer index update. It indicates one or more
87426 	 * entries have been processed off the CQ indicated on the xID
87427 	 * field.This type is valid for L2, RoCE and Engine path.
87428 	 */
87429 		#define DBC_ABSOLUTE_DB_32_TYPE_CQ	(UINT32_C(0x4) << 28)
87430 	/*
87431 	 * this is a CQ consumer index update that also arms the CQ for
87432 	 * solicited events. This type is valid for RoCE path.
87433 	 */
87434 		#define DBC_ABSOLUTE_DB_32_TYPE_CQ_ARMSE	(UINT32_C(0x5) << 28)
87435 	/*
87436 	 * This is a CQ consumer index update that also arms the CQ
87437 	 * for any new CQE. This type is valid for L2, RoCE and Engine
87438 	 * path.
87439 	 */
87440 		#define DBC_ABSOLUTE_DB_32_TYPE_CQ_ARMALL   (UINT32_C(0x6) << 28)
87441 	/*
87442 	 * This is a CQ arm enable message. This message must be sent from
87443 	 * the privileged driver before a new CQ_ARMSE or CQ_ARMALL message
87444 	 * will be accepted from user space (non-privileged doorbell page).
87445 	 * The index and epoch for this doorbell type are unused.
87446 	 *
87447 	 * This doorbell can only be sent from the privileged (first)
87448 	 * doorbell page of a function.
87449 	 */
87450 		#define DBC_ABSOLUTE_DB_32_TYPE_CQ_ARMENA   (UINT32_C(0x7) << 28)
87451 	/*
87452 	 * This doorbell command enables the SRQ async event to be armed.
87453 	 * This message must be sent from the privileged driver before a
87454 	 * new SRQ_ARM message will be accepted from user space.
87455 	 * The xID field must identify the SID that is being enabled for
87456 	 * arm. The index and epoch for this doorbell type are unused.
87457 	 *
87458 	 * This doorbell can only be sent from the privileged (first)
87459 	 * doorbell page of a function.
87460 	 */
87461 		#define DBC_ABSOLUTE_DB_32_TYPE_SRQ_ARMENA  (UINT32_C(0x8) << 28)
87462 	/*
87463 	 * This is a NQ consumer index update. It indicates one or more
87464 	 * entries have been processed off the NQ indicated on the xID
87465 	 * field. This type is valid for L2, RoCE and Engine path.
87466 	 */
87467 		#define DBC_ABSOLUTE_DB_32_TYPE_NQ	(UINT32_C(0xa) << 28)
87468 	/*
87469 	 * This is a NQ consumer index update that also arms the NQ for
87470 	 * any new NQE. This type is valid for L2, RoCE and Engine path.
87471 	 */
87472 		#define DBC_ABSOLUTE_DB_32_TYPE_NQ_ARM	(UINT32_C(0xb) << 28)
87473 	/*
87474 	 * This is a NQ consumer index update that also arms the NQ for
87475 	 * any new NQE. It is used for the legacy INT mask. This type
87476 	 * is valid for L2, RoCE and Engine path.
87477 	 */
87478 		#define DBC_ABSOLUTE_DB_32_TYPE_NQ_MASK	(UINT32_C(0xe) << 28)
87479 	/*
87480 	 * This doorbell command is used during doorbell moderation
87481 	 * to consume system BW and help prevent doorbell FIFO
87482 	 * overflow.
87483 	 *
87484 	 * All other fields should be zero for NULL doorbell.
87485 	 * For doorbell recovery, NULL doorbell type in the Application
87486 	 * table indicates that it is the last QP entry for the function.
87487 	 * This type is valid for L2, RoCE and Engine path.
87488 	 */
87489 		#define DBC_ABSOLUTE_DB_32_TYPE_NULL	(UINT32_C(0xf) << 28)
87490 		#define DBC_ABSOLUTE_DB_32_TYPE_LAST	DBC_ABSOLUTE_DB_32_TYPE_NULL
87491 } dbc_absolute_db_32_t, *pdbc_absolute_db_32_t;
87492 
87493 /*
87494  * This is the "Relative" 32b Doorbell format. The host writes this
87495  * message format directly to byte offset 8 of the appropriate doorbell
87496  * page.
87497  *
87498  * Doorbell recovery can not be supported for relative doorbells. So
87499  * relative doorbells are only safe to use when SOC is supporting the
87500  * context backing store in local DDR. If that is the case, it is safe
87501  * to turn off doorbell drops and use this type of doorbell.
87502  */
87503 /* dbc_relative_db_32 (size:32b/4B) */
87504 
87505 typedef struct dbc_relative_db_32 {
87506 	uint32_t	xid;
87507 	/*
87508 	 * This value identifies the resource that the doorbell is intended
87509 	 * to notify.
87510 	 *
87511 	 * For SQ, this is the QPID value.
87512 	 */
87513 	#define DBC_RELATIVE_DB_32_XID_MASK	UINT32_C(0xfffff)
87514 	#define DBC_RELATIVE_DB_32_XID_SFT	0
87515 	/*
87516 	 * This value defines the intended doorbell path between RoCE and
87517 	 * L2.
87518 	 */
87519 	#define DBC_RELATIVE_DB_32_PATH_MASK	UINT32_C(0xc00000)
87520 	#define DBC_RELATIVE_DB_32_PATH_SFT	22
87521 	/* This is a RoCE doorbell message. */
87522 		#define DBC_RELATIVE_DB_32_PATH_ROCE	(UINT32_C(0x0) << 22)
87523 	/* This is a L2 doorbell message. */
87524 		#define DBC_RELATIVE_DB_32_PATH_L2	(UINT32_C(0x1) << 22)
87525 		#define DBC_RELATIVE_DB_32_PATH_LAST	DBC_RELATIVE_DB_32_PATH_L2
87526 	/*
87527 	 * This value is the value to add to the appropriate index value.
87528 	 *
87529 	 * The increment unit is 16B for L2 path. For RoCE there is a
87530 	 * legacy mode with 128B unit size and a variable size mode with
87531 	 * 32B unit size. For Engine mode, the unit size is always 128B.
87532 	 */
87533 	#define DBC_RELATIVE_DB_32_INCR_MASK	UINT32_C(0x1f000000)
87534 	#define DBC_RELATIVE_DB_32_INCR_SFT	24
87535 	/* This value identifies the type of doorbell being written. */
87536 	#define DBC_RELATIVE_DB_32_TYPE_MASK	UINT32_C(0xe0000000)
87537 	#define DBC_RELATIVE_DB_32_TYPE_SFT	29
87538 	/*
87539 	 * This is a SQ producer index update. It indicates one or more
87540 	 * new entries have been written to the SQ for the QPID indicated
87541 	 * on the xID field. This type is valid for L2, RoCE and Engine
87542 	 * path.
87543 	 */
87544 		#define DBC_RELATIVE_DB_32_TYPE_SQ	(UINT32_C(0x0) << 29)
87545 	/*
87546 	 * This is a SRQ producer index update. It indicates one or more
87547 	 * new entries have been written to the SRQ for the SID indicated
87548 	 * on the xID field. This type is valid for L2 and RoCE path.
87549 	 */
87550 		#define DBC_RELATIVE_DB_32_TYPE_SRQ	(UINT32_C(0x1) << 29)
87551 	/*
87552 	 * This is a CQ consumer index update. It indicates one or more
87553 	 * entries have been processed off the CQ indicated on the xID
87554 	 * field.This type is valid for L2, RoCE and Engine path.
87555 	 */
87556 		#define DBC_RELATIVE_DB_32_TYPE_CQ	(UINT32_C(0x2) << 29)
87557 	/*
87558 	 * This is a CQ consumer index update that also arms the CQ
87559 	 * for any new CQE. This type is valid for L2, RoCE and Engine
87560 	 * path.
87561 	 */
87562 		#define DBC_RELATIVE_DB_32_TYPE_CQ_ARMALL  (UINT32_C(0x3) << 29)
87563 	/*
87564 	 * This is a NQ consumer index update. It indicates one or more
87565 	 * entries have been processed off the NQ indicated on the xID
87566 	 * field. This type is valid for L2, RoCE and Engine path.
87567 	 */
87568 		#define DBC_RELATIVE_DB_32_TYPE_NQ	(UINT32_C(0x4) << 29)
87569 	/*
87570 	 * This is a NQ consumer index update that also arms the NQ for
87571 	 * any new NQE. This type is valid for L2, RoCE and Engine path.
87572 	 */
87573 		#define DBC_RELATIVE_DB_32_TYPE_NQ_ARM	(UINT32_C(0x5) << 29)
87574 	/*
87575 	 * This is a NQ consumer index update that also arms the NQ for
87576 	 * any new NQE. It is used for the legacy INT mask. This type
87577 	 * is valid for L2, RoCE and Engine path.
87578 	 */
87579 		#define DBC_RELATIVE_DB_32_TYPE_NQ_MASK	(UINT32_C(0x6) << 29)
87580 		#define DBC_RELATIVE_DB_32_TYPE_LAST	DBC_RELATIVE_DB_32_TYPE_NQ_MASK
87581 } dbc_relative_db_32_t, *pdbc_relative_db_32_t;
87582 
87583 /*
87584  * The kernel memory structure is per-type (SQ, RQ, SRQ/SRQ_ARM and
87585  * CQ/CQ_ARMSE/CQ_ARMALL). Each kernel driver will support a table for
87586  * the doorbell recovery.
87587  */
87588 /* dbc_drk (size:128b/16B) */
87589 
87590 typedef struct dbc_drk {
87591 	uint32_t	db_format_linked_last_valid_stride_size;
87592 	/*
87593 	 * This indicates it is valid entry. It should be set for each
87594 	 * doorbell written to the chip. The bit should be cleared at time
87595 	 * zero to indicate that it has not yet been written. The bit i
87596 	 * should be cleared when the function for the table is disabled.
87597 	 */
87598 	#define DBC_DRK_VALID	UINT32_C(0x1)
87599 	/* This indicates it is last entry for the table. */
87600 	#define DBC_DRK_LAST	UINT32_C(0x2)
87601 	/* This indicates it is entry for the next 4KB kernel memory pointer. */
87602 	#define DBC_DRK_LINKED	UINT32_C(0x4)
87603 	/*
87604 	 * This field indicates if the doorbells in the table are 32b
87605 	 * absolute or 64b format.
87606 	 */
87607 	#define DBC_DRK_DB_FORMAT	UINT32_C(0x8)
87608 	/* The doorbells are 64b format. */
87609 		#define DBC_DRK_DB_FORMAT_B64   (UINT32_C(0x0) << 3)
87610 	/*
87611 	 * The doorbells are in the absolute 32b format. The doorbell
87612 	 * is in the right-most half of the 64b space provided in the
87613 	 * application table entry.
87614 	 */
87615 		#define DBC_DRK_DB_FORMAT_B32A  (UINT32_C(0x1) << 3)
87616 		#define DBC_DRK_DB_FORMAT_LAST DBC_DRK_DB_FORMAT_B32A
87617 	/*
87618 	 * This field controls the stride feature. The stride feature is
87619 	 * more bandwidth efficient on the PCIE bus when only a small number
87620 	 * of doorbells are used in each cache line.
87621 	 */
87622 	#define DBC_DRK_STRIDE_MASK   UINT32_C(0x300)
87623 	#define DBC_DRK_STRIDE_SFT	8
87624 	/*
87625 	 * When stride is off, the DBR will read all the bytes in
87626 	 * an application page until a NULL doorbell is found or
87627 	 * the end of the 4K page is reached.
87628 	 */
87629 		#define DBC_DRK_STRIDE_OFF	(UINT32_C(0x0) << 8)
87630 	/*
87631 	 * When stride is 1, the DBR will read the 'size' doorbells,
87632 	 * starting at the next 64B cache line boundary or until
87633 	 * a NULL doorbell is found in the application page or
87634 	 * the end of the 4K page is reached.
87635 	 */
87636 		#define DBC_DRK_STRIDE_SZ64	(UINT32_C(0x1) << 8)
87637 	/*
87638 	 * When stride is 2, the DBR will read the 'size' doorbells,
87639 	 * starting at the next 128B cache line boundary or until
87640 	 * a NULL doorbell is found in the application page or
87641 	 * the end of the 4K page is reached.
87642 	 */
87643 		#define DBC_DRK_STRIDE_SZ128	(UINT32_C(0x2) << 8)
87644 		#define DBC_DRK_STRIDE_LAST	DBC_DRK_STRIDE_SZ128
87645 	/*
87646 	 * This value controls how many doorbells are read at each stride
87647 	 * when stride mode is in use.
87648 	 */
87649 	#define DBC_DRK_SIZE_MASK	UINT32_C(0xc00)
87650 	#define DBC_DRK_SIZE_SFT	10
87651 	/* 4*8B is read at the start of each stride. */
87652 		#define DBC_DRK_SIZE_FOUR	(UINT32_C(0x0) << 10)
87653 	/* 1*8B is read at the start of each stride. */
87654 		#define DBC_DRK_SIZE_ONE	(UINT32_C(0x1) << 10)
87655 	/* 2*8B is read at the start of each stride. */
87656 		#define DBC_DRK_SIZE_TWO	(UINT32_C(0x2) << 10)
87657 	/* 3*8B is read at the start of each stride. */
87658 		#define DBC_DRK_SIZE_THREE	(UINT32_C(0x3) << 10)
87659 		#define DBC_DRK_SIZE_LAST	DBC_DRK_SIZE_THREE
87660 	uint32_t	pi;
87661 	/*
87662 	 * Page Index portion of DPI{VF_VALID,VFID,PI}. The pi needs to match
87663 	 * the value from the context DPI for the operation to be valid or
87664 	 * the pi must be zero, indicating a write from the privileged
87665 	 * driver.
87666 	 *
87667 	 * pi in the kernel memory table is there for DBR to generate the DPI
87668 	 * message to the client.
87669 	 */
87670 	#define DBC_DRK_PI_MASK UINT32_C(0xffff)
87671 	#define DBC_DRK_PI_SFT 0
87672 	/*
87673 	 * It is the application memory page(4KB) pointer when linked = 0.
87674 	 * It is the next kernel memory page(4KB) pointer when linked = 1.
87675 	 * The pointer doesn't have to be aligned to the page(4KB) but it
87676 	 * should be aligned to 128B boundary. This means that the bottom
87677 	 * 7b of the pointer must be zero.
87678 	 */
87679 	uint64_t	memptr;
87680 } dbc_drk_t, *pdbc_drk_t;
87681 
87682 /*
87683  * This is the 64b doorbell format. The host writes this message
87684  * format directly to byte offset 0 of the appropriate doorbell page.
87685  */
87686 /* dbc_dbc_v3 (size:64b/8B) */
87687 
87688 typedef struct dbc_dbc_v3 {
87689 	uint32_t	index;
87690 	/*
87691 	 * This value is the index being written.
87692 	 *
87693 	 * For SQ/RQ/SRQ, this is the producer index. It should be set to
87694 	 * the queue index of the last WQE/BD written plus the number of
87695 	 * index units in the WQE/BD. For example, if the number of index
87696 	 * units in an SQ WQE is 8 and the WQE was written to the first
87697 	 * location in the queue (zero), this index should be written to 8.
87698 	 * The index should point to the start of the first location that
87699 	 * has not been filled in with WQE/BD data. For SQ (both RoCE and
87700 	 * L2), the index unit is 16B. For RQ/SRQ, the index unit is 1 WQE
87701 	 * (RoCE) or 1 BD (L2).
87702 	 *
87703 	 * For CQ, this is the consumer index and should be the starting
87704 	 * queue index of the last CQE processed plus the size of the last
87705 	 * processed CQE in index units. The index should point to the
87706 	 * start of the first CQE in the queue that has not been processed.
87707 	 * The index unit is 16B.
87708 	 *
87709 	 * For NQ, this is the consumer index and should be the starting
87710 	 * queue index of the last NQE processed plus the size of the last
87711 	 * processed NQE in index units. The index should point to the
87712 	 * start of the first NQE in the queue that has not been processed.
87713 	 * The index unit is 16B.
87714 	 */
87715 	#define DBC_DBC_V3_INDEX_MASK UINT32_C(0xffffff)
87716 	#define DBC_DBC_V3_INDEX_SFT  0
87717 	/*
87718 	 * The epoch bit provides a frame of reference for the queue index.
87719 	 * S/W will toggle this bit in the doorbell each time index range is
87720 	 * wrapped. This allows the receiving HW block to more efficiently
87721 	 * detect out-of-order doorbells and to ignore the older doorbells.
87722 	 * Out-of-order doorbells occur normally during dropped doorbell
87723 	 * recovery.
87724 	 */
87725 	#define DBC_DBC_V3_EPOCH	UINT32_C(0x1000000)
87726 	/*
87727 	 * The toggle value is used in CQ_ARMENA, CQ_ARMSE, CQ_ARMALL,
87728 	 * SRQ_ARMENA, SRQ_ARM, and CQ_CUTOFF_ACK doorbells to qualify the
87729 	 * doorbell as valid. This value should be taken from the latest
87730 	 * NQE or cutoff completion.
87731 	 *
87732 	 * Doorbells of the above types with the wrong toggle value will
87733 	 * be ignored. This is how old values in of backup doorbells
87734 	 * are ignored.
87735 	 */
87736 	#define DBC_DBC_V3_TOGGLE_MASK UINT32_C(0x6000000)
87737 	#define DBC_DBC_V3_TOGGLE_SFT 25
87738 	uint32_t	type_path_xid;
87739 	/*
87740 	 * This value identifies the resource that the doorbell is intended
87741 	 * to notify.
87742 	 *
87743 	 * For SQ and RQ, this is the QPID. For SRQ, this is the SID. For
87744 	 * CQ, this is the CID. For NQ, this is the NID.
87745 	 *
87746 	 * Unused bits (for example bits [11:7] of the SID value) must be
87747 	 * zero.
87748 	 */
87749 	#define DBC_DBC_V3_XID_MASK	UINT32_C(0xfff)
87750 	#define DBC_DBC_V3_XID_SFT	0
87751 	/*
87752 	 * This value defines the intended doorbell path between RoCE and
87753 	 * L2.
87754 	 */
87755 	#define DBC_DBC_V3_PATH_MASK	UINT32_C(0x3000000)
87756 	#define DBC_DBC_V3_PATH_SFT	24
87757 	/* This is a RoCE doorbell message. */
87758 		#define DBC_DBC_V3_PATH_ROCE	(UINT32_C(0x0) << 24)
87759 	/* This is a L2 doorbell message. */
87760 		#define DBC_DBC_V3_PATH_L2		(UINT32_C(0x1) << 24)
87761 		#define DBC_DBC_V3_PATH_LAST	DBC_DBC_V3_PATH_L2
87762 	/*
87763 	 * This indicates it is valid doorbell update. It should be set for
87764 	 * each doorbell written to the chip and set when doorbell message is
87765 	 * written to the backup doorbell location. The bit should be cleared
87766 	 * in the backup doorbell location at time zero to indicate that the
87767 	 * backup doorbell has not yet been written.
87768 	 */
87769 	#define DBC_DBC_V3_VALID		UINT32_C(0x4000000)
87770 	/*
87771 	 * When this bit is set to one, the chip will capture debug
87772 	 * information for the doorbell ring. This is intended to only be
87773 	 * used on SQ doorbell rings.
87774 	 */
87775 	#define DBC_DBC_V3_DEBUG_TRACE	UINT32_C(0x8000000)
87776 	/* This value identifies the type of doorbell being written. */
87777 	#define DBC_DBC_V3_TYPE_MASK	UINT32_C(0xf0000000)
87778 	#define DBC_DBC_V3_TYPE_SFT	28
87779 	/*
87780 	 * This is a SQ producer index update. It indicates one or more
87781 	 * new entries have been written to the SQ for the QPID indicated
87782 	 * on the xID field. This type is valid for L2 and RoCE path.
87783 	 */
87784 		#define DBC_DBC_V3_TYPE_SQ		(UINT32_C(0x0) << 28)
87785 	/*
87786 	 * This is a RQ producer index update. It indicates one or more
87787 	 * new entries have been written to the RQ for the QPID indicated
87788 	 * on the xID field. This type is valid for RoCE path.
87789 	 */
87790 		#define DBC_DBC_V3_TYPE_RQ		(UINT32_C(0x1) << 28)
87791 	/*
87792 	 * This is a SRQ producer index update. It indicates one or more
87793 	 * new entries have been written to the SRQ for the SID indicated
87794 	 * on the xID field. This type is valid for L2 and RoCE path.
87795 	 */
87796 		#define DBC_DBC_V3_TYPE_SRQ		(UINT32_C(0x2) << 28)
87797 	/*
87798 	 * This doorbell command arms the SRQ async event. The xID field
87799 	 * must identify the SID that is begin armed. The index field is
87800 	 * will set the arm threshold such that a notification will be
87801 	 * generated if less than that number or SRQ entries are posted.
87802 	 *
87803 	 * This type is valid for RoCE path.
87804 	 */
87805 		#define DBC_DBC_V3_TYPE_SRQ_ARM	(UINT32_C(0x3) << 28)
87806 	/*
87807 	 * CQ doorbell is used to update the consumer index for the CQ
87808 	 * for overflow detection. It should only be sent if overflow
87809 	 * detection is enabled for the CQ. Keep in mind that if
87810 	 * doorbells are being dropped due to PCIE ordering rules, you
87811 	 * may get a false overflow detection if you are checking for CQ
87812 	 * overflow.
87813 	 *
87814 	 * This type is valid for L2 and RoCE path.
87815 	 */
87816 		#define DBC_DBC_V3_TYPE_CQ		(UINT32_C(0x4) << 28)
87817 	/*
87818 	 * This is a CQ consumer index update that also arms the CQ for
87819 	 * solicited events. This is for roce only not for l2.
87820 	 *
87821 	 * The index is used as the location of the last CQE that was
87822 	 * processed by the driver. The new interrupt will be generated
87823 	 * based on this location.
87824 	 *
87825 	 * This type is valid for RoCE path.
87826 	 */
87827 		#define DBC_DBC_V3_TYPE_CQ_ARMSE	(UINT32_C(0x5) << 28)
87828 	/*
87829 	 * This is a CQ consumer index update that also arms the CQ for
87830 	 * any new CQE.
87831 	 *
87832 	 * The index is used as the location of the last CQE that was
87833 	 * processed by the driver. The new interrupt will be generated
87834 	 * based on this location.
87835 	 *
87836 	 * This type is valid for L2 and RoCE path.
87837 	 */
87838 		#define DBC_DBC_V3_TYPE_CQ_ARMALL	(UINT32_C(0x6) << 28)
87839 	/*
87840 	 * This is a CQ arm enable message. This message must be sent
87841 	 * from the privileged driver before a new CQ_ARMSE or CQ_ARMALL
87842 	 * message will be accepted from user space (non-privileged
87843 	 * doorbell page). The index and epoch for this doorbell type are
87844 	 * unused.
87845 	 *
87846 	 * This doorbell can only be sent from the privileged (first)
87847 	 * doorbell page of a function.
87848 	 */
87849 		#define DBC_DBC_V3_TYPE_CQ_ARMENA	(UINT32_C(0x7) << 28)
87850 	/*
87851 	 * This doorbell command enables the SRQ async event to be armed.
87852 	 * This message must be sent from the privileged driver before
87853 	 * a new SRQ_ARM message will be accepted from user space. The
87854 	 * xID field must identify the SID that is being enabled for arm.
87855 	 * The index and epoch for this doorbell type are unused.
87856 	 *
87857 	 * This doorbell can only be sent from the privileged (first)
87858 	 * doorbell page of a function.
87859 	 */
87860 		#define DBC_DBC_V3_TYPE_SRQ_ARMENA	(UINT32_C(0x8) << 28)
87861 	/*
87862 	 * This doorbell type is used to acknowledge a cutoff completion
87863 	 * in the CQ. The index and epoch for this doorbell type are
87864 	 * unused. This doorbell is sent when the cutoff completion has
87865 	 * been processed and the old CQ in a CQ resize operation is no
87866 	 * longer needed.
87867 	 *
87868 	 * The index and epoch must be valid for this doorbell if
87869 	 * overflow checking is enabled for the CQ.
87870 	 */
87871 		#define DBC_DBC_V3_TYPE_CQ_CUTOFF_ACK  (UINT32_C(0x9) << 28)
87872 	/*
87873 	 * This is a NQ consumer index update. It indicates one or more
87874 	 * entries have been processed off the NQ indicated on the xID
87875 	 * field. It will also mask the NQ for any new NQE. This type is
87876 	 * valid for L2 and RoCE path.
87877 	 *
87878 	 * Thor is broken in that it doesn't mask a legacy INTA interrupt
87879 	 * when used at the start of an ISR, as it is supposed to be.
87880 	 *
87881 	 * type=NQ masks the current interrupt. When the iSR starts, it
87882 	 * writes a type=NQ with the current consumer index. For legacy
87883 	 * PCI interrupts, this needs to mask the interrupt so the legacy
87884 	 * interrupt is deasserted. Then the driver does some work and
87885 	 * writes some more type=NQ. Finally the driver stops the ISR and
87886 	 * does a type=NQ_ARM to get another interrupt (when needed). The
87887 	 * only reason to use type=NQ_MASK is to back out of the armed
87888 	 * state. In that request, the index update is not required.
87889 	 */
87890 		#define DBC_DBC_V3_TYPE_NQ		(UINT32_C(0xa) << 28)
87891 	/*
87892 	 * This is a NQ consumer index update that also arms the NQ for
87893 	 * any new NQE.
87894 	 *
87895 	 * This type is valid for L2 and RoCE path.
87896 	 */
87897 		#define DBC_DBC_V3_TYPE_NQ_ARM	(UINT32_C(0xb) << 28)
87898 	/*
87899 	 * This doorbell will assign a new NQ to a CQ. This is handy if
87900 	 * the user wants to change which interrupt handler is going to
87901 	 * process a particular CQ. This doorbell must be sent from the
87902 	 * privileged driver.
87903 	 *
87904 	 * The xID must be the CID for the CQ that needs to be changed.
87905 	 * The index value is the NQID of the new NQ that will be used
87906 	 * for future notifications. epoch and toggle are ignored for
87907 	 * this doorbell type.
87908 	 *
87909 	 * The CQ will disarm notifications and generate a NQE to the old
87910 	 * NQ with the nq_reassign type value. The chip will guarantee
87911 	 * that no notification will be sent to the old NQ after the
87912 	 * nq_reassign NQE has been sent.
87913 	 *
87914 	 * This type is valid for L2 and RoCE CQs.
87915 	 */
87916 		#define DBC_DBC_V3_TYPE_CQ_REASSIGN	(UINT32_C(0xc) << 28)
87917 	/*
87918 	 * This masks the NQ for any new NQE. This will NOT update the NQ
87919 	 * consumer index.
87920 	 *
87921 	 * This type is valid for L2 and RoCE path.
87922 	 */
87923 		#define DBC_DBC_V3_TYPE_NQ_MASK	(UINT32_C(0xe) << 28)
87924 	/*
87925 	 * All other fields should be zero for NULL doorbell.
87926 	 *
87927 	 * For doorbell recovery, NULL doorbell type in the Application
87928 	 * table indicates that it is the last QP entry for the function.
87929 	 * This type is valid for L2 and RoCE path.
87930 	 */
87931 		#define DBC_DBC_V3_TYPE_NULL	(UINT32_C(0xf) << 28)
87932 		#define DBC_DBC_V3_TYPE_LAST	DBC_DBC_V3_TYPE_NULL
87933 } dbc_dbc_v3_t, *pdbc_dbc_v3_t;
87934 
87935 /*
87936  * This is the RoCE Express Doorbell format. The host writes this
87937  * message format directly to offset 0x40 of the appropriate doorbell
87938  * page. Express doorbells are used when the chip will be owning the
87939  * SQ, RQ, and SRQ as well as the producer indexes for each queue. This
87940  * provides a simple fastpath programming model.
87941  *
87942  * Express doorbell must be received by the chip as a single TLP
87943  * message.
87944  */
87945 /* dbc_xp (size:512b/64B) */
87946 
87947 typedef struct dbc_xp {
87948 	uint32_t	reserved;
87949 	uint32_t	type_xid;
87950 	/*
87951 	 * This value identifies the resource that the doorbell is intended
87952 	 * to notify.
87953 	 *
87954 	 * For SQ and RQ, this is the QPID. For SRQ, this is the SID. For
87955 	 * CQ, this is the CID. For NQ, this is the NID.
87956 	 *
87957 	 * Unused bits (for example bits [11:7] of the SID value) must be
87958 	 * zero.
87959 	 */
87960 	#define DBC_XP_XID_MASK	UINT32_C(0xfff)
87961 	#define DBC_XP_XID_SFT	0
87962 	/*
87963 	 * When this bit is set to one, the chip will capture debug
87964 	 * information for the doorbell ring. This is intended to only be
87965 	 * used on SQ doorbell rings.
87966 	 */
87967 	#define DBC_XP_DEBUG_TRACE	UINT32_C(0x1000000)
87968 	/* This value identifies the type of doorbell being written. */
87969 	#define DBC_XP_TYPE_MASK	UINT32_C(0xf0000000)
87970 	#define DBC_XP_TYPE_SFT	28
87971 	/*
87972 	 * This is a SQ producer index update. It indicates one or more
87973 	 * new entries have been written to the SQ for the QPID indicated
87974 	 * on the xID field. This type is valid for L2, RoCE and Engine
87975 	 * path.
87976 	 */
87977 		#define DBC_XP_TYPE_SQ	(UINT32_C(0x0) << 28)
87978 	/*
87979 	 * This is a RQ producer index update. It indicates one or more
87980 	 * new entries have been written to the RQ for the QPID indicated
87981 	 * on the xID field. This type is valid for RoCE path.
87982 	 */
87983 		#define DBC_XP_TYPE_RQ	(UINT32_C(0x1) << 28)
87984 	/*
87985 	 * This is a SRQ producer index update. It indicates one or more
87986 	 * new entries have been written to the SRQ for the SID indicated
87987 	 * on the xID field. This type is valid for L2 and RoCE path.
87988 	 */
87989 		#define DBC_XP_TYPE_SRQ	(UINT32_C(0x2) << 28)
87990 		#define DBC_XP_TYPE_LAST	DBC_XP_TYPE_SRQ
87991 	/*
87992 	 * This field hold one express WQE. The WQE must be appropriate for
87993 	 * the queue selected by the type field.
87994 	 */
87995 	uint32_t	wqe[14];
87996 } dbc_xp_t, *pdbc_xp_t;
87997 
87998 /*
87999  * This is a firmware status register that indicates the software status
88000  * exposed by the firmware to the host.
88001  *
88002  * > This register is not present in previous versions of this chip.
88003  */
88004 /* fw_status_reg (size:32b/4B) */
88005 
88006 typedef struct fw_status_reg {
88007 	uint32_t	fw_status;
88008 	/*
88009 	 * These bits indicate the status as being reported by the firmware.
88010 	 *
88011 	 * The value should be interpreted as follows:
88012 	 * A value below 0x8000 is an indication that the firmware is still
88013 	 * in the process of starting up and is not ready. The host driver
88014 	 * should continue waiting with a timeout for firmware status to be
88015 	 * ready.
88016 	 * >	0x0000 to 0x00FF : SBL state information
88017 	 * >	0x0200 to 0x02FF : SBI state information
88018 	 * >	0x0400 to 0x04FF : SRT state information
88019 	 * >	0x0600 to 0x06FF : CRT/CHIMP state information
88020 	 * >	0x0800 to 0x08FF : External Firmware state information
88021 	 * >	0x0A00 to 0x0FFF : Reserved for future fw functionality
88022 	 *
88023 	 * A value of 0x8000 indicates firmware is ready and healthy. The
88024 	 * host driver can start initiating HWRM commands to the firmware.
88025 	 *
88026 	 * A value over 0x8000 is an indication that the firmware has
88027 	 * detected a fatal error, this error could be in one of the hardware
88028 	 * block or in a software module. The lower 8 bits indicate a
88029 	 * block/module specific error and the upper 8 bits identify the
88030 	 * hardware block or firmware module that was the source of the
88031 	 * error.
88032 	 * >	0x81XX - 0xBFXX  : 63 ASIC blocks
88033 	 * >	0xC0XX to 0xFDXX : 62 Firmware modules
88034 	 * >	0xFE00 to 0xFEFF : External firmware module
88035 	 * >	0xFFXX	: Reserved for future
88036 	 */
88037 	#define FW_STATUS_REG_CODE_MASK		UINT32_C(0xffff)
88038 	#define FW_STATUS_REG_CODE_SFT		0
88039 	/* Indicates firmware is ready. */
88040 		#define FW_STATUS_REG_CODE_READY		UINT32_C(0x8000)
88041 		#define FW_STATUS_REG_CODE_LAST		FW_STATUS_REG_CODE_READY
88042 	/*
88043 	 * Image Degraded bit. If set indicates that one of the firmware
88044 	 * image is degraded.
88045 	 *
88046 	 * The firmware binary located on NVM has redundant copies to protect
88047 	 * against corruption. When one of the primary or secondary copy is
88048 	 * detected as corrupted, this bit will be set by the firmware either
88049 	 * as part of power on from the context of hwrm_fw_health_check.
88050 	 */
88051 	#define FW_STATUS_REG_IMAGE_DEGRADED	UINT32_C(0x10000)
88052 	/*
88053 	 * Recoverable bit. If set indicates that the fatal error is
88054 	 * recoverable with a full reset.
88055 	 *
88056 	 * This bit should be used by host software and deployment models
88057 	 * that support error recovery by resetting the controller. A
88058 	 * recovery should be attempted from a fatal error condition only if
88059 	 * this bit is set. This bit is meaningful only when the code field
88060 	 * is greater than 0x8000 (32768 decimal).
88061 	 */
88062 	#define FW_STATUS_REG_RECOVERABLE		UINT32_C(0x20000)
88063 	/*
88064 	 * Crash dump is in process. If set indicates that the firmware is
88065 	 * currently recording a crash dump.
88066 	 *
88067 	 * This bit provides a hint to the host driver if the firmware is
88068 	 * currently recording a crash dump. Host driers should avoid
88069 	 * resetting the controller when a crash dump is in progress if
88070 	 * possible. This bit is meaningful only when the code field is
88071 	 * greater than 0x8000 (32768 decimal).
88072 	 */
88073 	#define FW_STATUS_REG_CRASHDUMP_ONGOING	UINT32_C(0x40000)
88074 	/*
88075 	 * Crash dump is available. If set indicates that a firmware crash
88076 	 * dump was recorded before and is now available.
88077 	 *
88078 	 * This bit provides indication to the host driver that the firmware
88079 	 * has completed a crash dump. This bit is meaningful only when the
88080 	 * code field is greater than 0x8000 (32768 decimal).
88081 	 */
88082 	#define FW_STATUS_REG_CRASHDUMP_COMPLETE	UINT32_C(0x80000)
88083 	/*
88084 	 * This bit is used to indicate device state when it enters the
88085 	 * shutdown mode and stopped the communication with the host. The
88086 	 * host should initiate the reload of firmware image or initiate the
88087 	 * reset to bring the device to the normal operational state and
88088 	 * re-establish the communication.
88089 	 *
88090 	 * This bit is meaningful only when the code field is greater than
88091 	 * 0x8000 (32768 decimal).
88092 	 */
88093 	#define FW_STATUS_REG_SHUTDOWN		UINT32_C(0x100000)
88094 	/*
88095 	 * This bit will be set to 1 by the FW when FW crashed without master
88096 	 * function.
88097 	 *
88098 	 * This bit is controller specific, not all products will support
88099 	 * this bit. This bit is valid only when the code field is greater
88100 	 * than 0x8000 (32768 decimal).
88101 	 */
88102 	#define FW_STATUS_REG_CRASHED_NO_MASTER	UINT32_C(0x200000)
88103 	/*
88104 	 * The firmware sets this bit to 1 when the firmware has taken an
88105 	 * exception and expects to initiate error recovery.
88106 	 *
88107 	 * This bit is valid only when the code field is greater than 0x8000
88108 	 * (32768 decimal).
88109 	 */
88110 	#define FW_STATUS_REG_RECOVERING		UINT32_C(0x400000)
88111 	/*
88112 	 * The SBL sets this bit to indicate whether manu_debug pin is
88113 	 * detected high or low.
88114 	 */
88115 	#define FW_STATUS_REG_MANU_DEBUG_STATUS	UINT32_C(0x800000)
88116 } fw_status_reg_t, *pfw_status_reg_t;
88117 
88118 /*
88119  * This structure is fixed at the beginning of the ChiMP SRAM (GRC
88120  * offset: 0x31001F0). Host software is expected to read from this
88121  * location for a defined signature. If it exists, the software can
88122  * assume the presence of this structure and the validity of the
88123  * FW_STATUS location in the next field.
88124  */
88125 /* hcomm_status (size:64b/8B) */
88126 
88127 typedef struct hcomm_status {
88128 	uint32_t	sig_ver;
88129 	/*
88130 	 * This field defines the version of the structure. The latest
88131 	 * version value is 1.
88132 	 */
88133 	#define HCOMM_STATUS_VER_MASK	UINT32_C(0xff)
88134 	#define HCOMM_STATUS_VER_SFT	0
88135 		#define HCOMM_STATUS_VER_LATEST	UINT32_C(0x1)
88136 		#define HCOMM_STATUS_VER_LAST	HCOMM_STATUS_VER_LATEST
88137 	/*
88138 	 * This field is to store the signature value to indicate the
88139 	 * presence of the structure.
88140 	 */
88141 	#define HCOMM_STATUS_SIGNATURE_MASK UINT32_C(0xffffff00)
88142 	#define HCOMM_STATUS_SIGNATURE_SFT 8
88143 		#define HCOMM_STATUS_SIGNATURE_VAL   (UINT32_C(0x484353) << 8)
88144 		#define HCOMM_STATUS_SIGNATURE_LAST HCOMM_STATUS_SIGNATURE_VAL
88145 	uint32_t	fw_status_loc;
88146 	#define HCOMM_STATUS_TRUE_ADDR_SPACE_MASK	UINT32_C(0x3)
88147 	#define HCOMM_STATUS_TRUE_ADDR_SPACE_SFT	0
88148 	/* PCIE configuration space */
88149 		#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_PCIE_CFG  UINT32_C(0x0)
88150 	/* GRC space */
88151 		#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_GRC	UINT32_C(0x1)
88152 	/* BAR0 space */
88153 		#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR0	UINT32_C(0x2)
88154 	/* BAR1 space */
88155 		#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR1	UINT32_C(0x3)
88156 		#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_LAST	HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR1
88157 	/*
88158 	 * This offset where the fw_status register is located. The value
88159 	 * is generally 4-byte aligned.
88160 	 */
88161 	#define HCOMM_STATUS_TRUE_OFFSET_MASK	UINT32_C(0xfffffffc)
88162 	#define HCOMM_STATUS_TRUE_OFFSET_SFT	2
88163 } hcomm_status_t, *phcomm_status_t;
88164 
88165 /* This is the GRC offset where the hcomm_status struct resides. */
88166 #define HCOMM_STATUS_STRUCT_LOC 0x31001F0UL
88167 
88168 /***********************
88169  * hwrm_selftest_qlist *
88170  ***********************/
88171 
88172 
88173 /* hwrm_selftest_qlist_input (size:128b/16B) */
88174 
88175 typedef struct hwrm_selftest_qlist_input {
88176 	/* The HWRM command request type. */
88177 	uint16_t	req_type;
88178 	/*
88179 	 * The completion ring to send the completion event on. This should
88180 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88181 	 */
88182 	uint16_t	cmpl_ring;
88183 	/*
88184 	 * The sequence ID is used by the driver for tracking multiple
88185 	 * commands. This ID is treated as opaque data by the firmware and
88186 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88187 	 */
88188 	uint16_t	seq_id;
88189 	/*
88190 	 * The target ID of the command:
88191 	 * * 0x0-0xFFF8 - The function ID
88192 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88193 	 * * 0xFFFD - Reserved for user-space HWRM interface
88194 	 * * 0xFFFF - HWRM
88195 	 */
88196 	uint16_t	target_id;
88197 	/*
88198 	 * A physical address pointer pointing to a host buffer that the
88199 	 * command's response data will be written. This can be either a host
88200 	 * physical address (HPA) or a guest physical address (GPA) and must
88201 	 * point to a physically contiguous block of memory.
88202 	 */
88203 	uint64_t	resp_addr;
88204 } hwrm_selftest_qlist_input_t, *phwrm_selftest_qlist_input_t;
88205 
88206 /* hwrm_selftest_qlist_output (size:2240b/280B) */
88207 
88208 typedef struct hwrm_selftest_qlist_output {
88209 	/* The specific error status for the command. */
88210 	uint16_t	error_code;
88211 	/* The HWRM command request type. */
88212 	uint16_t	req_type;
88213 	/* The sequence ID from the original command. */
88214 	uint16_t	seq_id;
88215 	/* The length of the response data in number of bytes. */
88216 	uint16_t	resp_len;
88217 	/*
88218 	 * This field represents the number of tests available to be
88219 	 * requested by a driver.
88220 	 */
88221 	uint8_t	num_tests;
88222 	/* This field indicates which self-test is available to be run. */
88223 	uint8_t	available_tests;
88224 	/* Can run the NVM test. */
88225 	#define HWRM_SELFTEST_QLIST_OUTPUT_AVAILABLE_TESTS_NVM_TEST		UINT32_C(0x1)
88226 	/* Can run the link test. */
88227 	#define HWRM_SELFTEST_QLIST_OUTPUT_AVAILABLE_TESTS_LINK_TEST		UINT32_C(0x2)
88228 	/* Can run the register test. */
88229 	#define HWRM_SELFTEST_QLIST_OUTPUT_AVAILABLE_TESTS_REGISTER_TEST		UINT32_C(0x4)
88230 	/* Can run the memory test. */
88231 	#define HWRM_SELFTEST_QLIST_OUTPUT_AVAILABLE_TESTS_MEMORY_TEST		UINT32_C(0x8)
88232 	/* Can run the PCIe serdes test. */
88233 	#define HWRM_SELFTEST_QLIST_OUTPUT_AVAILABLE_TESTS_PCIE_SERDES_TEST	UINT32_C(0x10)
88234 	/* Can run the Ethernet serdes test. */
88235 	#define HWRM_SELFTEST_QLIST_OUTPUT_AVAILABLE_TESTS_ETHERNET_SERDES_TEST	UINT32_C(0x20)
88236 	uint8_t	offline_tests;
88237 	/* The NVM test is an offline test. */
88238 	#define HWRM_SELFTEST_QLIST_OUTPUT_OFFLINE_TESTS_NVM_TEST		UINT32_C(0x1)
88239 	/* The link test is an offline test. */
88240 	#define HWRM_SELFTEST_QLIST_OUTPUT_OFFLINE_TESTS_LINK_TEST		UINT32_C(0x2)
88241 	/* The register test is an offline test. */
88242 	#define HWRM_SELFTEST_QLIST_OUTPUT_OFFLINE_TESTS_REGISTER_TEST		UINT32_C(0x4)
88243 	/* The memory test is an offline test. */
88244 	#define HWRM_SELFTEST_QLIST_OUTPUT_OFFLINE_TESTS_MEMORY_TEST		UINT32_C(0x8)
88245 	/* The PCIe serdes test is an offline test. */
88246 	#define HWRM_SELFTEST_QLIST_OUTPUT_OFFLINE_TESTS_PCIE_SERDES_TEST	UINT32_C(0x10)
88247 	/* The Ethernet serdes test is an offline test. */
88248 	#define HWRM_SELFTEST_QLIST_OUTPUT_OFFLINE_TESTS_ETHERNET_SERDES_TEST	UINT32_C(0x20)
88249 	uint8_t	unused_0;
88250 	/*
88251 	 * This field represents the maximum timeout for all the
88252 	 * tests to complete in milliseconds.
88253 	 */
88254 	uint16_t	test_timeout;
88255 	uint8_t	unused_1[2];
88256 	/*
88257 	 * This field represents array of 8 test name strings (ASCII chars
88258 	 * with NULL at the end).
88259 	 */
88260 	char	test_name[8][32];
88261 	/*
88262 	 * The lowest available target BER that is supported by FW eyescope.
88263 	 * A Value of 3 indicates that FW supports 1e-8, 1e-9, 1e-10, and
88264 	 * 1e-11.
88265 	 */
88266 	uint8_t	eyescope_target_BER_support;
88267 	/* Eyescope supports a target BER of 1e-8 */
88268 	#define HWRM_SELFTEST_QLIST_OUTPUT_EYESCOPE_TARGET_BER_SUPPORT_BER_1E8_SUPPORTED  UINT32_C(0x0)
88269 	/* Eyescope supports a target BER of 1e-9 */
88270 	#define HWRM_SELFTEST_QLIST_OUTPUT_EYESCOPE_TARGET_BER_SUPPORT_BER_1E9_SUPPORTED  UINT32_C(0x1)
88271 	/* Eyescope supports a target BER of 1e-10 */
88272 	#define HWRM_SELFTEST_QLIST_OUTPUT_EYESCOPE_TARGET_BER_SUPPORT_BER_1E10_SUPPORTED UINT32_C(0x2)
88273 	/* Eyescope supports a target BER of 1e-11 */
88274 	#define HWRM_SELFTEST_QLIST_OUTPUT_EYESCOPE_TARGET_BER_SUPPORT_BER_1E11_SUPPORTED UINT32_C(0x3)
88275 	/* Eyescope supports a target BER of 1e-12 */
88276 	#define HWRM_SELFTEST_QLIST_OUTPUT_EYESCOPE_TARGET_BER_SUPPORT_BER_1E12_SUPPORTED UINT32_C(0x4)
88277 	#define HWRM_SELFTEST_QLIST_OUTPUT_EYESCOPE_TARGET_BER_SUPPORT_LAST		HWRM_SELFTEST_QLIST_OUTPUT_EYESCOPE_TARGET_BER_SUPPORT_BER_1E12_SUPPORTED
88278 	uint8_t	unused_2[6];
88279 	/*
88280 	 * This field is used in Output records to indicate that the output
88281 	 * is completely written to RAM. This field should be read as '1'
88282 	 * to indicate that the output has been completely written. When
88283 	 * writing a command completion or response to an internal processor,
88284 	 * the order of writes has to be such that this field is written last.
88285 	 */
88286 	uint8_t	valid;
88287 } hwrm_selftest_qlist_output_t, *phwrm_selftest_qlist_output_t;
88288 
88289 /**********************
88290  * hwrm_selftest_exec *
88291  **********************/
88292 
88293 
88294 /* hwrm_selftest_exec_input (size:192b/24B) */
88295 
88296 typedef struct hwrm_selftest_exec_input {
88297 	/* The HWRM command request type. */
88298 	uint16_t	req_type;
88299 	/*
88300 	 * The completion ring to send the completion event on. This should
88301 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88302 	 */
88303 	uint16_t	cmpl_ring;
88304 	/*
88305 	 * The sequence ID is used by the driver for tracking multiple
88306 	 * commands. This ID is treated as opaque data by the firmware and
88307 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88308 	 */
88309 	uint16_t	seq_id;
88310 	/*
88311 	 * The target ID of the command:
88312 	 * * 0x0-0xFFF8 - The function ID
88313 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88314 	 * * 0xFFFD - Reserved for user-space HWRM interface
88315 	 * * 0xFFFF - HWRM
88316 	 */
88317 	uint16_t	target_id;
88318 	/*
88319 	 * A physical address pointer pointing to a host buffer that the
88320 	 * command's response data will be written. This can be either a host
88321 	 * physical address (HPA) or a guest physical address (GPA) and must
88322 	 * point to a physically contiguous block of memory.
88323 	 */
88324 	uint64_t	resp_addr;
88325 	/* This field indicates which self-test is being requested to run. */
88326 	uint8_t	flags;
88327 	/* Run the NVM test. */
88328 	#define HWRM_SELFTEST_EXEC_INPUT_FLAGS_NVM_TEST		UINT32_C(0x1)
88329 	/* Run the link test. */
88330 	#define HWRM_SELFTEST_EXEC_INPUT_FLAGS_LINK_TEST		UINT32_C(0x2)
88331 	/* Run the register test. */
88332 	#define HWRM_SELFTEST_EXEC_INPUT_FLAGS_REGISTER_TEST		UINT32_C(0x4)
88333 	/* Run the memory test. */
88334 	#define HWRM_SELFTEST_EXEC_INPUT_FLAGS_MEMORY_TEST		UINT32_C(0x8)
88335 	/* Run the PCIe serdes test. */
88336 	#define HWRM_SELFTEST_EXEC_INPUT_FLAGS_PCIE_SERDES_TEST	UINT32_C(0x10)
88337 	/* Run the Ethernet serdes test. */
88338 	#define HWRM_SELFTEST_EXEC_INPUT_FLAGS_ETHERNET_SERDES_TEST	UINT32_C(0x20)
88339 	uint8_t	unused_0[7];
88340 } hwrm_selftest_exec_input_t, *phwrm_selftest_exec_input_t;
88341 
88342 /* hwrm_selftest_exec_output (size:128b/16B) */
88343 
88344 typedef struct hwrm_selftest_exec_output {
88345 	/* The specific error status for the command. */
88346 	uint16_t	error_code;
88347 	/* The HWRM command request type. */
88348 	uint16_t	req_type;
88349 	/* The sequence ID from the original command. */
88350 	uint16_t	seq_id;
88351 	/* The length of the response data in number of bytes. */
88352 	uint16_t	resp_len;
88353 	/* The following tests were requested to be run. */
88354 	uint8_t	requested_tests;
88355 	/* A request was made to run the NVM test. */
88356 	#define HWRM_SELFTEST_EXEC_OUTPUT_REQUESTED_TESTS_NVM_TEST		UINT32_C(0x1)
88357 	/* A request was made to run the link test. */
88358 	#define HWRM_SELFTEST_EXEC_OUTPUT_REQUESTED_TESTS_LINK_TEST		UINT32_C(0x2)
88359 	/* A request was made to run the register test. */
88360 	#define HWRM_SELFTEST_EXEC_OUTPUT_REQUESTED_TESTS_REGISTER_TEST		UINT32_C(0x4)
88361 	/* A request was made to run the memory test. */
88362 	#define HWRM_SELFTEST_EXEC_OUTPUT_REQUESTED_TESTS_MEMORY_TEST		UINT32_C(0x8)
88363 	/* A request was made to run the PCIe serdes test. */
88364 	#define HWRM_SELFTEST_EXEC_OUTPUT_REQUESTED_TESTS_PCIE_SERDES_TEST	UINT32_C(0x10)
88365 	/* A request was made to run the Ethernet serdes test. */
88366 	#define HWRM_SELFTEST_EXEC_OUTPUT_REQUESTED_TESTS_ETHERNET_SERDES_TEST	UINT32_C(0x20)
88367 	/*
88368 	 * If a test was requested to be run as seen in the requested_tests
88369 	 * field, this bit indicates whether the test was successful(1) or
88370 	 * failed(0).
88371 	 */
88372 	uint8_t	test_success;
88373 	/*
88374 	 * If requested, a value of 1 indicates the NVM test completed
88375 	 * successfully.
88376 	 */
88377 	#define HWRM_SELFTEST_EXEC_OUTPUT_TEST_SUCCESS_NVM_TEST		UINT32_C(0x1)
88378 	/*
88379 	 * If requested, a value of 1 indicates the link test completed
88380 	 * successfully.
88381 	 */
88382 	#define HWRM_SELFTEST_EXEC_OUTPUT_TEST_SUCCESS_LINK_TEST		UINT32_C(0x2)
88383 	/*
88384 	 * If requested, a value of 1 indicates the register test completed
88385 	 * successfully.
88386 	 */
88387 	#define HWRM_SELFTEST_EXEC_OUTPUT_TEST_SUCCESS_REGISTER_TEST		UINT32_C(0x4)
88388 	/*
88389 	 * If requested, a value of 1 indicates the memory test completed
88390 	 * successfully.
88391 	 */
88392 	#define HWRM_SELFTEST_EXEC_OUTPUT_TEST_SUCCESS_MEMORY_TEST		UINT32_C(0x8)
88393 	/*
88394 	 * If requested, a value of 1 indicates the PCIe serdes test
88395 	 * completed successfully.
88396 	 */
88397 	#define HWRM_SELFTEST_EXEC_OUTPUT_TEST_SUCCESS_PCIE_SERDES_TEST	UINT32_C(0x10)
88398 	/*
88399 	 * If requested, a value of 1 indicates the Ethernet serdes test
88400 	 * completed successfully.
88401 	 */
88402 	#define HWRM_SELFTEST_EXEC_OUTPUT_TEST_SUCCESS_ETHERNET_SERDES_TEST	UINT32_C(0x20)
88403 	uint8_t	unused_0[5];
88404 	/*
88405 	 * This field is used in Output records to indicate that the output
88406 	 * is completely written to RAM. This field should be read as '1'
88407 	 * to indicate that the output has been completely written. When
88408 	 * writing a command completion or response to an internal processor,
88409 	 * the order of writes has to be such that this field is written last.
88410 	 */
88411 	uint8_t	valid;
88412 } hwrm_selftest_exec_output_t, *phwrm_selftest_exec_output_t;
88413 
88414 /*********************
88415  * hwrm_selftest_irq *
88416  *********************/
88417 
88418 
88419 /* hwrm_selftest_irq_input (size:128b/16B) */
88420 
88421 typedef struct hwrm_selftest_irq_input {
88422 	/* The HWRM command request type. */
88423 	uint16_t	req_type;
88424 	/*
88425 	 * The completion ring to send the completion event on. This should
88426 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88427 	 */
88428 	uint16_t	cmpl_ring;
88429 	/*
88430 	 * The sequence ID is used by the driver for tracking multiple
88431 	 * commands. This ID is treated as opaque data by the firmware and
88432 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88433 	 */
88434 	uint16_t	seq_id;
88435 	/*
88436 	 * The target ID of the command:
88437 	 * * 0x0-0xFFF8 - The function ID
88438 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88439 	 * * 0xFFFD - Reserved for user-space HWRM interface
88440 	 * * 0xFFFF - HWRM
88441 	 */
88442 	uint16_t	target_id;
88443 	/*
88444 	 * A physical address pointer pointing to a host buffer that the
88445 	 * command's response data will be written. This can be either a host
88446 	 * physical address (HPA) or a guest physical address (GPA) and must
88447 	 * point to a physically contiguous block of memory.
88448 	 */
88449 	uint64_t	resp_addr;
88450 } hwrm_selftest_irq_input_t, *phwrm_selftest_irq_input_t;
88451 
88452 /* hwrm_selftest_irq_output (size:128b/16B) */
88453 
88454 typedef struct hwrm_selftest_irq_output {
88455 	/* The specific error status for the command. */
88456 	uint16_t	error_code;
88457 	/* The HWRM command request type. */
88458 	uint16_t	req_type;
88459 	/* The sequence ID from the original command. */
88460 	uint16_t	seq_id;
88461 	/* The length of the response data in number of bytes. */
88462 	uint16_t	resp_len;
88463 	uint8_t	unused_0[7];
88464 	/*
88465 	 * This field is used in Output records to indicate that the output
88466 	 * is completely written to RAM. This field should be read as '1'
88467 	 * to indicate that the output has been completely written. When
88468 	 * writing a command completion or response to an internal processor,
88469 	 * the order of writes has to be such that this field is written last.
88470 	 */
88471 	uint8_t	valid;
88472 } hwrm_selftest_irq_output_t, *phwrm_selftest_irq_output_t;
88473 
88474 /**************************************
88475  * hwrm_selftest_retrieve_serdes_data *
88476  **************************************/
88477 
88478 
88479 /* hwrm_selftest_retrieve_serdes_data_input (size:320b/40B) */
88480 
88481 typedef struct hwrm_selftest_retrieve_serdes_data_input {
88482 	/* The HWRM command request type. */
88483 	uint16_t	req_type;
88484 	/*
88485 	 * The completion ring to send the completion event on. This should
88486 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88487 	 */
88488 	uint16_t	cmpl_ring;
88489 	/*
88490 	 * The sequence ID is used by the driver for tracking multiple
88491 	 * commands. This ID is treated as opaque data by the firmware and
88492 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88493 	 */
88494 	uint16_t	seq_id;
88495 	/*
88496 	 * The target ID of the command:
88497 	 * * 0x0-0xFFF8 - The function ID
88498 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88499 	 * * 0xFFFD - Reserved for user-space HWRM interface
88500 	 * * 0xFFFF - HWRM
88501 	 */
88502 	uint16_t	target_id;
88503 	/*
88504 	 * A physical address pointer pointing to a host buffer that the
88505 	 * command's response data will be written. This can be either a host
88506 	 * physical address (HPA) or a guest physical address (GPA) and must
88507 	 * point to a physically contiguous block of memory.
88508 	 */
88509 	uint64_t	resp_addr;
88510 	/* Host address data is to DMA'd to. */
88511 	uint64_t	resp_data_addr;
88512 	/*
88513 	 * This field contains the offset into the captured data to begin
88514 	 * copying the data to the host from. This should be set to 0 on the
88515 	 * initial call to this command.
88516 	 */
88517 	uint32_t	resp_data_offset;
88518 	/*
88519 	 * Size of the buffer pointed to by resp_data_addr. The firmware may
88520 	 * use this entire buffer or less than the entire buffer, but never
88521 	 * more.
88522 	 */
88523 	uint16_t	data_len;
88524 	/*
88525 	 * This field allows this command to request the individual serdes
88526 	 * tests to be run using this command.
88527 	 */
88528 	uint8_t	flags;
88529 	/* Unused. */
88530 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_FLAGS_UNUSED_TEST_MASK	UINT32_C(0x7)
88531 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_FLAGS_UNUSED_TEST_SFT	0
88532 	/* Display eye_projection */
88533 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_FLAGS_EYE_PROJECTION	UINT32_C(0x8)
88534 	/* Run the PCIe serdes test. */
88535 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_FLAGS_PCIE_SERDES_TEST	UINT32_C(0x10)
88536 	/* Run the Ethernet serdes test. */
88537 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_FLAGS_ETHERNET_SERDES_TEST	UINT32_C(0x20)
88538 	uint8_t	options;
88539 	/*
88540 	 * This field represents the PCIE lane number on which tools wants to
88541 	 * retrieve eye plot. This field is valid only when 'pcie_serdes_test'
88542 	 * flag is set.
88543 	 * Valid values from 0 to 16.
88544 	 */
88545 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_PCIE_LANE_NO_MASK	UINT32_C(0xf)
88546 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_PCIE_LANE_NO_SFT	0
88547 	/* This value indicates the Horizontal or vertical plot direction. */
88548 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_DIRECTION		UINT32_C(0x10)
88549 	/* Value 0 indicates Horizontal plot request. */
88550 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_DIRECTION_HORIZONTAL	(UINT32_C(0x0) << 4)
88551 	/* Value 1 indicates vertical plot request. */
88552 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_DIRECTION_VERTICAL	(UINT32_C(0x1) << 4)
88553 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_DIRECTION_LAST	HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_DIRECTION_VERTICAL
88554 	/* This value indicates eye projection type */
88555 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_PROJ_TYPE		UINT32_C(0x20)
88556 	/*
88557 	 * Value 0 indicates left/top projection in horizontal/vertical
88558 	 * This value is valid only when eye_projection flag was set.
88559 	 */
88560 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_PROJ_TYPE_LEFT_TOP	(UINT32_C(0x0) << 5)
88561 	/*
88562 	 * Value 1 indicates right/bottom projection in
88563 	 * horizontal/vertical. This value is valid only when
88564 	 * eye_projection flag was set.
88565 	 */
88566 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_PROJ_TYPE_RIGHT_BOTTOM  (UINT32_C(0x1) << 5)
88567 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_PROJ_TYPE_LAST	HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_PROJ_TYPE_RIGHT_BOTTOM
88568 	/* Reserved for future. */
88569 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_RSVD_MASK		UINT32_C(0xc0)
88570 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_OPTIONS_RSVD_SFT		6
88571 	/*
88572 	 * This field allows this command to request a specific targetBER
88573 	 * to be run using this command.
88574 	 */
88575 	uint8_t	targetBER;
88576 	/* When collecting an eyescope, measure with a target BER of 1e-8 */
88577 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_TARGETBER_BER_1E8  UINT32_C(0x0)
88578 	/* When collecting an eyescope, measure with a target BER of 1e-9 */
88579 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_TARGETBER_BER_1E9  UINT32_C(0x1)
88580 	/* When collecting an eyescope, measure with a target BER of 1e-10 */
88581 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_TARGETBER_BER_1E10 UINT32_C(0x2)
88582 	/* When collecting an eyescope, measure with a target BER of 1e-11 */
88583 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_TARGETBER_BER_1E11 UINT32_C(0x3)
88584 	/* When collecting an eyescope, measure with a target BER of 1e-12 */
88585 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_TARGETBER_BER_1E12 UINT32_C(0x4)
88586 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_TARGETBER_LAST	HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_TARGETBER_BER_1E12
88587 	/*
88588 	 * This field allows this command to specify the action to take when
88589 	 * collecting an eyescope.
88590 	 */
88591 	uint8_t	action;
88592 	/*
88593 	 * Value 0 indicates that collection of the eyescope should be
88594 	 * returned synchronously in the output. This only applies to
88595 	 * a targetBER of 1e-8.
88596 	 */
88597 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_ACTION_SYNCHRONOUS UINT32_C(0x0)
88598 	/*
88599 	 * Value 1 indicates to the firmware to start the collection of the
88600 	 * eyescope.
88601 	 */
88602 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_ACTION_START	UINT32_C(0x1)
88603 	/*
88604 	 * Value 2 indicates to the firmware to respond with a progress
88605 	 * percentage of the current eyescope collection from 0.0 to 100.0.
88606 	 */
88607 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_ACTION_PROGRESS	UINT32_C(0x2)
88608 	/*
88609 	 * Value 3 indicates to stop the eyescope. if the progress
88610 	 * percentage is 100.0, the data will be DMAed back to
88611 	 * resp_data_addr.
88612 	 */
88613 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_ACTION_STOP	UINT32_C(0x3)
88614 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_ACTION_LAST	HWRM_SELFTEST_RETRIEVE_SERDES_DATA_INPUT_ACTION_STOP
88615 	uint8_t	unused[6];
88616 } hwrm_selftest_retrieve_serdes_data_input_t, *phwrm_selftest_retrieve_serdes_data_input_t;
88617 
88618 /* hwrm_selftest_retrieve_serdes_data_output (size:192b/24B) */
88619 
88620 typedef struct hwrm_selftest_retrieve_serdes_data_output {
88621 	/* The specific error status for the command. */
88622 	uint16_t	error_code;
88623 	/* The HWRM command request type. */
88624 	uint16_t	req_type;
88625 	/* The sequence ID from the original command. */
88626 	uint16_t	seq_id;
88627 	/* The length of the response data in number of bytes. */
88628 	uint16_t	resp_len;
88629 	/* Total length of stored data. */
88630 	uint16_t	total_data_len;
88631 	/*
88632 	 * Amount of data DMA'd to host by this call. The driver can use this
88633 	 * field along with the total_data_len field above to determine the
88634 	 * value to write to the resp_data_offset field in the next call
88635 	 * if more than one call to these commands is required to retrieve all
88636 	 * the stored data.
88637 	 */
88638 	uint16_t	copied_data_len;
88639 	/*
88640 	 * Percentage of completion of collection of BER values from the
88641 	 * current eyescope operation in tenths of a percentage. 0 (0.0) to
88642 	 * 1000 (100.0).
88643 	 */
88644 	uint16_t	progress_percent;
88645 	/* Timeout in seconds for timeout of an individual BER point. */
88646 	uint16_t	timeout;
88647 	uint8_t	flags;
88648 	/*
88649 	 * This value indicates the structure of data returned by the
88650 	 * firmware when DMA'ed to resp_data_addr.
88651 	 */
88652 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_OUTPUT_FLAGS_BIT_COUNT_TYPE		UINT32_C(0x1)
88653 	/*
88654 	 * Value 0 indicates that bit_count value is a raw total
88655 	 * such that BER = error_count / bit_count.
88656 	 */
88657 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_OUTPUT_FLAGS_BIT_COUNT_TYPE_BIT_COUNT_TOTAL  UINT32_C(0x0)
88658 	/*
88659 	 * Value 1 indicates that bit count is a power of
88660 	 * 2 that bit_count is normalized to. A Value of 42 indicates
88661 	 * that BER = error_count / 2^42
88662 	 */
88663 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_OUTPUT_FLAGS_BIT_COUNT_TYPE_BIT_COUNT_POW2   UINT32_C(0x1)
88664 		#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_OUTPUT_FLAGS_BIT_COUNT_TYPE_LAST		HWRM_SELFTEST_RETRIEVE_SERDES_DATA_OUTPUT_FLAGS_BIT_COUNT_TYPE_BIT_COUNT_POW2
88665 	/* Reserved for future. */
88666 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_OUTPUT_FLAGS_RSVD_MASK			UINT32_C(0xfe)
88667 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA_OUTPUT_FLAGS_RSVD_SFT			1
88668 	uint8_t	unused_0;
88669 	/*
88670 	 * Size of header prepended to the bit_count and error_count array.
88671 	 * Use this value to skip forward to the bit_count and error_count
88672 	 * array.
88673 	 */
88674 	uint16_t	hdr_size;
88675 	uint8_t	unused_1[3];
88676 	/*
88677 	 * This field is used in Output records to indicate that the output
88678 	 * is completely written to RAM. This field should be read as '1'
88679 	 * to indicate that the output has been completely written. When
88680 	 * writing a command completion or response to an internal processor,
88681 	 * the order of writes has to be such that this field is written last.
88682 	 */
88683 	uint8_t	valid;
88684 } hwrm_selftest_retrieve_serdes_data_output_t, *phwrm_selftest_retrieve_serdes_data_output_t;
88685 
88686 /******************************
88687  * hwrm_mfg_fru_write_control *
88688  ******************************/
88689 
88690 
88691 /* hwrm_mfg_fru_write_control_input (size:192b/24B) */
88692 
88693 typedef struct hwrm_mfg_fru_write_control_input {
88694 	/* The HWRM command request type. */
88695 	uint16_t	req_type;
88696 	/*
88697 	 * The completion ring to send the completion event on. This should
88698 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88699 	 */
88700 	uint16_t	cmpl_ring;
88701 	/*
88702 	 * The sequence ID is used by the driver for tracking multiple
88703 	 * commands. This ID is treated as opaque data by the firmware and
88704 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88705 	 */
88706 	uint16_t	seq_id;
88707 	/*
88708 	 * The target ID of the command:
88709 	 * * 0x0-0xFFF8 - The function ID
88710 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88711 	 * * 0xFFFD - Reserved for user-space HWRM interface
88712 	 * * 0xFFFF - HWRM
88713 	 */
88714 	uint16_t	target_id;
88715 	/*
88716 	 * A physical address pointer pointing to a host buffer that the
88717 	 * command's response data will be written. This can be either a host
88718 	 * physical address (HPA) or a guest physical address (GPA) and must
88719 	 * point to a physically contiguous block of memory.
88720 	 */
88721 	uint64_t	resp_addr;
88722 	/*
88723 	 * This field indicates the lock/unlock operation. 0 means Unlock and
88724 	 * 1 means Lock.
88725 	 */
88726 	uint32_t	fru_lock;
88727 	uint32_t	unused_0;
88728 } hwrm_mfg_fru_write_control_input_t, *phwrm_mfg_fru_write_control_input_t;
88729 
88730 /* hwrm_mfg_fru_write_control_output (size:128b/16B) */
88731 
88732 typedef struct hwrm_mfg_fru_write_control_output {
88733 	/* The specific error status for the command. */
88734 	uint16_t	error_code;
88735 	/* The HWRM command request type. */
88736 	uint16_t	req_type;
88737 	/* The sequence ID from the original command. */
88738 	uint16_t	seq_id;
88739 	/* The length of the response data in number of bytes. */
88740 	uint16_t	resp_len;
88741 	uint8_t	unused_0[7];
88742 	/*
88743 	 * This field is used in Output records to indicate that the output
88744 	 * is completely written to RAM. This field should be read as '1'
88745 	 * to indicate that the output has been completely written. When
88746 	 * writing a command completion or response to an internal processor,
88747 	 * the order of writes has to be such that this field is written last.
88748 	 */
88749 	uint8_t	valid;
88750 } hwrm_mfg_fru_write_control_output_t, *phwrm_mfg_fru_write_control_output_t;
88751 
88752 /*************************
88753  * hwrm_mfg_timers_query *
88754  *************************/
88755 
88756 
88757 /* hwrm_mfg_timers_query_input (size:192b/24B) */
88758 
88759 typedef struct hwrm_mfg_timers_query_input {
88760 	/* The HWRM command request type. */
88761 	uint16_t	req_type;
88762 	/*
88763 	 * The completion ring to send the completion event on. This should
88764 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88765 	 */
88766 	uint16_t	cmpl_ring;
88767 	/*
88768 	 * The sequence ID is used by the driver for tracking multiple
88769 	 * commands. This ID is treated as opaque data by the firmware and
88770 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88771 	 */
88772 	uint16_t	seq_id;
88773 	/*
88774 	 * The target ID of the command:
88775 	 * * 0x0-0xFFF8 - The function ID
88776 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88777 	 * * 0xFFFD - Reserved for user-space HWRM interface
88778 	 * * 0xFFFF - HWRM
88779 	 */
88780 	uint16_t	target_id;
88781 	/*
88782 	 * A physical address pointer pointing to a host buffer that the
88783 	 * command's response data will be written. This can be either a host
88784 	 * physical address (HPA) or a guest physical address (GPA) and must
88785 	 * point to a physically contiguous block of memory.
88786 	 */
88787 	uint64_t	resp_addr;
88788 	uint64_t	unused_0;
88789 } hwrm_mfg_timers_query_input_t, *phwrm_mfg_timers_query_input_t;
88790 
88791 /* hwrm_mfg_timers_query_output (size:192b/24B) */
88792 
88793 typedef struct hwrm_mfg_timers_query_output {
88794 	/* The specific error status for the command. */
88795 	uint16_t	error_code;
88796 	/* The HWRM command request type. */
88797 	uint16_t	req_type;
88798 	/* The sequence ID from the original command. */
88799 	uint16_t	seq_id;
88800 	/* The length of the response data in number of bytes. */
88801 	uint16_t	resp_len;
88802 	/*
88803 	 * This is free running counter value running at 1 usec per tick.
88804 	 * The value can wrap around. On error, a value of 0 on all ticks
88805 	 * will be returned.
88806 	 */
88807 	uint32_t	us_tick;
88808 	/*
88809 	 * This is free running counter value running at 1 msec per tick.
88810 	 * The value can wrap around. On error, a value of 0 on all ticks
88811 	 * will be returned.
88812 	 */
88813 	uint32_t	ms_tick;
88814 	/*
88815 	 * This is free running counter value running at 100 msec per tick.
88816 	 * The value can wrap around. On error, a value of 0 on all ticks
88817 	 * will be returned.
88818 	 */
88819 	uint32_t	ms100_tick;
88820 	uint8_t	unused_0[3];
88821 	/*
88822 	 * This field is used in Output records to indicate that the output
88823 	 * is completely written to RAM. This field should be read as '1'
88824 	 * to indicate that the output has been completely written. When
88825 	 * writing a command completion or response to an internal processor,
88826 	 * the order of writes has to be such that this field is written last.
88827 	 */
88828 	uint8_t	valid;
88829 } hwrm_mfg_timers_query_output_t, *phwrm_mfg_timers_query_output_t;
88830 
88831 /********************
88832  * hwrm_mfg_otp_cfg *
88833  ********************/
88834 
88835 
88836 /* hwrm_mfg_otp_cfg_input (size:256b/32B) */
88837 
88838 typedef struct hwrm_mfg_otp_cfg_input {
88839 	/* The HWRM command request type. */
88840 	uint16_t	req_type;
88841 	/*
88842 	 * The completion ring to send the completion event on. This should
88843 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88844 	 */
88845 	uint16_t	cmpl_ring;
88846 	/*
88847 	 * The sequence ID is used by the driver for tracking multiple
88848 	 * commands. This ID is treated as opaque data by the firmware and
88849 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88850 	 */
88851 	uint16_t	seq_id;
88852 	/*
88853 	 * The target ID of the command:
88854 	 * * 0x0-0xFFF8 - The function ID
88855 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88856 	 * * 0xFFFD - Reserved for user-space HWRM interface
88857 	 * * 0xFFFF - HWRM
88858 	 */
88859 	uint16_t	target_id;
88860 	/*
88861 	 * A physical address pointer pointing to a host buffer that the
88862 	 * command's response data will be written. This can be either a host
88863 	 * physical address (HPA) or a guest physical address (GPA) and must
88864 	 * point to a physically contiguous block of memory.
88865 	 */
88866 	uint64_t	resp_addr;
88867 	uint16_t	enables;
88868 	/*
88869 	 * This bit must be '1' for the crid field to be
88870 	 * configured.
88871 	 */
88872 	#define HWRM_MFG_OTP_CFG_INPUT_ENABLES_CRID	UINT32_C(0x1)
88873 	/*
88874 	 * This bit must be '1' for the srt_rev_id field to be
88875 	 * configured.
88876 	 */
88877 	#define HWRM_MFG_OTP_CFG_INPUT_ENABLES_SRT_REV_ID	UINT32_C(0x2)
88878 	/*
88879 	 * This bit must be '1' for the crt_rev_id field to be
88880 	 * configured.
88881 	 */
88882 	#define HWRM_MFG_OTP_CFG_INPUT_ENABLES_CRT_REV_ID	UINT32_C(0x4)
88883 	/*
88884 	 * This bit must be '1' for the sbi_rev_id field to be
88885 	 * configured.
88886 	 */
88887 	#define HWRM_MFG_OTP_CFG_INPUT_ENABLES_SBI_REV_ID	UINT32_C(0x8)
88888 	/* This field indicates the crid value to be set. */
88889 	uint16_t	crid_cfg_value;
88890 	/* This field indicates the srt rev id value to be set. */
88891 	uint16_t	srt_rev_id_cfg_value;
88892 	/* This field indicates the crt rev id value to be set. */
88893 	uint16_t	crt_rev_id_cfg_value;
88894 	/* This field indicates the sbi rev id value to be set. */
88895 	uint16_t	sbi_rev_id_cfg_value;
88896 	uint8_t	unused_0[6];
88897 } hwrm_mfg_otp_cfg_input_t, *phwrm_mfg_otp_cfg_input_t;
88898 
88899 /* hwrm_mfg_otp_cfg_output (size:128b/16B) */
88900 
88901 typedef struct hwrm_mfg_otp_cfg_output {
88902 	/* The specific error status for the command. */
88903 	uint16_t	error_code;
88904 	/* The HWRM command request type. */
88905 	uint16_t	req_type;
88906 	/* The sequence ID from the original command. */
88907 	uint16_t	seq_id;
88908 	/* The length of the response data in number of bytes. */
88909 	uint16_t	resp_len;
88910 	uint8_t	unused_0[7];
88911 	/*
88912 	 * This field is used in Output records to indicate that the output
88913 	 * is completely written to RAM. This field should be read as '1'
88914 	 * to indicate that the output has been completely written. When
88915 	 * writing a command completion or response to an internal processor,
88916 	 * the order of writes has to be such that this field is written last.
88917 	 */
88918 	uint8_t	valid;
88919 } hwrm_mfg_otp_cfg_output_t, *phwrm_mfg_otp_cfg_output_t;
88920 
88921 /*********************
88922  * hwrm_mfg_otp_qcfg *
88923  *********************/
88924 
88925 
88926 /* hwrm_mfg_otp_qcfg_input (size:192b/24B) */
88927 
88928 typedef struct hwrm_mfg_otp_qcfg_input {
88929 	/* The HWRM command request type. */
88930 	uint16_t	req_type;
88931 	/*
88932 	 * The completion ring to send the completion event on. This should
88933 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
88934 	 */
88935 	uint16_t	cmpl_ring;
88936 	/*
88937 	 * The sequence ID is used by the driver for tracking multiple
88938 	 * commands. This ID is treated as opaque data by the firmware and
88939 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
88940 	 */
88941 	uint16_t	seq_id;
88942 	/*
88943 	 * The target ID of the command:
88944 	 * * 0x0-0xFFF8 - The function ID
88945 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
88946 	 * * 0xFFFD - Reserved for user-space HWRM interface
88947 	 * * 0xFFFF - HWRM
88948 	 */
88949 	uint16_t	target_id;
88950 	/*
88951 	 * A physical address pointer pointing to a host buffer that the
88952 	 * command's response data will be written. This can be either a host
88953 	 * physical address (HPA) or a guest physical address (GPA) and must
88954 	 * point to a physically contiguous block of memory.
88955 	 */
88956 	uint64_t	resp_addr;
88957 	uint16_t	enables;
88958 	/*
88959 	 * This bit must be '1' for the crid field to be
88960 	 * queried.
88961 	 */
88962 	#define HWRM_MFG_OTP_QCFG_INPUT_ENABLES_CRID	UINT32_C(0x1)
88963 	/*
88964 	 * This bit must be '1' for the srt_rev_id field to be
88965 	 * queried.
88966 	 */
88967 	#define HWRM_MFG_OTP_QCFG_INPUT_ENABLES_SRT_REV_ID	UINT32_C(0x2)
88968 	/*
88969 	 * This bit must be '1' for the crt_rev_id field to be
88970 	 * queried.
88971 	 */
88972 	#define HWRM_MFG_OTP_QCFG_INPUT_ENABLES_CRT_REV_ID	UINT32_C(0x4)
88973 	/*
88974 	 * This bit must be '1' for the sbi_rev_id field to be
88975 	 * queried.
88976 	 */
88977 	#define HWRM_MFG_OTP_QCFG_INPUT_ENABLES_SBI_REV_ID	UINT32_C(0x8)
88978 	uint8_t	unused_0[6];
88979 } hwrm_mfg_otp_qcfg_input_t, *phwrm_mfg_otp_qcfg_input_t;
88980 
88981 /* hwrm_mfg_otp_qcfg_output (size:192b/24B) */
88982 
88983 typedef struct hwrm_mfg_otp_qcfg_output {
88984 	/* The specific error status for the command. */
88985 	uint16_t	error_code;
88986 	/* The HWRM command request type. */
88987 	uint16_t	req_type;
88988 	/* The sequence ID from the original command. */
88989 	uint16_t	seq_id;
88990 	/* The length of the response data in number of bytes. */
88991 	uint16_t	resp_len;
88992 	/*
88993 	 * This field contains the value of current device type. The
88994 	 * value indicates the current chip mode (Unassigned/AB_PROD).
88995 	 */
88996 	uint32_t	enc_device_type;
88997 	/* This field indicates the current crid value. */
88998 	uint16_t	crid;
88999 	/* This field indicates the current srt rev id value. */
89000 	uint16_t	srt_rev_id;
89001 	/* This field indicates the current crt rev id value. */
89002 	uint16_t	crt_rev_id;
89003 	/* This field indicates the current sbi rev id value. */
89004 	uint16_t	sbi_rev_id;
89005 	uint8_t	unused_0[3];
89006 	/*
89007 	 * This field is used in Output records to indicate that the output
89008 	 * is completely written to RAM. This field should be read as '1'
89009 	 * to indicate that the output has been completely written. When
89010 	 * writing a command completion or response to an internal processor,
89011 	 * the order of writes has to be such that this field is written last.
89012 	 */
89013 	uint8_t	valid;
89014 } hwrm_mfg_otp_qcfg_output_t, *phwrm_mfg_otp_qcfg_output_t;
89015 
89016 /**********************
89017  * hwrm_mfg_hdma_test *
89018  **********************/
89019 
89020 
89021 /* hwrm_mfg_hdma_test_input (size:384b/48B) */
89022 
89023 typedef struct hwrm_mfg_hdma_test_input {
89024 	/* The HWRM command request type. */
89025 	uint16_t	req_type;
89026 	/*
89027 	 * The completion ring to send the completion event on. This should
89028 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89029 	 */
89030 	uint16_t	cmpl_ring;
89031 	/*
89032 	 * The sequence ID is used by the driver for tracking multiple
89033 	 * commands. This ID is treated as opaque data by the firmware and
89034 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89035 	 */
89036 	uint16_t	seq_id;
89037 	/*
89038 	 * The target ID of the command:
89039 	 * * 0x0-0xFFF8 - The function ID
89040 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89041 	 * * 0xFFFD - Reserved for user-space HWRM interface
89042 	 * * 0xFFFF - HWRM
89043 	 */
89044 	uint16_t	target_id;
89045 	/*
89046 	 * A physical address pointer pointing to a host buffer that the
89047 	 * command's response data will be written. This can be either a host
89048 	 * physical address (HPA) or a guest physical address (GPA) and must
89049 	 * point to a physically contiguous block of memory.
89050 	 */
89051 	uint64_t	resp_addr;
89052 	/* The host (DMA) buffer physical addr for the firmware to read from. */
89053 	uint64_t	host_src_data_addr;
89054 	/* The host (DMA) buffer physical addr for the firmware to write to. */
89055 	uint64_t	host_dst_data_addr;
89056 	/*
89057 	 * The user provided data pattern which will be used in the DMA
89058 	 * transfer.
89059 	 */
89060 	uint64_t	user_data_pattern;
89061 	/* Timeout value to stop the test. */
89062 	uint16_t	timeout;
89063 	/* The number of DMA transfers to be done in the test. */
89064 	uint16_t	repeat_count;
89065 	/* Types can be any of "incremental", "fixed", or "random". */
89066 	uint16_t	subtype;
89067 	/* Test is run with the incremental data pattern. */
89068 	#define HWRM_MFG_HDMA_TEST_INPUT_SUBTYPE_INCREMENTAL UINT32_C(0x1)
89069 	/* Test is run with the fixed data pattern. */
89070 	#define HWRM_MFG_HDMA_TEST_INPUT_SUBTYPE_FIXED	UINT32_C(0x2)
89071 	/* Test is run with a random data pattern. */
89072 	#define HWRM_MFG_HDMA_TEST_INPUT_SUBTYPE_RANDOM	UINT32_C(0x3)
89073 	#define HWRM_MFG_HDMA_TEST_INPUT_SUBTYPE_LAST	HWRM_MFG_HDMA_TEST_INPUT_SUBTYPE_RANDOM
89074 	/* The length of the data used in the DMA transfers. */
89075 	uint16_t	data_len;
89076 } hwrm_mfg_hdma_test_input_t, *phwrm_mfg_hdma_test_input_t;
89077 
89078 /* hwrm_mfg_hdma_test_output (size:128b/16B) */
89079 
89080 typedef struct hwrm_mfg_hdma_test_output {
89081 	/* The specific error status for the command. */
89082 	uint16_t	error_code;
89083 	/* The HWRM command request type. */
89084 	uint16_t	req_type;
89085 	/* The sequence ID from the original command. */
89086 	uint16_t	seq_id;
89087 	/* The length of the response data in number of bytes. */
89088 	uint16_t	resp_len;
89089 	uint8_t	unused_0[7];
89090 	/*
89091 	 * This field is used in Output records to indicate that the output
89092 	 * is completely written to RAM. This field should be read as '1'
89093 	 * to indicate that the output has been completely written. When
89094 	 * writing a command completion or response to an internal processor,
89095 	 * the order of writes has to be such that this field is written last.
89096 	 */
89097 	uint8_t	valid;
89098 } hwrm_mfg_hdma_test_output_t, *phwrm_mfg_hdma_test_output_t;
89099 
89100 /*****************************
89101  * hwrm_mfg_fru_eeprom_write *
89102  *****************************/
89103 
89104 
89105 /* hwrm_mfg_fru_eeprom_write_input (size:256b/32B) */
89106 
89107 typedef struct hwrm_mfg_fru_eeprom_write_input {
89108 	/* The HWRM command request type. */
89109 	uint16_t	req_type;
89110 	/*
89111 	 * The completion ring to send the completion event on. This should
89112 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89113 	 */
89114 	uint16_t	cmpl_ring;
89115 	/*
89116 	 * The sequence ID is used by the driver for tracking multiple
89117 	 * commands. This ID is treated as opaque data by the firmware and
89118 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89119 	 */
89120 	uint16_t	seq_id;
89121 	/*
89122 	 * The target ID of the command:
89123 	 * * 0x0-0xFFF8 - The function ID
89124 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89125 	 * * 0xFFFD - Reserved for user-space HWRM interface
89126 	 * * 0xFFFF - HWRM
89127 	 */
89128 	uint16_t	target_id;
89129 	/*
89130 	 * A physical address pointer pointing to a host buffer that the
89131 	 * command's response data will be written. This can be either a host
89132 	 * physical address (HPA) or a guest physical address (GPA) and must
89133 	 * point to a physically contiguous block of memory.
89134 	 */
89135 	uint64_t	resp_addr;
89136 	/*
89137 	 * The host (DMA) buffer physical addr for the firmware to read from.
89138 	 * This buffer is populated with the fru binary bits which is going
89139 	 * to be programmed into the fru memory.
89140 	 */
89141 	uint64_t	data_addr;
89142 	/* i2c slave address. If set to 0xffff, fw will decide what to use. */
89143 	uint16_t	i2c_slave_addr;
89144 	/* Size of the buffer pointed to by data_addr. */
89145 	uint16_t	data_len;
89146 	/* The offset within the SEEPROM to start programming. */
89147 	uint16_t	offset;
89148 	uint8_t	unused[2];
89149 } hwrm_mfg_fru_eeprom_write_input_t, *phwrm_mfg_fru_eeprom_write_input_t;
89150 
89151 /* hwrm_mfg_fru_eeprom_write_output (size:128b/16B) */
89152 
89153 typedef struct hwrm_mfg_fru_eeprom_write_output {
89154 	/* The specific error status for the command. */
89155 	uint16_t	error_code;
89156 	/* The HWRM command request type. */
89157 	uint16_t	req_type;
89158 	/* The sequence ID from the original command. */
89159 	uint16_t	seq_id;
89160 	/* The length of the response data in number of bytes. */
89161 	uint16_t	resp_len;
89162 	/* Total length of data written to the fru memory. */
89163 	uint16_t	total_data_len;
89164 	uint16_t	unused_0;
89165 	uint8_t	unused_1[3];
89166 	/*
89167 	 * This field is used in Output records to indicate that the output
89168 	 * is completely written to RAM. This field should be read as '1'
89169 	 * to indicate that the output has been completely written. When
89170 	 * writing a command completion or response to an internal processor,
89171 	 * the order of writes has to be such that this field is written last.
89172 	 */
89173 	uint8_t	valid;
89174 } hwrm_mfg_fru_eeprom_write_output_t, *phwrm_mfg_fru_eeprom_write_output_t;
89175 
89176 /****************************
89177  * hwrm_mfg_fru_eeprom_read *
89178  ****************************/
89179 
89180 
89181 /* hwrm_mfg_fru_eeprom_read_input (size:256b/32B) */
89182 
89183 typedef struct hwrm_mfg_fru_eeprom_read_input {
89184 	/* The HWRM command request type. */
89185 	uint16_t	req_type;
89186 	/*
89187 	 * The completion ring to send the completion event on. This should
89188 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89189 	 */
89190 	uint16_t	cmpl_ring;
89191 	/*
89192 	 * The sequence ID is used by the driver for tracking multiple
89193 	 * commands. This ID is treated as opaque data by the firmware and
89194 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89195 	 */
89196 	uint16_t	seq_id;
89197 	/*
89198 	 * The target ID of the command:
89199 	 * * 0x0-0xFFF8 - The function ID
89200 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89201 	 * * 0xFFFD - Reserved for user-space HWRM interface
89202 	 * * 0xFFFF - HWRM
89203 	 */
89204 	uint16_t	target_id;
89205 	/*
89206 	 * A physical address pointer pointing to a host buffer that the
89207 	 * command's response data will be written. This can be either a host
89208 	 * physical address (HPA) or a guest physical address (GPA) and must
89209 	 * point to a physically contiguous block of memory.
89210 	 */
89211 	uint64_t	resp_addr;
89212 	/*
89213 	 * The host (DMA) buffer physical addr for the firmware to write to.
89214 	 * This buffer is populated with the fru binary bits which is going
89215 	 * to be read from the fru memory.
89216 	 */
89217 	uint64_t	data_addr;
89218 	/* i2c slave address. If set to 0xffff, fw will decide what to use. */
89219 	uint16_t	i2c_slave_addr;
89220 	/*
89221 	 * Size of the buffer pointed to by data_addr. The firmware may
89222 	 * use this entire buffer or less than the entire buffer, but never
89223 	 * more.
89224 	 */
89225 	uint16_t	data_len;
89226 	/* The offset within the SEEPROM to start reading. */
89227 	uint16_t	offset;
89228 	uint8_t	unused[2];
89229 } hwrm_mfg_fru_eeprom_read_input_t, *phwrm_mfg_fru_eeprom_read_input_t;
89230 
89231 /* hwrm_mfg_fru_eeprom_read_output (size:128b/16B) */
89232 
89233 typedef struct hwrm_mfg_fru_eeprom_read_output {
89234 	/* The specific error status for the command. */
89235 	uint16_t	error_code;
89236 	/* The HWRM command request type. */
89237 	uint16_t	req_type;
89238 	/* The sequence ID from the original command. */
89239 	uint16_t	seq_id;
89240 	/* The length of the response data in number of bytes. */
89241 	uint16_t	resp_len;
89242 	/* Total length of data written to the host memory. */
89243 	uint16_t	total_data_len;
89244 	uint16_t	unused_0;
89245 	uint8_t	unused_1[3];
89246 	/*
89247 	 * This field is used in Output records to indicate that the output
89248 	 * is completely written to RAM. This field should be read as '1'
89249 	 * to indicate that the output has been completely written. When
89250 	 * writing a command completion or response to an internal processor,
89251 	 * the order of writes has to be such that this field is written last.
89252 	 */
89253 	uint8_t	valid;
89254 } hwrm_mfg_fru_eeprom_read_output_t, *phwrm_mfg_fru_eeprom_read_output_t;
89255 
89256 /**********************
89257  * hwrm_mfg_soc_image *
89258  **********************/
89259 
89260 
89261 /* hwrm_mfg_soc_image_input (size:512b/64B) */
89262 
89263 typedef struct hwrm_mfg_soc_image_input {
89264 	/* The HWRM command request type. */
89265 	uint16_t	req_type;
89266 	/*
89267 	 * The completion ring to send the completion event on. This should
89268 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89269 	 */
89270 	uint16_t	cmpl_ring;
89271 	/*
89272 	 * The sequence ID is used by the driver for tracking multiple
89273 	 * commands. This ID is treated as opaque data by the firmware and
89274 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89275 	 */
89276 	uint16_t	seq_id;
89277 	/*
89278 	 * The target ID of the command:
89279 	 * * 0x0-0xFFF8 - The function ID
89280 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89281 	 * * 0xFFFD - Reserved for user-space HWRM interface
89282 	 * * 0xFFFF - HWRM
89283 	 */
89284 	uint16_t	target_id;
89285 	/*
89286 	 * A physical address pointer pointing to a host buffer that the
89287 	 * command's response data will be written. This can be either a host
89288 	 * physical address (HPA) or a guest physical address (GPA) and must
89289 	 * point to a physically contiguous block of memory.
89290 	 */
89291 	uint64_t	resp_addr;
89292 	/*
89293 	 * TBD. Work in progress.
89294 	 * This field is the signature value used by SoC UEFI.
89295 	 */
89296 	uint32_t	image_signature;
89297 	/*
89298 	 * TBD. Work in progress.
89299 	 * This field is unused for now.
89300 	 */
89301 	uint32_t	image_type;
89302 	/*
89303 	 * The offset within the image content that is being provided by the
89304 	 * current invocation of this HWRM command. The primate firmware does
89305 	 * not offer any score boarding services to ensure entire image
89306 	 * content is transferred, it is the responsibility of the caller to
89307 	 * ensure image consistency.
89308 	 */
89309 	uint32_t	image_offset;
89310 	/*
89311 	 * Size in bytes for the image content. The maximum value this field
89312 	 * can specify is 4096.
89313 	 */
89314 	uint32_t	image_length;
89315 	/*
89316 	 * Address in host memory where the image content is located. This
89317 	 * location should be 4KB aligned.
89318 	 */
89319 	uint64_t	host_src_addr;
89320 	/*
89321 	 * Address in SoC address space where the provided image content is
89322 	 * to be copied. Primate firmware will copy the image content from
89323 	 * host memory to this location. If the image size is more than the
89324 	 * maximum size that can be transferred with each invocation of this
89325 	 * command, then this address should be updated by the caller for
89326 	 * each invocation to copy the full image.
89327 	 */
89328 	uint64_t	soc_dest_addr;
89329 	/*
89330 	 * Indicates the entrypoint in the image that should be used. This
89331 	 * field is optional. When set to 0, the SoC will determine the
89332 	 * entrypoint on its own.
89333 	 */
89334 	uint32_t	entrypoint_offset;
89335 	uint32_t	flags;
89336 	/*
89337 	 * This bit should be set to '1' only when an image transfer is
89338 	 * being initiated for each unique image_signature.
89339 	 */
89340 	#define HWRM_MFG_SOC_IMAGE_INPUT_FLAGS_START	UINT32_C(0x1)
89341 	/*
89342 	 * This bit should be set to '1' only when an image transfer for a
89343 	 * given image_signature is complete.
89344 	 */
89345 	#define HWRM_MFG_SOC_IMAGE_INPUT_FLAGS_END	UINT32_C(0x2)
89346 	/*
89347 	 * An incrementing number starting with 1 for each invocation of this
89348 	 * HWRM command for any given image_id. No two invocation of this
89349 	 * command for a given image_id shall carry the same seq_number. Each
89350 	 * consecutive invocation of this command for any given image_id
89351 	 * shall increment this number by 1. The value 0 is used when
89352 	 * seq_number is invalid when no image content is being moved.
89353 	 */
89354 	uint32_t	seq_number;
89355 	/*  */
89356 	uint32_t	reserved1;
89357 } hwrm_mfg_soc_image_input_t, *phwrm_mfg_soc_image_input_t;
89358 
89359 /* hwrm_mfg_soc_image_output (size:128b/16B) */
89360 
89361 typedef struct hwrm_mfg_soc_image_output {
89362 	/* The specific error status for the command. */
89363 	uint16_t	error_code;
89364 	/* The HWRM command request type. */
89365 	uint16_t	req_type;
89366 	/* The sequence ID from the original command. */
89367 	uint16_t	seq_id;
89368 	/* The length of the response data in number of bytes. */
89369 	uint16_t	resp_len;
89370 	uint8_t	unused_1[7];
89371 	/*
89372 	 * This field is used in Output records to indicate that the output
89373 	 * is completely written to RAM. This field should be read as '1'
89374 	 * to indicate that the output has been completely written.
89375 	 * When writing a command completion or response to an internal
89376 	 * processor, the order of writes has to be such that this field is
89377 	 * written last.
89378 	 */
89379 	uint8_t	valid;
89380 } hwrm_mfg_soc_image_output_t, *phwrm_mfg_soc_image_output_t;
89381 
89382 /************************
89383  * hwrm_mfg_soc_qstatus *
89384  ************************/
89385 
89386 
89387 /* hwrm_mfg_soc_qstatus_input (size:192b/24B) */
89388 
89389 typedef struct hwrm_mfg_soc_qstatus_input {
89390 	/* The HWRM command request type. */
89391 	uint16_t	req_type;
89392 	/*
89393 	 * The completion ring to send the completion event on. This should
89394 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89395 	 */
89396 	uint16_t	cmpl_ring;
89397 	/*
89398 	 * The sequence ID is used by the driver for tracking multiple
89399 	 * commands. This ID is treated as opaque data by the firmware and
89400 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89401 	 */
89402 	uint16_t	seq_id;
89403 	/*
89404 	 * The target ID of the command:
89405 	 * * 0x0-0xFFF8 - The function ID
89406 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89407 	 * * 0xFFFD - Reserved for user-space HWRM interface
89408 	 * * 0xFFFF - HWRM
89409 	 */
89410 	uint16_t	target_id;
89411 	/*
89412 	 * A physical address pointer pointing to a host buffer that the
89413 	 * command's response data will be written. This can be either a host
89414 	 * physical address (HPA) or a guest physical address (GPA) and must
89415 	 * point to a physically contiguous block of memory.
89416 	 */
89417 	uint64_t	resp_addr;
89418 	/*  */
89419 	uint32_t	reserved1;
89420 	/*  */
89421 	uint32_t	reserved2;
89422 } hwrm_mfg_soc_qstatus_input_t, *phwrm_mfg_soc_qstatus_input_t;
89423 
89424 /* hwrm_mfg_soc_qstatus_output (size:576b/72B) */
89425 
89426 typedef struct hwrm_mfg_soc_qstatus_output {
89427 	/* The specific error status for the command. */
89428 	uint16_t	error_code;
89429 	/* The HWRM command request type. */
89430 	uint16_t	req_type;
89431 	/* The sequence ID from the original command. */
89432 	uint16_t	seq_id;
89433 	/* The length of the response data in number of bytes. */
89434 	uint16_t	resp_len;
89435 	/*
89436 	 * This field describes capabilities of primate firmware for SoC
89437 	 * image.
89438 	 */
89439 	uint32_t	primate_flags;
89440 	/*  */
89441 	uint32_t	reserved1;
89442 	/* This field contains the current content of the AP_STATUS register. */
89443 	uint32_t	ap_status;
89444 	/*
89445 	 * This field contains the current content of the CRMU_STATUS
89446 	 * register.
89447 	 */
89448 	uint32_t	crmu_status;
89449 	/*
89450 	 * If an image provision operation is in process, this field will
89451 	 * provide information on requested image signature else the contents
89452 	 * are undefined.
89453 	 */
89454 	uint32_t	image_signature;
89455 	/*
89456 	 * If an image provision operation is in process, this field will
89457 	 * provide information on requested image command else the contents
89458 	 * are undefined.
89459 	 */
89460 	uint32_t	image_command;
89461 	/*
89462 	 * If an image provision operation is in process, this field will
89463 	 * provide the requested image name else the contents are undefined.
89464 	 */
89465 	uint8_t	image_name[32];
89466 	uint8_t	unused_1[7];
89467 	/*
89468 	 * This field is used in Output records to indicate that the output
89469 	 * is completely written to RAM. This field should be read as '1'
89470 	 * to indicate that the output has been completely written.
89471 	 * When writing a command completion or response to an internal
89472 	 * processor, the order of writes has to be such that this field is
89473 	 * written last.
89474 	 */
89475 	uint8_t	valid;
89476 } hwrm_mfg_soc_qstatus_output_t, *phwrm_mfg_soc_qstatus_output_t;
89477 
89478 /*****************************************
89479  * hwrm_mfg_param_critical_data_finalize *
89480  *****************************************/
89481 
89482 
89483 /* hwrm_mfg_param_critical_data_finalize_input (size:192b/24B) */
89484 
89485 typedef struct hwrm_mfg_param_critical_data_finalize_input {
89486 	/* The HWRM command request type. */
89487 	uint16_t	req_type;
89488 	/*
89489 	 * The completion ring to send the completion event on. This should
89490 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89491 	 */
89492 	uint16_t	cmpl_ring;
89493 	/*
89494 	 * The sequence ID is used by the driver for tracking multiple
89495 	 * commands. This ID is treated as opaque data by the firmware and
89496 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89497 	 */
89498 	uint16_t	seq_id;
89499 	/*
89500 	 * The target ID of the command:
89501 	 * * 0x0-0xFFF8 - The function ID
89502 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89503 	 * * 0xFFFD - Reserved for user-space HWRM interface
89504 	 * * 0xFFFF - HWRM
89505 	 */
89506 	uint16_t	target_id;
89507 	/*
89508 	 * A physical address pointer pointing to a host buffer that the
89509 	 * command's response data will be written. This can be either a host
89510 	 * physical address (HPA) or a guest physical address (GPA) and must
89511 	 * point to a physically contiguous block of memory.
89512 	 */
89513 	uint64_t	resp_addr;
89514 	uint16_t	flags;
89515 	/*
89516 	 * Set to 1 if you wish to unlock and erase the region
89517 	 * before finalizing the data.
89518 	 */
89519 	#define HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE_INPUT_FLAGS_FORCE	UINT32_C(0x1)
89520 	uint16_t	unused_0;
89521 	uint32_t	unused_1;
89522 } hwrm_mfg_param_critical_data_finalize_input_t, *phwrm_mfg_param_critical_data_finalize_input_t;
89523 
89524 /* hwrm_mfg_param_critical_data_finalize_output (size:128b/16B) */
89525 
89526 typedef struct hwrm_mfg_param_critical_data_finalize_output {
89527 	/* The specific error status for the command. */
89528 	uint16_t	error_code;
89529 	/* The HWRM command request type. */
89530 	uint16_t	req_type;
89531 	/* The sequence ID from the original command. */
89532 	uint16_t	seq_id;
89533 	/* The length of the response data in number of bytes. */
89534 	uint16_t	resp_len;
89535 	/* Total length of data finalized. */
89536 	uint32_t	total_data_len;
89537 	uint16_t	error_status;
89538 	/* Critical data region was already locked */
89539 	#define HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE_OUTPUT_ERROR_STATUS_ALREADY_LOCKED	UINT32_C(0x1)
89540 	/* Flash region was not entirely empty */
89541 	#define HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE_OUTPUT_ERROR_STATUS_NOT_EMPTY		UINT32_C(0x2)
89542 	/* FACT_CFG was missing for write to critical cfg */
89543 	#define HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE_OUTPUT_ERROR_STATUS_MISSING_FACT_CFG	UINT32_C(0x4)
89544 	/* VPD was missing for write to critical cfg */
89545 	#define HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE_OUTPUT_ERROR_STATUS_MISSING_VPD	UINT32_C(0x8)
89546 	uint8_t	unused_1;
89547 	/*
89548 	 * This field is used in Output records to indicate that the output
89549 	 * is completely written to RAM. This field should be read as '1'
89550 	 * to indicate that the output has been completely written. When
89551 	 * writing a command completion or response to an internal processor,
89552 	 * the order of writes has to be such that this field is written last.
89553 	 */
89554 	uint8_t	valid;
89555 } hwrm_mfg_param_critical_data_finalize_output_t, *phwrm_mfg_param_critical_data_finalize_output_t;
89556 
89557 /*************************************
89558  * hwrm_mfg_param_critical_data_read *
89559  *************************************/
89560 
89561 
89562 /* hwrm_mfg_param_critical_data_read_input (size:256b/32B) */
89563 
89564 typedef struct hwrm_mfg_param_critical_data_read_input {
89565 	/* The HWRM command request type. */
89566 	uint16_t	req_type;
89567 	/*
89568 	 * The completion ring to send the completion event on. This should
89569 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89570 	 */
89571 	uint16_t	cmpl_ring;
89572 	/*
89573 	 * The sequence ID is used by the driver for tracking multiple
89574 	 * commands. This ID is treated as opaque data by the firmware and
89575 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89576 	 */
89577 	uint16_t	seq_id;
89578 	/*
89579 	 * The target ID of the command:
89580 	 * * 0x0-0xFFF8 - The function ID
89581 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89582 	 * * 0xFFFD - Reserved for user-space HWRM interface
89583 	 * * 0xFFFF - HWRM
89584 	 */
89585 	uint16_t	target_id;
89586 	/*
89587 	 * A physical address pointer pointing to a host buffer that the
89588 	 * command's response data will be written. This can be either a host
89589 	 * physical address (HPA) or a guest physical address (GPA) and must
89590 	 * point to a physically contiguous block of memory.
89591 	 */
89592 	uint64_t	resp_addr;
89593 	/*
89594 	 * The host (DMA) buffer physical addr for the firmware to write to.
89595 	 * This buffer is populated with data read from the
89596 	 * critical data storage location.
89597 	 */
89598 	uint64_t	data_addr;
89599 	/*
89600 	 * Size of the buffer pointed to by data_addr. The firmware may
89601 	 * use this entire buffer or less than the entire buffer, but never
89602 	 * more.
89603 	 */
89604 	uint32_t	data_len;
89605 	/* The offset within the critical data to start reading. */
89606 	uint32_t	offset;
89607 } hwrm_mfg_param_critical_data_read_input_t, *phwrm_mfg_param_critical_data_read_input_t;
89608 
89609 /* hwrm_mfg_param_critical_data_read_output (size:128b/16B) */
89610 
89611 typedef struct hwrm_mfg_param_critical_data_read_output {
89612 	/* The specific error status for the command. */
89613 	uint16_t	error_code;
89614 	/* The HWRM command request type. */
89615 	uint16_t	req_type;
89616 	/* The sequence ID from the original command. */
89617 	uint16_t	seq_id;
89618 	/* The length of the response data in number of bytes. */
89619 	uint16_t	resp_len;
89620 	/* Total length of data written to the host memory. */
89621 	uint32_t	total_data_len;
89622 	uint16_t	unused_0;
89623 	uint8_t	unused_1;
89624 	/*
89625 	 * This field is used in Output records to indicate that the output
89626 	 * is completely written to RAM. This field should be read as '1'
89627 	 * to indicate that the output has been completely written. When
89628 	 * writing a command completion or response to an internal processor,
89629 	 * the order of writes has to be such that this field is written last.
89630 	 */
89631 	uint8_t	valid;
89632 } hwrm_mfg_param_critical_data_read_output_t, *phwrm_mfg_param_critical_data_read_output_t;
89633 
89634 /***************************************
89635  * hwrm_mfg_param_critical_data_health *
89636  ***************************************/
89637 
89638 
89639 /* hwrm_mfg_param_critical_data_health_input (size:192b/24B) */
89640 
89641 typedef struct hwrm_mfg_param_critical_data_health_input {
89642 	/* The HWRM command request type. */
89643 	uint16_t	req_type;
89644 	/*
89645 	 * The completion ring to send the completion event on. This should
89646 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89647 	 */
89648 	uint16_t	cmpl_ring;
89649 	/*
89650 	 * The sequence ID is used by the driver for tracking multiple
89651 	 * commands. This ID is treated as opaque data by the firmware and
89652 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89653 	 */
89654 	uint16_t	seq_id;
89655 	/*
89656 	 * The target ID of the command:
89657 	 * * 0x0-0xFFF8 - The function ID
89658 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89659 	 * * 0xFFFD - Reserved for user-space HWRM interface
89660 	 * * 0xFFFF - HWRM
89661 	 */
89662 	uint16_t	target_id;
89663 	/*
89664 	 * A physical address pointer pointing to a host buffer that the
89665 	 * command's response data will be written. This can be either a host
89666 	 * physical address (HPA) or a guest physical address (GPA) and must
89667 	 * point to a physically contiguous block of memory.
89668 	 */
89669 	uint64_t	resp_addr;
89670 	uint64_t	unused_0;
89671 } hwrm_mfg_param_critical_data_health_input_t, *phwrm_mfg_param_critical_data_health_input_t;
89672 
89673 /* hwrm_mfg_param_critical_data_health_output (size:128b/16B) */
89674 
89675 typedef struct hwrm_mfg_param_critical_data_health_output {
89676 	/* The specific error status for the command. */
89677 	uint16_t	error_code;
89678 	/* The HWRM command request type. */
89679 	uint16_t	req_type;
89680 	/* The sequence ID from the original command. */
89681 	uint16_t	seq_id;
89682 	/* The length of the response data in number of bytes. */
89683 	uint16_t	resp_len;
89684 	uint32_t	health_status;
89685 	/* region entirely empty */
89686 	#define HWRM_MFG_PARAM_CRITICAL_DATA_HEALTH_OUTPUT_HEALTH_STATUS_IS_EMPTY	UINT32_C(0x1)
89687 	/* Data checksum fail */
89688 	#define HWRM_MFG_PARAM_CRITICAL_DATA_HEALTH_OUTPUT_HEALTH_STATUS_CHECKSUM_FAIL	UINT32_C(0x2)
89689 	/* Malformed data (header/footer) */
89690 	#define HWRM_MFG_PARAM_CRITICAL_DATA_HEALTH_OUTPUT_HEALTH_STATUS_MALFORMED_DATA	UINT32_C(0x4)
89691 	/* Critical data not locked */
89692 	#define HWRM_MFG_PARAM_CRITICAL_DATA_HEALTH_OUTPUT_HEALTH_STATUS_NOT_LOCKED	UINT32_C(0x8)
89693 	uint16_t	unused_1;
89694 	uint8_t	unused_2;
89695 	/*
89696 	 * This field is used in Output records to indicate that the output
89697 	 * is completely written to RAM. This field should be read as '1'
89698 	 * to indicate that the output has been completely written. When
89699 	 * writing a command completion or response to an internal processor,
89700 	 * the order of writes has to be such that this field is written last.
89701 	 */
89702 	uint8_t	valid;
89703 } hwrm_mfg_param_critical_data_health_output_t, *phwrm_mfg_param_critical_data_health_output_t;
89704 
89705 /*****************************
89706  * hwrm_mfg_prvsn_export_csr *
89707  *****************************/
89708 
89709 
89710 /* hwrm_mfg_prvsn_export_csr_input (size:256b/32B) */
89711 
89712 typedef struct hwrm_mfg_prvsn_export_csr_input {
89713 	/* The HWRM command request type. */
89714 	uint16_t	req_type;
89715 	/*
89716 	 * The completion ring to send the completion event on. This should
89717 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89718 	 */
89719 	uint16_t	cmpl_ring;
89720 	/*
89721 	 * The sequence ID is used by the driver for tracking multiple
89722 	 * commands. This ID is treated as opaque data by the firmware and
89723 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89724 	 */
89725 	uint16_t	seq_id;
89726 	/*
89727 	 * The target ID of the command:
89728 	 * * 0x0-0xFFF8 - The function ID
89729 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89730 	 * * 0xFFFD - Reserved for user-space HWRM interface
89731 	 * * 0xFFFF - HWRM
89732 	 */
89733 	uint16_t	target_id;
89734 	/*
89735 	 * A physical address pointer pointing to a host buffer that the
89736 	 * command's response data will be written. This can be either a host
89737 	 * physical address (HPA) or a guest physical address (GPA) and must
89738 	 * point to a physically contiguous block of memory.
89739 	 */
89740 	uint64_t	resp_addr;
89741 	/*
89742 	 * 64-bit Host destination address. This is the host address where
89743 	 * data will be written.
89744 	 */
89745 	uint64_t	host_dest_addr;
89746 	/* Provisioning slot number. 0-indexed. */
89747 	uint8_t	slot;
89748 	uint8_t	unused_0;
89749 	/* Size in bytes of the available host buffer. */
89750 	uint16_t	host_buf_len;
89751 	uint8_t	flags;
89752 	/*
89753 	 * This bit is only used when external secure SoC is used for
89754 	 * secure boot. If this bit is set, export a certificate signing
89755 	 * request (CSR) from the security SoC non-volatile storage on
89756 	 * the device.
89757 	 */
89758 	#define HWRM_MFG_PRVSN_EXPORT_CSR_INPUT_FLAGS_SECURE_SOC_SUPPORT	UINT32_C(0x1)
89759 	uint8_t	unused_1[3];
89760 } hwrm_mfg_prvsn_export_csr_input_t, *phwrm_mfg_prvsn_export_csr_input_t;
89761 
89762 /* hwrm_mfg_prvsn_export_csr_output (size:128b/16B) */
89763 
89764 typedef struct hwrm_mfg_prvsn_export_csr_output {
89765 	/* The specific error status for the command. */
89766 	uint16_t	error_code;
89767 	/* The HWRM command request type. */
89768 	uint16_t	req_type;
89769 	/* The sequence ID from the original command. */
89770 	uint16_t	seq_id;
89771 	/* The length of the response data in number of bytes. */
89772 	uint16_t	resp_len;
89773 	/* Provisioning slot number. 0-indexed. */
89774 	uint8_t	slot;
89775 	uint8_t	unused_0;
89776 	/* Size in bytes of the exported CSR. */
89777 	uint16_t	csr_len;
89778 	uint8_t	unused_1[3];
89779 	/*
89780 	 * This field is used in Output records to indicate that the output
89781 	 * is completely written to RAM. This field should be read as '1'
89782 	 * to indicate that the output has been completely written.
89783 	 * When writing a command completion or response to an internal
89784 	 * processor, the order of writes has to be such that this field is
89785 	 * written last.
89786 	 */
89787 	uint8_t	valid;
89788 } hwrm_mfg_prvsn_export_csr_output_t, *phwrm_mfg_prvsn_export_csr_output_t;
89789 
89790 /* hwrm_mfg_prvsn_export_csr_cmd_err (size:64b/8B) */
89791 
89792 typedef struct hwrm_mfg_prvsn_export_csr_cmd_err {
89793 	/*
89794 	 * command specific error codes that goes to
89795 	 * the cmd_err field in Common HWRM Error Response.
89796 	 */
89797 	uint8_t	code;
89798 	/* Unknown error. */
89799 	#define HWRM_MFG_PRVSN_EXPORT_CSR_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
89800 	/* Slot invalid */
89801 	#define HWRM_MFG_PRVSN_EXPORT_CSR_CMD_ERR_CODE_SLOT_INVALID  UINT32_C(0x1)
89802 	/* Host provided buffer is too small */
89803 	#define HWRM_MFG_PRVSN_EXPORT_CSR_CMD_ERR_CODE_BUFFER_LENGTH UINT32_C(0x2)
89804 	#define HWRM_MFG_PRVSN_EXPORT_CSR_CMD_ERR_CODE_LAST	HWRM_MFG_PRVSN_EXPORT_CSR_CMD_ERR_CODE_BUFFER_LENGTH
89805 	uint8_t	unused_0[7];
89806 } hwrm_mfg_prvsn_export_csr_cmd_err_t, *phwrm_mfg_prvsn_export_csr_cmd_err_t;
89807 
89808 /******************************
89809  * hwrm_mfg_prvsn_import_cert *
89810  ******************************/
89811 
89812 
89813 /* hwrm_mfg_prvsn_import_cert_input (size:256b/32B) */
89814 
89815 typedef struct hwrm_mfg_prvsn_import_cert_input {
89816 	/* The HWRM command request type. */
89817 	uint16_t	req_type;
89818 	/*
89819 	 * The completion ring to send the completion event on. This should
89820 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89821 	 */
89822 	uint16_t	cmpl_ring;
89823 	/*
89824 	 * The sequence ID is used by the driver for tracking multiple
89825 	 * commands. This ID is treated as opaque data by the firmware and
89826 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89827 	 */
89828 	uint16_t	seq_id;
89829 	/*
89830 	 * The target ID of the command:
89831 	 * * 0x0-0xFFF8 - The function ID
89832 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89833 	 * * 0xFFFD - Reserved for user-space HWRM interface
89834 	 * * 0xFFFF - HWRM
89835 	 */
89836 	uint16_t	target_id;
89837 	/*
89838 	 * A physical address pointer pointing to a host buffer that the
89839 	 * command's response data will be written. This can be either a host
89840 	 * physical address (HPA) or a guest physical address (GPA) and must
89841 	 * point to a physically contiguous block of memory.
89842 	 */
89843 	uint64_t	resp_addr;
89844 	/*
89845 	 * 64-bit Host source address. This is the host address where
89846 	 * source data is located.
89847 	 */
89848 	uint64_t	host_src_addr;
89849 	/* Provisioning slot number. 0-indexed. */
89850 	uint8_t	slot;
89851 	uint8_t	unused_0;
89852 	/* Size in bytes of the certificate chain. */
89853 	uint16_t	cert_len;
89854 	uint8_t	flags;
89855 	/*
89856 	 * This bit is only used when external secure SoC is used for
89857 	 * secure boot. If this bit is set, then import a HSM-signed
89858 	 * certificate chain to security SoC non-volatile storage on
89859 	 * the device.
89860 	 */
89861 	#define HWRM_MFG_PRVSN_IMPORT_CERT_INPUT_FLAGS_SECURE_SOC_SUPPORT	UINT32_C(0x1)
89862 	uint8_t	unused_1[3];
89863 } hwrm_mfg_prvsn_import_cert_input_t, *phwrm_mfg_prvsn_import_cert_input_t;
89864 
89865 /* hwrm_mfg_prvsn_import_cert_output (size:128b/16B) */
89866 
89867 typedef struct hwrm_mfg_prvsn_import_cert_output {
89868 	/* The specific error status for the command. */
89869 	uint16_t	error_code;
89870 	/* The HWRM command request type. */
89871 	uint16_t	req_type;
89872 	/* The sequence ID from the original command. */
89873 	uint16_t	seq_id;
89874 	/* The length of the response data in number of bytes. */
89875 	uint16_t	resp_len;
89876 	/* Provisioning slot number. 0-indexed. */
89877 	uint8_t	slot;
89878 	/* Provisioned state */
89879 	uint8_t	state;
89880 	/* Certificate chain is not provisioned. */
89881 	#define HWRM_MFG_PRVSN_IMPORT_CERT_OUTPUT_STATE_NOT_PROVISIONED UINT32_C(0x0)
89882 	/* Certificate chain successfully provisioned. */
89883 	#define HWRM_MFG_PRVSN_IMPORT_CERT_OUTPUT_STATE_PROVISIONED	UINT32_C(0x1)
89884 	#define HWRM_MFG_PRVSN_IMPORT_CERT_OUTPUT_STATE_LAST	HWRM_MFG_PRVSN_IMPORT_CERT_OUTPUT_STATE_PROVISIONED
89885 	uint8_t	unused_0[5];
89886 	/*
89887 	 * This field is used in Output records to indicate that the output
89888 	 * is completely written to RAM. This field should be read as '1'
89889 	 * to indicate that the output has been completely written.
89890 	 * When writing a command completion or response to an internal
89891 	 * processor, the order of writes has to be such that this field is
89892 	 * written last.
89893 	 */
89894 	uint8_t	valid;
89895 } hwrm_mfg_prvsn_import_cert_output_t, *phwrm_mfg_prvsn_import_cert_output_t;
89896 
89897 /* hwrm_mfg_prvsn_import_cert_cmd_err (size:64b/8B) */
89898 
89899 typedef struct hwrm_mfg_prvsn_import_cert_cmd_err {
89900 	/*
89901 	 * command specific error codes that goes to
89902 	 * the cmd_err field in Common HWRM Error Response.
89903 	 */
89904 	uint8_t	code;
89905 	/* Unknown error. */
89906 	#define HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_UNKNOWN		UINT32_C(0x0)
89907 	/* Slot invalid */
89908 	#define HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_SLOT_INVALID	UINT32_C(0x1)
89909 	/* Slot is provisioned and locked */
89910 	#define HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_SLOT_LOCKED	UINT32_C(0x2)
89911 	/* Non-volatile storage is full or in error. */
89912 	#define HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_NO_STORAGE		UINT32_C(0x3)
89913 	/* Certificate chain verification failed. */
89914 	#define HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_CERT_VERIFY_FAIL	UINT32_C(0x4)
89915 	/* There is no self-signed device id certificate on device */
89916 	#define HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_NO_SIGNED_DEVICE_CERT UINT32_C(0x5)
89917 	#define HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_LAST		HWRM_MFG_PRVSN_IMPORT_CERT_CMD_ERR_CODE_NO_SIGNED_DEVICE_CERT
89918 	uint8_t	unused_0[7];
89919 } hwrm_mfg_prvsn_import_cert_cmd_err_t, *phwrm_mfg_prvsn_import_cert_cmd_err_t;
89920 
89921 /****************************
89922  * hwrm_mfg_prvsn_get_state *
89923  ****************************/
89924 
89925 
89926 /* hwrm_mfg_prvsn_get_state_input (size:128b/16B) */
89927 
89928 typedef struct hwrm_mfg_prvsn_get_state_input {
89929 	/* The HWRM command request type. */
89930 	uint16_t	req_type;
89931 	/*
89932 	 * The completion ring to send the completion event on. This should
89933 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
89934 	 */
89935 	uint16_t	cmpl_ring;
89936 	/*
89937 	 * The sequence ID is used by the driver for tracking multiple
89938 	 * commands. This ID is treated as opaque data by the firmware and
89939 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
89940 	 */
89941 	uint16_t	seq_id;
89942 	/*
89943 	 * The target ID of the command:
89944 	 * * 0x0-0xFFF8 - The function ID
89945 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
89946 	 * * 0xFFFD - Reserved for user-space HWRM interface
89947 	 * * 0xFFFF - HWRM
89948 	 */
89949 	uint16_t	target_id;
89950 	/*
89951 	 * A physical address pointer pointing to a host buffer that the
89952 	 * command's response data will be written. This can be either a host
89953 	 * physical address (HPA) or a guest physical address (GPA) and must
89954 	 * point to a physically contiguous block of memory.
89955 	 */
89956 	uint64_t	resp_addr;
89957 } hwrm_mfg_prvsn_get_state_input_t, *phwrm_mfg_prvsn_get_state_input_t;
89958 
89959 /* hwrm_mfg_prvsn_get_state_output (size:128b/16B) */
89960 
89961 typedef struct hwrm_mfg_prvsn_get_state_output {
89962 	/* The specific error status for the command. */
89963 	uint16_t	error_code;
89964 	/* The HWRM command request type. */
89965 	uint16_t	req_type;
89966 	/* The sequence ID from the original command. */
89967 	uint16_t	seq_id;
89968 	/* The length of the response data in number of bytes. */
89969 	uint16_t	resp_len;
89970 	/* Flag indicating if provision get state is valid. */
89971 	uint8_t	get_state_valid;
89972 	/*
89973 	 * Provision get state is invalid. The attestation agent has not
89974 	 * yet initialized and not completed verification of the
89975 	 * provisioned certificate chain.
89976 	 * The slot_status field is undetermined.
89977 	 */
89978 	#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_GET_STATE_VALID_INVALID  UINT32_C(0x0)
89979 	/* Provision get state is valid for SPDM. */
89980 	#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_GET_STATE_VALID_SPDM	UINT32_C(0x1)
89981 	/* Provision get state is valid for Cerberus. */
89982 	#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_GET_STATE_VALID_CERBERUS UINT32_C(0x2)
89983 	/* Provision get state is valid. There is no attestation agent. */
89984 	#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_GET_STATE_VALID_NONE	UINT32_C(0xff)
89985 	#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_GET_STATE_VALID_LAST	HWRM_MFG_PRVSN_GET_STATE_OUTPUT_GET_STATE_VALID_NONE
89986 	/*
89987 	 * An 8-bit mask returning the provisioned state of the imported
89988 	 * certificate chain on the device for each available slot.
89989 	 * Bit-N corresponding to slot N.
89990 	 * The slot_status field is undetermined if get_state_valid = 0.
89991 	 */
89992 	uint8_t	slot_status;
89993 	/* Slot N entries */
89994 	#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_SLOT_STATUS_SLOT_N_MASK	UINT32_C(0xff)
89995 	#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_SLOT_STATUS_SLOT_N_SFT		0
89996 	/* Slot N is not provisioned. */
89997 		#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_SLOT_STATUS_SLOT_N_NOT_PROVISIONED  UINT32_C(0x0)
89998 	/*
89999 	 * Slot N is provisioned and certificate chain is loaded
90000 	 * successfully by the attestation agent.
90001 	 */
90002 		#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_SLOT_STATUS_SLOT_N_PROVISIONED	UINT32_C(0x1)
90003 		#define HWRM_MFG_PRVSN_GET_STATE_OUTPUT_SLOT_STATUS_SLOT_N_LAST		HWRM_MFG_PRVSN_GET_STATE_OUTPUT_SLOT_STATUS_SLOT_N_PROVISIONED
90004 	uint8_t	unused_0[5];
90005 	/*
90006 	 * This field is used in Output records to indicate that the output
90007 	 * is completely written to RAM. This field should be read as '1'
90008 	 * to indicate that the output has been completely written.
90009 	 * When writing a command completion or response to an internal
90010 	 * processor, the order of writes has to be such that this field is
90011 	 * written last.
90012 	 */
90013 	uint8_t	valid;
90014 } hwrm_mfg_prvsn_get_state_output_t, *phwrm_mfg_prvsn_get_state_output_t;
90015 
90016 /******************************
90017  * hwrm_mfg_prvsn_export_cert *
90018  ******************************/
90019 
90020 
90021 /* hwrm_mfg_prvsn_export_cert_input (size:256b/32B) */
90022 
90023 typedef struct hwrm_mfg_prvsn_export_cert_input {
90024 	/* The HWRM command request type. */
90025 	uint16_t	req_type;
90026 	/*
90027 	 * The completion ring to send the completion event on. This should
90028 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90029 	 */
90030 	uint16_t	cmpl_ring;
90031 	/*
90032 	 * The sequence ID is used by the driver for tracking multiple
90033 	 * commands. This ID is treated as opaque data by the firmware and
90034 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90035 	 */
90036 	uint16_t	seq_id;
90037 	/*
90038 	 * The target ID of the command:
90039 	 * * 0x0-0xFFF8 - The function ID
90040 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90041 	 * * 0xFFFD - Reserved for user-space HWRM interface
90042 	 * * 0xFFFF - HWRM
90043 	 */
90044 	uint16_t	target_id;
90045 	/*
90046 	 * A physical address pointer pointing to a host buffer that the
90047 	 * command's response data will be written. This can be either a host
90048 	 * physical address (HPA) or a guest physical address (GPA) and must
90049 	 * point to a physically contiguous block of memory.
90050 	 */
90051 	uint64_t	resp_addr;
90052 	/*
90053 	 * 64-bit Host destination address. This is the host address where
90054 	 * data will be written.
90055 	 */
90056 	uint64_t	host_dest_addr;
90057 	/* Provisioning slot number. 0-indexed. */
90058 	uint8_t	slot;
90059 	uint8_t	unused_0;
90060 	/* Size in bytes of the available host buffer. */
90061 	uint16_t	host_buf_len;
90062 	uint8_t	flags;
90063 	/*
90064 	 * This bit is only used when external secure SoC is used
90065 	 * for secure boot. If this bit is set, then export the
90066 	 * provisioned certificate from the security SoC non-volatile
90067 	 * storage device.
90068 	 */
90069 	#define HWRM_MFG_PRVSN_EXPORT_CERT_INPUT_FLAGS_SECURE_SOC_SUPPORT	UINT32_C(0x1)
90070 	uint8_t	unused_1[3];
90071 } hwrm_mfg_prvsn_export_cert_input_t, *phwrm_mfg_prvsn_export_cert_input_t;
90072 
90073 /* hwrm_mfg_prvsn_export_cert_output (size:128b/16B) */
90074 
90075 typedef struct hwrm_mfg_prvsn_export_cert_output {
90076 	/* The specific error status for the command. */
90077 	uint16_t	error_code;
90078 	/* The HWRM command request type. */
90079 	uint16_t	req_type;
90080 	/* The sequence ID from the original command. */
90081 	uint16_t	seq_id;
90082 	/* The length of the response data in number of bytes. */
90083 	uint16_t	resp_len;
90084 	/* Provisioning slot number. 0-indexed. */
90085 	uint8_t	slot;
90086 	uint8_t	unused_0;
90087 	/*
90088 	 * Size in bytes of the exported certificate chain. If there are no
90089 	 * certificates provisioned for the specified slot, the device will
90090 	 * return a successful response with cert_len equal to 0.
90091 	 */
90092 	uint16_t	cert_len;
90093 	uint8_t	unused_1[3];
90094 	/*
90095 	 * This field is used in Output records to indicate that the output
90096 	 * is completely written to RAM. This field should be read as '1'
90097 	 * to indicate that the output has been completely written.
90098 	 * When writing a command completion or response to an internal
90099 	 * processor, the order of writes has to be such that this field is
90100 	 * written last.
90101 	 */
90102 	uint8_t	valid;
90103 } hwrm_mfg_prvsn_export_cert_output_t, *phwrm_mfg_prvsn_export_cert_output_t;
90104 
90105 /* hwrm_mfg_prvsn_export_cert_cmd_err (size:64b/8B) */
90106 
90107 typedef struct hwrm_mfg_prvsn_export_cert_cmd_err {
90108 	/*
90109 	 * command specific error codes that goes to
90110 	 * the cmd_err field in Common HWRM Error Response.
90111 	 */
90112 	uint8_t	code;
90113 	/* Unknown error. */
90114 	#define HWRM_MFG_PRVSN_EXPORT_CERT_CMD_ERR_CODE_UNKNOWN	UINT32_C(0x0)
90115 	/* Slot invalid */
90116 	#define HWRM_MFG_PRVSN_EXPORT_CERT_CMD_ERR_CODE_SLOT_INVALID  UINT32_C(0x1)
90117 	/*
90118 	 * The provisioned certificates are invalid due to device ID change,
90119 	 * NVRAM corruption or another reason.
90120 	 */
90121 	#define HWRM_MFG_PRVSN_EXPORT_CERT_CMD_ERR_CODE_CERT_INVALID  UINT32_C(0x2)
90122 	/* Host provided buffer is too small */
90123 	#define HWRM_MFG_PRVSN_EXPORT_CERT_CMD_ERR_CODE_BUFFER_LENGTH UINT32_C(0x3)
90124 	#define HWRM_MFG_PRVSN_EXPORT_CERT_CMD_ERR_CODE_LAST	HWRM_MFG_PRVSN_EXPORT_CERT_CMD_ERR_CODE_BUFFER_LENGTH
90125 	uint8_t	unused_0[7];
90126 } hwrm_mfg_prvsn_export_cert_cmd_err_t, *phwrm_mfg_prvsn_export_cert_cmd_err_t;
90127 
90128 /********************************
90129  * hwrm_mfg_get_nvm_measurement *
90130  ********************************/
90131 
90132 
90133 /* hwrm_mfg_get_nvm_measurement_input (size:128b/16B) */
90134 
90135 typedef struct hwrm_mfg_get_nvm_measurement_input {
90136 	/* The HWRM command request type. */
90137 	uint16_t	req_type;
90138 	/*
90139 	 * The completion ring to send the completion event on. This should
90140 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90141 	 */
90142 	uint16_t	cmpl_ring;
90143 	/*
90144 	 * The sequence ID is used by the driver for tracking multiple
90145 	 * commands. This ID is treated as opaque data by the firmware and
90146 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90147 	 */
90148 	uint16_t	seq_id;
90149 	/*
90150 	 * The target ID of the command:
90151 	 * * 0x0-0xFFF8 - The function ID
90152 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90153 	 * * 0xFFFD - Reserved for user-space HWRM interface
90154 	 * * 0xFFFF - HWRM
90155 	 */
90156 	uint16_t	target_id;
90157 	/*
90158 	 * A physical address pointer pointing to a host buffer that the
90159 	 * command's response data will be written. This can be either a host
90160 	 * physical address (HPA) or a guest physical address (GPA) and must
90161 	 * point to a physically contiguous block of memory.
90162 	 */
90163 	uint64_t	resp_addr;
90164 } hwrm_mfg_get_nvm_measurement_input_t, *phwrm_mfg_get_nvm_measurement_input_t;
90165 
90166 /* hwrm_mfg_get_nvm_measurement_output (size:448b/56B) */
90167 
90168 typedef struct hwrm_mfg_get_nvm_measurement_output {
90169 	/* The specific error status for the command. */
90170 	uint16_t	error_code;
90171 	/* The HWRM command request type. */
90172 	uint16_t	req_type;
90173 	/* The sequence ID from the original command. */
90174 	uint16_t	seq_id;
90175 	/* The length of the response data in number of bytes. */
90176 	uint16_t	resp_len;
90177 	/* Flag indicating if the hash returned is valid. */
90178 	uint8_t	hash_state;
90179 	/*
90180 	 * Measurement hash is invalid. There was an error
90181 	 * calculating the hash or firmware does not support NVM
90182 	 * measurement.
90183 	 */
90184 	#define HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_HASH_STATE_INVALID UINT32_C(0x0)
90185 	/* Measurement hash is valid. */
90186 	#define HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_HASH_STATE_VALID   UINT32_C(0x1)
90187 	#define HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_HASH_STATE_LAST   HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_HASH_STATE_VALID
90188 	/*
90189 	 * Flag indicating whether the measurement was calculated
90190 	 * in real time or calculated during bootup time.
90191 	 */
90192 	uint8_t	calc_time;
90193 	/* Measurement was calculated during bootup time. */
90194 	#define HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_CALC_TIME_BOOTUP UINT32_C(0x0)
90195 	/* Measurement is calculated in real time */
90196 	#define HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_CALC_TIME_LIVE   UINT32_C(0x1)
90197 	#define HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_CALC_TIME_LAST  HWRM_MFG_GET_NVM_MEASUREMENT_OUTPUT_CALC_TIME_LIVE
90198 	uint8_t	unused_0[6];
90199 	/* Thirty two bytes HMAC SHA256 hash of NVM configuration. */
90200 	uint8_t	hash[32];
90201 	uint8_t	unused_1[7];
90202 	/*
90203 	 * This field is used in Output records to indicate that the output
90204 	 * is completely written to RAM. This field should be read as '1'
90205 	 * to indicate that the output has been completely written.
90206 	 * When writing a command completion or response to an internal
90207 	 * processor, the order of writes has to be such that this field is
90208 	 * written last.
90209 	 */
90210 	uint8_t	valid;
90211 } hwrm_mfg_get_nvm_measurement_output_t, *phwrm_mfg_get_nvm_measurement_output_t;
90212 
90213 /*************************
90214  * hwrm_mfg_psoc_qstatus *
90215  *************************/
90216 
90217 
90218 /* hwrm_mfg_psoc_qstatus_input (size:192b/24B) */
90219 
90220 typedef struct hwrm_mfg_psoc_qstatus_input {
90221 	/* The HWRM command request type. */
90222 	uint16_t	req_type;
90223 	/*
90224 	 * The completion ring to send the completion event on. This should
90225 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90226 	 */
90227 	uint16_t	cmpl_ring;
90228 	/*
90229 	 * The sequence ID is used by the driver for tracking multiple
90230 	 * commands. This ID is treated as opaque data by the firmware and
90231 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90232 	 */
90233 	uint16_t	seq_id;
90234 	/*
90235 	 * The target ID of the command:
90236 	 * * 0x0-0xFFF8 - The function ID
90237 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90238 	 * * 0xFFFD - Reserved for user-space HWRM interface
90239 	 * * 0xFFFF - HWRM
90240 	 */
90241 	uint16_t	target_id;
90242 	/*
90243 	 * A physical address pointer pointing to a host buffer that the
90244 	 * command's response data will be written. This can be either a host
90245 	 * physical address (HPA) or a guest physical address (GPA) and must
90246 	 * point to a physically contiguous block of memory.
90247 	 */
90248 	uint64_t	resp_addr;
90249 	/*  */
90250 	uint32_t	reserved1;
90251 	/*  */
90252 	uint32_t	reserved2;
90253 } hwrm_mfg_psoc_qstatus_input_t, *phwrm_mfg_psoc_qstatus_input_t;
90254 
90255 /* hwrm_mfg_psoc_qstatus_output (size:768b/96B) */
90256 
90257 typedef struct hwrm_mfg_psoc_qstatus_output {
90258 	/* The specific error status for the command. */
90259 	uint16_t	error_code;
90260 	/* The HWRM command request type. */
90261 	uint16_t	req_type;
90262 	/* The sequence ID from the original command. */
90263 	uint16_t	seq_id;
90264 	/* The length of the response data in number of bytes. */
90265 	uint16_t	resp_len;
90266 	/* PBL version info. Start at 0, roll if change in structure */
90267 	uint8_t	pbl_info_version;
90268 	/* PBL info length. Counts all bytes. */
90269 	uint8_t	pbl_info_length;
90270 	/*
90271 	 * Hardware generation major version. Rolled on incompatible hardware
90272 	 * changes.
90273 	 */
90274 	uint8_t	hw_generation_major;
90275 	/* Hardware generation minor version. Tracks minor changes. */
90276 	uint8_t	hw_generation_minor;
90277 	/* Reserved. */
90278 	uint8_t	feature_support;
90279 	/* Firmware version major. */
90280 	uint8_t	fw_version_major;
90281 	/* Firmware version minor. */
90282 	uint8_t	fw_version_minor;
90283 	/* Indicate which of the two firmware images is active. */
90284 	uint8_t	active_image;
90285 	/* Identifies PSoC specific part. */
90286 	uint32_t	silicon_id;
90287 	/* Length of part number string in bytes, including NULL terminator. */
90288 	uint8_t	part_number_string_length;
90289 	uint8_t	unused_1[3];
90290 	/* Part number string in ASCII. */
90291 	uint8_t	part_number_string[64];
90292 	uint8_t	unused_2[7];
90293 	/*
90294 	 * This field is used in Output records to indicate that the output
90295 	 * is completely written to RAM. This field should be read as '1'
90296 	 * to indicate that the output has been completely written.
90297 	 * When writing a command completion or response to an internal
90298 	 * processor, the order of writes has to be such that this field is
90299 	 * written last.
90300 	 */
90301 	uint8_t	valid;
90302 } hwrm_mfg_psoc_qstatus_output_t, *phwrm_mfg_psoc_qstatus_output_t;
90303 
90304 /***************************
90305  * hwrm_mfg_selftest_qlist *
90306  ***************************/
90307 
90308 
90309 /* hwrm_mfg_selftest_qlist_input (size:128b/16B) */
90310 
90311 typedef struct hwrm_mfg_selftest_qlist_input {
90312 	/* The HWRM command request type. */
90313 	uint16_t	req_type;
90314 	/*
90315 	 * The completion ring to send the completion event on. This should
90316 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90317 	 */
90318 	uint16_t	cmpl_ring;
90319 	/*
90320 	 * The sequence ID is used by the driver for tracking multiple
90321 	 * commands. This ID is treated as opaque data by the firmware and
90322 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90323 	 */
90324 	uint16_t	seq_id;
90325 	/*
90326 	 * The target ID of the command:
90327 	 * * 0x0-0xFFF8 - The function ID
90328 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90329 	 * * 0xFFFD - Reserved for user-space HWRM interface
90330 	 * * 0xFFFF - HWRM
90331 	 */
90332 	uint16_t	target_id;
90333 	/*
90334 	 * A physical address pointer pointing to a host buffer that the
90335 	 * command's response data will be written. This can be either a host
90336 	 * physical address (HPA) or a guest physical address (GPA) and must
90337 	 * point to a physically contiguous block of memory.
90338 	 */
90339 	uint64_t	resp_addr;
90340 } hwrm_mfg_selftest_qlist_input_t, *phwrm_mfg_selftest_qlist_input_t;
90341 
90342 /* hwrm_mfg_selftest_qlist_output (size:192b/24B) */
90343 
90344 typedef struct hwrm_mfg_selftest_qlist_output {
90345 	/* The specific error status for the command. */
90346 	uint16_t	error_code;
90347 	/* The HWRM command request type. */
90348 	uint16_t	req_type;
90349 	/* The sequence ID from the original command. */
90350 	uint16_t	seq_id;
90351 	/* The length of the response data in number of bytes. */
90352 	uint16_t	resp_len;
90353 	/*
90354 	 * This field represents the number of tests available to be
90355 	 * requested by manufacturing tool.
90356 	 */
90357 	uint8_t	num_tests;
90358 	/* This field indicates which self-test is available to be run. */
90359 	uint8_t	available_tests;
90360 	/*
90361 	 * Can run the peripheral tests. Individual peripherals are
90362 	 * specified in peripheral_tests field.
90363 	 */
90364 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_AVAILABLE_TESTS_PERIPHERAL_TEST	UINT32_C(0x1)
90365 	/*
90366 	 * This field represents the maximum timeout for all the
90367 	 * tests to complete in milliseconds.
90368 	 */
90369 	uint16_t	test_timeout;
90370 	/*
90371 	 * This field is a 32 bits bitmap, each bit specifies a peripheral
90372 	 * test.
90373 	 */
90374 	uint32_t	peripheral_tests;
90375 	/* Can run memory test on Co-CPU peripheral */
90376 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_CO_CPU_MEMORY	UINT32_C(0x1)
90377 	/* Can run test on dpll eeprom peripheral */
90378 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_DPLL_EEPROM	UINT32_C(0x2)
90379 	/* Can run test on dpll mmcx connector peripheral */
90380 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_DPLL_MMCX	UINT32_C(0x4)
90381 	/* Can run test on gnss peripheral */
90382 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_GNSS		UINT32_C(0x8)
90383 	/* Can run pcie test on Co-CPU peripheral */
90384 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_CO_CPU_PCIE	UINT32_C(0x10)
90385 	/* Can run test on internal fabric peripheral */
90386 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_INTERNAL_FABRIC	UINT32_C(0x20)
90387 	/* Can run test on oven controlled crystal oscillator peripheral */
90388 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_OCXO		UINT32_C(0x40)
90389 	/* Can run test on telecom pll peripheral */
90390 	#define HWRM_MFG_SELFTEST_QLIST_OUTPUT_PERIPHERAL_TESTS_TELECOM_PLL	UINT32_C(0x80)
90391 	uint8_t	unused_2[7];
90392 	/*
90393 	 * This field is used in Output records to indicate that the output
90394 	 * is completely written to RAM. This field should be read as '1'
90395 	 * to indicate that the output has been completely written. When
90396 	 * writing a command completion or response to an internal processor,
90397 	 * the order of writes has to be such that this field is written last.
90398 	 */
90399 	uint8_t	valid;
90400 } hwrm_mfg_selftest_qlist_output_t, *phwrm_mfg_selftest_qlist_output_t;
90401 
90402 /**************************
90403  * hwrm_mfg_selftest_exec *
90404  **************************/
90405 
90406 
90407 /* hwrm_mfg_selftest_exec_input (size:192b/24B) */
90408 
90409 typedef struct hwrm_mfg_selftest_exec_input {
90410 	/* The HWRM command request type. */
90411 	uint16_t	req_type;
90412 	/*
90413 	 * The completion ring to send the completion event on. This should
90414 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90415 	 */
90416 	uint16_t	cmpl_ring;
90417 	/*
90418 	 * The sequence ID is used by the driver for tracking multiple
90419 	 * commands. This ID is treated as opaque data by the firmware and
90420 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90421 	 */
90422 	uint16_t	seq_id;
90423 	/*
90424 	 * The target ID of the command:
90425 	 * * 0x0-0xFFF8 - The function ID
90426 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90427 	 * * 0xFFFD - Reserved for user-space HWRM interface
90428 	 * * 0xFFFF - HWRM
90429 	 */
90430 	uint16_t	target_id;
90431 	/*
90432 	 * A physical address pointer pointing to a host buffer that the
90433 	 * command's response data will be written. This can be either a host
90434 	 * physical address (HPA) or a guest physical address (GPA) and must
90435 	 * point to a physically contiguous block of memory.
90436 	 */
90437 	uint64_t	resp_addr;
90438 	/* This field indicates which self-test is being requested to run. */
90439 	uint8_t	flags;
90440 	/*
90441 	 * Run the Peripheral tests specified in peripheral_tests
90442 	 * field.
90443 	 */
90444 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_FLAGS_PERIPHERAL_TEST	UINT32_C(0x1)
90445 	uint8_t	unused_0[3];
90446 	/*
90447 	 * This field is a 32 bits bitmap to specify which peripheral tests to
90448 	 * run, each bit specifies a peripheral test.
90449 	 */
90450 	uint32_t	peripheral_tests;
90451 	/* Run memory test on Co-CPU peripheral */
90452 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_CO_CPU_MEMORY	UINT32_C(0x1)
90453 	/* Run test on dpll eeprom peripheral */
90454 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_DPLL_EEPROM	UINT32_C(0x2)
90455 	/* Run test on dpll mmcx connector peripheral */
90456 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_DPLL_MMCX	UINT32_C(0x4)
90457 	/* Run test on gnss peripheral */
90458 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_GNSS		UINT32_C(0x8)
90459 	/* Run pcie test on Co-CPU peripheral */
90460 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_CO_CPU_PCIE	UINT32_C(0x10)
90461 	/* Run test on internal fabric peripheral */
90462 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_INTERNAL_FABRIC	UINT32_C(0x20)
90463 	/* Run test on oven controlled crystal oscillator peripheral */
90464 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_OCXO		UINT32_C(0x40)
90465 	/* Run test on telecom pll peripheral */
90466 	#define HWRM_MFG_SELFTEST_EXEC_INPUT_PERIPHERAL_TESTS_TELECOM_PLL	UINT32_C(0x80)
90467 } hwrm_mfg_selftest_exec_input_t, *phwrm_mfg_selftest_exec_input_t;
90468 
90469 /* hwrm_mfg_selftest_exec_output (size:192b/24B) */
90470 
90471 typedef struct hwrm_mfg_selftest_exec_output {
90472 	/* The specific error status for the command. */
90473 	uint16_t	error_code;
90474 	/* The HWRM command request type. */
90475 	uint16_t	req_type;
90476 	/* The sequence ID from the original command. */
90477 	uint16_t	seq_id;
90478 	/* The length of the response data in number of bytes. */
90479 	uint16_t	resp_len;
90480 	/* The following tests were requested to be run. */
90481 	uint8_t	requested_tests;
90482 	/* A request was made to run the peripheral tests. */
90483 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_REQUESTED_TESTS_PERIPHERAL_TEST	UINT32_C(0x1)
90484 	/*
90485 	 * If a test was requested to be run as seen in the requested_tests
90486 	 * field, this bit indicates whether the test was successful(1) or
90487 	 * failed(0).
90488 	 */
90489 	uint8_t	test_success;
90490 	/*
90491 	 * If requested, a value of 1 indicates the peripheral tests
90492 	 * completed successfully.
90493 	 */
90494 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_TEST_SUCCESS_PERIPHERAL_TEST	UINT32_C(0x1)
90495 	uint8_t	unused_0[2];
90496 	/*
90497 	 * This field is a 32 bits bitmap for firmware to indicate which
90498 	 * peripheral tests are specified by the host, each bit specifies
90499 	 * a peripheral test.
90500 	 */
90501 	uint32_t	peripheral_requested_tests;
90502 	/* Co-CPU peripheral test requested */
90503 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_CO_CPU_MEMORY	UINT32_C(0x1)
90504 	/* dpll eeprom peripheral test requested */
90505 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_DPLL_EEPROM	UINT32_C(0x2)
90506 	/* dpll mmcx connector peripheral test requested */
90507 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_DPLL_MMCX	UINT32_C(0x4)
90508 	/* gnss peripheral test requested */
90509 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_GNSS		UINT32_C(0x8)
90510 	/* pcie test on Co-CPU peripheral test requested */
90511 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_CO_CPU_PCIE	UINT32_C(0x10)
90512 	/* internal fabric peripheral test requested */
90513 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_INTERNAL_FABRIC	UINT32_C(0x20)
90514 	/* oven controlled crystal oscillator peripheral test requested */
90515 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_OCXO		UINT32_C(0x40)
90516 	/* telecom pll peripheral test requested */
90517 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_REQUESTED_TESTS_TELECOM_PLL	UINT32_C(0x80)
90518 	/*
90519 	 * This field is a 32 bits bitmap for firmware to indicate which
90520 	 * peripheral tests are successfully executed, each bit specifies
90521 	 * a peripheral test.
90522 	 */
90523 	uint32_t	peripheral_tests_success;
90524 	/* Co-CPU peripheral test is successfully executed */
90525 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_CO_CPU_MEMORY	UINT32_C(0x1)
90526 	/* dpll eeprom peripheral test is successfully executed */
90527 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_DPLL_EEPROM	UINT32_C(0x2)
90528 	/* dpll mmcx connector peripheral test is successfully executed */
90529 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_DPLL_MMCX	UINT32_C(0x4)
90530 	/* gnss peripheral test is successfully executed */
90531 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_GNSS		UINT32_C(0x8)
90532 	/* pcie test on Co-CPU peripheral test is successfully executed */
90533 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_CO_CPU_PCIE	UINT32_C(0x10)
90534 	/* internal fabric peripheral test is successfully executed */
90535 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_INTERNAL_FABRIC	UINT32_C(0x20)
90536 	/*
90537 	 * oven controlled crystal oscillator peripheral test is successfully
90538 	 * executed
90539 	 */
90540 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_OCXO		UINT32_C(0x40)
90541 	/* telecom pll peripheral test is successfully executed */
90542 	#define HWRM_MFG_SELFTEST_EXEC_OUTPUT_PERIPHERAL_TESTS_SUCCESS_TELECOM_PLL	UINT32_C(0x80)
90543 	uint8_t	unused_1[3];
90544 	/*
90545 	 * This field is used in Output records to indicate that the output
90546 	 * is completely written to RAM. This field should be read as '1'
90547 	 * to indicate that the output has been completely written. When
90548 	 * writing a command completion or response to an internal processor,
90549 	 * the order of writes has to be such that this field is written last.
90550 	 */
90551 	uint8_t	valid;
90552 } hwrm_mfg_selftest_exec_output_t, *phwrm_mfg_selftest_exec_output_t;
90553 
90554 /****************
90555  * hwrm_oem_cmd *
90556  ****************/
90557 
90558 
90559 /* hwrm_oem_cmd_input (size:1024b/128B) */
90560 
90561 typedef struct hwrm_oem_cmd_input {
90562 	/* The HWRM command request type. */
90563 	uint16_t	req_type;
90564 	/*
90565 	 * The completion ring to send the completion event on. This should
90566 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90567 	 */
90568 	uint16_t	cmpl_ring;
90569 	/*
90570 	 * The sequence ID is used by the driver for tracking multiple
90571 	 * commands. This ID is treated as opaque data by the firmware and
90572 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90573 	 */
90574 	uint16_t	seq_id;
90575 	/*
90576 	 * The target ID of the command:
90577 	 * * 0x0-0xFFF8 - The function ID
90578 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90579 	 * * 0xFFFD - Reserved for user-space HWRM interface
90580 	 * * 0xFFFF - HWRM
90581 	 */
90582 	uint16_t	target_id;
90583 	/*
90584 	 * A physical address pointer pointing to a host buffer that the
90585 	 * command's response data will be written. This can be either a host
90586 	 * physical address (HPA) or a guest physical address (GPA) and must
90587 	 * point to a physically contiguous block of memory.
90588 	 */
90589 	uint64_t	resp_addr;
90590 	/*
90591 	 * The organization owning the message format. Set this field
90592 	 * to 0x14e4 when used for Broadcom internal use when
90593 	 * the naming authority is set to PCI_SIG.
90594 	 */
90595 	uint32_t	oem_id;
90596 	/* The naming authority used for setting the oem_id. */
90597 	uint8_t	naming_authority;
90598 	/* Invalid naming authority */
90599 	#define HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_INVALID UINT32_C(0x0)
90600 	/* PCI_SIG naming authority numbering is used */
90601 	#define HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_PCI_SIG UINT32_C(0x1)
90602 	#define HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_LAST   HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_PCI_SIG
90603 	/* The message family within the organization. */
90604 	uint8_t	message_family;
90605 	/* Invalid message family */
90606 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_INVALID UINT32_C(0x0)
90607 	/* This message is targeted for Truflow */
90608 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_TRUFLOW UINT32_C(0x1)
90609 	/* This message is targeted for RoCE */
90610 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_ROCE	UINT32_C(0x2)
90611 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_LAST   HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_ROCE
90612 	uint16_t	unused;
90613 	/* This field contains the vendor specific command data. */
90614 	uint32_t	oem_data[26];
90615 } hwrm_oem_cmd_input_t, *phwrm_oem_cmd_input_t;
90616 
90617 /* hwrm_oem_cmd_output (size:768b/96B) */
90618 
90619 typedef struct hwrm_oem_cmd_output {
90620 	/* The specific error status for the command. */
90621 	uint16_t	error_code;
90622 	/* The HWRM command request type. */
90623 	uint16_t	req_type;
90624 	/* The sequence ID from the original command. */
90625 	uint16_t	seq_id;
90626 	/* The length of the response data in number of bytes. */
90627 	uint16_t	resp_len;
90628 	/* The organization owning the message format. */
90629 	uint32_t	oem_id;
90630 	/* The naming authority used for setting the oem_id. */
90631 	uint8_t	naming_authority;
90632 	/* The message family within the organization. */
90633 	uint8_t	message_family;
90634 	uint16_t	unused;
90635 	/* This field contains the vendor specific response data. */
90636 	uint32_t	oem_data[18];
90637 	uint8_t	unused_1[7];
90638 	/*
90639 	 * This field is used in Output records to indicate that the output
90640 	 * is completely written to RAM. This field should be read as '1'
90641 	 * to indicate that the output has been completely written. When
90642 	 * writing a command completion or response to an internal processor,
90643 	 * the order of writes has to be such that this field is written last.
90644 	 */
90645 	uint8_t	valid;
90646 } hwrm_oem_cmd_output_t, *phwrm_oem_cmd_output_t;
90647 
90648 /***********
90649  * hwrm_sv *
90650  ***********/
90651 
90652 
90653 /* hwrm_sv_input (size:1152b/144B) */
90654 
90655 typedef struct hwrm_sv_input {
90656 	/* The HWRM command request type. */
90657 	uint16_t	req_type;
90658 	/*
90659 	 * The completion ring to send the completion event on. This should
90660 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90661 	 */
90662 	uint16_t	cmpl_ring;
90663 	/*
90664 	 * The sequence ID is used by the driver for tracking multiple
90665 	 * commands. This ID is treated as opaque data by the firmware and
90666 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90667 	 */
90668 	uint16_t	seq_id;
90669 	/*
90670 	 * The target ID of the command:
90671 	 * * 0x0-0xFFF8 - The function ID
90672 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90673 	 * * 0xFFFD - Reserved for user-space HWRM interface
90674 	 * * 0xFFFF - HWRM
90675 	 */
90676 	uint16_t	target_id;
90677 	/*
90678 	 * A physical address pointer pointing to a host buffer that the
90679 	 * command's response data will be written. This can be either a host
90680 	 * physical address (HPA) or a guest physical address (GPA) and must
90681 	 * point to a physically contiguous block of memory.
90682 	 */
90683 	uint64_t	resp_addr;
90684 	uint32_t	opaque[32];
90685 } hwrm_sv_input_t, *phwrm_sv_input_t;
90686 
90687 /* hwrm_sv_output (size:1088b/136B) */
90688 
90689 typedef struct hwrm_sv_output {
90690 	/* The specific error status for the command. */
90691 	uint16_t	error_code;
90692 	/* The HWRM command request type. */
90693 	uint16_t	req_type;
90694 	/* The sequence ID from the original command. */
90695 	uint16_t	seq_id;
90696 	/* The length of the response data in number of bytes. */
90697 	uint16_t	resp_len;
90698 	uint32_t	opaque[32];
90699 } hwrm_sv_output_t, *phwrm_sv_output_t;
90700 
90701 /*******************
90702  * hwrm_udcc_qcaps *
90703  *******************/
90704 
90705 
90706 /* hwrm_udcc_qcaps_input (size:128b/16B) */
90707 
90708 typedef struct hwrm_udcc_qcaps_input {
90709 	/* The HWRM command request type. */
90710 	uint16_t	req_type;
90711 	/*
90712 	 * The completion ring to send the completion event on. This should
90713 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90714 	 */
90715 	uint16_t	cmpl_ring;
90716 	/*
90717 	 * The sequence ID is used by the driver for tracking multiple
90718 	 * commands. This ID is treated as opaque data by the firmware and
90719 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90720 	 */
90721 	uint16_t	seq_id;
90722 	/*
90723 	 * The target ID of the command:
90724 	 * * 0x0-0xFFF8 - The function ID
90725 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90726 	 * * 0xFFFD - Reserved for user-space HWRM interface
90727 	 * * 0xFFFF - HWRM
90728 	 */
90729 	uint16_t	target_id;
90730 	/*
90731 	 * A physical address pointer pointing to a host buffer that the
90732 	 * command's response data will be written. This can be either a host
90733 	 * physical address (HPA) or a guest physical address (GPA) and must
90734 	 * point to a physically contiguous block of memory.
90735 	 */
90736 	uint64_t	resp_addr;
90737 } hwrm_udcc_qcaps_input_t, *phwrm_udcc_qcaps_input_t;
90738 
90739 /* hwrm_udcc_qcaps_output (size:192b/24B) */
90740 
90741 typedef struct hwrm_udcc_qcaps_output {
90742 	/* The specific error status for the command. */
90743 	uint16_t	error_code;
90744 	/* The HWRM command request type. */
90745 	uint16_t	req_type;
90746 	/* The sequence ID from the original command. */
90747 	uint16_t	seq_id;
90748 	/* The length of the response data in number of bytes. */
90749 	uint16_t	resp_len;
90750 	/*
90751 	 * This field represents guaranteed minimum number of UDCC sessions
90752 	 * available to the function.
90753 	 */
90754 	uint16_t	min_sessions;
90755 	/*
90756 	 * This field represents unguaranteed maximum number of UDCC sessions
90757 	 * available to the function.
90758 	 */
90759 	uint16_t	max_sessions;
90760 	/*
90761 	 * This value indicates the type of session being modified by the
90762 	 * UDCC.
90763 	 */
90764 	uint8_t	session_type;
90765 	/* sessions are allocated on a per destination basis. */
90766 	#define HWRM_UDCC_QCAPS_OUTPUT_SESSION_TYPE_PER_DESTINATION UINT32_C(0x0)
90767 	/* sessions are allocated on a per QP basis. */
90768 	#define HWRM_UDCC_QCAPS_OUTPUT_SESSION_TYPE_PER_QP	UINT32_C(0x1)
90769 	#define HWRM_UDCC_QCAPS_OUTPUT_SESSION_TYPE_LAST	HWRM_UDCC_QCAPS_OUTPUT_SESSION_TYPE_PER_QP
90770 	uint8_t	unused_0[3];
90771 	/*
90772 	 * This field represents the maximum number of bytes of UDCC program
90773 	 * configuration data that one hwrm_udcc_comp_cfg request or
90774 	 * hwrm_udcc_comp_qcfg response can transfer.
90775 	 * The value is determined by the UDCC firmware.
90776 	 */
90777 	uint16_t	max_comp_cfg_xfer;
90778 	/*
90779 	 * This field represents the maximum number of bytes of UDCC program
90780 	 * status or statistics data that one hwrm_udcc_comp_query response
90781 	 * can transfer. The value is determined by the UDCC firmware.
90782 	 */
90783 	uint16_t	max_comp_data_xfer;
90784 	uint8_t	unused_1[3];
90785 	/*
90786 	 * This field is used in Output records to indicate that the output
90787 	 * is completely written to RAM. This field should be read as '1'
90788 	 * to indicate that the output has been completely written. When
90789 	 * writing a command completion or response to an internal processor,
90790 	 * the order of writes has to be such that this field is written last.
90791 	 */
90792 	uint8_t	valid;
90793 } hwrm_udcc_qcaps_output_t, *phwrm_udcc_qcaps_output_t;
90794 
90795 /*****************
90796  * hwrm_udcc_cfg *
90797  *****************/
90798 
90799 
90800 /* hwrm_udcc_cfg_input (size:192b/24B) */
90801 
90802 typedef struct hwrm_udcc_cfg_input {
90803 	/* The HWRM command request type. */
90804 	uint16_t	req_type;
90805 	/*
90806 	 * The completion ring to send the completion event on. This should
90807 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90808 	 */
90809 	uint16_t	cmpl_ring;
90810 	/*
90811 	 * The sequence ID is used by the driver for tracking multiple
90812 	 * commands. This ID is treated as opaque data by the firmware and
90813 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90814 	 */
90815 	uint16_t	seq_id;
90816 	/*
90817 	 * The target ID of the command:
90818 	 * * 0x0-0xFFF8 - The function ID
90819 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90820 	 * * 0xFFFD - Reserved for user-space HWRM interface
90821 	 * * 0xFFFF - HWRM
90822 	 */
90823 	uint16_t	target_id;
90824 	/*
90825 	 * A physical address pointer pointing to a host buffer that the
90826 	 * command's response data will be written. This can be either a host
90827 	 * physical address (HPA) or a guest physical address (GPA) and must
90828 	 * point to a physically contiguous block of memory.
90829 	 */
90830 	uint64_t	resp_addr;
90831 	uint32_t	enables;
90832 	/*
90833 	 * This bit must be '1' for the udcc_mode field to be
90834 	 * configured.
90835 	 */
90836 	#define HWRM_UDCC_CFG_INPUT_ENABLES_UDCC_MODE	UINT32_C(0x1)
90837 	/* UDCC mode for this function. */
90838 	uint8_t	udcc_mode;
90839 	/* UDCC is not enabled. */
90840 	#define HWRM_UDCC_CFG_INPUT_UDCC_MODE_DISABLED UINT32_C(0x0)
90841 	/* UDCC is enabled. */
90842 	#define HWRM_UDCC_CFG_INPUT_UDCC_MODE_ENABLED  UINT32_C(0x1)
90843 	#define HWRM_UDCC_CFG_INPUT_UDCC_MODE_LAST	HWRM_UDCC_CFG_INPUT_UDCC_MODE_ENABLED
90844 	uint8_t	unused_1[3];
90845 } hwrm_udcc_cfg_input_t, *phwrm_udcc_cfg_input_t;
90846 
90847 /* hwrm_udcc_cfg_output (size:128b/16B) */
90848 
90849 typedef struct hwrm_udcc_cfg_output {
90850 	/* The specific error status for the command. */
90851 	uint16_t	error_code;
90852 	/* The HWRM command request type. */
90853 	uint16_t	req_type;
90854 	/* The sequence ID from the original command. */
90855 	uint16_t	seq_id;
90856 	/* The length of the response data in number of bytes. */
90857 	uint16_t	resp_len;
90858 	uint8_t	unused_1[7];
90859 	/*
90860 	 * This field is used in Output records to indicate that the output
90861 	 * is completely written to RAM. This field should be read as '1'
90862 	 * to indicate that the output has been completely written. When
90863 	 * writing a command completion or response to an internal processor,
90864 	 * the order of writes has to be such that this field is written last.
90865 	 */
90866 	uint8_t	valid;
90867 } hwrm_udcc_cfg_output_t, *phwrm_udcc_cfg_output_t;
90868 
90869 /******************
90870  * hwrm_udcc_qcfg *
90871  ******************/
90872 
90873 
90874 /* hwrm_udcc_qcfg_input (size:128b/16B) */
90875 
90876 typedef struct hwrm_udcc_qcfg_input {
90877 	/* The HWRM command request type. */
90878 	uint16_t	req_type;
90879 	/*
90880 	 * The completion ring to send the completion event on. This should
90881 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90882 	 */
90883 	uint16_t	cmpl_ring;
90884 	/*
90885 	 * The sequence ID is used by the driver for tracking multiple
90886 	 * commands. This ID is treated as opaque data by the firmware and
90887 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90888 	 */
90889 	uint16_t	seq_id;
90890 	/*
90891 	 * The target ID of the command:
90892 	 * * 0x0-0xFFF8 - The function ID
90893 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90894 	 * * 0xFFFD - Reserved for user-space HWRM interface
90895 	 * * 0xFFFF - HWRM
90896 	 */
90897 	uint16_t	target_id;
90898 	/*
90899 	 * A physical address pointer pointing to a host buffer that the
90900 	 * command's response data will be written. This can be either a host
90901 	 * physical address (HPA) or a guest physical address (GPA) and must
90902 	 * point to a physically contiguous block of memory.
90903 	 */
90904 	uint64_t	resp_addr;
90905 } hwrm_udcc_qcfg_input_t, *phwrm_udcc_qcfg_input_t;
90906 
90907 /* hwrm_udcc_qcfg_output (size:128b/16B) */
90908 
90909 typedef struct hwrm_udcc_qcfg_output {
90910 	/* The specific error status for the command. */
90911 	uint16_t	error_code;
90912 	/* The HWRM command request type. */
90913 	uint16_t	req_type;
90914 	/* The sequence ID from the original command. */
90915 	uint16_t	seq_id;
90916 	/* The length of the response data in number of bytes. */
90917 	uint16_t	resp_len;
90918 	/* UDCC mode for this function. */
90919 	uint8_t	udcc_mode;
90920 	uint8_t	unused_1[6];
90921 	/*
90922 	 * This field is used in Output records to indicate that the output
90923 	 * is completely written to RAM. This field should be read as '1'
90924 	 * to indicate that the output has been completely written. When
90925 	 * writing a command completion or response to an internal processor,
90926 	 * the order of writes has to be such that this field is written last.
90927 	 */
90928 	uint8_t	valid;
90929 } hwrm_udcc_qcfg_output_t, *phwrm_udcc_qcfg_output_t;
90930 
90931 /*************************
90932  * hwrm_udcc_session_cfg *
90933  *************************/
90934 
90935 
90936 /* hwrm_udcc_session_cfg_input (size:384b/48B) */
90937 
90938 typedef struct hwrm_udcc_session_cfg_input {
90939 	/* The HWRM command request type. */
90940 	uint16_t	req_type;
90941 	/*
90942 	 * The completion ring to send the completion event on. This should
90943 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
90944 	 */
90945 	uint16_t	cmpl_ring;
90946 	/*
90947 	 * The sequence ID is used by the driver for tracking multiple
90948 	 * commands. This ID is treated as opaque data by the firmware and
90949 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
90950 	 */
90951 	uint16_t	seq_id;
90952 	/*
90953 	 * The target ID of the command:
90954 	 * * 0x0-0xFFF8 - The function ID
90955 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
90956 	 * * 0xFFFD - Reserved for user-space HWRM interface
90957 	 * * 0xFFFF - HWRM
90958 	 */
90959 	uint16_t	target_id;
90960 	/*
90961 	 * A physical address pointer pointing to a host buffer that the
90962 	 * command's response data will be written. This can be either a host
90963 	 * physical address (HPA) or a guest physical address (GPA) and must
90964 	 * point to a physically contiguous block of memory.
90965 	 */
90966 	uint64_t	resp_addr;
90967 	uint32_t	enables;
90968 	/* This bit must be '1' for the session_state to be configured. */
90969 	#define HWRM_UDCC_SESSION_CFG_INPUT_ENABLES_SESSION_STATE	UINT32_C(0x1)
90970 	/* This bit must be '1' for the dest_mac to be configured. */
90971 	#define HWRM_UDCC_SESSION_CFG_INPUT_ENABLES_DEST_MAC		UINT32_C(0x2)
90972 	/* This bit must be '1' for the src_mac to be configured. */
90973 	#define HWRM_UDCC_SESSION_CFG_INPUT_ENABLES_SRC_MAC		UINT32_C(0x4)
90974 	/* This bit must be '1' for the tx_stats_record to be configured. */
90975 	#define HWRM_UDCC_SESSION_CFG_INPUT_ENABLES_TX_STATS_RECORD	UINT32_C(0x8)
90976 	/* This bit must be '1' for the rx_stats_record to be configured. */
90977 	#define HWRM_UDCC_SESSION_CFG_INPUT_ENABLES_RX_STATS_RECORD	UINT32_C(0x10)
90978 	/* State to configure for the session. */
90979 	uint8_t	session_state;
90980 	/*
90981 	 * This bit is set if the session is to be enabled and have firmware
90982 	 * querying it for events. The bit is cleared if the session is to
90983 	 * be disabled in firmware.
90984 	 */
90985 	#define HWRM_UDCC_SESSION_CFG_INPUT_SESSION_STATE_ENABLED		UINT32_C(0x1)
90986 	/* UDCC flow is not created in driver. */
90987 	#define HWRM_UDCC_SESSION_CFG_INPUT_SESSION_STATE_FLOW_NOT_CREATED	UINT32_C(0x2)
90988 	/* UDCC flow is now deleted in driver. */
90989 	#define HWRM_UDCC_SESSION_CFG_INPUT_SESSION_STATE_FLOW_HAS_BEEN_DELETED	UINT32_C(0x4)
90990 	uint8_t	unused_1;
90991 	/* A handle for the session to be configured, if previously allocated. */
90992 	uint16_t	session_id;
90993 	/* destination mac address used for the session. */
90994 	uint8_t	dest_mac[6];
90995 	uint16_t	unused_2;
90996 	/* source mac address used for the session. */
90997 	uint8_t	src_mac[6];
90998 	uint16_t	unused_3;
90999 	/*
91000 	 * address for the tx flow statistics record to be sampled by the
91001 	 * UDCC firmware. Session must be disabled to take effect.
91002 	 */
91003 	uint32_t	tx_stats_record;
91004 	/*
91005 	 * address for the rx flow statistics record to be sampled by the
91006 	 * UDCC firmware. Session must be disabled to take effect.
91007 	 */
91008 	uint32_t	rx_stats_record;
91009 } hwrm_udcc_session_cfg_input_t, *phwrm_udcc_session_cfg_input_t;
91010 
91011 /* hwrm_udcc_session_cfg_output (size:128b/16B) */
91012 
91013 typedef struct hwrm_udcc_session_cfg_output {
91014 	/* The specific error status for the command. */
91015 	uint16_t	error_code;
91016 	/* The HWRM command request type. */
91017 	uint16_t	req_type;
91018 	/* The sequence ID from the original command. */
91019 	uint16_t	seq_id;
91020 	/* The length of the response data in number of bytes. */
91021 	uint16_t	resp_len;
91022 	uint8_t	unused_1[7];
91023 	/*
91024 	 * This field is used in Output records to indicate that the output
91025 	 * is completely written to RAM. This field should be read as '1'
91026 	 * to indicate that the output has been completely written. When
91027 	 * writing a command completion or response to an internal processor,
91028 	 * the order of writes has to be such that this field is written last.
91029 	 */
91030 	uint8_t	valid;
91031 } hwrm_udcc_session_cfg_output_t, *phwrm_udcc_session_cfg_output_t;
91032 
91033 /**************************
91034  * hwrm_udcc_session_qcfg *
91035  **************************/
91036 
91037 
91038 /* hwrm_udcc_session_qcfg_input (size:192b/24B) */
91039 
91040 typedef struct hwrm_udcc_session_qcfg_input {
91041 	/* The HWRM command request type. */
91042 	uint16_t	req_type;
91043 	/*
91044 	 * The completion ring to send the completion event on. This should
91045 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
91046 	 */
91047 	uint16_t	cmpl_ring;
91048 	/*
91049 	 * The sequence ID is used by the driver for tracking multiple
91050 	 * commands. This ID is treated as opaque data by the firmware and
91051 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
91052 	 */
91053 	uint16_t	seq_id;
91054 	/*
91055 	 * The target ID of the command:
91056 	 * * 0x0-0xFFF8 - The function ID
91057 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
91058 	 * * 0xFFFD - Reserved for user-space HWRM interface
91059 	 * * 0xFFFF - HWRM
91060 	 */
91061 	uint16_t	target_id;
91062 	/*
91063 	 * A physical address pointer pointing to a host buffer that the
91064 	 * command's response data will be written. This can be either a host
91065 	 * physical address (HPA) or a guest physical address (GPA) and must
91066 	 * point to a physically contiguous block of memory.
91067 	 */
91068 	uint64_t	resp_addr;
91069 	/* A handle for the session to be queried, if previously allocated. */
91070 	uint16_t	session_id;
91071 	uint8_t	unused_0[6];
91072 } hwrm_udcc_session_qcfg_input_t, *phwrm_udcc_session_qcfg_input_t;
91073 
91074 /* hwrm_udcc_session_qcfg_output (size:512b/64B) */
91075 
91076 typedef struct hwrm_udcc_session_qcfg_output {
91077 	/* The specific error status for the command. */
91078 	uint16_t	error_code;
91079 	/* The HWRM command request type. */
91080 	uint16_t	req_type;
91081 	/* The sequence ID from the original command. */
91082 	uint16_t	seq_id;
91083 	/* The length of the response data in number of bytes. */
91084 	uint16_t	resp_len;
91085 	/* session_state specifying configuration of the session. */
91086 	uint8_t	session_state;
91087 	/*
91088 	 * This bit is set if the session is enabled and firmware is
91089 	 * querying it for events. The bit is cleared if no querying
91090 	 * should occur for this session.
91091 	 */
91092 	#define HWRM_UDCC_SESSION_QCFG_OUTPUT_SESSION_STATE_ENABLED		UINT32_C(0x1)
91093 	/* UDCC flow is not created in driver. */
91094 	#define HWRM_UDCC_SESSION_QCFG_OUTPUT_SESSION_STATE_FLOW_NOT_CREATED	UINT32_C(0x2)
91095 	/* UDCC flow is now deleted in driver. */
91096 	#define HWRM_UDCC_SESSION_QCFG_OUTPUT_SESSION_STATE_FLOW_HAS_BEEN_DELETED	UINT32_C(0x4)
91097 	uint8_t	unused_0;
91098 	/* destination mac address used for the session. */
91099 	uint8_t	dest_mac[6];
91100 	/*
91101 	 * a 4 byte or 16 byte IP address, depending on whether the ip_type
91102 	 * specifies IPv4 or IPv6. For IPv4 addresses, the first 4 bytes of the
91103 	 * 16 byte field are used; the remaining 12 bytes are not used.
91104 	 */
91105 	uint32_t	dest_ip[4];
91106 	uint8_t	unused_1[2];
91107 	/* source mac address used for the session. */
91108 	uint8_t	src_mac[6];
91109 	/* source QP number used for the session. */
91110 	uint32_t	src_qp_num;
91111 	/* destination QP number used for the session. */
91112 	uint32_t	dest_qp_num;
91113 	/*
91114 	 * address for the tx flow statistics record to be sampled by the
91115 	 * UDCC firmware.
91116 	 */
91117 	uint32_t	tx_stats_record;
91118 	/*
91119 	 * address for the rx flow statistics record to be sampled by the
91120 	 * UDCC firmware.
91121 	 */
91122 	uint32_t	rx_stats_record;
91123 	uint8_t	unused_2[7];
91124 	/*
91125 	 * This field is used in Output records to indicate that the output
91126 	 * is completely written to RAM. This field should be read as '1'
91127 	 * to indicate that the output has been completely written. When
91128 	 * writing a command completion or response to an internal processor,
91129 	 * the order of writes has to be such that this field is written last.
91130 	 */
91131 	uint8_t	valid;
91132 } hwrm_udcc_session_qcfg_output_t, *phwrm_udcc_session_qcfg_output_t;
91133 
91134 /***************************
91135  * hwrm_udcc_session_query *
91136  ***************************/
91137 
91138 
91139 /* hwrm_udcc_session_query_input (size:192b/24B) */
91140 
91141 typedef struct hwrm_udcc_session_query_input {
91142 	/* The HWRM command request type. */
91143 	uint16_t	req_type;
91144 	/*
91145 	 * The completion ring to send the completion event on. This should
91146 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
91147 	 */
91148 	uint16_t	cmpl_ring;
91149 	/*
91150 	 * The sequence ID is used by the driver for tracking multiple
91151 	 * commands. This ID is treated as opaque data by the firmware and
91152 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
91153 	 */
91154 	uint16_t	seq_id;
91155 	/*
91156 	 * The target ID of the command:
91157 	 * * 0x0-0xFFF8 - The function ID
91158 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
91159 	 * * 0xFFFD - Reserved for user-space HWRM interface
91160 	 * * 0xFFFF - HWRM
91161 	 */
91162 	uint16_t	target_id;
91163 	/*
91164 	 * A physical address pointer pointing to a host buffer that the
91165 	 * command's response data will be written. This can be either a host
91166 	 * physical address (HPA) or a guest physical address (GPA) and must
91167 	 * point to a physically contiguous block of memory.
91168 	 */
91169 	uint64_t	resp_addr;
91170 	/* A handle for the session to be queried, if previously allocated. */
91171 	uint16_t	session_id;
91172 	uint8_t	unused_0[6];
91173 } hwrm_udcc_session_query_input_t, *phwrm_udcc_session_query_input_t;
91174 
91175 /* hwrm_udcc_session_query_output (size:576b/72B) */
91176 
91177 typedef struct hwrm_udcc_session_query_output {
91178 	/* The specific error status for the command. */
91179 	uint16_t	error_code;
91180 	/* The HWRM command request type. */
91181 	uint16_t	req_type;
91182 	/* The sequence ID from the original command. */
91183 	uint16_t	seq_id;
91184 	/* The length of the response data in number of bytes. */
91185 	uint16_t	resp_len;
91186 	/* field for the minimum RTT value (in ns) for the session. */
91187 	uint32_t	min_rtt_ns;
91188 	/* field for the maximum RTT value (in ns) for the session. */
91189 	uint32_t	max_rtt_ns;
91190 	/*
91191 	 * field for the current configured rate (in Mbps) for the
91192 	 * session.
91193 	 */
91194 	uint32_t	cur_rate_mbps;
91195 	/*
91196 	 * count for the number of events sent from FW to the UDCC
91197 	 * program.
91198 	 */
91199 	uint32_t	tx_event_count;
91200 	/*
91201 	 * count for the number of CNP events sent from FW to the UDCC
91202 	 * program.
91203 	 */
91204 	uint32_t	cnp_rx_event_count;
91205 	/*
91206 	 * count for the number of RTT request events received by the FW from
91207 	 * the UDCC program.
91208 	 */
91209 	uint32_t	rtt_req_count;
91210 	/*
91211 	 * count for the number of RTT response events sent by the FW to the
91212 	 * UDCC program.
91213 	 */
91214 	uint32_t	rtt_resp_count;
91215 	/* count for the number of bytes transmitted for the session. */
91216 	uint32_t	tx_bytes_count;
91217 	/* count for the number of packets transmitted for the session. */
91218 	uint32_t	tx_packets_count;
91219 	/* count of initiator probes transmitted for the session. */
91220 	uint32_t	init_probes_sent;
91221 	/* count of terminator probes received for the session. */
91222 	uint32_t	term_probes_recv;
91223 	/* count of CNP packets received for the session. */
91224 	uint32_t	cnp_packets_recv;
91225 	/* count of retransmission timeout events received for the session. */
91226 	uint32_t	rto_event_recv;
91227 	/* count of sequence error NAK events received for the session. */
91228 	uint32_t	seq_err_nak_recv;
91229 	/* the current number of qps associated with the session. */
91230 	uint32_t	qp_count;
91231 	uint8_t	unused_1[3];
91232 	/*
91233 	 * This field is used in Output records to indicate that the output
91234 	 * is completely written to RAM. This field should be read as '1'
91235 	 * to indicate that the output has been completely written. When
91236 	 * writing a command completion or response to an internal processor,
91237 	 * the order of writes has to be such that this field is written last.
91238 	 */
91239 	uint8_t	valid;
91240 } hwrm_udcc_session_query_output_t, *phwrm_udcc_session_query_output_t;
91241 
91242 /**********************
91243  * hwrm_udcc_comp_cfg *
91244  **********************/
91245 
91246 
91247 /* hwrm_udcc_comp_cfg_input (size:576b/72B) */
91248 
91249 typedef struct hwrm_udcc_comp_cfg_input {
91250 	/* The HWRM command request type. */
91251 	uint16_t	req_type;
91252 	/*
91253 	 * The completion ring to send the completion event on. This should
91254 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
91255 	 */
91256 	uint16_t	cmpl_ring;
91257 	/*
91258 	 * The sequence ID is used by the driver for tracking multiple
91259 	 * commands. This ID is treated as opaque data by the firmware and
91260 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
91261 	 */
91262 	uint16_t	seq_id;
91263 	/*
91264 	 * The target ID of the command:
91265 	 * * 0x0-0xFFF8 - The function ID
91266 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
91267 	 * * 0xFFFD - Reserved for user-space HWRM interface
91268 	 * * 0xFFFF - HWRM
91269 	 */
91270 	uint16_t	target_id;
91271 	/*
91272 	 * A physical address pointer pointing to a host buffer that the
91273 	 * command's response data will be written. This can be either a host
91274 	 * physical address (HPA) or a guest physical address (GPA) and must
91275 	 * point to a physically contiguous block of memory.
91276 	 */
91277 	uint64_t	resp_addr;
91278 	/*
91279 	 * This field holds the configuration arguments, which can be used
91280 	 * to specify the context of the configuration data, e.g. type,
91281 	 * session ID, etc. It is possible not all arg_buf are utilized.
91282 	 * The format and meaning of the arguments are internal to
91283 	 * the UDCC program.
91284 	 */
91285 	uint8_t	arg_buf[40];
91286 	/*
91287 	 * This field specifies the number of bytes in arg_buf that are
91288 	 * configuration arguments. It can be zero if there are no arguments.
91289 	 */
91290 	uint32_t	arg_len;
91291 	/*
91292 	 * This field specifies the length of the configuration data
91293 	 * stored in the host memory. The host driver shall guarantee
91294 	 * this number is not greater than the maximum configuration
91295 	 * transfer size that is specified by the max_comp_cfg_xfer
91296 	 * field of hwrm_udcc_qcaps_output.
91297 	 */
91298 	uint32_t	cfg_len;
91299 	/*
91300 	 * This field specifies the address of the host memory where
91301 	 * the configuration data is stored. The format and meaning of
91302 	 * the configuration data are internal to the UDCC program.
91303 	 */
91304 	uint64_t	cfg_host_addr;
91305 } hwrm_udcc_comp_cfg_input_t, *phwrm_udcc_comp_cfg_input_t;
91306 
91307 /* hwrm_udcc_comp_cfg_output (size:128b/16B) */
91308 
91309 typedef struct hwrm_udcc_comp_cfg_output {
91310 	/* The specific error status for the command. */
91311 	uint16_t	error_code;
91312 	/* The HWRM command request type. */
91313 	uint16_t	req_type;
91314 	/* The sequence ID from the original command. */
91315 	uint16_t	seq_id;
91316 	/* The length of the response data in number of bytes. */
91317 	uint16_t	resp_len;
91318 	uint8_t	unused_0[7];
91319 	/*
91320 	 * This field is used in Output records to indicate that the output
91321 	 * is completely written to RAM. This field should be read as '1'
91322 	 * to indicate that the output has been completely written. When
91323 	 * writing a command completion or response to an internal processor,
91324 	 * the order of writes has to be such that this field is written last.
91325 	 */
91326 	uint8_t	valid;
91327 } hwrm_udcc_comp_cfg_output_t, *phwrm_udcc_comp_cfg_output_t;
91328 
91329 /***********************
91330  * hwrm_udcc_comp_qcfg *
91331  ***********************/
91332 
91333 
91334 /* hwrm_udcc_comp_qcfg_input (size:576b/72B) */
91335 
91336 typedef struct hwrm_udcc_comp_qcfg_input {
91337 	/* The HWRM command request type. */
91338 	uint16_t	req_type;
91339 	/*
91340 	 * The completion ring to send the completion event on. This should
91341 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
91342 	 */
91343 	uint16_t	cmpl_ring;
91344 	/*
91345 	 * The sequence ID is used by the driver for tracking multiple
91346 	 * commands. This ID is treated as opaque data by the firmware and
91347 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
91348 	 */
91349 	uint16_t	seq_id;
91350 	/*
91351 	 * The target ID of the command:
91352 	 * * 0x0-0xFFF8 - The function ID
91353 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
91354 	 * * 0xFFFD - Reserved for user-space HWRM interface
91355 	 * * 0xFFFF - HWRM
91356 	 */
91357 	uint16_t	target_id;
91358 	/*
91359 	 * A physical address pointer pointing to a host buffer that the
91360 	 * command's response data will be written. This can be either a host
91361 	 * physical address (HPA) or a guest physical address (GPA) and must
91362 	 * point to a physically contiguous block of memory.
91363 	 */
91364 	uint64_t	resp_addr;
91365 	/*
91366 	 * This field holds the query arguments, which can be used to
91367 	 * specify the context of the query, e.g. type, session ID, etc.
91368 	 * It is possible not all arg_buf are utilized.
91369 	 * The format and meaning of the arguments are internal to
91370 	 * the UDCC program.
91371 	 */
91372 	uint8_t	arg_buf[40];
91373 	/*
91374 	 * This field specifies the number of bytes in arg_buf that are
91375 	 * query arguments. It can be zero if there are no arguments.
91376 	 */
91377 	uint32_t	arg_len;
91378 	/*
91379 	 * This field specifies the size of the buffer in the host memory
91380 	 * for receiving the configuration data. The host driver shall
91381 	 * guarantee the size of the buffer is not smaller than
91382 	 * the maximum configuration transfer size that is specified by
91383 	 * the max_comp_cfg_xfer field of hwrm_udcc_qcaps_output.
91384 	 */
91385 	uint32_t	cfg_host_buf_size;
91386 	/*
91387 	 * This field specifies the address of the host memory where
91388 	 * the queried configuration to be stored.
91389 	 */
91390 	uint64_t	cfg_host_addr;
91391 } hwrm_udcc_comp_qcfg_input_t, *phwrm_udcc_comp_qcfg_input_t;
91392 
91393 /* hwrm_udcc_comp_qcfg_output (size:128b/16B) */
91394 
91395 typedef struct hwrm_udcc_comp_qcfg_output {
91396 	/* The specific error status for the command. */
91397 	uint16_t	error_code;
91398 	/* The HWRM command request type. */
91399 	uint16_t	req_type;
91400 	/* The sequence ID from the original command. */
91401 	uint16_t	seq_id;
91402 	/* The length of the response data in number of bytes. */
91403 	uint16_t	resp_len;
91404 	/*
91405 	 * This field specifies the length of configuration data transferred
91406 	 * into the host memory. The amount of data transferred is up to
91407 	 * the maximum configuration transfer size that is specified by
91408 	 * the max_comp_cfg_xfer field of hwrm_udcc_qcaps_output.
91409 	 */
91410 	uint32_t	cfg_len;
91411 	uint8_t	unused_0[3];
91412 	/*
91413 	 * This field is used in Output records to indicate that the output
91414 	 * is completely written to RAM. This field should be read as '1'
91415 	 * to indicate that the output has been completely written. When
91416 	 * writing a command completion or response to an internal processor,
91417 	 * the order of writes has to be such that this field is written last.
91418 	 */
91419 	uint8_t	valid;
91420 } hwrm_udcc_comp_qcfg_output_t, *phwrm_udcc_comp_qcfg_output_t;
91421 
91422 /************************
91423  * hwrm_udcc_comp_query *
91424  ************************/
91425 
91426 
91427 /* hwrm_udcc_comp_query_input (size:576b/72B) */
91428 
91429 typedef struct hwrm_udcc_comp_query_input {
91430 	/* The HWRM command request type. */
91431 	uint16_t	req_type;
91432 	/*
91433 	 * The completion ring to send the completion event on. This should
91434 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
91435 	 */
91436 	uint16_t	cmpl_ring;
91437 	/*
91438 	 * The sequence ID is used by the driver for tracking multiple
91439 	 * commands. This ID is treated as opaque data by the firmware and
91440 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
91441 	 */
91442 	uint16_t	seq_id;
91443 	/*
91444 	 * The target ID of the command:
91445 	 * * 0x0-0xFFF8 - The function ID
91446 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
91447 	 * * 0xFFFD - Reserved for user-space HWRM interface
91448 	 * * 0xFFFF - HWRM
91449 	 */
91450 	uint16_t	target_id;
91451 	/*
91452 	 * A physical address pointer pointing to a host buffer that the
91453 	 * command's response data will be written. This can be either a host
91454 	 * physical address (HPA) or a guest physical address (GPA) and must
91455 	 * point to a physically contiguous block of memory.
91456 	 */
91457 	uint64_t	resp_addr;
91458 	/*
91459 	 * This field holds the query arguments, which can be used to
91460 	 * specify the context of the query, e.g. type, session ID, etc.
91461 	 * It is possible not all arg_buf are utilized.
91462 	 * The format and meaning of the arguments are internal to
91463 	 * the UDCC program.
91464 	 */
91465 	uint8_t	arg_buf[40];
91466 	/*
91467 	 * This field specifies the number of bytes in arg_buf that are
91468 	 * query arguments. It can be zero if there are no arguments.
91469 	 */
91470 	uint32_t	arg_len;
91471 	/*
91472 	 * This field specifies the size of the buffer in the host memory
91473 	 * for receiving the status or statistics data. The host driver
91474 	 * shall guarantee the size of the buffer is not smaller than
91475 	 * the maximum data transfer size that is specified by
91476 	 * the max_comp_data_xfer field of hwrm_udcc_qcaps_output.
91477 	 */
91478 	uint32_t	data_host_buf_size;
91479 	/*
91480 	 * This field specifies the address of the host memory where
91481 	 * the queried data to be stored.
91482 	 */
91483 	uint64_t	data_host_addr;
91484 } hwrm_udcc_comp_query_input_t, *phwrm_udcc_comp_query_input_t;
91485 
91486 /* hwrm_udcc_comp_query_output (size:128b/16B) */
91487 
91488 typedef struct hwrm_udcc_comp_query_output {
91489 	/* The specific error status for the command. */
91490 	uint16_t	error_code;
91491 	/* The HWRM command request type. */
91492 	uint16_t	req_type;
91493 	/* The sequence ID from the original command. */
91494 	uint16_t	seq_id;
91495 	/* The length of the response data in number of bytes. */
91496 	uint16_t	resp_len;
91497 	/*
91498 	 * This field specifies the length of status or statistics data
91499 	 * transferred into the host memory. The amount of data transferred
91500 	 * is up to the maximum data transfer size that is specified by
91501 	 * the max_comp_data_xfer field of hwrm_udcc_qcaps_output.
91502 	 */
91503 	uint32_t	data_len;
91504 	uint8_t	unused_0[3];
91505 	/*
91506 	 * This field is used in Output records to indicate that the output
91507 	 * is completely written to RAM. This field should be read as '1'
91508 	 * to indicate that the output has been completely written. When
91509 	 * writing a command completion or response to an internal processor,
91510 	 * the order of writes has to be such that this field is written last.
91511 	 */
91512 	uint8_t	valid;
91513 } hwrm_udcc_comp_query_output_t, *phwrm_udcc_comp_query_output_t;
91514 
91515 #endif /* _HSI_STRUCT_DEF_H_ */
91516